Page 1 of 6 123 ... LastLast
Results 1 to 10 of 54

Thread: iBot Documentation - A list of iBot Variables and Functions

  1. #1
    Normal User blakw's Avatar
    Join Date
    Mar 2012
    Location
    www.blakw.com
    Posts
    817
    Mentioned
    221 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    345 Post(s)
    Reputation
    462
    Rep Power
    10
    Last edited by blakw; 12-12-2013 at 03:29 PM.


    ------------------------------------Latest Releases:------------------------------------
    Vocations:
    Darashia Lions Rock
    Oramond Seacrest Serpents X1

    For a better iBot!

    (◣_◢)

  2. #2
    Normal User blakw's Avatar
    Join Date
    Mar 2012
    Location
    www.blakw.com
    Posts
    817
    Mentioned
    221 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    345 Post(s)
    Reputation
    462
    Rep Power
    10
    1 Variables

    1.1 Self Class

    The following variables return information about your character.

    1.1.1 Character Information


    • id [int]: Return unique character ID.
    • name [string]: Return character name.
    • hp [int]: Return current amount of character hit points.
    • hppc [int]: Return % amount of character hit points.
    • maxhp [int]: Return maximum amount of character hit points.
    • mp [int]: Return current amount of character mana points.
    • mppc [int]: Return % amount of character mana points.
    • maxmp [int]: Return maximum amount of character mana points.
    • level [int]: Return current character level.
    • exp [int]: Return current amount of character experience points.
    • cap [float]: Return current amount of character capacity points.
    • stamina [int]: Return current character stamina number in minutes.
    • offtrain [int]: Return current character off-line train number in minutes.
    • soul [int]: Return current amount of character soul points.
    • outfit [int]: Return character outfit ID.
    • vocation [int]: Return character vocation ID.
    • posx [int]: Return character X position on game map.
    • posy [int]: Return character Y position on game map.
    • posz [int]: Return character Z position on game map.



    1.1.2 Skill Information


    • mlevel [int]: Return number of character magic level.
    • mlevelpc [int]: Return % amount of character magic level.
    • fist [int]: Return number of character fist fighting.
    • fistpc [int]: Return % amount of character fist fighting.
    • club [int]: Return number of character club fighting.
    • clubpc [int]: Return % amount of character club fighting.
    • sword [int]: Return number of character sword fighting.
    • swordpc [int]: Return % amount of character sword fighting.
    • axe [int]: Return number of character axe fighting.
    • axepc [int]: Return % amount of character axe fighting.
    • distance [int]: Return number of character distance fighting.
    • distancepc [int]: Return % amount of character distance fighting.
    • shielding [int]: Return number of character shielding.
    • shieldingpc [int]: Return % amount of character shielding.
    • fishing [int]: Return number of character fishing.
    • fishingpc [int]: Return % amount of character fishing.


    1.1.3 Special Conditions Information


    • battlesigned [boolean]: Return true if character have indication of battle, else return false.
    • drunk [boolean]: Return true if character have indication of drunk, else return false.
    • hasted [boolean]: Return true if character have indication of haste, else return false.
    • manashielded [boolean]: Return true if character have indication of mana shield, else return false.
    • strengthened [boolean]: Return true if character have indication of strength, else return false.
    • burning [boolean]: Return true if character have indication of burn, else return false.
    • cursed [boolean]: Return true if character have indication of curse, else return false.
    • energized [boolean]: Return true if character have indication of eletrified, else return false.
    • paralyzed [boolean]: Return true if character have indication of paralyzed, else return false.
    • poisoned [boolean]: Return true if character have indication of poison, else return false.
    • pvpsigned [boolean]: Return true if character have indication of pvp, else return false.
    • pzone [boolean]: Return true if character have indication of protection zone, else return false.


    1.1.4 Equipment Information


    • helmet [int]: Return item ID on helmet slot.
    • amulet [int]: Return item ID on amulet slot.
    • back [int]: Return item ID on backpack slot.
    • armor [int]: Return item ID on armor slot.
    • shield [int]: Return item ID on shield slot.
    • weapon [int]: Return item ID on weapon slot.
    • weaponamount [int]: Return amount of items on weapon slot.
    • legs [int]: Return item ID on legs slot.
    • boots [int]: Return item ID on boots slot.
    • ring [int]: Return item ID on ring slot.
    • ammo [int]: Return item ID on ammo slot.
    • ammoamount [int]: Return amount of items on ammo slot.
    Last edited by Eldar; 04-15-2014 at 09:56 AM.

  3. #3
    Normal User blakw's Avatar
    Join Date
    Mar 2012
    Location
    www.blakw.com
    Posts
    817
    Mentioned
    221 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    345 Post(s)
    Reputation
    462
    Rep Power
    10
    1.2 Client Class
    The following variables return information about Tibia Client.

    1.2.1 Client Windows


    • battleopen [boolean]: Return true if battle window is open, else return false.
    • connected [boolean]: Return true if character is connected to game, else return false.
    • focused [boolean]: Return true if client window is focused, else return false.
    • minimized [boolean]: Return true if client window is minimized, else return false.
    • openmenuname [string]: Represent the name of open menu or 'Context' if it is a context menu with options like 'Look', 'Use', 'Open', etc.
    • tradeopen [boolean]: Return true if trade window is open, else return false.
    • exphour [int]: Represent average amount of experience points per hour since system was reseted (bot based calculation).
    • tibiaexphour [int]: Represent average amount of experience points per hour since system was reseted (tibia based calculation, last 15 minutes).
    • expgained [int]: Represent amount of earned experience points since system was reseted.
    • timehunt [int]: Represent the time, in milliseconds, since system was reseted.
    • timehuntstart [int]: Represent the time, in milliseconds, since hunt system was reseted.



    1.2.2 Client Information


    • clientwin [userdata]: Return information about client window size.
    • worldwin [userdata]: Return information about the size of world window inside client window.
      • .bottom [int]: Represent the bottom position of chosen window.
      • .left [int]: Represent the left side position of the chosen window.
      • .right [int]: Represent the right side position of the chosen window.
      • .top [int]: Represent the top position of the chosen window.
      • .width [int]: Represent the width of the chosen window.
      • .height [int]: Represent the height of the chosen window.
    Last edited by Eli; 12-26-2015 at 10:14 AM.

  4. #4
    Normal User blakw's Avatar
    Join Date
    Mar 2012
    Location
    www.blakw.com
    Posts
    817
    Mentioned
    221 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    345 Post(s)
    Reputation
    462
    Rep Power
    10
    1.3 System Class
    The following variables return values calculated by bot.

    1.3.1 Bot Systems


    • cavebot [boolean]: Return true if cavebot system is enabled, else return false.
    • looting [boolean]: Return true if looting system is enabled, else return false.
    • targeting [boolean]: Return true if targeting system is enabled, else return false.
    • rope [int]: Return rope id defined in CaveBot -> Settings.
    • shovel [int]: Return shovel id defined in CaveBot -> Settings.
    • pick [int]: Return pick id defined in CaveBot -> Settings.
    • machete [int]: Return machete id defined in CaveBot -> Settings.
    • standtime [int]: Represent the number, in milliseconds, character stand time.
    • lootbodies [boolean]: Return true if there are listed dead bodies to open.
    • lootbodiescount [int]: Represent the amount of listed dead bodies to open.
    • timems [int]: Represent the number, in milliseconds, since operative system has been open.



    1.3.2 Cavebot Waypoints


    • wpt [userdata]: Represent the data structure of current waypoint.
      • .id [int]: Represent the ID number of waypoint.
      • .label [int]: Represent the label name of waypoint.
      • .type [string]: Represent the waypoint type name (stand, node, etc).
      • .x [int]: Represent the number of waypoint X position.
      • .y [int]: Represent the number of waypoint Y position.
      • .z [int]: Represent the number of waypoint Z position.
    Last edited by Eli; 12-26-2015 at 10:14 AM.

  5. #5
    Normal User blakw's Avatar
    Join Date
    Mar 2012
    Location
    www.blakw.com
    Posts
    817
    Mentioned
    221 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    345 Post(s)
    Reputation
    462
    Rep Power
    10
    1.4 Creature Class
    The following variables return information about creatures.

    1.4.1 Creatures Information


    • target [userdata]: Represent data structure of targeted creature.
    • follow [userdata]: Represent data structure of followed creature.
      • .id [int]: Represent creature ID.
      • .name [string]: Represent creature name.
      • .hppc [int]: Represent creature % hit points.
      • .x [int]: Represent creature position X.
      • .y [int]: Represent creature position Y.
      • .z [int]: Represent creature position Z.
      • .direction [string]: Represent creature direction ('n', 's', 'e' or 'w').
      • .speed [int]: Represent creature speed.
      • .dist [int]: Represent distance between X and Y of creature to character.
      • .skull [int]: Represent creature skull type ID.
      • .party [int]: Represent creature party type ID.
      • .waricon [int]: Represent creature war banner type ID.
      • .visible [int]: Represent 1 if creature is visible or 0 if not.
      • .walking [int]: Represent 1 if creature is walking or 0 if not.
      • .ignored [boolean]: Return true if creature is being ignored by system (if function ignorecreature() was used on that creature), else return false.
      • .hittime [int]: Represent the time in milliseconds since creature did his last hit.
      • .creaturetype [int]: Represent creature type ID.
      • .isattackme [boolean]: Return true if creature is attacking, else return false.
      • .isplayerattacker [boolean]: Return true if creature is attacking someone, else return false.
      • .ismonster [boolean]: Return true if creature is a monster, else return false.
      • .isplayer [boolean]: Return true if creature is a player, else return false.
      • .isshootable [boolean]: Return true if creature is shootable, else return false.
      • .isreachable [boolean]: Return true if creature is reachable, else return false.



    1.4.2 Skull Type IDs


    • 0: Creature does not have skull.
    • 1: Creature have yellow skull.
    • 2: Creature have green skull.
    • 3: Creature have white skull.
    • 4: Creature have a red skull.
    • 5: Creature have black skull.
    • 6: Creature have orange skull.



    1.4.3 War Banner Type IDs


    • 0: Creature does not have war banner.
    • 1: Creature have green war banner (friend).
    • 2: Creature have red war banner (enemy).
    • 3: Creature have blue war banner (neutral).



    1.4.4 Party Type IDs


    • 0: Creature does not have party.
    • 1: Creature is party leader inviting you.
    • 2: Creature is invited member on party.
    • 3: Creature is party member.
    • 4: Creature is party leader.
    • 5: Creature is party member with active sharing experience.
    • 6: Creature is party leader with active sharing experience.
    • 7: Creature is party member with on hold sharing experience.
    • 8: Creature is party leader with on hold sharing experience.
    • 9: Creature is party member with inactive sharing experience because there are players out of range or lower level.
    • 10: Creature is party leader with inactive sharing experience because there are players out of range or lower level.



    1.4.5 Creature Type IDs


    • 0: Creature is a Player.
    • 1: Creature is a Monster.
    • 2: Creature is a NPC.
    • 3: Creature is Your Summon.
    • 4: Creature is Summon from others.



    1.4.5 Vocation Type IDs


    • 0: No Vocation.
    • 1: Knight / Elite Knight.
    • 2: Paladin / Royal Paladin.
    • 3: Sorcerer / Master Sorcerer.
    • 4: Druid / Elder Druid.
    Last edited by Eli; 12-26-2015 at 10:14 AM.

  6. #6
    Normal User blakw's Avatar
    Join Date
    Mar 2012
    Location
    www.blakw.com
    Posts
    817
    Mentioned
    221 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    345 Post(s)
    Reputation
    462
    Rep Power
    10
    2 Functions

    2.1 Self Class

    This functions will have some value relational with your character, or do your character realize an action.

    2.1.1 Character Information


    • cancast(string castspell) [boolean]: Return true if character can use defined spell when function is called, else return false.
    • cooldown(string spell) [int]: Represent in milliseconds the required time to spell cool down (re-use again).
    • exptolevel(optional int level) [int]: If no level defined, represent the amount of experience points left to next level. Else, represent experience points left to defined.
    • findcreature(string name) [int]: Represent the number of the distance of the first creature found with the defined name, if not found represents the value -1.
    • istrapped() [boolean]: Returns true if your character is stuck with items that are not walkable.
    • maround(optional int range, optional bool allfloors, optional string names) [int]: Represents the number of monsters found around with the parameters defined, if the optional values ​​are not defined, represents the number of all monsters found in the area of 7 sqm, including just your floor.
    • paround(optional int range, optional bool allfloors, optional string names) [int]: Represents the number of players found around with the parameters defined, if the optional values ​​are not defined, represents the number of all players found in the area of 7 sqm, including just your floor.
    • maroundshootable(int range, string names) [int]: Returns the number of shootable creatures in the defined range.
    • maroundreachable(int range, string names) [int]: Returns the number of reachable creatures in the defined range.
    • getservername() [string]: Return the character online server name.



    2.1.2 Character Actions


    • attack(string creature) [void]: Attacks the first creature found on the screen with the defined name.
    • buyitems(string item, int count) [void]: Purchase the amount of items defined using the trade window.
    • buyitemsupto(string item, int amount, optional int currentamount) [void]: Purchase an amount of items to complete the amount already acquired.
    • cast(string spellwords) [void]: Uses defined spell, if a hotkey contain the same parameter then it is used, otherwise the spell is written.
    • depositall() [void]: Deposit all your money using the functions 'say' and 'npcsay'.
    • depotdeposit(string backpack, items) [void]: Deposit each listed item inside defined backpack.
    • dropitems(int array id) [void]: Drop on the floor all items found and visible with the id defined.
    • eatfood() [void]: Eat the first edible item found in backpacks.
    • fish(int dist, optional bool wait) [void]: Use fishing rod on possible fish-able bodies within the set distance, optionally you can set whether or not to wait for the bodies to rot 1 state.
    • followcreature(string creature name) [void]: Follows the first creature found on the screen with the defined name.
    • levitate(string direction, string updown) [void]: Rotates your character in the set direction and use levitate.
    • move(string direction) [void]: Move 1 sqm in any direction. Parameters for directions can be: "n", "s", "e", "w", "nw", "ne", "sw" or "se".
    • moveitems(string item, string from, optional string onto, optional in count) [void]: Moves an item or number of items, from a place to another.
    • moveitemsonto(string item, string from, string to, int amount, int index) [void]: Move items from one container to another.
    • npcsay(string text) [void]: Speaks the text in the channel of the NPC's.
    • openhole(int x, int y, int z) [void]: Opens a hole in the positions defined xyz.
    • openitem(string item, optional string locationfrom, optional bool new, optional int index) [void]: Opens an item, you can optionally set the location to open, and whether or not a new container.
    • opensand(int x, int y, int z) [void]: Opens a hole in the sand xyz defined positions.
    • opentrade() [void]: Opens the trade using the functions 'say' and 'npcsay'.
    • pickupitems(string dir, array items) [void]: Pickup each item in the list found in the direction set to the first opened container.
    • reachcreature(string name) [void]: Approaches the first creature found on the screen with the defined name.
    • reachgrounditem(string/int item) [void]: Move your character to the first defined item found.
    • reachlocation(int x, int y, int z) [boolean]: Approaches and return true if you reached the XYZ position defined, else return false.
    • resizewindow(string/int item, int size) [void]: Resize defined window to defined size.
    • resizewindows() [void]: Resize to minimum size all open windows.
    • resizebattle(int size) [void]: Resize battle window to defined size.
    • say(string text, optional string channel) [void]: Speaks the text set, if the channel is not defined, speaks on the current channel.
    • sellflasks() [void]: Sells all visible empty flasks.
    • sellitems(string itemname, int count) [void]: Sells the amount of items defined using the trade window.
    • sellitemsupto(string item, int amount, optional int currentamount) [void]: Sell ​​an amount of items to complete the amount already sold.
    • skin(int dist, optional bool wait) [void]: Use found obsidian knife in dead bodies within the set distance, you can optionally set to wait or not for the bodies to rot 1 state.
    • stake(int dist, optional bool wait) [void]: Use found blessed wooden stake in dead bodies within the set distance, you can optionally set to wait or not for the bodies to rot 1 state.
    • stopattack() [void]: Simulates the ESC button, canceling all current actions.
    • turn(string direction) [void]: Rotates your character in the set direction. The directions can be: "n", "e", "s" ou "w".
    • useitem(string/int item, string location) [void]: Use an item inside the defined container.
    • useitemon(string item, int x, int y, int z) [void]: Use an item in your backpack on the floor with XYZ defined position.
    • useitemonitem(string item, string itemon, string itemon location) [void]: Use an item on another item in the defined backpack.
    • useitemontarget(string item, string creature) [void]: Use an item in your backpack in the creature with the defined name.
    • uselever(int x, int y, int z, optional int lever id) [void]: Use a lever in defined xyz positions.
    • openpick(int x, int y, int z) [void]: Open pick in defined xyz positions.
    • minimizewindows(string window name) [void]: Minimize windows. Parameters can be: "equip".
    • higherwindows(string window name) [void]: Maximize windows. Parameters can be: "equip".
    Last edited by Eli; 12-26-2015 at 10:14 AM.

  7. #7
    Normal User blakw's Avatar
    Join Date
    Mar 2012
    Location
    www.blakw.com
    Posts
    817
    Mentioned
    221 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    345 Post(s)
    Reputation
    462
    Rep Power
    10
    2.2 System Class
    No description.

    2.2.1 Bot Systems


    • flashclient() [void]: Cause the tibia client window to flash for about 5 seconds.
    • focusclient() [void]: Focus tibia client window.
    • restoreclient() [void]: Restore tibia client window.
    • minimizeclient() [void]: Minimize tibia client window.
    • getsettings(string settingpath) [string]: Get the value of any configuration the bot have as a string, through a defined path.
    • gotolabel(string/int label) [void]: Make the next waypoint to be defined as parameter, id or name.
    • islocation(optional int range) [boolean]: Return true if the action is being performed within the waypoint that was selected in the selected perimeter, else return false.
    • pausewalking(int time) [void]: Pause cavebot during time set in milliseconds.
    • print(string arguments) [void]: Show text in the defined arguments in a way that can be read (can be read on Debug).
    • setalarms(string value) [void]: Turn on or off the alarms. Values ​​can be 'yes', 'no', 'on' or 'off'.
    • setcavebot(string value) [void]: Turn on or off the cavebot. Values ​​can be 'yes', 'no', 'on' or 'off'.
    • setlooting(string value) [void]: Turn on or off the looting. Values ​​can be 'yes', 'no', 'on' or 'off'.
    • setsettings(string path, string value) [void]: Set the value of any configuration the bot have as a string, through a defined path.
    • settargeting(string value) [void]: Turn on or off the targeting. Values ​​can be 'yes', 'no', 'on' or 'off'.
    • showbot() [void]: Show the main menu of the bot.
    • showsettings() [void]: Display the settings screen of the bot.
    • updateworld() [void]: Synchronizes all actions of the bot with LUA system
    • wait(int first time, optional int second time) [void]: Pauses execution of any script for the set time, if the second time is set, wait a random time between the first and second time.
    • getscriptname() [string]: Return the file script name.
    • loadsettings(string name) [void]: Load script on iBot.
    • findclientbyname(string charname) [void]: Find tibia client by char name.



    2.2.2 Operative System


    • date() [string]: Represent the current date.
    • days() [int]: Represent the number of the current day.
    • playsound(string filename) [void]: Play the sound (eg: "alert.wav") found in the sounds folder of the bot.
    • screenshot(optional string filename) [void]: Take a screenshot of the tibia client screen. If the name is not specified, it defaults to the current date and time.
    • time() [string]: Represent the current time.
    • tosec(string time) [int]: Represent the number of converted string in seconds.



    2.3 Client Class
    No description.

    2.3.1 Client Information


    • ischannel(string name) [boolean]: Return true if the channel is open, else return false.
    • tradecount(string buy/sell, string item) [int]: Return amount of items possible to buy/sell in trade window.
    • windowcount(optional string location name) [int]: Represent the number of windows that are open. Optionally you can set a specified window.
    • cursorinfo() [pointer]: Represent the information of the mouse position.
      • .id [int]: Represent the item ID.
      • .x [int]: Represent cursor X position.
      • .y [int]: Represent cursor Y position.
      • .z [int]: Represent cursor Z position.



    2.3.2 Client Actions


    • closetibia() [void]: Close tibia client without character logging out.
    • closewindow(string/int item) [void]: Close the window with the name or number of defined order.
    • closewindows() [void]: Close all open windows as backpacks and others.
    • connect(string account, string password, string name) [void]: Connect your character with the username and password defined.
    • reconnect() [void]: Reconnect your character with previous username and password.
    • logout() [void]: Logout character if it is not battle signed.
    • setattackmode(string attack option) [void]: Set the mode of attack of your character. Parameters may be "offensive", "balanced", "defensive", "stand" or "chase".
    • usehotkey(string key) [void]: Use/press keyboard board buttons. Parameters can be "F1 to F12", "SHIFT+F*" and "CTRL+F*".
    • clienttexthotkey(string spell or text) [string]: Find hotkey with defined text or spell.
    • clientitemhotkey(string/int item, optional string type) [string]: Find hotkey with defined item. Type can be "self", "crosshair", "target".
    • setpvpmode(string attack option) [void]: Set the pvp mode of your character. Parameters may be:
      • 0 - Dove, "dove"
      • 1 - White Hand , "White", "White hand"
      • 2 - Yellow Hand, "yellow", "yellow hand"
      • 3 - Red Fist, "red", "red fist"



    2.4 HUD Class
    No description.

    2.4.1 HUD Creation


    • addhudloot(string/int item, int value) [void]: Add text to Loot Counter HUD with defined item and its value.
    • addhudsupplie(string/int item, int value) [void]: Add text to Loot Counter HUD with defined supplies item and its value.
    • addtext(string text, int x, int y) [void]: Add a text element with defined font style, to be shown on defined positions.
    • rgbcolor(int red, int green, int blue) [string]: The resulting color is in the RGB combinations.
    • setfontcolor(string color) [void]: Set the color to be on text.
    • setfontstyle(string name, int size, string style) [void]: Set the name, size and font style.
    • setposition(int width, int height) [void]: Set the width and height of the area for HUD.
    • drawspecialareas() [void]: Add HUD squares on tibia client screen for each special area position with name, color (to distinguish ConsideredBy) and size.
    • drawwpts() [void]: Add HUD squares on tibia client screen for each waypoint position with name, color (to distinguish type).
    • drawwallstimer() [void]: Add a timer HUD on a magic wall.
    • addrect(int x, int y, int w, int h) [void]: Add rectangle to draw in HUD.
    • setfillcolor(object color) [void]: Set background color for rectangles, default: transparente
    • setpen(object color, int width) [void]: Set the Pen to draw rectangles, default: black.
    • resethud() [void]: Reset all HUD Information.
    • resethudloot() [void]: Reset just HUD Loot Information.
    • addtextstroke(string text, int x, int y) [void]: Working same as addtextshadow and it's built in iBot.
    • resethudsupplie() [void]: Reset just HUD supplies Information.
    • sethudloot(string item, int value) [void]: Function to set HUD loot in Loot Coutner.
    • sethudsupplie(string item, int value) [void]: Function to set HUD Supplie in Loot Coutner.
    Last edited by Eli; 12-26-2015 at 10:15 AM.

  8. #8
    Normal User blakw's Avatar
    Join Date
    Mar 2012
    Location
    www.blakw.com
    Posts
    817
    Mentioned
    221 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    345 Post(s)
    Reputation
    462
    Rep Power
    10
    2.5 Item Class
    No description.

    2.5.1 Item Information


    • getitems(string items) [userdata]: Return data structure for listed items.
    • itemcost(string/int item) [int]: Represent the cost (buying) of defined item.
    • getcontainervalue(string/int container) [int]: This function calculate the total ammount value of items inside container with npcsell value [items.xml] and custom value
    • setcustomvalue(string item, int value) [void]: This function set a custom value to item.
    • itemcount(string/int item, optional string location name) [int]: Represent the amount of defined items found on opened backpacks.
    • itemid(string itemname) [int]: Represent the ID of defined item.
    • itemname(int itemid) [string]: Represent the name of defined item ID.
    • itemvalue(string/int item) [int]: Represent the value (selling) of defined item.
    • servercountitem(string item) [int]: Represent the number of defined items, based on the last message from the server log "Using one of X items", items need not be visible.
    • getlootitems() [userdata]: Return a list of all items on Looting.
    • itemproperty(string/int item) [pointer]: Return data structure of defined item.
      • .id [int]:
      • .name [string]:
      • .count [int]:
      • .weight [int]:
      • .npcsell [int]:
      • .npcbuy [int]:
      • .custom [int]:
      • .lootmessage [int]:
      • .usagemessage [int]:
      • .Brightness [int]:
      • .ClothSlot [string]:
      • .DisplacementX [int]:
      • .DisplacementY [int]:
      • .Elevation [int]:
      • .isAnimateAlways [boolean]:
      • .isAutomap [boolean]:
      • .isAutomapColor [int]:
      • .isAvoid [boolean]:
      • .isBank [boolean]:
      • .isBottom [boolean]:
      • .isClip [boolean]:
      • .isCloth [boolean]:
      • .isContainer [boolean]:
      • .isCumulative [boolean]:
      • .isDisplaced [boolean]:
      • .isDontHide [boolean]:
      • .isForceUse [boolean]:
      • .isFullBank [boolean]:
      • .isHangable [boolean]:
      • .isHeight [boolean]:
      • .isHookEast [boolean]:
      • .isHookSouth [boolean]:
      • .isIgnoreLook [boolean]:
      • .isLensHelp [boolean]:
      • .isLight [boolean]:
      • .isLiquidContainer [boolean]:
      • .isLiquidPool [boolean]:
      • .isLyingObject [boolean]:
      • .isMarket [boolean]:
      • .isMultiUse [boolean]:
      • .isRotateable [boolean]:
      • .isTakeable [boolean]:
      • .isTop [boolean]:
      • .isTranslucent [boolean]:
      • .isUnmoveable [boolean]:
      • .isUnpassable [boolean]:
      • .isUnsight [boolean]:
      • .isWritable [boolean]:
      • .isWritableOnce [boolean]:
      • .LensHelp [int]:
      • .LightColor [string]:
      • .MarketName [string]:
      • .MarketRestrictLevel [int]:
      • .MarketRestrictProfession [string]:
      • .MarketShowAs [string]:
      • .MarketTradeAs [string]:
      • .MaxTextLenght [int]:
      • .Waypoints [int]:



    2.6 Tile Class
    No description.

    2.6.1 Tile Information


    • iscreatureontile(int x, int y, int z) [boolean]: Return true if there is a creature on top of defined tile position, else return false.
    • isitemontile(string/int item, int x, int y, int z) [boolean]: Return true if defined item is on top of defined tile position, else return false.
    • tilereachable(int x, int y, int z) [boolean]:] Return true tile is reachable by character, else return false.
    • tileshootable(int x, int y, int z) [boolean]: Return true if tile is shootable by character, else return false.
    • tileiswalkable(int x, int y, int z) [boolean]: Return true if character can walk over tile, else return false.
    • toptileitem(int x, int y, int z) [int]: Represent top tile item ID.
    • topitem(int x, int y, int z) [userdata]: Return data structure of top tile item.
      • .count [int]: Represent the amount of items.
      • .id [int]: Represent the item ID.
    • gettile(int position x, int position y, int position z) [userdata]: Return data structure of tile.
      • .count [int]: Represent the amount of items on tile.
      • .items [userdata]: Return the data structure of a item on tile, item must be defined.
        • .count [int]: Represent the item amount.
        • .id [int]: Represent the item ID.



    2.7 Container Class
    No description.

    2.7.1 Container Information


    • getcontainer(string/int container) [pointer]: Return data structure of defined container (index or name).
      • .id [int]: Represent container ID.
      • .index [int]: Represent container index number.
      • .maxslots [int]: Represent the maximum number of slots in the container.
      • .name [string]: Represent the name of the container.
      • .open [string]: Return true if the container is opened, else return false.
      • .usedslots [int]: Represent the number of used slots in the container.
      • .page [int]: Represent the current page of browse field.
      • .pagemax [int]: Represent the last page of browse field.
      • .items [userdata]: Return data structure of items inside container, item must be indexed to access data.
        • .count [int]: Represent the item amount.
        • .id [int]: Represent the item ID.



    2.7.2 Browse Field


    • openbrowsefield(int x, int y, int z) [void]: Open a browse field.
    • browsepreview(int/string container) [void]: Move to preview container page.
    • browsenext(int/string container) [void]: Move to next container page.
    • browsepage(int/string container, int page) [void]: Select the container page.
    • browsegetpage(int/string container) [int]: Set the current container page.
    Last edited by Eldar; 05-16-2014 at 05:33 PM. Reason: tilereachable,tileshootable,tileiswalkable was wrong

  9. #9
    Normal User blakw's Avatar
    Join Date
    Mar 2012
    Location
    www.blakw.com
    Posts
    817
    Mentioned
    221 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    345 Post(s)
    Reputation
    462
    Rep Power
    10
    2.8 Message Class
    No description.

    2.8.1 Message Information


    • getmessages(string channel name) [userdata]: Return data structure of all messages on defined channel, message must be indexed to access data.
    • getnewmessages(string channel name) [userdata]: Return data structure of new messages on defined channel, message must be indexed to access data.
      • .count [int]: Represent the maximum number of messages. This parameter does not need to be indexed.
      • .text [string]: Represent the context of the message.
      • .sender [string]: Represent the name of the message sender.
      • .type [int]: Represent the ID of the message type.



    2.8.2 Message ID Types


    • 0: Status message (Local Chat).
    • 1: Player/NPC message on Local Chat.
    • 2: Whispered message.
    • 3: Yelled message.
    • 5: NPC message on NPC Channel.
    • 7: Player private message.
    • ?: Game/Help/Real/Tutor/Trade channel message.
    • 15: Red text message.
    • 16: White status message on tibia client screen.
    • 17: Channel welcome message.
    • 18: Server Log status white message.
    • 20: Green text message (eg: loot message).
    • 21: Self sent private message.



    2.9 Creature Class
    No description.

    2.9.1 Creature Information


    • ignorecreature(int id, bool ignore) [void]: Set the bot to ignore the defined creature ID.
    • getcreature(string/int name/id) [userdata]: Return data structure of a found creature with defined name/id. Creature indexing not required.
    • getcreatures(string filter) [userdata]: Return data structure of any found creature with selected filter. Creature indexing required.


    As a filter you can use the following combinations:
    • p: The creature has to be player.
    • m: The creature has to be monster.
    • f: The creature must be on the same floor as you.
    • s: The creature must be on the same floor as you and visible on screen.


    You can use the pointers in the same way of target and follow variables as additional parameter .count:
    • .count [int]: Represent the total number of creatures found. This parameter does not need to be indexed.
    • .id [int]: Represent the ID of the creature.
    • .name [string]: Represent the name of the creature.
    • .hppc [int]: Represent the % of hit points of the creature.
    • .x [int]: Represent the creature X position.
    • .y [int]: Represent the creature Y position.
    • .z [int]: Represent the creature Z position.
    • .direction [string]: Represents the direction of the creature as "n", "s", "e" or "w".
    • .speed [int]: Represents the number of the speed of the creature.
    • .dist [int]: Represent the biggest distance between X and Y of the creature and character.
    • .skull [int]: Represent the skull type ID of the creature.
    • .party [int]: Represent the party type ID of the creature.
    • .waricon [int]: Represent the war banner ID of the creature.
    • .visible [int]: Represent 1 if the creature is visible or 0 if not.
    • .walking [int]: Represent 1 if the creature is walking or 0 if not.
    • .ignored [boolean]: Return true if the creature is being ignored by system (if ignorecreature() was used), else return false.
    • .hittime [int]: Represent the time in milliseconds when the creature gave his last hit.
    • .creaturetype [int]: Represent the creature type ID.
    • .isattackme [boolean]: Return true if the creature is attacking you, else return false.
    • .isplayerattacker [boolean]: Return true if the creature is attacking someone, else return false.
    • .ismonster [boolean]: Return true if the creature is a monster, else return false.
    • .isplayer [boolean]: Return true if the creature is a player, else return false.
    • .isshootable [boolean]: Return true if creature is shootable from character, else return false.
    • .isreachable [boolean]: Return true if creature is reachable by character, else return false.



    2.10 Market Class
    Interaction with market window.

    2.10.1 Market Functions


    • createbuyoffer(string/int item, int amount, int value) [void]: Create buy offer with defined item, item price and item amount (use useitem(12903, "locker") to open market window).
    • createselloffer(string/int item, int amount, int value) [void]: Create sell offer with defined item, item price and item amount (use useitem(12903, "locker") to open market window).
    • sellitemmarket(string/int item, int amount, int value) [void]: Sell found defined item, with defined price and amount for the first buy offer on market (use useitem(12903, "locker") to open market window).
    • buyitemmarket(string/int item, int amount, int value) [void]: Buy found defined item, with defined price and amount for the first sell offer on market (use useitem(12903, "locker") to open market window).
    • setmarketanonymous(bool value) [void]: You can sell items as anonymous.
    Last edited by blakw; 03-23-2014 at 12:33 PM.

  10. #10
    Normal User blakw's Avatar
    Join Date
    Mar 2012
    Location
    www.blakw.com
    Posts
    817
    Mentioned
    221 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    345 Post(s)
    Reputation
    462
    Rep Power
    10
    3 Miscellaneous Class

    3.1 Variables

    No description.

    • balance [int]: Represent last balance number reported from a NPC.
    • dead [boolean]: Returns if your character is dead or not.



    3.2 Functions
    No description.


    • abs(int arguments) [int]: Same as math.abs, represent the absolute value of the equation.
    • antifurnituretrap(optional string/int weapon) [void]: Break all items that block the path of the character within the distance of 7, you can optionally set a weapon to use on objects, if not defined it will use machete.
    • gold() [int]: Represent the amount of gold coins visible on screen.
    • keyevent(hex key) [void]: Press the set button. As parameter you must use a hexadecimal value.
    • positive(int arguments) [int]: Represent the positive value of the equation, if negative is 0.
    • random(int first number, int second numer) [int]: Represent a random value between first defined number and second defined number.
    • shootarearune(int/string rune, int creatures amount, string creature's list) [void][boolean]: Shoot a area rune in sqm that take the set number of creatures, considering only the names on the list. Also return true if defined amount of creatures can be hit, else return false.
    • underattack(string type) [boolean]: Returns true if you are under attack by defined creature type. Parameters for the type can be: 'p' and 'm'.
    • unpack(table arguments) [void]: Same as table.unpack, unpacks the arguments within the table.
    • withdrawint(int value, int optional integer) [int]: Returns a rounded value.
    • setlurelocation(int x, int y, int z) [void]: Set the targeting lure location.
    • ground(int x, int y, int z) [string]: Return position on ground defined xyz.
    • lasttimeplayeronscreen[int]: Returns, in miliseconds, the amount of time passed since a player was last on screen.
    • wheretomove(int x, int y, int z) [pointer]: Return a pointer to the best XYZ position to move the item on top of the tile set.
      • .x [int]: Represent X postion.
      • .y [int]: Represent Y postion.
      • .z [int]: Represent Z postion.
    Last edited by pink_panther; 01-27-2014 at 02:12 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •