Page 1 of 9

Approximate Center of your raid?

Posted: Tue Nov 30, 2004 1:52 am
by Neolesh
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

Posted: Tue Nov 30, 2004 11:19 am
by Night Hawk
bored are we?

Posted: Tue Nov 30, 2004 12:36 pm
by Neolesh
That, and I really wanted to hit 100 posts!

Posted: Tue Nov 30, 2004 1:31 pm
by mqnewbie
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.

Posted: Tue Nov 30, 2004 4:04 pm
by Neolesh
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.

Re: Approximate Center of your raid?

Posted: Wed Mar 05, 2025 1:55 pm
by xyilla

Re: Approximate Center of your raid?

Posted: Wed Mar 05, 2025 1:56 pm
by xyilla

Re: Approximate Center of your raid?

Posted: Wed Mar 05, 2025 1:57 pm
by xyilla

Re: Approximate Center of your raid?

Posted: Wed Mar 05, 2025 1:58 pm
by xyilla

Re: Approximate Center of your raid?

Posted: Wed Mar 05, 2025 1:59 pm
by xyilla

Re: Approximate Center of your raid?

Posted: Wed Mar 05, 2025 2:00 pm
by xyilla

Re: Approximate Center of your raid?

Posted: Wed Mar 05, 2025 2:02 pm
by xyilla

Re: Approximate Center of your raid?

Posted: Wed Mar 05, 2025 2:03 pm
by xyilla

Re: Approximate Center of your raid?

Posted: Wed Mar 05, 2025 2:04 pm
by xyilla

Re: Approximate Center of your raid?

Posted: Wed Mar 05, 2025 2:05 pm
by xyilla