-
Notifications
You must be signed in to change notification settings - Fork 0
/
Varrout_SCH - Copy.lua
670 lines (605 loc) · 24.4 KB
/
Varrout_SCH - Copy.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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
--[[ *************************************************************
Wren's SCH gearswap .lua for SuperNova FFXI
Save as windower/addons/GearSwap/data/SCH.lua
2016-07-24 OC - First version. Commented to help newbies. :)
2016-08-01 OC - Hachirin-no-Obi, Rostrum Pumps
2016-08-25 OC - Sea Capes
2016-12-02 OC - Loquac. Earring, Stone Gorget
************************************************************* --]]
toau_zones =
S{
"Leujaoam Sanctum", -- Assault
"Mamool Ja Training Grounds", -- Assault
"Lebros Cavern", -- Assault
"Periqia", -- Assault
"Ilrusi Atoll", -- Assault
"Nyzul Isle", -- Assault
"Bhaflau Remnants", -- Salvage
"Arrapago Remnants", -- Salvage
"Silver Sea Remnants", -- Salvage
"Zhayolm Remnants", -- Salvage
-- "Aht Urhgan Whitegate", -- Test
}
--[[ ******************************************************
Gearsets - define the various sets of gear we'll wear.
Note that I am using Claustrum, so have no main swaps.
****************************************************** --]]
enfeebling_light =
S{
"Paralyze",
"Slow",
"Silence",
"Dia",
"Dia II",
"Diaga"
}
enfeebling_dark =
S{
"Poison",
"Poison II",
"Blind",
"Gravity",
"Sleep",
"Sleep II",
"Break",
"Bind",
"Dispel"
}
naSpells =
S{
"Poisona",
"Paralyna",
"Blindna",
"Silena",
"Stona",
"Viruna"
}
barSpells =
S{
"Barstone",
"Barstonra",
"Barwater",
"Barwatera",
"Baraero",
"Baraera",
"Barfire",
"Barfira",
"Barblizzard",
"Barblizzara",
"Barthunder",
"Barthundra",
"Barsleep",
"Barsleepra",
"Barpoison",
"Barpoisonra",
"Barparalyze",
"Barparalyzra",
"Barblind",
"Barblindra",
"Barsilence",
"Barsilencera",
"Barpetrify",
"Barpetra",
"Barvirus",
"Barrira",
"Baramnesia",
"Baramnesra",
}
enhancing_dark =
S{
"Blaze Spikes",
"Ice Spikes",
"Shock Spikes",
}
-- function get_sets()
-- mote_include_version = 2
-- -- Load and initialize the include file.
-- include('Mote-Include.lua')
-- end
-- function user_setup()
-- state.CP = M(false, "Capacity Points Mode")
-- send_command('bind @c gs c toggle CP')
-- end
-- function user_unload()
-- send_command('unbind @c')
-- end
-- function init_gear_sets()
function get_sets()
-- Use after spells when sublimation isn't charging.
-- Focuses on auto-refresh, auto-regen, and reducing damage taken
sets.Idle =
{
main = "Bolelabunga",
sub = "Genmei Shield",
ammo = "Homiliary",
head = "Befouled Crown",
body = "Jhakri Robe +2",
hands = { name = "Chironic Gloves",
augments = {'Pet: MND+10','Attack+5','"Refresh"+2','Mag. Acc.+5 "Mag.Atk.Bns."+5',}},
legs = "Assid. Pants +1",
feet = { name = "Chironic Slippers",
augments = {'Pet: DEX+15','VIT+8','"Refresh"+2','Accuracy+12 Attack+12',}},
neck = "Loricate Torque +1",
waist = "Fucho-no-Obi",
left_ear = { name = "Moonshade Earring",
augments = {'MP+25','Latent effect: "Refresh"+1',}},
right_ear = "Infused Earring",
left_ring = "Defending Ring",
right_ring = "Sheltered Ring",
back = "Solemnity Cape",
}
sets.IdleToAU =
{
left_ring = "Balrahn's Ring",
}
sets.Resting =
{
main = "Boonwell Staff",
sub = "Ariesian Grip",
ammo = "Mana Ampulla",
head = "Orvail Corona +1",
body = "Chelona Blazer",
hands = "Nares Cuffs",
legs = "Nisse Slacks",
feet = "Chelona Boots",
neck = "Eidolon Pendant +1",
waist = "Austerity Belt",
left_ear = { name = "Moonshade Earring",
augments = {'MP+25','Latent effect: "Refresh"+1',}},
right_ear = "Infused Earring",
left_ring = "Angha Ring",
right_ring = "Star Ring",
back = "Felicitas Cape",
}
-- ************************************************************************************** --
-- JOB ABILITIES --
-- ************************************************************************************** --
-- Use this set when sublimation is charging.
sets.Sublimation =
{
head = "Academic's Mortarboard +3",
body = { name = "Pedagogy Gown +3",
augments = {'Enhances "Enlightenment" effect',}},
ear2 = "Savant's Earring",
waist = "Embla Sash"
}
sets.SublimationCharging = set_combine(sets.Idle, sets.Sublimation)
sets.SublimationResting = set_combine(sets.Resting, sets.Sublimation)
sets.RaptureEbullience = { head = "Arbatel Bonnet" }
sets.PerpetuanceImmanence = { hands = "Arbatel Bracers +1" }
sets.PenuryParsimony = { legs = "Arbatel Pants +1" }
sets.Klimaform = { feet = "Arbatel Loafers +1" }
sets.AltruismFocalization = { head = "Pedagogy Mortarboard +2" }
sets.Enlightenment = { body = "Pedagogy Gown +2" }
sets.TranquilityEquanimity = { hands = "Pedagogy Bracers +3" }
sets.TabulaRasa = { legs = "Pedagogy Pants +1" }
sets.Stormsurge = { feet = "Pedagogy Loafers +1" }
-- ************************************************************************************** --
-- SPELL CASTING --
-- ************************************************************************************** --
-- PRE-CAST --
-- ************************************************************************************** --
sets.FastCast =
{
main = { name = "Coeus",
augments = {'Mag. Acc.+50','"Mag.Atk.Bns."+10','"Fast Cast"+5',}},
sub = "Clerisy Strap",
ammo = "Incantor Stone",
head = "Revealer's Crown",
body = "Anhur Robe",
hands = "Academic's Bracers +2",
legs = "Kaykaus Tights",
feet = { name = "Peda. Loafers +1",
augments = {'Enhances "Stormsurge" effect',}},
neck = "Loricate Torque +1",
waist = "Witful Belt",
left_ear = { name = "Moonshade Earring",
augments = {'MP+25','Latent effect: "Refresh"+1',}},
right_ear = "Loquac. Earring",
left_ring = "Kishar Ring",
right_ring = "Lebeche Ring",
back = "Perimede Cape",
}
sets.FastCast.Enhancing = set_combine( sets.FastCast, {
waist = "Siegel Sash",
} )
sets.FastCast.Stoneskin = set_combine( sets.Enhancing, {
head = "Umuthi Hat",
hands = "Carapacho Cuffs",
} )
sets.FastCast.Cure = set_combine( sets.FastCast, {
main = "Vadose Rod",
sub = "Sors Shield",
head = { name = "Vanya Hood",
augments = {'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
body = "Heka's Kalasiris",
feet = { name = "Vanya Clogs",
augments = {'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
right_ear = "Mendi. Earring",
back = "Pahtli Cape",
} )
sets.FastCast.Healing = set_combine( sets.FastCast, {
back = "Disperser's Cape",
} )
-- ************************************************************************************** --
-- MID-CAST --
-- ************************************************************************************** --
sets.Midcast = {}
-- heal set for getting the most of our cures.
-- Cure Potency, Healing Magic, Haste, Mind.
sets.Midcast.Cure =
{
main = "Vadose Rod",
sub = "Sors Shield",
ammo = "Quartz Tathlum +1",
head = { name = "Vanya Hood",
augments = {'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
body = { name = "Kaykaus Bliaut",
augments = {'MP+60','"Cure" potency +5%','"Conserve MP"+6',}},
hands = { name = "Peda. Bracers +3",
augments = {'Enh. "Tranquility" and "Equanimity"',}},
legs = "Acad. Pants +2",
feet = { name = "Vanya Clogs",
augments = {'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
neck = "Colossus's Torque",
waist = "Bishop's Sash",
left_ear = "Beatific Earring",
right_ear = "Mendi. Earring",
left_ring = "Janniston Ring",
right_ring = "Sirona's Ring",
back = "Altruistic Cape",
}
sets.Midcast.LightWeather =
{
back = "Twilight Cape",
waist = "Hachirin-no-Obi",
}
sets.Midcast.NASpell =
{
main = { name = "Coeus",
augments = {'Mag. Acc.+50','"Mag.Atk.Bns."+10','"Fast Cast"+5',}},
sub = "Clerisy Strap",
ammo = "Incantor Stone",
head = { name = "Vanya Hood",
augments = {'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
body = { name = "Pedagogy Gown +2",
augments = {'Enhances "Enlightenment" effect',}},
hands = { name = "Pedagogy Bracers +3",
augments = {'Enh. "Tranquility" and "Equanimity"',}},
legs = "Academic's Pants +2",
feet = { name = "Vanya Clogs",
augments = {'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
neck = "Colossus's Torque",
waist = "Bishop's Sash",
left_ear = "Beatific Earring",
right_ear = "Healing Earring",
left_ring = "Sirona's Ring",
right_ring = "Haoma's Ring",
back = "Altruistic Cape",
}
sets.Midcast.Cursna = set_combine(sets.Midcast.NASpell,
{
neck = "Debilis Medallion",
left_ring = "Haoma's Ring",
right_ring = "Haoma's Ring",
back = "Oretan. Cape +1",
})
sets.Midcast.Enfeebling =
{
main = { name = "Coeus",
augments = {'Mag. Acc.+50','"Mag.Atk.Bns."+10','"Fast Cast"+5',}},
sub = "Enki Strap",
ammo = "Quartz Tathlum +1",
head = "Jhakri Coronal +1",
body = "Jhakri Robe +2",
hands = "Jhakri Cuffs +2",
legs = "Arbatel Pants +1",
feet = "Jhakri Pigaches +1",
neck = "Erra Pendant",
waist = "Casso Sash",
left_ear = "Lifestorm Earring",
right_ear = "Psystorm Earring",
left_ring = "Stikini Ring",
right_ring = "Kishar Ring",
back = { name = "Lugh's Cape",
augments = {'INT+20','Mag. Acc+20 /Mag. Dmg.+20','"Mag.Atk.Bns."+10',}},
}
sets.MidcastEnfeeblingLight = set_combine( sets.Midcast.Enfeebling,
{
body = "Academic's Gown +2",
})
sets.MidcastEnfeeblingDark = set_combine( sets.Midcast.Enfeebling,
{
legs = "Academic's Pants +2"
})
sets.Midcast.Enhancing =
{
main = "Bolelabunga",
sub = "Ammurapi Shield",
ammo = "Savant's Treatise",
head = "Befouled Crown",
body = { name = "Pedagogy Gown +2",
augments = {'Enhances "Enlightenment" effect',}}, -- Enh. Mag. eff. dur. +8%
hands = { name = "Telchine Gloves",
augments = {'DEF+19','"Elemental Siphon"+35','Enh. Mag. eff. dur. +8',}},
legs = { name = "Telchine Braconi",
augments = {'Enh. Mag. eff. dur. +9',}},
feet = { name = "Telchine Pigaches",
augments = {'Enh. Mag. eff. dur. +6',}},
neck = "Colossus's Torque",
waist = "Olympus Sash",
left_ear = "Augment. Earring",
right_ear = "Andoaa Earring",
left_ring = "Stikini Ring",
right_ring = "Stikini Ring",
back = "Fi Follet Cape",
}
sets.Midcast.BarSpell = set_combine( sets.Midcast.Enhancing,
{
hands = { name = "Chironic Gloves",
augments = {'AGI+4','Crit.hit rate+1','"Refresh"+1','Accuracy+1 Attack+1',}},
legs = "Acad. Pants +2",
-- legs = limbus legs with barspell +15
feet = { name = "Kaykaus Boots",
augments = {'Mag. Acc.+15','"Cure" potency +5%','"Fast Cast"+3',}},
})
sets.Midcast.Stoneskin = set_combine( sets.Midcast.Enhancing,
{
legs = "Haven Hose",
neck = "Nodens Gorget",
waist = "Siegel Sash",
left_ear = "Earthcry Earring",
})
sets.Midcast.Regen = set_combine( sets.Midcast.Enhancing,
{
main = { name = "Coeus",
augments = {'Mag. Acc.+50','"Mag.Atk.Bns."+10','"Fast Cast"+5',}},
sub = "Fulcio Grip",
head = "Arbatel Bonnet",
legs = { name = "Telchine Braconi",
augments = {'"Regen" potency+3',}},
back = { name = "Lugh's Cape",
augments = {'INT+20','Mag. Acc+20 /Mag. Dmg.+20','"Mag.Atk.Bns."+10',}},
})
sets.Midcast.Aquaveil = set_combine(sets.Midcast.Enhancing,
{
main = "Vadose Rod",
sub = "Genmei Shield",
})
sets.Midcast.ElementalAttack = {
main = { name = "Akademos",
augments = {'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
sub = "Enki Strap",
ammo = "Hydrocera",
head = "Pedagogy Mortarboard +2",
body = "Jhakri Robe +2",
hands = { name = "Pedagogy Bracers +3",
augments = {'Enh. "Tranquility" and "Equanimity"',}},
legs = "Jhakri Slops +2",
feet = "Jhakri Pigaches +2",
neck = "Argute Sole",
waist = "Aswang Sash",
left_ear = "Barkarole Earring",
right_ear = "Hecate's Earring",
left_ring = "Mallquis Ring",
right_ring = "Jhakri Ring",
back = { name = "Lugh's Cape",
augments = {'INT+20','Mag. Acc+20 /Mag. Dmg.+20','"Mag.Atk.Bns."+10',}},
}
sets.Midcast.ElementalMB = set_combine(sets.Midcast.ElementalAttack, {
})
sets.Midcast.DarkMagic = set_combine(sets.Midcast.ElementalAttack,
{
main = { name = "Rubicundity",
augments = {'Mag. Acc.+3','"Mag.Atk.Bns."+3','Dark magic skill +5','"Conserve MP"+2',}},
sub = "Ammurapi Shield",
neck = "Erra Pendant",
left_ring = "Evanescence Ring",
})
sets.Midcast.Draspir = set_combine( sets.Midcast.DarkMagic,
{
head = "Appetence Crown",
neck = "Erra Pendant",
right_ear = "Hirudinea Earring",
feet = "Merlinic Crackows",
})
end
--[[ ******************************************************
Equip functions - put on the sets we defined above, and
echo a note to our chat log so we know it worked.
****************************************************** --]]
-- equip our idle set
function equip_idle()
idleSet = sets.Idle
idleString = "********** [Idle] "
if buffactive["Sublimation: Activated"] then
idleSet = set_combine(idleSet, sets.Sublimation )
idleString = idleString .. "[Sublimation Charging] "
elseif buffactive["Sublimation: Complete"] then
idleString = idleString .. "[Sublimation Complete] "
end
if toau_zones:contains(world.zone) then
idleSet = set_combine( idleSet, sets.IdleToAU)
idleString = idleString .. "[ToAU] "
end
windower.add_to_chat(8, idleString .. "**********")
equip(idleSet)
end
-- equip out hMP set
function equip_rest()
restSet = sets.Resting
restString = "********** [Resting] "
if buffactive["Sublimation: Activated"] then
restSet = set_combine( restSet, sets.Sublimation )
restString = restString .. "[Sublimation Charging] "
elseif buffactive["Sublimation: Complete"] then
restString = restString .. "[Sublimation Complete] "
end
windower.add_to_chat(8, restString .. "**********")
equip(restSet)
end
-- PRECAST
function precast(spell, action)
if spell.type:contains('Magic') then
equip(sets.FastCast)
elseif spell == "Enlightenment" then
equip(sets.Enlightenment)
elseif spell == "Tabula Rasa" then
equip(sets.TabulaRasa)
elseif spell == "Aeolean Edge" then
equip(sets.Midcast.ElementalAttack)
end
end
-- MIDCAST
function midcast(spell, action)
-- spell_element_match = spell.element == world.weather_element or spell.element == world.day_element
-- windower.add_to_chat(10, tostring(spell_element_match))
-- windower.add_to_chat(10, spell.element)
check_if_silenced(spell, eventArgs)
---------------------
-- Healing Magic --
---------------------
if spell.skill == "Healing Magic" then
if string.find(spell.english,'Cure') then
if "Light" == world.weather_element or "Light" == world.day_element then
windower.add_to_chat(8, "Cure Boost Active")
equip(set_combine(sets.Midcast.Cure,sets.Midcast.LightWeather))
else
equip(sets.Midcast.Cure)
windower.add_to_chat(8, "No Cure Boost")
end
elseif string.find(spell.english,"Curaga") then
if spell.element == world.weather_element or spell_element == world.day_element then
-- equip(set_combine(sets.Midcast.Curaga,sets.Midcast.LightWeather))
equip(set_combine(sets.Midcast.Cure,sets.Midcast.LightWeather))
else
-- equip(sets.Midcast.Curaga)
equip(sets.Midcast.Cure)
end
elseif spell.english == "Cursna" then
equip(sets.Midcast.Cursna)
windower.add_to_chat(8, "Cursna Set")
else
equip(sets.Midcast.NASpell)
windower.add_to_chat(8, "NASpell Set")
end
end
-----------------------
-- Enhancing Magic --
-----------------------
if spell.skill == "Enhancing Magic" then
if spell.english == "Stoneskin" then
equip(sets.Midcast.Stoneskin)
windower.add_to_chat(8, "Stoneskin Set")
elseif string.find(spell.english,"Regen") then
equip(sets.Midcast.Regen)
windower.add_to_chat(8, "Regen Set")
elseif spell.english == "Aquaveil" then
equip(sets.Midcast.Aquaveil)
windower.add_to_chat(8, "Aquaveil Set")
elseif barSpells:contains(spell.english) then
equip(sets.Midcast.BarSpell)
windower.add_to_chat(8, "Barspell Set")
else
equip(sets.Midcast.Enhancing)
windower.add_to_chat(8, "Enhancing Set")
end
end
------------------------
-- Enfeebling Magic --
------------------------
if spell.skill == "Enfeebling Magic" then
if "Light" == spell.element then
if "Light" == world.weather_element or "Light" == world.day_element then
equip(set_combine(sets.Midcast.Enfeebling,sets.Midcast.LightWeather))
end
-- elseif enfeebling_light:contains(spell.english) then
-- elseif enfeebling_dark:contains(spell.english) then
else
equip(sets.Midcast.Enfeebling)
end
end
------------------------
-- Elemental Magic --
------------------------
if spell.skill == "Elemental Magic" then
-- windower.add_to_chat(8, spell.element)
-- windower.add_to_chat(8, 'Local weather: '.. world.weather_element)
if buffactive["Klimaform"] and (spell.element == world.weather_element or spell.element == world.day_element) then
equip(set_combine(sets.Midcast.ElementalAttack, set_combine(sets.Klimaform, {waist="Hachirin-no-obi"})))
-- windower.add_to_chat(8, 'Klima | Weather/day match')
elseif buffactive["Klimaform"] then
equip(set_combine(sets.Midcast.ElementalAttack, sets.Klimaform))
-- windower.add_to_chat(8, '********** [Klimaform Active] **********')
elseif spell.element == world.weather_element or spell.element == world.day_element then
equip(set_combine(sets.Midcast.ElementalAttack, {waist="Hachirin-no-obi"}))
-- windower.add_to_chat(8, 'Weather/day match')
else
equip(sets.Midcast.ElementalAttack)
-- windower.add_to_chat(8, 'No match')
end
end
------------------------
-- Dark Magic --
------------------------
if spell.skill == "Dark Magaic" then
if buffactive["Klimaform"] and (spell.element == world.weather_element or spell.element == world.day_element) then
equip(set_combine(sets.Midcast.DarkMagic, set_combine(sets.Klimaform, {waist="Hachirin-no-obi"})))
elseif buffactive["Klimaform"] then
equip(set_combine(sets.Midcast.DarkMagic, sets.Klimaform))
elseif spell.element == world.weather_element or spell.element == world.day_element then
equip(set_combine(sets.Midcast.DarkMagic, {waist="Hachirin-no-obi"}))
else
equip(sets.Midcast.DarkMagic)
end
end
end
-- AFTER CAST
function aftercast()
equip_idle()
end
-- STATUS CHANGE
function status_change(new,old)
if new == 'Resting' then
equip_rest()
else
equip_idle()
end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
set_macro_page(1, 5)
send_command('wait 2.5; input /lockstyleset 001')
end
function check_if_silenced(spell, eventArgs)
if spell.action_type == 'Magic' and buffactive['Silence'] then
-- If silenced, use what's available to remove it
cancel_spell()
if player.inventory['Catholicon'] ~= nil then
send_command('input /item "Catholicon" <me>')
send_command('input /echo *!! Silenced ~ Using Catholicon @ '..player.inventory['Catholicon'].count..' Left !!*')
elseif player.inventory['Echo Drops'] ~= nil then
send_command('input /item "Echo Drops" <me>')
send_command('input /echo *!! Silenced ~ Using Echo Drops @ '..player.inventory['Echo Drops'].count..' Left !!*')
elseif player.inventory['Remedy'] ~= nil then
send_command('input /item "Remedy" <me>')
send_command('input /echo *!! Silenced ~ Using Remedy @ '..player.inventory['Remedy'].count..' Left !!*')
else
send_command('input /echo *!! Silenced ~ No items to remove it !!*')
end
eventArgs.cancel = true
return
end
end
function lockMain()
disable('main')
disable('sub')
end
function unlockMain()
enable('main')
enable('sub')
end