PDA

View Full Version : AutoIt Scripting



Jake Dane
02-11-2011, 01:49 PM
These should be pretty self-explanatory if you're just a little into AutoIt alrdy. If not, don't hesitate to fire away - there're no stupid questions, remember ;)


The scripts are written so most dynamic input can be customized at the beginning when executing the file.

E.g. if you don't want your character view to pan down after getting up from resting in the Mana Missile Script, you can set the "Number of miliseconds panning the camera downwards"-value to 0.

Also an important thing to note is that you can put the script on pause by pressing the "`"-button below ESCAPE (depends on the keyboard layout). You stop the script by pressing the "DELETE"-button.

Mana Missile Script:
Can use an infinite amount of staffs while making sure a staff is always equipped at the beginning of each cast cycle.


Dim $a, $b, $c, $d, $e, $f, $g, $h, $i
Global $Paused
HotKeySet("`", "TogglePause")
HotKeySet("{DEL}", "Terminate")
$b = InputBox( "Question", "Hotbar number for Staff?", "1" )
$c = InputBox( "Question", "Hotbar number for Starter Weapon?", "2" )
$d = InputBox( "Question", "Hotbar number for Mana Missile", "3" )
$e = InputBox( "Question", "Number of casts per cycle?", "40" )
$f = InputBox( "Question", "Hotbar number for Rest?", "9" )
$g = InputBox( "Question", "Duration of Rest?", "60000" )
$h = InputBox( "Question", "Hotkey for Sheathe/Unsheathe", "R" )
$i = InputBox( "Question", "Number of milliseconds panning the camera downwards", "500" )
MsgBox( 0, "Alert", "Click OK then Alt + Tab into Darkfall to start the script." )
WinWaitActive( "Darkfall Online" )

While 1
$a = 0

Send ( $c )
Sleep ( 750 )
Send ( $b )
Sleep ( 750 )
Send ( $h )
Sleep ( 500 )
Send ( $d )
Sleep ( 250 )
Send ( "{DOWN DOWN}" )
Sleep ( $i )
Send ( "{DOWN UP}" )

Do
Call ( "Casting" )
$a = $a + 1
Until $a = $e

Call ( "Rest" )

WEnd

Func Casting( )
MouseClick ( "LEFT" )
Sleep ( 2250 )

EndFunc

Func Rest( )
Send ( $h )
Sleep ( 500 )
Send ( $f )
Sleep ( 500 )
MouseClick ( "Left" )
Sleep ( 1000 )
Sleep ( $g )
Send ( "{SPACE}" )
Sleep ( 2000 )
EndFunc

Func TogglePause( )
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc

Func Terminate( )
Exit 0
EndFunc


Sprint Script:
Sprints, sits down to rest up, gets up. Repeat. IMPORTANT: Requires that your Sprint hotkey it set to Right Mouse Button.



Dim $a, $b, $c, $d, $e
Global $Paused
HotKeySet("½", "TogglePause")
HotKeySet("{DEL}", "Terminate")
$c = InputBox( "Question", "Duration of Sprint?", "320000" )
$d = InputBox( "Question", "Hotbar number for Rest?", "9" )
$e = InputBox( "Question", "Duration of Rest?", "107000" )
MsgBox( 0, "Alert", "Click OK then Alt + Tab into Darkfall to start the script." )
WinWaitActive( "Darkfall Online" )

While 1
$a = 0
$b = $a

Do
Call( "Sprint" )
$a = $a + 1
Until $a = $b


WEnd

Func Sprint( )
Send ( "{W DOWN}" )
Sleep ( 500 )
MouseDown ( "RIGHT" )
Sleep ( $c )
Send ( "{W UP}" )
Sleep ( 500 )
MouseUp ( "RIGHT" )
Sleep ( 500 )
Send ( $d )
Sleep ( 500 )
MouseClick ( "Left" )
Sleep ( $e )
Send ( "{SPACE}" )
Sleep ( 2000 )


EndFunc

Func TogglePause( )
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc

Func Terminate( )
Exit 0
EndFunc


Weapon Skill & Heal Target Script:
Swings a weapon at a sitting target, heals the target, rests if needed (if not set 0 as "Duration Of Rest". Repeat. Both Sacrifice and Heal Other can be used for this script.



Dim $a, $b, $c, $d, $e, $f, $g, $h, $i, $j, $k, $l
Global $Paused
HotKeySet("½", "TogglePause")
HotKeySet("{DEL}", "Terminate")
$c = InputBox( "Question", "Hotbar Number For Weapon?", "1" )
$d = InputBox( "Question", "Hotbar Number For Staff?", "2" )
$e = InputBox( "Question", "Hotbar Number For Starter Weapon", "3" )
$f = InputBox( "Question", "Hotbar Number For Heal Spell?", "4" )
$g = InputBox( "Question", "Hotbar Number For Rest", "9" )
$h = InputBox( "Question", "How Many Swings Per Cycle?", "5" )
$l = InputBox( "Question", "How Long Delay Between Swings?", "1500" )
$i = InputBox( "Question", "How Many Heals Per Cycle?", "2" )
$j = InputBox( "Question", "Duration Of Rest", "5000" )
$k = InputBox( "Question", "Hotkey for Sheathe/Unsheathe?", "R" )
MsgBox( 0, "Alert", "Click OK then Alt + Tab into Darkfall to start the script." )
WinWaitActive( "Darkfall Online" )

While 1
$a = 0
$b = 0

Send ( $e )
Sleep ( 750 )
Send ( $c )
Sleep ( 750 )
Send ( $k )
Sleep ( 250 )
Sleep ( 250 )
Send ( "{DOWN DOWN}" )
Sleep ( 1500 )
Send ( "{DOWN UP}" )

Do
Call( "Swing" )
$a = $a + 1
Until $a = $h

Sleep ( 500 )
Send ( $k )
Sleep ( 750 )
Send ( $d )
Sleep ( 750 )
Send ( $k )
Sleep ( 750 )
Send ( $f )

Do
Call ( "Heal" )
$b = $b + 1
Until $b = $i

Sleep ( 750 )
Send ( $k )
Sleep ( 750 )
Send ( $g )
Sleep ( 750 )
MouseClick ( "Left" )
Sleep ( 2000 )
Sleep ( $j )
Send ( "{SPACE}" )
Sleep ( 2000 )

WEnd

Func Swing( )
MouseClick ( "Left" )
Sleep ( $l )

EndFunc

Func Heal( )
MouseClick ( "Left" )
Sleep ( 5000 )

EndFunc


Func TogglePause( )
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc

Func Terminate( )
Exit 0
EndFunc



Recall Script:
Recalls to house, recalls to bindstone. Repeat. You will need to tweak the delay after each recall depending on the speed of your system and where you are recalling to.



Dim $a, $b, $c, $d, $e, $f
Global $Paused
HotKeySet("½", "TogglePause")
HotKeySet("{DEL}", "Terminate")
$c = InputBox( "Question", "Hotbar Number For House Recall?", "1" )
$d = InputBox( "Question", "Hotbar Number For Bindstone Recall?", "2" )
$e = InputBox( "Question", "Delay After House Recall?", "195000" )
$f = InputBox( "Question", "Delay After Bindstone Recall?", "210000" )
MsgBox( 0, "Alert", "Click OK then Alt + Tab into Darkfall to start the script." )
WinWaitActive( "Darkfall Online" )

While 1
$a = 0
$b = $a
Sleep ( 5000 )

Do
Call( "Recall" )
$a = $a + 1
Until $a = $b


WEnd

Func Recall( )
Send ( $c )
Sleep ( 500 )
MouseClick ( "LEFT" )
Sleep ( $e )
Send ( "$d )
Sleep ( 500 )
MouseClick ( "LEFT" )
Sleep ( $f )


EndFunc

Func TogglePause( )
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc

Func Terminate( )
Exit 0
EndFunc



AutoHotkey:
Download the program here (http://www.autohotkey.com/download/).

AutoHotkey helps remapping keys and can tie several actions to just a single in-game bind. Examples could be equipping both sword & shield with 1 button instead of 2. Another example could be using 1 button to cycle through ray spells picking the most suitable one to cast sorted by chosen priority and whether the ray is on cooldown or not.


Ray Script:
Use 1 button to cycle through all your rays. This script will also cast the ray when pushing your bind. Uses "E" to cycle through spells and "F3" to equip a staff before cycling and casting. What this means is you can be in engaged melee, push "E" and you'll cast a ray spell on your target instantly (roughly with a 300 millisecond delay tbh).

You need to tweak this script so it matches your own settings. Things to remember are:

1. Set number of rays.
2. Set Binding Input in Darkfall Online and in the script so they match (list of AutoHotkey key names can be found here (http://www.autohotkey.com/docs/commands/Send.htm)).
3. Tweak cooldown for each ray.
4. Set ray priority.

Each line in this script that starts with a ";" indicates a helping description or instruction on how to setup the script accordingly.



#InstallKeybdHook
#InstallMouseHook
;Ray Script
;Set the number of rays you have here
num_rays = 3

;Set your binds here
/*Regarding modifiers: Shift = +, Ctrl = ^, Alt = !,
> < denotes right and left keys respectively.
Consult the help file for further information
*/
k_1 = {Numpad7} ;Pungent Mist
k_2 = {Numpad8} ;Impale
k_3 = {Numpad9} ;Insect Swarm
k_4 = +4 ;
k_5 = +5 ;
k_6 = +6 ;

;Tweak cooldowns here
cd_1 = 15000 ;Pungent Mist
cd_2 = 6500 ;Impale
cd_3 = 15000 ;Insect Swarm
cd_4 = 15000 ;
cd_5 = 1000 ;
cd_6 = 5000 ;

;Set ray priority here, 1 being highest, 6 being lowest
p_1 = 1 ;Pungent Mist
p_2 = 2 ;Impale
p_3 = 3 ;Insect Swarm
p_4 = 4 ;
p_5 = 5 ;
p_6 = 6 ;

;Initializes ray availability array to 1 (off cooldown)
While A_Index <= num_rays
{
r_%A_Index% = 1
}

;Set your ray HotKey here (currently set to e)
e::
cur_ray := RayLogic(cur_ray, cur_key, cur_cool)
Send , {F3}
Sleep , 250
Send , %cur_key%
Click
While (ErrorLevel = 1)
{
If (GetKeyState("e", "P") = 1)
Return
KeyWait, Lbutton, T.2
}
r_%cur_ray% = 0
neg_cur_cool := -cur_cool
SetTimer , %cur_ray% , %neg_cur_cool%
Return

;Subroutine group to reset ray cds
1:
2:
3:
4:
5:
6:
r_%A_ThisLabel% = 1
Return

RayLogic(cur_ray, ByRef cur_key, ByRef cur_cool)
{
global

/*Initiates cur_ray to your highest priority ray
in the case of all rays being off cooldown
*/
cur_ray := p_1

/*Assigns the value of cur_ray to the first available
ray according to priority
*/
While A_Index <= num_rays
{
ray_number := p_%A_Index%
if (r_%ray_number% = 1)
{
cur_ray := ray_number
Break
}
}

;Sets the ray's corresponding key and cooldown
cur_key := k_%cur_ray%
cur_cool := cd_%cur_ray%

Return cur_ray
}
;End Ray Script



Heal Target Script:
Using the ray script as inspiration I created this Heal Target script. It's basically a copy of the ray script except you have to click left mouse button yourself to cast the spells. Seeing the heals aren't instant I thought this was the best way to do it.

This script can be a bit fragile. What this means is that it's important not to spam the bind for cycling through the spells without casting as this will trigger cooldowns on spells even though you may not have cast them yet. So - cycle to next available healing spell, click left mouse button to cast, cycle to next spell, cast or wait for the cooldown and then cast. Rinse, repeat.

You need to tweak this script so it matches your own settings. Things to remember are:

1. Set number of healing spells.
2. Set Binding Input in Darkfall Online and in the script so they match (list of AutoHotkey key names can be found here (http://www.autohotkey.com/docs/commands/Send.htm)).
3. Tweak cooldown for each heal.
4. Set heal priority.

Each line in this script that starts with a ";" indicates a helping description or instruction on how to setup the script accordingly.



#InstallKeybdHook
#InstallMouseHook
;Ray Script
;Set the number of rays you have here
num_rays = 3

;Set your binds here
/*Regarding modifiers: Shift = +, Ctrl = ^, Alt = !,
> < denotes right and left keys respectively.
Consult the help file for further information
*/
k_1 = <+{Numpad5} ;Sacrifice
k_2 = <+{Numpad6} ;Heal Other
k_3 = <+{Numpad7} ;Lay On Hands
k_4 = +4 ;
k_5 = +5 ;
k_6 = +6 ;

;Tweak cooldowns here
cd_1 = 4500 ;Sacrifice
cd_2 = 4500 ;Heal Other
cd_3 = 1500 ;Lay On Hands
cd_4 = 15000 ;
cd_5 = 1000 ;
cd_6 = 5000 ;

;Set ray priority here, 1 being highest, 6 being lowest
p_1 = 1 ;Sacrifice
p_2 = 2 ;Heal Other
p_3 = 3 ;Lay On Hands
p_4 = 4 ;
p_5 = 5 ;
p_6 = 6 ;

;Initializes ray availability array to 1 (off cooldown)
While A_Index <= num_rays
{
r_%A_Index% = 1
}

;Set your ray HotKey here (currently set to V)
v::
cur_ray := RayLogic(cur_ray, cur_key, cur_cool)
Send, {F3}
Sleep, 250
Send , %cur_key%
While (ErrorLevel = 1)
{
If (GetKeyState("v", "P") = 1)
Return
KeyWait, Lbutton, T.2
}
r_%cur_ray% = 0
neg_cur_cool := -cur_cool
SetTimer , %cur_ray% , %neg_cur_cool%
Return

;Subroutine group to reset ray cds
1:
2:
3:
4:
5:
6:
r_%A_ThisLabel% = 1
Return

RayLogic(cur_ray, ByRef cur_key, ByRef cur_cool)
{
global

/*Initiates cur_ray to your highest priority ray
in the case of all rays being off cooldown
*/
cur_ray := p_1

/*Assigns the value of cur_ray to the first available
ray according to priority
*/
While A_Index <= num_rays
{
ray_number := p_%A_Index%
if (r_%ray_number% = 1)
{
cur_ray := ray_number
Break
}
}

;Sets the ray's corresponding key and cooldown
cur_key := k_%cur_ray%
cur_cool := cd_%cur_ray%

Return cur_ray
}
;End Ray Script



Self Heal Script:
Another script inspired by the ray script. This will equip your staff, cycle through your self healing spells and cast them by the push of a single button.

You need to tweak this script so it matches your own settings. Things to remember are:

1. Set number of healing spells.
2. Set Binding Input in Darkfall Online and in the script so they match (list of AutoHotkey key names can be found here (http://www.autohotkey.com/docs/commands/Send.htm)).
3. Tweak cooldown for each heal.
4. Set heal priority.

Each line in this script that starts with a ";" indicates a helping description or instruction on how to setup the script accordingly.



#InstallKeybdHook
#InstallMouseHook
;Ray Script
;Set the number of rays you have here
num_rays = 3

;Set your binds here
/*Regarding modifiers: Shift = +, Ctrl = ^, Alt = !,
> < denotes right and left keys respectively.
Consult the help file for further information
*/
k_1 = <+{Numpad8} ;Witches Brew
k_2 = <+{Numpad9} ;Stamina To Health
k_3 = <+{Numpad0} ;Heal Self
k_4 = +4 ;
k_5 = +5 ;
k_6 = +6 ;

;Tweak cooldowns here
cd_1 = 46250 ;Witches Brew
cd_2 = 6250 ;Stamina To Health
cd_3 = 32250 ;Heal Self
cd_4 = 15000 ;
cd_5 = 1000 ;
cd_6 = 5000 ;

;Set ray priority here, 1 being highest, 6 being lowest
p_1 = 1 ;Witches Brew
p_2 = 2 ;Stamina To Health
p_3 = 3 ;Heal Self
p_4 = 4 ;
p_5 = 5 ;
p_6 = 6 ;

;Initializes ray availability array to 1 (off cooldown)
While A_Index <= num_rays
{
r_%A_Index% = 1
}

;Set your ray HotKey here (currently set to Q)
q::
cur_ray := RayLogic(cur_ray, cur_key, cur_cool)
Send, {F3}
Sleep, 250
Send , %cur_key%
Click
While (ErrorLevel = 1)
{
If (GetKeyState("q", "P") = 1)
Return
KeyWait, Lbutton, T.2
}
r_%cur_ray% = 0
neg_cur_cool := -cur_cool
SetTimer , %cur_ray% , %neg_cur_cool%
Return

;Subroutine group to reset ray cds
1:
2:
3:
4:
5:
6:
r_%A_ThisLabel% = 1
Return

RayLogic(cur_ray, ByRef cur_key, ByRef cur_cool)
{
global

/*Initiates cur_ray to your highest priority ray
in the case of all rays being off cooldown
*/
cur_ray := p_1

/*Assigns the value of cur_ray to the first available
ray according to priority
*/
While A_Index <= num_rays
{
ray_number := p_%A_Index%
if (r_%ray_number% = 1)
{
cur_ray := ray_number
Break
}
}

;Sets the ray's corresponding key and cooldown
cur_key := k_%cur_ray%
cur_cool := cd_%cur_ray%

Return cur_ray
}
;End Ray Script



Melee Script:
This script is a merge of several shortcuts:

1. Equipping a sword & shield with the press of 1 button.
2. Equipping a staff and going to an assigned hotbar. I use this for buffing with another staff than the one I would normally use for my regular spells.
3. Merging Whirlwind, Power Attack and Knockback shortcuts from 3 weapons into 1 joint shortcut for each attack per weapon.
4. Uses Rage with the press of a single button.

As with the rest of the AutoHotkey scripts here you will need to tweak your input bindings in-game to match what ever hotkeys you wish to use in the script.



;F4 - Sword & Shield
;-----------------
*F4::
Send {F4}
Sleep, 750
Send {F5}
return

;CTRL+F3 - Staff & Buff Bar
;-----------------
*^F3::
Send ^{F2}
Send +9
return

;CTRL+1 - Whirlwind
;-----------------
*^1::
Send ^!{numpad1}
Send ^!{numpad4}
Send ^!{numpad7}
Sleep, 100
Click
return

;CTRL+2 - Power Attack
;-----------------
*^2::
Send ^!{numpad2}
Send ^!{numpad5}
Send ^!{numpad8}
Sleep, 100
Click
return

;CTRL+3 - Knockback
;-----------------
*^3::
Send ^!{numpad3}
Send ^!{numpad6}
Send ^!{numpad9}
Sleep, 100
Click
return

;F12 - Rage
;-----------------
*F12::
Send {F1}
Sleep , 500
Send {F12}
Click
return



Potion Timer Script:
I found part of this on the official forum and tweaked it to my personal liking. What it does is start a 1 minute countdown whenever you drink a potion and place a tooltip at the top of your screen. As the the countdown comes closer to 0 you will get more frequent messages on when you're ready to drink another potion.

Edit: By popular demand a version with sound has been added. You will need potnow.wma (http://www.hyteks.info/df/potnow.wma) (Roy - you should get this (http://hyteks.info/files/potnow.wma) soundfile instead <3) and countdown.ini (http://www.hyteks.info/df/countdown.ini) placed in the same directory as the potion script for it to work. This will also work in full screen mode.

It has potions bound to keys F6, F7 and F10. You can change these keys at will. - just make sure they correspond to your Darkfall Online Input Bindings.

Without Sound:



;Tooltips are only shown in windowed mode
*F6:: ;Health Potion
Send {F6}
Tooltip, Potion on cooldown!, 500, 1
Sleep, 30000
Tooltip, Potion cooldown @ 30!, 500, 1
Sleep, 15000
Tooltip, Potion cooldown @ 15!, 500, 1
Sleep, 5000
Tooltip, Potion cooldown @ 10!, 500, 1
Sleep, 5000
Tooltip, Potion cooldown @ 5!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 4!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 3!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 2!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 1!, 500, 1
Sleep, 1000
Tooltip, Potion ready!, 500, 1
return

*F7:: ;Stamina Potion
Send {F7}
Tooltip, Potion on cooldown!, 500, 1
Sleep, 30000
Tooltip, Potion cooldown @ 30!, 500, 1
Sleep, 15000
Tooltip, Potion cooldown @ 15!, 500, 1
Sleep, 5000
Tooltip, Potion cooldown @ 10!, 500, 1
Sleep, 5000
Tooltip, Potion cooldown @ 5!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 4!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 3!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 2!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 1!, 500, 1
Sleep, 1000
Tooltip, Potion ready!, 500, 1
return

*F10:: ;Mana Potion
Send {F10}
Tooltip, Potion on cooldown!, 500, 1
Sleep, 30000
Tooltip, Potion cooldown @ 30!, 500, 1
Sleep, 15000
Tooltip, Potion cooldown @ 15!, 500, 1
Sleep, 5000
Tooltip, Potion cooldown @ 10!, 500, 1
Sleep, 5000
Tooltip, Potion cooldown @ 5!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 4!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 3!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 2!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 1!, 500, 1
Sleep, 1000
Tooltip, Potion ready!, 500, 1
return


With Sound:
You can record your own sound and replace the existing file. Just make sure you name the new file "potnow.wma" or change the SoundFile entry in "countdown.ini" from "potnow.wma" to whatever. Mp3's work as well.



;Tooltips will only be shown in windowed mode
cd_IniFile := A_ScriptDir "\CountDown.ini"
IniRead cd_SoundFile, %cd_IniFile%, Main, SoundFile, %A_ScriptDir%\

*F6::
Send {F6}
Tooltip, Potion on cooldown!, 500, 1
Sleep, 30000
Tooltip, Potion cooldown @ 30!, 500, 1
Sleep, 15000
Tooltip, Potion cooldown @ 15!, 500, 1
Sleep, 5000
Tooltip, Potion cooldown @ 10!, 500, 1
Sleep, 5000
Tooltip, Potion cooldown @ 5!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 4!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 3!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 2!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 1!, 500, 1
Sleep, 1000
Tooltip, Potion ready!, 500, 1
SoundPlay %cd_SoundFile%
return

*F7::
Send {F7}
Tooltip, Potion on cooldown!, 500, 1
Sleep, 30000
Tooltip, Potion cooldown @ 30!, 500, 1
Sleep, 15000
Tooltip, Potion cooldown @ 15!, 500, 1
Sleep, 5000
Tooltip, Potion cooldown @ 10!, 500, 1
Sleep, 5000
Tooltip, Potion cooldown @ 5!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 4!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 3!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 2!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 1!, 500, 1
Sleep, 1000
Tooltip, Potion ready!, 500, 1
SoundPlay %cd_SoundFile%
return

*F10::
Send {F10}
Tooltip, Potion on cooldown!, 500, 1
Sleep, 30000
Tooltip, Potion cooldown @ 30!, 500, 1
Sleep, 15000
Tooltip, Potion cooldown @ 15!, 500, 1
Sleep, 5000
Tooltip, Potion cooldown @ 10!, 500, 1
Sleep, 5000
Tooltip, Potion cooldown @ 5!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 4!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 3!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 2!, 500, 1
Sleep, 1000
Tooltip, Potion cooldown @ 1!, 500, 1
Sleep, 1000
Tooltip, Potion ready!, 500, 1
SoundPlay %cd_SoundFile%
return


I'll add more as I write them. I can also write something specific if requested.

Denioz VanValdenburg
02-12-2011, 09:48 PM
Thats very cool Jake, i didnt rlly macroed so far but i might have a look on this one , thanks alot!

Jake Dane
02-13-2011, 12:00 AM
Thanks Denioz. That's good to hear :)

Still taking requests!

I'll be putting up an afk sprinting (str/dex/qui) script tomorrow and I'm working on an extended customizable spell casting script like the mana missile one but for people who want to cast several different spells while also having the option to add transfer spells rather than spending time resting for mana.

Raize Sothenic
02-13-2011, 06:35 PM
I'll catch you in game Jake,

This is a great help to those of us who have been struggling with scripting.

I have something I hope you can help me with

Jake Dane
02-14-2011, 04:04 PM
Updated :)

Allon Mighty
02-15-2011, 05:23 PM
Sweet, thumbs up

Jake Dane
02-16-2011, 12:03 PM
Added a script for those who want to get their House Recall and Bindstone Recall skills up.

Brandon Greymoor
02-16-2011, 03:40 PM
Don't know if they're lots of effort or complicated but what's these Ray scripts people are using and how do people make their hotbars change depending on what weapon they have out

Jake Dane
02-16-2011, 06:09 PM
Afaik that's AutoHotkey scripts which I don't have any experience with. I've seen some posts about it on the official forums but didn't put any thought it.

I prefer to play the game as "clean" as possible without too much 3rd party interference. On the other hand I don't even have rays yet so haven't had any need for AutoHotkey scripts for them. Maybe I'll change my mind when start using rays in every fight :)

Jake Dane
02-17-2011, 06:32 PM
Right, so I spent pretty much all day figuring out how to use and write in AutoHotkey and finally managed to make some pretty crazy stuff with it. It's all added to my original post.

The ray script, hands down, is fucking INSANE imo. I found the draft for it on the official forums and added a minor tweak making it equip a staff and instant casting and cycling rays one at a time by repeatedly pushing the assigned shortcut key.

The healing scripts are cool but nothing like the ray script.

Finally I found a basic script for equipping a sword & and shield by the push of a button. I then further added to the script making it possible to equip up to 3 different weapons and use the same 3 shortcut keys to do Whirlwind, Power Attack and Knockback so you don't need to remember and more importantly push 9 unique keys to do the special attacks.

Jake Dane
02-21-2011, 10:50 AM
Added Potion Timer script.

Royko Sothenic
02-21-2011, 03:37 PM
Does the potion one only work in windowed mode?

Jake Dane
02-21-2011, 06:56 PM
Does the potion one only work in windowed mode?

Unfortunately, yes. I think it's because AHK can't send a tooltip to a fullscreen window but I don't know. If the tooltip was changed to a sound rather, it may work with playing that sound instead of showing a tooltip. If you want it I can try and look into it.

Denioz VanValdenburg
02-21-2011, 09:57 PM
would be awsome to have a sound or a voice that tells you when you can eat again cus i have a little screen and dont want to play in windowed tbh.

Great work mate you got a whole list now thats rlly cool.

Jake Dane
02-22-2011, 12:47 AM
Since food has different timers you'd need a different script for each type unless you bound a unique key to each kind of food, which would be kind of silly. If you always eat food that are in the same timer category (all fish = 2 mins, Bread = 3 mins, Meat Jerky/Apple Pie = 5 mins, Lobster = 10 mins, Carrot Soup/Meat Stew/Sausage/Omelet = 15 mins, Sheperd's Pie = 25 mins) it's possible to do though you'd also have to take a skill like Survivalist into account.

After some digging around I've found just the thing you full screen guys are looking for. It's been added to the original post.

Grawl Grownar
03-16-2011, 11:11 PM
A script for selecting a weapon and swapping to the corresponding hotbar would be awesome, ei pressing "q" pulls out your melee weapon and change to a hotbar with melee abilities ect...

I have a hard time figuring out how to make this happen in autohotkey.

Jake Dane
03-17-2011, 12:09 AM
A script for selecting a weapon and swapping to the corresponding hotbar would be awesome, ei pressing "q" pulls out your melee weapon and change to a hotbar with melee abilities ect...

I have a hard time figuring out how to make this happen in autohotkey.

You want to look at the Melee Script I've posted for AutoHotkey in my original post.

This is the basic command:


;CTRL+F3 - Staff & Buff Bar
;-----------------
*^F3::
Send ^{F2}
Send +9


Here you would push CTRL+F3 and AutoHotkey will push CTRL+F2 (equipping staff) and afterwards push SHIFT+9 (change to hotbar 9).
^ = CONTROL
+ = SHIFT

Remember to map corresponding bindings in Darkfall so they match your AutoHotkey scripts.

Grawl Grownar
03-17-2011, 09:49 PM
Ah cool, I will have a look at that.

Another thing im wondering about is the melee script for the power attack/whirlwind/knockback. Cant seem to figure out the idea behind it, but that might be given my newbie Darkfall status hehe.

I mean, does the script call the weapons one by one or is it to change from doing an axe knockback, then sword and last mace or something similar ? And that way get 3 times the same attack instead of waiting on the cooldown ?

Jake Dane
03-17-2011, 10:06 PM
The melee script is setup so you can push 1 button make the same special attack (like whirlwind) with every weapon you're wielding no matter if it's greatswords, knives, or what ever. You then do your binds in Darkfall so they match your AutoHotkey script.

It doesn't matter that the script calls the hotbar-bind for both greatswords whirlwind, polearms whirlwind, and knives whirlwind at the same time since the game will only register which ever whirlwind hotbar-bind that matches the weapon you have equipped.

You could even add more binds to this script that would call specific spells. However, they'd actually only be called if you're wielding a staff. Doing this could let you do Whirlwind with whatever weapon you're using when pressing CTRL+1 but also ready Confusion instead if you have a staff unsheathed. The possibilities are almost limitless :)

Grawl Grownar
03-17-2011, 11:25 PM
Ok, let me get this right, looking at the Whirlwind as an example of how:

;CTRL+1 - Whirlwind
;-----------------
*^1::
Send ^!{numpad1} - calls axe whirlwind
Send ^!{numpad4} - calls sword whirlwind
Send ^!{numpad7} - calls polearm whirlwind
Sleep, 100
Click
return

Is that the right way i read it ?

A more darkfall related question is: Do the different whirlwinds/knockbacks/power attacks, share cooldown ?

Jake Dane
03-18-2011, 12:49 AM
Yes, you are reading it correctly.

And melee special attacks do not share cooldown.

Ether Rael
03-18-2011, 02:11 AM
I'm using AHK and I think adding these two directives to the top of the script has improved the ray firing for me:



#InstallKeybdHook
#InstallMouseHook

(woo first post!)

Grawl Grownar
03-18-2011, 09:09 AM
Ok great, thanks Jake.