66 lines
845 B
Plaintext
66 lines
845 B
Plaintext
|
void jw_strip_items(object oPC);
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
object oPC = GetEnteringObject();
|
||
|
|
||
|
/*
|
||
|
object oBook=GetItemPossessedBy(oPC,"jw_gm_book");
|
||
|
if (!GetIsObjectValid(oBook))
|
||
|
{
|
||
|
CreateItemOnObject("jw_gm_book",oPC);
|
||
|
}
|
||
|
*/
|
||
|
|
||
|
if (GetIsPC(oPC)&&(GetXP(oPC)!=0)&&(!GetIsDM(oPC)))
|
||
|
|
||
|
{
|
||
|
AssignCommand(oPC,JumpToObject(GetWaypointByTag("jw_pr_wp"),FALSE));
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
|
||
|
else
|
||
|
{
|
||
|
if (GetIsPC(oPC)&&!GetIsDM(oPC))
|
||
|
|
||
|
{
|
||
|
|
||
|
jw_strip_items(oPC);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
void jw_strip_items(object oPC)
|
||
|
|
||
|
{
|
||
|
int nIdx;
|
||
|
object oItem;
|
||
|
object oStrip;
|
||
|
|
||
|
|
||
|
|
||
|
for (nIdx=1;nIdx<=18;nIdx++)
|
||
|
{
|
||
|
oItem=GetItemInSlot(nIdx,oPC);
|
||
|
DestroyObject(oItem);
|
||
|
}
|
||
|
|
||
|
oItem=GetFirstItemInInventory(oPC);
|
||
|
|
||
|
while (GetIsObjectValid(oItem))
|
||
|
|
||
|
{
|
||
|
oStrip=oItem;
|
||
|
DestroyObject(oStrip);
|
||
|
oItem=GetNextItemInInventory(oPC);
|
||
|
}
|
||
|
|
||
|
GiveGoldToCreature(oPC,240-GetGold(oPC));
|
||
|
|
||
|
//CreateItemOnObject("jw_potion_light",oPC,3);
|
||
|
|
||
|
}
|
||
|
|