Moderator: MacroQuest Developers


Code: Select all
${Window[AdventureRequestWnd].Child[AdvRqst_NPCText].Text} Code: Select all
:Loop
/target ADVENTURERECRUITER
/click right target
/delay 1s
/notify AdventureRequestWnd AdvRqst_RequestButton leftmouseup
/delay 2s
/declare nTemp int local 0
/for nTemp 0 to 100
/if ( ${Window[AdventureRequestWnd].Child[AdvRqst_NPCText].Text.Find[${nTemp}]} ) {
/notify AdventureRequestWnd AdvRqst_AcceptButton leftmouseup
/endmacro
}
/next nTemp
/notify AdventureRequestWnd AdvRqst_DeclineButton leftmouseup
/delay 600
/goto :Loop
Code: Select all
| LDON.mac: Macro to Request LDON Adventures of the Risk/Type desired as soon as they are available.
| usage: /mac LDON [Normal|High] [Collect|Slay|Kill|Save|Any]
| Defaults: /mac LDON [Normal] [Collect|Slay]
| Examples: /mac LDON Normal Any - would accept any Normal Risk mission.
| /mac LDON High Collect|Slay - would accept the first High Risk Collect or Slay (Slaughter) mission.
| Note: types can be defined in any order, without spaces. Risk must be set if type is to be given.
#define ReqTime 600
#define AdvTime 24000
Sub Main
/declare Risk string outer Normal
/if (${Param0.Equal[High]} || ${Param0.Equal[Hard]}) /varset Risk High
/declare TakeCollect int outer 1
/declare TakeSlay int outer 1
/declare TakeKill int outer 0
/declare TakeSave int outer 0
/declare TextCollect string outer "Search Phrase Goes Here"
/declare TextSlay string outer "Search Phrase Goes Here"
/declare TextKill string outer "Search Phrase Goes Here"
/declare TextSave string outer "Search Phrase Goes Here"
/declare AdvText string outer
/if (${Defined[Param1]}) {
/if (${Param1.Find[Collect]} || ${Param1.Find[Any]}) {
/varset TakeCollect 1
} else {
/varset TakeCollect 0
}
/if (${Param1.Find[Slay]} || ${Param1.Find[Slaughter]} || ${Param1.Find[Any]}) {
/varset TakeSlay 1
} else {
/varset TakeSlay 0
}
/if (${Param1.Find[Kill]} || ${Param1.Find[Any]}) {
/varset TakeKill 1
} else {
/varset TakeKill 0
}
/if (${Param1.Find[Save]} || ${Param1.Find[Rescue]} || ${Param1.Find[Any]}) {
/varset TakeSave 1
} else {
/varset TakeSave 0
}
}
/if (${Group}<3) {
/echo You must be in a group of 3 or more to Adventure. Exiting 8(
/endmacro
}
/if (!${Me.GroupLeader}) {
/echo You must be the leader of your group to Request Adventures. Exiting 8(
/endmacro
}
/call TargetRecruiter
/call MoveToMob 15
/call RequestAdv
| /call FaceBlueLine * Optional Code To Add
/endmacro
Sub TargetRecruiter
/if (${Zone.ShortName.Equal[Sro]}) {
/target npc Kallei
} else /if (${Zone.ShortName.Equal[Everfrost]}) {
/target npc Mannis
} else /if (${Zone.ShortName.Equal[Butcher]}) {
/target npc Xyzelauna
} else /if (${Zone.ShortName.Equal[Ecommons]}) {
/target npc Periac
} else /if (${Zone.ShortName.Equal[Nro]}) {
/target npc Escon
} else {
/echo You must run this macro from: North Ro, South Ro, Everfrost, Butcherblock, or East Commons. Exiting now.
/endmacro
}
/return
Sub RequestAdv
/declare ReqTimer timer local 0
/if (!${Defined[AdvTimer]}) /declare AdvTimer global 0
/face fast
:RequestLoop
/if (!${AdvTimer} && !${ReqTimer}) {
/click right target
/delay 30 ${Window[AdventureRequestWnd].Open}
/if (${Risk.Equal[High]}) {
/notify AdventureRequestWnd AdvRqst_RiskCombobox listselect 2
/delay 10
}
/notify AdventureRequestWnd AdvRqst_RequestButton leftmouseup
/delay 20
/varset AdvText ${Window[AdventureRequestWnd].Child[AdvRqst_NPCText]}
/if (${AdvText.Find[${TextCollect}]} && ${TakeCollect}) {
/notify AdventureRequestWnd AdvRqst_AcceptButton leftmouseup
/varset AdvTimer AdvTime
/return
} else /if (${AdvText.Find[${TextSlay}]} && ${TakeSlay}) {
/notify AdventureRequestWnd AdvRqst_AcceptButton leftmouseup
/varset AdvTimer AdvTime
/return
} else /if (${AdvText.Find[${TextKill}]} && ${TakeKill}) {
/notify AdventureRequestWnd AdvRqst_AcceptButton leftmouseup
/varset AdvTimer AdvTime
/return
} else /if (${AdvText.Find[${TextSave}]} && ${TakeSave}) {
/notify AdventureRequestWnd AdvRqst_AcceptButton leftmouseup
/varset AdvTimer AdvTime
/return
} else {
/notify AdventureRequestWnd AdvRqst_DeclineButton leftmouseup
/varset ReqTimer ReqTime
/delay 20
/notify AdventureRequestWnd 0 close
}
}
/delay 10
/goto :RequestLoop
/return
Sub MoveToMob(int MoveRange)
/declare RangeFast int local ${Math.Calc[${MoveRange}+4]}
/declare RangeMax int local ${Math.Calc[${MoveRange}+1]}
/declare RangeMin int local ${Math.Calc[${MoveRange}-2]}
/declare MyXLOC int local ${Int[${Me.X}]}
/declare MyYLOC int local ${Int[${Me.Y}]}
/declare DistanceTimer timer local 10
/doevents
:MovementLoop
/if (${Target.ID}) /face fast
/if (${Int[${Target.Distance}]}>=${RangeFast}) {
/keypress forward hold
} else /if (${Int[${Target.Distance}]}>${RangeMax}) {
/keypress forward
} else /if (${Int[${Target.Distance}]}<${RangeMin}) {
/keypress back
}
/if (!${DistanceTimer}) {
/if ((${MyXLOC}==${Int[${Me.X}]})&&(${MyYLOC}==${Int[${Me.Y}]}) && ${Target.Distance}>${MoveRange}) /call HitObstacle
/varset MyXLOC ${Int[${Me.X}]}
/varset MyYLOC ${Int[${Me.Y}]}
/varset DistanceTimer 10
/goto :Movementloop
}
/if (${Int[${Target.Distance}]}>=${RangeMin}) /goto :MovementLoop
/return
Sub HitObstacle
/if (${Corpse.Open}) /notify LootWnd DoneButton leftmouseup
/echo Obstacle hit, moving around it...
/keypress forward
/keypress back hold
/delay 5
/keypress back
/if (${Math.Rand[100]}+1>50) {
/keypress strafe_right hold
} else {
/keypress strafe_left hold
}
/delay 5
/keypress strafe_right
/keypress strafe_left
/keypress forward hold
/delay 1
/keypress jump
/return
Code: Select all
/for nTemp 20 to 60Code: Select all
Sub Main
/declare strWindow string global
/declare strChild string global
/varset strWindow AAWindow
/varset strChild AAW_Description
/call Check
/varset strWindow AdventureRequestWnd
/varset strChild AdvRqst_NPCText
/call Check
/varset strWindow BazaarWnd
/varset strChild BZW_BazaarText
/call Check
/varset strWindow BugReportWnd
/varset strChild BUGW_Prompt
/call Check
/varset strWindow ChatWindow
/varset strChild CW_ChatOutput
/call Check
/varset strWindow CombatSkillsSelectWindow
/varset strChild CSSW_SkillDescriptionStmlBox
/call Check
/varset strWindow ConfirmationDialog
/varset strChild CD_TextOutput
/call Check
/varset strWindow GMAttentionTextWnd
/varset strChild GATW_GmTextBox
/call Check
/varset strWindow GuildManagementWnd
/varset strChild GT_MOTDViewer
/call Check
/varset strWindow HelpWnd
/varset strChild HELP_Display
/call Check
/varset strWindow ItemDisplay
/varset strChild IDW_ItemDescription
/call Check
/varset strWindow JournalNPCWnd
/varset strChild CJNPC_Text
/call Check
/varset strWindow JournalTextWnd
/varset strChild CJTXT_Text
/call Check
/varset strWindow LeadershipWnd
/varset strChild LEW_Description
/call Check
/varset strWindow NoteWindow
/varset strChild NW_NoteDisplay
/call Check
/varset strWindow RaidWindow
/varset strChild RAID_MOTDViewer
/call Check
/varset strWindow StoryWnd
/varset strChild STORY_Display
/call Check
/varset strWindow SystemInfoWnd
/varset strChild SystemInfo_TextOutput
/call Check
/varset strWindow TextMessageWindow
/varset strChild TM_Outpu
/call Check
/varset strWindow TicketWindow
/varset strChild TW_KBArticleBox
/call Check
/varset strWindow TicketWindow
/varset strChild TW_NTInstructionsBox
/call Check
/varset strWindow TicketWindow
/varset strChild TW_OTCommentsBox
/call Check
/varset strWindow TipWnd
/varset strChild TIP_Display
/call Check
/varset strWindow TributeBenefitsWnd
/varset strChild TBW_Description
/call Check
/varset strWindow TributeMasterWnd
/varset strChild TMW_Description
/call Check
/endmacro
Sub Check
/if ( !${Window[${strWindow}].Child[${strChild}].Text.Equal[NULL]} ) {
/echo Window[${strWindow}] - Child[${strChild}]
/echo ${Window[${strWindow}].Child[${strChild}].Text}
/echo ======================
}
/return