46 lines
844 B
Plaintext
46 lines
844 B
Plaintext
|
///
|
||
|
#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;
|
||
|
}
|