-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathidlepower.lic
More file actions
58 lines (50 loc) · 1.1 KB
/
idlepower.lic
File metadata and controls
58 lines (50 loc) · 1.1 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
=begin
author: Thyatir
=end
unless XMLData.game =~ /^(?:DRF|DR|DRPlat)$/
echo "This script is meant for DragonRealms Prime, Platinum, or Fallen. It will likely cause problems on whatever game you're trying to run it on..."
exit
end
unless (running? "drinfomon")
echo "This script requires the utility script drinfomon to be running."
exit
end
# Let the user adjust the cycle time
cycle_time ||= script.vars[1]
# default the cycle time to 1 minute if the user didn't specify anything
cycle_time ||= "1m"
def doAction(a, *waitValues)
fput a
actualWaitValues = Array.new(waitValues)
actualWaitValues.unshift("Roundtime")
line = waitfor actualWaitValues
if "Roundtime".eql?(line)
pause '1s'
line = doAction a, waitValues
end
return line
end
def doConcentrate
if DRStats.guild =~ /Moon Mage|Warrior Mage|Trader/
doAction "perc", "You reach out|Xibar"
waitrt
end
end
def doHealth
if DRStats.guild =~ /Empath/
doAction "perc health"
waitrt
end
end
def doHunt
if DRSkill.getxp("Perception") < 33
doAction "hunt"
waitrt
end
end
while true
doConcentrate
doHunt
doHealth
pause cycle_time
end