SphereCommunity
Calling Stable Variable? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere X (/Forum-Sphere-X)
+--- Forum: Script Help (/Forum-Script-Help--59)
+--- Thread: Calling Stable Variable? (/Thread-Calling-Stable-Variable)



Calling Stable Variable? - Uotopia - 11-25-2019 05:09 AM

In what variable is it saved the number of pets that the animal trainer stables for you?


RE: Calling Stable Variable? - Coruja - 11-27-2019 03:49 AM

unfortunately there's no variable, but you can port it from the PETSTABLE / PETRETRIEVE hardcoded functions

Code:
[FUNCTION StabledPetsQty]
// Syntax: use <StabledPetsQty [PlayerUID]> on animal trainer NPC
LOCAL.Total = 0
REF1=<FINDLAYER.layer_bankbox>
IF (<REF1>)
  FORCONT <REF1>
    IF ((<TYPE> == t_figurine) && (<LINK> == <ARGS>))
      LOCAL.Total ++
    ENDIF
  ENDFOR
ENDIF
return <LOCAL.Total>