-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhortensia_oath.lua
More file actions
124 lines (101 loc) · 3.61 KB
/
hortensia_oath.lua
File metadata and controls
124 lines (101 loc) · 3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
require("utils/lib_loader")
LOG_ENABLED = true
ALLOWED_AP_OPTIONS = {
"AP10",
"AP30",
"AP50",
"APMAX",
"APSTONE"
}
ALLOW_RP_POTIONS = true
FINAL_WAVE_SKILL = true
if LOG_ENABLED then
log("\n\n\nbegin script logging:")
end
local rp_amount = 1
local rp_sel = retry(oath_battle_party_select_rp_select_tap_rp("RP"..tostring(rp_amount)))
-------------------------------
-- Options for Battle Select --
-------------------------------
local missions_first_battle = function()
return retry(missions_three_battles_tap_battle("FIRST"))(10)
end
local missions_daily_fourth = function()
return retry(missions_daily_tap_mission("FOURTH"))(10)
end
---------------------------------
-- Options for Battle Complete --
---------------------------------
local oath_complete_saved_mission = retry(oath_battle_complete_tap_saved_mission)
local oath_complete_daily_missions = function()
retry(oath_battle_complete_tap_oath_home)()
retry(oath_home_tap_missions)()
retry(missions_tap_daily_missions)()
end
--------------------------------------
-- Options for Oath Not Encountered --
--------------------------------------
local oath_not_encountered_third_knight_quest = retry(missions_knights_quest_tap_quest("THIRD"))
local oath_not_encountered_noop = FUNCTIONS.id
function execute_with(mission_sel, on_oath_complete, oath_not_encountered)
return function(k)
return with_insufficient_ap_check(mission_sel, ALLOWED_AP_OPTIONS)(function()
-- Regular Mission
retry(battle_helper_select_tap_first_helper)(2)
retry(battle_party_select_tap_confirm)()
return in_battle_daemon()(function()
mission_complete_proceed_to_rewards_confirm()
if mission_complete_battle_complete_friend_request() then
if LOG_ENABLED then
log("battle_complete, got friend request prompt, tap_discard")
end
retry(mission_complete_friend_request_tap_discard)()
end
if mission_complete_rank_up() then
if LOG_ENABLED then
log("battle_complete, rank_up_tap_confirm")
end
retry(mission_complete_rank_up_tap_confirm)()
end
retry(mission_complete_rewards_tap_confirm)(10)
if (not encountered_oath()) then
oath_not_encountered()
return k()
end
local function enter_oath_battle()
retry(oath_battle_prep_tap_proceed)(10)
retry(battle_helper_select_tap_first_helper)()
retry(battle_party_select_tap_confirm)()
return with_insufficient_rp_check(rp_sel, 1, ALLOW_RP_POTIONS)(function()
return in_battle_daemon(oath_battle_complete)(function()
on_oath_complete()
return k()
end, function()
retry(battle_failed_tap_retreat)(10)
return enter_oath_battle()
end)
end)
end
-- Oath Battle
retry(oath_encountered_tap_proceed)()
retry(oath_battle_prep_tap_proceed)(10)
retry(battle_helper_select_tap_first_helper)()
retry(battle_party_select_tap_confirm)()
return with_insufficient_rp_check(rp_sel, rp_amount, ALLOW_RP_POTIONS)(function()
return in_battle_daemon(oath_battle_complete, battle_interval)(function()
on_oath_complete()
return k()
end, function()
retry(battle_failed_tap_retreat)(10)
return enter_oath_battle()
end)
end)
end)
end)
end
end
local execute = execute_with(missions_first_battle, oath_complete_saved_mission, oath_not_encountered_third_knight_quest)
local function main()
return execute(main)
end
main()