Skip to content

Commit

Permalink
Automation improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
houeland committed Feb 21, 2015
1 parent d1c66d0 commit 64601d3
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 31 deletions.
7 changes: 2 additions & 5 deletions scripts/automation/ascension.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2925,7 +2925,7 @@ endif
inform("vamping out: " .. mainstat_type())
vamp_out(mainstat_type())
did_action = true
elseif script.have_chateau_mantegna() then
elseif have_chateau_mantegna() then
stop "TODO: rest at mantegna"
else
use_dancecard()
Expand Down Expand Up @@ -4843,10 +4843,7 @@ endif
f = script.do_gotta_worship_them_all,
}

add_task {
when = quest("There Can Be Only One Topping") and (level() >= 11 and not quest_text("Your first step is to find the Black Market")),
task = tasks.there_can_be_only_one_topping,
}
add_tasklist(tasks.tasklist_there_can_be_only_one_topping)

add_task {
prereq = have_item("ancient amulet") and have_item("Eye of Ed") and have_item("Staff of Fats"),
Expand Down
4 changes: 2 additions & 2 deletions scripts/automation/macros.lua
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ function cannon_action()
elseif mp() <= 20 and can_easily_attack_with_weapon() then
return attack_action()
end
return macro_cast_skill { pastathrall() and "Cannelloni Cannon" or "???", "Saucestorm", "Cannelloni Cannon", "Bawdy Refrain", fury() >= 1 and "Furious Wallop" or "???", "Saucegeyser", "Kneebutt", "Toss", "Clobber", "Ravioli Shurikens", "Fist of the Mummy", "Mild Curse" }
return macro_cast_skill { pastathrall() and "Cannelloni Cannon" or "???", "Saucestorm", "Cannelloni Cannon", "Bawdy Refrain", fury() >= 1 and "Furious Wallop" or "???", "Saucegeyser", "Kneebutt", "Toss", "Clobber", "Ravioli Shurikens", "Roar of the Lion", "Fist of the Mummy", "Mild Curse" }
end

function estimate_elemental_weapon_damage_sum()
Expand Down Expand Up @@ -292,7 +292,7 @@ function serpent_action()
if not maybe_macro_cast_skill(skill_list) and can_easily_attack_with_weapon() then
return attack_action()
end
return macro_cast_skill(skill_list) or cannon_action()
return maybe_macro_cast_skill(skill_list) or cannon_action()
end

function geyser_action()
Expand Down
1 change: 1 addition & 0 deletions scripts/automation/scripts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,7 @@ function get_automation_scripts(cached_stuff)
table.insert(xs, "Power of Heka")
table.insert(xs, "Hide of Sobek")
table.insert(xs, "Bounty of Renenutet")
table.insert(xs, "Purr of the Feline")
end
if not even_in_fist and not ignore_buffing_and_outfit then
if want_bonus.plusitems then
Expand Down
1 change: 1 addition & 0 deletions scripts/automation/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ function get_ascension_automation_settings(want_bonus)
"Misty Robe",
"Rain-Doh red wings",
"Camp Scout backpack",
"Time Bandit Time Towel",
"barskin cloak",
"giant gym membership card",
},
Expand Down
90 changes: 66 additions & 24 deletions scripts/automation/tasks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -652,32 +652,74 @@ mark m_done
}
end

function t.there_can_be_only_one_topping()
if ascension_script_option("manual lvl 9 quest") then
stop "STOPPED: Ascension script option set to do lvl 9 quest manually"
end
if quest_text("Find a way across") or quest_text("Finish building a bridge across") then
return t.do_orc_chasm()
elseif quest_text("Speak to the Highland Lord") or quest_text("Go see the Highland Lord") then
return {
message = "visit highland lord",
action = function()
get_page("/place.php", { whichplace = "highlands", action = "highlands_dude" })
refresh_quest()
did_action = not (quest_text("Speak to the Highland Lord") or quest_text("Go see the Highland Lord"))
end
}
elseif quest_text("* Oil Peak") then
return t.do_oil_peak()
elseif quest_text("* A-boo Peak") then
return t.do_aboo_peak()
elseif quest_text("* Twin Peak") then
return t.do_twin_peak()
else
stop "TODO: handle only one topping quest"
end
local function want_lvl_9_quest()
return level() >= 11 and not quest_text("Black Market")
end

t.manual_lvl_9_quest = {
when = quest("There Can Be Only One Topping") and
want_lvl_9_quest() and
ascension_script_option("manual lvl 9 quest"),
task = {
message = "do lvl 9 quest manually",
nobuffing = true,
action = function()
stop "STOPPED: Ascension script option set to do lvl 9 quest manually"
end,
}
}

t.find_way_across_bridge = {
when = quest("There Can Be Only One Topping") and
want_lvl_9_quest() and
(quest_text("Find a way across") or quest_text("Finish building a bridge across")),
task = t.do_orc_chasm,
}

t.visit_highland_lord = {
when = quest("There Can Be Only One Topping") and
want_lvl_9_quest() and
(quest_text("Speak to the Highland Lord") or quest_text("Go see the Highland Lord")),
task = {
message = "visit highland lord",
action = function()
get_page("/place.php", { whichplace = "highlands", action = "highlands_dude" })
refresh_quest()
did_action = not (quest_text("Speak to the Highland Lord") or quest_text("Go see the Highland Lord"))
end
}
}

t.light_oil_peak = {
when = quest("There Can Be Only One Topping") and
want_lvl_9_quest() and
quest_text("* Oil Peak"),
task = t.do_oil_peak,
}

t.light_aboo_peak = {
when = quest("There Can Be Only One Topping") and
want_lvl_9_quest() and
quest_text("* A-boo Peak"),
task = t.do_aboo_peak,
}

t.light_twin_peak = {
when = quest("There Can Be Only One Topping") and
want_lvl_9_quest() and
quest_text("* Twin Peak"),
task = t.do_twin_peak,
}

t.tasklist_there_can_be_only_one_topping = {
t.manual_lvl_9_quest,
t.find_way_across_bridge,
t.visit_highland_lord,
t.light_oil_peak,
t.light_aboo_peak,
t.light_twin_peak,
}

t.do_daily_dungeon = {
message = "do daily dungeon",
buffs = { "Astral Shell", "Elemental Saucesphere", "Scarysauce" },
Expand Down

0 comments on commit 64601d3

Please sign in to comment.