Rune_PRC8/_module/nss/oqs_choose_c2.nss
Jaysyn904 d1c309ae63 Initial commit
Initial commit
2024-09-13 09:10:39 -04:00

33 lines
1.1 KiB
Plaintext

////////////////////////////////////////////////////////////////////////////////
// Olander's and 9Fires' Quest/Commodities/Bounties System
// o9f_choose_c2
// By Don Anderson
// dandersonru@msn.com
//
// Called from the NPC Commodity Convo
//
////////////////////////////////////////////////////////////////////////////////
void main()
{
object oNPC = OBJECT_SELF;
string sNPC = GetTag(oNPC);
object oPC = GetPCSpeaker();
//Normal and Bulk Prices
string sNum = IntToString(2);
int nBPrice = GetLocalInt(oNPC,"BUY_BULKPRICE" + sNum);
int nQty = GetLocalInt(oNPC,"QUEST_QUANTITY" + sNum);
string sTag = GetLocalString(oNPC,"TAG" + sNPC + sNum);
string sName = GetLocalString(oNPC,"NAME" + sNPC + sNum);
object oContract = CreateItemOnObject("questcontract",oPC,1);
//Set Variables to Contract
SetLocalString(oContract,"CONTRACT_NPC",sNPC);
SetLocalInt(oContract,"CONTRACT_BULKPRICE",nBPrice);
SetLocalInt(oContract,"CONTRACT_QUANTITY",nQty);
SetLocalString(oContract,"CONTRACT_ITEMTAG",sTag);
SetLocalString(oContract,"CONTRACT_ITEMNAME",sName);
}