#event Cleared "#*#The zone is clear! Drop Mission!#*#" #Event LeechCount "#*#Leech Standing by for Duty!#*#" #Event GTG "#*#Good to Go!#*#" #include ZoneClear.inc Sub Main |Define Task Name **Change only if necessary** /define task string outer The Lost Notebook(hard) /define InTask bool outer false /define LeechReady int outer /define LeechNumber int outer /define GoodToGo bool outer false |Define Character Duty Variables **DO NOT CHANGE** /define Killer string outer /define QuestGetter string outer /define Leech1 string outer /define Leech2 string outer /define Leech3 string outer /define Leech4 string outer |Populate Character Duty Variables from AFKHive.INI /varset Killer ${Ini[AFKHive.INI,CharInfo,Killer]} /varset QuestGetter ${Ini[AFKHive.INI,CharInfo,QuestGetter]} /varset Leech1 ${Ini[AFKHive.INI,CharInfo,Leech1]} /varset Leech2 ${Ini[AFKHive.INI,CharInfo,Leech2]} /varset Leech3 ${Ini[AFKHive.INI,CharInfo,Leech3]} /varset Leech4 ${Ini[AFKHive.INI,CharInfo,Leech4]} |Make the quest getter leader of the group. /Makeleader ${QuestGetter} |Determine This Character's Function in the macro. /if (${Me.Name.Equal[${QuestGetter}]}) /call QuestGetter /if (${Me.Name.Equal[${Killer}]}) /call Killer /if (${Me.Name.Equal[${Leech1}]}) /call Leech /if (${Me.Name.Equal[${Leech2}]}) /call Leech /if (${Me.Name.Equal[${Leech3}]}) /call Leech /if (${Me.Name.Equal[${Leech4}]}) /call Leech /end |This character is the Quest getter. He will zone to Corathus Creep, and request the mission. |Then he will standby to request the mission again when the group is ready for it. Sub QuestGetter :QuestCycle |--Zone to corathus creep /if (!${Zone.ID}==365) /call ZoneTo Corathus 365 /delay 5s |--Request the mission /target Brovil /delay 1s /saytarget "I will recover the pages." /call GetTask /delay 3s |--Destroy the notebook and wait for the group to finish clearing the zone. /destroy /varset InTask TRUE :WaitingForComplete /if (!${InTask}) { |--The group is ready for a new task, drop the old one. /taskremove ${Killer} /taskremove ${Leech1} /taskremove ${Leech2} /taskremove ${Leech3} /taskremove ${Leech4} /taskremove ${Me.Name} /goto :QuestCycle } else /if ${InTask} { /delay 1s /doevents /goto :WaitingForComplete /return |This character is the Ghost Killer. He will zone into the instance, and wait for the leechers to be ready, |then clear the zone using the zoneclear macro of your choice. (just make sure that the zoneclear macro is |titled ZoneClear.INC, the sub main is changed to sub ZoneClear, and all /end commands are changed to |/return and you should be fine using any zoneclear macro. The Default ZoneClear.INI is identical to MQ2SourceZC.Mac |except for the above noted changes. Sub Killer |--Zone to Stoneroot Falls (if not already there) /zone westkorlach 358 |--Wait to get the quest. :WaitforQuest /if (!${Window[TaskWnd].Open}) { /delay 1s /goto :WaitforQuest } /varset InTask TRUE /squelch /windowstate TaskWnd close |--Zone into the instance. |--**PROBLEM: how to force the toon to zone into the instance? from stoneroot falls :WaitOnLeech |--Clear the zone /if (${GoodToGo}) /call ZoneClear /if (!${GoodToGo}) /goto :WaitOnLeech |--Reset conditions /varset LeechReady 0 /g The zone is clear! Drop Mission! /warp succor /doevents |--Zone out, back to stoneroot falls. |--**PROBLEM: how to force the toon to zone out of the instance to stoneroot falls? |--Return to wait on another quest. /goto :WaitforQuest /return |This character is a leech character. He will zone into the instance and then begin a GK leech macro. |once he is set up he will notify the group that he is ready to begin. Sub Leech /g Leech Standing by for Duty! |--Zone to Stoneroot Falls (if not already there) /zone westkorlach 358 |--Wait to get the quest. :WaitforQuest /if (!${Window[TaskWnd].Open}) { /delay 1s /goto :WaitforQuest } /varset InTask TRUE /squelch /windowstate TaskWnd close |--Zone in to the instance. |--**PROBLEM: how to force the toon to zone into the instance? from stoneroot falls |--Initialize the ghost xp macro / plugin /target ${Killer} /delay 5 /warp target /delay 5 /target clear /sghostxp on |--Notify the killer you're GTG /if (${Me.Name.Equal[${Leech1}]}) /g ${Leech1} Good to Go! /if (${Me.Name.Equal[${Leech2}]}) /g ${Leech2} Good to Go! /if (${Me.Name.Equal[${Leech3}]}) /g ${Leech3} Good to Go! /if (${Me.Name.Equal[${Leech4}]}) /g ${Leech4} Good to Go! |--Ghost XP leech loop :mainloop /assist ${Killer} /doevents /if (${InTask}) /goto :mainloop |--You're no longer in the task, so stop leeching exp and zone out. /if (!${InTask}) { /sghostxp off |--**PROBLEM: How to force the toon to zone out of the instance to stoneroot falls? |--Return to wait on another quest. /goto :WaitforQuest } /return |Force the character to chain zone to ZoneName (variable), with ZoneID (variable) Sub ZoneTo(string ZoneName, ZoneID) /declare ZoneTime int local /echo Now Zoning to: ${ZoneName}, Please Standby. :ZoneLoop /if (${Zone.ID}=${ZoneID}) /return /zone ${ZoneName} /for ZoneTime 1 to 30 /if (${Zone.ID}=${ZoneID}) /return /delay 1s /next ZoneTime /goto :ZoneLoop /return |Request the task: The Lost Notebook(Hard) Sub GetTask :GetTaskLoop /if (!${Window[TaskSelectWnd].Open}) { /delay 1 /goto :GetTaskLoop } /notify TaskSelectWnd TaskList leftmouseup /notify TaskSelectWnd TaskList listselect ${Window[TaskSelectWnd].Child[TaskList].List[=${task}]} /notify TaskSelectWnd AcceptButton leftmouseup :TaskWindowLoop /if (!${Window[TaskWnd].Open}) { /delay 1 /goto :TaskWindowLoop } /squelch /windowstate TaskWnd close /return Sub Event_Cleared /varset InTask FALSE /return Sub Event_LeechCount /varcalc LeechNumber ${LeechNumber}+1 /return sub Event_GTG /varcalc LeechReady ${LeechReady}+1 /if (${LeechReady}==${LeechNumber}) /varset GoodToGo TRUE /return