The one macro I use more than anything, and thus decided to port over was one of m0nk's early releases of stick.mac. I was just getting into the nitty-gritty of the old Parm system then this rewrite began...it's been a real setback. I've put everything I've worked on into a holding pattern till I can at least figure out what the damn program is expecting me to tell it in the macros to do. Logical command structure seems to have been tossed out the window and replaced with something that is way over my head. I might be able to understand it quickly, but I don't take acid and smoke pot anymore...
That's my rant...now on to my request for assistance...
History: I've edited this here and there and it worked fine for my purposes...stay in range, kick and taunt the MOB so I could AFK for a second during a battle if needed.
Problems now: I'm getting logic problems in the /newif structure. The main issues involve string comparisons, but everything in general related to the new system seems like it's harder than it should be. Some return NULL, some return boolean values, others just return NULL in brackets or comprised of parentheticals and other structural components... Simply put, I just don't get it.
You don't have to rewrite the mac. Just explain to me what the hell I am missing and give an example if that's what time will allow and I might have an epiphony. I copied some of the code structure almost exactly from the few other macros that are currently being upgraded, but it's still not right so maybe I'm not the only one wanting a helping hand! HERLP!
bone
Code: Select all
#turbo
#event EXP "experience!"
#event rageon "has become ENRAGED."
#event rageoff "is no longer enraged"
sub main
/declare Special1 global
/declare Special2 global
/declare SpecialTime1 global
/declare SpecialTime2 global
/declare TimerSpecial1 timer
/declare TimerSpecial2 timer
/declare MaxDistance global
/declare MinDistance global
/declare TooClose global
/declare MobID global
:edit
/varset Special1 Kick
/varset SpecialTime1 60
/varset Special2 Taunt
/varset SpecialTime2 60
:setup
/varset TimerSpecial1 @SpecialTime1
/varset TimerSpecial2 @SpecialTime2
/varset MaxDistance @Param1
/varset MinDistance @Param2
/varset TooClose @Param3
/newif ${String[@MaxDistance].Equal[NULL]} {
/varset MaxDistance 18
/varset MinDistance 10
/varset TooClose 4
}
:mainloop
/doevents
| This part works - loops until character is in combat mode.
/newif ${Me.Combat}==1 /newif $String($(Target{
/varset MobID ${Target.ID}
/delay 1
/call attack
}
/goto :mainloop
/endmacro
sub attack
:attackstart
/echo Attack ${Target.CleanName}
| not working - stays in attack mode even when target clears, doesn't follow target - pretty much just boggles me...
/newif ${String{${Target.ID}.Equal[NULL]} /return
:attackfight
/newif ${String{${Target.Type}.NotEqual[NPC]}} /goto :attackend
/newif ${String{${Char.IsCasting}.NotEqual[TRUE]}} /face fast nolook
/newif ${Bool[${Target}]}!=0 /newif ${Bool[${Char.IsCasting}]}!=0 /newif ${Target.Distance}>=@MaxDistance /keypress FORWARD HOLD
/newif ${Bool[${Target}]}!=0 /newif ${Bool[${Char.IsCasting}]}!=0 /newif ${Target.Distance}<=@MinDistance /keypress FORWARD
/newif ${Bool[${Target}]}!=0 /newif ${Bool[${Char.IsCasting}]}!=0 /newif ${Target.Distance}<@TooClose {
/keypress BACK HOLD
/delay 1
/keypress BACK
}
/doevents
/newif ${Target.ID}!=@MobID /goto :attackend
/newif ${Target.Distance}>100 /goto :attackend
/newif ${String[@Special1].NotEqual[NULL]} /newif @TimerSpecial1==0 /newif ${Bool${Char.IsCasting}}!=1 /newif ${Target.Distance)<=@MaxDistance /goto :attackspecial1
/newif ${String[@Special2].NotEqual[NULL]} /newif @TimerSpecial2==0 /newif ${Bool${Char.IsCasting}}!=1 /newif ${Target.Distance)<=@MaxDistance /goto :attackspecial2
/goto :attackfight
:attackspecial1
/newif ${String[@Special1].Equal[NULL]} /goto :attackfight
/doability "@Special1"
/varset TimerSpecial1 @SpecialTime1
/goto :attackfight
:attackspecial2
/newif ${String[@Special2].Equal[NULL]} /goto :attackfight
/doability "@Special2"
/varset TimerSpecial2 @SpecialTime2
/goto :attackfight
:attackend
/attack off
/keypress FORWARD
/endmacro
/return
sub event_exp
/echo Attack OFF !!!
/newif ${Target.Type}.NotEqual[CORPSE] {
/target id @MobID
/return
}
/attack off
/endmacro
/return
sub event_rageon
/echo Rage On
/attack off
/return
sub event_rageoff
/echo Rage Off
/attack on
/return




