PDA

View Full Version : #food,#drink,#both Player - command's



You_Got_Tescoed
08-09-08, 01:42 PM
So i got bored and made this. Note: Not tested or compiled so any errors Post.

PlayerCommands.cpp:

#include "StdAfx.h"
#include "Setup.h"

#define FOOD_ADD 33254
#define DRINK_ADD 33236
#define BOTH_ADD 34062
#define MPOT_ADD 32948
#define HPOT_ADD 32947
#define STACK_COUNT 20

static string food = "#food";
static string food = "#drink";
static string food = "#both";
static string food = "#mpot";
static string food = "#hpot";

void EventPlayerCommands(Player * Plr, uint32 Type, uint32 Lang, const char * Message, const char * Misc)
{
if(Message == food)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(FOOD_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(FOOD_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}

elseif(Message == drink)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(DRINK_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(DRINK_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}

elseif(Message == both)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(FOOD_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(BOTH_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}

elseif(Message == hpot)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(FOOD_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(HPOT_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}

elseif(Message == mpot)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(FOOD_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(MPOT_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}
}

void SetupPlayerCommands(ScriptMgr * mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_CHAT, (void *) EventPlayerCommands);
}#include "StdAfx.h"
#include "Setup.h"

#define FOOD_ADD 33254
#define DRINK_ADD 33236
#define BOTH_ADD 34062
#define MPOT_ADD 32948
#define HPOT_ADD 32947
#define STACK_COUNT 20

static string food = "#food";
static string food = "#drink";
static string food = "#both";
static string food = "#mpot";
static string food = "#hpot";

void EventPlayerCommands(Player * Plr, uint32 Type, uint32 Lang, const char * Message, const char * Misc)
{
if(Message == food)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(FOOD_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(FOOD_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}

elseif(Message == drink)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(DRINK_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(DRINK_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}

elseif(Message == both)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(FOOD_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(BOTH_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}

elseif(Message == hpot)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(FOOD_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(HPOT_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}

elseif(Message == mpot)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(FOOD_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(MPOT_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}
}

void SetupPlayerCommands(ScriptMgr * mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_CHAT, (void *) EventPlayerCommands);
}Gl and if it works HF

Boxxy
08-09-08, 01:59 PM
So this adds items to a player? This has been done in lua and is 10x more simpler XD.

But still nice release +rep

You_Got_Tescoed
08-09-08, 02:03 PM
Yep Depending On What String or Text yuo type in the chat it will add you a item. Aka typeing #both will give you a mana biscuit with both health and food. 'food #water, Guess =D

You_Got_Tescoed
08-09-08, 02:14 PM
Update!: Added Health and Mana Pot Commands.

Also a note: You may want to add Flood Protection a bit more with theese ;)

StickyIcky
08-09-08, 04:15 PM
You should make this so it will check the players lvl
and give them the correct food/water

Apple
08-09-08, 08:09 PM
nice job +Rep ;)

Torgash
09-09-09, 12:15 PM
So i got bored and made this. Note: Not tested or compiled so any errors Post.

PlayerCommands.cpp:

#include "StdAfx.h"
#include "Setup.h"

#define FOOD_ADD 33254
#define DRINK_ADD 33236
#define BOTH_ADD 34062
#define MPOT_ADD 32948
#define HPOT_ADD 32947
#define STACK_COUNT 20

static string food = "#food";
static string food = "#drink";
static string food = "#both";
static string food = "#mpot";
static string food = "#hpot";

void EventPlayerCommands(Player * Plr, uint32 Type, uint32 Lang, const char * Message, const char * Misc)
{
if(Message == food)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(FOOD_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(FOOD_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}

elseif(Message == drink)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(DRINK_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(DRINK_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}

elseif(Message == both)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(FOOD_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(BOTH_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}

elseif(Message == hpot)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(FOOD_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(HPOT_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}

elseif(Message == mpot)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(FOOD_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(MPOT_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}
}

void SetupPlayerCommands(ScriptMgr * mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_CHAT, (void *) EventPlayerCommands);
}#include "StdAfx.h"
#include "Setup.h"

#define FOOD_ADD 33254
#define DRINK_ADD 33236
#define BOTH_ADD 34062
#define MPOT_ADD 32948
#define HPOT_ADD 32947
#define STACK_COUNT 20

static string food = "#food";
static string food = "#drink";
static string food = "#both";
static string food = "#mpot";
static string food = "#hpot";

void EventPlayerCommands(Player * Plr, uint32 Type, uint32 Lang, const char * Message, const char * Misc)
{
if(Message == food)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(FOOD_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(FOOD_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}

elseif(Message == drink)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(DRINK_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(DRINK_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}

elseif(Message == both)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(FOOD_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(BOTH_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}

elseif(Message == hpot)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(FOOD_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(HPOT_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}

elseif(Message == mpot)
{
ItemPrototype *proto;
ItemPrototype* it = ItemPrototypeStorage.LookupEntry(FOOD_ADD);
SlotResult slot;
Item * pItem = objmgr.CreateItem(MPOT_ADD, Plr);
proto = pItem->GetProto();
slot = Plr->GetItemInterface()->FindFreeInventorySlot(proto);
if(slot.Result)
{
pItem->SetUInt32Value(ITEM_FIELD_STACK_COUNT, STACK_COUNT);
pItem->SetOwner(Plr);
if (pItem->GetProto()->Bonding == ITEM_BIND_ON_PICKUP)
pItem->SoulBind();
pItem->m_isDirty = true;
Plr->GetItemInterface()->SafeAddItem(pItem,slot.ContainerSlot,slot.Slot);
if(Plr->IsInWorld() && !pItem->IsInWorld())
{
pItem->PushToWorld(Plr->GetMapMgr());

ByteBuffer buf(2500);
uint32 count = pItem->BuildCreateUpdateBlockForPlayer(&buf, Plr);
Plr->PushCreationData(&buf, count);
}
}
}
}

void SetupPlayerCommands(ScriptMgr * mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_CHAT, (void *) EventPlayerCommands);
}Gl and if it works HF
you copied your script twice in the code box

StickyIcky
10-09-09, 12:53 AM
Plus, what if their under level 75?

Dimman
10-09-09, 08:50 AM
are you sure that this is not a rippoff ive seen this before om ******* and acweb...

StickyIcky
12-09-09, 05:25 PM
I've made this before...
But it had drinks and shit for all levels...

LiLLeCarl
20-09-09, 05:41 AM
Who cares if its ripp or anything just be happy for the release :D