A leveling guide for WoW 1.12 players of pfQuest, based on Easy Route by stealthzi (MIT). See README.md and CHANGES.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XfR1apt9f3R7SxBKB2FF2D
48 lines
2.4 KiB
Lua
48 lines
2.4 KiB
Lua
-- texlua routeplaces.lua <addon> NightElf <CLASS> 1 casual
|
|
-- A Casual route "Finish" step points at where the objective is done, not at the quest giver (who often takes it back);
|
|
-- a hand-in step with no hand-in place in the route data points at RestedXP's hand-in place in the same zone.
|
|
local here = arg[0]:match("^(.*)/") or "."
|
|
dofile(here .. "/lib.lua")
|
|
local W, ER, S, P = H.W, H.ER, H.S, H.P
|
|
local fails = 0
|
|
local function check(ok, what) if not ok then fails = fails + 1; P("FAIL " .. what) else P("ok " .. what) end end
|
|
local function placeOf(kind, id)
|
|
for _, it in ipairs(S.All()) do
|
|
local g
|
|
for _, e in ipairs(it.step.elements) do
|
|
if e.kind == "G" then g = e end
|
|
if e.kind == kind and tonumber(e.id) == id and g then return g, it.step end
|
|
end
|
|
end
|
|
end
|
|
local g, st = placeOf("C", 921)
|
|
check(g and math.abs(g.x - 59.9) < 0.6 and math.abs(g.y - 33) < 0.6, "Finish Crown of the Earth (921) points at the moonwell north of Aldrassil (" .. (g and (g.x .. ", " .. g.y) or "none") .. ")")
|
|
local t = placeOf("T", 921)
|
|
check(t and (math.abs(t.x - g.x) > 0.5 or math.abs(t.y - g.y) > 0.5), " ...not at Tenaron, where it is handed in (" .. (t and (t.x .. ", " .. t.y) or "none") .. ")")
|
|
if st then
|
|
S.Jump(st.n); ER.StepsChanged()
|
|
local tg = S.Target()
|
|
check(tg and math.abs(tg.x - 59.9) < 0.6 and math.abs(tg.y - 33) < 0.6, " ...and the arrow's target on that step is the moonwell")
|
|
end
|
|
local expect = { [929] = { 63.38, 58.1 } }
|
|
for id, xy in pairs(expect) do
|
|
local p = placeOf("C", id)
|
|
if p then check(math.abs(p.x - xy[1]) < 0.6 and math.abs(p.y - xy[2]) < 0.6, "Finish Crown of the Earth (" .. id .. ") points at the Starbreeze moonwell (" .. p.x .. ", " .. p.y .. ")") end
|
|
end
|
|
-- every Finish step of this zone: where the route data had no place, the step no longer sits on the giver's spot when a better one is known
|
|
local same, total = 0, 0
|
|
for _, it in ipairs(S.All()) do
|
|
local gg
|
|
for _, e in ipairs(it.step.elements) do
|
|
if e.kind == "G" then gg = e end
|
|
if e.kind == "C" and gg then
|
|
total = total + 1
|
|
local oz, ox, oy = ER.RouteObjectivePlace(e.id)
|
|
if oz and not (math.abs(gg.x - ox) < 0.01 and math.abs(gg.y - oy) < 0.01) and string.lower(oz) == string.lower(gg.zone) then same = same + 1 end
|
|
end
|
|
end
|
|
end
|
|
P("note " .. total .. " Finish steps in this zone, " .. same .. " keep the route data's own objective place")
|
|
P(fails == 0 and "ALL PASSED" or (fails .. " FAILED"))
|
|
REPORT()
|