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

24 lines
769 B
Plaintext

// random house - brewer
int StartingConditional()
{
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
int nGold=GetGold(oPC);
int nParm=GetLocalInt(oPC,"nParm");
string sRes="";
int nCost=0;
object oShoes;
if (nParm==1) { nCost=5; sRes="rhbrew1"; }
else if (nParm==2) { nCost=5; sRes="rhbrew2"; }
else if (nParm==3) { nCost=50; sRes="rhbrew3"; }
else if (nParm==4) { nCost=50; sRes="rhbrew4"; }
else if (nParm==5) { nCost=50; sRes="rhbrew5"; }
else if (nParm==6) { nCost=50; sRes="rhbrew6"; }
else { nCost=50; sRes="rhbrew7"; }
if (nGold<nCost) return FALSE;
AssignCommand(oMe,TakeGoldFromCreature(nCost,oPC));
oShoes=CreateItemOnObject(sRes,oPC);
SetIdentified(oShoes,TRUE);
return TRUE;
}