Issues: With a agBot script! + Fixes!

08/14/2008 22:33 tobias_1985#1
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!


First a script consists of 3 parts to each line!



Code:
"","",""
This is the base to each line.



Code:
"100","100","1"
This is a walk code.



Code:
"cmd","[delay]","5"
"cmd","[stop walking]",""
"store close","Blacksmith Soboi",""
These are codes that are done only when command above has completed and move on to next line/command when completed.



Code:
[LIST=1][*]"inject","7495","010000000202000000"[*]"inject","72CD","01041205000000"[*]"inject","7738","019966990096FF5707"[/LIST]
  1. Teleport
  2. Skill
  3. 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. Click Here To Register...] 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:

Jangan: 6432;1099;20
Donwhang: 3553;2072;20
Hotan: 114;15;20
Samarkand: -5157;2830;20
Constantinople: -10658;2603;20


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:
[COLOR="Red"]"inject","72CD","01041205000000" [U][B]- Lv58 Grass Walk[/B][/U][/COLOR]
[COLOR="Lime"]"inject","72CD","01041205000000"[/COLOR]
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!


Things like: Incorrect spelling.

Code:
[COLOR="Red"]"[U][B]stroe[/B][/U] close","Blacksmith Soboi",""[/COLOR]
[COLOR="Lime"]"store close","Blacksmith Soboi",""[/COLOR]
Before asking for help, help yourself by checking you script for anything written wrong or misplaced.


Injects: Not working.

Code:
[COLOR="Red"]"inject","72CD","[U][B]0104120500000[/B][/U]"[/COLOR]
[COLOR="Lime"]"inject","72CD","01041205000000"[/COLOR]

[COLOR="Red"]"inject","72CD","[U][B]01042105000000[/B][/U]"[/COLOR]
[COLOR="Lime"]"inject","72CD","01041205000000"[/COLOR]
Its easy to miss or accidentally delete a 0! Also check via the code link above for correct injects or this post to manually check your inject [Only registered and activated users can see links. Click Here To Register...]



Walking: Just ain't doing what i want it to do!


Code:
[COLOR="Red"]"-37","48",""
"-195","48",[U]""[/U]
"-225","48",[U]""[/U]
"-240","280",[U]""[/U][/COLOR]

[COLOR="Lime"]"-37","48","1"
"-195","48","1"
"-225","48","1"
"-240","280","1"[/COLOR]

[COLOR="Lime"]"-37","48","0"
"-195","48","0"
"-225","48","0"
"-240","280","0"[/COLOR]
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.


Code:
[COLOR="Red"][B]"inject","7738","0193694F06DA01B007"
"inject","72CD","01041205000000"
"inject","7738","010180DE030000E2FB"
"inject","7738","010180DE030000A0FA"
"inject","7738","0101804305000093FA"
"inject","7738","0101804F050000A1F9"[/B][/COLOR]

[COLOR="Lime"]"inject","7738","0193694F06DA01B007"
"cmd","[delay]","10"
"inject","72CD","01041205000000"
"cmd","[delay]","2"
"inject","7738","010180DE030000E2FB"
"cmd","[delay]","3"
"inject","7738","010180DE030000A0FA"
"cmd","[delay]","5"
"inject","7738","0101804305000093FA"
"cmd","[delay]","5"
"inject","7738","0101804F050000A1F9"[/COLOR]
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.


Code:
[COLOR="Red"]"store buy","MP recovery potion (x-large)","600"
[B][U]"store close","Potion Merchant Manina","" 

"51","71","0"[/U][/B]
"cmd","[stop walking]",""
"store open","0101000000","Blacksmith Soboi"
"store repair","Blacksmith Soboi",""
"store close","Blacksmith Soboi","" 
"inject","7738","01875C6100F300DE01"[/COLOR]

[COLOR="Lime"]"store buy","MP recovery potion (x-large)","600"
"store close","Potion Merchant Manina","" 
"51","71","0"
"cmd","[stop walking]",""
"store open","0101000000","Blacksmith Soboi"
"store repair","Blacksmith Soboi",""
"store close","Blacksmith Soboi","" 
"inject","7738","01875C6100F300DE01"[/COLOR]
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.


Code:
[COLOR="Red"]"store open","0101000000","Potion Merchant Manina"
"[U][B]//[/B][/U]store buy","HP recovery potion (medium)","300"
"[U][B]//[/B][/U]store buy","MP recovery potion (medium)","600"
"store close","",""[/COLOR]

[COLOR="Lime"]"store open","0101000000","Potion Merchant Manina"
"store buy","HP recovery potion (medium)","300"
"store buy","MP recovery potion (medium)","600"
"store close","",""[/COLOR]
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:
Code:
"ConditionScript","111;16;10","0"
"ConditionScript","X;Y;Radius","Leave always 0"
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. Click Here To Register...]

For any additional codes you can visit the [Only registered and activated users can see links. Click Here To Register...] 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.
08/17/2008 02:38 Secura#2
Wow... There is a lot of mistakes you can do with agbit 0.0

SoftMod FTW ;)
08/17/2008 13:25 tobias_1985#3
agBot has alot more to offer then most bots and soon it will have even more features that will blow all bots out of the competition!
08/17/2008 13:35 [Wicked]#4
1 problem.
my agbot dousnt pick up weapons .... and that sux big time
08/17/2008 13:43 tobias_1985#5
Here is a picture to fix that problem!

[Only registered and activated users can see links. Click Here To Register...]
08/17/2008 13:48 [Wicked]#6
it gives more than weapons ...
08/17/2008 22:17 kingdrooster#7
Thanks buddy :)
08/18/2008 08:46 add3#8
Quote:
Originally Posted by Cha0sBG® View 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!
08/18/2008 10:49 [Wicked]#9
yeah this dude made it clear to me :D
08/18/2008 13:09 deadrise#10
Thanks, There is alot you can do with agBot and the scripts can go wrong =]
08/18/2008 13:13 [Wicked]#11
yeah but it does the job and best of all it's free ^-^
08/20/2008 10:53 tobias_1985#12
More problems with fixes added!
08/21/2008 10:26 inv123#13
i have a problam, i was started a loop script(what is made by agdev)lvl68-70 demon-eye..., after bot teleport back, and klik automaticaly on walkcript, when he arrive to storage, "cant fount "i forget I store keepere-asain(or who)" so when klik on storage, got a problam, but if i klik ok, and i klik on walkscript again, at this time i dont have any problams, how does it can be, first time wrong, at second time is ok
08/21/2008 11:13 Ninja1337#14
i got a problem too with storage the bot dose not store items that he must do ex in configuration i made him putting all elixirs in storage but he dosent and for evrything too all things he put in storage is tablets i hope u can help me:)

Edit: Ok ty but i found the problem it was on script store items command was not included into script
08/22/2008 02:25 tobias_1985#15
If you have script problems and you wish for a fix upload them and private message me on this forum and i will reply asap with a fix!