Page 1 of 1
Ranger Bot, PoFire Tables
Posted: Sat Oct 30, 2004 2:57 pm
by WickedMetalHead
This is my first macro, its function is to let me quad box a ranger at pofire tables without me having to mess with him. It needs to keep his Haste clicky up and also his self buffs. It needs to assist the mt (i want to pass it when u type /macro) and fire arrows.
this is what i got
FireArch.mac
Code: Select all
Sub Main (MAss)
:loop
/if (${Me.Buff["Captain Nalots Quickening"].Duration} == NULL) {
/cast item "Eyepatch of Plunder"
/delay 5s
}
/if (${Me.Buff["Greater Wolf Form"].Duration} == NULL) {
/cast "Greater Wolf Form"
/delay 5s
}
/if (${Me.Buff["Eagle Eye"].Duration} == NULL) {
/cast "Eagle Eye"
/delay 5s
}
/if (${Me.Buff["Protection of the Wild"].Duration} == NULL) {
/cast "Protection of the Wild"
/delay 5s
}
/if (${Me.Buff["Mask of the Stalker"].Duration} == NULL) {
/cast "Mask of the Stalker"
/delay 5s
}
/assist MAss
/if (${Target.Distance}>30 && ${Me.RangedReady}) {
/face
/ranged
}
/goto :loop
/return
I know the buff routine works, Have not had a chance to try it with the MAss added or the autoarchery routine. I was wondering if there was a better way to do any of this or any suggestions /errors someone might see. Thanks in Advance.
~Wicked
Posted: Sat Oct 30, 2004 3:57 pm
by blueninja
That's going to spam /assist a lot. I'd put some code in there to only assist every x seconds and only when mt is within a certain radius from you and there are mobs within some radius too.
Posted: Sat Oct 30, 2004 4:22 pm
by WickedMetalHead
yea i was thinking about doing that. the #event things are slightly confusing but would something like this work.
Code: Select all
#Event exp "#*#experience!#*#"
#Event NoTarget "#*#No target#*#"
Sub Main (MAss)
:loop
/if (${Me.Buff["Captain Nalots Quickening"].Duration} == NULL) {
/cast item "Eyepatch of Plunder"
/delay 5s
}
/if (${Me.Buff["Greater Wolf Form"].Duration} == NULL) {
/cast "Greater Wolf Form"
/delay 5s
}
/if (${Me.Buff["Eagle Eye"].Duration} == NULL) {
/cast "Eagle Eye"
/delay 5s
}
/if (${Me.Buff["Protection of the Wild"].Duration} == NULL) {
/cast "Protection of the Wild"
/delay 5s
}
/if (${Me.Buff["Mask of the Stalker"].Duration} == NULL) {
/cast "Mask of the Stalker"
/delay 5s
}
/if (${Target.Distance}>30 && ${Me.RangedReady}) {
/face
/ranged
}
/goto :loop
/return
|======================
Sub Event_exp
/assist MAss
/return
|======================
Sub Event_NoTarget
/assist MAss
/return
And i used a paramter for the /macro PoFireTableKiter will assign that to MAss and the /assist will acutally be /assist PoFireTableKiter.
correct?
~Wicked
Posted: Sat Oct 30, 2004 4:50 pm
by blueninja
Actually it would be a lot easier to just check ${Target.ID}. It's 0 if you don't have a target.
Posted: Sat Oct 30, 2004 4:53 pm
by blueninja
WickedMetalHead wrote:And i used a paramter for the /macro PoFireTableKiter will assign that to MAss and the /assist will acutally be /assist PoFireTableKiter.
correct?
If you run the macro like "/macro mymacro joewarrior" it would assign joewarrior to the variable MAss, yes. You need to put it in ${} to read it though. /assist ${MAss} ...
Posted: Sat Oct 30, 2004 4:56 pm
by WickedMetalHead
ok thank you. and the target.ID would go like this?
Code: Select all
Sub Main (MAss)
:loop
/if (${Me.Buff["Captain Nalots Quickening"].Duration} == NULL) {
/cast item "Eyepatch of Plunder"
/delay 5s
}
/if (${Me.Buff["Greater Wolf Form"].Duration} == NULL) {
/cast "Greater Wolf Form"
/delay 5s
}
/if (${Me.Buff["Eagle Eye"].Duration} == NULL) {
/cast "Eagle Eye"
/delay 5s
}
/if (${Me.Buff["Protection of the Wild"].Duration} == NULL) {
/cast "Protection of the Wild"
/delay 5s
}
/if (${Me.Buff["Mask of the Stalker"].Duration} == NULL) {
/cast "Mask of the Stalker"
/delay 5s
}
/if (${Target.ID}==0) {
/assist ${MAss}
}
/if (${Target.Distance}>30 && ${Me.RangedReady}) {
/face
/ranged
}
/goto :loop
/return
Posted: Sat Oct 30, 2004 7:28 pm
by WickedMetalHead
i cahnged the
Code: Select all
/if (${Target.ID}==0) {
/assist ${MAss}
}
to
Code: Select all
/if (${Target.ID}==NULL) {
/keypress f8
}
when i entered the above code and typed /mac firearch.mac SoandSo, it said there was no Subroutine Main. I'm boxing him out of a grp and iirc u have to be grped for a /asisst so i used the /keypress f8.
any idea why it says there is no subroutine?
Posted: Sat Oct 30, 2004 7:41 pm
by blueninja
You can assist out of group. Also, you can remove the == from the target id thing, works with just /if (${Target.ID}) since 0 means false. Same thing with your buff checks. Not sure about the main thing, probably something that's not parsed correctly, sometimes it can be a little picky about extra whitespaces and stuff. Try removing the whitespace between Main and () ..
Posted: Sun Oct 31, 2004 12:31 pm
by Night Hawk
WickedMetalHead wrote:i cahnged the
Code: Select all
/if (${Target.ID}==0) {
/assist ${MAss}
}
to
Code: Select all
/if (${Target.ID}==NULL) {
/keypress f8
}
when i entered the above code and typed /mac firearch.mac SoandSo, it said there was no Subroutine Main. I'm boxing him out of a grp and iirc u have to be grped for a /asisst so i used the /keypress f8.
any idea why it says there is no subroutine?
Just use /if (!${Me.Target.ID})
Posted: Thu Nov 04, 2004 1:53 pm
by Chill
Hey, a couple basic thoughts I would suggest for this:
1) Buff before or after a fight, shortly before the buffs fade.
2) Use a spell casting includes to take care of interrupts, fizzles, waiting for the cast, etc. SpellCast.inc and Spell_routines.inc are both in the snippets section and seem to work well.
Those 2 changes would give you:
Code: Select all
#define MAX_BOW_RANGE 300
#include Spell_Routines.inc
Sub Main (MAss)
/declare BuffTime int outer 20
:loop
/if (!${Target.ID}) {
/if (${Me.Buff["Captain Nalots Quickening"].Duration} < ${BuffTime}) /call cast item "Eyepatch of Plunder"
/if (${Me.Buff["Greater Wolf Form"].Duration} < ${BuffTime}) /call cast "Greater Wolf Form"
/if (${Me.Buff["Eagle Eye"].Duration} < ${BuffTime}) /call cast "Eagle Eye"
/if (${Me.Buff["Protection of the Wild"].Duration} =< ${BuffTime}) /call cast "Protection of the Wild"
/if (${Me.Buff["Mask of the Stalker"].Duration} < ${BuffTime}) /call cast "Mask of the Stalker"
}
/if (!${Target.ID}) /assist ${MAss}
/if (${Me.RangedReady} && ${Target.Distance}>30 && ${Target.Distance}<MAX_BOW_RANGE) {
/face
/ranged
}
/goto :loop
/return
Now I would probably go on to at least add nukes and jolt:
Code: Select all
/if (${Me.SpellReady["SomeColdNuke"]} && ${Me.PctMana}>20) /call cast "SomeColdNuke"
/if (${Me.TargetOfTarget.ID}==${Me.ID}) /call cast "Jolt"
but you might also want to add in code for backup snare:
Code: Select all
/if (${Target.Speed}>30) /call cast "Ensnare"
I'm sure there is still more you could add (spot heals if the kiter falls below some %, buffs for group members, looting, etc.) but these were just some basic additions that came to mind.
IArrow
Posted: Thu Nov 04, 2004 3:33 pm
by ColdFusion
Code: Select all
#turbo
#event CannotSee "You cannot see your target."
#event EchoAutoFire "[MQ2] *FIRE"
#event TellAutoFire "#1# tells you, '*FIRE'"
#event TellSnare "#1# tells you, '*SNARE'"
Sub Main
/declare index int outer
/declare ZoneID int outer
/declare TargetID int outer
/declare PrevTarget int outer
/declare FacingDegrees float outer
/echo Starting: ${Macro.Name} @ ${Time.Time24}
/varset ZoneID ${Zone.ID}
/varset TargetID -1
:Loop
/doevent EchoAutoFire
/doevent TellAutoFire
/if ( ${Me.Stunned} || ${Me.Ducking} || ${Me.Casting.ID}!=0 ) /goto :Loop
/if ( ${Me.Moving}==FALSE && ${Me.Speed}==0 && ${Me.Standing} ) {
/doevent TellSnare
/if ( ${Me.Buff[Frostreaver's Blessing].Duration} < 15 ) {
/cast item "Ring of Dain Frostreaver IV"
/delay 3
}
/if ( ${Me.Buff[Captain Nalots Quickening].Duration} < 10 ) {
/delay 1
/cast item "Eyepatch of Plunder"
/delay 2
}
/for index 1 to 20
/if ( ${Me.CurrentMana}>600 && ${Me.Buff[${index}].Spell.TargetType.Find[Self]}==1 && ${Me.Buff[${index}].Duration}<=20 && ${Me.SpellReady[${Me.Buff[${index}].Spell}]} ) /cast "${Me.Buff[${index}].Spell}"
/next index
/if ( ${Me.AbilityReady[Forage]} ) {
/autoinven
/delay 1
/do "Forage"
/delay 4
/autoinventory
/delay 4
/autoinventory
}
}
/if (${ZoneID}!=${Zone.ID}) {
/varset TargetID -1
/varset ZoneID ${Zone.ID}
}
/if ( ${Me.Standing}==FALSE || ${Target.ID}==${Me.ID} ) {
/varset TargetID -1
/goto :Loop
}
/if ( ${Target.Distance}<=30 || ${Target.Distance}>=390 ) /goto :Loop
/if ( ${Target.LineOfSight}==FALSE ) /goto :Loop
/if ( ${Me.Stunned}==TRUE || ${Me.Casting.ID}!=0 ) /goto :Loop
/if ( ${Target.ID}!=${TargetID} || ${Target.ID}==NULL ) /goto :Loop
/varset FacingDegrees ${Math.Calc[ ${Me.Heading.Degrees} - ${Target.HeadingTo.Degrees} ]}
/if ( ${FacingDegrees} > 180 ) /varset FacingDegrees ${Math.Calc[ ${FacingDegrees} - 180 ])
/if ( ${FacingDegrees} < -180 ) /varset FacingDegrees ${Math.Calc[ ${FacingDegrees} + 180 ])
/if ( ${FacingDegrees} >= 54 || ${FacingDegrees} <= -54 ) /goto :Loop
/if ( ${Target.ID}==${TargetID} ) /ranged
/doevent CannotSee
/delay 0
/goto :Loop
/return
Sub Event_CannotSee(fulltext)
/popup ${FacingDegrees}
/face fast
/delay 1
/return
Sub Event_EchoAutoFire(fulltext)
/popup New Target: ${Target.Name}
/varset TargetID ${Target.ID}
/return
Sub Event_TellAutoFire(fulltext,Assist)
/e ${Assist} ${NearestSpawn[ ${Assist} PC ].Distance}
/assist ${NearestSpawn[${Assist} pc]}
/delay 2
/popup Assisting on: ${Target.Name}
/varset TargetID ${Target.ID}
/face
/t ${Assist} Assisting you with [ ${Target} ]
/return
Sub Event_TellSnare(fulltext,Assist)
/varset PrevTarget ${Target.ID}
/assist ${NearestSpawn[${Assist} pc]}
/delay 3
/popup Entraping: ${Target}
/alt act 219
/t ${Assist} Snaring [ ${Target} ]
/timed 180 /target id ${PrevTarget}
/return
this code i use for my ranger friend...
he will auto rebuff any self only spells he has mem'd
you'll proby have to adjust the auto-clicks
EDIT ADD: also, for setting MA's i found it best to use current target when macro starts, vs parameter /shrug