forked from daemitus/SomethingNeedDoing
-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathRelic.lua
102 lines (86 loc) · 2.19 KB
/
Relic.lua
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
--[[
Description: auto gather collectables for the miner or botanist relic steps
Author: gabibbomannaro
Link: https://discord.com/channels/1162031769403543643/1162799234874093661/1174327265870483456
]]
if (GetClassJobId() == 17) then
action_name_one_more = "Ageless Words"
action_name_meticulous = "Meticulous Woodsman"
elseif (GetClassJobId() == 16) then
action_name_one_more = "Solid Reason"
action_name_meticulous = "Meticulous Prospector"
end
function action(action_name)
yield("/action \""..action_name.."\"")
yield("/wait 1")
while(GetCharacterCondition(42)) do
yield("/wait 0.2")
end
yield("/wait 0.5")
end
function current_coll()
return tonumber(GetNodeText("GatheringMasterpiece", 134))
end
function actions_left()
return tonumber(GetNodeText("GatheringMasterpiece", 55))
end
function collect_all()
while((actions_left() > 0) and IsAddonVisible("GatheringMasterpiece")) do
yield("/echo Actions left: "..actions_left())
action("Collect")
end
end
function full_loop()
yield("/echo Doing high GP gathering loop...")
action("Scrutiny")
action(action_name_meticulous)
action("Scrutiny")
action(action_name_meticulous)
if current_coll() == 1000 then
action("Collect")
elseif current_coll() > 800 then
action(action_name_meticulous)
else
action("Scour")
end
action(action_name_one_more)
if current_coll() < 1000 then
action(action_name_meticulous)
end
if (HasStatus("Eureka Moment")) then
if actions_left() > 3 then
action("Collect")
end
action("Wise to the World")
end
collect_all()
end
function limited_loop()
yield("/echo Doing low GP loop...")
action("Scour")
action(action_name_meticulous)
action(action_name_meticulous)
if (current_coll() < 570) then
action(action_name_meticulous)
end
collect_all()
end
function main()
while(not IsAddonVisible("GatheringMasterpiece")) do
yield("/echo Waiting for node...")
yield("/wait 1")
end
yield("/echo At node.")
current_gp = GetGp()
yield("/echo Current GP: "..current_gp)
if (current_gp > 700) then
full_loop()
else
limited_loop()
end
yield("/echo Done gathering!")
yield("/wait 3")
end
while(true) do
main()
end