Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
85 views

Functions and Variables RetroBot PDF

The document describes various information functions available in Tibia for retrieving character, skill, equipment, condition, inventory, creature, message, and map information. It lists over 100 getters covering topics like character stats, skills, conditions, equipment, containers, items, nearby creatures, messages, private messages, tile details, and more. All functions return the requested data in a standardized format like a number, boolean, string, or table.

Uploaded by

digomaciel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views

Functions and Variables RetroBot PDF

The document describes various information functions available in Tibia for retrieving character, skill, equipment, condition, inventory, creature, message, and map information. It lists over 100 getters covering topics like character stats, skills, conditions, equipment, containers, items, nearby creatures, messages, private messages, tile details, and more. All functions return the requested data in a standardized format like a number, boolean, string, or table.

Uploaded by

digomaciel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

#1 Information Functions

1.1 Character Information

• id() [number]
• name() [string]
• hp() [number]
• hppc() [number]
• maxhp() [number]
• mp() [number]
• mppc() [number]
• maxmp() [number].
• level() [number]
• exp() [number]
• cap() [number]
• dir() [number] - (0 -> n, 1 ->e, 2 -> s, 3 -> w)
• party() [number]
• skull() [number]
• iswalking() [boolean]
• outfitid() [number]
• posx() [number]
• posy() [number]
• posz() [number]

1.2 Skill Information

• mlevel() [number]
• mlevelpc() [number]
• fist() [number]
• fistpc() [number]
• club() [number]
• clubpc() [number]
• sword() [number]
• swordpc() [number]
• axe() [number]
• axepc() [number]
• distance() [number]
• distancepc() [number]
• shielding() [number]
• shieldingpc() [number]
1.3 Conditions Information

• invisible() [boolean]
• battlesigned() [boolean]
• drunk() [boolean]
• hasted() [boolean]
• manashielded() [boolean]
• burning() [boolean]
• energized() [boolean]
• paralyzed() [boolean]
• poisoned() [boolean]

1.4 Equipment Information

• head() [table]
• neck() [table]
• back() [table]
• armor() [table]
• lhand() [table]
• rhand() [table]
• legs() [table]
• feet() [table]
• finger() [table]
• belt() [table]
o .id [number]: Item ID of chosen slot.
o .name [string]: Item NAME of chosen slot.
o .count [number]: Item COUNT of chosen slot.

1.5 Client Window

• connected() [boolean]
• focused() [boolean]
• minimized() [boolean]
• chasemode() [number].
• attackmode() [number].
• safemode() [number].
1.6 Bot System

• cavebotstatus() [boolean]
• waypoint() [table]
o .id [number]: ID number of waypoint.
o .name [string]: Wapoint label/name.
o .type [string]: Waypoint type (drop, action, node, stand, etc.).
o .x [number]: Waypoint X position.
o .y [number]: Waypoint Y position.
o .z [number]: Waypoint Z position.
• getlurelocation() [table]: Returns the current lure location defined on cavebot/Targeting.
• healerstatus() [boolean] Returns true if Healer is enabled.
• ishealing() [boolean] Returns true if Healer is currently trying to heal.
• looterstatus() [boolean]
• islooting() [boolean]
• lootbodies() [number]: Returns the body's amount left to loot
• targetingstatus() [boolean]
• hastarget() [boolean]
• standtime() [number]
• botpaused() [boolean]
• isreconnecting()[boolean]
• getlastonto() [number]
• islocation(optional number range) [boolean] Returns true if the action
script is executed at the location where the action waypoint was set and false
otherwise. If the optional parameter range is specified, return true/false if you
are standing within range tiles of the waypoint location in x or y.
• getsettings(string path) [boolean][number][string]: Returns the path's
value. e.g.: getsettings('Looter/Settings/Enabled'), it's gonna if looter is
enabled.
• runemaker_isondanger() [boolean]: Returns true if Runemaker->Refill
Settings->On Danger is currently triggered.
• runemaker_isondangerconditions() [number]: Returns a number that
represents the danger types that Runemaker->Refill Settings->On Danger is
currently triggered. 0 means not in danger.
• runemaker_isrefilling() [boolean]: Returns true if Runemaker->Refill
Settings is currently refilling (picking up food, blanks or droping runes).
1.7 Item Information

• windowcount(optional string name) [number]: Represent the amount of


defined windows that are open.
• itemcount(string/number item, optional string location name, optional
boolean countEquipments) [number]: Represent the amount of defined
items found on opened containers.
• itemid(string itemname) [number]: Represent the ID of defined item.
• itemname(number itemid) [string]: Represent the name of defined item ID.
• getcontainers()[table]: Get all open containers.
• getcontainer(string/number container)[table]: Table of container
structure (index or name).
o
▪ .id [number]
▪ .index [number]
▪ .maxslots [number]
▪ .name [string]
▪ .open [string].
▪ .usedslots [number]
▪ .items [table]
▪ .id [number]: Item ID.
▪ .count [number]: Item amount.
▪ .index [number]: Item index in backpack.

1.8 Creature Information

• maround(optional number range, optional bool allfloors, optional string


names) [number]: Numbers of monsters around you in the range, floors and
names defined.
• maroundreachable(optional number range, optional string names)
[number]: Numbers of monsters around you in the range that are REACHABLE
and names defined.
• maroundshootable(optional number range, optional string names)
[number]: Numbers of monsters around you in the range that are SHOOTABLE
and names defined.
• paround(optional number range, optional bool allfloors, optional string
names) [number]: Numbers of monsters around you in the range, floors and
names defined.
• maroundfloor(optional number range, optional number floorDiff,
optional string names) [number]: Returns the amount of monsters on the
floor difference found in the range and list.
• paroundfloor(optional number range, optional number floorDiff,
optional string names) [number]: Returns the amount of players on the
floor difference found in the range and list.
• paroundignore(optional number range, optional boolean allfloors,
optional string names) [number]: Returns the amount of players around
you, except the ones found listed.
• maroundignore(optional number range, optional boolean allfloors,
optional string names) [number]: Returns the amount of monsters around
you, except the ones found listed.
• target() [table]: Returns a table with the targeting's choosen creature's
information..
• attacked() [table]: Returns a table with the targeted (red-square) creature's
information..
• followed() [table]: Returns a table with the following (green-square)
creature's information.
• self() [table]: Returns a table with yourself's information.
• getcreatures(string filter) [table]: (p, m, n, f and s) - You can combine all
as you like
o p: The creature has to be player.
o m: The creature has to be monster.
o n: The creature has to be npc.
o f: The creature must be on the same floor as you.
o s: The creature must be on the same floor as you and visible on screen.
▪ .id [number]
▪ .name [string]:
▪ .hppc [number]
▪ .posx [number]
▪ .posy [number]
▪ .posz [number]
▪ .dir [number] (0 = "n", 2 = "s", 1 = "e" or 3 = "w")
▪ .speed [number]
▪ .dist [number]
▪ .outfitid [number]
▪ .skull [number]
▪ .party [number]
▪ .visible [boolean]
▪ .walking [boolean]
▪ .ignored [boolean]
▪ .isattackme [boolean]
▪ .ismonster [boolean]
▪ .isplayer [boolean]
▪ .isshootable [boolean]
▪ .isreachable [boolean]
1.9 Messages Information

• ischannelopen(stringchannel) [boolean] Returns true the specified channel


is open.
• ischannelselected(string channel) [boolean] Returns true if the specific channel is
open and active (selected).
• statusmessage() [string]: Returns the currently written text in the 'Statusbar'.
• getmessages() [table]: Get the last messages on the current active channel.
• getnewmessages() [table]: Get the news received messages on the current
active channel.
o .time [string]
o .sender [string]
o .content [string]
o .fullcontent [string]

1.10 Private Messages Information

• getlastprivatemessage() [table]: Get the latest private message received.


o .hour [string]
o .minute [string]
o .sender [string]
o .content [string]

1.11 Map Information

• isposonscreen(number x, number y, number z, optional number fromX,


optional number fromY, optional number fromZ) [boolean]: Returns true if
item is on tile.
• isitemontile(string/number item, number x, number y, number z)
[boolean]: Returns true/false if the position set on parameters is on screen.
• tilereachable(number posx, number posy, number posz) [boolean]:
Return true/false if specific tile is REACHABLE .
• tileshootable(number posx, number posy, number posz) [boolean]:
Return true/false if specific tile is SHOOTABLE.
• tileiswalkable(number posx, number posy, number posz) [boolean]:
Return true/false if specific tile is WALKABLE.
• gettiles() [table]: Return a table with tiles information on your screen.
• gettile(number posx, number posy, number posz) [table]: Return tile
information.
o .posx [number]
o .posy [number]
o .posz [number]
o .items [table(item)]
o .topitem [item]
o .itemcount [number]
• finditemonground(string item/number itemId) [table]: Searches for an item
on ground and returns a table with it's position and item amount/count.
o .id [number]: Item ID.
o .count [number]: Item amount.
o .index [number]: Item index in backpack.
o .posx [number]
o .posy [number]
o .posz [number]
• topitem(number posx, number posy, number posz, optional boolean
considerCreatures) [table]: Return top of specific tile.
o .id [number]: Item ID.
o .count [number]: Item amount.
o .index [number]: Item index in backpack.
o .posx [number]
o .posy [number]
o .posz [number]

1.12 Vip Information

• isviponline(string vipName) [boolean]: Return true/false if player in your viplist is


online.
• getviplist() [table]: Return a table with vip information .
o .name [string]
o .isonline [boolean]
o .id [number]
o .icon [number]

1.13 Miscellaneous Information

• cancast() [boolean]: Return if can cast spell.


• exptolevel(optional number level) [number]: Amount of experience to
level.
• expgained() [number]: Returns exp gained since you chosen the client.
• exphour() [number]: Current exp per hour
• timenow() [number]: Returns the current time IN SECONDS.
• runningtime() [number]: Returns the time in SECONDS SINCE the bot has started.
• startedtime() [number]: Returns the time in SECONDS WHEN the bot has started.
• formattedtime() [string]: Returns the current time formated (e.g. 22:03:51).
• date() [string]: Returns the current date (mm/dd/yyyy -> 12/25/2017)).
• timetosec(string timeConvert) [string]: Converts the string time (hour:minutes) to
seconds (15:30 -> 53534)).
• cursorinfo(optiona bool getItemId)[table]: Table of mouse cursor
information.
o .x [number]
o .y [number]
o .posx [number]
o .posy [number]
o .posz [number]
o .id [number]
o

2.1 Character Actions

• attack(string creature) [void]: Attack first creature with this name or id.
• follow(string/number creature) [void]: Follow first creature with this name
or id.
• stopattack() [void]: Send ESC key if attacking.
• stop() [void]: Send ESC key single time.
• cast(string spellwords) [boolean]
• dropitems(number array id) [void]: Drop items.
• eatfood(number amount, optional boolean alsoFromInventory) [void]:
Eat any food found in backpacks and inventory (if enabled).
• move(string direction) [void]: Move to any direction ("n", "s", "e", "w",
"nw", "ne", "sw" or "se").
• moveitems(string item, string to, string from, optional in count) [void]
• moveitemsonto(string/number item, string/number OnToItem, number
Index, string ToItem, string From, number Amount) [void]
• pickupitems(string dir) [void]
• reachlocation(number x, number y, number z, optional bool stepIn)
[boolean]: Try to move to location.
• resizewindow(string/number item, number size) [void]: Resize defined
window to defined size.
• resizewindows() [void]: Resize to minimum size all open windows.
• closewindow(string windowname) [void]: Close a specific container
window.
• closewindows() [void]: Close all open containers windows.
• resizebattle(number size) [void]: Resize battle window to defined size.
• say(string text, optional string channel) [void]: Speaks defined text in
defined channel, if channel not defined, speak in default.
• turn(string direction) [void]: Turn your character in direction ("n", "e", "s"
ou "w").
• rturn(number times, optional bool backOriginal) [void]: Turn your
character in random directions, then back to original or not.
• openitem(string/number item, string location, bool newWindow,
number Index) [void]: Open an item located inside your containers,
inventory or ground, depends of your location choice.
• useitem(string/number item, string location) [void]: Use an item located
inside your containers or inventory.
• useitemon(string item, number x, number y, number z) [void]: Use an
item located inside your containers or inventory in the floor with X, Y and Z
defined position.
• useitemonitem(string item, string itemon, string itemon location)
[void]: Use an item on another item inside your containers or inventory.
• useitemoncreature(string item, string creature) [void]: Use an item
located inside your containers or inventory in the creature with the defined
name.
• moveitemspos(number x, number y, string item, optional string
location, optional number count) [void]: Move an item located inside your
containers or inventory in X/Y PIXEL defined position.
• useitemonpos(number x, number y, string item, optional string
location) [void]: Use an item located inside your containers or inventory in
the X/Y PIXEL defined position.
• minimizewindow(string windowName) [void]: Minimize windows.
Parameters can be: "equip".
• restorewindow(string windowName) [void]: Maximize windows.
Parameters can be: "equip".
• higherwindow(string windowName) [void]: Try to back to parent
container of defined container.
• stackitems(optional string location, optional boolean onlyOnce,
optional string itemName) [void]: Try to stack items on defined container.
• connect(string account, string password, string characterName) [void]:
Connect to this account and character if not connected.
• logout() [boolean]: Logs you out by pressing CTRL+L..
• xlog() [boolean]: Try to logout and close the RetroCores client.
• reachgrounditem(string item/number itemId, optional boolean stepIn)
[void]: Searches for specific item on ground on your screen and try to reach it. Optional parameter
boolean set to TRUE to walk over it or FALSE to just reach (adjacent).
• reachlocation(number posx, number posy, number posz) [boolean]: Try
to reach specific location on your screen.
• reachcreature(string/number creature, optional number distance)
[void]: Searches for specific creature on your screen and try to reach it.
• shootarearune(string/number rune, int minMonsters, string Monsters
...) [boolean]: Try to shoot specific area rune on at least min monsters.
• shootexplosion(int minMonsters, string Monsters ...) [boolean]: Try to
shoot explosion rune on at least min monsters.
• setattackmode(string mode) [void]: Set the specific mode ("chase", "stand",
"offensive", "balanced", "defensive").
• setpvpmode(string pvpMode) [void]: Set the specific pvp mode ("dove" or "red").
• changegold(string/number container, optional boolean
openNextBackpacks, optional boolean backFirstBackpack) [boolean]: It
will count your gold and try to change gold you. If can also search for more gold on next backpacks
and back to first backpack after all.
• opensomething(number X, number Y, number Z, string/number item,
table holes) [boolean]: Open something based on specified location, tool used to open and
item to be opened, usefull for open pick holes, shovel holes, sand, etc.
• usedoor(number X, number Y, number Z, string action) [boolean]: Open
or close a door on specified location. Action parameter must be 'open' or 'close'.
• selectchannel(string channel) [boolean] Returns true if the specific channel is open
and will active (select) it.
• inviteparty(string name) [boolean]: Invites someone to your part or join someone's
party.
• isinvitedparty(string name) [boolean]: Returns if someone is invited or on your
party.
• isonparty(string name) [boolean]: Returns if someone is on your party.

2.2.1 Bot Systems

• pausebot(bool pause) [void]: Will pause RetroCores Bot. Set true to pause
and false to unpause.
• pausetargetingspell(number time) [void]: Pauses targeting from shooting
runes or casting spells for a certain time.
• flashclient() [void]
• focusclient() [void]
• restoreclient() [void]
• minimizeclient() [void]
• gotolabel(string/number label) [void]: Make the next waypoint the
string/number to be defined as parameter "label".
• clearlastonto() [void]
• islocationxyz(number X, number Y, number Z, optional number range)
[boolean] Returns true if the action script is executed at the location within
range.
• pausewalking(number time) [void]: Pause cavebot, targeting and looter
WALKING during time set in milliseconds.
• print(string text) [void]: Print text in Console window.
• printerror(string text) [void]: Print text (red color) in Console window.
• wait(number first time, optional number second time) [void]: Make
scripts sleeps (wait) for desired time in milliseconds.
• setlurelocation(number posx, number posy, number posz) [void]: Set a
lure location to Cavebot/Targeting.
• setsettings(string path, string/number/boolean value) [void]: Changes
the path's value. e.g.: setsettings('Looter/Settings/Enabled', 'yes'), it's gonna
enable Looter.
• setglobal(string NAME, string/number/boolean/table VALUE) [void]:
Define a global variable.
• messagebox(string text, optional string caption, optional number icon)
[void]: Displays a modal dialog box witj following text, caption and system
icon. Icon: 0 = None, 1 = Information, 2 = Warning and 3 = Error.
• screenshot(optional string name) [void]: Takes a screenshot of the entire client
window. If filename is not specified, a filename will be named as "SS_" and the current time (in
ticks) will be created.
• ground(number X, number Y, number Z) [string]: Return the chosen xyz
ground position in string, must be used as parameters on functions that
requires ground position.
• addhudloot(string item, optional number count) [void]: Add a specific
count (+1 by default) to an item's count to loot's counter.
• sethudloot(string item, number count) [void]: Set an item's count to loot's
counter.
• gethudloot(string/number item) [number]: Returns the amount of items
looted of a specific item.
• getlootitems()[table]: Returns a table with each item that looter has looted.
o .itemid [number]
o .itemname [string]
o .id [number]
• addhudsupply(string item, optional number count) [void]: Add a specific
count (+1 by default) to an item's count to supplies' counter.
• sethudsupply(string item, number count) [void]: Set an item's count to
supplies' counter.
• gethudsupply(string/number item) [number]: Returns the amount of
items useds of a specific item.
• getsupplyitems()[table]: Returns a table with each item that Healer has
used.
o .itemid [number]
o .itemname [string]
o .id [number]
• addhuddropped(string item, optional number count) [void]: Add a
specific count (+1 by default) to an item's count to droppeds' counter.
• sethuddropped(string item, number count) [void]: Add an item's count to
droppeds' counter.
• gethuddropped(string/number item) [number]: Returns the amount of
items dropped of a specific item.
• getdroppeditems()[table]: Returns a table with each item that Looter has
dropped.
o .itemid [number]
o .itemname [string]
o .id [number]
• resethud() [void]: Reset entire HUD. Which means running time, looted
items, dropped items and supplies.
• resethudloot() [void]: Reset looted items.
• resethudsupply() [void]: Reset supplies.
• resethuddropped() [void]: Reset dropped items.
• resetrunningtime() [void]: Reset running time.
• resetexp() [void]: Reset exp hour calculator.

• speech(string text, optional number speed, optional number volume,


optional string voice, optional boolean sync) [void]: Will speak the
contents of the string given. Speed from -10 to 10; Volume from 0 to 100. If
SYNC is true, Bot waits until it finishes speaking before continuing to the next
line of code, otherwise it will start speaking and go to next line of code. Every
other function on Bot is synchronized.
• stopspeech() [void]: Stops a currently running speech. This works only if
SYNC parameter set to FALSE on speech() function.
• speechstate() [number]: Returns the current state of a speech. This works
only if SYNC parameter set to FALSE on speech() function.

You might also like