Page 1 of 1
Guild Magus Macro
Posted: Mon Sep 13, 2004 9:25 pm
by MrOuija_AK
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.
Posted: Mon Sep 13, 2004 11:38 pm
by hiipii
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.
Posted: Tue Sep 14, 2004 2:26 am
by MrOuija_AK
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
Posted: Tue Sep 14, 2004 2:45 am
by MrOuija_AK
No such 'string' member 'guild'.
Posted: Tue Sep 14, 2004 3:01 am
by Chill
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.
Posted: Tue Sep 14, 2004 9:26 am
by dman
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>]}) {
Posted: Tue Oct 05, 2004 10:43 am
by MrOuija_AK
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
Posted: Tue Oct 05, 2004 12:25 pm
by A_Druid_00
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.
Posted: Tue Oct 05, 2004 12:27 pm
by fearless
Add in a mount check so he's always medding . . .
Posted: Tue Oct 05, 2004 12:38 pm
by JimJohnson
dont add a check for fragments or people will turn it into an afk buff macro.
Posted: Tue Oct 05, 2004 1:06 pm
by A_Druid_00
Technically it can already be converted to an AFK buff macro; just not a buff for plat macro!

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.
Posted: Tue Oct 05, 2004 1:33 pm
by Lum
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.
Posted: Tue Oct 05, 2004 2:52 pm
by peach
or set it to only accept platinum / gold / fragments