-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhortensia_sixhr_raid.lua
More file actions
106 lines (83 loc) · 2.92 KB
/
hortensia_sixhr_raid.lua
File metadata and controls
106 lines (83 loc) · 2.92 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
require("utils/lib_loader")
LOG_ENABLED = true
ALLOWED_AP_OPTIONS = {
"AP10",
"AP30",
}
ALLOW_RP_POTIONS = true
if LOG_ENABLED then
log("\n\n\nbegin script logging:")
end
local rp_amount = 3
local rp_sel = retry(oath_battle_party_select_rp_select_tap_rp("RP"..tostring(rp_amount)))
-------------------------------
-- Options for Battle Select --
-------------------------------
local sixhr_home_sp_mission = function()
return retry(sixhr_home_tap_sp_mission)(10)
end
---------------------------------
-- Options for Battle Complete --
---------------------------------
local sixhr_raid_complete_home = retry(sixhr_raid_complete_tap_home)
function execute_with(mission_sel, on_oath_complete)
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_sixhr_raid()) then
return k()
end
local function enter_oath_battle()
retry(oath_battle_prep_tap_proceed)(10)
retry(battle_helper_select_tap_first_helper)(2)
retry(battle_party_select_tap_confirm)()
return with_insufficient_rp_check(rp_sel, 1, ALLOW_RP_POTIONS)(function()
return in_battle_daemon(sixhr_raid_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)(2)
retry(battle_party_select_tap_confirm)()
return with_insufficient_rp_check(rp_sel, rp_amount, ALLOW_RP_POTIONS)(function()
return in_battle_daemon(sixhr_raid_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(sixhr_home_sp_mission, sixhr_raid_complete_home)
local function main()
return execute(main)
end
main()