FFXI Functions

from20020516 edited this page Jun 20, 2018 · 3 revisions

All functions in this table relate to the current state of the FFXI instance in some way.


windower.ffxi.cancel_buff(id)

  • id integer - ID of the buff to cancel

Cancels the buff specified by the ID.

windower.ffxi.drop_item(index, count)

  • index integer - Inventory index of the item
  • count integer [optional] - Number of items to drop

Drops the specified number of items from the active inventory, assuming the number provided is lower or equal to the number in possession.

windower.ffxi.follow(index)

  • index integer [optional]- Index of the target to follow

Follows the provided target. If no target provided, stops following.

windower.ffxi.get_abilities()

Returns a table contain 4 sub-tables:

{
    job_abilities: {...}
    job_traits: {...}
    weapon_skills: {...}
    pet_commands: {...}
}

Each sub-table lists the job abilities, job traits, weapon_skills or pet_commands the current character has available. This will include job abilities and pet commands that are simply waiting on their recast timer, as long as it appears in the respective menu.

windower.ffxi.get_ability_recasts()

Returns a table containing the current ability recast times. See below for spell recast times.

windower.ffxi.get_bag_info(bag)

  • bag integer [optional] - ID of the bag

Returns a table containing three values for each inventory:

{
    inventory: {
        count: int
        enabled: bool
        max: int
    }
    safe: {
        count: int
        enabled: bool
        max: int
    }
    etc. ...
}

These values are the same as in the windower.ffxi.get_items function, but this function does not require all items to be pushed and, as a result, is much more efficient if only these values are desired.

If a bag ID is provided as the argument, only the corresponding sub-table is returned.

windower.ffxi.get_info()

Returns FFXI related info, such as day/weather and if the player is logged in. Structure is:

{  
    day: int
    moon: int                * Percentage
    moon_phase: int
    time: int
    zone: int
    mog_house: bool
    logged_in: bool
    menu_open: bool
    chat_open: bool
    weather: int
    language: string
    server: int
    target_arrow: {
        x: number
        y: number
        z: number
    }
}

windower.ffxi.get_item(bag, slot, count)

  • bag integer - ID of the bag the item is being retrieved from
  • slot integer - Slot in the bag this item is in
  • count integer [optional] - Number of items in a stack you want to transfer

Retrieves the item at the specified slot from an inventory bag. If count is not provided, it only moves one item.

windower.ffxi.get_items(bag, index)

  • bag integer [optional] - Specify which inventory bag to pull
  • index integer [optional] - Specify which item from the specified bag to pull (requires bag argument)

Returns a table containing all items in the player's possession, including the current treasure pool (if no arguments are provided). The structure is as follows:

{
    safe: {
        1: {
            count: int,
            status: int,
            id: int,
            slot: int,
            bazaar: int,
            extdata: string,
        },
        2: {...},
        ...
    }
    locker: {...}
    sack: {...}
    case: {...}
    satchel: {...}
    inventory: {...}
    storage: {...}
    temporary: {...}
    wardrobe: {...}
    treasure: {...}
    gil: int
    max_safe: int
    max_locker: int
    max_sack: int
    max_case: int
    max_satchel: int
    max_inventory: int
    max_storage: int
    max_wardrobe: int
    max_temporary: int
    count_safe: int
    count_locker: int
    count_sack: int
    count_case: int
    count_satchel: int
    count_inventory: int
    count_storage: int
    count_wardrobe: int
    count_temporary: int
    enabled_safe: int
    enabled_locker: int
    enabled_sack: int
    enabled_case: int
    enabled_satchel: int
    enabled_inventory: int
    enabled_storage: int
    enabled_wardrobe: int
    enabled_temporary: int
    equipment: {
        ammo: int
        back: int
        ...etc.
        ammo_bag: int (0 or 8 or 10 - 12)
        back_bag: int (...)
        ...etc.
    }
}

If a bag ID is specified (0 through 12), retrieves only that bag in the following format:

    1: {
        count: int,
        status: int,
        id: int,
        slot: int,
        bazaar: int,
        extdata: string,
    },
    2: {...},
    ...
    max: int,
    count: int,
    enabled: int,

If a second parameter is specified, the item at the index is provided:

    count: int,
    status: int,
    id: int,
    slot: int,
    bazaar: int,
    extdata: string,

Item statuses: 0: None 5: Equipped 19: Linkshell Equipped 25: In Bazaar

windower.ffxi.get_key_items()

Returns a list of IDs of all available key_items.

windower.ffxi.get_map_data(index | x, y, z)

  • index number - Index of the mob to get the data for
  • x, y, z number - Coordinates to get the data for

Returns three values, the map ID (internally used ID for zones with multiple maps, otherwise 0), the X pixel coordinate and the Y pixel coordinate.

windower.ffxi.get_mjob_data()

Returns a table containing main job info. May be empty if no job data is provided. Currently provides:

  • PUP (attachments and Automaton stats)
  • BLU (which spells are set)
  • MON (species and instincts)

windower.ffxi.get_mob_by_id(id)

  • id integer - Full ID of the mob to look up Returns a table containing mob information. Mob information is structured as follows:
{
    name: string
    claim_id: int
    distance: number
    facing: number
    hpp: int
    id: int
    is_npc: boolean
    mob_type: int
    model_size: number
    speed: number
    speed_base: number
    race: number  
    status: int
    index: int
    x: number
    y: number
    z: number
    target_index: number (only valid for PCs)
    fellow_index: number (only valid for PCs)
    pet_index: number  
    tp: number  (only valid for pets - May not exist?)  
    mpp: number  (only valid for pets - May not exist?)  
    charmed: boolean
    in_party: boolean
    in_alliance: boolean
    valid_target: boolean
}

Note that some fields are optional. For example, fellow_index will only be set if the PC currently has an adventuring fellow. Otherwise, fellow_index is not in the table.

windower.ffxi.get_mob_by_index(index)

  • index integer - Index in the mob array of the mob to look up

Returns a table containing mob information. The format is the same as get_mob_by_id.

windower.ffxi.get_mob_by_name(name)

  • name string - Name of the mob to look up

Returns a table containing mob information. In case of multiple matches, the one with the lowest index will be returned. The format is the same as get_mob_by_id.

windower.ffxi.get_mob_by_target(target)

  • target string - String containing target variable Returns a table containing mob information. The format is the same as get_mob_by_id. Valid target variables:
  • me - Player
  • t - Current target
  • p*x* - Party member x, x from 0 to 5
  • a1*x* - Alliance 1 member x, x from 0 to 5
  • a2*x* - Party 2 member x, x from 0 to 5
  • lastst - Last sub-target
  • pet - Player's pet
  • r - Last tell sender
  • st - Current sub-target
  • ft - Fellow
  • bt - Party's enemy, is not guaranteed to return the same mob as <bt>
  • ht - Help target, call for help mob, not guaranteed to be the same as <ht>

windower.ffxi.get_mob_array()

Returns a table containing all mob tables currently in memory, keyed to a string representation of their IDs.

windower.ffxi.get_mob_name(id)

  • id integer - ID of the mob to look up

Returns the name of the mob with the provided ID in the current zone.

windower.ffxi.get_party()

Returns a table containing data on the party. The structure of this table is:

{  
    p0: {  
      hp: int  
      hpp: int  
      mp: int  
      mpp: int  
      tp: int  
      zone: int  
      name: string  
      mob: {mob structure, will not exist if member is not in zone}  
    }
    p1: {...}  
    etc.

    party1_leader: int or nil (if not in a party)
    party2_leader: int or nil (if no second party)
    party3_leader: int or nil (if no third party)
    party1_count: int
    party2_count: int
    party3_count: int
    alliance_leader: int or nil (if not in an alliance)
    alliance_count: int
}

Table keys go from p0-p5, a10-a15, a20-a25

windower.ffxi.get_player()

Returns a table containing player info. The structure is as follows:

{
    buffs: {int, int, ...}
    skills: {
        alchemy: int,
        bonecraft: int,
        ...
    }
    vitals: {
        hp: int,
        mp: int,
        max_hp: int,
        max_mp: int,
        hpp: int,
        mpp: int,
        tp: int
    }
    jobs: {
        WAR: int,
        MNK: int,
        ...
    }
    merits: {
        str: int,
        dex: int,
        ...
    }
    job_points: {
        war: {
            jp: int,
            cp: int,
            aggressor_effect: int,
            ...
        },
        mnk: {
        ...
    }
    name: string
    linkshell: string
    linkshell_rank: int
    linkshell_slot: int
    main_job: string
    main_job_level: int
    main_job_full: string
    main_job_id: int
    superior_level: int
    item_level: int
    nation: int
    id: int
    status: string
    status_id: int
    index: int
    sub_job: string
    sub_job_level: int
    sub_job_full: string
    sub_job_id: int
    target_index: int
    in_combat: bool
    autorun: {
        x: float,
        y: float,
        z: float
    }
    follow_index: int
}

windower.ffxi.get_position(index | x, y, z)

  • index number - Index of the mob to get the position for
  • x, y, z number - Coordinates to get the position for

Returns the in-game position string (same as <pos>) for either the provided coordinates, or the coordinates of the mob with the provided index, or for yourself, if no arguments are provided.

windower.ffxi.get_sjob_data()

Returns a table containing sub job info. May be empty if no job data is provided. Currently provides:

  • PUP (attachments and Automaton stats)
  • BLU (which spells are set)
  • MON (species and instincts)

windower.ffxi.get_spell_recasts()

Returns a table containing the current spell recast times. See above for ability recast times.

windower.ffxi.get_spells()

Returns a table containing all learned spells. Table is indexed by spell ID and contains a boolean for whether or not the player knows the spell. This does not indicate that the spell can be cast by the current job, just that it is known.

windower.ffxi.lot_item(slot)

  • slot integer - Slot in the treasure pool of the item you want to lot

windower.ffxi.pass_item(slot)

  • slot integer - Slot in the treasure pool of the item you want to pass

windower.ffxi.put_item(bag, slot, count)

  • bag integer - ID of the bag the item is being stored in from
  • slot integer - Slot in your inventory this item is in
  • count integer [optional] - Number of items in a stack you want to transfer

Stores the item at the specified slot in your inventory to a specified bag. If count is not provided, it only moves one item.

windower.ffxi.remove_blue_magic_spell(index)

number index: The slot of the spell to remove.

Removes the specified blue magic spell.

windower.ffxi.reset_attachments()

Resets all equipped attachments. Does not adjust the head and frame.

windower.ffxi.reset_blue_magic_spells()

Resets all blue magic spells.

windower.ffxi.run(...)

No arguments: Walks in the currently facing direction

bool run: Starts/stops running if the argument is true/false

float radian: Starts running in the specified direction

  • 0 is east, pi/2 south, -pi or pi is west, -pi/2 is north
  • Larger values are gradually reduced to radian % pi

float x, float y [, float z]: Starts running in the specified direction, where x faces east and y faces north

  • The values are normalized automatically
  • The z value is always ignored, added for completion

windower.ffxi.set_attachment(id, slot)

  • id integer - Item ID of the attachment to equip
  • slot integer - Slot to equip it in Equips an attachment to a certain slot. The slot argument is required unless the attachment is a head or frame, in which case it must be omitted.

windower.ffxi.set_blue_magic_spell(id, slot)

  • id integer - Spell ID as found in the resources
  • slot integer - Slot number Sets the provided blue magic spell to the provided slot.

windower.ffxi.set_equip(inv_id, slot, bag) =====

  • inv_id integer - ID in the inventory
  • slot integer - Slot ID to equip to
  • bag integer - Inventory bag to equip from

Equips the item in inventory position inv_id to the slot provided.

Valid slots:

  • 0: Main
  • 1: Sub
  • 2: Range
  • 3: Ammo
  • 4: Head
  • 5: Body
  • 6: Hands
  • 7: Legs
  • 8: Feet
  • 9: Neck
  • 10: Waist
  • 11: Left ear
  • 12: Right ear
  • 13: Left ring
  • 14: Right ring
  • 15: Back

Valid bags:

  • 0: Inventory
  • 8: Wardrobe
  • 10: Wardrobe2
  • 11: Wardrobe3
  • 12: Wardrobe4

windower.ffxi.toggle_walk(walk)

  • walk: bool - true to turn walk mode on, false to turn it off

Turns walk mode on/off, depending on the provided argument. Toggles it if no argument provided.

windower.ffxi.turn(dir)

  • dir: float - Radian of the angle to turn

Turns into the specified direction. Regular values go from -pi to +pi for a full turn (-pi faces westwards, rises counter-clockwise with 0 being east until +pi west again). Values outside of the range are accepted and gradually reduced. The character will keep spinning during that time, although it's hardly noticeable for other players.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.