Discussion in 'Scripts' started by Isnewbie, Jan 27, 2016.

  1. Isnewbie

    Isnewbie Active Member

    Messages:
    141
    Anyone know if this does a server call to check for maintained effect? I can't remember if it does or not. Thanks.
  2. lixleon

    lixleon Member

    Messages:
    85
    This is from Amadeus:

    Code (Text):
    The following datatypes have members that require server communication (if the data is not cached) as well as some members that do not:
      1. Effect
      2. Ability
      3. Recipe
      4. Item
     
    -Effect-
    The names of effects are not stored on the client.  Therefore, to avoid server communication, you must access the effect through one of the following ways:
      - Me.Effect[#]                (index of the effect within the array - uses beneficial array)
      - Me.Effect[beneficial,#]  (index of the effect within the array)
      - Me.Effect[detrimental,#]    (index of the effect within the array)
      - Me.Effect[id,#]          (ID# of the effect -- uses beneficial array)
      - Me.Effect[beneficial,id,#]
      - Me.Effect[detrimental,id,#]
     
      - Actor.Effect[#]          (index of the effect within the array)
      - Actor.Effect[id,#]


    The following effect MEMBERS and all METHODS do *not* require server communication (via cache):
        MaxDuration,    (Only available on 'character')
        Duration,      (Only available on 'character')
        ID,
        MainIconID,
        BackDropIconID,
        CurrentIncrements
       
       
    - Ability -
    The names of abilities are not stored on the client.  Therefore, to avoid server communication, you must access the ability through one of the following ways:
      - Me.Ability[#]              (index of the ability within the array)
      - Me.Ability[id,#]
      - Me.GetAbilities[<index:ability>]
      ...or, any of the "ToAbility" members throughout the extension
     


    The following ability MEMBERS and all METHODS do *not* require server communication (via cache):
        TimeRemaining,
        TimeUntilReady,
        IsReady,
        ID,
        IsQueued
       
       
    - Recipe -
    The following recipe MEMBERS and all METHODS do *not* require server communication (via cache):
        Name,
        Description,
        Device,
        RecipeBook,
        Level,
        ID,
        Technique,
        Knowledge
       


    - Item -
    The following item MEMBERS and all METHODS do *not* require server communication (via cache):
        Name,
        ID,
        IsEquipped,
        LinkID,
        ToLink,
        Index,
        InContainer,
        InContainerID,
        NumSlots,
        Slot,
        Quantity,
        IsContainer,
        ContainerID,
        InSharedBank,
        InBank,
        NumSlotsFree,
        IsSlotOpen,
        ItemInSlot,
        NextSlotOpen,
        InInventory,
        InInventorySlot,
        IsInventoryContainer,
        IsBankContainer,
        IsSharedBankContainer,
        InNoSaleContainer,
        IsAutoConsumeable,
        CanBeRedeemed,
        IsFoodOrDrink,
        CanScribeNow,
        IsScribeable,
        IsActivatable,
        IsReady,
        TimeUntilReady
     
  3. Amadeus

    Amadeus The Maestro Staff Member

    Messages:
    8,264
    I just double-checked, and nothing related to the maintained datatype requires a server call similar to the ones mentioned in the posting above. Everything we use from the 'maintained' data is stored on the client.
  4. Isnewbie

    Isnewbie Active Member

    Messages:
    141
    Ah thanks. Saw that post by Amadeus awhile ago and couldn't find it recently for reference.
  5. lixleon

    lixleon Member

    Messages:
    85
    Thank you Amadeus, Could you give me a specific example how to avoid server call if I want to check ${Me.Ability[Stonewall].IsReady} ? I didn't learn that part very well.
  6. Amadeus

    Amadeus The Maestro Staff Member

    Messages:
    8,264
    The only way to call Me.Ability, without a server call, is to use the ID# of the ability. So, basically, you need to keep a database/list of the IDs for every ability, and call it that way (e.g., ${Me.Ability[id,#].IsReady}) It's just as I said in the bit that you quoted earlier in the thread.
  7. lixleon

    lixleon Member

    Messages:
    85
    So, very ability have their own unique ID? I got it, thank you very much.

Share This Page