- Joined
- Apr 22, 2006
- Messages
- 275
- Reaction score
- 0
- Points
- 16
I am looking for some macro help with a targetting macro I am making.
Basically I want to skip mobs that I can not hit and bypass mobs that have damaged me with DS.
I would like to reduce the size of the subs. When I try incrementing and adding /next type lines I keep getting errors. I would like to be able to /declare level range at the beginning of mac.
I would like to be able to /declare TargetNPC# type at the beginning of the macro (ie: Druid/Drake/#BigBoy)
The delay (adjustable) at the end of each target sub is to allow me time to damage the mob. If no damage I would move on to the next npc type of target. Being able to /declare the HP% and delay at the beginning of the mac would be great also.
I know there are lots of other thing I could do with a targeting mac but this is also a training mac for me to see how the loop/declare stuff works in a simple mac.
Basically I want to skip mobs that I can not hit and bypass mobs that have damaged me with DS.
I would like to reduce the size of the subs. When I try incrementing and adding /next type lines I keep getting errors. I would like to be able to /declare level range at the beginning of mac.
I would like to be able to /declare TargetNPC# type at the beginning of the macro (ie: Druid/Drake/#BigBoy)
The delay (adjustable) at the end of each target sub is to allow me time to damage the mob. If no damage I would move on to the next npc type of target. Being able to /declare the HP% and delay at the beginning of the mac would be great also.
I know there are lots of other thing I could do with a targeting mac but this is also a training mac for me to see how the loop/declare stuff works in a simple mac.
Code:
turbo #40
#Event DS "YOU are burned!"
#Event DS "YOU are tormented!"
Sub Main
/attack on
/alert clear 1
:Target
/call TargetAll
/delay 1
/doevents
/if (!${Target.ID}) /call TargetNPC1
/delay 1
/if (!${Target.ID}) /call TargetNPC2
/delay 1
/if (!${Target.ID}) /call TargetNPC3
/delay 1
/if (!${Target.ID}) /call TargetNPC4
/delay 1
/if (!${Target.ID}) /call TargetNPC5
/delay 5
/if (!${Target.ID}) /goto :Target
:loop
/doevents
/if (${Spawn[gm].ID}) {
/gsay later
/clear
/clean
/endmac
}
:hold
/if (${SpawnCount[PC]}>6) {
/echo Other in zone
/goto :hold
}
:Attack
/if (${Me.PctHPs}<50) {
/attack off
/warp wp safe
/goto :hold
}
/stand
/squelch /attack on
/if (${Target.ID}) /goto :Loop
/goto :Target
Sub TargetAll
/if (!${Target.ID}) /tar npc 75 noalert 1
/if (!${Target.ID}) /tar npc 74 noalert 1
/if (!${Target.ID}) /tar npc 73 noalert 1
/if (!${Target.ID}) /tar npc 72 noalert 1
/if (!${Target.ID}) /tar npc 71 noalert 1
/if (!${Target.ID}) /tar npc 70 noalert 1
/if (!${Target.ID}) /tar npc 69 noalert 1
/if (!${Target.ID}) /tar npc 68 noalert 1
/if (!${Target.ID}) /tar npc 67 noalert 1
/if (!${Target.ID}) /tar npc 66 noalert 1
/delay 2
/if ${Target.PctHPs}>=98 /target clear
/return
Sub TargetNPC1
/if (!${Target.ID}) /tar npc 75 cleric noalert 1
/if (!${Target.ID}) /tar npc 74 cleric noalert 1
/if (!${Target.ID}) /tar npc 73 cleric noalert 1
/if (!${Target.ID}) /tar npc 72 cleric noalert 1
/if (!${Target.ID}) /tar npc 71 cleric noalert 1
/if (!${Target.ID}) /tar npc 70 cleric noalert 1
/if (!${Target.ID}) /tar npc 69 cleric noalert 1
/if (!${Target.ID}) /tar npc 68 cleric noalert 1
/if (!${Target.ID}) /tar npc 67 cleric noalert 1
/if (!${Target.ID}) /tar npc 66 cleric noalert 1
/delay 2
/if ${Target.PctHPs}>=98 /target clear
/return
Sub TargetNPC2
/if (!${Target.ID}) /tar npc 75 druid noalert 1
/if (!${Target.ID}) /tar npc 74 druid noalert 1
/if (!${Target.ID}) /tar npc 73 druid noalert 1
/if (!${Target.ID}) /tar npc 72 druid noalert 1
/if (!${Target.ID}) /tar npc 71 druid noalert 1
/if (!${Target.ID}) /tar npc 70 druid noalert 1
/if (!${Target.ID}) /tar npc 69 druid noalert 1
/if (!${Target.ID}) /tar npc 68 druid noalert 1
/if (!${Target.ID}) /tar npc 67 druid noalert 1
/if (!${Target.ID}) /tar npc 66 druid noalert 1
/delay 2
/if ${Target.PctHPs}>=98 /target clear
/return
Sub TargetNPC3
/if (!${Target.ID}) /tar npc 75 Wizard noalert 1
/if (!${Target.ID}) /tar npc 74 Wizard noalert 1
/if (!${Target.ID}) /tar npc 73 Wizard noalert 1
/if (!${Target.ID}) /tar npc 72 Wizard noalert 1
/if (!${Target.ID}) /tar npc 71 Wizard noalert 1
/if (!${Target.ID}) /tar npc 70 Wizard noalert 1
/if (!${Target.ID}) /tar npc 69 Wizard noalert 1
/if (!${Target.ID}) /tar npc 68 Wizard noalert 1
/if (!${Target.ID}) /tar npc 67 Wizard noalert 1
/if (!${Target.ID}) /tar npc 66 Wizard noalert 1
/delay 2
/if ${Target.PctHPs}>=98 /target clear
/return
Sub TargetNPC4
/if (!${Target.ID}) /tar npc 75 Shaman noalert 1
/if (!${Target.ID}) /tar npc 74 Shaman noalert 1
/if (!${Target.ID}) /tar npc 73 Shaman noalert 1
/if (!${Target.ID}) /tar npc 72 Shaman noalert 1
/if (!${Target.ID}) /tar npc 71 Shaman noalert 1
/if (!${Target.ID}) /tar npc 70 Shaman noalert 1
/if (!${Target.ID}) /tar npc 69 Shaman noalert 1
/if (!${Target.ID}) /tar npc 68 Shaman noalert 1
/if (!${Target.ID}) /tar npc 67 Shaman noalert 1
/if (!${Target.ID}) /tar npc 66 Shaman noalert 1
/delay 2
/if ${Target.PctHPs}>=98 /target clear
/return
Sub TargetNPC5
/if (!${Target.ID}) /tar npc 75 Magician noalert 1
/if (!${Target.ID}) /tar npc 74 Magician noalert 1
/if (!${Target.ID}) /tar npc 73 Magician noalert 1
/if (!${Target.ID}) /tar npc 72 Magician noalert 1
/if (!${Target.ID}) /tar npc 71 Magician noalert 1
/if (!${Target.ID}) /tar npc 70 Magician noalert 1
/if (!${Target.ID}) /tar npc 69 Magician noalert 1
/if (!${Target.ID}) /tar npc 68 Magician noalert 1
/if (!${Target.ID}) /tar npc 67 Magician noalert 1
/if (!${Target.ID}) /tar npc 66 Magician noalert 1
/delay 2
/if ${Target.PctHPs}>=98 /target clear
/return
Sub Event_DS
/squelch /alert add 1 id ${Target.ID}
/squelch /target clear
/doevents flush
/delay 1s
/return