void TombSpawn(object oTarget, object oPC) { // Use a switch statement, it will simplify adding or changing cases string sTomb; string ResRef; object oItem; int oFlag = 0; int nDice; string oMonst; oMonst = GetTag(oTarget); nDice = d20(); if (nDice==1) { sTomb = "deathwurm"; } if (nDice==2) { sTomb = "blaroglord"; } if (nDice==3) { sTomb = "darkreaver"; } if (nDice==4) { sTomb = "wardemon"; } if (nDice==5) { sTomb = "thevalar"; } if (nDice==6) { sTomb = "deathwurm2"; } if (nDice==7) { sTomb = "blaroglord2"; } if (nDice==8) { sTomb = "darkreaver2"; } if (nDice==9) { sTomb = "wardemon2"; } if (nDice==10) { sTomb = "thevalar2"; } if (nDice==11) { sTomb = "baal1"; } if (nDice==12) { sTomb = "baal2"; } if (nDice==13) { sTomb = "bardheratic"; } if (nDice==14) { sTomb = "bardheratic2"; } if (nDice==15) { sTomb = "kamaji"; } if (nDice==16) { sTomb = "kamaji2"; } if (nDice==17) { sTomb = "mistress"; } if (nDice==18) { sTomb = "mistress2"; } if (nDice==19) { sTomb = "lucifer1"; } if (nDice==20) { sTomb = "lucifer2"; } oItem = GetFirstItemInInventory(oPC); while (oItem!=OBJECT_INVALID) { ResRef = GetResRef(oItem); if (ResRef==sTomb) { oFlag=1; } oItem = GetNextItemInInventory(oPC); } if (oFlag!=1) { CreateItemOnObject(sTomb, oTarget); } } void CreateGold(object oTarget, int nStackSize) { object oPC = GetLastKiller(); int oKills = GetLocalInt(oPC, "iKilled"); int oDeaths = GetLocalInt(oPC, "iDied"); nStackSize+=(oKills-oDeaths)*100; string sItemTemplate1 = "nw_it_gold001"; // gold CreateItemOnObject(sItemTemplate1, oTarget, nStackSize); } //void main (){}