35 lines
606 B
Plaintext
35 lines
606 B
Plaintext
void main()
|
|
|
|
{
|
|
object oPC = GetItemActivator();
|
|
|
|
object oItem;
|
|
|
|
oItem = GetItemPossessedBy(oPC, "food_cherie");
|
|
|
|
int stackSize = GetItemStackSize(oItem);
|
|
|
|
if ( stackSize == 1 )
|
|
{
|
|
DestroyObject( oItem );
|
|
}
|
|
else
|
|
{
|
|
stackSize -= 1;
|
|
SetItemStackSize( oItem, stackSize );
|
|
}
|
|
|
|
AssignCommand(oPC, TakeGoldFromCreature(50, oPC, TRUE));
|
|
|
|
object oTarget;
|
|
object oSpawn;
|
|
location lTarget;
|
|
oTarget = GetWaypointByTag("monsterspawn");
|
|
|
|
lTarget = GetLocation(oTarget);
|
|
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "ilubeetle", lTarget);
|
|
|
|
}
|
|
|