- Joined
- May 17, 2015
- RedCents
- 6,058¢
Run new toon to PoK and pickup free gear along the way
If you just want Traveler's pack set all other declares to 0 and start in PoK
If you just want Traveler's pack set all other declares to 0 and start in PoK
Rich (BB code):
|**----------
newtoon.mac
-------------
Howto:
1. Required: MQ2Nav mesh tutoriala + tutorialb + poknowledge + bazaar
2. Modify declare values for what you want
3. /mac newtoon
1907a (LamahHerder)
+ Rewrote logic
+ MQ2Nav required for movement
? My PC on Brekt Runtime Foreground=303seconds Background=346seconds
? 345 lines
-------------
newtoon.mac
----------**|
| Remove /squelch for reports
#define DOMSG /echo
#define DODEBUG /squelch /echo
sub main
/declare BINDPOK int outer 1 | Bind in PoK
/declare GETMERC int outer 1 | Get Tank Merc
/declare GETCHARM int outer 1 | Get Tutorial Charm
/declare GETFELLOW int outer 1 | Get Fellowship Token
/declare GETWRBAG int outer 1 | Get 25% reduction bag
/call checkReport
/while (${BINDPOK} || ${GETMERC} || ${GETCHARM} || ${GETFELLOW} || ${GETWRBAG}) {
/call checkReport
/if (${Zone.ShortName.Equal[tutoriala]}) /call doTUTA
/if (${Zone.ShortName.Equal[tutorialb]}) /call doTUTB
/if (${Zone.ShortName.Equal[poknowledge]}) /call doPOK
/if (${Zone.ShortName.Equal[bazaar]}) /call doBazaar
}
/call checkReport
/return
sub doTUTA
DODEBUG ${Macro.CurSub}
/if (${FindItemCount[Tome]}) /itemnotify "${FindItem[Tome]}" rightmouseup
/while (!${Window[targetwindow]}) {
/if (${Window[alertwnd]}) /notify alertwnd ALW_Close_Button leftmouseup
/if (${Window[rewardselectionwnd]}) /notify rewardselectionwnd RewardSelectionChooseButton leftmouseup
/if (${Window[LargeDialogWindow]}) /invoke ${Window[largedialogwindow].Child[LDW_OkButton].LeftMouseUp}
/delay 5
}
/if (${Bool[${Task[Jail Break!].Index}]}==FALSE) {
/if (${Spawn[Arias].Distance}>50) /call navToYX 11.29 88.40
/call targetID ${Spawn[npc Arias].ID}
/keypress HAIL
/say escape
/delay 5s ${Window[TaskSelectWnd].Open}==TRUE
/invoke ${Window[TaskSelectWnd].Child[TSEL_AcceptButton].LeftMouseUp}
/delay 5s ${Bool[${Task[Jail].Index}]}==TRUE
}
/call navToYX 8.62 66.86
/call navToYX 51.38 27.85
/call navToID ${Spawn[npc The Gloomingdeep Jailor].ID}
/attack on
/while (${Bool[${FindItem[=The Gloomingdeep Jailor's Key].ID}]}==FALSE) {
/delay 1
/if (!${Window[inventorywindow]}) /keypress INVENTORY
/if (${Window[advancedlootwnd]}) /notify advancedlootwnd ADLW_PLL_LootAllBtn leftmouseup
}
/delay 1s
/nomodkey /itemnotify "The Gloomingdeep Jailor's Key" leftmouseup
/call targetID ${Spawn[pet Arias].ID}
/click left target
/if (${Window[inventorywindow]}) /keypress INVENTORY
/delay 5s ${Window[GiveWnd].Open}
/invoke ${Window[GiveWnd].Child[GVW_Give_Button].LeftMouseUp}
/keypress HAIL
/delay 99s ${Zone.ShortName.Equal[tutorialb]}==TRUE
/return
sub doTUTB
DODEBUG ${Macro.CurSub}
/delay 1s
/if (${Task[Basic].Objective[2].Status.NotEqual[Done]}) {
/call navToID ${Spawn[npc Arias].ID}
/keypress HAIL
/delay 1s
}
/if (${FindItemCount[Charm]} || !${GETCHARM}) /goto :portPOK
| Gloomingdeep arms
/if (${Task[Basic].Objective[4].Status.NotEqual[Done]}) {
/call navToID ${Spawn[npc Vahlara].ID}
/keypress HAIL
/call cleanWindows
/while (!${Cursor.ID}) {
/delay 2
/if (${FindItemCount[Gloomingdeep]}) /break
}
/if (${Cursor.ID}) /autoinventory
/call cleanWindows
/say others
}
| Ghetto Jboots
/if (${Task[Basic].Objective[8].Status.NotEqual[Done]}) {
/call navToID ${Spawn[npc Basher Alga].ID}
/keypress HAIL
/delay 5s ${Window[TaskSelectWnd].Open}==TRUE
/call cleanWindows
/keypress HAIL
/while (!${FindItemCount[Worn Totem]}) {
/call cleanWindows
/delay 5
}
/if (${FindItemCount[Worn Totem]}) /useitem "Worn Totem"
/delay 2s
}
| Chat with Prathun (needed for final reward)
/if (${Task[Basic].Objective[7].Status.NotEqual[Done]}) {
/call navToID ${Spawn[npc Prathun].ID}
/keypress HAIL
/call cleanWindows
}
| Merc Tank
/if (!${Mercenary.Index} && ${GETMERC}) {
/call navToID ${Spawn[npc Elegist].ID}
/click right target
/delay 1s
/if (${Me.Subscription.Equal[FREE]}) {
/invoke ${Window[mmtw_merchantwnd].Child[MMTW_SubtypeListBox].Select[3]}
} else {
/invoke ${Window[mmtw_merchantwnd].Child[MMTW_SubtypeListBox].Select[9]}
}
/delay 1s
/invoke ${Window[mmtw_merchantwnd].Child[MMTW_HireButton].LeftMouseUp}
}
| Bank Bag (not shared bank)
/if (${FindItemCount[Backpack]}==1) {
/call navToID ${Spawn[npc Lyndroh].ID}
/click right target
/delay 1s
/nomodkey /itemnotify bank1 leftmouseup
/delay 1s
/autoinventory
/invoke ${Window[bigbankwnd].Child[BIGB_DoneButton].LeftMouseUp}
}
| Noob song/spell/tome
/if (${Task[Basic].Objective[6].Status.NotEqual[Done]}) {
/call navToID ${Spawn[npc Rytan].ID}
/say blessed
/call cleanWindows
/delay 1s
/autoinventory
/call cleanWindows
/delay 1s
/if (${FindItemCount[Song]}) /nomodkey /itemnotify "${FindItem[Song]}" rightmouseup
/if (${FindItemCount[Spell]}) /nomodkey /itemnotify "${FindItem[Spell]}" rightmouseup
/if (${FindItemCount[Tome]}) /nomodkey /itemnotify "${FindItem[Tome]}" rightmouseup
/delay 9s (!${Cursor.ID})
/if (${Window[spellbookwnd]}) /keypress SPELLBOOK
/call cleanWindows
}
| Weapon sharpen (needed for final reward)
/if (${Task[Basic].Objective[3].Status.NotEqual[Done]}) {
/call navToID ${Spawn[npc Absor].ID}
/nomodkey /itemnotify mainhand leftmouseup
/delay 1s
/if (${Cursor.ID}) /click left target
/delay 2s (${Window[givewnd]})
/if (${Window[givewnd]}) /notify givewnd GVW_Give_Button leftmouseup
/delay 2s (!${Window[givewnd]})
/call cleanWindows
/if (${FindItemCount[Sharpened]}) /itemnotify "${FindItem[Sharpened]}" leftmouseup
/if (${FindItemCount[Polished]}) /itemnotify "${FindItem[Polished]}" leftmouseup
/delay 1s
/if (${Cursor.ID}) /autoinventory
}
| Get skull charm
/call navToYX -137.90 -13.43
/call targetID ${Spawn[npc Arias].ID}
/keypress HAIL
/while (!${Cursor.ID}) {
/delay 2
}
/if (${Cursor.ID}) /autoinventory
/call cleanWindows
/varset GETCHARM 0
:portPOK
/say I am ready to leave
/delay 99s ${Zone.ShortName.Equal[PoKnowledge]}==TRUE
/return
sub doPOK
DODEBUG ${Macro.CurSub}
/if (${BINDPOK}) {
/call navToYX -189.91 -82.76
/call targetID ${Spawn[npc Soulbinder Jera].ID}
/say bind your soul
/varset BINDPOK 0
}
/if (${GETWRBAG} || ${GETFELLOW}) {
/call navToYX -102.52 -113.86
}
| Start GETWRBAG
/if (!${Bool[${Task[Bazaar].Index}]}>0 && ${GETWRBAG}) {
/call navToID ${Spawn[npc Secalna].ID}
/keypress HAIL
/delay 1s
/invoke ${Window[TaskSelectWnd].Child[TSEL_TaskList].Select[${Window[TaskSelectWnd].Child[TSEL_TaskList].List[The Bazaar]}]}
/delay 1s
/invoke ${Window[TaskSelectWnd].Child[TSEL_AcceptButton].LeftMouseUp}
/if (${GETFELLOW}) {
/call navToYX 165.79 -110.27
}
}
| Get fellowship token
/if (${GETFELLOW}) {
/call navToYX 430.86 68.75
/call targetID ${Spawn[npc Randall].ID}
/say how
/call cleanWindows
/varset GETFELLOW 0
}
| GETWRBAG 1
/if (${Bool[${Task[Bazaar].Index}]}>0 && ${GETWRBAG}) {
/call navToID ${Spawn[npc Nebbo Watzet].ID}
/say bazaar
}
:zoneToBazaar
/if (${GETWRBAG}) {
/call navToDoorID 6 | Facade
/delay 99s ${Zone.ShortName.Equal[bazaar]}==TRUE
}
/return
sub doBazaar
DODEBUG ${Macro.CurSub}
/if (${Zone.ShortName.Equal[bazaar]} && ${Bool[${Task[Bazaar].Index}]}>0 && ${GETWRBAG}) {
/call navToID ${Spawn[npc Nermin].ID}
/say business
/call navToPortalID 57 | BLU 59 BLK 57 BLU
/call navToID ${Spawn[npc Elan].ID}
/say items
/call cleanWindows
/call navToPortalID 59 | BLU 59 BLK 57 BLU
/call navToPortalID 58 | RED 61 BLK 58 RED
/call navToID ${Spawn[npc Helena].ID}
/say trader
/call cleanWindows
/call navToPortalID 61 | RED 61 BLK 58 RED
/call navToID ${Spawn[npc Sage Vindillar].ID}
/say test subject
/delay 99s ${Zone.ShortName.Equal[poknowledge]}==TRUE
/call navToID ${Spawn[npc Nebbo].ID}
/say find
/delay 1s
/call cleanWindows
/varset GETWRBAG 0
}
/return
sub doGetFellow
DODEBUG ${Macro.CurSub}
/if (!${GETFELLOW}) /return
/return
sub doGetWRBag
DODEBUG ${Macro.CurSub}
/if (!${GETWRBAG}) /return
/return
sub doReturnTUTB
DODEBUG ${Macro.CurSub}
/if (${RETURNTUTB}) {
/call navToID ${Spawn[npc Secalna Galnor].ID}
/say send
/return
sub navToDoorID(doorID)
DODEBUG ${Macro.CurSub}
/doortarget id ${doorID}
/nav door id ${doorID} click
/if (!${Navigation.Active}) /delay 5
/while (${Navigation.Active}) {
/delay 5
}
/return
sub navToPortalID(doorID)
DODEBUG ${Macro.CurSub}
/declare origZone int local ${Zone.ID}
/doortarget id ${doorID}
/nav door id ${doorID} click
/if (!${Navigation.Active}) /delay 5
/while (${Navigation.Active}) {
/delay 5
}
/while (${Switch.Distance}<60 || ${Me.Moving}) {
/delay 5
}
/return
sub navToYX(Yloc, Xloc)
DODEBUG ${Macro.CurSub}
/nav locyx ${Yloc} ${Xloc}
/delay 2s !${Navigation.Active}
:stillMoving
/delay 5 !${Navigation.Active}
/if (${Navigation.Active}) /goto :stillMoving
/return
sub navToID(newID)
DODEBUG ${Macro.CurSub}${newID}
/nav id ${newID}
/if (!${Navigation.Active}) /delay 1s
/while (${Navigation.Active} || ${Target.ID}!=${newID}) {
/delay 5
/if (${Target.ID}!=${newID}) {
/if (${Spawn[${newID}].LineOfSight}) {
/call targetID ${newID}
}
}
}
/return
sub targetID(newID)
DODEBUG ${Macro.CurSub}
/if (${Target.ID}==${newID}) /return
/target id ${newID}
/delay 2s ${Target.ID}==${newID}
/return
sub cleanWindows
DODEBUG ${Macro.CurSub}
:loopLargeDialogWindow
/if (${Window[LargeDialogWindow]}) /invoke ${Window[largedialogwindow].Child[LDW_OkButton].LeftMouseUp}
/if (${Window[TaskSelectWnd]}) /nomodkey /notify TaskSelectWnd TSEL_AcceptButton leftmouseup
/if (${Window[rewardselectionwnd]}) /nomodkey /notify rewardselectionwnd RewardSelectionChooseButton leftmouseup
/delay 1s ${Window[LargeDialogWindow].Open}==TRUE
/if (${Cursor.ID}) /autoinventory
/if (!${Window[LargeDialogWindow]}) /return
/goto :loopLargeDialogWindow
/return
sub checkReport
DODEBUG ${Macro.CurSub}
/if (${Me.ZoneBound[0].ShortName.Equal[poknowledge]}) /varset BINDPOK 0
/if (${Mercenary.Index}) /varset GETMERC 0
/if (${FindItem[Kobold Skull Charm].ID}) /varset GETCHARM 0
/if (${FindItem[Fellowship Registration Insignia].ID}) /varset GETFELLOW 0
/if (${FindItem[Sturdy Traveler's Pack].ID}) /varset GETWRBAG 0
/if (${BINDPOK}) DOMSG [ ${Macro.Name} - ${Me.Name} ] Todo: BINDPOK
/if (${GETMERC}) DOMSG [ ${Macro.Name} - ${Me.Name} ] Todo: GETMERC
/if (${GETCHARM}) DOMSG [ ${Macro.Name} - ${Me.Name} ] Todo: GETCHARM
/if (${GETFELLOW}) DOMSG [ ${Macro.Name} - ${Me.Name} ] Todo: GETFELLOW
/if (${GETWRBAG}) DOMSG [ ${Macro.Name} - ${Me.Name} ] Todo: GETWRBAG
DODEBUG (${BINDPOK} && ${GETMERC} && ${GETCHARM} && ${GETFELLOW} && ${GETWRBAG})
/if (!${BINDPOK} && !${GETMERC} && !${GETCHARM} && !${GETFELLOW} && !${GETWRBAG}) {
DOMSG [ ${Macro.Name} - ${Me.Name} ] Finished in ${Macro.RunTime}
}
/return
Last edited:


