Does anyone have a working rapid melee macro?

03/08/2011 23:24 batmaster#1
Hey, i was wondering if anyone here could help me out with a working rapid melee macro? I have tried one for autoit(dims) but it continually loses track of the targets health and quits on me. I have found another for autohotkey but they did not include all the other files to run it only the main script.

Im looking for one to macro melee on my alt since i cannot play alot right now due to real life stuff, not looking for the partner kind.

If anyone could give me any kind of help it would be appretiated.

Heres the autohotkey script if anyone can use it(doesnt have the files needed to run it)

/*
SETUP

1 - Sword
2 - Special attack one (or food)
3 - Special attack two (or food)
4 - Sacrifice
5 - Heal Other
6 - Ironskin
7 - Health2Mana
8 - Mana2Stamina
9 - Stamina2Health
0 - Staff

Unsheathe Object = ctrl + u
*/

#SingleInstance,Force
#MaxThreadsPerHotkey 2
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
WinActivate, Darkfall Online
Sleep 2500

; CONFIGURATION SECTION

; Use special attacks?
special1 := true
special2 := true

; Food timer in milliseconds - if you set one of the special attacks to false, you can use food in that slot instead
; -1 if you dont wanna use food, 300000 = check for food every 5 mins
food := -1

; Use Sacrifice? true or false
sacrifice := false

; How long does your Ironskin last? -1 if you don't want to cast Ironskin, 0 if you want to cast ironskin every time
ironskin := 0

; Target minimum/full health percentage.
; Target will be healed up once it goes below minimum percentage.
; You will stop healing target once it reaches full health percentage.
targetminimum := 18
targetfullhealth := 82

; Use Tell Alarm? true or false
tellalarm := true

; Delay between pressing left mousebutton
; Some people reported macro lags them so I added this option, but in most cases I think you should let it be at 0 = spam button as fast as possible
delay := 0

; Debug?
; If it macro don't work, especially if it keeps casting stam2mana or mana2health or if it keeps healing the target even when he is now low on health,
; then please turn debug on (debug := true) and run it for a little while. It generates some bmp images called debug-???.bmp - please upload them on the board,
; and I will try to find the error and correct it.
debug := false

; DO NOT TOUCH ANYTHING BELOW HERE
health := "", lowhealthx := 0, fullhealthx := 0, healthy := 0, lowhealthcolor := "", fullhealthcolor := "", stam := "", lowstamx := 0, fullstamx := 0, stamy := 0, lowstamcolor := "", fullstamcolor := "", mana := "", lowmanax := 0, fullmanax := 0, manay := 0, lowmanacolor := "", fullmanacolor := "", target := true, targethealth := "", targetlowhealthx := 0, targetfullhealthx := 0, targethealthy := 0, targetlowhealthcolor := "", targetfullhealthcolor := "", pause = 0, slot0, slot1, slot2, slot3, slot4, slot5, slot6, slot7, slot8, slot9

#Include Misc/ScreenCapture.ahk
#Include Misc/Hotbar.ahk
#Include Misc/Status.ahk
#Include Misc/Message.ahk

HotbarInit()
StatusInit()

last_food := A_TickCount - food
last_ironskin := A_TickCount - ironskin
last_message := A_TickCount - 300000
WinGetPos, x, y, windowwidth, windowheight, A

Loop
{
; Food
t := A_TickCount - last_food
If ((not special1 or not special2) and food > 0 and t > food) {
ImageSearch, x, y, 0, 0, windowwidth, windowheight, *50 Images\nourished.bmp
If (ErrorLevel = 1) {
Send {2}
Sleep 100
Send {3}
Sleep 350
last_food := A_TickCount
}
}
Sleep 250

; Staff
Unsheath(0)

; Restore own stamina
SelfStatus()
While (stam <> "full")
{
Cast(8)
SelfStatus()
Message()
}

; Heal target
TargetStatus()
While (targethealth <> "full")
{
If (sacrifice and Slot(4)) {
Cast(4)
TargetStatus()
}
If (Slot(5)) {
Cast(5)
}
TargetStatus()
Message()
}

; Ironskin
t := A_TickCount - last_ironskin
If (ironskin > -1 and t > ironskin) {
Sleep 500
Cast(6)
last_ironskin := A_TickCount
}

; Sword
Unsheath(1)
clicks := 0
unsheath := 0
While (targethealth <> "critical")
{
; When a sword breaks it will keep looping, therefore this safetynet
If (unsheath > 150) {
Unsheath(1)
unsheath := 0
}

Tooltip, Hitting target (clicks: %clicks%), 0, 0
If (special1 and Slot(2)) {
Tooltip, Special one - BOOOM!, 0, 0
Sleep 350
Send {2}
Sleep 50
Click
unsheath := unsheath + 2
} Else If (special2 and Slot(3)) {
Tooltip, Special two - BLAAM!, 0, 0
Sleep 350
Send {3}
Sleep 50
Click
unsheath := unsheath + 2
}
Click
Sleep %delay%
Message()
TargetStatus()
clicks := clicks + 1
unsheath := unsheath + 1
}
}

#Include Misc/Toggle.ahk