//////////////////////////////////////////////////////////////////////////////// // // 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; }