-
Notifications
You must be signed in to change notification settings - Fork 1
/
RedMage.lua
174 lines (151 loc) · 6.16 KB
/
RedMage.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
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
-- Welcome to Logical's Ninja Lua. This Lua is used for changing gear during precast and midcast and then swapping to the appropriate set for aftercast.
-- It will also cancel shadows for you when necessary to recast new shadows.
-- Please refer to my video on my NextGames YouTube channel for how to properly utilize this LUA.
-- This is what sets the initial set that you normally want to be in by default.
tp_mode = 'refresh'
mb_mode = 'mbnin'
function self_command(command)
local args = split_args(command)
if args[1] == 'tp' then
tp_mode = args[2]
elseif args[1] == 'mb' then
mb_mode = args[2]
end
end
function split_args(args)
fields = {}
args:gsub("([^ ]*) ?", function(c)
table.insert(fields, c)
end)
return fields
end
function get_sets()
-- This is where we will define our precast sets. These are sets of gear that get equiped BEFORE the spell or ability is used.
sets.precast = {}
sets.precast.fc = {
ammo="Sapience Orb",
head="Atro. Chapeau +2",
body="Atrophy Tabard +2",
hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
legs="Leth. Fuseau +1",
feet="Leth. Houseaux +1",
neck="Orunmila's Torque",
waist="Eschan Stone",
left_ear="Enchntr. Earring +1",
right_ear="Malignance Earring",
left_ring="Rahab Ring",
right_ring="Kishar Ring",
back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
-- This is where we will define our midcast sets. These are sets of gear that get equiped BEFORE the spell or ability lands.
sets.midcast = {}
sets.midcast.magicacc = {
ammo="Regal Gem",
head="Malignance Chapeau",
body="Malignance Tabard",
hands="Malignance Gloves",
legs="Malignance Tights",
feet="Malignance Boots",
neck={ name="Duelist's Torque", augments={'Path: A',}},
waist="Eschan Stone",
left_ear="Digni. Earring",
right_ear="Malignance Earring",
left_ring={ name="Metamor. Ring +1", augments={'Path: A',}},
right_ring="Stikini Ring +1",
back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
sets.midcast.savage = {
ammo="Yetshila +1",
head={ name="Adhemar Bonnet +1", augments={'STR+12','DEX+12','Attack+20',}},
body="Ken. Samue +1",
hands="Mummu Wrists +2",
legs={ name="Mochi. Hakama +3", augments={'Enhances "Mijin Gakure" effect',}},
feet={ name="Adhe. Gamashes +1", augments={'STR+12','DEX+12','Attack+20',}},
neck={ name="Ninja Nodowa +2", augments={'Path: A',}},
waist={ name="Sailfi Belt +1", augments={'Path: A',}},
left_ear="Odr Earring",
right_ear={ name="Lugra Earring +1", augments={'Path: A',}},
left_ring="Gere Ring",
right_ring="Regal Ring",
back={ name="Andartia's Mantle", augments={'AGI+20','Accuracy+20 Attack+20','AGI+10','Weapon skill damage +10%',}},
}
-- This is where we will define our aftercast sets. These are sets of gear that get equiped AFTER the spell or ability is used. Normally this is used to put you back into your current TP set.
sets.aftercast = {}
sets.aftercast.refresh = {
ammo="Regal Gem",
head={ name="Viti. Chapeau +1", augments={'Enfeebling Magic duration','Magic Accuracy',}},
body="Atrophy Tabard +2",
hands="Malignance Gloves",
legs="Malignance Tights",
feet="Malignance Boots",
neck="Sanctity Necklace",
waist="Eschan Stone",
left_ear="Digni. Earring",
right_ear="Malignance Earring",
left_ring="Defending Ring",
right_ring="Stikini Ring +1",
back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10',}},
}
sets.aftercast.melee = {
ammo="Aurgelmir Orb",
head="Malignance Chapeau",
body="Malignance Tabard",
hands="Malignance Gloves",
legs="Malignance Tights",
feet="Malignance Boots",
neck="Combatant's Torque",
waist="Gerdr Belt +1",
left_ear="Dedition Earring",
right_ear="Sherida Earring",
left_ring="Chirich Ring +1",
right_ring="Chirich Ring +1",
back={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Damage taken-5%',}},
}
end
-----------------------------------------------------------------------------------
-- This is the precast section. It is used for things you want to happen before you start to start to use the ability or spell.
function precast(spell, act)
if spell.english:startswith('Utsusemi') then
equip(sets.precast.fc)
end
if spell.type == "WhiteMagic" then
equip(sets.precast.fc)
end
if spell.type == "BlackMagic" then
equip(sets.precast.)
end
if spell.type == "Trust" then
equip(sets.precast.fc)
end
end
-----------------------------------------------------------------------------------
-- This is the midcast section. It is used to designate gear that you want on as the ability or spell is used.
function midcast(spell, act)
-- The below command is used to cancel old shadows if they can not be overwritten by the newly cased Utsusemi.
if spell.english:startswith('Utsusemi') then
equip(sets.precast.utsusemi)
end
if spell.type == "WhiteMagic" then
equip (sets.midcast.magicacc)
end
if spell.type == "Blackmagic" then
equip (sets.midcast.magicacc)
end
if spell.english == "Savage Blade" then
equip (sets.midcast.savage)
end
if spell.type == "Trust" then
equip(sets.precast.fc)
end
end
-----------------------------------------------------------------------------------
-- This section is the aftercast section that makes it so that after any of the above abilities you get put back into the correct gearset.
-- You can create tp_mode gearsets for ANY purpose. Just make sure you label them correctly. All must be in the sets.aftercast section. For instance sets.aftercast.dw40.
-- Don't forget to create a new gearset section defining the gear you want in it if you don't want to use my predefined sets. Ie create a gearset for sets.aftercast.storetp.
function aftercast(spell, act, spellMap, eventArgs)
set = sets.aftercast
if set[tp_mode] then
set = set[tp_mode]
end
equip(set)
end