Need Help With a Conversion

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

Buuford
decaying skeleton
decaying skeleton
Posts: 6
Joined: Sun Apr 18, 2004 1:00 am

Need Help With a Conversion

Post by Buuford » Wed Apr 28, 2004 1:32 am

I've attempted to convert to the MQ2Data.... I had posted a few days ago but didn't get a response, so I tried to take a stab at it...if someone would help me I would greatly appreciate it, just to look at it and compare to the old macro that I believe grim jack had made and correct it if you're able to..thanks in advance


|rogue-assist.mac
|Rogue Melee assist macro.
|version 3
#Turbo 30
#Event Enraged "has become ENRAGED"
#Event Offrage "is no longer enraged"

Sub Main
/declare RangeMin global
/declare RangeMax global
/declare FastRange global
/declare Combatstatus global
/declare CastTimer timer
/declare EnrageVar global
/declare DoHeal global
/declare HealItem global
/declare DoDisarm global
|--------------------------------------
|Edit this to change autoheal
/varset DoHeal 0
/varset HealItem "Brigand's Chestguard"
|Edit this to chang auto disarm
/varset DoDisarm 0
|---------------------------------------
/varset RangeMin @Param0
/varset RangeMax @Param1
/varset FastRange @Param2
/varset Combatstatus 0
/varset EnrageVar 0
:Mainloop
/call Combatcheck
/if (@Combatstatus==1) /call RangeSub
/if (@Combatstatus==1) /call Checkbehind
/if (@Combatstatus==1) /call Evadeit
/if (@Combatstatus==1) /call Disarmit
/if (@Combatstatus==1) /call Checkbehind
/if (@Combatstatus==0) /call Healthcheck
/doevents
/goto :Mainloop
/return


Sub Healthcheck
/if (@DoHeal==0) /return
/if (${character.casting}) /return
/if (${character.ismoving}) /return
/if (${character.PctHPs}<90) {
/if (!${Me.Combat}) {
/if (!${Target.ID}) {
/delay 1s
/cast item "@HealItem"
}
}
}
/return



Sub Checkbehind
/if n $distance($calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10))<8 {
/if (@Combatstatus==1) /call Backstabit
}
/return

Sub Disarmit
/if (@DoDisarm==0) /return
/if (${Me.AbilityReady[Disarm]}) {
/doability "Disarm"
}
/return

Sub Evadeit
/if (${Me.AbilityReady[Hide]}) {
/if (@Combatstatus==1) {
/attack off
/doability "Hide"
/if (@EnrageVar!=1) /attack
}
}
/return


Sub Backstabit
/if (${Me.AbilityReady[Backstab]}) {
/if (${Target.ID}) {
/face nolook fast
/delay 2
/doability "Backstab"
}
}
/return

Sub Combatcheck
/if (@EnrageVar==1) {
/if (${Target.ID}) {
/return
} else {
/varset EnrageVar 0
/varset Combatstatus 0
}
}
/if (!${Target.ID}) {
/varset Combatstatus 0
/if (${Me.Combat}) {
/attack off
}
/return

}
/if (${Target.ID}) {
/if (${Me.Combat}) {
/varset Combatstatus 1
/return
}
}
/varset Combatstatus 0
/return



Sub Rangesub
/stand
/face nolook fast
/if (${Target.Distance}>=@FastRange) /call Fastmove
/if (${Target.Distance}>@RangeMax) {
/keypress forward hold
}
/if (${Target.Distance}<@RangeMin) {
/keypress back hold
}
/return


Sub Event_Enraged
/if (${Target.ID}) {
/varset EnrageVar 1
/attack off
}
/return

Sub Fastmove
:fastmoveloop
/if (!${Target.ID}) {
/varset Combatstatus 0
/keypress forward hold
/if (${Me.Combat}) {
/attack off
/return
}
}
/stand
/face nolook fast
/if (${Target.Distance}>@FastRange) {
/keypress forward hold
/attack off
}
/if (${Target.Distance}<=@FastRange) {
/if (@Combatstatus==1) {
/if (@EnrageVar==0) {
/attack on
}
}
/keypress back hold
/return
}
/goto :fastmoveloop
/return


Sub Event_Offrage
/if (${Target.ID}) {
/varset EnrageVar 0
/attack
}
}
/return