generated from Jaysyn/ModuleTemplate
Initial commit
Initial commit
This commit is contained in:
38
_module/nss/opa_chk_buyt5.nss
Normal file
38
_module/nss/opa_chk_buyt5.nss
Normal file
@@ -0,0 +1,38 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Olander's Pack Animals
|
||||
// opa_chk_buyt5
|
||||
// By Don Anderson
|
||||
// dandersonru@msn.com
|
||||
//
|
||||
// This script is called from the Pack Animal Salesman Convo.
|
||||
//
|
||||
// Checks for Enough Gold.
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
object oNPC = OBJECT_SELF;
|
||||
object oMod = GetModule();
|
||||
|
||||
int nType5 = GetLocalInt(oMod,"T5PRICE");
|
||||
|
||||
//Get the Animal Waypoint
|
||||
object oWP = GetNearestObjectByTag("OPA_TYPE05",oNPC,1);
|
||||
|
||||
//Check for Enough Gold and Maximum Animals
|
||||
int nGP = GetGold(oPC);
|
||||
int nSTotal = GetLocalInt(oPC,"OPA_ANIMALTOTAL");
|
||||
if(nSTotal > 0) return FALSE;
|
||||
|
||||
//All Checks
|
||||
if(nGP >= nType5
|
||||
&& nSTotal == 0
|
||||
&& GetIsObjectValid(oWP) == TRUE)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
else return FALSE;
|
||||
}
|
||||
Reference in New Issue
Block a user