zarillion / handynotes-plugins

A collection of HandyNotes plugins for World of Warcraft.
Other
46 stars 34 forks source link

10.2.5 #397

Closed wyldclaw closed 7 months ago

wyldclaw commented 8 months ago
pepedressingroom commented 8 months ago

Moon Priestess Lasara in Amirdrassil sells 3 items. amirdrassil.lua

map.nodes[46507063] = Collectible({
    icon = 'peg_bl',
    scale = 2.0,
    label = '{npc:216286}', -- Moon Priestess Lasara
    rewards = {
        Transmog({item = 210424, slot = L['cosmetic'], count = 250, note = 'Alliance Only'}), -- Darnassian Tabard
        Transmog({item = 210418, slot = L['cosmetic'], count = 250}), -- Darnassian Cloak
        Transmog({item = 210415, slot = L['cosmetic'], count = 250}) -- Darnassian Moonsilver Spaulders
    }
})

3 new manuscrpits added in 10.2.5 common.lua

ns.DRAGON_CUSTOMIZATIONS = {
    RenewedProtoDrake = {
        LoveArmor = Item({item = 211812, quest = 79088}), -- 10.2.5
    },
    WindingSlitherdrake = {
        LunarFestivalArmor = Item({item = 211868, quest = 79112}), -- 10.2.5
    },
    ManuscriptofEndlessPossibility = Spell({item = 212518, spell = 431709}) -- Endless Possibility
}

Update Outland Cup vendor list dragonraces.lua

local DragonridingVendor = Class('DragonridingVendor', Collectible, {
    icon = 4638724,
    group = ns.groups.DRAGONRACE,
    note = L['dr_vendor_note'],
    rewards = {
        ns.reward.Spell({item = 212518, spell = 431709, count = '50'}), -- Manuscript of Endless Possibility
        DC.SetCount(DC.WindborneVelocidrake.TealScales, '50'),
        DC.SetCount(DC.WindingSlitherdrake.YellowScales, '50'),
        DC.SetCount(DC.WindingSlitherdrake.BlondeHair, '25'),
        DC.SetCount(DC.WindingSlitherdrake.CurvedNoseHorn, '25'),
        DC.SetCount(DC.WindingSlitherdrake.HornedBrow, '25'),
        DC.SetCount(DC.WindingSlitherdrake.PairedHorns, '25'),
        DC.SetCount(DC.WindingSlitherdrake.SharkFinnedTail, '25'),
        Section(_G.OTHER .. ' ' .. _G.SOURCE .. ' ' .. _G.TRACKER_HEADER_WORLD_QUESTS), -- old manuscripts
        DC.SetCount(DC.RenewedProtoDrake.ProngedTail, '25'),
        DC.SetCount(DC.RenewedProtoDrake.DualHornedCrest, '25'), -- 10.2.5
        DC.SetCount(DC.WindborneVelocidrake.HookedSnout, '25'),
        DC.SetCount(DC.WindborneVelocidrake.CurledHorns, '25'), -- 10.2.5
        DC.SetCount(DC.HighlandDrake.CurledBackHorns, '25'),
        DC.SetCount(DC.HighlandDrake.SweptSpikedHead, '25'), -- 10.2.5
        DC.SetCount(DC.CliffsideWylderdrake.CurledHeadHorns, '25'),
        DC.SetCount(DC.CliffsideWylderdrake.LargeTailSpikes, '25'), -- 10.2.5
        Spacer(), --
        Transmog({item = 206588, slot = L['cosmetic'], count = '20'}), -- Drake Racer's Helmet
        Transmog({item = 206589, slot = L['cosmetic'], count = '20'}), -- Drake Racer's Shoulderpads
        Transmog({item = 206590, slot = L['cosmetic'], count = '20'}), -- Drake Racer's Jersey
        Transmog({item = 206591, slot = L['cosmetic'], count = '20'}), -- Drake Racer's Handwraps
        Transmog({item = 206592, slot = L['cosmetic'], count = '20'}), -- Drake Racer's Belt
        Transmog({item = 206593, slot = L['cosmetic'], count = '20'}), -- Drake Racer's Leggings
        Transmog({item = 206594, slot = L['cosmetic'], count = '20'}), -- Drake Racer's Boots
        -- Following added in 10.2.5
        Transmog({item = 211877, slot = L['cosmetic'], count = '20'}), -- Drake Racer's Scarf
        Transmog({item = 211881, slot = L['cosmetic'], count = '20'}), -- Outlandish Drake Racer's Helmet
        Transmog({item = 211882, slot = L['cosmetic'], count = '20'}), -- Outlandish Drake Racer's Shoulderpads
        Transmog({item = 211883, slot = L['cosmetic'], count = '20'}), -- Outlandish Drake Racer's Jersey
        Transmog({item = 211884, slot = L['cosmetic'], count = '20'}), -- Outlandish Drake Racer's Handwraps
        Transmog({item = 211885, slot = L['cosmetic'], count = '20'}), -- Outlandish Drake Racer's Belt
        Transmog({item = 211886, slot = L['cosmetic'], count = '20'}), -- Outlandish Drake Racer's Leggings
        Transmog({item = 211887, slot = L['cosmetic'], count = '20'}), -- Outlandish Drake Racer's Boots
        Transmog({item = 211888, slot = L['cosmetic'], count = '20'}) -- Outlandish Drake Racer's Scarf
    }
}) -- Dragonriding Vendor

The new event vendor added in 10.2.5 thaldraszus.lua

map.nodes[61373139] = Collectible({
    icon = 'peg_bl',
    scale = 2.0,
    label = '{npc:209192}', -- Provisioner Aristta
    note = 'Exchange {currency:2657} for transmogs and a mount.',
    rewards = {
        Mount({item = 192796, id = 1638, count = 20000}), -- Explorer's Stonehide Packbeast
        ns.reward.Spacer(),
        Transmog({item = 208456, slot = L['cosmetic'], count = 15000}), -- Archivist's Elegant Bag
        Transmog({item = 212794, slot = L['cosmetic'], count = 15000}), -- Historian's Hefty Habersack
        Transmog({item = 208452, slot = L['cosmetic'], count = 15000}), -- Historian's Dapper Cap
        Transmog({item = 208547, slot = L['cosmetic'], count = 12000}), -- Archivist's Reading Spectacles
        Transmog({item = 208546, slot = L['cosmetic'], count = 12000}), -- Archivist's Rose-Tinted Glasses
        Transmog({item = 212637, slot = L['cosmetic'], count = 7000}), -- Historian's Striders
        Transmog({item = 212636, slot = L['cosmetic'], count = 7000}), -- Historian's Trousers
        Transmog({item = 212635, slot = L['cosmetic'], count = 5000}), -- Historian's Utility Belt
        Transmog({item = 212634, slot = L['cosmetic'], count = 5000}), -- Historian's Fingerless Gloves
        Transmog({item = 212633, slot = L['cosmetic'], count = 5000}), -- Historian's Fitted Vest
        ns.reward.Spacer(),
        Transmog({item = 208458, slot = L['offhand'], count = 10000}), -- Archivist's Extravagant Lantern
        Transmog({item = 208450, slot = L['offhand'], count = 10000}), -- Coiled Archivist's Rope
        Transmog({item = 213276, slot = L['1h_mace'], count = 10000}), -- Archivist's Magnifying Mace
        Transmog({item = 208455, slot = L['1h_mace'], count = 10000}), -- Archivist's Sturdy Hook
        Transmog({item = 208453, slot = L['1h_mace'], count = 10000}), -- Archivist's Super Scooper
        Transmog({item = 213275, slot = L['1h_sword'], count = 10000}), -- Archivist's Rockpuller
        Transmog({item = 208454, slot = L['1h_axe'], count = 10000}), -- Archivist's Mining Pick
        Transmog({item = 212870, slot = L['dagger'], count = 10000}), -- Archivist's Stone Chisel
        Transmog({item = 213274, slot = L['staff'], count = 10000}), -- Archivist's Pathfinder
        Transmog({item = 208459, slot = L['2h_mace'], count = 10000}), -- Archivist's Improvised Cudgel
        Transmog({item = 208457, slot = L['2h_mace'], count = 10000}), -- Archivist's Spelunking Torch
        Transmog({item = 212941, slot = L['gun'], count = 10000, note = _G.ITEM_ACCOUNTBOUND}) -- Archivist's "Light Touch"
    }
})
wyldclaw commented 8 months ago

Thank you @pepedressingroom for your hard work! All of your data has been implemented for 10.2.5.

pepedressingroom commented 8 months ago

Alara'shinu questIDs: {78606, 78622, 78623, 78660, 78677, 78678} I forgot to post this before.

------------------ SECRET DEMON HUNTER WARGLAIVE: ALARA'SHINU ------------------

local Alarashinu = Class('Alarashinu', Collectible, {
    icon = 5061798,
    quest = {78606, 78622, 78623, 78660, 78677, 78678}, -- a hidden quest chain
    questCount = true,
    class = 'DEMONHUNTER',
    rewards = {Transmog({item = 210961, type = L['warglaive']})} -- Alara'shinu
}) 

function Alarashinu.getters:note()
    local note = L['alarashinu_note'] .. '\n'
    note = note .. QuestStatus(self.quest[1], 1, L['alarashinu_note_stage1'], true)
    note = note .. QuestStatus(self.quest[2], 2, L['alarashinu_note_stage2'], true)
    note = note .. QuestStatus(self.quest[3], 3, L['alarashinu_note_stage3'], true)
    note = note .. QuestStatus(self.quest[4], 4, L['alarashinu_note_stage4'], true)
    note = note .. QuestStatus(self.quest[5], 5, L['alarashinu_note_stage5'], true)
    note = note .. QuestStatus(self.quest[6], 6, L['alarashinu_note_stage6'], true)
    return note .. '\n\n' .. L['alarashinu_note_end']
end

map.nodes[50536096] = Alarashinu({id = 213029}) -- Landeron Felfury

local brokenshore = ns.maps[646] or Map({id = 646, settings = false})
brokenshore.nodes[71674147] = Alarashinu({id = 213114}) -- Memory of Landeron Felfury

local valsharah = ns.maps[641] or Map({id = 641, settings = false})
valsharah.nodes[51185689] = Alarashinu({id = 213186}) -- Memory of Landeron Felfury
L['alarashinu_note'] = '{item:210961}, a hidden fel-tinged nature warglaive.\n\nSpecial Visual Effects: \nYou leave behind a trail of flowers when using {spell:195072}/ {spell:189110}/ {spell:198793} with Alara\'shinu equipped or transmogged!'
L['alarashinu_note_stage1'] = 'Speak with {npc:213029} at {location:Central Encampment} in {location:Emerald Dream}.'
L['alarashinu_note_stage2'] = 'Head to {location:The Lost Temple} in {location:Broken Shore}, witness a {npc:213114}.'
L['alarashinu_note_stage3'] = 'Head to {location:Temple of Elune} in {location:Val\'sharah}, witness another {npc:213186}.'
L['alarashinu_note_stage4'] = 'After the memory plays out, a {npc:213248} will appear carrying his Warlgiave.'
L['alarashinu_note_stage5'] = 'Imbue {npc:213308} with your fel flame.'
L['alarashinu_note_stage6'] = 'Loot {npc:213381} and receive {item:210961}.'
L['alarashinu_note_end'] = 'Return to {npc:213029}, and he has a bonus dialog after you get this warglaive.'
pepedressingroom commented 8 months ago

(Live) New Black Market Vendor: Ms. Xiulan <Madam Goya's Assistant>

local Xiulan = Class('Xiulan', Collectible, {
    icon = 'peg_bl',
    scale = 2.0,
    label = '{npc:189644}', -- Ms. Xiulan <Madam Goya's Assistant>
    parent = map.id,
    note = 'before end of August', --
    rewards = {
        Mount({item = 211084, id = 1944, count = 1200000}), -- Gold Resonating Crystal
        Spacer(), Appearance({item = 211300, count = 200000}), -- Arsenal: Whispering Temple Blades
        Transmog({item = 211099, type = L['shield'], note = L['cosmetic'], count = 100000}), -- Gilded Scarab Bulwark
        Transmog({item = 211096, type = L['gun'], note = L['cosmetic'], count = 100000}), -- Gold-Plated Witchhunter's Carbine
        Transmog({item = 211294, type = L['polearm'], note = L['cosmetic'], count = 100000}), -- Marauder King's Body Carver
        Transmog({item = 211097, type = L['2h_axe'], note = L['cosmetic'], count = 90000}), -- Gilded Crown Splitter
        Transmog({item = 211159, type = L['shield'], note = L['cosmetic'], count = 80000}), -- Royal Witch Doctor's Guard
        Transmog({item = 211145, type = L['cloak'], note = L['cosmetic'], count = 80000}), -- Royal Witch Doctor's Trophies
        Transmog({item = 211295, type = L['plate'], note = L['cosmetic'], count = 75000}), -- Wrathful Crusader's Helm
        Transmog({item = 211259, note = L['cosmetic'], count = 75000}) -- Regal Gryphon Rider's Headgear
    }
})

val.nodes[19215029] = Xiulan()

I add Appearance() for Ensemble, Arsenal, Illusion items in rewards.lua I don't know if there is any API to do with these kind of items, so I used part of Recipe() code.

-------------------------------------------------------------------------------
---------------------------------- APPEARANCE ---------------------------------
-------------------------------------------------------------------------------

-- Ensemble, Arsenal, Illusion

local Appearance = Class('Appearance', Item, {type = _G.APPEARANCE_LABEL})

function Appearance:IsObtained()
    local info = C_TooltipInfo.GetItemByID(self.item)
    if info then
        for _, line in ipairs(info.lines) do
            if line.leftText and line.leftText == _G.ITEM_SPELL_KNOWN then
                return true
            end
        end
    end
    return false
end

function Appearance:GetStatus()
    return self:IsObtained() and Green(L['known']) or Red(L['missing'])
end
Dairyman commented 8 months ago

FIY: one can use line type for such things

local KnownLineType = Enum.TooltipDataLineType.RestrictedSpellKnown
function Appearance:IsObtained()
    local info = C_TooltipInfo.GetItemByID(self.item)
    if info then
        for _, line in ipairs(info.lines) do
            if line.type == KnownLineType then
                return true
            end
        end
    end
    return false
end
pepedressingroom commented 7 months ago

Add "The Big Dig" node in _azurespan.lua

-------------------------------------------------------------------------------
--------------------------------- THE BIG DIG ---------------------------------
-------------------------------------------------------------------------------

map.nodes[26964646] = Collectible({
    icon = 5315246,
    label = '{npc:209134}', -- Eadweard Dalyngrigge
    rewards = {
        ns.reward.Quest({id = 79226}), -- The Big Dig: Traitor's Rest (Weekly)
        Achievement({
            id = 19790,
            criteria = {
                65402, -- Tenured Archivist
                65398, -- When a Rock is Just a Rock
                65403, -- Goggle Wobble
                65399, -- Clued In
                65400, -- Relic Rescuer
                65401, -- Tome Comber
                65420, -- Finally At Rest
                65421 -- Just One More Thing
            }
        }), -- The Archives Called, You Answered
        Spacer(), --
        Section('Tome Drop'), --
        Mount({item = 212645, id = 2038}), -- Clayscale Hornstrider
        -- MMO-champion says the mount drops from Immaculate Tome (Epic)
        -- {item:213185} -- Dusty Centaur Tome (Uncommon)
        -- {item:213175} -- Dusty Djaradin Tome (Uncommon)
        -- {item:213188} -- Dusty Dracthyr Tome (Uncommon)
        -- {item:213187} -- Dusty Drakonid Tome (Uncommon)
        -- {item:213186} -- Dusty Niffen Tome (Uncommon)
        -- {item:213189} -- Preserved Dragonkin Tome (Rare)
        -- {item:213190} -- Preserved Djaradin Tome (Rare)
        -- {item:213176} -- Preserved Isles Tome (Rare)
        -- {item:213177} -- Immaculate Tome (Epic)
        Spacer(), --
        Transmog({item = 212692, slot = L['cosmetic']}), -- Excavator's Dusky Fedora
        Transmog({item = 212638, slot = L['cosmetic']}), -- Excavator's Work Shirt
        Transmog({item = 212793, slot = L['cosmetic']}), -- Excavator's Pack of Findings
        Transmog({item = 212640, slot = L['cosmetic']}), -- Excavator's Trusty Satchel
        Transmog({item = 212641, slot = L['cosmetic']}), -- Excavator's Rugged Pants
        Transmog({item = 212639, slot = L['cosmetic']}), -- Excavator's Glovelettes
        Transmog({item = 212642, slot = L['cosmetic']}), -- Excavator's Boots
        Spacer(), --
        Currency({id = 2657}), -- Mysterious Fragment 
        Currency({id = 2819}) -- Azerothian Archives
    }
})
pepedressingroom commented 7 months ago

subzone map "Traitor's Rest" (2262) is only active when event being active but dispearing when over. If using traitorsRest.nodes[26964646], it will dispear after the event. I don't know how to deal with it.

-- local traitorsRest = Map({id = 2262, settings = false}) -- Traitor's Rest -- 2262:26964646

pepedressingroom commented 7 months ago

@wyldclaw I have a question about variable assignment in lua coding. Here is an example:

map.nodes[C_QuestLog.IsQuestFlaggedCompleted(65962) and 60337972 or 57297892] = Vendor({
    id = 198470,
    rewards = {Toy({item = 201435})}, -- Shuffling Sands
}) -- Usodormu <Hourglass Vendor>

Even I have completed quest:65962, the addon still initialize [57297892], and I have to reload to show [60337972]. Is this code not allowed? And how to deal with this situation?

The same thing happens when I want to set the prices of barter goods in Zaralek Cavern. It initializes as 'Barter Brick' even when I have unlocked quest:75728, and I have to reload to set as 'Barter Boulder'.

local barter, price = _, {}

local function SetBarterRate()
    -- local Loammlevel = C_MajorFactions.GetCurrentRenownLevel(2564)
    local UnlockBoulder = C_QuestLog.IsQuestFlaggedCompleted(75728)
    local BrickPrice = {3, 25, 35, 55, 80, 85, 90, 170}
    local BoulderPrice = {1, 10, 25, 30, 40, 45, 40, 85}
    local SchemingTopper = function() 
        local q = {75871, 75870, 75836, 75869}
        local n = {249, 999, 4999, 9999}
        for i = 1, #q do
            d = C_QuestLog.IsQuestFlaggedCompleted(q[i])
            if d then return n[i] end
        end
    end
    if UnlockBoulder
    then price = BoulderPrice
        price[9] = SchemingTopper()
        barter = 205188 -- Barter Boulder
    else price = BrickPrice 
        barter = 204985 -- Barter Brick
    end
end

SetBarterRate()
map.nodes[58085381] = Vendor({
    id = 204693,
    note = format(L['ponzo_note'], barter),
    rewards = {
        Item({item = 205984, weekly = 76077, count = price[1]}), -- Bartered Dig Map
        Spacer(),
        Item({item = 205452, count = price[2]}), -- Ponzo's Cream
        Item({item = 205453, count = price[5]}), -- Glimmerogg Timeshare Voucher
        Spacer(),
        DC.SetCount(DC.WindingSlitherdrake.HairyBrow, price[4]),
        DC.SetCount(DC.WindingSlitherdrake.ClusterChinHorn, price[4]),
        DC.SetCount(DC.WindingSlitherdrake.CurledNose, price[4]),
        Spacer(),
        Pet({item = 205120, id = 3537, count = price[6]}), -- Thimblerig
        Mount({item = 205209, id = 1736, count = price[8]}), -- Boulder Hauler
        Transmog({item = 205421, slot = L['cosmetic'], count = price[9]}) -- Ponzo's Scheming Topper
        -- talk to Ponzo to cut price {75869,75836,75870,75871}
    }
}) -- Ponzo <Barterer Extraordinaire>
Dairyman commented 7 months ago

Quest information which C_QuestLog.IsQuestFlaggedCompleted uses are not available on load. They are available after the PLAYER_LOGIN event.

pepedressingroom commented 7 months ago

Thanks, @Dairyman .

wyldclaw commented 7 months ago

Is this code not allowed? And how to deal with this situation?

@pepedressingroom You may need to swap the values of questDepValue (I think they are right) but I believe this should work?

---------------------------- TOY: SHUFFLING SANDS -----------------------------

local Usodormu = Class('Usodormu', Vendor, {
    id = 198470,
    questDeps = 65962,
    rewards = {Toy({item = 201435})} -- Shuffling Sands
}) -- Usodormu

function Usodormu:PrerequisiteCompleted()
    return C_QuestLog.IsQuestFlaggedCompleted(65962) == self.questDepValue
end

map.nodes[60337972] = Usodormu({questDepValue = false})
map.nodes[57297892] = Usodormu({questDepValue = true})
wyldclaw commented 7 months ago

The same thing happens when I want to set the prices of barter goods in Zaralek Cavern. It initializes as 'Barter Brick' even when I have unlocked quest:75728, and I have to reload to set as 'Barter Boulder'.

@pepedressingroom I believe this should work as well. I did have to switch your item numbers for currency (used to be barter) because you had them in the opposite positions I think. Maybe just double check all the values!

local Ponzo = Class('Ponzo', Vendor, {id = 204693}) -- Ponzo

function Ponzo.getters:note()
    local currency = 204985 -- Barter Brick
    if C_QuestLog.IsQuestFlaggedCompleted(75728) then
        currency = 205188 -- Barter Boulder
    end
    return format(L['ponzo_note'], currency)
end

function Ponzo.getters:rewards()
    local BrickPrice = {3, 25, 35, 55, 80, 85, 90, 170}
    local BoulderPrice = {1, 10, 25, 30, 40, 45, 40, 85}

    local SchemingTopper = function() 
        local q = {75871, 75870, 75836, 75869}
        local n = {249, 999, 4999, 9999}
        for i = 1, #q do
            d = C_QuestLog.IsQuestFlaggedCompleted(q[i])
            if d then return n[i] end
        end
    end

    local price = BrickPrice
    if C_QuestLog.IsQuestFlaggedCompleted(75728) then
        price = BoulderPrice
        price[9] = SchemingTopper()
    end

    return {
        Item({item = 205984, weekly = 76077, count = price[1]}), -- Bartered Dig Map
        ns.reward.Spacer(),
        Item({item = 205452, count = price[2]}), -- Ponzo's Cream
        Item({item = 205453, count = price[5]}), -- Glimmerogg Timeshare Voucher
        ns.reward.Spacer(),
        DC.SetCount(DC.WindingSlitherdrake.HairyBrow, price[4]),
        DC.SetCount(DC.WindingSlitherdrake.ClusterChinHorn, price[4]),
        DC.SetCount(DC.WindingSlitherdrake.CurledNose, price[4]),
        ns.reward.Spacer(),
        Pet({item = 205120, id = 3537, count = price[6]}), -- Thimblerig
        Mount({item = 205209, id = 1736, count = price[8]}), -- Boulder Hauler
        Transmog({item = 205421, slot = L['cosmetic'], count = price[9]}) -- Ponzo's Scheming Topper
        -- talk to Ponzo to cut price {75869,75836,75870,75871}
    }  
end

map.nodes[58085381] = Ponzo()
pepedressingroom commented 7 months ago

@wyldclaw , I have been confused for days on this issue. Thank you a lot for guiding my way.

wyldclaw commented 7 months ago

@pepedressingroom Of course! Glad I could help. You may need to go back in and clean up the code a bit. I accidentally left a few things in those examples after testing. For example you don't need questDeps = 65962, or ns.reward.Spacer(), should just be Spacer(), stuff like that!