-------------------------------------------------------------- -- client side script on the object to spawn the grypon pet -- created by Brandi... 7/18/11 - based on L_SPAWN_PET_BASE_CLIENT -------------------------------------------------------------- require('02_client/Map/General/L_SPAWN_PET_BASE_CLIENT') local TooManyPetsText = "PET_SUMMON_FAIL" local TooManyIcon = 2977 ---------------------------------------------- -- Check to see if the player can use the console ---------------------------------------------- function onCheckUseRequirements(self, msg) -- Determine if interaction is valid based on current use -- find out if there is already too many pets out, or if the local player already has a pet out if(self:GetNetworkVar("TooManyPets")) or self:GetVar("playerPetAlready") then if msg.isFromUI then msg.HasReasonFromScript = true msg.Script_IconID = TooManyIcon msg.Script_Reason = Localize(TooManyPetsText) msg.Script_Failed_Requirement = true end msg.bCanUse = false end return msg end function onScopeChanged(self,msg) -- if the player entered ghosting range if msg.bEnteredScope then -- get the player local player = GAMEOBJ:GetControlledID() if not player:Exists() then -- tell the zone control object to tell the script when the local player is loaded self:SendLuaNotificationRequest{requestTarget = GAMEOBJ:GetZoneControlID() , messageName="PlayerReady"} return end -- custom function self:RequestPickTypeUpdate() end end -- the zone control object says the player is loaded function notifyPlayerReady(self,zoneObj,msg) -- get the player local player = GAMEOBJ:GetControlledID() if not player:Exists() then return end -- custom function to see if the players flag is set self:RequestPickTypeUpdate() -- cancel the notification request self:SendLuaNotificationCancel{requestTarget=player, messageName="PlayerReady"} end ---------------------------------------------- -- if you cant internet act with the bird nest, you should see any icons ---------------------------------------------- function onGetPriorityPickListType(self, msg) local myPriority = 0.8 if ( myPriority > msg.fCurrentPickTypePriority ) then msg.fCurrentPickTypePriority = myPriority msg.ePickType = 14 local preConVar = self:GetVar("CheckPrecondition") if preConVar and preConVar ~= "" then local player = GAMEOBJ:GetControlledID() if not player:Exists() then return end -- We have a valid list of preconditions to check local check = player:CheckListOfPreconditionsFromLua{PreconditionsToCheck = preConVar, requestingID = self} if not check.bPass then msg.ePickType = -1 end end return msg end end