PDA

View Full Version : [C++]Add item on Guild Join.



Cocain
29-03-10, 02:57 PM
#include "stdafx.h"
#include "setup.h"


void OnGuildJoin(Player * pPlayer, Guild * pGuild)

{

if(pPlayer->GetItemInterface()->GetItemCount(5976, false)>= 1)

{

pPlayer->BroadcastMessage("You already have a tabard.");


} else {

Item * pItem = objmgr.CreateItem(5976, pPlayer);

pPlayer->GetItemInterface()->AddItemToFreeSlot(pItem);
pPlayer->BroadcastMessage("You're an official guild member now!");
}
}


void SetupOnGuildJoin(ScriptMgr * mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_GUILD_JOIN, OnGuildJoin);

}

Have fun. ;)

Apple
29-03-10, 02:59 PM
nice one :) gr8 contribution

Cocain
29-03-10, 03:21 PM
Thank you.

mec
07-04-10, 05:28 AM
thats not bad

StickyIcky
07-04-10, 05:35 AM
Very nice, +rep

ArcEmu I'm guessing?

.SalMAX™
08-04-10, 12:49 AM
Nice Script +rep bud

Xees
08-04-10, 02:18 PM
very nice +Rep