forked from elanthia-online/dr-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon-summoning.lic
128 lines (112 loc) · 3.69 KB
/
common-summoning.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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# quiet
=begin
Documentation: https://elanthipedia.play.net/Lich_script_development#common-summoning
=end
custom_require.call(%w[common common-travel drinfomon])
module DRCS
module_function
def summon_weapon(moon = nil, element = nil, ingot = nil, skill = nil)
if DRStats.moon_mage?
unless moon
echo "Couldn't find any moons to cast moonblade with"
return
end
fput('get moon')
elsif DRStats.warrior_mage?
get_ingot(ingot, true)
case DRC.bput("summon weapon #{element} #{skill}", 'You lack the elemental charge', 'you draw out')
when 'You lack the elemental charge'
summon_admittance
summon_weapon(moon, element, nil, skill)
end
stow_ingot(ingot)
else
echo "Unable to summon weapons as a #{DRStats.guild}"
end
pause 1
waitrt?
DRC.fix_standing
end
def get_ingot(ingot, swap)
return unless ingot
DRC.bput("get my #{ingot} ingot", 'You get')
DRC.bput('swap', 'You move') if swap
end
def stow_ingot(ingot)
return unless ingot
DRC.bput("stow my #{ingot} ingot", 'You put')
end
def break_summoned_weapon(item)
return if item.nil?
DRC.bput("break my #{item}", 'Focusing your will', 'disrupting its matrix', "You can't break")
end
def shape_summoned_weapon(skill, ingot = nil)
if DRStats.moon_mage?
skill_to_shape = { 'Staves' => 'blunt', 'Twohanded Edged' => 'huge', 'Large Edged' => 'heavy', 'Small Edged' => 'normal' }
shape = skill_to_shape[skill]
DRC.bput('get moon', 'already holding that', 'You grab')
DRC.bput("shape #{GameObj.right_hand.noun} to #{shape}", 'you adjust the magic that defines its shape', 'already has')
elsif DRStats.warrior_mage?
get_ingot(ingot, false)
case DRC.bput("shape my #{GameObj.right_hand.noun} to #{skill}", 'You lack the elemental charge', 'You reach out')
when 'You lack the elemental charge'
summon_admittance
shape_summoned_weapon(skill, nil)
end
stow_ingot(ingot)
else
echo "Unable to shape weapons as a #{DRStats.guild}"
end
pause 1
waitrt?
end
def moon_used_to_summon_weapon
glance_to_moon = {
'black' => 'katamba',
'red-hot' => 'yavash',
'blue-white' => 'xibar',
'could not find' => nil
}
# 'glance moon' is a little misleading, but it will glance
# at either a moonblade or moonstaff, never a moon
glance = DRC.bput('glance moon', glance_to_moon.keys)
glance_to_moon[glance]
end
def turn_summoned_weapon
case DRC.bput("turn my #{GameObj.right_hand.noun}", 'You lack the elemental charge', 'You reach out')
when 'You lack the elemental charge'
summon_admittance
turn_summoned_weapon
end
pause 1
waitrt?
end
def push_summoned_weapon
case DRC.bput("push my #{GameObj.right_hand.noun}", 'You lack the elemental charge', 'Closing your eyes', 'That\'s as')
when 'You lack the elemental charge'
summon_admittance
push_summoned_weapon
end
pause 1
waitrt?
end
def pull_summoned_weapon
case DRC.bput("pull my #{GameObj.right_hand.noun}", 'You lack the elemental charge', 'Closing your eyes', 'That\'s as')
when 'You lack the elemental charge'
summon_admittance
pull_summoned_weapon
end
pause 1
waitrt?
end
def summon_admittance
case DRC.bput('summon admittance', 'You align yourself to it', 'further increasing your proximity', 'Going any further while in this plane would be fatal', 'Summon allows Warrior Mages to draw', 'You are a bit too distracted')
when 'You are a bit too distracted'
DRC.retreat
summon_admittance
end
pause 1
waitrt?
DRC.fix_standing
end
end