Legitbot Function Information
Legitbot Function Information
and what you can do with it. Please read this carefully and it will be updated over time. Updates v4.4.2 Updated to GMS v1.07.2 v4.4.1 Updated to GMS v1.07 v4.4 Updated to GMS v1.06.2 v4.3.1 Fixed move x command. v4.3 Updated to GMS v1.06. v4.2 Updated to GMS v1.05. Other versions are still unavailable until the SAT examinations are over. Other fixes including auto response and auto buff will be fixed after the SATs are over and I have time to inspect the code. v4.0.3 First public 4.0 testing round. The old 3.18 version will still work if you find serious bugs with this version. Not all functions from 3.18 are present. The most notable one is the auto chat. Due to multi-thread, a problem has been encountered and will be fixed next patch. Please note: if you saved a profile in the previous version, it will no longer be supported. Please delete any profiles you had in the folder including any .ini_ files. v4.0.2 Add back in many functions but certain functions do not work. Fixed update detector. v4.0.1b Added multi-threading but many functions do not work yet v4.0.1a Removed auto chat due to implementation issues. v4.0 Complete update providing for new features and interface change. Please see the 4.0 update section for more details. v3.18 Updated to GMS v1.04. v3.15 Updated to GMS v1.02. v3.12 Fixed a minor bug with Legitbot. v3.11 Updated to GMS v1.01. v3.10 Added pirate functions. Updated to GMS v1.00.3. v3.9 Added teleport functions. v3.8 Added a new sound function that you can use to alert yourself when something important has happened. v3.7 Fixed auto restart. It will now work flawlessly with plugin.dll which is included. v3.6 Added auto restart capabilities. Now all we need is for the BT side to be implemented. Add option so that when a script crashes, you can make it auto start script. v3.5 Updated to GMS v1.00.2. v3.4 Added Auto Buff commands since BTs buff commands do not work. Updated to GMS v1.00.1. v3.3 Updated to GMS v1.00. v3.2 Added chat functionality. Your character can now auto respond to other players. v3.1 Added loot functionality. Your character can now auto loot after killing mobs. v3.0 New functions and bug fixes.
Beginner Guide 1. Extract all files to your BT folder. 2. Expand BT on the left side. 3. Click the bird with the goggles to launch Legitbot.
Version 4.0 Updates Bot is completely multi-threaded which allows you to load multiple scripts independent of each other. Update detection is made smoother. Perfected auto restarter. Profile save will automatically save and restore all scripts you have open (save default profile). Fixed a few interface bugs.
Function List Move X [OPT IGNOREMOBS=0] [OPT IGNOREITEMS=0] This function will not complete until your character has moved to the X coordinate. No movement within a few seconds will trigger an error. This will be handled by error handlers discussed later. You can now optionally input a 1 at the end to signify that you want the bot to ignore mobs for the duration of this move command. You can add another 1 at the end to signify that you want to ignore items for the duration of this move command. ErrorHandler on/off This function allows you to turn on error handlers. 1 means error handler is on and 0 means error handler is off. The default for when the script executes is on. SetKillLimit Limit Label This function allows you set a limit on the Move commands to come. Once your character has killed the Limit number of mobs, the bot will jump to the label specified. ClearKillLimit This function clears the kill limit and allows you to hunt indefinitely. WaitPlatform PlatformID This function will wait until a character has placed themselves on a Platform that is LINKED with Platform ID. This means that it does NOT have to be just the single foothold. You can be on any foothold that is directly linked to the Platform ID and the script will continue. WaitMap MapID This function will wait until a character has entered the map specified by the MapID. Jump Direction This function will execute a jump in the direction specified by Direction. 0=Up 1=Left 2=Right. Rope Y This function will let the character climb a rope until they have reached the Y coordinate. For higher ropes, you must jump before using this function. No vertical movement within a few sections will trigger an error. Sleep TimeMs This function will allow the bot to sleep for the seconds in milliseconds. Goto LabelName This function will allow the bot to jump to another part of the code specified by :LabelName. To define a label, put a colon followed by the label name. End This function terminates script execution. Your script will automatically call this function when it reaches the end but if you have sub procedures, you must call this BEFORE your sub procedures or they will be executed as the script ends. Test PlatformID This function tests to see if a character is on a platform. If the character is not, an error will be triggered. PushKey KeyCode This function will push the KeyCode of the key you want to push. You can find the KeyCode by using the program provided. JumpDown This function will allow your character to jump down from a platform. Item on/off By using a 0 for off or 1 for on, it will allow your bot to spam the loot key. In the future, this will allow your character to automatically find loot and go to loot. DetectSnails on/off By using a 0 for off or 1 for on, it will let your character detect snails but some invisible mobs will be included as well. Use this ONLY if you are going to hunt snails. Otherwise, keep this option off. Var VariableName VariableValue This function initiates a variable with the name and value for reuse in other functions. UnVar VariableName This function destroys a variable that has been initiated. I dont see the point of this function unless you are exceeding the maximum number of variables. Set VariableName VariableValue This function sets the information on an existing variable.
Random VariableName RangeLow RangeHigh This function randomizes a number between RangeLow and RangeHigh and stores it in the variable specified by VariableName. Combine VariableName StringAdd This function combines another string with the existing string in VariableName and saves it in VariableName. Add/Sub/Mul/Div VariableName Number These set of functions add/subtract/multiply/divide a number in VariableName by the Number input and stores in VariableName. Compare Var1 Var2 This function compares two values and stores the results in flags. You can direct code flow based on results with the following functions. GotoEqual Label This function is used after a compare command. It will jump to the label if the previously executed compare function says both variables are equal. This function will work as long as there isnt another compare between this function and the compare function. GotoNotEqual/GotoAbove/GotoBelow Label These set of functions behave like GotoEqual except it functions for not equal, above or below. Above and below will only work if numbers are being compared. SendPacket StringPacket This function sends a packet with bytes separated by spaces. Use ** if you want to use random bytes at a location. Print/MaplePrint/DebugPrint String This function prints the string to either DbgView, Maples chat box or the Message line in LegitBots console. Mid VariableOut VariableIn Start Length This function gets a sub string inside a string starting at start with length. Pos VariableOut SubString StringIn This function outputs the position of the substring inside the stringin. If there are no strings found, the result is 0. IntToHex HexOut NumberIn Digits This function converts the NumberIn into Hex with Digits number of digits. HexToDec NumberOut HexIn This function converts variables from hex to numbers. To convert direct numbers you can use the $ operator. Replace VariableOut VariableIn Position ReplaceText This function begins to overwrite text at the position. The results are stored in VariableOut. GoCall Label Pushes return position onto the stack and jumps to the function. It functions exactly like a Goto function except you can return to the place you called it from by using the ExitGoCall function. ExitGoCall Exits the topmost GoCall function. You can nest GoCall functions. GetItemCount VarOut ItemID Detects the number of items in your inventory with the specific ItemID and outputs result to VarOut (Variable). Loop count This function loops back to the last LOOPRESET command for count times LoopReset This function resets the loop count and servers as a marker for the LOOP function. You can find an example in the beginner script posted in the script section. AddChat chatinfo This function allows you to register a message to say to legits when you enable CHAT command. You can use #NAME# inside the string to indicate the other players name. Example, ADDCHAT Hi there #NAME# will make your character say Hi there fish if the legits name is fish. Case does count in the #NAME#. Please have it all capitalized. Chat on/off This function allows you to turn on or off chat. 1 means chat is on and 0 means chat is off. When chat is on, after 1 second of the legit talking to you, you will randomly respond from a pool of answers collected from ADDCHAT. You must have at least 1 register in ADDCHAT for this to work.
AutoBuff keycode buffduration delayafterbuff This function registers a buff in the buff machine 2000. Legitbot will automatically push the key identified by keycode every buffduration ms. After buffing, it will sleep for delayafterbuff ms before going back to hunting. The delayafterbuff allows you to use macros in buffing. Example, for buffing every 180 seconds and sleeping for 4 seconds on the a key is as follows: AUTOBUFF 65 180000 4000 AutoBuffOff This function disables all auto buffing. BloodSugar on/off This function allows you to turn on or off the sound. 1 means that the music starts playing and 0 means to stop the music. Teleport X Y This function starts teleporting you to X Y and holds you there until TELEPORTOFF command is used. This is the same kind of teleport as Kami so do not turn it on and off repeatedly or it may a/b. TeleportOff This function turns off teleporting which was activated by using the teleport command. GetMob VarOutX VarOutY opt:[X Y] This function gets the nearest mob regardless of platform from you and stores its X and Y coordinates in VarOutX and VarOutY. In addition, you can optionally specify a X and Y coordinate to start the search (replaces character x and y)
Constant Variables Maple.X Current X Maple.Y Current Y Maple.MapID Current MapID Maple.PlatformID Current Platform ID Maple.Portal Current Portal Counter (Ignore) Maple.Channel Current Channel Maple.MobCount Current Mob Count Maple.ItemCount Current Items on Floor Maple.PeopleCount Current Players in Map Maple.HP/ Maple.MaxHP/ Maple.MP/ Maple.MaxMP/Maple.EXP Current Stats Maple.EqCount Current number of Equip Items Maple.EqMax Max slot number of Equip Items Maple.UseCount Current number of Use Items Maple.UseMax Max slot number of Use Items Maple.EtcCount Current number of Etc Items Maple.EtcMax Max slot number of Etc Items Maple.Level Current level Maple.Mesos Current amount of mesos in inventory Maple.Pet Current pet energy left Maple.Attack Number of attacks Maple.Energy Current amount of energy for pirates. 10000 = Fully Charged.
How to use Auto Restarter This versions auto restarter is much easier to use. Simply have all the scripts you want to auto run open and close all others. Then check the Auto Restarter checkbox and then click save default profile. By re-running BT, Legitbot will automatically restart and execute all scripts saved to the default profile.
Using Legitbot Auto Creator You can use Auto Creator to automatically append coordinates to the end of your script via hotkeys. This can save you time and creates scripts quickly. The hotkeys are as follows: Hotkey Function F1 Jump Left F2 Jump Up F3 Jump Right F4 Move To X F5 Climb Rope To Y F6 Starting Point After pushing the hotkeys (with auto creator checked), a new command or set of new commands will appear. Edit these commands to your liking.