Jaysyn904 04165202c0 Initial upload
Initial upload
2024-11-25 19:36:07 -05:00

42 lines
1.4 KiB
Plaintext

// take cost and tell
void main()
{
object oMe=OBJECT_SELF;
int nCost=GetLocalInt(OBJECT_SELF,"nGoldCost");
string sItemTag=GetLocalString(OBJECT_SELF,"sSeek");
object oItem=GetObjectByTag(sItemTag);
string sMsg="nowhere that my vision can reach";
object oOb;
string sID;
TakeGoldFromCreature(nCost,GetPCSpeaker(),TRUE);
if (oItem!=OBJECT_INVALID)
{ // the item is in the game
if (GetItemPossessor(oItem)!=OBJECT_INVALID)
{ // someone has it
oOb=GetItemPossessor(oItem);
if (GetIsPC(oOb)==TRUE&&GetIsDM(oOb)==FALSE)
{ // player
sID=GetLocalString(oOb,"sTeamID");
sMsg="that a person named "+GetName(oOb)+" is carrying the object and is of the ";
if (sID=="SPID") sMsg=sMsg+"spider cultists";
else if (sID=="DWF") sMsg=sMsg+"dwarves";
else if (sID=="UND") sMsg=sMsg+"undead";
else if (sID=="UNC") sMsg=sMsg+"unclean ones";
} // player
else if (GetIsDM(oOb)==TRUE)
{ // DM
sMsg="that a being of infinite power by the name "+GetName(oOb)+" carries the object";
} // DM
else
{ // NPC
sMsg="that item is being carried by a "+GetName(oOb)+" and may lose the item soon";
} // NPC
} // someone has it
else
{ // area
sMsg="that the item lies somewhere in the area "+GetName(GetArea(oItem));
} // area
} // the item is in the game
SetCustomToken(4152004,sMsg);
}