30 lines
712 B
Plaintext
30 lines
712 B
Plaintext
|
#include "nw_i0_tool"
|
||
|
void Gold(object oPC,int iGold)
|
||
|
{
|
||
|
AssignCommand(oPC, TakeGoldFromCreature(iGold-150, oPC, TRUE));
|
||
|
}
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
object oPC = GetEnteringObject();
|
||
|
int iGold = GetGold(oPC);
|
||
|
object oItem = GetFirstItemInInventory(oPC);
|
||
|
int nInt=GetLocalInt(oPC, "skullball_item");
|
||
|
|
||
|
if(!GetIsPC(oPC)) return;
|
||
|
if(GetIsDM(oPC)==TRUE) return;
|
||
|
if (nInt ==1)return;
|
||
|
|
||
|
while(GetIsObjectValid(oItem))
|
||
|
{
|
||
|
SetPlotFlag(oItem,FALSE);
|
||
|
DestroyObject(oItem);
|
||
|
oItem = GetNextItemInInventory(oPC);
|
||
|
}
|
||
|
SetLocalInt(oPC, "skullball_item", 1);
|
||
|
RewardPartyGP(150, oPC, FALSE);
|
||
|
SendMessageToPC(oPC,"Re-equipped for skullball");
|
||
|
if(iGold>150)Gold(oPC,iGold);
|
||
|
|
||
|
}
|