First up, this is based HEAVILY on the druid.mac by Nuad - I have never written a macro before, and I am also at work so I can't test it out just yet. I have NO idea if any of this will work.
The idea here (also taken from someone mentioning it in the druid.mac thread) is that your druid sits at it's bind point, waiting for you to tell it to come and meet you. When you tell it where you are (or where to meet you), it mems the ring spell, lets you know its on its way and the location where you should meet it. Once it is in the same zone as you, it gets up close, asks you where you want to port to, mems the spell, groups up with you then ports you. When you disband the group, it then gates to its bindpoint waiting for further instructions. That is the basic idea anyway.
I need to check on the correct wording for my event statements (especially the "You have entered..." one for the ZoneEnter Sub).
The biggest problem I can see at the moment without having tested it so far, is that my ZoneEnter Sub will probably cause the druid to go looking for the target no matter what zone he is in - each time it enters a new zone it will come looking for you (I think, anyway).
I am also not too sure about how the actual grouping, porting, disbanding and gating home will work as well. I have a feeling it could possibly misinterpret the tells it gets from you once grouped and just gate off on its own to where you wanted to go.
If some veteran macro writers could take a look at it and make some suggestions, or if anyone could test it out and let me know how it works, I would be very grateful. Please remember in any feedback you provide I am a complete noob to macro's, programming, scripting etc... so don't get too technical with me if you can help it
I plan to add further fuctionality to it once it works such as asking you if you need any buffs (again ripping off Nuad's fantastic script), and also the help funtions as well - I don't think that will be too hard to do once the main script works ok.
There are a few lines you will need to edit back onto the same line due to length - sorry
Cheers,
Snappahead
Code: Select all
|** --taxi.mac--
Lots of code ripped from Nuad's druid.mac
by Snappahead v0.2a 28/10/02
Usage - Have your Druid parked at it's bind point, type "/macro taxi [controller name]"
and now you have a port bitch on standby
WARNING: There is a known bug that can delete everything from your character
if you zone while running a macro - use this at your own risk. Better to not use it at all
till the bug has been resolved, this is more just an excercise at writing a macro **|
#include routines.mac
#include SpellSub.mac
#include Spellbook.mac
#chat tell
#event ZoneEnter "You have entered" | Need to confirm if this message is correct
#event FGroup "You have formed a group"
#event DGroup "Your group has been disbanded"
Sub Main
/varset v30 $p0
/varset v29 0
/varset v34 $p1
/call MemorizeSpell "Gate" 2
/tell $v30 Port Bitch at your service - tell me "help" for a list of locations I can take you to
:loop
/doevents
/goto :loop
/return
Sub Event_Chat
/stand
/varset v33 $p1
|** This checks that the tell came from you, if not it will send you message letting you know someone
is talking to your taxi so you can deal with it. **|
/if "$v33"!="$v30" {
/mqlog Tell from $p1 :$p2
/delay 10
/tell $p1 Busy - just a sec
/delay 2
/tell $v30 Just got a tell from $p1 to $char(name), see what it is about
/sit
/return
}
|** These are supposed to be all the commands you can give the bot
to make it come to a zone to meet you for your port **|
/if $p2~~"00wc" /call CommonsSub
/if $p2~~"00nk" /call NKaranaSub
/if $p2~~"00misty" /call MistySub
/if $p2~~"00lava" /call LavaSub
/if $p2~~"00sro" /call RoSub
/if $p2~~"00sure" /call SurefallSub
/if $p2~~"00fe"/call FeerrottSub
/if $p2~~"00ek" /call EKaranaSub
/if $p2~~"00bb" /call ButcherSub
/if $p2~~"00stf" /call SteamfrontSub
/if $p2~~"00tox" /call ToxxuliaSub
/if $p2~~"00dl" /call DreadlandsSub
/if $p2~~"00ej" /call EmeraldSub
/if $p2~~"00sf" /call SkyfireSub
/if $p2~~"00cs" /call CobaltSub
/if $p2~~"00gd" /call GreatSub
/if $p2~~"00ic" /call IcecladSub
/if $p2~~"00wl" /call WakeningSub
/if $p2~~"00dp" /call DawnshroudSub
/if $p2~~"00gf" /call GrimlingSub
/if $p2~~"00nex" /call NexusSub
/if $p2~~"00ts" /call TwilightSub
/if $p2~~"00pok" /call KnowledgeSub
/if $p2~~"00help" /call HelpSub
/sit
/doevents
/return
|** This is the help for the initial help reply from the user. Not sure if the
punctiation in the tells will make anything go crazy or not...anybody? **|
Sub HelpSub
/tell $v33 Where are you? (Antonica, Faydwer, Odus, Kunark, Velious, Luclin or Power)
/if $p2~~"Antonica" /call AntonicaHelpSub
/if $p2~~"Faydwer" /call FaydwerHelpSub
/if $p2~~"Odus" /call OdusHelpSub
/if $p2~~"Kunark" /call KunarkHelpSub
/if $p2~~"Velious" /call VeliousHelpSub
/if $p2~~"Luclin" /call LuclinHelpSub
/if $p2~~"Power" /call PowerHelpSub
/return
Sub AntonicaHelpSub
/tell $v33 I can pick you up at the following zones:
/tell $v33 East Karana (ek), Feerrott (fe), Lavastorm Mountains (lava),
/tell $v33 North Karana (nk), Misty Thicket (misty), South Ro (sro),
/tell $v33 Surefall Glade(sure) or West Commons (wc).
/tell $v33 Just reply with the abbreviation of the zone shown in the brackets and I will be on my way.
/return
Sub FaydwerHelpSub
/tell $v33 I can pick you up at the following zones:
/tell $v33 Butcherblock (bb) or Steamfront (stf).
/tell $v33 Just reply with the abbreviation of the zone shown in the brackets and I will be on my way.
/return
Sub OdusHelpSub
/tell $v33 I can pick you up in Toxxulia Forest (tf)
/tell $v33 Just reply with "tf" and I will be on my way
/return
Sub KunarkHelpSub
/tell $v33 I can pick you up in the following zones:
/tell $v33 The Dreadlands (dl), Emerald Jungle (ej) or Skyfire Mountains (sf).
/tell $v33 Just reply with the abbreviation of the zone shown in the brackets and I will be on my way.
/return
Sub VeliousHelpSub
/tell $v33 I can pick you up in the following zones:
/tell $v33 Cobalt Scar (cs), Great Divide (gd), Iceclad Ocean (ic) or Wakening Lands (wl)
/tell $v33 Just reply with the abbreviation of the zone shown in the brackets and I will be on my way.
/return
Sub LuclinHelpSub
/tell $v33 I can pick you up in the following zones:
/tell $v33 Nexus (nexus), Grimling Forest (gf), Dawnshroud Peaks (dp) or Twilight Sea (ts).
/tell $v33 Just reply with the abbreviation of the zone shown in the brackets and I will be on my way.
/return
Sub PowerHelpSub
/tell $v33 I can pick you up in the Plane of Knowledge (pok), but you can port yourself from there if you want.
/tell Reply with "pok" and I will be on my way
/return
|** These Subs are intended to get the druid to mem the correct ring spell according to
your tell, cast the spell and tell you it is coming with a loc of where to meet it **|
Sub CommonsSub
/call MemorizeSpell "Ring of Commons" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -480, +1430
/return
Sub NKaranaSub
/call MemorizeSpell "Ring of Karana" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -2700, -1500
/return
Sub MistySub
/call MemorizeSpell "Ring of Misty" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -490, +1900
/return
Sub LavaSub
/call MemorizeSpell "Ring of Lavastorm" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -1000, +1400
/return
Sub RoSub
/call MemorizeSpell "Ring of Ro" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -2000, +300
/return
Sub SurefallSub
/call MemorizeSpell "Ring of Surefall" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -209, -391
/return
Sub SurefallSub
/call MemorizeSpell "Ring of Feerrott" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -367, -1890
/return
Sub EKaranaSub
/call MemorizeSpell "Succour: East" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -1350, +375
/return
Sub ButcherSub
/call MemorizeSpell "Ring of Butcher" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -2100, +1980
/return
Sub SteamfrontSub
/call MemorizeSpell "Ring of Steamfront" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -1780, +668
/return
Sub ToxxuliaSub
/call MemorizeSpell "Ring of Toxxulia" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -1100, -360
/return
Sub DreadlandsSub
/call MemorizeSpell "Ring of Combines" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -2480, +7717
/return
Sub EmeraldSub
/call MemorizeSpell "Winds of the South" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -3100, +3500
/return
Sub SkyfireSub
/call MemorizeSpell "Winds of the North" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -3186, +2732
/return
Sub CobaltSub
/call MemorizeSpell "Ring of Cobalt Scar" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -1065, -1635
/return
Sub GreatSub
/call MemorizeSpell "Ring of Great Divide" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -3760, +3650
/return
Sub IcecladSub
/call MemorizeSpell "Ring of Iceclad" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -630, +4900
/return
Sub WakeningSub
/call MemorizeSpell "Ring of Wakening Lands" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -3040, -3030
/return
Sub DawnshroudSub
/call MemorizeSpell "Ring of Dawnshroud" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -325, -996
/return
Sub GrimlingSub
/call MemorizeSpell "Ring of Grimling" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -690, -1170
/return
Sub NexusSub
/call MemorizeSpell "Ring of Nexus" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - You know where to meet me
/return
Sub TwilightSub
/call MemorizeSpell "Ring of Twilight" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -656, -125
/return
Sub KnowledgeSub
/call MemorizeSpell "Ring of Knowledge" 1
/delay 10
/call SpellSub 1 1
/tell $v33 Be there in a sec - meet me at the Druid Rings loc -368, +1335
/return
|** Run GoTarget and WhereTo on entering a zone - I think this is going cause problems
because once you port, and once the druid gates back to its bind point it will likely run
this again...dunno just now **|
Sub ZoneEnter
/call GoTarget
/call WhereTo
/return
Sub GoTarget
/stand
/target $v33
/face
/varset v90 $target(id)
/varset t0 5m
:CloserAF
/doevents
/if "$target(id)"!="$v90" /goto :EndAF
/if n $target(distance)>14 /call AutoRun 1
/if n $target(distance)<15 /goto :EndAf
/face
/doevents
/if n $t0==0 /press esc
/goto :CloserAF
:EndAF
/call AutoRun 0
/tell $v33 stopped
/doevents
/return
Sub AutoRun
/if $p0==$v80 /return
/varset v80 $p0
/if $p0==1 /sendkey down up
/if $p0==0 /sendkey up up
/return
|** This section asks you where you want to go, offers helps and calls subs to mem and cast the ring spells depending on your reply **|
Sub WhereTo
/tell $v33 Where do you want to go? Ask for help if you are not sure.
/if $p2~~"00wc" /call CCommonsSub
/if $p2~~"00nk" /call CNKaranaSub
/if $p2~~"00misty" /call CMistySub
/if $p2~~"00lava" /call CLavaSub
/if $p2~~"00sro" /call CRoSub
/if $p2~~"00sure" /call CSurefallSub
/if $p2~~"00fe"/call CFeerrottSub
/if $p2~~"00ek" /call CEKaranaSub
/if $p2~~"00bb" /call CButcherSub
/if $p2~~"00stf" /call CSteamfrontSub
/if $p2~~"00tox" /call CToxxuliaSub
/if $p2~~"00dl" /call CDreadlandsSub
/if $p2~~"00ej" /call CEmeraldSub
/if $p2~~"00sf" /call CSkyfireSub
/if $p2~~"00cs" /call CCobaltSub
/if $p2~~"00gd" /call CGreatSub
/if $p2~~"00ic" /call CIcecladSub
/if $p2~~"00wl" /call CWakeningSub
/if $p2~~"00dp" /call CDawnshroudSub
/if $p2~~"00gf" /call CGrimlingSub
/if $p2~~"00nex" /call CNexusSub
/if $p2~~"00ts" /call CTwilightSub
/if $p2~~"00pok" /call CKnowledgeSub
/if $p2~~"00help" /call CHelpSub
/target $v33
/invite $v33
/tell $v33 Once we arrive at our destination, please disband so I can gate back
/doevents
/return
|** These is the Sub to give help if you ask for it once prompted where you want to go
As with initial help Sub, I am not sure if the punctuation will throw things out or not **|
Sub CHelpSub
/tell $v33 Where do you want to go? (Antonica, Faydwer, Odus, Kunark, Velious, Luclin or Power)
/if $p2~~"Antonica" /call CAntonicaHelpSub
/if $p2~~"Faydwer" /call CFaydwerHelpSub
/if $p2~~"Odus" /call COdusHelpSub
/if $p2~~"Kunark" /call CKunarkHelpSub
/if $p2~~"Velious" /call CVeliousHelpSub
/if $p2~~"Luclin" /call CLuclinHelpSub
/if $p2~~"Power" /call CPowerHelpSub
/return
Sub AntonicaHelpSub
/tell $v33 I can take you to the following zones:
/tell $v33 East Karana (ek), Feerrott (fe), Lavastorm Mountains (lava),
/tell $v33 North Karana (nk), Misty Thicket (misty), South Ro (sro),
/tell $v33 Surefall Glade(sure) or West Commons (wc).
/tell $v33 Just reply with the abbreviation of the zone shown in the brackets and we will be off.
/return
Sub FaydwerHelpSub
/tell $v33 I can take you to the following zones:
/tell $v33 Butcherblock (bb) or Steamfront (stf).
/tell $v33 Just reply with the abbreviation of the zone shown in the brackets and we will be off.
/return
Sub OdusHelpSub
/tell $v33 I can pick you up in Toxxulia Forest (tf)
/tell $v33 Just reply with "tf" and I will be on my way
/return
Sub KunarkHelpSub
/tell $v33 I can take you to the following zones:
/tell $v33 The Dreadlands (dl), Emerald Jungle (ej) or Skyfire Mountains (sf).
/tell $v33 Just reply with the abbreviation of the zone shown in the brackets and we will be off.
/return
Sub VeliousHelpSub
/tell $v33 I can take you to the following zones:
/tell $v33 Cobalt Scar (cs), Great Divide (gd), Iceclad Ocean (ic) or Wakening Lands (wl)
/tell $v33 Just reply with the abbreviation of the zone shown in the brackets and we will be off.
/return
Sub LuclinHelpSub
/tell $v33 I can take you to the following zones:
/tell $v33 Nexus (nexus), Grimling Forest (gf), Dawnshroud Peaks (dp) or Twilight Sea (ts).
/tell $v33 Just reply with the abbreviation of the zone shown in the brackets and we will be off.
/return
Sub PowerHelpSub
/tell $v33 I can take you to the Plane of Knowledge (pok).
/tell Send reply with "pok" and we will be off.
/return
| This is supposed to get the druid to cast the circle spell once you are grouped up
Sub FGroup
/delay 10
/call SpellSub 1 1
/return
| When you disband your group the druid should gate back to its bind point.
Sub DGroup
/tell $v33 Cya, heading back to my bind point - Let me know if you need another ride
/call SpellSub 2 1
/return
|** This section is to get the druid to mem the correct Circle spell
depending on what you told it after it asks you where you want to go **|
Sub CCommonsSub
/call MemorizeSpell "Circle of Commons" 1
/delay 10
/return
Sub CNKaranaSub
/call MemorizeSpell "Circle of Karana" 1
/delay 10
/return
Sub CMistySub
/call MemorizeSpell "Circle of Misty" 1
/delay 10
/return
Sub CLavaSub
/call MemorizeSpell "Circle of Lavastorm" 1
/delay 10
/return
Sub CRoSub
/call MemorizeSpell "Circle of Ro" 1
/delay 10
/return
Sub CSurefallSub
/call MemorizeSpell "Circle of Surefall" 1
/delay 10
/return
Sub CSurefallSub
/call MemorizeSpell "Circle of Feerrott" 1
/delay 10
/return
Sub CEKaranaSub
/call MemorizeSpell "Succour: East" 1
/delay 10
/return
Sub CButcherSub
/call MemorizeSpell "Circle of Butcher" 1
/delay 10
/return
Sub CSteamfrontSub
/call MemorizeSpell "Circle of Steamfront" 1
/delay 10
/return
Sub CToxxuliaSub
/call MemorizeSpell "Circle of Toxxulia" 1
/delay 10
/return
Sub CDreadlandsSub
/call MemorizeSpell "Circle of Combines" 1
/delay 10
/return
Sub CEmeraldSub
/call MemorizeSpell "Winds of the South" 1
/delay 10
/return
Sub CSkyfireSub
/call MemorizeSpell "Winds of the North" 1
/delay 10
/return
Sub CCobaltSub
/call MemorizeSpell "Circle of Cobalt Scar" 1
/delay 10
/return
Sub CGreatSub
/call MemorizeSpell "Circle of Great Divide" 1
/delay 10
/return
Sub CIcecladSub
/call MemorizeSpell "Circle of Iceclad" 1
/delay 10
/return
Sub CWakeningSub
/call MemorizeSpell "Circle of Wakening Lands" 1
/delay 10
/return
Sub CDawnshroudSub
/call MemorizeSpell "Circle of Dawnshroud" 1
/delay 10
/return
Sub CGrimlingSub
/call MemorizeSpell "Circle of Grimling" 1
/delay 10
/return
Sub CNexusSub
/call MemorizeSpell "Circle of Nexus" 1
/delay 10
/return
Sub CTwilightSub
/call MemorizeSpell "Circle of Twilight" 1
/delay 10
/return
Sub CKnowledgeSub
/call MemorizeSpell "Circle of Knowledge" 1
/delay 10
/return

