The Furious Angels

FA Discussion => General => Topic started by: likwidtek on April 04, 2009, 07:06:26 pm

Title: Darkfall macros that work well for me
Post by: likwidtek on April 04, 2009, 07:06:26 pm
Obviously you should be at your PC while these are running.  AFK is no bueno but there work well for me.

These require AUTOit, a free powerful macro program.

Simple Gatherer
A simple gatherer supporting a pause key, random click intervals and semi-background mode.  The semi background mode is flippin awesome.  You can surf the web on another monitor while your guy is gathering on the other screen.  Sweet!  press F11 to toggle pause.

Code: [Select]

#RequireAdmin
#Include <Misc>

;hardcoded settings
Opt("SendKeyDelay", 100)
Opt("MouseClickDelay", 100)
Opt("MouseClickDownDelay", 100)

$wintitle = InputBox(RandomStr(), "Window settings? This value can normally be left at the default value.", "[TITLE:Darkfall Online; CLASS:SFMainWindow]")
If not WinExists($wintitle) Then
MsgBox(64, RandomStr(), "The window could not be found. Please start DF first.")
Exit
EndIf
$random = MsgBox(36, RandomStr(), "Do you want to harvest after a random value in seconds (between a min and max value)? If not, you'll be able to set a fixed value in seconds.")
If $random == 6 Then
$min = InputBox(RandomStr(), "Min random seconds to harvest?", 10.5)
$max = InputBox(RandomStr(), "Max random seconds to harvest?", 11)
If $min == "" OR $max == "" OR IsNumber($min) == False OR IsNumber($max) == False Then
Exit
EndIf
Else
$time = InputBox(RandomStr(), "After howmany seconds do you want to harvest?", 10.5)
If $time == "" OR IsNumber($time) == False Then
Exit
EndIf
EndIf

;init
Global $active = True
Global $timer = 0
Global $curwindow
Global $rcoords

;loop
While 1
Sleep(10)
If _IsPressed("7A") Then
If $active Then
$active = False
TraySetState(4)
SoundPlay(@WindowsDir & "\media\tada.wav", 1)
ElseIf $active == False Then
$active = True
TraySetState(8)
SoundPlay(@WindowsDir & "\media\tada.wav", 1)
EndIf
ElseIf $active == False Then
Sleep(10)
ElseIf $active Then
If $random == 6 Then
$sleep = Random($min * 1000, $max * 1000, 1)
Else
$sleep = $time * 1000
EndIf
If TimerDiff($timer) > $sleep Then
StealthActivate()
MouseClick("left")
StealthRestore()
$timer = TimerInit()
EndIf
EndIf
WEnd

;functions
Func StealthActivate()
If WinActive($wintitle) Then
$curwindow = ""

Else
BlockInput(1)
$rcoords = MouseGetPos()
$curwindow = WinGetTitle("[active]")
WinActivate($wintitle)
WinWaitActive($wintitle)
EndIf
$details = WinGetPos($wintitle)
MouseMove($details[0] + ($details[2] / 2), $details[1] + ($details[3] / 2), 0) ;this is done to support multiple monitors
EndFunc ;==>StealthActivate

Func StealthRestore()
If $curwindow <Then>StealthRestore

Func RandomStr($length = 0)
If $length == 0 Then
$length = Random(2, 8, 1)
EndIf
$seed = ""
Do
If Random() <0> $length)
Return $seed
EndFunc ;==>RandomStr


Simple Clicker
A simple but very handy clicker, useful in many situations.  Useful for things like crafting or any other task where you simply need to click over and over.
Code: [Select]
#RequireAdmin
$random = MsgBox(36, RandomStr(), "Do you want to click after a random value (between a min and max value)? If not, you'll be able to set a fixed value.")
If $random == 6 Then
$min = InputBox(RandomStr(), "Min random seconds to click?")
$max = InputBox(RandomStr(), "Max random seconds to click?")
If $min == "" OR $max == "" OR IsNumber($min) == False OR IsNumber($max) == False Then
Exit
EndIf
Else
$time = InputBox(RandomStr(), "After howmany seconds do you want to click?")
If $time == "" OR IsNumber($time) == False Then
Exit
EndIf
EndIf
While 1
If $random == 6 Then
$time = Random($min, $max)
EndIf
Sleep($time * 1000)
MouseClick("left")
WEnd

Func RandomStr($length = 0)
If $length == 0 Then
$length = Random(2, 8, 1)
EndIf
$seed = ""

Do
If Random() <0> $length)
Return $seed
EndFunc ;==>RandomStr
Title: Re: Darkfall macros that work well for me
Post by: Phienyx on April 05, 2009, 12:19:32 am
I downloaded Autoit, but cannot seem to figure out how to get this whole thing set up and started.  I got it downloaded and that's as far as i could get.
Title: Re: Darkfall macros that work well for me
Post by: likwidtek on April 05, 2009, 09:13:56 pm
download autoit, install it.

Then copy the script name it as simplegather.au3 and another one called simpleclicker.au3.  Then all you do is double click the au3 files.
Title: Re: Darkfall macros that work well for me
Post by: likwidtek on April 06, 2009, 01:18:31 pm
Maybe a gray area sort of Macro, what do you guys think?

Tab key to cycle through hotbars
Make sure you set your hotbar changing bindings to CTRL instead of SHIFT, so it doesn't mess with you while you're sprinting.
Code: [Select]
Dim $a, $b, $c, $d, $e, $f, $g, $h
$b = InputBox( "Question", "How many different weapons to use?", "2" )
If $b = 2 Then
$c = InputBox( "Question", "Hotbar number for Weapon 1?", "1" )
$d = InputBox( "Question", "Hotbar number for Weapon 2?", "2" )
HotKeySet( "{TAB}", "Tab1" )
ElseIf $b = 3 Then
$c = InputBox( "Question", "Hotbar number for Weapon 1?", "1" )
$d = InputBox( "Question", "Hotbar number for Weapon 2?", "2" )
$e = InputBox( "Question", "Hotbar number for Weapon 3?", "3" )
HotKeySet( "{TAB}", "Tab2" )
ElseIf $b = 4 Then
$c = InputBox( "Question", "Hotbar number for Weapon 1?", "1" )
$d = InputBox( "Question", "Hotbar number for Weapon 2?", "2" )
$e = InputBox( "Question", "Hotbar number for Weapon 3?", "3" )
$f = InputBox( "Question", "Hotbar number for Weapon 4?", "4" )
HotKeySet( "{TAB}", "Tab3" )
ElseIf $b = 5 Then
$c = InputBox( "Question", "Hotbar number for Weapon 1?", "1" )
$d = InputBox( "Question", "Hotbar number for Weapon 2?", "2" )
$e = InputBox( "Question", "Hotbar number for Weapon 3?", "3" )
$f = InputBox( "Question", "Hotbar number for Weapon 4?", "4" )
$g = InputBox( "Question", "Hotbar number for Weapon 5?", "5" )
HotKeySet( "{TAB}", "Tab4" )
ElseIf $b = 6 Then
$c = InputBox( "Question", "Hotbar number for Weapon 1?", "1" )
$d = InputBox( "Question", "Hotbar number for Weapon 2?", "2" )
$e = InputBox( "Question", "Hotbar number for Weapon 3?", "3" )
$f = InputBox( "Question", "Hotbar number for Weapon 4?", "4" )
$g = InputBox( "Question", "Hotbar number for Weapon 5?", "5" )
$h = InputBox( "Question", "Hotbar number for Weapon 6?", "6" )
HotKeySet( "{TAB}", "Tab5" )
ElseIf
MsgBox( 0, "Alert", "You can only have 2-6 weapons." )
Exit
EndIf

$a = 0

While 1
Sleep( 100 )
WEnd

Func Tab1( )
$a = $a + 1
If $a = 1 Then
Send( "^" & $c )
ElseIf $a = 2 Then
Send( "^" & $d )
ElseIf $a = 3 Then
$a = 1
Send( "^" & $c )
EndIf
EndFunc

Func Tab2( )
$a = $a + 1
If $a = 1 Then
Send( "^" & $c )
ElseIf $a = 2 Then
Send( "^" & $d )
ElseIf $a = 3 Then
Send( "^" & $e )
ElseIf $a = 4 Then
$a = 1
Send( "^" & $c )
EndIf
EndFunc


Func Tab3( )
$a = $a + 1
If $a = 1 Then
Send( "^" & $c )
ElseIf $a = 2 Then
Send( "^" & $d )
ElseIf $a = 3 Then
Send( "^" & $e )
ElseIf $a = 4 Then
Send( "^" & $f )
ElseIf $a = 5 Then
$a = 1
Send( "^" & $c )
EndIf
EndFunc

Func Tab4( )
$a = $a + 1
If $a = 1 Then
Send( "^" & $c )
ElseIf $a = 2 Then
Send( "^" & $d )
ElseIf $a = 3 Then
Send( "^" & $e )
ElseIf $a = 4 Then
Send( "^" & $f )
ElseIf $a = 5 Then
Send( "^" & $g )
ElseIf $a = 6 Then
$a = 1
Send( "^" & $c )
EndIf
EndFunc

Func Tab5( )
$a = $a + 1
If $a = 1 Then
Send( "^" & $c )
ElseIf $a = 2 Then
Send( "^" & $d )
ElseIf $a = 3 Then
Send( "^" & $e )
ElseIf $a = 4 Then
Send( "^" & $f )
ElseIf $a = 5 Then
Send( "^" & $g )
ElseIf $a = 6 Then
Send( "^" & $h )
ElseIf $a = 7 Then
$a = 1
Send( "^" & $c )
EndIf
EndFunc
Title: Re: Darkfall macros that work well for me
Post by: ArchNemesis on April 06, 2009, 03:25:13 pm
Both the initial scripts you posted weren't working for me.

i forgot about the first but the second says it's missing an endif, which i added then it started saying other stuff was missing.

Also, i tried adding the DF window portion of the first script... don't know if any vars are different between the two scripts but i couldn't get either one to work anyway =/
Title: Re: Darkfall macros that work well for me
Post by: likwidtek on April 06, 2009, 03:42:04 pm
hmm.  the forums could be messing with the code.  I'll paste bin them... too bad these forums don't support attachments.
Title: Re: Darkfall macros that work well for me
Post by: likwidtek on April 06, 2009, 03:43:40 pm
Can anyone else confirm this error?  I'm at work and can't test.
Title: Darkfall macros that work well for me
Post by: Broin on April 07, 2009, 08:15:41 am
ADAD put your farming macro's in here if you would please.
Title: Darkfall macros that work well for me
Post by: ArchNemesis on April 07, 2009, 07:12:17 pm
So....

Any idea as to why this magical thing isn't being so magical?
Title: Darkfall macros that work well for me
Post by: likwidtek on April 07, 2009, 07:15:27 pm
it seems like you're the only one dude.  delete the au3 files and copy and paste it again making sure you are highlighting the exact part wrapped in the CODE box.

or just email me the au3 files you created.  likwidtek@gmail.com
SimplePortal 2.3.8 © 2008-2025, SimplePortal