|----------------------------------------------------------------------------
| Macro : /mac ldon
|
| Author : Dewey2461
|
| This macro is designed to help complete the LDON traveler achievements.
|
| SETUP:
| 1. Form a group of 3 members: 1 can be a merc
| 2. Leader moves to the adventure recruiter
| 3. Right clicks the recruiter -> macro auto selects adventure ( have to manually do this first time )
| 4. Achiever moves to adventure and zones in.
| 5. Macro detects when zoned into ldon and clicks "Leave Adventure" button -> auto broadcasts "Leave Adventure"
| 6. All members leave adventure
| 7. Macro has Leader requests next adventure in about 15s
| 8. Achiever manually zones out.
| 9. Goto step 3.
|
|----------------------------------------------------------------------------
#warning
#event LeaveAdv "#*#Leave adventure#*#"
Sub Event_LeaveAdv
/if (${LeaveTM}) /return
/if (${Window[AdventureRequestWnd].Child[AdvRqst_RequestButton].Enabled} && ${Window[AdventureRequestWnd].Child[AdvRqst_RequestButton].Text.Equal[Leave Adventure]}) {
/echo -- Leaving Adventure
/notify AdventureRequestWnd AdvRqst_RequestButton leftmouseup
}
/varset LeaveTM 3s
/varset RequestTM 20s
/return
#event LeftAdv "#*#You have left your adventure.#*#"
Sub Event_LeftAdv
/if (${LeaveTM}) /return
/bc Leave adventure
/return
#event Zoned "#*#You have entered #1#.#*#"
Sub Event_Zoned(string line,string name)
/declare key string
/declare val string
/declare try string
/if (${name.Find[:]}) {
/varset DoneTM 10s
/varset val ${Window[AdventureRequestWnd].Child[AdvRqst_NPCText].Text}
/varcalc try ${Ini["ldon.ini","try","${name}","0"]}+1
/ini "ldon.ini" "try" "${name}" "${try}"
}
/return
Sub main
/declare LeaveTM timer outer 0
/declare RequestTM timer outer 0
/declare DoneTM timer outer 0
/echo LDON Explorer - Party Leader needs to right click Adventure Recruiter
:Loop
/doevents
|-- We've zoned in. Now drop the adventure
/if (${DoneTM}>0 && ${DoneTM}<10) {
/notify AdventureRequestWnd AdvRqst_RequestButton leftmouseup
}
|-- We were told to drop the instance so lets try to re "use" the npc to get next
/if (${RequestTM}>0 && ${RequestTM}<10) /keypress use
|-- Show the LDON adventure window
/if (!${Window[AdventureRequestWnd].Open}) /invoke ${Window[AdventureRequestWnd].DoOpen}
|-- Request an adventure if we can
/if (${Window[AdventureRequestWnd].Child[AdvRqst_RequestButton].Enabled}) {
/if (${Window[AdventureRequestWnd].Child[AdvRqst_RequestButton].Text.Equal[Request Adventure]}) {
/echo -- Requesting an adventure
/notify AdventureRequestWnd AdvRqst_RequestButton leftmouseup
}
}
|-- Click Accept for Adventure
/if (${Window[AdventureRequestWnd].Child[AdvRqst_AcceptButton].Enabled}) {
/echo -- Accepting an adventure
/notify AdventureRequestWnd AdvRqst_AcceptButton leftmouseup
}
|-- Click the yes|no button
/if (${Window[ConfirmationDialogBox].Open}) {
/notify ConfirmationDialogBox Yes_Button leftmouseup
}
|-- Click other yes|no button
/if (${Window[LargeDialogWindow].Open}) {
/notify LargeDialogWindow LDW_YesButton leftmouseup
}
/delay 5
/goto :Loop
/return