HoS_PRC8/_mod/_module/nss/rts_it_twhowmuch.nss
Jaysyn904 04165202c0 Initial upload
Initial upload
2024-11-25 19:36:07 -05:00

23 lines
724 B
Plaintext

// calculate team resources
void main()
{
object oPC=GetPCSpeaker();
string sID=GetLocalString(oPC,"sTeamID");
object oChest=GetObjectByTag(sID+"_CHEST");
int nGold=GetGold(oPC);
int nMana=GetLocalInt(oPC,"nManaStore");
int nSouls=GetLocalInt(oPC,"nSoulStore");
string sMsg=IntToString(nMana)+" mana, "+IntToString(nSouls)+" souls, and ";
object oItem=GetFirstItemInInventory(oChest);
while(oItem!=OBJECT_INVALID)
{ // check inventory
if (GetResRef(oItem)=="nw_it_gold001")
{ // gold
nGold=nGold+GetItemStackSize(oItem);
} // gold
oItem=GetNextItemInInventory(oChest);
} // check inventory
sMsg=sMsg+IntToString(nGold)+" gold";
SetCustomToken(92000,sMsg);
}