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

21 lines
559 B
Plaintext

// Make potion
void main()
{
object oItem;
string sRes=GetLocalString(OBJECT_SELF,"sALCRes");
string sCom=GetLocalString(OBJECT_SELF,"sALCCom");
int nGP=GetLocalInt(OBJECT_SELF,"nALCCost");
int nXP=GetLocalInt(OBJECT_SELF,"nALCXP");
int nN;
oItem=CreateItemOnObject(sRes,GetPCSpeaker(),1);
if (sCom!="NA")
{
oItem=GetItemPossessedBy(GetPCSpeaker(),sCom);
DestroyObject(oItem);
}
TakeGoldFromCreature(nGP,GetPCSpeaker(),TRUE);
nN=GetXP(GetPCSpeaker());
nN=nN-nXP;
SetXP(GetPCSpeaker(),nN);
}