Guild Magus Macro

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

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 » Mon Sep 13, 2004 9:25 pm

I had an idea for a macro today, and was wondering if anyone has seen something like this.

I want to be able to leave my wizard alt logged on at the Time dial and allow anyone with my guildtag the ability to send it a tell with a location and recieve a TL. IE

PersonX tells Wizard, 'North Ro'
Wizard sits and mems Translocate: North Ro
Wizard stands.
Targets PersonX.
Casts Translocate: North Ro

I could see two ways of doing this, one with a list of people specified as allowed to get ports. Maybe it could be made to read a guild management dump file for names? Or the otherway having it do a check somehow to see if the person sending the tell is a member of the guild specified in the Macro.

hiipii
a ghoul
a ghoul
Posts: 93
Joined: Sat Jun 19, 2004 5:01 pm

Post by hiipii » Mon Sep 13, 2004 11:38 pm

Code: Select all

#chat tell

sub main
/declare Thingy
:loop
/doevents chat
/delay 1s
/goto :loop

sub Event_Chat(ChatType,Sender,ChatText)
/if (${String[${Me.Guild}].Equal[${Sender.Guild}]}) {
     /memspell Translocate: ${ChatText}
     /delay 6s
     /target ${Sender}
     /cast Translocate: ${ChatText}
   }
/return
prolly wont work but you get the idea.

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

Post by MrOuija_AK » Tue Sep 14, 2004 2:26 am

This is what I have so far. Getting ready to load now and see how it runs. This is my first macro so I expect it to explode the first attempt at running it.

Code: Select all

#include spellcast.inc
#event Port "#1# tells you, '#2#'"
#define <guild> "Insert Guildname Here"

Sub Main
/declare Destination local
:loop
/doevents Port
/delay 2s
/goto :loop

Sub Event_Port(ChatType,Sender,ChatText)
/if (${Sender.Guild.Equal["<guild>"]}) {
     /if (${ChatText.Equal["Barindu"]}) {
          /varset Destination Barindu
	  /goto :memcast }
     /if (${ChatText.Equal["Cazic Thule"]}) {
          /varset Destination Cazic
	  /goto :memcast }
     /if (${ChatText.Equal["Cobalt Scar"]}) {
          /varset Destination Cobalt Scar
	  /goto :memcast }
     /if (${ChatText.Equal["Dreadlands"]}) {
          /varset Destination Combine
	  /goto :memcast }
     /if (${ChatText.Equal["West Commonlands"]}) {
          /varset Destination Common
	  /goto :memcast }
     /if (${ChatText.Equal["Dawnshroud"]}) {
          /varset Destination Dawnshroud
	  /goto :memcast }
     /if (${ChatText.Equal["Greater Faydark"]}) {
          /varset Destination Fay
	  /goto :memcast }
     /if (${ChatText.Equal["Great Divide"]}) {
          /varset Destination Great Divide
	  /goto :memcast }
     /if (${ChatText.Equal["Grimling Forest"]}) {
          /varset Destination Grimling
	  /goto :memcast }
     /if (${ChatText.Equal["Iceclad"]}) {
          /varset Destination Iceclad
	  /goto :memcast }
     /if (${ChatText.Equal["Knowledge"]}) {
          /varset Destination Knowledge
	  /goto :memcast }
     /if (${ChatText.Equal["Natimbi"]}) {
          /varset Destination Natimbi
	  /goto :memcast }
     /if (${ChatText.Equal["Nektulos"]}) {
          /varset Destination Nek 
	  /goto :memcast }
     /if (${ChatText.Equal["Nexus"]}) {
          /varset Destination Nexus
	  /goto :memcast }
     /if (${ChatText.Equal["North Karana"]}) {
          /varset Destination North
	  /goto :memcast }
     /if (${ChatText.Equal["North Ro"]}) {
          /varset Destination Ro 
	  /goto :memcast }
     /if (${ChatText.Equal["Stonebrunt"]}) {
          /varset Destination Stonebrunt
	  /goto :memcast }
     /if (${ChatText.Equal["Toxullia"]}) {
          /varset Destination Tox
	  /goto :memcast }
     /if (${ChatText.Equal["Twilight Sea"]}) {
          /varset Destination Twilight
	  /goto :memcast }
     /if (${ChatText.Equal["Wakening Lands"]}) {
          /varset Destination Wakening Lands
	  /goto :memcast }
     /if (${ChatText.Equal["West Karana"]}) {
          /varset Destination West
	  /goto :memcast }
          :memcast
          /target ${Sender}
          /delay 1s
          /call Cast Translocate: ${Destination} gem7
}
}
/return

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

Post by MrOuija_AK » Tue Sep 14, 2004 2:45 am

No such 'string' member 'guild'.

Chill
Contributing Member
Contributing Member
Posts: 435
Joined: Fri May 07, 2004 5:06 pm
Location: Erie, PA

Post by Chill » Tue Sep 14, 2004 3:01 am

there are some macros like what you are asking for out there. One of useful feature that I recall from one is a "help" function where the macro can send a list of valid names it recognizes, organized by continent.

One other nice thing you might want, is code allowing for short names or partial names. For example, I think this:

Code: Select all

/if (${ChatText.Find["North Ro"]} || ${ChatText.Find["nro"]}) { 
          /varset Destination Ro
is more robust than:

Code: Select all

/if (${ChatText.Equal["North Ro"]}) { 
          /varset Destination Ro
Using .Find instead of .Equal will allow for "tl to nro plz", "north ro please", or other such niceities.

dman
a hill giant
a hill giant
Posts: 181
Joined: Fri Dec 05, 2003 12:54 pm

Post by dman » Tue Sep 14, 2004 9:26 am

No such 'string' member 'guild'.

Code: Select all

/if (${Sender.Guild.Equal["<guild>"]}) {
Guild is a member of the typs spawn. This means that to use it you have to have an object of that type, sender though is a string and as such doesn't qualify. Try something like:

Code: Select all

/if (${Spawn[${Sender}].Guild.Equal[<guild>]}) {

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

Post by MrOuija_AK » Tue Oct 05, 2004 10:43 am

This is my working finished version. This was my first macro, so I'm considering continuing to expand it to help me learn the system better. Any simple upgrades that people can think to add?

Code: Select all

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

Sub Main
:loop
/doevents Chat
/delay 2s
/goto :loop

Sub Event_Chat(ChatType,Sender,ChatText)
/target pc ${Sender}
/if (${Target.Guild.Equal[<guild>]}) {
     /if (${ChatText.Find[Barindu]}) {
          /call Cast "Translocate: Barindu" gem7
}
     /if (${ChatText.Find[Cazic]}) {
          /call Cast "Translocate: Cazic" gem7
}
     /if (${ChatText.Find[Scar]} || ${ChatText.Find[Cobalt]}) {
          /call Cast "Translocate: Cobalt Scar" gem7 
}
     /if (${ChatText.Find[Dread]} || ${ChatText.Find[DL]}) {
          /call Cast "Translocate: Combine" gem7
}
     /if (${ChatText.Find[Common]} || ${ChatText.Find[WC]}) {
          /call Cast "Translocate: Common" gem7
}
     /if (${ChatText.Find[Dawnshroud]} || ${ChatText.Find[DS]}) {
          /call Cast "Translocate: Dawnshroud" gem7
}
     /if (${ChatText.Find[Fay]}) {
          /call Cast "Translocate: Fay" gem7
}
     /if (${ChatText.Find[Divide]} || ${ChatText.Find[GD]}) {
          /call Cast "Translocate: Great Divide" gem7
}
     /if (${ChatText.Find[Grim]}) {
          /call Cast "Translocate: Grimling" gem7
}
     /if (${ChatText.Find[Iceclad]} || ${ChatText.Find[IC]}) {
          /call Cast "Translocate: Iceclad" gem7
}
     /if (${ChatText.Find[Knowledge]} || ${ChatText.Find[POK]}) {
          /call Cast "Translocate: Knowledge" gem7
}
     /if (${ChatText.Find[Natimbi]}) {
          /call Cast "Translocate: Natimbi" gem7
}
     /if (${ChatText.Find[Nek]}) {
          /call Cast "Translocate: Nek" gem7
}
     /if (${ChatText.Find[Nex]}) {
          /call Cast "Translocate: Nexus" gem7
}
     /if (${ChatText.Find[North Karana]}) {
          /call Cast "Translocate: North" gem7
}
     /if (${ChatText.Find[Ro]}) {
          /call Cast "Translocate: Ro" gem7
}
     /if (${ChatText.Find[Stonebrunt]}) {
          /call Cast "Translocate: Stonebrunt" gem7
}
     /if (${ChatText.Find[Tox]}) {
          /call Cast "Translocate: Tox" gem7
}
     /if (${ChatText.Find[Twilight]} || ${ChatText.Find[Sea]}) {
          /call Cast "Translocate: Twilight" gem7
}
     /if (${ChatText.Find[Wakening]}) {
          /call Cast "Translocate: Wakening Lands" gem7
}
     /if (${ChatText.Find[West Karana]}) {
          /call Cast "Translocate: West" gem7
}
}
/return

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Tue Oct 05, 2004 12:25 pm

Add a trade window check that will autoaccept so people can supply you with fragments maybe? I have no idea how to code it, just figured I'd throw that out there since you wanted suggestions.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Tue Oct 05, 2004 12:27 pm

Add in a mount check so he's always medding . . .
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

JimJohnson
a grimling bloodguard
a grimling bloodguard
Posts: 1299
Joined: Sat Oct 11, 2003 6:00 am

Post by JimJohnson » Tue Oct 05, 2004 12:38 pm

dont add a check for fragments or people will turn it into an afk buff macro.

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Tue Oct 05, 2004 1:06 pm

Technically it can already be converted to an AFK buff macro; just not a buff for plat macro! :wink: But yeah, I didn't even think of that angle honestly. I guess I'm just a nice guy or something. Well, that and I really have no need for plat.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

Lum
a lesser mummy
a lesser mummy
Posts: 68
Joined: Thu Sep 16, 2004 10:12 am

Post by Lum » Tue Oct 05, 2004 1:33 pm

instead of auto accepting any trade window, Add in a line when someone tells you "want some fragments?" or something and it will accept the next trade that opens? would help people avoid finding it as an afk bot as they will just trade you all kinds of junk and watch you accept quickly.

User avatar
peach
a hill giant
a hill giant
Posts: 156
Joined: Fri Sep 10, 2004 8:20 pm

Post by peach » Tue Oct 05, 2004 2:52 pm

or set it to only accept platinum / gold / fragments
[img]http://img23.exs.cx/img23/4702/search2.jpg[/img]