Code:#include "StdAfx.h" #include "Setup.h" //PVP Event void onPvpKill(Player* plr, Player* victim) { if(plr->getLevel() >= 70 && victim->getLevel() >= 70) { ItemPrototype *proto = ItemPrototypeStorage.LookupEntry(90909); SlotResult slotresult; slotresult = plr->GetItemInterface()->FindFreeInventorySlot(proto); if(!slotresult.Result) { plr->GetItemInterface()->BuildInventoryChangeError(NULL, NULL, INV_ERR_INVENTORY_FULL); } else { Item *itm = objmgr.CreateItem(90909, plr); itm->SetUInt32Value(ITEM_FIELD_STACK_COUNT, 1); plr->GetItemInterface()->SafeAddItem(itm,slotresult.ContainerSlot, slotresult.Slot); victim->ModUInt32Value(PLAYER_FIELD_COINAGE, -0); } } } extern "C" SCRIPT_DECL uint32 _exp_get_version() { return MAKE_SCRIPT_VERSION(SCRIPTLIB_VERSION_MAJOR, SCRIPTLIB_VERSION_MINOR); } extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr) { SetupGoHandlers(mgr); ::sScriptMgr.register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, onPvpKill); } #ifdef WIN32 BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { return TRUE; } #endif
would appreciate somone complie this