Check a PC's guild name?

Have a macro idea but not sure where to start? Ask here.

Moderator: MacroQuest Developers

in_training
Craptastic
Posts: 115
Joined: Fri Oct 10, 2003 8:25 am

Check a PC's guild name?

Post by in_training » Tue Sep 07, 2004 9:30 am

Greetins!

I was wondering what the code would be to check someone's guild name? I am trying to make a bot I can leave sitting around that will buff my guild, and people that I have in an ini file only, everyone else, it ignores.

Thanks.
[url=http://www.macroquest2.com/main.php?p=donate]Vote or Die!l[/url]

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Tue Sep 07, 2004 9:47 am

spawn
Members
string Guild
Guild name

string GuildStatus
Guild status (Leader, Officer, Member)

SlimFastForYou
a hill giant
a hill giant
Posts: 174
Joined: Sat Jan 24, 2004 1:38 am

Post by SlimFastForYou » Wed Sep 08, 2004 11:32 am

May or may not work (untested). This should be enough of an example to get you going. Look into ini support yourself (theres plenty of macros that demonstrate it) =p

Code: Select all

#turbo

#include spell_routines.inc

#define <myname> "Your Bot's Name Goes Here In Quotes"

#define <guildname> "Your Guild Name Goes Here In Quotes"

#event Hailed "#1# says, 'Hail, <myname>'"

Sub Event_Hailed(string line,string RequestorName)
      /target pc ${RequestorName}
      /if (!${Target.Guild.Equal["<guildname>"]}) {
            /if (!${Target.Class.Equal["Warrior"]})  {
                /call Cast "Swift Like The Wind"
             }
            /if (!${Target.Class.Equal["Wizard"]}) {
                /tgb
                /call Cast "Koadic's Endless Intellect"
            }
      }
/return

Sub Main
       :MainLoop
         /doevents
        /goto :MainLoop
/return

in_training
Craptastic
Posts: 115
Joined: Fri Oct 10, 2003 8:25 am

Post by in_training » Sun Sep 12, 2004 1:29 pm

Thanks!

works well.
[url=http://www.macroquest2.com/main.php?p=donate]Vote or Die!l[/url]