[Guide] Bot Functions.

02/09/2010 18:37 ShadowMagic#16
Thanks for the Second update, i was still using the original file, so i didn't notice anything wrong. These functions have helped a lot ^_^ got my ego auto buy and feed bot finished, as well as half of my metal, and working on a refiner ^_^
02/09/2010 22:10 Theri#17
Nice.

In the back of my head I have mental notes to add some way point related functions as well as inventory related functions and stuff but who knows if I'll get around to it. (I dont really bot much, these just give me something to do) :p
02/10/2010 03:29 Halfslashed#18
Sorry to say Theri, I'm confused with this. However, i'm not going to ask a whole shitload of questions, i'll read up later. I'm more of a coder than a scripter.
02/10/2010 03:45 Theri#19
Confused over what?? Maybe I screwed something up :p
08/02/2010 08:36 sounggi#20
sorry
I don't see where the uploaded file is at
can someone direct me?
thank you
08/04/2010 07:00 ApocalypsePoly#21
Quote:
Originally Posted by sounggi View Post
sorry
I don't see where the uploaded file is at
can someone direct me?
thank you
Well then, you probably dont know anything about scripting, there is no file included because you CREATE your own file with the script provided in the first post.

You make me :(
08/18/2010 01:15 t3mp3st99#22
Quote:
Originally Posted by ApocalypsePoly View Post
Well then, you probably dont know anything about scripting, there is no file included because you CREATE your own file with the script provided in the first post.

You make me :(

Personally I think the question was a legitimate one since there is mention of an uploaded file in the first post itself:
Quote:
File contains the folder structure for the code and some images. You will need your own images for everything else.
Regardless though, amazing work. To be honest, the fact that the user will need to put in a little work to in fact use it would probably be a good thing =]
08/18/2010 04:56 Theri#23
I had updated one part of the post removing reference to a file, have updated the above quoted area. There is no file, all the code is in the code blocks. The ini file is not covered but the formatting would be evident from reading the code, as far as I'm concerned.
08/19/2010 16:47 allkary#24
Theri, beside it appears as being my first post, I'm a reader of this forum and I appreciate this and previous scripts you've made. I also appreciate all those functions you've put together in the core file, still I'm maybe too noob or maybe too weak in programming to understand what to put in the .ini file. My guess is that I should use a file to call the functions I need, tho I don't get why an .ini file instead of a au3 file.
Mind to put a sample of the .ini file?
08/19/2010 21:12 Theri#25
Fine.

Code:
[Mob List]
capybara=0
millipede=0
nubes=0
whitecave=0
whitespider=0
yellowcave=0
youngdingo=0
youngnubes=0

[Item List]
capsule=0
feather=0
fomor=0
fragment=0
goddess=0
herb=0
jasper=0
key=1
leather=0
lrod=0
ore=0
potatoplant=0
potato=0
potion=0
ruby=0
sapphire=0
silver=0
09/22/2010 13:04 mike=#26
[Mob List]
capybara=0
millipede=0
nubes=0
whitecave=0
whitespider=0
yellowcave=0
youngdingo=0
youngnubes=0

[Item List]
capsule=0
feather=0
fomor=0
fragment=0
goddess=0
herb=0
jasper=0
key=1
leather=0
lrod=0
ore=0
potatoplant=0
potato=0
potion=0
ruby=0
sapphire=0
silver=0
10/26/2010 12:16 shaggyze#27
i know there hasn't been a relevant post for a couple months so dunno if theri plans on adding more or updating but because of how useful the code has been felt like sharing a snippet for the full core.au3 i use you can get it in the latest fossil restoration.

Quote:
;================================================= ==========
Func _mobSearch()
local $mouseorigin = MouseGetPos()
$quantity = 0
_setSearchCoords("fullscreen")
Send("{ALTDOWN}")
_mover()
Local $imagefile
$result = 0
For $quantity = 1 To $MOBLISTING[0][0] Step 1
If $MOBLISTING[$quantity][1] = 1 Then
$file=_FileListToArray(@ScriptDir & "\Images\mob\", $MOBLISTING[$quantity][0] & "*.bmp", 1)
if not @error then
for $i =1 to $file[0]
$result = _ImageSearchArea(@ScriptDir & "\Images\mob\" & $file[$i],1,$searchbox[0],$searchbox[1],$searchbox[2],$searchbox[3],$x1,$y1,30)
sleep(100)
If $result = 1 Then
_target($x1,$y1)
Mousemove($mouseorigin[0],$mouseorigin[1],1)
Send("{ALTUP}")
Return 1
EndIf
next
endif
Else
$result = _ImageSearchArea(@ScriptDir & "\Images\mob\" & $MOBLISTING[$quantity][1],1,$searchbox[0],$searchbox[1],$searchbox[2],$searchbox[3],$x1,$y1,30)
sleep(100)
If $result = 1 Then
_target($x1,$y1)
Mousemove($mouseorigin[0],$mouseorigin[1],1)
Send("{ALTUP}")
Return 1
EndIf
EndIf
EndIf
Next
sleep(100)
Send("{ALTUP}")
Mousemove($mouseorigin[0],$mouseorigin[1],1)
Return 0
EndFunc
;================================================= ==========
Func _mover()
sleep(250)
Local $center[2]
$randomnumber = Random(50,150,1)
$center[0] = ($topleftcorner[0] + (($bottomrightcorner[0] - $topleftcorner[0])/2)) + $randomnumber- 100
$center[1] = ($topleftcorner[1] + (($bottomrightcorner[1] - $topleftcorner[1])/2)) + $randomnumber

MouseClickdrag("right",$center[0]-$randomnumber,$center[1],$center[0]+$randomnumber,$center[1],10)
sleep(500)
mouseup("right")
EndFunc
this can be applied to _findItems() as well and makes it scalable so you can do image searches of gold.bmp gold1.bmp gold2.bmp and so on without adding gold1=1, gold2=1 in config.ini and just keep the one gold=1
although i don't see a reason for gold to change so you wouldn't need more then one but other items do and other functions would need multiple images due to color interface or mods so this was a critical need imo and i have already applied it to a majority of the functions

other functions and global variables needed for this are $MOBLISTING,$searchbox,$x1,$y1,$topleftcorner,$bot tomrightcorner _setSearchCoords _FileListToArray _ImageSearchArea _target and can be found in fossil restoration 10.2