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

34 lines
985 B
Plaintext

#include "rtsh_multiplay"
int StartingConditional()
{
object oPC=GetPCSpeaker();
string sID=GetLocalString(oPC,"sTeamID");
int nMana=fnGetTeamMana(oPC);
int nParm=GetLocalInt(oPC,"nParm");
string sReq=GetLocalString(oPC,"sUpgReqItem");
object oItem=GetItemPossessedBy(oPC,sReq);
int bHasItem=TRUE;
if (GetStringLength(sReq)>0&&oItem==OBJECT_INVALID) bHasItem=FALSE;
if (sID=="SPID")
{ // spiders
if (nParm==1&&nMana>99&&bHasItem) return TRUE;
else if (nParm==2&&nMana>149&&bHasItem) return TRUE;
} // spiders
else if (sID=="DWF")
{ // dwarves
nMana=GetGold(oPC);
if (nParm==1&&nMana>199&&bHasItem) return TRUE;
else if (nParm==2&&nMana>299&&bHasItem) return TRUE;
} // dwarves
else if (sID=="UND")
{ // undead
if (nMana>9&&bHasItem) return TRUE;
} // undead
else if (sID=="UNC")
{ // unclean
if (nMana>19&&bHasItem) return TRUE;
} // unclean
return FALSE;
}