Battledale_PRC8/_module/nss/jw_im_getrobac.nss

46 lines
844 B
Plaintext
Raw Permalink Normal View History

///
#include "prc_x2_craft"
int StartingConditional()
{
int iResult;
object oPC = GetPCSpeaker();
object oBackup = CIGetCurrentModBackup(oPC);
object oItem = CIGetCurrentModItem(oPC);
int nCost ;
if (CIGetCurrentModMode(oPC) == X2_CI_MODMODE_ARMOR)
{
if (GetIsObjectValid(oItem))
{
nCost = GetLocalInt(oPC,"X2_TAILOR_CURRENT_COST");
}
else
{
return FALSE;
}
} else if (CIGetCurrentModMode(oPC) == X2_CI_MODMODE_WEAPON)
{
if (GetIsObjectValid(oItem))
{
nCost = GetLocalInt(oPC,"X2_TAILOR_CURRENT_COST");
}
else
{
return FALSE;
}
}
if (GetIsDM(oPC)||GetIsDMPossessed(oPC))
{
return TRUE;
}
iResult = (GetGold(oPC)>= nCost);
return iResult;
}