Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

old wurm script

edited April 2015 in General
here is the old autogather script i used to use for wurm, using autoit.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

HotKeySet("{ESC}", "_Exit") ; Make a hotkey to exit the script
; Very important when u are using MouseMove, MouseClick etc. in a loop
HotKeySet("{END}", "_Fish") ; Look at the Send command in the help file for keys
HotKeySet("{HOME}", "_Mine") ; Look at the Send command in the help file for keys
HotKeySet("{PAUSE}", "_Pause")

Global $Fish = False ; Here we say $Mine = false, so the bot has stopped as default
Global $Mine = False ; Here we say $Mine = false, so the bot has stopped as default
Global $num = 0

;create the counter gui
Opt("GUIOnEventMode", 1) ; Change to OnEvent mode
$mainwindow = GUICreate("Miner", 200, 100, -1, -1, -1, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
$label1 = GUICtrlCreateLabel("Paused", 10, 5, 150, 15)
$label2 = GUICtrlCreateLabel("", 10, 20, 150, 15)
$Button_1 = GUICtrlCreateButton("mine", 5 , 30, 60)
$Button_2 = GUICtrlCreateButton("fish", 70, 30, 60)
GUICtrlSetOnEvent($Button_1, "_Mine")
GUICtrlSetOnEvent($Button_2, "_Fish")
GUISetState(@SW_SHOW)

While 1
Sleep(1000) ; Use a sleep in the main loop for not getting a high CPU
WEnd

Func _Pause()
$Fish = False
$Mine = False
$num = 0
GUICtrlSetData($label2, $num)
GUICtrlSetData($label1, "Paused")
EndFunc

Func _Mine()
$Mine = Not $Mine ; It is basicly something like: If $Mine = False Then $Mine = True
; Also visa versa
While $Mine
$num = $num + 1
GUICtrlSetData($label1, "Mining")
GUICtrlSetData($label2, $num)
send("i")
Sleep(25000); waiting for mining to finish
WEnd
EndFunc

Func _Fish()
$Fish = Not $Fish ; It is basicly something like: If $Mine = False Then $Mine = True
; Also visa versa
While $Fish
GUICtrlSetData($label1, "Fishing")
$mtime1 =Random(100, 200)
$mtime2 = Random(100, 200)
$time = Random( 60000 , 120000)
;MsgBox ( 64, "time", "next cast"& $time, 30)
MouseMove(300, 400, $mtime1);moving mouse to position
MouseClick("right"); opening little menu
MouseMove(320, 480, $mtime2); moving mouse to position in menu
Sleep(500)
MouseClick("left"); starting to mine, takes 31 seconds.
Sleep($time); waiting for mining to finish
WEnd
EndFunc

Func _Exit()
Exit
EndFunc

Comments

  • edited April 2015
    i did find the rewrite of the above script. It comes in 2 files.

    WurmGrinder.au3 and Functions.au3. It has a decent GUI, mouse location mapping so you can set and use positions. It was my first real dive into arrays. It is too big to post here.
Sign In or Register to comment.