-
Notifications
You must be signed in to change notification settings - Fork 429
FFXI Functions
All functions in this table relate to the current state of the FFXI instance in some way.
-
id
integer - ID of the buff to cancel
Cancels the buff specified by the ID.
-
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.
-
index
integer [optional]- Index of the target to follow
Follows the provided target. If no target provided, stops following.
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.
Returns a table containing the current ability recast times. See below for spell recast times.
-
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.
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
}
}
-
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.
-
bag
integer [optional] - Specify which inventory bag to pull -
index
integer [optional] - Specify which item from the specified bag to pull (requiresbag
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
Returns a list of IDs of all available key_items.
-
nil
- Uses data from the player -
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.
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)
-
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
heading: number
hpp: int
id: int
is_npc: boolean
entity_type: int
spawn_type: int
model_size: number
model_scale: number
models: {
1: int (base model)
2: int (head equipment)
3: int (body equipment)
4: int (hands equipment)
5: int (legs equipment)
6: int (feet equipment)
7: int (main equipment)
8: int (sub equipment)
9: int (ranged equipment)
}
speed: number
speed_base: number
animation_speed: 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.
-
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
.
-
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
.
-
target
string - String containing target variable Returns a table containing mob information. The format is the same asget_mob_by_id
. Valid target variables: -
me
- Player -
t
- Current target -
p*x*
- Party memberx
, x from 0 to 5 -
a1*x*
- Alliance 1 memberx
,x
from 0 to 5 -
a2*x*
- Party 2 memberx
,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>
Returns a table containing all mob tables currently in memory, keyed to a string representation of their indices.
-
id
integer - ID of the mob to look up
Returns the name of the mob with the provided ID in the current zone.
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
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,
jp_spent: 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: int
index: int
sub_job: string
sub_job_level: int
sub_job_full: string
sub_job_id: int
target_index: int
in_combat: bool
target_locked: bool
autorun: {
x: float,
y: float,
z: float
}
follow_index: int
}
-
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.
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)
Returns a table containing the current spell recast times in tick
s (60ths of a second -- divide the value by 60 to convert to second
s). See above for ability recast times.
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.
-
slot
integer - Slot in the treasure pool of the item you want to lot
-
slot
integer - Slot in the treasure pool of the item you want to pass
-
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.
number index
:
The slot of the spell to remove.
Removes the specified blue magic spell.
Resets all equipped attachments. Does not adjust the head and frame.
Resets all blue magic spells.
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
-
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.
-
id
integer - Spell ID as found in the resources -
slot
integer - Slot number Sets the provided blue magic spell to the provided slot.
-
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
-
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.
-
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.