diff --git a/scripts/automation/ascension.lua b/scripts/automation/ascension.lua index 1dbd264..8e3bb61 100644 --- a/scripts/automation/ascension.lua +++ b/scripts/automation/ascension.lua @@ -2507,7 +2507,7 @@ endif add_task { when = classid() < 10 and - (AT_song_duration() == 0 or not have_item("turtle totem") or not have_item("saucepan") or (can_equip_item("Rock and Roll Legend") and AT_song_duration() < 10)) and + (AT_song_duration() == 0 or not have_item("turtle totem") or not have_item("saucepan")) and meat() >= 500, task = tasks.get_starting_items, } @@ -4582,7 +4582,7 @@ endif } add_task { - prereq = want_star_key(), + prereq = level() >= 10 and want_star_key(), f = script.make_star_key, } diff --git a/scripts/automation/macros.lua b/scripts/automation/macros.lua index ef988b7..83d4683 100644 --- a/scripts/automation/macros.lua +++ b/scripts/automation/macros.lua @@ -1632,6 +1632,7 @@ function make_gremlin_macro(name, wrongmsg) cast Lasagna Bandages goto do_return endif + ]] end local use_magnet = [[use molybdenum magnet]] @@ -1647,6 +1648,8 @@ sub stall ]]..stall_action()..[[ +mark do_return + endsub if monstername ]] .. name .. [[ diff --git a/scripts/automation/scripts.lua b/scripts/automation/scripts.lua index 8415951..50a8ddc 100644 --- a/scripts/automation/scripts.lua +++ b/scripts/automation/scripts.lua @@ -2924,6 +2924,11 @@ endif } else local remaining = remaining_hidden_city_liana_zones() + if not next(remaining) then + for _, x in ipairs(places) do + remaining[x.zone] = true + end + end for _, x in ipairs(cached_stuff.completed_lianas or {}) do remaining[x] = nil end @@ -4351,7 +4356,7 @@ endif elseif advtitle == "Yeah, You're for Me, Punk Rock Giant" then return "Check behind the trash can" elseif advtitle == "Flavor of a Raver" then - return "Check Behind the Poster" + return "Check Behind the Giant Poster" end end }) end diff --git a/scripts/automation/tasks.lua b/scripts/automation/tasks.lua index 4e1b289..b55940e 100644 --- a/scripts/automation/tasks.lua +++ b/scripts/automation/tasks.lua @@ -92,53 +92,6 @@ function get_automation_tasks(script, cached_stuff) return result, resulturl end - if playerclass("Accordion Thief") and AT_song_duration() < 10 then - inform "pick up RnR" - script.ensure_worthless_item() - if not have_item("hermit permit") then - store_buy_item("hermit permit", "m") - end - if not have_item("hot buttered roll") then - async_post_page("/hermit.php", { action = "trade", whichitem = get_itemid("hot buttered roll"), quantity = 1 }) - end - if not have_item("hot buttered roll") then - critical "Failed to buy hot buttered roll." - end - if not have_item("casino pass") then - store_buy_item("casino pass", "m") - end - if not have_item("casino pass") then - critical "Failed to buy casino pass." - end - if not have_item("big rock") then - if not have_item("ten-leaf clover") then - uncloset_item("ten-leaf clover") - end - if not have_item("ten-leaf clover") and not have_item("disassembled clover") then - script.trade_for_clover() - end - if not have_item("ten-leaf clover") and have_item("disassembled clover") then - use_item("disassembled clover") - end - if not have_item("ten-leaf clover") then - stop "No ten-leaf clover." - end - script.maybe_ensure_buffs { "Mental A-cue-ity" } - async_get_page("/casino.php", { action = "slot", whichslot = 11 }) - if not have_item("big rock") then - critical "Didn't get big rock." - end - end - set_result(smith_items("hot buttered roll", "big rock")) - script.unequip_if_worn("stolen accordion") - set_result(smith_items("heart of rock and roll", "stolen accordion")) - if not have_item("Rock and Roll Legend") then - critical "Couldn't smith RnR" - end - did_action = have_item("Rock and Roll Legend") - return result, resulturl, did_action - end - if not playerclass("Accordion Thief") and AT_song_duration() < 5 then inform "buy toy accordion" set_result(store_buy_item("toy accordion", "z")) diff --git a/scripts/kolproxy-internal/automate.lua b/scripts/kolproxy-internal/automate.lua index 1595f31..12d874a 100644 --- a/scripts/kolproxy-internal/automate.lua +++ b/scripts/kolproxy-internal/automate.lua @@ -13,17 +13,12 @@ if not can_read_state() then end log_time_interval("automate:initialize", function() -which = path -if (requestpath == "/login.php" and text == "kolproxy login redirect") or (requestpath == "/afterlife.php" and path == "/main.php" and text == "kolproxy afterlife ascension") then - which = "player login" -end - +automate_url = intercept_url setup_variables() end) log_time_interval("run automators", function() -if which ~= "/loggedout.php" then - local automate_url = path +if path ~= "/loggedout.php" then text = run_functions(path, text, function(target, pt) for _, x in ipairs(automators[target] or {}) do getfenv(x.f).text = pt @@ -38,7 +33,7 @@ if which ~= "/loggedout.php" then end end) -return text +return text, automate_url end diff --git a/scripts/kolproxy-internal/browser-request.lua b/scripts/kolproxy-internal/browser-request.lua index 9d50699..21e9a07 100644 --- a/scripts/kolproxy-internal/browser-request.lua +++ b/scripts/kolproxy-internal/browser-request.lua @@ -96,19 +96,25 @@ local function run_wrapped_function_internal(f_env) local intercept_path, intercept_query = kolproxycore_splituri(intercept_url) f_env.text = intercept_pt + f_env.intercept_url = intercept_url f_env.path = intercept_path f_env.query = intercept_query f_env.effuri_params = kolproxycore_decode_uri_query(intercept_url) or {} - local automate_pt = automate_wrapped(f_env) + local automate_pt, automate_url = automate_wrapped(f_env) - descit("automate", automate_pt, intercept_url) + descit("automate", automate_pt, automate_url) + + local automate_path, automate_query = kolproxycore_splituri(automate_url) f_env.text = automate_pt + f_env.automate_url = automate_url + f_env.path = automate_path + f_env.query = automate_query local printer_pt = printer_wrapped(f_env) - descit("printer", printer_pt, intercept_url) + descit("printer", printer_pt, automate_url) return printer_pt, intercept_url end diff --git a/scripts/paths/standard.lua b/scripts/paths/standard.lua index 3aa8cfa..c23cea3 100644 --- a/scripts/paths/standard.lua +++ b/scripts/paths/standard.lua @@ -23,5 +23,5 @@ function get_unavailable_items() end function item_is_unavailable(item) - return get_unavailable_items()[get_itemname(item)] + return get_unavailable_items()[get_itemname(item)] ~= nil end