forked from brycole/gemstone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlockpicks.lic
57 lines (55 loc) · 3.56 KB
/
lockpicks.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
=begin
LOCKPICKS
DISPLAY LOCKPICK INFORMATION
DISPLAY MAX LOCK AND TRAP INFORMATION
USAGE: ;lockpicks max or ;lockpicks list
=end
pick_list = [["copper ", 1.00, " 100", " poor", 0],["brass ", 1.00, " 250", " very weak", 0],["steel ", 1.10, " 500", " average", 1],["ivory ", 1.20, " 750", "above average", 1],["gold ", 1.20, " 2000", " weak", 3],["silver ", 1.30, " 2500", " average", 3],["mithril", 1.45, " 6000", "above average", 5],["ora ", 1.55, " 5000", " strong", 5],["glaes ", 1.60, " 9500", " incredible", 8],["laje ", 1.75, " 17000", " average", 12],["vultite", 1.80, " 30000", " average", 20],["rolaren", 1.90, " 36000", " very strong", 20],["veniom ", 2.20, " 50000", " excellent", 25],["invar ", 2.25, " 75000", " incredible", 35],["alum ", 2.30, " 23000", " very weak", 16],["golvern", 2.35, " 95000", " strongest", 40],["kelyn ", 2.40, " 62000", " excellent", 30],["vaalin ", 2.50, " 125000", " incredible", 50]]
lock_list = []
arange = []
yrange = []
### CALCULATE LOCKS AND BUILD ARRAYS ###
pick_list.each{ |pick,mod, blank1, blank2, blank3|
lock = []
lock.push(pick)
lock.push(((Skills.to_bonus(Skills.pickinglocks) + Stats.dex[1]) * mod).floor)
lock.push((((Stats.level / 2.0) + (Skills.pickinglocks / 10.0) + (Stats.dex[1] / 2.0) + (Stats.int[1] / 2.0) + 30 + Skills.to_bonus(Skills.pickinglocks) + Stats.dex[1]) * mod).floor) if Spells.minorelemental >= 3
lock.push((mod * (((Stats.level / 2) + (Skills.pickinglocks / 10) + (Stats.dex[1] / 2) + (Stats.int[1] / 2) + 30) / 2 + Skills.to_bonus(Skills.pickinglocks) + Stats.dex[1])).round) unless Spells.minorelemental >= 3
arange.push(lock)
maxtrap2 = Stats.dex[1] + Skills.to_bonus(Skills.disarmingtraps)
lored_trap = Stats.dex[1] + Skills.to_bonus(Skills.disarmingtraps) + (Stats.level / 2) + (Skills.to_bonus(Skills.disarmingtraps) / 10) + (Stats.agi[1] / 2) + (Stats.dis[1] / 2) if Spells.minorelemental >= 4
lored_trap = Stats.dex[1] + Skills.to_bonus(Skills.disarmingtraps) + ((Stats.level / 2) + (Skills.to_bonus(Skills.disarmingtraps) / 10) + (Stats.agi[1] / 2) + (Stats.dis[1] / 2)) / 2 unless Spells.minorelemental >= 4
maxtrap = []
maxtrap = [maxtrap2, lored_trap]
}
max_lock = proc{|arange|
respond "ALL LOCKPICKS CALCULATED"
respond ""
arange.each{ |pick,unlore,lore|
respond "** #{pick}, unlored: #{unlore}, lored: #{lore}"
}
respond "
Max unlored trap: #{Stats.dex[1] + Skills.to_bonus(Skills.disarmingtraps)} and max lored trap is #{Stats.dex[1] + Skills.to_bonus(Skills.disarmingtraps) + (Stats.level / 2) + (Skills.to_bonus(Skills.disarmingtraps) / 10) + (Stats.agi[1] / 2) + (Stats.dis[1] / 2)} and imbed lore max trap is #{ Stats.dex[1] + Skills.to_bonus(Skills.disarmingtraps) + ((Stats.level / 2) + (Skills.to_bonus(Skills.disarmingtraps) / 10) + (Stats.agi[1] / 2) + (Stats.dis[1] / 2)) / 2}
**** WARNING, LORED VALUES ARE NOT ACCURATE. ****"
}
if script.vars[1] =~ /max/
max_lock.call(arange)
elsif script.vars[1] =~ /help/i
respond "Usage is:
;lockpicks max
or
;lockpicks list"
elsif script.vars[1] =~ /list/
respond "**************************************************************************"
respond "************************* DISPLAYING LOCKPICK LIST ***************************"
respond "**************************************************************************"
respond "Material: MOD: PRICE: STRENGTH: RANKS TO USE"
pick_list.each{|name, mod, price, strength, ranks|
respond "#{name} : #{mod}: #{price}: #{strength}: #{ranks}"
}
else
respond "Usage is:
;lockpicks max
or
;lockpicks list"
end