ADVTASKWARP2.INI
[The Dreadlands]
At Least Luclin's Okay=0
Big Holes Everywhere=0
Don't Drink That...=0
Drachnid Breeding Grounds=0
Dreaded Giants=1
Giant Expedition=0
Giant Tidings=0
Hey, Watch Out Over There=0
High and Low=0
It's Murky in There=0
Jailing the Dead=0
Jailed!=0
Jaws of Death=0
Lands of Dread=1
Learning About Hornets=0
Looking Over the Edge=0
Lookout Below=0
Mind the Bees=0
Mountaineering=0
Mouth of the Dragon=0
Mystic Ring=0
Poor Old Tree=0
One Dead Tree=0
Ruins Everywhere=0
Scary Caves=0
Serenity Near the Lake=0
Statue Garden=1
Stirring Things Up=0
Through the Rubble=0
To the Castle!=1
Upward Mobility=0
What Place is This?=0
What Do They Do in There?=0
NULL=
[The Overthere]
Badgering the Goblins=0
Badgering Kunark=0
Blasted Stone=0
Checking in on Cabilis=1
Danger, Here be Goblins=1
Dangers of the Deep=1
Dig in=0
Drachnid Breeding Grounds=1
Drop into the Temple=0
Earth and Sky=1
Falling into Goblin Territory=1
Following the Bandits Home=1
Fortifying the woods=1
From the Mountains to the Sea=1
High and Low=1
Holding the Fort=1
It's Dinner Time=0
Jaunt Along the Broken Stone=1
Jungle Trek=0
Kunark Landing=0
Mind the Edge=0
Mining Kunark=1
Remains of an empire=1
Spires and Ruins=1
Taking the Plunge=0
Through the Rubble=0
Through the Mists=0
Trailblazing=1
Unhappy Campers=0
What's Left of the Tower=1
Where? Overthere!=1
NULL=
[The Swamp of No Hope]
Delving the Mines=0
Death by Drowning=0
Everything in Ruins=0
Lizard Tour=0
March for Drolvarg Literacy=0
On the Watch for Drolvarg=0
Pillars of Civilization?=0
Stone-Faced Lizards=0
What Lies Below=0
[The Gulf of Gunthak]
Do You Believe=0
It's a Tradition=0
Leaving Home=0
Making a Stand=0
Paying Homage=0
Scorn by the Wind=0
Stormwave Ho!=0
Time for Bed=0
Treasure for Everyone=0
Where Underground?=0
NULL=
[Western Plains of Karana]
Bringing Books to the Plains=0
Mining Operation=0
Raised by Wolves?=0
Gnoll and Go=0
Mud Crossing=0
Lord of the Castle=0
Goblin Tracking=0
Outpost One Lower Patrol Route=0
Fork in the Road=0
Nice Bridge=0
Through High Hold=0
Road to Runnyeye=0
Journey to High Hold Keep=0
Over the Bridge=0
Staging a Raid=0
Karana Run=0
Ridge Run=0
Outpost One=0
Down the Pass=0
Basements and Plains=0
Dropping in on Bandits=0
Stone Faced=0
ADVTASKWARP2.MAC
#turbo 20
#include AdvTaskWarp_Dreadlands.inc
#include AdvTaskWarp_Gunthak.inc
#include AdvTaskWarp_OverThere.inc
#include AdvTaskWarp_SwampOfNoHope.inc
#include AdvTaskWarp_WestKarana.inc
#include bandaide.inc
#Event TaskLok "#*#looks like you're already busy with a task#*#"
#Event Zoned "You have entered#*#"
#Event YouDied "You have been slain by#*#"
#Event Stage_Complete "Your task#*#"
#Event timer "This task can not be assigned to you because you must wait 0d:0h

1#m before you can do another task of this type."
sub ReleaseNotes
/echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/echo Mod Notes [04/17/2006]: Alatyami
/echo * Fixed targeting and zoneing calls in SwampOfNoHope.inc (TheNameless)
/echo * Fixed some loc's in PiggyZone.inc (TheNameless)
/echo * Fixed the AdvTaskWarp.ini label for Death by Drowning (TheNameless)
/echo * Made default zone in for SwampOfNoHope (TheNameless)
/echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/return
sub main
|~ Modify the next declarations to customize your Advance Task Settings:
|~ TaskRequest = Request Phrase
/declare TaskRequest string outer task
|~ SpamMax = Max number of times to request for a task before taking a break.
/declare SpamMax int outer 25
|~ ReturnINI = Display the INI checks (more for debugging)
/declare ReturnINI int outer 0
|~ To Spew Debug or not to Spew that is the question. 0 = off 1 = on
/declare SpewDebugger int outer 0
|~ Leave the following settings alone, unless you know what you are doing, in
|~ that case if you make some good mods let me know so we can make this a
|~ better macro.
/declare HealPoint int outer 98
/declare TMR_TaskStart float outer
/declare TMR_GoTask float outer
/declare TMR_Request float outer
/declare TMR_GoRequest float outer
/declare CurrentTime float outer
/if (${Defined[Param0]}) {
/varset HealPoint ${Param0}
} else {
/varset HealPoint 0
}
/declare SpamCount int outer 0
/declare TaskGiver string outer ${Target.ID}
/declare TaskZone string outer ${Zone.ShortName}
/declare MyStartY string outer ${Me.Y}
/declare MyStartX string outer ${Me.X}
/declare MyStartZ string outer ${Me.Z}
/ini "AdvTaskWarp.ini" "${Zone}" "${MyTasks}"
/declare CurrentTask1 string outer
/declare CurrentTask2 string outer
/declare CurrentTask3 string outer
/declare TaskSetting int outer 0
/declare ValidTask string outer
/declare tc int outer 0
/declare TaskCounter int outer
/declare taskid int outer
/declare Zn int outer
|~ Now that everything is setup let's get on with the macro...
/call ReleaseNotes
/echo Task Zone: ${TaskZone}
/echo Task Giver: ${Target[${TaskGiver}].Name}
/echo Task Request Phrase: ${TaskRequest}
/echo Start Location: ${MyStartY} ${MyStartX} ${MyStartZ}
/echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/call RequestTask
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SUB MACRO_FUNCTIONS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
sub RequestTask
/if (${Zone.ShortName.NotEqual[${TaskZone}]}) {
/echo ERROR: You must be in ${TaskZone} to continue this macro!
/end
}
/if (${Me.PctHPs} < ${HealPoint}) /call bandaide
/varset TaskSetting 0
/call GMCheck
/if ((${Me.Y} != ${MyStartY}) && (${Me.X} != ${MyStartX})) /warp loc ${MyStartY} ${MyStartX} ${MyStartZ}
/delay 2s
/target id ${TaskGiver}
/face
/delay 2s
/if (${Me.Invis}) /doability "Hide"
/if (${SpamCount} <= ${SpamMax}) {
/echo [${Time}] Getting New Task ${SpamCount}/${SpamMax}
/say ${TaskRequest}
/varset SpamCount ${Math.Calc[${SpamCount}+1].Int}
/varset TMR_Request ${Time.Second}
} else {
/sit
/echo [${Time}] MaxSpam has been reached (${SpamMax})! Taking a 5min breather.
/if (${Me.AbilityReady[Sneak]}) /doability Sneak
/if (${Me.AbilityReady[Hide]}) /doability Hide
/delay 5m
/stand
/varset SpamCount 0
/call RequestTask
}
/delay 2s
|~ Need to place the Task Select Window into focus.
/notify TaskSelectWnd TaskList leftmouseup
|~ Using the Task Select Window, convert the task names into usable variables
/varset CurrentTask1 ${Window[TaskSelectWnd].Child[TaskList].List[1]}
/varset CurrentTask2 ${Window[TaskSelectWnd].Child[TaskList].List[2]}
/varset CurrentTask3 ${Window[TaskSelectWnd].Child[TaskList].List[3]}
/if (${TaskSetting}==0) {
|- Check the first available task listselect
/notify TaskSelectWnd TaskList listselect ${Window[TaskSelectWnd].Child[TaskList].List[=${CurrentTask1}]}
/notify TaskSelectWnd TaskList leftmouse ${Window[TaskSelectWnd].Child[TaskList].List[=${CurrentTask1}]}
/varset TaskSetting ${Ini[AdvTaskWarp.ini,${Zone},${Window[TaskSelectWnd].Child[TaskList].List[1]},${notFound}]}
/if (${ReturnINI}==1) /echo INI Check: ${Window[TaskSelectWnd].Child[TaskList].List[1,1]} = ${TaskSetting}
/delay 1s
/if (${TaskSetting}==1) {
|~ Do Hide and Sneak if available.
/if (${Me.AbilityReady[Sneak]}) /doability Sneak
/if (${Me.AbilityReady[Hide]}) /doability Hide
|~ Accept the Task.
/notify TaskSelectWnd AcceptButton leftmouseup
|~ Set ValidTask to Task Selection 1
/varset ValidTask ${CurrentTask1}
|~ Set the start time.
/varset TMR_TaskStart ${Math.Calc[${Macro.RunTime}/60]}
/delay 1s
|~ Start the task.
/doevents
|~ Reset Spam Counter to Zero
/varset SpamCount 0
|~ Start checking the LockOut Timer
/call TimerTrap
|~ Get another Task.
/call RequestTask
}
/delay 5
}
/if (${TaskSetting}==0) {
|- Check the second available task listselect
/notify TaskSelectWnd TaskList listselect ${Window[TaskSelectWnd].Child[TaskList].List[=${CurrentTask2}]}
/notify TaskSelectWnd TaskList leftmouse ${Window[TaskSelectWnd].Child[TaskList].List[=${CurrentTask2}]}
/varset TaskSetting ${Ini[AdvTaskWarp.ini,${Zone},${Window[TaskSelectWnd].Child[TaskList].List[2]},${notFound}]}
/if (${ReturnINI}==1) /echo INI Check: ${Window[TaskSelectWnd].Child[TaskList].List[2,1]} = ${TaskSetting}
/delay 1s
/if (${TaskSetting}==1) {
|~ Do Hide and Sneak if available.
/if (${Me.AbilityReady[Sneak]}) /doability Sneak
/if (${Me.AbilityReady[Hide]}) /doability Hide
|~ Accept the Task.
/notify TaskSelectWnd AcceptButton leftmouseup
|~ Set ValidTask to Task Selection 2
/varset ValidTask ${CurrentTask2}
|~ Set the start time.
/varset TMR_TaskStart ${Math.Calc[${Macro.RunTime}/60]}
/delay 1s
|~ Start the task.
/doevents
|~ Reset Spam Counter to Zero
/varset SpamCount 0
|~ Start checking the LockOut Timer
/call TimerTrap
|~ Get another Task.
/call RequestTask
}
/delay 5
}
/if (${TaskSetting}==0) {
|- Check the first available task listselect
/notify TaskSelectWnd TaskList listselect ${Window[TaskSelectWnd].Child[TaskList].List[=${CurrentTask3}]}
/notify TaskSelectWnd TaskList leftmouse ${Window[TaskSelectWnd].Child[TaskList].List[=${CurrentTask3}]}
/varset TaskSetting ${Ini[AdvTaskWarp.ini,${Zone},${Window[TaskSelectWnd].Child[TaskList].List[3]},${notFound}]}
/if (${ReturnINI}==1) /echo INI Check: ${Window[TaskSelectWnd].Child[TaskList].List[3,1]} = ${TaskSetting}
/delay 1s
/if (${TaskSetting}==1) {
|~ Do Hide and Sneak if available.
/if (${Me.AbilityReady[Sneak]}) /doability Sneak
/if (${Me.AbilityReady[Hide]}) /doability Hide
|~ Accept the Task.
/notify TaskSelectWnd AcceptButton leftmouseup
|~ Set ValidTask to Task Selection 3
/varset ValidTask ${CurrentTask3}
|~ Set the start time.
/varset TMR_TaskStart ${Math.Calc[${Macro.RunTime}/60]}
/delay 1s
|~ Start the task.
/doevents
|~ Reset Spam Counter to Zero
/varset SpamCount 0
|~ Start checking the LockOut Timer
/call TimerTrap
|~ Get another Task.
/call RequestTask
}
/delay 5
}
/if (${TaskSetting}==0) /notify TaskSelectWnd DeclineButton leftmouseup
/varset CurrentTask1
/varset CurrentTask2
/varset CurrentTask3
/varset ValidTask
|~~~~~~~~~~~~~~~~~~~~~~~~~~ Task Request Timer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
/varset TMR_GoRequest ${Math.Calc[${TMR_Request}+15]}
|~ Offset TMR_GoRequest if >= 60 to count for minute rollover to hour.
/if (${TMR_GoRequest} >= 60) /varset TMR_GoRequest ${Math.Calc[${TMR_GoRequest}-60]}
:RequestTimer
/if (${Time.Second} == ${TMR_GoRequest}) {
} else {
/delay 5
/goto :RequestTimer
}
|~ Get another task.
/call RequestTask
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TimerTrap ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|~ [03/14/2006] This func traps the lockout timer. It calls Start_Lockout_Activities
|~ and then starts the timer loop. Once the lockout timer is over it calls
|~ Stop_Lockout_Activities. This timer is down to the very second.
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
sub TimerTrap
|~/varset TMR_TaskStart ${Math.Calc[${Macro.RunTime}/60]}
/call Start_Lockout_Activities
/varset TMR_GoTask ${Math.Calc[${TMR_TaskStart}+15.10]}
|~ /echo Now: ${Math.Calc[${Macro.RunTime}/60]} Go: ${TMR_GoTask}
:checktimer
|/varset CurrentTime ${Time.Minute}.${Time.Second}
/if (${Math.Calc[${Macro.RunTime}/60]} >= ${TMR_GoTask}) {
|~ /echo Now: ${Math.Calc[${Macro.RunTime}/60]} Go: ${TMR_GoTask}
/call Stop_Lockout_Activities
/return
} else {
/delay 100
|~DeBugger
|~ /echo Now: ${Math.Calc[${Macro.RunTime}/60]} Go: ${TMR_GoTask}
/goto :checktimer
}
/warp loc ${MyStartY} ${MyStartX} ${MyStartZ}
/varset CurrentTime
/varset TMR_GoTask
/return
|~~~~~~~~~~~~~~~~~~~~~~~~ Start_Lockout_Activities ~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|~ [03/14/2006] This func is called when the task has been completed and the
|~ loop for the lockout timer has begun. Only place plugin activity in this
|~ function as the loop has to continue in order for the count down to occur.
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
sub Start_Lockout_Activities
|/plugin MQ2AutoForage
|/delay 1s
|/startforage
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~ Stop_Lockout_Activities ~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|~ [03/14/2006] This func is used to end any actions that were started in the
|~ Start_Lockout_Activities func.
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
sub Stop_Lockout_Activities
|/stopforage
|/plugin MQ2AutoForage unload
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Zoner ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|~ Very nice function to pause events while you are zoning ...
|~ If you don't like this one ... "Don't Be A Zoner ... Be A Stoner ..."
|~ [03/10/2005] New Zoner function provided by Cobalt
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Sub Zoner(string ZoneName, string ZoneLoc)
/delay 5s
:loop
/if (${Zone[${Zone.ShortName}].ID} != ${Zone.ID}) /goto :loop
/delay 5s
/if (${Me.AbilityReady[Sneak]}) /doability "Sneak"
/if (${Me.AbilityReady[Hide]}) /doability "Hide"
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|~ A great hail handler.
|~ [03/10/2005] HailTarget function provided by Cobalt
|~ Uasage: /call HailTarget "NPC_Name"
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Sub HailTarget(string TargetName)
:loop
/delay 2s
/if (!${Target.ID}) /goto :loop
/hail
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lame GMCheck ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|~ Seriously, its lame ... but my adv GM check was a bomb so we'll keep this one.
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
sub GMCheck
|/echo GM Checking ...
/if (${Bool[${Spawn[gm].ID}]}) {
/if (${Me.AbilityReady["Hide"]}) /doability "Hide"
/echo A GM or Guide has been detected!!! Waiting for five minutes for him to send you lots of tells that I wont answer. Face it ... you've been pwn'd!
/delay 300s
/call GMCheck
}
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Death Handling ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|~ In the event that your have been slain, you will be camped out and MQ2 will
|~ end the macro.
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
sub Event_YouDied
/say Well that sucks .. enough for one night ...
/camp desktop
/end
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Task Stats ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|~ If turned on then you will see the following after each task is finished:
|~ [MQ2] [02:25:34] Completed: 17 Ave Rate: 2.06min Run Time: 34.89min
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
sub Counter
/varset TaskCounter ${Math.Calc[${TaskCounter}+1].Int}
/echo [${Time}] Completed: ${TaskCounter} Ave Rate: ${Math.Calc[(${Macro.RunTime}/60)/${TaskCounter}]}min Run Time: ${Math.Calc[${Macro.RunTime}/60]}min
/sit
/return
|~~~~~~~~~~~~~~~~~~~~~~~ Task Stage Completion Check ~~~~~~~~~~~~~~~~~~~~~~~~~~|
|~ A nice addition that speeds up the response time, once the task stage is
|~ completed, you will continue your journey after .5 secs. That to long for you?
|~ well tough luck.
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
sub Taskcheck
:taskwait
/delay 5s
/doevents
/delay 5s
/return
sub Event_Stage_Complete
/varset tc 1
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|THis sub ends and camps if you already have a task
|
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Sub Event_TaskLok
/echo looks like you already have a task
/echo ending macro
/endmac
/camp
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|~ Where are all the tasks? You're not that bright are you? If you are still
|~ looking for the tasks I suggest you delete MQ2 because odds are you will get
|~ yourself caught. And btw, I used to be a English Major and a Persian-Farsi
|~ analyst ... so if I can type without that freak of nature net-speak so can
|~ you.
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
|~ DISCLAIMER: If you do not have a good sense of humor then you really shouldn't
|~ do macros at all ... and well if you read everything down to this point, I hope
|~ that the comments were entertaining ... I know I had fun writing them ...
|~ Enjoy the macro and have fun! - Alatyami -
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Thanks. And yea Im within hailing distance and no I'm not hidden / sneak / or invis