Help with macro please.

Littleguy

New member
Joined
Jul 19, 2007
Messages
322
Reaction score
0
Points
0
Anyone see anything wrong with this macro. Any input would be appreciated.


#turbo

Sub Main
:mainloop
/if (${SpawnCount[pc]}>9) {
/goto :mainloop
}
/if (${CombatOn}) {
/goto :combat
}
/goto :pull

:pull
/if (${CombatOn}) {
/goto :combat
}
/target npc
/fart
/fart
/fart
/fart
/delay 3s

/goto :mainloop

:combat
/delay 20s
/goto :mainloop


/return


.......

What i want it to do is target a npc and fartaunt if I am out of combat, and target npc if no target. Right now, it will target ect, but it chain does fartaunt. Even while in combat.
 
/if (${CombatOn}) {

wrong syntax use ${Me.Combat}
 
You will run into all kinds of issues with this macro as is. Besides the wrong variable JJ mentioned, you don't have distance limiters or NPC limiters or retry caps in case of invalid target, your delay is arbitrarily 20s which could get you killed depending on what youre doing. You should probably use a PC in range of mob limiter, a PC in range of you limiter instead of the arbitrary "9".. unless you are boxing 9 toons. Really you should use an array.. but that gets more complex.

It would help to know a little more exactly what you are wanting to accomplish and how and in what zone. That said.. here is a rough WAG:

(PS, i have no idea why you only want to fartaunt if more than 9 players are in the zone.. but whatever)

Code:
#turbo 40
 
Sub Main
:mainloop
 
/if (${SpawnCount[npc radius 600]}>0 && !${Me.CombatState.Equal[COMBAT]} && ${SpawnCount[pc]}>9) {
           /target npc
           /fart
           /fart
           /delay 1s
  }
 
/if (${Me.CombatState.Equal[COMBAT]} && ${Target.Distance}<30 && ${Target.Type.Equal[npc]} && !${Me.Combat}) {
                 /attack on
                 }
 
/if (${Target.Type.Equal[corpse]}||${Target.Distance}>600) /target clear
 
/goto :mainloop
 
/return

That should work, but I might have missed a [ { ] } ) ( in there somewhere since I typed it on the fly just now. you had a lot more going through loops than you needed and you have to limit /fartaunt to 600 or it doesnt actually pull the mob. you should probably want another loop in there to calculate if the mob is actually coming to you or not via a distance check, a delay, then another distance check.. and if it isnt closer, to cycle to next closest npc.
 
Last edited:
thanks JJ, Basicly what I am using it for is pulling a specific NPC ( Took the name out so people dont take my camp!) The only real problem was with him still fartaunting while in combat. Thanks again for the input guys!