-
Notifications
You must be signed in to change notification settings - Fork 8
/
keepsigns.lic
75 lines (64 loc) · 2.02 KB
/
keepsigns.lic
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
=begin
Yet another script to keep your CoL signs up.
Open the script and comment/uncomment some lines to pick your signs.
https://github.com/matt-lowe/lich-scripts
tillmen@lichproject.org
=end
sleep [10-(Time.now - $login_time),0].max
script.want_downstream = false
clear
sign_list = Array.new
if script.vars[1] == 'conf'
echo 'confluence'
sign_list.push 'Warding'
sign_list.push 'Defending'
sign_list.push 'Striking'
sign_list.push 'Smiting'
sign_list.push 'Swords'
sign_list.push 'Staunching'
sign_list.push 'Dissipation'
else
sign_list.push 'Warding'
sign_list.push 'Striking'
# sign_list.push 'Thought'
sign_list.push 'Defending'
sign_list.push 'Smiting'
sign_list.push 'Staunching'
sign_list.push 'Deflection'
sign_list.push 'Swords'
#sign_list.push 'Shields'
sign_list.push 'Dissipation'
end
sign_list.delete_if { |sign| !Spell[sign].known? }
Thread.new {
wait_until { dead? }
Script.self.kill
}
loop {
wait_while { Spell['Council Punishment'].active? }
sleep 1
sign_list.each { |sign_name|
sign = Spell["Sign of #{sign_name}"]
unless sign.active?
wait_while { muckled? or (checkprep != 'None') }
waitrt?
waitcastrt?
spirit_count = 0
# [ Spell['Sign of Swords'], Spell['Sign of Shields'],Spell['Sign of Dissipation'] ].each { |sn|
# spirit_count += 1 if sn.active? and (sn.time_per - sn.timeleft) < 3
# }
# if sign.affordable? and (sign.spirit_cost.zero? or (percentspirit > 75 and spirit_count < 2))
if sign.affordable? and (sign.spirit_cost.zero? or (percentspirit > 75 and not [ 'Swords', 'Shields', 'Dissipation' ].any? { |sign_name| sn = Spell["Sign of #{sign_name}"]; sn.active? and (sn.time_per - sn.timeleft) < 2 }))
script.want_downstream = true
result = sign.cast
if result =~ /^The power from your sign dissipates into the air\.|^You realize your powers would be useless here, and cease your action\./
room_count = XMLData.room_count
wait_while { room_count == XMLData.room_count }
end
script.want_downstream = false
clear
break
end
end
}
}