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

63 lines
2.1 KiB
Plaintext

////////////////////////////////////////////////////////////////////////////////
//
// Conversation Tokens Pack Animals and Horses
// opa_merch_tokens
// by Don Anderson
// dandersonru@msn.com
//
// Sets up all Tokens for the Animal Merchant
//
////////////////////////////////////////////////////////////////////////////////
#include "nbde_inc"
void main()
{
object oPC = GetPCSpeaker();
object oMerch = OBJECT_SELF;
object oMod = GetModule();
//Pack Animal Prices
int nType1 = GetLocalInt(oMod,"T1PRICE");
int nType2 = GetLocalInt(oMod,"T2PRICE");
int nType3 = GetLocalInt(oMod,"T3PRICE");
int nType4 = GetLocalInt(oMod,"T4PRICE");
int nType5 = GetLocalInt(oMod,"T5PRICE");
int nType6 = GetLocalInt(oMod,"T6PRICE");
int nType7 = GetLocalInt(oMod,"T7PRICE");
int nType8 = GetLocalInt(oMod,"T8PRICE");
int nType9 = GetLocalInt(oMod,"T8PRICE");
int nType10 = GetLocalInt(oMod,"T9PRICE");
int nType11 = GetLocalInt(oMod,"T10PRICE");
int nType12 = GetLocalInt(oMod,"T11PRICE");
int nType13 = GetLocalInt(oMod,"T12PRICE");
int nType14 = GetLocalInt(oMod,"T13PRICE");
//Pack Animals
SetCustomToken(2011,IntToString(nType1));
SetCustomToken(2012,IntToString(nType2));
SetCustomToken(2013,IntToString(nType3));
SetCustomToken(2014,IntToString(nType4));
SetCustomToken(2015,IntToString(nType5));
SetCustomToken(2016,IntToString(nType6));
SetCustomToken(2017,IntToString(nType7));
SetCustomToken(2018,IntToString(nType8));
//Horses
SetCustomToken(2031,IntToString(nType9));
SetCustomToken(2032,IntToString(nType10));
SetCustomToken(2033,IntToString(nType11));
SetCustomToken(2034,IntToString(nType12));
SetCustomToken(2035,IntToString(nType13));
SetCustomToken(2036,IntToString(nType14));
//Sale Price
object oPAItem = GetItemPossessedBy(oPC,"AnimalControl");
int nPACost = GetLocalInt(oPAItem,"OPA_SALEPRICE");
SetCustomToken(2020,IntToString(nPACost));
object oHItem = GetItemPossessedBy(oPC,"HorseControl");
int nHCost = GetLocalInt(oHItem,"HOR_SALEPRICE");
SetCustomToken(2040,IntToString(nHCost));
}