• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[WotLK] [C++] Arena System - UPDATED -With World Config

Wolord

Exalted Member
Hi EmuDevs, I had also updated the arena_pvp_system.cpp from U-wow scripts with config.​

Code:
#include "ScriptPCH.h"

class arena_system : public PlayerScript
{
public:
	arena_system() : PlayerScript("arena_system") {}

	void OnPVPKill(Player* killer, Player* killed)
	{
		if (killer->GetMap()->IsBattleArena())
		{
		                ChatHandler(killer->GetSession()).PSendSysMessage("You just killed |cffFF0000%s|r in arena and stole " + (killed->getGender() == MALE ? "his" : "her") + " soul.", killed->GetName());
				killer->AddItem(sWorld->getIntConfig(CONFIG_ARENA_SOUL_ID), sWorld->getIntConfig(CONFIG_ARENA_SOUL_COUNT));

		}
	}
};

void AddSC_arena_system()
{
	new arena_system;
}

TESTED ON LATEST TrinityCore.​

Remember to add : sWorld->getIntConfig(CONFIG_ARENA_SOUL_ID) and sWorld->getIntConfig(CONFIG_ARENA_SOUL_COUNT) to your world.cpp and world.h.

Special Thanks to : Parranoia
 
Last edited:

Parranoia

Insane Member
Could have simplified it to something like this
Code:
ChatHandler(killer->GetSession()).PSendSysMessage("You just killed |cffFF0000%s|r in arena and stole " + (killed->getGender() == MALE ? "his" : "her") + " soul.", killed->GetName());
 

Wolord

Exalted Member
Could have simplified it to something like this
Code:
ChatHandler(killer->GetSession()).PSendSysMessage("You just killed |cffFF0000%s|r in arena and stole " + (killed->getGender() == MALE ? "his" : "her") + " soul.", killed->GetName());

Thanks. i did it.:laughing:
 

Crow

Enthusiast
It is a script whenever you kill somebody in an arena match will give you a reward for that.:wink2:

so basically it's just another kill token script.

/shrug, we dont judge on emudevs but I really gotta admit, it's not really a new idea. A good suggestion is to just do automatic arena points by adding it or writing something that isnt as cheesy imo as "stealing souls" unless you made a specific arena/necromancer zone type thing going.

whatever, it's a decent enough release, good job. Just feels kinda bland is all imo
 

Clastor

Enthusiast
I get an error


MjMWZUB.png
 

Attachments

  • MjMWZUB.jpg
    MjMWZUB.jpg
    30.8 KB · Views: 33
Top