[AutoIt] 5Staff-Macro

08/14/2009 12:06 Penakle#1
I want to start by saying, the guys doing the coding on some of these macros are awesome. I DID NOT DO THIS MYSELF. It is....edited using bits and pieces from a few dif macros. Props to the Harvesting with rest guy and...the strait Harvester macro that was put out here. I used my little knowledge of programming to make this work. Staff slots are 1-5. Rest is 0. Spell slot is 6. This can be used to cast multiple spells, gonna have to edit it a bit, and the delay between the clicks will be the same no matter what. Check it out. Once again thanks to the guys who did the original coding.

EDIT: Rest is set by defualt to 1min 20 seconds. Can change this easily at the bottom in the rest function, "80000" to whatever you want. (Remember millisecond) Also the number of casts is set to 19. If you want to change that go to the While loop in the Harvest function!
EDIT2: The coding is sloppy I know, but it works, and pretty well too!
EDIT3: Do NOT go off the slots on the top of the code, i forgot to take them out!

Code:
; Simple Harvesting related AutoIt script by TeabagGus
; This script will equip a weapon first and then your harvesting tool. This makes sure you always have the tool equiped.
; It runs 2 loops of 50 attempts
; Rest is Slot 5
; Tool is slot 3
; Weapon is slot 0
Global $Paused
HotKeySet("`", "TogglePause")
HotKeySet("{DEL}", "Terminate")
$a = InputBox( "Question", "Delay between clicks?", "11250" )
$b = 0
WinActivate ("Darkfall Online")
Sleep( 2000 )
Sleep (2000)
$i = 0
While $i <= 100000
Sleep (1000)
Harvest()
Sleep (1000)
Rest()
Sleep (1000)
$i = $i + 1
Wend
 
Func Harvest()
$m = 0
$b = 0
Send("r")
While $m < 19
    $b = $b + 1
    If $b = 1 Then Sleep(500)
    If $b = 1  Then Send("1")
    If $b = 1 Then sleep(500)
    If $b = 1 Then Send("6")
    If $b = 1 Then $m = $m + 1
    If $b = 1 Then sleep(500)
    If $b = 2  Then Send("2")
    If $b = 2  Then sleep(500) 
    If $b = 2  Then Send("6")
    If $b = 2 Then $m = $m + 1
    If $b = 2 Then sleep(500)
    If $b = 3  Then Send("3")
    If $b = 3  Then sleep(500) 
    If $b = 3  Then Send("6")
    If $b = 3 Then $m = $m + 1
    If $b = 3 Then sleep(500)
    If $b = 4  Then Send("4")
    If $b = 4  Then sleep(500) 
    If $b = 4  Then Send("6")
    If $b = 4 Then $m = $m + 1
    If $b = 4 Then sleep(500)
    If $b = 5  Then Send("5") 
    If $b = 5  Then sleep(500) 
    If $b = 5  Then Send("6") 
    If $b = 5 Then $m = $m + 1
    If $b = 5 Then sleep(500)
    If $b = 5  Then $b = 0     
MouseClick( "Left" )
Sleep( $a )
WEnd
Send("r")
EndFunc
 
Func Rest()
Send ("0")
Sleep (1000)
MouseClick ("left")
Sleep(1000)
Send("2")
Sleep (80000)
Send ("w")
Sleep (1000)
EndFunc
 
Func EquipWeapon()
    Sleep (1000)
Send ("0") ; Weapon
Sleep (1000)
EndFunc
 
Func TogglePause( )
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc
 
Func Terminate( )
Exit 0
EndFunc
02/26/2010 16:45 вʅɑɔʞ•ʀɑɲɡɛ™#2
All Threads of you get Closed !

Accepted in 5 -7 !

Now you get an new Chance from E*Pvp, to write helpfull Story's !

Your new Golden Rules is called > "Dont Copy and Past, Learn it!"

Thanks but i need to Close this, too.

Soz in all !

#Pinned
#Report

~Closed~