PDA

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



Cocain
29-03-10, 01: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, 01:59 PM
nice one :) gr8 contribution

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

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

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

ArcEmu I'm guessing?

.SalMAX™
07-04-10, 11:49 PM
Nice Script +rep bud

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