/ guilds

Got a cool macro idea? Wanna request a macro? Here is the place for you!

Moderator: MacroQuest Developers

monkeyboy
decaying skeleton
decaying skeleton
Posts: 1
Joined: Sun Jan 18, 2004 8:36 am

/ guilds

Post by monkeyboy » Sun Jan 18, 2004 8:40 am

i would like a macro to count guild members in a zone..

/ guilds

<guild 1> (8)
<guild 2> (6)
<guild 3> (1)

maybe a total (15)
to quickly get a overview of witch guild is present in the zone.

User avatar
blueninja
a grimling bloodguard
a grimling bloodguard
Posts: 541
Joined: Thu Aug 28, 2003 7:03 am
Location: Göteborg, Sweden

Post by blueninja » Mon Jan 19, 2004 12:23 pm

Realized that I wanted this too so here's somthing I put together, not pretty nor well tested but try it out.

Code: Select all

| guilds.mac - lists guilds in zone by blueninja
#turbo
Sub Main
   /declare curid local
   /declare previd local
   /declare guilds array2
   /declare guildcount global
   /varset curid 0
   /varset guildcount 0

   :spawnloop
       /varset previd @curid
       /varset curid $searchspawn(pc,id:@curid,next)
       /if n @curid==@previd /goto :breakout
       /if n @curid==0 /goto :breakout
       /call AddGuild "$spawn(@curid,guild)" 
   /goto :spawnloop

   :breakout
|searchspawn won't find you so do that manually
   /call AddGuild "$spawn($char(id),guild)" 
   /call ShowGuilds
/return

Sub ShowGuilds
    /declare counter local
    /for counter 0 to $calc(@guildcount-1)
        /echo @guilds(@counter,0) has $int(@guilds(@counter,1))
    /next counter
/return

Sub AddGuild(guildname)
    /if "@guildname"==NULL /return
    /declare counter local
    /for counter 0 to @guildcount
    :searchloop
        /if "@guilds(@counter,0)"=="@guildname" {
            /varadd guilds(@counter,1) 1
            /return
        }
    /next counter
    /varset guilds(@guildcount,0) "@guildname"
    /varset guilds(@guildcount,1) 1
    /varadd guildcount 1
/return

nitro
decaying skeleton
decaying skeleton
Posts: 5
Joined: Fri Jul 16, 2004 10:10 pm

How could I modify this?

Post by nitro » Wed Jul 21, 2004 5:41 am

I think this macro is fairly close to what i'm looking for... But i can't figure out how to modify it to what I want... I'm on a pvp server and I would like to camp or /quit out if "This PK Guild" or "This other PK Guild" is in zone... Can anyone help point me to what needs to be modified to check if $Spawn[PC, "PK guild"]?