Guild Magus Macro

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

MrOuija_AK
orc pawn
orc pawn
Posts: 23
Joined: Mon Sep 13, 2004 9:16 pm

Guild Magus Macro

Post by MrOuija_AK » Tue Oct 12, 2004 6:32 pm

Update 10/17/04:

Features:
Immune to AE Food/Water/Mod Rods
Keeps his self mana regen buffs up and auto Harvests as needed.
Sits after any casting.
Level checks for all ports. (If you ran the macro on a lower level wizard and asked him for a port to a high level zone it would get stuck in an infinite loop)
States when he's hungry, thirsty or running low on fragments.
Accepts trades (food, water, fragments)
Added in <guild2> to show those who wanted extra guilds to have access how simple it is.

Coming Soon:
Help option.
Friendlier and more verbose bot.
Mana check.

This is my first macro and it's fairly simple, but someone out there hopefully will find it useful =).

The purpose of the macro is to setup a wizard bot as a magus that only responds to members of the guild you specify. I have mine setup outside of the Time dial where most guildmates are bound. He basically responds to any punt request they throw at him. TL to GD plz. punt Natimbi. bind. etc. etc. all work fine.

This bot keeps Staff of the Four click and Familiar up at all times and will cast Harvest if it's up and he's under 90% mana. I decided against using a mount due to the food usage, and instead just automatically sits after any cast.

Code: Select all

#include spell_routines.inc
#chat tell
#define <guild> "Insert Guildname Here"
#define <guild2> "Insert Guildname Here"

Sub Main
:loop
/doevents Chat
/delay 2s
/if (${Me.SpellReady[Harvest]} && ${Me.PctMana}<92) {
     /call Cast "Harvest" gem8
     /delay 2s
     /sit
}
/if (!${Me.Buff[Barrier of Force].ID}) {
     /call Cast "Staff of the Four" item
     /delay 2s
     /sit
}
/if (!${Me.Buff[Familiar].ID}) {
     /call Cast "Familiar" gem6
     /delay 2s
     /pet get lost
     /sit
}
/if (${Window[Tradewnd].Open}) {
     /notify Tradewnd TRDW_Trade_Button leftmouseup
     /msg ${Target} Thanks!
}
/goto :loop

Sub Event_Chat(ChatType,Sender,ChatText)
/target pc ${Sender}
/if (${Cursor.ID}) /autoinv
/if (${Target.Guild.Equal[<guild>]} || ${Target.Guild.Equal[<guild2>]}) {
     /if (${FindItemCount[Small Portal Fragments]}<20) {
	  /reply I'm getting low on Portal Fragments. Please let someone know, or get me some 

from a Magus.
          /delay 2s
     }
     /if (${Me.Thirst}<1000) {
	  /reply I'm very thirsty. Could you please give me some water before you leave?
          /delay 2s
     }
     /if (${Me.Hunger}<1000) {
	  /reply I'm starving. Could you please give me some food before you leave?
          /delay2s
     }
     /if (${FindItemCount[Small Portal Fragments]}>0) {
          /if (${ChatText.Find[Dread]} || ${ChatText.Find[DL]}) {
	       /if (${Me.Level}>=39) {
  	            /reply You are being ported to the Dreadlands.
                    /call Cast "Translocate: Combine" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Fay]}) {
	       /if (${Me.Level}>=39) {
	       /reply You are being ported to Greater Faydark.
               /call Cast "Translocate: Fay" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Grim]}) {
	       /if (${Me.Level}>=39) {
	       /reply You are being ported to Grimling Forest.
               /call Cast "Translocate: Grimling" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Nex]}) {
	       /if (${Me.Level}>=39) {
	       /reply You are being ported to the Nexus.
               /call Cast "Translocate: Nexus" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[North]}) {
	       /if (${Me.Level}>=39) {
	       /reply You are being ported to North Karana.
               /call Cast "Translocate: North" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Stonebrunt]}) {
	       /if (${Me.Level}>=39) {
	       /reply You are being ported to Stonebrunt Mountains.
               /call Cast "Translocate: Stonebrunt" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Tox]}) {
	       /if (${Me.Level}>=39) {
	       /reply You are being ported to Toxxulia Forest.
               /call Cast "Translocate: Tox" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Cazic]}) {
	       /if (${Me.Level}>=44) {
	       /reply You are being ported to Cazic Thule.
               /call Cast "Translocate: Cazic" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Common]} || ${ChatText.Find[WC]}) {
	       /if (${Me.Level}>=44) {
	       /reply You are being ported to West Commonlands.
               /call Cast "Translocate: Common" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Nek]}) {
	       /if (${Me.Level}>=44) {
	       /reply You are being ported to Nektulos Forest.
               /call Cast "Translocate: Nek" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Ro]}) {
	       /if (${Me.Level}>=44) {
     	       /reply You are being ported to North Ro.
               /call Cast "Translocate: Ro" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Twilight]} || ${ChatText.Find[Sea]}) {
	       /if (${Me.Level}>=44) {
	       /reply You are being ported to Twilight Sea.
               /call Cast "Translocate: Twilight" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[West Karana]}) {
	       /if (${Me.Level}>=44) {
   	       /reply You are being ported to West Karana.
               /call Cast "Translocate: West" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Scar]} || ${ChatText.Find[Cobalt]}) {
	       /if (${Me.Level}>=49) {
	       /reply You are being ported to Cobalt Scar.
               /call Cast "Translocate: Cobalt Scar" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Dawnshroud]} || ${ChatText.Find[DSP]}) {
	       /if (${Me.Level}>=49) {
	       /reply You are being ported to Dawnshroud Peaks.
               /call Cast "Translocate: Dawnshroud" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Divide]} || ${ChatText.Find[GD]}) {
	       /if (${Me.Level}>=49) {
	       /reply You are being ported to the Great Divide.
               /call Cast "Translocate: Great Divide" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Iceclad]} || ${ChatText.Find[IC]}) {
	       /if (${Me.Level}>=49) {
	       /reply You are being ported to Iceclad Ocean.
               /call Cast "Translocate: Iceclad" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Knowledge]} || ${ChatText.Find[POK]}) {
	       /if (${Me.Level}>=49) {
	       /reply You are being ported to the Plane of Knowledge. God you're fucking lazy.
               /call Cast "Translocate: Knowledge" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Wakening]}) {
	       /if (${Me.Level}>=49) {
	       /reply You are being ported to the Wakening Lands.
               /call Cast "Translocate: Wakening Lands" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
	  /if (${ChatText.Find[Bind]}) {
	       /if (${Me.Level}>=50) {
	       /reply You are being ported to your Bind Point.
               /call Cast "Translocate" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
	  /if (${ChatText.Find[Group Bind]}) {
	       /if (${Me.Level}>=52) {
	       /reply You are being ported to your Bind Point.
               /call Cast "Translocate: Group" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Natimbi]}) {
	       /if (${Me.Level}>=57) {
	       /reply You are being ported to Natimbi.
               /call Cast "Translocate: Natimbi" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Blood]}) {
	       /if (${Me.Level}>=58) {
	       /reply You are being ported to the Bloodfields.
               /call Cast "Translocate: Bloodfields" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[Barindu]}) {
	       /if (${Me.Level}>=60) {
	       /reply You are being ported to Barindu.
               /call Cast "Translocate: Barindu" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
          /if (${ChatText.Find[wos]} || ${ChatText.Find[wall]} || ${ChatText.Find[slaughter]}) {
	       /if (${Me.Level}>=67) {
	       /reply You are being ported to the Wall of Slaughter.
               /call Cast "Translocate: Slaughter" gem7
               } else {
                    /reply I'm sorry I'm not high enough level to cast that spell.
               }
          }
     } else {
          /reply I'm all out of fragments. You'll have to get me some more before I can port you.
     }
/sit
}
/return
Last edited by MrOuija_AK on Sun Oct 17, 2004 5:13 pm, edited 2 times in total.

Vayeco Dynn
a ghoul
a ghoul
Posts: 113
Joined: Wed Aug 25, 2004 3:00 am

Post by Vayeco Dynn » Tue Oct 12, 2004 7:23 pm

Cool. Wish I had a high level wizard.

Space-Boy
a hill giant
a hill giant
Posts: 242
Joined: Wed Dec 04, 2002 12:53 pm
Contact:

Post by Space-Boy » Wed Oct 13, 2004 12:32 am

i dont even have a wizard but this macro makes me smile! copying and sending to a guild wizzy =)
You have gotten better at Carpal Tunnel! (247)

dgmayor
decaying skeleton
decaying skeleton
Posts: 2
Joined: Thu Sep 23, 2004 4:49 pm

Post by dgmayor » Wed Oct 13, 2004 8:29 am

I like it. Few suggestions.

1)Have it check the level of the wizard, and if it can't cast a TL, have it default to saying something like "i'm sorry, I cannot cast that spell, try another location". My wizard can't cast GoD or OoW TL's because she's only 55. I hardcoded it do to this for now.

2) remove the WL check for Wakening lands. When someone asks for Knowledge, it sees the WL and TL's to PoK, and then tries to TL to Wakening lands.

3) Have a default response for non TL requests by guildies only. So like if someone sends the char a tell, they get no response, but if a Guildie sends a tell that isn't a TL response, the wizard would respond with something like "I will translocate you to anywhere I'm capable, please just ask!"

4) Have a sit check, so it only stands and sits if there is actually a TL taking place. You can send a blank tell and the wiz will stand or sit depending on its current state.


That's all I can think of atm. Great macro though :)

eqaussie
a ghoul
a ghoul
Posts: 124
Joined: Tue Mar 16, 2004 5:58 am

Post by eqaussie » Wed Oct 13, 2004 8:41 am

1)
Have a check in place for Small Portal Fragments too, only a few of the TL spells (ie zones that have a spire - Nexus, Gfay, Combine (DL), Karana) dont require a fragment.

Could put bot in a loop continuing to cast without the fragment.

Maybe it could respond with out of fragments, and accept a trade if given some (by a guildy)

2)
If a guildy sends a tell for help, or where can i go, have it respond with the list of acceptable TL requests too.

Just a few thoughts.

I plan on using, and modifying (read destroying - cause my coding sucks) this macro and implementing it. Will probably try to add Multiple guild requests

There used to be a buffbot macro, before MQ2Data, that i customised to work as a TL bot, perhaps you could check that and convert some of that code for guild checking. (God i miss that macro)
http://www.macroquest2.com/phpBB2/viewtopic.php?t=5113 is link to the buffbot

Shenlon
a ghoul
a ghoul
Posts: 103
Joined: Fri Jul 30, 2004 8:02 am

Post by Shenlon » Wed Oct 13, 2004 2:24 pm

#Event NoFragments "#*#missing required component#*#"

Sub Event_NoFragments
/reply I am all out of portal fragments, if you want a port you will have to give me some.
/return

then right under :loop
/if (${TradeWindow.Open}) /notify TradeWindow.trade leftmouseup

Very rough coding there, but should work fairly well after you get around the pseudo code. Maybe I'll clean it up when I get home.

DryGnome
orc pawn
orc pawn
Posts: 25
Joined: Tue Sep 14, 2004 4:45 pm

Post by DryGnome » Thu Oct 14, 2004 3:00 pm

eqaussie said:
If a guildy sends a tell for help, or where can i go, have it respond with the list of acceptable TL requests too.

Just a few thoughts.

I plan on using, and modifying (read destroying - cause my coding sucks) this macro and implementing it. Will probably try to add Multiple guild requests
Ya.... those two things would be nice cause my 2box wizzy taxis for a few guilds that are cool with me and people often mispell some words so the acceptable thing is nice.

BillyBumbler_01
orc pawn
orc pawn
Posts: 14
Joined: Wed Dec 17, 2003 5:32 pm

Post by BillyBumbler_01 » Thu Oct 14, 2004 4:02 pm

eqaussie wrote:1)
Have a check in place for Small Portal Fragments too, only a few of the TL spells (ie zones that have a spire - Nexus, Gfay, Combine (DL), Karana) dont require a fragment.

Could put bot in a loop continuing to cast without the fragment.

Maybe it could respond with out of fragments, and accept a trade if given some (by a guildy)
t
Or, have it gate to one of the wayfarers camps, buy xx fragments from the magus, and gate back. Assuming the wizard is bound at it's port spot, this shouldn't be that much trouble to implement... wouldn't require much actual pathing.

bloodurst
a lesser mummy
a lesser mummy
Posts: 56
Joined: Wed Sep 01, 2004 4:53 pm
Contact:

Post by bloodurst » Thu Oct 14, 2004 5:39 pm

Nice macro. I like it a lot.

MrOuija_AK
orc pawn
orc pawn
Posts: 23
Joined: Mon Sep 13, 2004 9:16 pm

Post by MrOuija_AK » Sun Oct 17, 2004 5:16 pm

hmm... it sure doesn't like to cut and paste from notepad very well for me. spacings all wacked out.