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

25 lines
623 B
Plaintext

// lupg_do_upg - Do the upgrade
#include "rtsh_multiplay"
void main()
{
object oPC=GetPCSpeaker();
string sID=GetLocalString(oPC,"sTeamID");
int nParm=GetLocalInt(oPC,"nParm");
int nRes;
object oOb=GetObjectByTag(sID+"upgrade_o");
if (nParm==1)
{ // mana
nRes=fnGetTeamMana(oPC);
nRes=nRes-1000;
fnSetTeamMana(oPC,nRes);
} // mana
else if (nParm==2)
{ // gold
AssignCommand(oOb,TakeGoldFromCreature(5000,oPC,TRUE));
} // gold
// unlock the door
AssignCommand(oOb,SetLocked(oOb,FALSE));
SendMessageToPC(oPC,"Your lair has been upgraded!!");
}