-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSkillUp.lua
692 lines (691 loc) · 35.4 KB
/
SkillUp.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
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
--[[How to use:
--this tool is set it and forget it you can leave it running for hours as long as se does not log you out it will keep running--
1.)place "skillup.lua" in your normal gearswap folder(where all your job files are)
2.)then us "gs l skillup.lua" to load this skill up in to gearswap
3.) on lines 22 and 25 of this file you can put in you wind and string instruments
to start Geomancy magic skillup use command "gs c startgeo"
to start Healing magic skillup use command "gs c starthealing"
to start Enhancing magic skillup use command "gs c startenhancing"
to start Ninjutsu magic skillup use command "gs c startninjutsu"
to start Singing magic skillup use command "gs c startsinging"
to start Blue magic skillup use command "gs c startblue"
to start Summoning magic skillup use command "gs c startsmn"
to stop all skillups use command "gs c skillstop"
to auto shutdown after skillup use command "gs c aftershutdown"
to auto logoff after skillup use command "gs c afterlogoff"
to just stop and stay logged on after skillup use command "gs c afterStop"(only needed if you use one of the above auto shutdown/logoff)
much thanks to Arcon,Byrth,Mote,and anybody else i forgot for the help in making this]]
require 'actions'
function get_sets()
skilluprun = false
sets.brd = {}
sets.brd.wind = {
range="Linos"--put your wind instrument here
}
sets.brd.string = {
range="Terpander"--put your string instrument here
}
skilluptype = {"Geomancy","Healing","Enhancing","Ninjutsu","Singing","Blue","Summoning"}
skillupcount = 1
geospells = {"Indi-Acumen","Indi-AGI","Indi-Attunement","Indi-Barrier","Indi-CHR","Indi-DEX","Indi-Fade","Indi-Fend","Indi-Focus","Indi-Frailty","Indi-Fury","Indi-Gravity","Indi-Haste","Indi-INT","Indi-Languor","Indi-Malaise","Indi-MND","Indi-Paralysis","Indi-Poison","Indi-Precision","Indi-Refresh","Indi-Regen","Indi-Slip","Indi-Slow","Indi-STR","Indi-Torpor","Indi-Vex","Indi-VIT","Indi-Voidance","Indi-Wilt"}
geocount = 1
healingspells = {"Blindna","Cura","Cura II","Cura III","Curaga","Curaga II","Curaga III","Curaga IV","Curaga V","Cure","Cure II","Cure III","Cure IV","Cure V","Cure VI","Cursna","Esuna","Paralyna","Poisona","Reraise","Reraise II","Reraise III","Silena","Stona","Viruna"}
healingcount = 1
enhancespells = {"Adloquium","Animus Augeo","Animus Minuo","Aquaveil","Aurorastorm","Auspice","Baraera","Baraero","Baramnesia","Baramnesra","Barblind","Barblindra","Barblizzara","Barblizzard","Barfira","Barfire","Barparalyze","Barparalyzra","Barpetra","Barpetrify","Barpoison","Barpoisonra","Barsilence","Barsilencera","Barsleep","Barsleepra","Barstone","Barstonra","Barthunder","Barthundra","Barvira","Barvirus","Barwater","Barwatera","Blaze Spikes","Blink","Boost-AGI","Boost-CHR","Boost-DEX","Boost-INT","Boost-MND","Boost-STR","Boost-VIT","Crusade","Deodorize","Embrava","Enaero","Enaero II","Enblizzard","Enblizzard II","Enfire","Enfire II","Enstone","Enstone II","Enthunder","Enthunder II","Enwater","Enwater II","Erase","Escape","Firestorm","Foil","Gain-AGI","Gain-CHR","Gain-DEX","Gain-INT","Gain-MND","Gain-STR","Gain-VIT","Hailstorm","Haste","Ice Spikes","Invisible","Phalanx","Phalanx II","Protect","Protect II","Protect III","Protect IV","Protect V","Protectra","Protectra II","Protectra III","Protectra IV","Protectra V","Rainstorm","Refresh","Refresh II","Regen","Regen II","Regen III","Regen IV","Regen V","Reprisal","Sandstorm","Shell","Shell II","Shell III","Shell IV","Shell V","Shellra","Shellra II","Shellra III","Shellra IV","Shellra V","Shock Spikes","Sneak","Stoneskin","Temper","Thunderstorm","Voidstorm","Windstorm"}
enhancecount = 1
ninspells = {"Gekka: Ichi","Kakka: Ichi","Migawari: Ichi","Monomi: Ichi","Myoshu: Ichi","Tonko: Ichi","Tonko: Ni","Utsusemi: Ichi","Utsusemi: Ni","Yain: Ichi","Yain: Ichi","Gekka: Ichi"}
nincount = 1
nincant = {}
nincantcount = 0
if player.main_job == "NIN" or player.sub_job == "NIN" then
ninspellitem = S{
["Doton: Ichi"] = "Makibishi",
["Doton: Ni"] = "Makibishi",
["Doton: San"] = "Makibishi",
["Huton: Ichi"] = "Kawahori-Ogi",
["Huton: Ni"] = "Kawahori-Ogi",
["Huton: San"] = "Kawahori-Ogi",
["Hyoton: Ichi"] = "Tsurara",
["Hyoton: Ni"] = "Tsurara",
["Hyoton: San"] = "Tsurara",
["Katon: Ichi"] = "Uchitake",
["Katon: Ni"] = "Uchitake",
["Katon: San"] = "Uchitake",
["Raiton: Ichi"] = "Hiraishin",
["Raiton: Ni"] = "Hiraishin",
["Raiton: San"] = "Hiraishin",
["Suiton: Ichi"] = "Mizu-Deppo",
["Suiton: Ni"] = "Mizu-Deppo",
["Suiton: San"] = "Mizu-Deppo",
["Kakka: Ichi"] = "Ryuno",
["Migawari: Ichi"] = "Mokujin",
["Monomi: Ichi"] = "Sanjaku-Tenugui",
["Myoshu: Ichi"] = "Kabenro",
["Tonko: Ichi"] = "Shinobi-Tabi",
["Tonko: Ni"] = "Shinobi-Tabi",
["Tonko: San"] = "Shinobi-Tabi",
["Utsusemi: Ichi"] = "Shihei",
["Utsusemi: Ni"] = "Shihei",
["Utsusemi: San"] = "Shihei",
["Aisha: Ichi"] = "Soshi",
["Dokumori: Ichi"] = "Kodoku",
["Dokumori: Ni"] = "Kodoku",
["Dokumori: San"] = "Kodoku",
["Hojo: Ichi"] = "Kaginawa",
["Hojo: Ni"] = "Kaginawa",
["Hojo: San"] = "Kaginawa",
["Jubaku: Ichi"] = "Jusatsu",
["Jubaku: Ni"] = "Jusatsu",
["Jubaku: San"] = "Jusatsu",
["Kurayami: Ichi"] = "Sairui-Ran",
["Kurayami: Ni"] = "Sairui-Ran",
["Kurayami: San"] = "Sairui-Ran",
["Yurin: Ichi"] = "Jinko",
["Gekka: Ichi"] = "Ranka",
["Yain: Ichi"] = "Furusumi",
}
ninplustool = S{
["Makibishi"] = "Inoshishinofuda",
["Kawahori-Ogi"] = "Inoshishinofuda",
["Tsurara"] = "Inoshishinofuda",
["Uchitake"] = "Inoshishinofuda",
["Hiraishin"] = "Inoshishinofuda",
["Mizu-Deppo"] = "Inoshishinofuda",
["Ryuno"] = "Shikanofuda",
["Mokujin"] = "Shikanofuda",
["Sanjaku-Tenugui"] = "Shikanofuda",
["Kabenro"] = "Shikanofuda",
["Shinobi-Tabi"] = "Shikanofuda",
["Shihei"] = "Shikanofuda",
["Soshi"] = "Chonofuda",
["Kodoku"] = "Chonofuda",
["Kaginawa"] = "Chonofuda",
["Jusatsu"] = "Chonofuda",
["Sairui-Ran"] = "Chonofuda",
["Jinko"] = "Chonofuda",
["Ranka"] = "Ranka",
["Furusumi"] = "Furusumi",
}
nintoolbag = S{
["Makibishi"] = "Toolbag (Maki)",
["Kawahori-Ogi"] = "Toolbag (Kawa)",
["Tsurara"] = "Toolbag (Tsura)",
["Uchitake"] = "Toolbag (Uchi)",
["Hiraishin"] = "Toolbag (Hira)",
["Mizu-Deppo"] = "Toolbag (Mizu)",
["Ryuno"] = "Toolbag (Ryuno)",
["Mokujin"] = "Toolbag (Moku)",
["Sanjaku-Tenugui"] = "Toolbag (Sanja)",
["Kabenro"] = "Toolbag (Kabenro)",
["Shinobi-Tabi"] = "Toolbag (Shino)",
["Shihei"] = "Toolbag (Shihei)",
["Soshi"] = "Toolbag (Soshi)",
["Kodoku"] = "Toolbag (Kodo)",
["Kaginawa"] = "Toolbag (Kagi)",
["Jusatsu"] = "Toolbag (Jusa)",
["Sairui-Ran"] = "Toolbag (Sai)",
["Jinko"] = "Toolbag (Jinko)",
["Inoshishinofuda"] = "Toolbag (Ino)",
["Shikanofuda"] = "Toolbag (Shika)",
["Chonofuda"] = "Toolbag (Cho)",
["Ranka"] = "Toolbag (Ranka)",
["Furusumi"] = "Toolbag (Furu)",
}
toolbagtoid = {
["Toolbag (Uchi)"] = 5308,
["Toolbag (Tsura)"] = 5309,
["Toolbag (Kawa)"] = 5310,
["Toolbag (Maki)"] = 5311,
["Toolbag (Hira)"] = 5312,
["Toolbag (Mizu)"] = 5313,
["Toolbag (Shihe)"] = 5314,
["Toolbag (Jusa)"] = 5315,
["Toolbag (Kagi)"] = 5316,
["Toolbag (Sai)"] = 5317,
["Toolbag (Kodo)"] = 5318,
["Toolbag (Shino)"] = 5319,
["Toolbag (Sanja)"] = 5417,
["Toolbag (Soshi)"] = 5734,
["Toolbg. (Kaben)"] = 5863,
["Toolbag (Jinko)"] = 5864,
["Toolbag (Ryuno)"] = 5865,
["Toolbag (Moku)"] = 5866,
["Toolbag (Ino)"] = 5867,
["Toolbag (Shika)"] = 5868,
["Toolbag (Cho)"] = 5869,
["Toolbag (Ranka)"] = 6265,
["Toolbag (Furu)"] = 6266,
}
tbid = 0
end
songspells = {"Knight's Minne","Advancing March","Adventurer's Dirge","Archer's Prelude","Army's Paeon","Army's Paeon II","Army's Paeon III","Army's Paeon IV","Army's Paeon V","Army's Paeon VI","Bewitching Etude","Blade Madrigal","Chocobo Mazurka","Dark Carol","Dark Carol II","Dextrous Etude","Dragonfoe Mambo","Earth Carol","Earth Carol II","Enchanting Etude","Fire Carol","Fire Carol II","Foe Sirvente","Fowl Aubade","Goblin Gavotte","Goddess's Hymnus","Gold Capriccio","Herb Pastoral","Herculean Etude","Hunter's Prelude","Ice Carol","Ice Carol II","Knight's Minne II","Knight's Minne III","Knight's Minne IV","Knight's Minne V","Learned Etude","Light Carol","Light Carol II","Lightning Carol","Lightning Carol II","Logical Etude","Mage's Ballad","Mage's Ballad II","Mage's Ballad III","Puppet's Operetta","Quick Etude","Raptor Mazurka","Sage Etude","Scop's Operetta","Sentinel's Scherzo","Sheepfoe Mambo","Shining Fantasia","Sinewy Etude","Spirited Etude","Swift Etude","Sword Madrigal","Uncanny Etude","Valor Minuet","Valor Minuet II","Valor Minuet III","Valor Minuet IV","Valor Minuet V","Victory March","Vital Etude","Vivacious Etude","Warding Round","Water Carol","Water Carol II","Wind Carol","Wind Carol II"}
songcount = 1
bluspells = {"Pollen","Wild Carrot","Refueling","Feather Barrier","Magic Fruit","Diamondhide","Warm-Up","Amplification","Triumphant Roar","Saline Coat","Reactor Cool","Plasma Charge","Plenilune Embrace","Regeneration","Animating Wail","Battery Charge","Magic Barrier","Fantod","Winds of Promy.","Barrier Tusk","White Wind","Harden Shell","O. Counterstance","Pyric Bulwark","Nat. Meditation","Carcharian Verve","Healing Breeze"}
bluspellul = S{"Harden Shell","Thunderbolt","Absolute Terror","Gates of Hades","Tourbillion","Pyric Bulwark","Bilgestorm","Bloodrake","Droning Whirlwind","Carcharian Verve","Blistering Roar"}
ulid = S{
["Harden Shell"] = 737,
["Thunderbolt"] = 736,
["Absolute Terror"] = 738,
["Gates of Hades"] = 739,
["Tourbillion"] = 740,
["Pyric Bulwark"] = 741,
["Bilgestorm"] = 742,
["Bloodrake"] = 743,
["Droning Whirlwind"] = 744,
["Carcharian Verve"] = 745,
["Blistering Roar"] = 746,
}
blucount = 1
smnspells = {"Carbuncle","Cait Sith","Diabolos","Fenrir","Garuda","Ifrit","Leviathan","Ramuh","Shiva","Titan","Air Spirit","Dark Spirit","Earth Spirit","Fire Spirit","Ice Spirit","Light Spirit","Thunder Spirit","Water Spirit"}
smncount = 1
sets.Idle = {
main="Dark Staff",
left_ear="Relaxing Earring",
right_ear="Liminus Earring",
}
shutdown = false
logoff = false
healingcap = false
enhancingcap = false
summoningcap = false
ninjutsucap = false
singingcap = false
stringcap = false
windcap = false
bluecap = false
geomancycap = false
handbellcap = false
add_to_chat(123,"Skill Up Loaded")
end
function status_change(new,old)
if new=='Idle' then
equip(sets.Idle)
if skilluptype[skillupcount] == "Geomancy" and skilluprun then
send_command('wait 1.0;input /ma "'..geospells[geocount]..'" <me>')
elseif skilluptype[skillupcount] == "Healing" and skilluprun then
send_command('wait 1.0;input /ma "'..healingspells[healingcount]..'" <me>')
elseif skilluptype[skillupcount] == "Enhancing" and skilluprun then
send_command('wait 1.0;input /ma "'..enhancespells[enhancecount]..'" <me>')
elseif skilluptype[skillupcount] == "Ninjutsu" and skilluprun then
send_command('wait 1.0;input /ma "'..ninspells[nincount]..'" <me>')
elseif skilluptype[skillupcount] == "Singing" and skilluprun then
send_command('wait 1.0;input /ma "'..songspells[songcount]..'" <me>')
elseif skilluptype[skillupcount] == "Blue" and skilluprun then
send_command('wait 1.0;input /ma "'..bluspells[blucount]..'" <me>')
elseif skilluptype[skillupcount] == "Summoning" and skilluprun then
send_command('wait 1.0;input /ma "'..smnspells[smncount]..'" <me>')
end
end
end
function filtered_action(spell)
if spell.type == "Geomancy" and skilluprun then
cancel_spell()
if geocount < 30 then
geocount = geocount +1
else
geocount = 1
end
send_command('input /ma "'..geospells[geocount]..'" <me>')
return
elseif spell.skill == "Healing Magic" and skilluprun then
cancel_spell()
if healingcount < 25 then
healingcount = healingcount +1
else
healingcount = 1
end
send_command('input /ma "'..healingspells[healingcount]..'" <me>')
return
elseif spell.skill == "Enhancing Magic" and skilluprun then
cancel_spell()
if enhancecount < 112 then
enhancecount = enhancecount +1
else
enhancecount = 1
end
send_command('input /ma "'..enhancespells[enhancecount]..'" <me>')
return
elseif spell.skill == "Ninjutsu" and skilluprun then
cancel_spell()
nin_tool_check(spell)
elseif spell.skill == "Singing" and skilluprun then
cancel_spell()
if songcount < 71 then
songcount = songcount +1
else
songcount = 1
end
send_command('input /ma "'..songspells[songcount]..'" <me>')
return
elseif spell.skill == "Blue Magic" and skilluprun then
cancel_spell()
if blucount < 27 then
blucount = blucount +1
else
blucount = 1
end
send_command('input /ma "'..bluspells[blucount]..'" <me>')
return
elseif spell.type == "SummonerPact" and skilluprun then
cancel_spell()
if smncount < 18 then
smncount = smncount +1
else
smncount = 1
end
send_command('input /ma "'..smnspells[smncount]..'" <me>')
return
elseif spell.name == "Unbridled Learning" then
cancel_spell()
if blucount < 27 then
blucount = blucount +1
else
blucount = 1
end
send_command('input /ma "'..bluspells[blucount]..'" <me>')
return
elseif spell.name == "Avatar's Favor" then
cancel_spell()
send_command('input /ja "Release" <me>')
return
end
end
function precast(spell)
if spell then
if spell.mp_cost > player.mp then
cancel_spell()
send_command('input /heal on')
return
end
end
if spell.type == "Geomancy" and skilluprun then
if not windower.ffxi.get_spells()[spell.id] then
cancel_spell()
if geocount < 30 then
geocount = geocount +1
else
geocount = 1
end
send_command('input /ma "'..geospells[geocount]..'" <me>')
return
elseif geocount < 30 then
geocount = geocount +1
else
geocount = 1
end
elseif spell.skill == "Healing Magic" and skilluprun then
if not windower.ffxi.get_spells()[spell.id] then
cancel_spell()
if healingcount < 25 then
healingcount = healingcount +1
else
healingcount = 1
end
send_command('input /ma "'..healingspells[healingcount]..'" <me>')
return
elseif healingcount < 25 then
healingcount = healingcount +1
else
healingcount = 1
end
elseif spell.skill == "Enhancing Magic" and skilluprun then
if not windower.ffxi.get_spells()[spell.id] then
cancel_spell()
if enhancecount < 112 then
enhancecount = enhancecount +1
else
enhancecount = 1
end
send_command('input /ma "'..enhancespells[enhancecount]..'" <me>')
return
elseif enhancecount < 112 then
enhancecount = enhancecount +1
else
enhancecount = 1
end
elseif spell.skill == "Ninjutsu" and skilluprun then
if not windower.ffxi.get_spells()[spell.id] then
cancel_spell()
if nincount < 12 then
nincount = nincount +1
else
nincount = 1
end
send_command('input /ma "'..ninspells[nincount]..'" <me>')
return
elseif nincount < 12 then
nincount = nincount +1
else
nincount = 1
end
elseif spell.skill == "Singing" and skilluprun then
if not stringcap then
equip(sets.brd.string)
elseif not windcap then
equip(sets.brd.wind)
end
if not windower.ffxi.get_spells()[spell.id] then
cancel_spell()
if songcount < 71 then
songcount = songcount +1
else
songcount = 1
end
send_command('input /ma "'..songspells[songcount]..'" <me>')
return
elseif songcount < 71 then
songcount = songcount +1
else
songcount = 1
end
elseif spell.skill == "Blue Magic" and skilluprun then
if not windower.ffxi.get_spells()[spell.id] then
cancel_spell()
if blucount < 27 then
blucount = blucount +1
else
blucount = 1
end
send_command('input /ma "'..bluspells[blucount]..'" <me>')
return
elseif blucount < 27 then
blucount = blucount +1
else
blucount = 1
end
elseif spell.type == "SummonerPact" and skilluprun then
if not windower.ffxi.get_spells()[spell.id] then
cancel_spell()
if smncount < 18 then
smncount = smncount +1
else
smncount = 1
end
send_command('input /ma "'..smnspells[smncount]..'" <me>')
return
elseif smncount < 18 then
smncount = smncount +1
else
smncount = 1
end
end
if spell.name == "Avatar's Favor" then
if (windower.ffxi.get_ability_recasts()[spell.recast_id] > 0) or buffactive["Avatar's Favor"] then
cancel_spell()
send_command('input /ja "Release" <me>')
return
end
elseif spell.name == "Elemental Siphon" then
if (windower.ffxi.get_ability_recasts()[spell.recast_id] > 0) or player.mpp > 75 then
cancel_spell()
send_command('input /ja "Release" <me>')
return
end
elseif spell.name == "Unbridled Learning" then
if bluspellul:contains(bluspells[blucount]) and not windower.ffxi.get_spells()[ulid[bluspells[blucount]]] then
if not buffactive["Unbridled Learning"] then
if (windower.ffxi.get_ability_recasts()[spell.recast_id] > 0) then
cancel_spell()
if blucount < 27 then
blucount = blucount +1
else
blucount = 1
end
send_command('input /ma "'..bluspells[blucount]..'" <me>')
return
end
end
else
cancel_spell()
if blucount < 27 then
blucount = blucount +1
else
blucount = 1
end
send_command('input /ma "'..bluspells[blucount]..'" <me>')
return
end
end
if spell.name == "Release" then
if not pet.isvalid then
cancel_spell()
send_command('input /heal on')
return
end
if (windower.ffxi.get_ability_recasts()[spell.recast_id] > 0) then
cancel_spell()
send_command('wait 1.05;input /ja "Release" <me>')
return
end
end
end
function aftercast(spell)
if skilluprun then
if spell.type == "Geomancy" then
if geomancycap and handbellcap then
skilluprun = false
shutdown_logoff()
return
end
send_command('wait 3.0;input /ma "'..geospells[geocount]..'" <me>')
elseif spell.skill == "Healing Magic" then
if healingcap then
skilluprun = false
shutdown_logoff()
return
end
send_command('wait 3.0;input /ma "'..healingspells[healingcount]..'" <me>')
elseif spell.skill == "Enhancing Magic" then
if enhancingcap then
skilluprun = false
shutdown_logoff()
return
end
send_command('wait 3.0;input /ma "'..enhancespells[enhancecount]..'" <me>')
elseif spell.skill == "Ninjutsu" then
if ninjutsucap then
skilluprun = false
shutdown_logoff()
return
end
send_command('wait 3.0;input /ma "'..ninspells[nincount]..'" <me>')
elseif spell.skill == "Singing" then
if singingcap and stringcap and windcap then
skilluprun = false
shutdown_logoff()
return
end
send_command('wait 3.0;input /ma "'..songspells[songcount]..'" <me>')
elseif spell.skill == "Blue Magic" then
if bluecap then
skilluprun = false
shutdown_logoff()
return
end
send_command('wait 3.5;input /ja "Unbridled Learning" <me>')
elseif spell.type == "SummonerPact" then
if summoningcap then
skilluprun = false
send_command('wait 4.0;input /ja "Release" <me>')
return
end
if spell.name:contains('Spirit') then
send_command('wait 4.0;input /ja "Elemental Siphon" <me>')
else
send_command('wait 4.0;input /ja "Avatar\'s Favor" <me>')
end
elseif spell.name == "Release" then
send_command('wait 1.0;input /ma "'..smnspells[smncount]..'" <me>')
elseif spell.name == "Avatar's Favor" then
send_command('wait 1.0;input /ja "Release" <me>')
elseif spell.name == "Elemental Siphon" then
send_command('wait 1.0;input /ja "Release" <me>')
elseif spell.name == "Unbridled Learning" then
send_command('wait 1.0;input /ma "'..bluspells[blucount]..'" <me>')
end
elseif spell.type == "SummonerPact" then
if summoningcap then
skilluprun = false
send_command('wait 1.0;input /ja "Release" <me>')
return
end
if spell.name:contains('Spirit') then
send_command('wait 4.0;input /ja "Elemental Siphon" <me>')
else
send_command('wait 4.0;input /ja "Avatar\'s Favor" <me>')
end
elseif spell.name == "Release" then
if summoningcap then
shutdown_logoff()
return
end
if pet and pet.isvalid then
send_command('wait 1.05;input /ja "Release" <me>')
end
elseif spell.name == "Avatar's Favor" then
send_command('wait 1.0;input /ja "Release" <me>')
end
end
function self_command(command)
if command == "startgeo" then
skilluprun = true
skillupcount = 1
send_command('wait 1.0;input /ma "'..geospells[geocount]..'" <me>')
add_to_chat(123,"Starting Geomancy Skill up")
end
if command == "starthealing" then
skilluprun = true
skillupcount = 2
send_command('wait 1.0;input /ma "'..healingspells[healingcount]..'" <me>')
add_to_chat(123,"Starting Healing Skill up")
end
if command == "startenhancing" then
skilluprun = true
skillupcount = 3
send_command('wait 1.0;input /ma "'..enhancespells[enhancecount]..'" <me>')
add_to_chat(123,"Starting Enhancing Skill up")
end
if command == "startninjutsu" then
skilluprun = true
skillupcount = 4
send_command('wait 1.0;input /ma "'..ninspells[nincount]..'" <me>')
add_to_chat(123,"Starting Ninjutsu Skill up")
end
if command == "startsinging" then
skilluprun = true
skillupcount = 5
send_command('wait 1.0;input /ma "'..songspells[songcount]..'" <me>')
add_to_chat(123,"Starting Singing Skill up")
end
if command == "startblue" then
skilluprun = true
skillupcount = 6
send_command('wait 1.0;input /ma "'..bluspells[blucount]..'" <me>')
add_to_chat(123,"Starting Blue Magic Skill up")
end
if command == "startsmn" then
skilluprun = true
skillupcount = 7
send_command('wait 1.0;input /ma "'..smnspells[smncount]..'" <me>')
add_to_chat(123,"Starting Summoning Skill up")
end
if command == "skillstop" then
skilluprun = false
add_to_chat(123,"Stoping Skill up")
end
if command == 'aftershutdown' then
shutdown = true
logoff = false
add_to_chat(123, '----- Will Shutdown When Skillup Done -----')
end
if command == 'afterlogoff' then
shutdown = false
logoff = true
add_to_chat(123, '----- Will Logoff When Skillup Done -----')
end
if command == 'afterStop' then
shutdown = false
logoff = false
add_to_chat(123, '----- Will Stop When Skillup Done -----')
end
end
function shutdown_logoff()
add_to_chat(123,"Auto stop skillup")
if logoff then
send_command('wait 3.0;input /logoff')
elseif shutdown then
send_command('wait 3.0;input /shutdown')
end
end
function nin_tool_check(spell)
if spell.type == "Ninjutsu" then
local tool = ninspellitem[spell.name]
local stool = ninplustool[tool]
local toolbag = nintoolbag[tool]
local stoolbag = nintoolbag[stool]
if not nincant:contains(spell.name)then
if not (player.inventory == tool or player.inventory == stool) then
cancel_spell()
if player.inventory == toolbag then
tbid = toolbagtoid[toolbag]
send_command('input /item "'..toolbag..'" <me>')
elseif player.inventory == stoolbag then
tbid = toolbagtoid[stoolbag]
send_command('input /item "'..stoolbag..'" <me>')
else
nincant:append(spell.name)
nincantcount = nincantcount +1
end
if nincount < 12 then
nincount = nincount +1
else
nincount = 1
end
send_command('input /ma "'..ninspells[nincount]..'" <me>')
return
end
elseif nincantcount < 12 then
if nincount < 12 then
nincount = nincount +1
else
nincount = 1
end
send_command('input /ma "'..ninspells[nincount]..'" <me>')
return
else
skilluprun = false
add_to_chat(123,"You Have No More Of The Tools Needed For Castin of NIN Spells\nStoping NIN Skillup")
return
end
end
end
function event_action(act)
action = Action(act)
if action:get_category_string() == 'item_finish' then
if action.raw.param == tbid and player.id == action.raw.actor_id then
send_command('wait 1.0;input /ma "'..ninspells[nincount]..'" <me>')
tbid = 0
end
end
end
windower.raw_register_event('action', event_action)
function skill_capped(id, data, modified, injected, blocked)
if id == 0x062 then
healingcap = data:unpack('q', 0xC4, 8)
enhancingcap = data:unpack('q', 0xC6, 8)
summoningcap = data:unpack('q', 0xCE, 8)
ninjutsucap = data:unpack('q', 0xD0, 8)
singingcap = data:unpack('q', 0xD2, 8)
stringcap = data:unpack('q', 0xD4, 8)
windcap = data:unpack('q', 0xD6, 8)
bluecap = data:unpack('q', 0xD8, 8)
geomancycap = data:unpack('q', 0xDA, 8)
handbellcap = data:unpack('q', 0xDC, 8)
end
if id == 0x0DF then
if data:unpack('I', 0x0D) == player.max_mp and skilluprun then
windower.send_command('input /heal off')
end
end
end
windower.raw_register_event('incoming chunk', skill_capped)