Shargast_PRC8/_module/Chapter 2/nss/cnr_ta_m_next.nss
Jaysyn904 66a0a3e043 Initial commit
Initial commit.
2024-08-03 14:13:18 -04:00

34 lines
857 B
Plaintext

/////////////////////////////////////////////////////////
//
// Craftable Natural Resources (CNR) by Festyx
//
// Name: cnr_ta_m_next
//
// Desc: Should the "Next" menu item be shown.
//
// Author: David Bobeck 12Dec02
//
/////////////////////////////////////////////////////////
#include "cnr_merch_utils"
int StartingConditional()
{
object oPC = GetPCSpeaker();
string sKeyToMenu = GetLocalString(oPC, "sCnrCurrentMenu");
int nMenuPage = GetLocalInt(oPC, "nCnrMenuPage");
string sMenuType = GetLocalString(oPC, "sCnrMenuType");
int nItemCount;
if (sMenuType == "BUY")
{
nItemCount = CnrMerchantGetBuyCount(sKeyToMenu);
}
else // "SELL"
{
nItemCount = CnrMerchantGetSellCount(sKeyToMenu);
}
if (((nMenuPage * CMD_SELECTIONS_PER_PAGE) + CMD_SELECTIONS_PER_PAGE) < nItemCount)
{
return TRUE;
}
return FALSE;
}