Mistvale Quests - Auto Fill Book with Quest Items
Posted: Fri Feb 17, 2023 6:44 pm
I tend to use [claimall a lot, so having to sort through a cramped inventory to find the MV quest items was a bit of a pain, especially since they disappear quickly. Realizing I'd be doing it like a thousand + times, I realized it's time to macro it.
It's pretty much entirely hands-off except when you get a new Armaments quest, or when you complete an item-collection objective. You just need to update the `mvtargetitem` list with the ones needed by the quest.
I also tend to immediately go and fill the Daemon Leather book with regular leather once it's completed to restart the quest, so it doesn't usually need any editing.

It's pretty much entirely hands-off except when you get a new Armaments quest, or when you complete an item-collection objective. You just need to update the `mvtargetitem` list with the ones needed by the quest.
I also tend to immediately go and fill the Daemon Leather book with regular leather once it's completed to restart the quest, so it doesn't usually need any editing.
Code: Select all
// Mistvale Armaments Quests
// It *should* auto-detect the quest book based on ID/color
// Just need to update the pushlist directives for the one/two
// items that are required by the quest.
// Once the objective is complete, comment it out again as there's
// no journal entry I could see that would tell it to skip that
// item and it'll get stuck in a loop trying to add the item.
// There's a "mvquestitems" list defined shortly below the target list
// with commented item names that can be copied from.
// - Eremite
//
// -------- Daemonic Leather Quest --------
// Find the quest if not defined - should auto-update when
// picking up a new quest.
if not @findobject 'dleatherquest'
@findtype 0xe3b 2609 'backpack' 'any' 0
@setalias 'dleatherquest' 'found'
endif
if @findtype 0x195c 338 'backpack' 'any' 0
@useobject 'dleatherquest'
waitforgump 3311653225 1500
replygump 0xc563d169 700
while @findtype 0x195c 338 'backpack' 'any' 0
waitfortarget 1500
target! 'found'
endwhile
endif
@canceltarget
// -------- Armor Quests --------
// Find the quest book thingy if it's not already defined:
if not @findobject 'mvquest'
@findtype 0x3f3d 2624 'backpack' 'any' 0
@setalias 'mvquest' 'found'
endif
// Reaper Quest Book
if not @findobject 'mvquest'
@findtype 0x3f3d 2536 'backpack' 'any' 0
@setalias 'mvquest' 'found'
endif
// Sash and Cloak Quest Book
if not @findobject 'mvquest'
@findtype 0x3f3d 2527 'backpack' 'any' 0
@setalias 'mvquest' 'found'
endif
// Find the trash 4 tokens bag for excess items:
if not @findobject 'trashcan'
@findtype 0x9b2 1173 'backpack' 'any' 0
@setalias 'trashcan' 'found'
endif
// Remove the target item list every time.
@removelist 'mvtargetitem'
// List of objects the quest wants. Update for each new quest or
// completed objective in current quest:
@removelist 'mvtargetitem'
@createlist 'mvtargetitem'
//@pushlist 'mvtargetitem' 0x3b92 // Update to the ID(s) from list below
// @pushlist 'mvtargetitem' 0x3f31 // 2nd quest item. (after first 6)
// Add all items to the questbook.
for 0 in 'mvtargetitem'
if @findtype mvtargetitem[] 'any' 'backpack' 'any' 0
@useobject 'mvquest'
waitforgump 3311653225 1500
@replygump 0xc563d169 700
while @findtype mvtargetitem[] 'any' 'backpack' 'any' 0
waitfortarget 1500
target! 'found'
endwhile
@canceltarget
endif
endfor
// Delete the unnecessary quest items with Trash 4 Tokens bag
if not @listexists 'mvquestitems'
@createlist 'mvquestitems'
@pushlist 'mvquestitems' 0x3407 // Crystallized Ectoplasm
@pushlist 'mvquestitems' 0x393d // Rough Undead Sinew
@pushlist 'mvquestitems' 0x3f30 // Scale of Vile Deeds
@pushlist 'mvquestitems' 0x3cd4 // Unearthly Stone
@pushlist 'mvquestitems' 0x3b92 // Scrap of Undead Hide
@pushlist 'mvquestitems' 0x3f31 // Essence of the Abyss
endif
for 0 in 'mvquestitems'
while @findtype mvquestitems[] 'any' 'backpack' 'any' 0
moveitem 'found' 'trashcan'
endwhile
endfor
// ------ DONE ------
headmsg '*done*' 64