[AutoIt] CrayonCode Bot Project (OpenSource & Free)

06/25/2017 07:54 Cbiscuit#871
Fixed all my autopathing issues by adding 2000ms sleep for mount function and npc interactions. Where is everyone fishing at? i fish in abundant inland stream.
06/25/2017 17:54 ♫Melodie♫#872
Kennt sich jemnd mit dem bot aus?
06/26/2017 00:16 yangyintin#873
can it be easy detected?
06/26/2017 23:16 javalover#874
@[Only registered and activated users can see links. Click Here To Register...] amazing bot, did you think of adding Market notification snipe aswell?

thanks
06/27/2017 01:30 Cbiscuit#875
PHP Code:
Func BackToMount($Boat = 0)
    
Local Static $HorseIni = StringSplit(StringStripWS(IniRead("config/resolution_settings.ini", "Restock", "Horse", "44, 124"), 8), ",", 2) ; x, y
    Local 
Static $BoatIni = StringSplit(StringStripWS(IniRead("config/resolution_settings.ini", "Restock", "Boat", "93, 123"), 8), ",", 2) ; x, y
    Local 
Static $SwapMounts = Int(IniRead("config/data.ini", "RestockSwapMounts", "Enabled", 0))
    
Local Const $Mount[2][2] = [[$HorseIni[0] + $ResOffset[0], $HorseIni[1] + $ResOffset[1]], [$BoatIni[0] + $ResOffset[0], $BoatIni[1] + $ResOffset[1]]]
    
Local $Sw = 0
    Sleep
(500)
    
WaitForMenu(False)
    
Sleep(500)
    If 
Not VisibleCursor() Then CoSe("{LCTRL}")
    
Sleep(5000)
    
SetGUIStatus("Boat: " & $Boat & " Swap: " & $SwapMounts)
    If 
$SwapMounts = 0 Then
        MouseClick
("right", $Mount[$Boat][0], $Mount[$Boat][1])
        
Sleep(5000)
        
MouseClick("right", $Mount[$Boat][0], $Mount[$Boat][1])
    Else
        
MouseClick("right", $Mount[Mod(($Boat + 1), 2)][0], $Mount[$Boat][1])
        
Sleep(5000)
        
MouseClick("right", $Mount[$Boat][0], $Mount[$Boat][1])
    EndIf
    
Sleep(1000)
    
CoSe("t")
    
CoSe("{ESC}")
    If 
VisibleCursor() Then CoSe("{LCTRL}")
    
MapMovement()
    Return 
True
EndFunc   
;==>BackToMount 
how do i increase the sleep time before it right clicks the horse, sometimes it won't set a marker it just runs. i thought i fixed it increasing the other sleep timers, every night the bot gets stuck running into a wall with no marker set.

Edit: I've tried everything to add a sleep timer before it right clicks horse icon. i've manage to make it click it twice but still no delay. If it clicks to fast it doesn't set the waypoint.
06/27/2017 05:23 Yeman11111#876
Quote:
Originally Posted by Cbiscuit View Post
PHP Code:
Func BackToMount($Boat = 0)
    
Local Static $HorseIni = StringSplit(StringStripWS(IniRead("config/resolution_settings.ini", "Restock", "Horse", "44, 124"), 8), ",", 2) ; x, y
    Local 
Static $BoatIni = StringSplit(StringStripWS(IniRead("config/resolution_settings.ini", "Restock", "Boat", "93, 123"), 8), ",", 2) ; x, y
    Local 
Static $SwapMounts = Int(IniRead("config/data.ini", "RestockSwapMounts", "Enabled", 0))
    
Local Const $Mount[2][2] = [[$HorseIni[0] + $ResOffset[0], $HorseIni[1] + $ResOffset[1]], [$BoatIni[0] + $ResOffset[0], $BoatIni[1] + $ResOffset[1]]]
    
Local $Sw = 0
    Sleep
(500)
    
WaitForMenu(False)
    
Sleep(500)
    If 
Not VisibleCursor() Then CoSe("{LCTRL}")
    
Sleep(5000)
    
SetGUIStatus("Boat: " & $Boat & " Swap: " & $SwapMounts)
    If 
$SwapMounts = 0 Then
        MouseClick
("right", $Mount[$Boat][0], $Mount[$Boat][1])
        
Sleep(5000)
        
MouseClick("right", $Mount[$Boat][0], $Mount[$Boat][1])
    Else
        
MouseClick("right", $Mount[Mod(($Boat + 1), 2)][0], $Mount[$Boat][1])
        
Sleep(5000)
        
MouseClick("right", $Mount[$Boat][0], $Mount[$Boat][1])
    EndIf
    
Sleep(1000)
    
CoSe("t")
    
CoSe("{ESC}")
    If 
VisibleCursor() Then CoSe("{LCTRL}")
    
MapMovement()
    Return 
True
EndFunc   
;==>BackToMount 
how do i increase the sleep time before it right clicks the horse, sometimes it won't set a marker it just runs. i thought i fixed it increasing the other sleep timers, every night the bot gets stuck running into a wall with no marker set.

Edit: I've tried everything to add a sleep timer before it right clicks horse icon. i've manage to make it click it twice but still no delay. If it clicks to fast it doesn't set the waypoint.
I had the same problem and after hours of trying to create a failsafe, I just gave up. I thought of trying to call the switch rod function first and if the bot is running into the wall, it would just click on the mount waypoint again that way it will redirect my movement because you can't equip the rod if you're running. Otherwise if it did make it to the fishing spot, it would go through with switching rods and actually start fishing. The only problem I ran into though was sometimes my character would make it to the fishing spot and then continue moving forward until it's too deep into the ocean to fish anymore.
06/27/2017 09:00 Cbiscuit#877
i think it would work perfect if there were 2 seconds added to every variable in the auto-restock function.
06/27/2017 16:59 nijohc#878
anyone else have problem with restock where auto path doesnt stop close enough to the target npc to talk to it? happens a lot to me
06/27/2017 17:31 netoezio#879
is this work with steam ver
06/27/2017 18:03 javalover#880
where do you guys auto fish for maximum revenue?
06/27/2017 18:07 platinumdrgn#881
works good except for when it tries to return to the mount. it is doing something wrong because it just starts running in a random direction instead of getting a mount path. i think it might be double right clicking, clearing the autopath. i tried adding a npc waypoint but those do the same thing.

Quote:
Originally Posted by nijohc View Post
anyone else have problem with restock where auto path doesnt stop close enough to the target npc to talk to it? happens a lot to me
that happens alot but it should autopath to the npc a 2nd time after it does a full screen rotation and it will get close enough the 2nd time.
06/27/2017 18:18 sumusikoo#882
Does the autopath work if you fish on the sea with a boat?
06/27/2017 19:48 falsiane#883
Is this project still ongoing? It's been a while since last update.
06/27/2017 20:00 nijohc#884
Quote:
Originally Posted by sumusikoo View Post
Does the autopath work if you fish on the sea with a boat?
no. basically your horse or boat serves as the marker for where your fishing spot is. it will just walk around npcs then finally to horse/boat spot to resume fishing

on another note...
i find that autoit is missing clicks a lot. ie it moves mouse to coordinates, but it clicks before cursor reaches the coordinates. This happens a lot with autohotkey too when using sendmode input. screws up the auto restock quite a bit..
06/28/2017 10:27 Cbiscuit#885
Quote:
Originally Posted by platinumdrgn View Post
works good except for when it tries to return to the mount. it is doing something wrong because it just starts running in a random direction instead of getting a mount path. i think it might be double right clicking, clearing the autopath. i tried adding a npc waypoint but those do the same thing.



that happens alot but it should autopath to the npc a 2nd time after it does a full screen rotation and it will get close enough the 2nd time.
We all seem to be having the same problem. i tried changing the back to mount to use a different method to click where i could control the speed better but nothing. I'm starting to think this is caused by a problem with the UI. I sometimes see 2 UI's running in task manager for this game. There is also a lock mouse in UI setting under GAME that might be worth messing with.

TLDR:: It's like the UI resets after the mouse has moved to location causing it to miss click. I've tested it so many times and it works fine until do the full repair/sell/broker then its 50/50.

Code:
Func BackToMount($Boat = 0)
	Local Static $HorseIni = StringSplit(StringStripWS(IniRead("config/resolution_settings.ini", "Restock", "Horse", "35, 124"), 8), ",", 2) ; x, y
	Local Static $BoatIni = StringSplit(StringStripWS(IniRead("config/resolution_settings.ini", "Restock", "Boat", "93, 123"), 8), ",", 2) ; x, y
	Local Static $SwapMounts = Int(IniRead("config/data.ini", "RestockSwapMounts", "Enabled", 0))
	Local Const $Mount[2][2] = [[$HorseIni[0] + $ResOffset[0], $HorseIni[1] + $ResOffset[1]], [$BoatIni[0] + $ResOffset[0], $BoatIni[1] + $ResOffset[1]]]
	Local $Sw = 0
	Sleep(1000)
	WaitForMenu(False)
	Sleep(1000)
	If Not VisibleCursor() Then CoSe("{LCTRL}")
	Sleep(2500)
	SetGUIStatus("Boat: " & $Boat & " Swap: " & $SwapMounts)
    $SwapMounts = 0
	MouseMove($Mount[$Boat][0], $Mount[$Boat][1])
	Sleep(2500)
	MouseDown("right")
    Sleep(2500)
    MouseUp("right")
    Sleep(2500)
	CoSe("t")
	CoSe("{ESC}")
	If VisibleCursor() Then CoSe("{LCTRL}")
	MapMovement()
	Return True
EndFunc   ;==>BackToMount