So on my server we have these Aura stones scattered in hidden places, when you click on them you gain an aura but if you find another spell ti will remove the aura and add the new one if you get me.
Here's the script, I know the coding's shit but this was the first rev of it and I thought I'd release it. I will not help you add this to your trinity/skyfire server or give you the updated version and can confirm it works perfect on mine I will post a vid later. Remember to set your GO flags to 22 and to add the script name to them, oh and add it to ScriptLoader.cpp.
I added a double remove as we had a bug where it would keep adding the aura multiple times, this making it op and bugged.
Code:
enum Spells
{
BLUE_DRAGON = 23688, // Put your own spell name + id here
VENGEANCE = 39444,
};
class GO_aura_object : public GameObjectScript
{
public:
GO_aura_object12()
: GameObjectScript("go_Script_1")
{
}
bool OnGossipHello(Player* player, GameObject* /*go*/)
{
if(player->HasAura(player->HasAura(BLUE_DRAGON) || player->HasAura(VENGEANCE)))
{
player->RemoveAura(VENGEANCE);
player->RemoveAura(BLUE_DRAGON);
}
player->AddAura((VENGEANCE), player);
return false;
}
};
class GO_aura_object2 : public GameObjectScript
{
public:
GO_aura_object13()
: GameObjectScript("go_Script_2")
{
}
bool OnGossipHello(Player* player, GameObject* /*go*/)
{
if(player->HasAura(player->HasAura(BLUE_DRAGON) || player->HasAura(VENGEANCE)))
{
player->RemoveAura(VENGEANCE);
player->RemoveAura(BLUE_DRAGON);
}
player->AddAura(BLUE_DRAGON, player);
return false;
}
};
void AddSC_boss_void()
{
new GO_aura_object();
new GO_aura_object2();
}
danke
~2d~