A forum for macro code snippets to be used in writing other macros. Post routines or .inc files here only, completed macros go to the Macro Depot. MQ2Data format only!
Moderator: MacroQuest Developers
-
Neolesh
- a hill giant

- Posts: 231
- Joined: Mon Aug 23, 2004 11:15 am
Post
by Neolesh » Tue Nov 30, 2004 1:52 am
Just a random thought I had so I took a moment and came up with this.. Enjoy
Code: Select all
Sub Whatever
/declare r int local
/declare RaidY float local
/declare RaidX float local
/declare RaidCount int local
/for r ${Raid.Members} downto 0
/if (${Raid.Member[${r}].Spawn.ID} != NULL && ${Raid.Member[${r}].Spawn.Type.NotEqual[Corpse]}) {
/varset RaidY ${Math.Calc[${RaidY}+${Raid.Member[${r}].Y}]}
/varset RaidX ${Math.Calc[${RaidX}+${Raid.Member[${r}].X}]}
/varset RaidCount ${Math.Calc[${RaidCount}+1]}
}
/next r
/varset RaidY ${Math.Calc[${RaidY}/${RaidCount}]}
/varset RaidX ${Math.Calc[${RaidX}/${RaidCount}]}
/echo ${RaidY}, ${RaidX}
:moveloop
/face nolook loc ${RaidY}, ${RaidX}
/if (${Math.Distance[${RaidY}, ${RaidX}]}>12) {
/keypress forward hold
} else {
/keypress forward
/return
}
/goto :moveloop
/return
-
Night Hawk
- a grimling bloodguard

- Posts: 590
- Joined: Fri Aug 13, 2004 4:56 pm
Post
by Night Hawk » Tue Nov 30, 2004 11:19 am
bored are we?
-
Neolesh
- a hill giant

- Posts: 231
- Joined: Mon Aug 23, 2004 11:15 am
Post
by Neolesh » Tue Nov 30, 2004 12:36 pm
That, and I really wanted to hit 100 posts!
-
mqnewbie
- a hill giant

- Posts: 193
- Joined: Sat May 22, 2004 1:29 am
Post
by mqnewbie » Tue Nov 30, 2004 1:31 pm
Well assuming it does move you to the aprox. center of the folks in the raid reliably it would be a good snippet to run just before auto buffing something with MGB.
-
Neolesh
- a hill giant

- Posts: 231
- Joined: Mon Aug 23, 2004 11:15 am
Post
by Neolesh » Tue Nov 30, 2004 4:04 pm
I thought of several scenerios where it would be useful... I personaly wrote it as a check that occurs every 20 seconds and if my bot isn't at least 40 units from the center of the raid then my bot will move to the center.
a few things might throw it off though.. if you have the raid in 2 different area's i.e. -middle of CoH or if you have 2 or 3 pullers that are a good distance from the raid it will throw off the values but you could put in extra checks for monks / sks or whatever you don't want to count.