This is a discussion on Issues: With a agBot script! + Fixes! within the SRO Exploits/Hacks/Bots/Guides forum part of the Silkroad Online category; If you want me to look at your script personally and get back to you asap send me a private ...
If you want me to look at your script personally and get back to you asap send me a private message with a link to your uploaded script or just send me the script in the message!
~Looking At Code~
First of all a lot of people dont understand how scripts work.
At the moment im only going to be talking about agBot scripts!
These are codes that are done only when command above has completed and move on to next line/command when completed.
Code:
"inject","7495","010000000202000000"
"inject","72CD","01041205000000"
"inject","7738","019966990096FF5707"
Teleport
Skill
Walk(aka mouse press on the ground)
These Codes are known as injects and are used to replicate commands we normally do ingame these do not have conditions but are just done in order of where they are in your script.
All Codes can be found [Only registered and activated users can see links. ] thanks goes to rev6.
Each command has a condition:
~Script Code In Detail~
Walk Code:"100","100","1"
Is really "X","Y","Condition". The condition is once in you reach 100,100 move to next line/command in the script so the 1 represents condition of range to the coords 100,100. Without this condition how will the script know when to move to the next line/command correctly.
Delay Code: "cmd","[delay]","5"
The condition for this command is the "5". "Code","Command","Condition = Sec". So here we see the condition of this command is once the 5 sec delay/pause has completed, to move on to the next line/command in your script.
Condition Codes: "ConditionScript","111;16;10","0"
This code is normally placed at the very start of your script so you can leave the agBot option 'loop on teleport' on and run around without it working unless you teleport to the town this command was set for. This is how it is setup "ConditionScript","X;Y;Radius","Leave always 0" where radius is a set radius from those coords X;Y like the hunting area radius, you only need to set this max to around 10-20. The most common setup would be the coords of where you teleport into town right after a death/return to town condition.
Below is each towns coords when you teleport there:
Simple Codes: "cmd","[stop walking]","" | "cmd","[start bot]","" | "cmd","[stop bot]","" | "cmd","[clear hunting]","" | "cmd","[start autopotion]",""
These are pretty much self explanatory.
"cmd","[stop walking]","" - Stops your bot walking when next command is not a walk code.
"cmd","[start bot]","" - Starts bot in agBot so you can kill things.
"cmd","[stop bot]","" - Stops the bot in agBot.
"cmd","[clear hunting]","" - Clears the hunting area in agBot
"cmd","[start autopotion]","" - Starts auto potion in agBot
Skips Code: "//","Town: Hotan","//"
This piece of code is ignored in the script "Ignore >","Text","< Ignore", it is there only for inputting stuff you do not wish to be used but to be seen only.
Inject Code: "inject" ,"745A","5D000000"
These are the hardest code in the script. They must be correct in everyway to be completed and if not could be detected by Joymax
I dont know how accurate this is but from what i can see from using injects the code looks like this "command","type of inject","inject code".
~Problems~
Script is script and is read exactly as its written.
Eg:Script wont work correctly!
Code:
"inject","72CD","01041205000000" - Lv58 Grass Walk
"inject","72CD","01041205000000"
As you can see the red and underlined part is not supposed to be there! Every bit of your code must be in the format "","","" nothing can be outside of this format on each line!
You need that condition and with walk commands 1 or 0 is most commonly used and most accurate, any higher and you could be running into walls/buildings in town.
Injects: My walk injects are correct but i dont walk right.
With walk injects you need another code as well the delay/pause! Think about it you dont instantly mouse click all over the place and injects are done instantly in order of where there placed in the script!
By placing the delay/pause between each walk inject code your allowing each one to fully complete before moving onto the next line/command.
As you can see the time between can be set to how long it takes to reach the point at which the inject was placed ingame (mouse press on the ground).
Errors: Some reason i get a strange error when i try hit start walkscript.
As you can see between both bold and underlined parts there is a space/gap in the code. Removing this will fix any script with this problem only but its good to always check for any other problems they may be in your script.
Lines Ignored: My script seems to not be buying potions or just missing commands I have added.
Here is the problem, before each 'buy' line there is "//store buy" the // means ignore this line and move to next line/command. When your script doesn't buy items or even add the hunting area and etc please make sure you have not accidentally added any of these // to your script where they do not belong.
Protect Error: It says some kind of error of not in protect xxx,xxx radius > 20.
Bot console error: "Increase the radius value if the script is suppose to start.
Bot spawn at Area (X,Y) distance X or Y > Value
Bot spawn outside protection area X,Y Radius: Value"
This error is from a special command. Where X and Y are coordinates in your script in the command where:
This code goes at the start of the script the very start it can be before the "//" info lines or after them.
You need to understand that this code is an 'if' or 'returns true' command. In saying that: If your standing in the radius(being 10) of coordinates X;Y then continue with the script.
This code is normally set for the coords of the exact place where you teleport in town.
Read right back at the top more about this type of code.
Editing: I edited my script while agBot was open and now it wont work in agBot.
Did you make sure to hit script in agbot and clear so it would use the new script that you modified:
Mod script.
Save the script.
Clear old script from agBot the program using script button and the clear button.
Close the script window in agBot and reopen to make sure all changes have been made.
Without these steps a modified script wont effect you unless you do that or close silkroad and etc and reopen!
I have created a list of the most basic injects needed/used that you can download in a text file: [Only registered and activated users can see links. ]
For any additional codes you can visit the [Only registered and activated users can see links. ] which includes skill injects and more.
I hope this helps a lot of people iron out there problems with agBot scripts and or helps future people make scripts!
I reserve the right to edit, to add or remove details.
Anyone who wishes to repost this on another forums may do so as long as link to this post is mentioned and thanks given to the right people.
Last edited by tobias_1985; 09-05-2008 at 00:21.
Reason: Updating
The Following 27 Users Say Thank You to tobias_1985 For This Useful Post:
1 problem.
my agbot dousnt pick up weapons .... and that sux big time
Have opened up in config inside agBot and then pressed item select. Then you should press weapom on the right and move them over to storage, then agbot will pickup weapons!