|
Gearswap Support Thread
Serveur: Siren
Game: FFXI
Posts: 170
By Siren.Scottyb 2015-03-06 15:22:36
Hey rq I just wanted to ask, is it possible to simply copy someone elses gearswap and input my own gear like I used to on SC? I was an xbox player for the major part of my FFXI days and never really learned SC and now I'm super casual I just wanted to know if theres a quick way for me to get GS up and running.
Cerberus.Conagh
Serveur: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2015-03-07 00:45:14
Hey rq I just wanted to ask, is it possible to simply copy someone elses gearswap and input my own gear like I used to on SC? I was an xbox player for the major part of my FFXI days and never really learned SC and now I'm super casual I just wanted to know if theres a quick way for me to get GS up and running.
Yes.
Serveur: Siren
Game: FFXI
Posts: 170
By Siren.Scottyb 2015-03-08 13:16:36
So I looked at Gearswap installed it etc but cant figure out how to get it to work. If I try loading it then I get told that gearswap does not exist.
I have looked in the files and tried editing one of the examples to add some of my gear as a test.
Serveur: Shiva
Game: FFXI
Posts: 27982
By Shiva.Spathaian 2015-03-08 13:22:47
Are you using
lua load gearswap
Remember, addons aren't run like plugins(which spellcast was)
Serveur: Siren
Game: FFXI
Posts: 170
By Siren.Scottyb 2015-03-08 13:40:08
Ok thanks now that I type that it says that lua is already loaded lol.
So as I asked above if I simply edit one of the examples could I use that as my thf lua for example?
Serveur: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-03-08 14:41:55
Ok thanks now that I type that it says that lua is already loaded lol.
So as I asked above if I simply edit one of the examples could I use that as my thf lua for example? You can use any lua example and make it your own. Use notepad to edit-in your own gear in sets. And don't forget to rename it Yourcharactername_THF.lua.
Serveur: Siren
Game: FFXI
Posts: 170
By Siren.Scottyb 2015-03-08 18:14:44
Thanks for the replies I have a basic set up and running making my fajin boots auto equip after fights, that in itself is enough to make life so much easier haha.
Serveur: Shiva
Game: FFXI
Posts: 54
By Shiva.Mulitus 2015-03-10 14:13:19
Curious is there a way we can just use Edit Equip set in game . example
This is what we do now
sets.precast.WS['Sanguine Blade'] = {
head="Pixie Hairpin +1",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Crematio Earring",
body="Hagondes Coat +1",hands="Hagondes Cuffs +1",ring1="Fenrir Ring +1",ring2="Fenrir Ring +1",
back="Cornflower Cape",legs="Hagondes Pants +1",feet="Hagondes Sabots"}
Cant we just do something like this
sets.precast.WS['Sanguine Blade'] = { SET001
sets.midcast.FastRecast = {SET002
This way we could use Gearswap in the game and not have to type everything out or can make fast changes in game with are sets
Serveur: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-03-10 17:53:21
The easiest way is to equip gear just for Sanguine Blade and do //gs export.
It's possible to create a custom set by doing something like this Code
if spell.type == 'WeaponSkill' then
if sets.precast.WS[spell.name] then
WSset = set_combine(WSset, sets.precast.WS[spell.name])
else
WSset = set_combine(WSset, sets.precast.WS)
end
if SET001 ~= nil then
WSset = set_combine(WSset, SET001)
end
equip(WSset)
end
However, there are a lot of mechanics involved, that you would need, just to define and use the variable, 'SET001'. You'd need custom variables for every slot. Then you'll need a custom command to translate those variables into strings and thus, into 'SET001'. Altogether you'd add another 15-20 lines of code, and that's just for Sanguine Blade.
If you don't have some understanding of tables, variables and strings then I wouldn't recommend going that route and trying to edit that yourself.
Carbuncle.Doryll
Serveur: Carbuncle
Game: FFXI
By Carbuncle.Doryll 2015-03-11 10:04:58
Hello Quixacotl
I tried your rules for Mega-obi and, it's very great !!
But i have a request for you, is it possible to add a fonction for Hightiers spells ? Because when i nuke during weather/day, Obi is equiped, but all my spells are in Tiers1 sets.
Thank u
Serveur: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-03-11 14:21:51
Post or PM me your lua and I'll look at it.
Valefor.Seranos
Serveur: Valefor
Game: FFXI
Posts: 193
By Valefor.Seranos 2015-03-12 11:21:02
Questions on augmented gear:
1. Why does it seem that some augments needs to be exact to what is shown on screen (e.g. "Triple Atk."+2) but some are not (e.g. "Mag.Atk.Bns."+25 not having spaces)? Is there a list of when the exceptions need to be made?
2. Do you need to list all augments or just augments that can differentiate two of the same pieces. For example, one Taeon is for Leaden with MAB, same slot has ACC and TA+2. Do I need to use all augments to differentiate or can I just use the MAB for the first and the TA+2 for the second?
Misc. Question:
1. Can you change color of text sent through GS? I have COR GS that shows lucky and unlucky, but want to add color instead of all text being white. Here's the code:
Code
function display_roll_info(spell)
rollinfo = rolls[spell.english]
local rollsize = (state.LuzafRing.value and 'Large') or 'Small'
if rollinfo then
add_to_chat(104, spell.english..' provides a bonus to '..rollinfo.bonus..'. Roll size: '..rollsize)
add_to_chat(104, 'Lucky roll is '..tostring(rollinfo.lucky)..', Unlucky roll is '..tostring(rollinfo.unlucky)..'.')
end
end
Ragnarok.Martel
Serveur: Ragnarok
Game: FFXI
Posts: 2954
By Ragnarok.Martel 2015-03-12 11:41:32
You see that 104 in add_to_chat? That's the color setting. Adjust to preference.
Listing one Augment will usually work, so long and there's not another piece that shares the same aug to be confused with. But it's probably better to list them all.
Are you familiar with //gs export? It will list your currently equipped gear in a lua file. Including exact augments. //gs export inv will do so with your entire inventory.
So there's really no need to manually input augments.
Valefor.Seranos
Serveur: Valefor
Game: FFXI
Posts: 193
By Valefor.Seranos 2015-03-12 14:58:42
You see that 104 in add_to_chat? That's the color setting. Adjust to preference.
Listing one Augment will usually work, so long and there's not another piece that shares the same aug to be confused with. But it's probably better to list them all.
Are you familiar with //gs export? It will list your currently equipped gear in a lua file. Including exact augments. //gs export inv will do so with your entire inventory.
So there's really no need to manually input augments.
Thanks! Forgot about the //gs export function... that's a huge help.
As for the text, would you know how to change just certain text within the string? Not at my home computer, but assume changing the 104 will change all text color. I'm just looking to change the lucky and unlucky numbers.
Ragnarok.Martel
Serveur: Ragnarok
Game: FFXI
Posts: 2954
By Ragnarok.Martel 2015-03-12 15:32:26
I haven't the slightest idea how to do that.
Serveur: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-03-12 15:35:03
GS is currently having issues reading the new gear augments. Hence, it won't equip. Fortunately there's a fall-back system but it requires some additional steps.
To get the correct augment table, equip it then do //gs export. Your export folder will contain the lua and aug stats that you need to add to GS.
You can equip like-items, but with different augments, at the proper time by using this in your lua (example). Code
-- augmented gear
QaaxoFeet = {}
QaaxoFeet.R15A = {name="Qaaxo Leggings", augments={'Attack+15','Evasion+15','"Dbl.Atk."+2'}} -- table becomes a variable.
QaaxoFeet.R15B = {name="Qaaxo Leggings", augments={'Accuracy+15','STR+7','Phys. dmg. taken -3'}} -- table becomes a variable.
sets.engaged = {feet=QaaxoFeet.R15B} -- feet=variable. notice no ".
sets.precast.WS = {feet=QaaxoFeet.R15A} -- feet=variable. notice no ".
One of the problems with Mote's Cor example is that the default rollinfo color hardly stands out. In fact, it's nearly the same (to me) as battle spam. I changed the color number so that it stands out. The '158' represents the GS add_to_chat color but you can try other colors. Code
if rollinfo then
add_to_chat(158, spell.english..' provides a bonus to '..rollinfo.bonus..'. Roll size: '..rollsize)
add_to_chat(158, 'Lucky roll is '..tostring(rollinfo.lucky)..', Unlucky roll is '..tostring(rollinfo.unlucky)..'.')
end
It is not possible to have two or more colors in the same chatline. This won't work:
add_to_chat(158, 'This is ', 104, 'one line.')
or this:
add_to_chat(158, 'This is ');add_to_chat(104, 'one line.')
Valefor.Caivian
Serveur: Valefor
Game: FFXI
Posts: 21
By Valefor.Caivian 2015-03-12 15:46:02
Using rolltracker.lua as an example to figure out the chat color changing thing, I was able to get chat colors to change within one line using the following:
Code windower.add_to_chat(1,'test ' ..string.char(31,13).. 'testagain')
The color should be able to be changed by playing with one or both values in string.char(#,#). I didn't mess with them after the point of just getting color to change in-line.
Also, this shouldn't require any includes that aren't already included with gearswap itself.
Edit:
To play with this quickly and get an idea of what changes do what, you can create an addon file in a folder with whatever name (in this example, TT) and load/reload it with new values each time. To test your values with this example, you'd just type TT or tt in the console.
Code _addon.name = 'TT'
_addon.commands = {'TT', 'tt'}
windower.register_event('addon command', function(...)
windower.add_to_chat(1,'test' ..string.char(31,13).. 'testagain')
end)
Ragnarok.Martel
Serveur: Ragnarok
Game: FFXI
Posts: 2954
By Ragnarok.Martel 2015-03-12 15:48:19
I've just been putting the augmented items from export directly in my gear sets. Which has been working just fine.
I suppose the other way has the advantage of only having to replace one augment table if augs change, but with find and replace that's not really much of an issue.
Valefor.Seranos
Serveur: Valefor
Game: FFXI
Posts: 193
By Valefor.Seranos 2015-03-12 20:55:20
Using rolltracker.lua as an example to figure out the chat color changing thing, I was able to get chat colors to change within one line using the following:
Code windower.add_to_chat(1,'test ' ..string.char(31,13).. 'testagain')
The color should be able to be changed by playing with one or both values in string.char(#,#). I didn't mess with them after the point of just getting color to change in-line. [/code]
You rock! I was able to update it with the following code, making lucky green and unlucky red:
Code if rollinfo then
add_to_chat(104, spell.english..' provides a bonus to '..rollinfo.bonus..'. Roll size: '..rollsize)
add_to_chat(104, 'Lucky roll is '..string.char(31,158)..tostring(rollinfo.lucky)..string.char(31,104)..', Unlucky roll is '..string.char(31,167)..tostring(rollinfo.unlucky)..string.char(31,104)..'.')
end
By Selindrile 2015-03-12 21:09:28
pet.isvalid sometimes contains the incorrect value when using it within
windower.register_event('action', function(act)
tried using player.pet.isvalid but that didn't work either, is there something i need to use specifically there to make sure it knows I'm referring to my own pet?
Valefor.Caivian
Serveur: Valefor
Game: FFXI
Posts: 21
By Valefor.Caivian 2015-03-12 23:50:02
pet.isvalid sometimes contains the incorrect value when using it within
windower.register_event('action', function(act)
tried using player.pet.isvalid but that didn't work either, is there something i need to use specifically there to make sure it knows I'm referring to my own pet? Can you post the bit of code that isn't working?
By Selindrile 2015-03-12 23:51:47
Code windower.register_event('action', function(act)
if not midaction() then
if checkgeo() then return
elseif checknuke() then return
end
end
end)
function checkgeo()
if state.AutoBuffMode.value then
if not player.indi then
windower.send_command('input /ma "Indi-Acumen" <me>')
return true
elseif not pet.isvalid then
windower.send_command('input /ma "Geo-Refresh" <me>')
return true
else
return false
end
else
return false
end
end
Serveur: Odin
Game: FFXI
Posts: 170
By Odin.Quixacotl 2015-03-13 00:41:20
Using rolltracker.lua as an example to figure out the chat color changing thing, I was able to get chat colors to change within one line using the following:
Code windower.add_to_chat(1,'test ' ..string.char(31,13).. 'testagain')
The color should be able to be changed by playing with one or both values in string.char(#,#). I didn't mess with them after the point of just getting color to change in-line. Nice tip thank you for posting! I stand corrected.
Valefor.Caivian
Serveur: Valefor
Game: FFXI
Posts: 21
By Valefor.Caivian 2015-03-13 00:48:10
Best I can tell, pet.isvalid is specific to your character, so I don't think there is a way for it to not know you're referring to your own pet. I'm unsure why it wouldn't work all the time, but would some of the time...
If you're willing to try it, maybe move the checks you're doing out of a register_event and into a status_change function that gearswap already deals with:
Code function status_change(new,old)
if player.status == 'Idle' then
if checkgeo() then return
elseif checknuke() then return
end
end
end
By Selindrile 2015-03-13 00:56:07
I've already used it inside job_buff_change, and job_update
and it was correct every time so far as I could tell, which is why I was wondering if it behaved differently inside register_event due to the actor potentially being different, can check that specifically, in a couple.
Valefor.Caivian
Serveur: Valefor
Game: FFXI
Posts: 21
By Valefor.Caivian 2015-03-13 01:36:09
If you want to avoid the potential different actor, you can try using this:
Code if ((actor == (player.id or player.index)))
I'm a little fuzzy on when you're wanting this to fire the checks that wouldn't be covered with status_change and job_update.
Maybe just verifying you're the actor would ensure it doesn't fail?
By Selindrile 2015-03-13 01:48:50
I got to what I wanted with a self command loop, still curious as to why it sometimes it was false when it shouldn't have been.
Current issue: Always getting "aattempt to yield across metamethod/C-Ccall boundry"
when trying to use coroutine.sleep in gearswap.
By Iryoku 2015-03-14 01:04:57
Current issue: Always getting "aattempt to yield across metamethod/C-Ccall boundry"
when trying to use coroutine.sleep in gearswap.
coroutine.sleep is an extension provided by Windower, it is implemented as a call to coroutine.yield that schedules the function to resume at some point in the future instead of immediately. Stock Lua 5.1 is not able to yield across a metamethod call, which are used quite extensively in Gearswap internally last time I checked.
By kithaofcerb 2015-03-16 01:47:46
Good evening folks,
I have been using the skillup.lua posted in the gearswap shop thread for a little while, and sometimes it will randomly stop working...
By stop working, I mean, for example: I will start the summoning magic skill up, then it will summon for 10 or 15 minutes or so, then it will miss a command somewhere or something, resulting in "release" not being sent, which sends me into an endless loop of "Kitha already has a pet". Does anybody know a solution to this? I have tried elongating wait timers inbetween casts, but that doesn't seem to have helped.
This is the original code, and I haven't changed a thing except making wait timers longer than they are in this version. Any help is appreciated.
Code
--version 1.0.5.0
--[[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]]
-- Save Window Location (default: false)
save_window_location = false
packets = require('packets')
box = {}
box.pos = {}
box.pos.x = 211
box.pos.y = 402
box.text = {}
box.text.font = 'Dotum'
box.text.size = 12
box.bg = {}
box.bg.alpha = 255
boxa = {}
boxa.pos = {}
boxa.pos.x = box.pos.x - 140
boxa.pos.y = box.pos.y
boxa.text = {}
boxa.text.font = 'Dotum'
boxa.text.size = 9
boxa.bg = {}
boxa.bg.alpha = 255
skill_ups = {}
total_skill_ups = 0
skill = {}
last_nin = 'none'
color_GEO = true
color_HEL = true
color_ENH = true
color_NIN = true
color_SIN = true
color_BLU = true
color_SMN = true
color_STOP = true
color_DOWN = true
color_LOG = true
if gearswap.pathsearch({'Saves/skillup_data.lua'}) then
include('Saves/skillup_data.lua')
end
window = texts.new(box)
button = texts.new(boxa)
function get_sets()
skilluprun = false
sets.brd = {}
sets.brd.wind = {
range="Cornette"--put your wind instrument here
}
sets.brd.string = {
range="Lamia Harp"--put your string instrument here
}
skilluptype = {"Healing","Geomancy","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 = {"Baraera","Baraero","Barblizzara","Barblizzard","Barfira","Barfire","Barstone","Barstonra","Barthunder","Barthundra","Barwater","Barwatera"}
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 = T{}
nincantcount = 0
nin_tools ={
["Monomi: Ichi"] = {tool='Sanjaku-Tenugui',tool_bag="Toolbag (Sanja)",uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)"},
["Aisha: Ichi"] = {tool='Soshi',tool_bag="Toolbag (Soshi)",uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)"},
["Katon: Ichi"] = {tool='Uchitake',tool_bag="Toolbag (Uchi)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Katon: Ni"] = {tool='Uchitake',tool_bag="Toolbag (Uchi)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Katon: San"] = {tool='Uchitake',tool_bag="Toolbag (Uchi)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Hyoton: Ichi"] = {tool='Tsurara',tool_bag="Toolbag (Tsura)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Hyoton: Ni"] = {tool='Tsurara',tool_bag="Toolbag (Tsura)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Hyoton: San"] = {tool='Tsurara',tool_bag="Toolbag (Tsura)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Huton: Ichi"] = {tool='Kawahori-Ogi',tool_bag="Toolbag (Kawa)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Huton: Ni"] = {tool='Kawahori-Ogi',tool_bag="Toolbag (Kawa)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Huton: San"] = {tool='Kawahori-Ogi',tool_bag="Toolbag (Kawa)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Doton: Ichi"] = {tool='Makibishi',tool_bag="Toolbag (Maki)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Doton: Ni"] = {tool='Makibishi',tool_bag="Toolbag (Maki)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Doton: San"] = {tool='Makibishi',tool_bag="Toolbag (Maki)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Raiton: Ichi"] = {tool='Hiraishin',tool_bag="Toolbag (Hira)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Raiton: Ni"] = {tool='Hiraishin',tool_bag="Toolbag (Hira)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Raiton: San"] = {tool='Hiraishin',tool_bag="Toolbag (Hira)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Suiton: Ichi"] = {tool='Mizu-Deppo',tool_bag="Toolbag (Mizu)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Suiton: Ni"] = {tool='Mizu-Deppo',tool_bag="Toolbag (Mizu)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Suiton: San"] = {tool='Mizu-Deppo',tool_bag="Toolbag (Mizu)",uni_tool="Inoshishinofuda",uni_tool_bag="Toolbag (Ino)"},
["Utsusemi: Ichi"] = {tool='Shihei',tool_bag="Toolbag (Shihe)",uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)"},
["Utsusemi: Ni"] = {tool='Shihei',tool_bag="Toolbag (Shihe)",uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)"},
["Utsusemi: San"] = {tool='Shihei',tool_bag="Toolbag (Shihe)",uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)"},
["Jubaku: Ichi"] = {tool='Jusatsu',tool_bag="Toolbag (Jusa)",uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)"},
["Jubaku: Ni"] = {tool='Jusatsu',tool_bag="Toolbag (Jusa)",uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)"},
["Jubaku: San"] = {tool='Jusatsu',tool_bag="Toolbag (Jusa)",uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)"},
["Hojo: Ichi"] = {tool='Kaginawa',tool_bag="Toolbag (Kagi)",uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)"},
["Hojo: Ni"] = {tool='Kaginawa',tool_bag="Toolbag (Kagi)",uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)"},
["Hojo: San"] = {tool='Kaginawa',tool_bag="Toolbag (Kagi)",uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)"},
["Kurayami: Ichi"] = {tool='Sairui-Ran',tool_bag="Toolbag (Sai)",uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)"},
["Kurayami: Ni"] = {tool='Sairui-Ran',tool_bag="Toolbag (Sai)",uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)"},
["Kurayami: San"] = {tool='Sairui-Ran',tool_bag="Toolbag (Sai)",uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)"},
["Dokumori: Ichi"] = {tool='Kodoku',tool_bag="Toolbag (Kodo)",uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)"},
["Dokumori: Ni"] = {tool='Kodoku',tool_bag="Toolbag (Kodo)",uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)"},
["Dokumori: San"] = {tool='Kodoku',tool_bag="Toolbag (Kodo)",uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)"},
["Tonko: Ichi"] = {tool='Shinobi-Tabi',tool_bag="Toolbag (Shino)",uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)"},
["Tonko: Ni"] = {tool='Shinobi-Tabi',tool_bag="Toolbag (Shino)",uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)"},
["Tonko: San"] = {tool='Shinobi-Tabi',tool_bag="Toolbag (Shino)",uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)"},
["Gekka: Ichi"] = {tool='Ranka',tool_bag="Toolbag (Ranka)",uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)"},
["Yain: Ichi"] = {tool='Furusumi',tool_bag="Toolbag (Furu)",uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)"},
["Myoshu: Ichi"] = {tool='Kabenro',tool_bag="Toolbg. (Kaben)",uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)"},
["Yurin: Ichi"] = {tool='Jinko',tool_bag="Toolbag (Jinko)",uni_tool="Chonofuda",uni_tool_bag="Toolbag (Cho)"},
["Kakka: Ichi"] = {tool='Ryuno',tool_bag="Toolbag (Ryuno)",uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)"},
["Migawari: Ichi"] = {tool='Mokujin',tool_bag="Toolbag (Moku)",uni_tool="Shikanofuda",uni_tool_bag="Toolbag (Shika)"},
}
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"}
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
stoptype = "Stop"
first_spell = 'none'
frame_count = 0
initialize(window, box, 'window')
initialize(button, boxa, 'button')
window:show()
button:show()
end
function initialize(text, settings, a)
if a == 'window' then
local properties = L{}
properties:append('--Skill Up--')
properties:append('Mode :\n ${mode|None}')
if skilluptype[skillupcount] == 'Singing' then
properties:append('\\crCurrent Singing Skill LVL:\n ${skillssing|0}')
properties:append('\\crCurrent String Skill LVL:\n ${skillstring|0}')
properties:append('\\crCurrent Wind Skill LVL:\n ${skillwind|0}')
elseif skilluptype[skillupcount] == 'Geomancy' then
properties:append('\\crCurrent Geomancy Skill LVL:\n ${skillgeo|0}')
properties:append('\\crCurrent Handbell Skill LVL:\n ${skillbell|0}')
else
properties:append('\\crCurrent Skilling LVL:\n ${skillbulk|0}')
end
if shutdown then
properties:append('\\crWill Shutdown When Skillup Done')
elseif logoff then
properties:append('\\crWill Logoff When Skillup Done')
else
properties:append('\\crWill Stop When Skillup Done')
end
properties:append('\\crSkillup ${start|\\cs(255,0,0)Stoped}')
properties:append("\\crSkillup's Per Hour \\cs(255,255,0)${skill_ph|0}")
properties:append("\\crTotal Skillup's \\cs(255,255,0)${skill_total|0}")
text:clear()
text:append(properties:concat('\n'))
end
if a == 'button' then
local properties = L{}
properties:append('${GEOc}')
properties:append('${HELc}')
properties:append('${ENHc}')
properties:append('${NINc}')
properties:append('${SINc}')
properties:append('${BLUc}')
properties:append('${SMNc}')
properties:append('${STOPc}')
properties:append('${DOWNc}')
properties:append('${LOGc}')
text:clear()
text:append(properties:concat('\n'))
end
end
function file_unload()
if save_window_location then
file_write()
end
window:destroy()
button:destroy()
end
function status_change(new,old)
if new=='Idle' then
equip(sets.Idle)
if skilluprun then
if skilluptype[skillupcount] == "Geomancy" then
send_command('wait 1.0;input /ma "'..geospells[geocount]..'" <me>')
elseif skilluptype[skillupcount] == "Healing" then
send_command('wait 1.0;input /ma "'..healingspells[healingcount]..'" <me>')
elseif skilluptype[skillupcount] == "Enhancing" then
send_command('wait 1.0;input /ma "'..enhancespells[enhancecount]..'" <me>')
elseif skilluptype[skillupcount] == "Ninjutsu" then
send_command('wait 1.0;input /ma "'..ninspells[nincount]..'" <me>')
elseif skilluptype[skillupcount] == "Singing" then
send_command('wait 1.0;input /ma "'..songspells[songcount]..'" <me>')
elseif skilluptype[skillupcount] == "Blue" then
send_command('wait 1.0;input /ma "'..bluspells[blucount]..'" <me>')
elseif skilluptype[skillupcount] == "Summoning" then
send_command('wait 1.0;input /ma "'..smnspells[smncount]..'" <me>')
end
end
end
end
function filtered_action(spell)
if skilluprun then
if spell.type == "Geomancy" then
if skill['Geomancy Capped'] and skill['Handbell Capped'] then
skilluprun = false
shutdown_logoff()
return
end
cancel_spell()
geocount = (geocount % #geospells) + 1
send_command('input /ma "'..geospells[geocount]..'" <me>')
return
elseif spell.skill == "Healing Magic" then
if skill['Healing Magic Capped'] then
skilluprun = false
shutdown_logoff()
return
end
cancel_spell()
healingcount = (healingcount % #healingspells) + 1
send_command('input /ma "'..healingspells[healingcount]..'" <me>')
return
elseif spell.skill == "Enhancing Magic" then
if skill['Enhancing Magic Capped'] then
skilluprun = false
shutdown_logoff()
return
end
cancel_spell()
enhancecount = (enhancecount % #enhancespells) + 1
send_command('input /ma "'..enhancespells[enhancecount]..'" <me>')
return
elseif spell.skill == "Ninjutsu" then
if skill['Ninjutsu Capped'] then
skilluprun = false
shutdown_logoff()
return
end
if not windower.ffxi.get_spells()[spell.id] then
cancel_spell()
nincount = (nincount % #ninspells) + 1
send_command('input /ma "'..ninspells[nincount]..'" <me>')
return
elseif nin_tool_check(spell) then
cancel_spell()
last_nin = ninspells[nincount]
send_command('input /item "'..nin_tool_open()..'" <me>')
end
elseif spell.skill == "Singing" then
if skill['Singing Capped'] and skill['Stringed Instrument Capped'] and skill['Wind Instrument Capped'] then
skilluprun = false
shutdown_logoff()
return
end
cancel_spell()
songcount = (songcount % #songspells) + 1
send_command('input /ma "'..songspells[songcount]..'" <me>')
return
elseif spell.skill == "Blue Magic" then
if skill['Blue Magic Capped'] then
skilluprun = false
shutdown_logoff()
return
end
cancel_spell()
blucount = (blucount % #bluspells) + 1
send_command('input /ma "'..bluspells[blucount]..'" <me>')
return
elseif spell.type == "SummonerPact" then
if skill['Summoning Magic Capped'] then
skilluprun = false
send_command('wait 4.0;input /ja "Release" <me>')
return
end
cancel_spell()
smncount = (smncount % #smnspells) + 1
send_command('input /ma "'..smnspells[smncount]..'" <me>')
return
elseif spell.english == "Unbridled Learning" then
if skill['Blue Magic Capped'] then
skilluprun = false
shutdown_logoff()
return
end
cancel_spell()
blucount = (blucount % #bluspells) + 1
send_command('input /ma "'..bluspells[blucount]..'" <me>')
return
elseif spell.english == "Avatar's Favor" then
if skill['Summoning Magic Capped'] then
skilluprun = false
send_command('wait 4.0;input /ja "Release" <me>')
return
end
cancel_spell()
send_command('input /ja "Release" <me>')
return
end
return
end
cancel_spell()
end
function precast(spell) -- done
if spell then
if spell.mp_cost > player.mp then
cancel_spell()
send_command('input /heal on')
return
end
end
if skilluprun then
if skilluptype[skillupcount] == "Healing" then
if tonumber(windower.ffxi.get_spell_recasts()[spell.recast_id]) > 0 or not windower.ffxi.get_spells()[spell.id] then
cancel_spell()
healingcount = (healingcount % #healingspells) + 1
send_command('input /ma "'..healingspells[healingcount]..'" <me>')
return
else
healingcount = (healingcount % #healingspells) + 1
end
elseif skilluptype[skillupcount] == "Geomancy" then
if tonumber(windower.ffxi.get_spell_recasts()[spell.recast_id]) > 0 or not windower.ffxi.get_spells()[spell.id] then
cancel_spell()
geocount = (geocount % #geospells) + 1
send_command('input /ma "'..geospells[geocount]..'" <me>')
return
else
geocount = (geocount % #geospells) + 1
end
elseif skilluptype[skillupcount] == "Enhancing" then
if tonumber(windower.ffxi.get_spell_recasts()[spell.recast_id]) > 0 or not windower.ffxi.get_spells()[spell.id] then
cancel_spell()
enhancecount = (enhancecount % #enhancespells) + 1
send_command('input /ma "'..enhancespells[enhancecount]..'" <me>')
return
else
enhancecount = (enhancecount % #enhancespells) + 1
end
elseif skilluptype[skillupcount] == "Ninjutsu" then
if tonumber(windower.ffxi.get_spell_recasts()[spell.recast_id]) > 0 or not windower.ffxi.get_spells()[spell.id] then
cancel_spell()
nincount = (nincount % #ninspells) + 1
send_command('input /ma "'..ninspells[nincount]..'" <me>')
return
else
nincount = (nincount % #ninspells) + 1
end
elseif skilluptype[skillupcount] == "Singing" then
if not skill['Stringed Instrument Capped'] then
equip(sets.brd.string)
elseif not skill['Wind Instrument Capped'] then
equip(sets.brd.wind)
end
if tonumber(windower.ffxi.get_spell_recasts()[spell.recast_id]) > 0 or not windower.ffxi.get_spells()[spell.id] then
cancel_spell()
songcount = (songcount % #songspells) + 1
send_command('input /ma "'..songspells[songcount]..'" <me>')
return
else
songcount = (songcount % #songspells) + 1
end
elseif skilluptype[skillupcount] == "Blue" then
if spell.skill == "Blue Magic" then
if tonumber(windower.ffxi.get_spell_recasts()[spell.recast_id]) > 0 or not windower.ffxi.get_spells()[spell.id] then
cancel_spell()
blucount = (blucount % #bluspells) + 1
send_command('input /ma "'..bluspells[blucount]..'" <me>')
return
else
blucount = (blucount % #bluspells) + 1
end
elseif spell.english == "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()
blucount = (blucount % #bluspells) + 1
send_command('input /ma "'..bluspells[blucount]..'" <me>')
return
end
end
else
cancel_spell()
blucount = (blucount % #bluspells) + 1
send_command('input /ma "'..bluspells[blucount]..'" <me>')
return
end
end
elseif skilluptype[skillupcount] == "Summoning" then
if spell.type == "SummonerPact" then
if tonumber(windower.ffxi.get_spell_recasts()[spell.recast_id]) > 0 or not windower.ffxi.get_spells()[spell.id] then
cancel_spell()
smncount = (smncount % #smnspells) + 1
send_command('input /ma "'..smnspells[smncount]..'" <me>')
return
else
smncount = (smncount % #smnspells) + 1
end
elseif spell.english == "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.english == "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.english == "Release" then
if not pet.isvalid then
cancel_spell()
send_command('input /heal on')
return
end
local recast = windower.ffxi.get_ability_recasts()[spell.recast_id]
if (recast > 0) then
cancel_spell()
send_command('wait '..tostring(recast+0.5)..';input /ja "Release" <me>')
return
end
end
end
return
elseif spell.english == "Release" then
local recast = windower.ffxi.get_ability_recasts()[spell.recast_id]
if (recast > 0) then
cancel_spell()
send_command('wait '..tostring(recast+0.5)..';input /ja "Release" <me>')
return
end
return
end
end
function aftercast(spell)
if skilluprun then
if spell.interrupted then
if skilluptype[skillupcount] == "Geomancy" then
send_command('wait 3.0;input /ma "'..geospells[geocount]..'" <me>')
elseif skilluptype[skillupcount] == "Healing" then
send_command('wait 3.0;input /ma "'..healingspells[healingcount]..'" <me>')
elseif skilluptype[skillupcount] == "Enhancing" then
send_command('wait 3.0;input /ma "'..enhancespells[enhancecount]..'" <me>')
elseif skilluptype[skillupcount] == "Ninjutsu" then
send_command('wait 3.0;input /ma "'..ninspells[nincount]..'" <me>')
elseif skilluptype[skillupcount] == "Singing" then
send_command('wait 3.0;input /ma "'..songspells[songcount]..'" <me>')
elseif skilluptype[skillupcount] == "Blue" then
send_command('wait 3.5;input /ja "Unbridled Learning" <me>')
elseif skilluptype[skillupcount] == "Summoning" then
send_command('wait 1.0;input /ma "'..smnspells[smncount]..'" <me>')
end
return
end
if skilluptype[skillupcount] == "Geomancy" then
if skill['Geomancy Capped'] and skill['Handbell Capped'] then
skilluprun = false
shutdown_logoff()
return
end
send_command('wait 3.0;input /ma "'..geospells[geocount]..'" <me>')
elseif skilluptype[skillupcount] == "Healing" then
if skill['Healing Magic Capped'] then
skilluprun = false
shutdown_logoff()
return
end
send_command('wait 3.0;input /ma "'..healingspells[healingcount]..'" <me>')
elseif skilluptype[skillupcount] == "Enhancing" then
if skill['Enhancing Magic Capped'] then
skilluprun = false
shutdown_logoff()
return
end
send_command('wait 3.0;input /ma "'..enhancespells[enhancecount]..'" <me>')
elseif skilluptype[skillupcount] == "Ninjutsu" then
if skill['Ninjutsu Capped'] then
skilluprun = false
shutdown_logoff()
return
elseif spell.type == 'Item' and spell.english == tbid then
send_command('wait 1.0;input /ma "'..last_nin..'" <me>')
tbid = 'none'
end
send_command('wait 3.0;input /ma "'..ninspells[nincount]..'" <me>')
elseif skilluptype[skillupcount] == "Singing" then
if skill['Singing Capped'] and skill['Stringed Instrument Capped'] and skill['Wind Instrument Capped'] then
skilluprun = false
shutdown_logoff()
return
end
send_command('wait 3.0;input /ma "'..songspells[songcount]..'" <me>')
elseif skilluptype[skillupcount] == "Blue" then
if skill['Blue Magic Capped'] then
skilluprun = false
shutdown_logoff()
return
elseif spell.english == "Unbridled Learning" then
send_command('wait 1.0;input /ma "'..bluspells[blucount]..'" <me>')
return
end
send_command('wait 4.0;input /ja "Unbridled Learning" <me>')
elseif skilluptype[skillupcount] == "Summoning" then
if skill['Summoning Magic Capped'] then
skilluprun = false
send_command('wait 4.0;input /ja "Release" <me>')
return
end
if spell.type == "SummonerPact" then
if spell.english:contains('Spirit') and (spell.element == world.weather_element or spell.element == world.day_element)then
send_command('wait 4.0;input /ja "Elemental Siphon" <me>')
elseif not spell.english:contains('Spirit') then
send_command('wait 4.0;input /ja "Avatar\'s Favor" <me>')
else
send_command('wait 0.5; input /ja "Release" <me>')
end
return
elseif spell.english == "Release" then
if spell.interrupted then
send_command('wait 0.5; input /ja "Release" <me>')
return
end
elseif spell.english == "Avatar's Favor" then
send_command('wait 1.0;input /ja "Release" <me>')
return
elseif spell.english == "Elemental Siphon" then
send_command('wait 1.0;input /ja "Release" <me>')
return
end
send_command('wait 1.0;input /ma "'..smnspells[smncount]..'" <me>')
end
return
elseif spell.type == "SummonerPact" then
if skill['Summoning Magic Capped'] then
skilluprun = false
send_command('wait 4.0;input /ja "Release" <me>')
return
end
elseif spell.english == "Release" then
if skill['Summoning Magic Capped'] then
shutdown_logoff()
end
elseif spell.english == "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 = 2
send_command('wait 1.0;input /ma "'..geospells[geocount]..'" <me>')
initialize(window, box, 'window')
elseif command == "starthealing" then
skilluprun = true
skillupcount = 1
send_command('wait 1.0;input /ma "'..healingspells[healingcount]..'" <me>')
initialize(window, box, 'window')
elseif command == "startenhancing" then
skilluprun = true
skillupcount = 3
send_command('wait 1.0;input /ma "'..enhancespells[enhancecount]..'" <me>')
initialize(window, box, 'window')
elseif command == "startninjutsu" then
skilluprun = true
skillupcount = 4
send_command('wait 1.0;input /ma "'..ninspells[nincount]..'" <me>')
initialize(window, box, 'window')
elseif command == "startsinging" then
skilluprun = true
skillupcount = 5
send_command('wait 1.0;input /ma "'..songspells[songcount]..'" <me>')
initialize(window, box, 'window')
elseif command == "startblue" then
skilluprun = true
skillupcount = 6
send_command('wait 1.0;input /ma "'..bluspells[blucount]..'" <me>')
initialize(window, box, 'window')
elseif command == "startsmn" then
skilluprun = true
skillupcount = 7
send_command('wait 1.0;input /ma "'..smnspells[smncount]..'" <me>')
initialize(window, box, 'window')
elseif command == "skillstop" then
skilluprun = false
elseif command == 'aftershutdown' then
stoptype = "Shutdown"
shutdown = true
logoff = false
initialize(window, box, 'window')
elseif command == 'afterlogoff' then
stoptype = "Logoff"
shutdown = false
logoff = true
initialize(window, box, 'window')
elseif command == 'afterStop' then
stoptype = "Stop"
shutdown = false
logoff = false
initialize(window, box, 'window')
end
updatedisplay()
end
function shutdown_logoff()
add_to_chat(123,"Auto stop skillup")
if logoff then
send_command('wait 3.0;input /logout')
elseif shutdown then
send_command('wait 3.0;input /shutdown')
end
initialize(window, box, 'window')
updatedisplay()
end
function nin_tool_check(spell)
if (player.inventory[nin_tools[spell.english].tool] == nil or player.inventory[nin_tools[spell.english].uni_tool] == nil)
and (player.inventory[nin_tools[spell.english].tool_bag] ~= nil or player.inventory[nin_tools[spell.english].uni_tool_bag] ~= nil) then
return true
else
add_to_chat(7,"No Tools Available To Cast "..spell.english)
end
end
function nin_tool_open()
if nincantcount ~= #ninspells and not nincant:contains(spell.english) then
if player.inventory[nin_tools[spell.english].tool_bag] ~= nil then
tbid = nin_tools[spell.english].tool_bag
return nin_tools[spell.english].tool_bag
elseif player.inventory[nin_tools[spell.english].uni_tool_bag] ~= nil then
tbid = nin_tools[spell.english].uni_tool_bag
return nin_tools[spell.english].uni_tool_bag
else
nincant:append(spell.english)
nincantcount = nincantcount +1
end
elseif nincantcount ~= #ninspells then
cancel_spell()
nincount = (nincount % #ninspells) + 1
send_command('input /ma "'..ninspells[nincount]..'" <me>')
return
else
skilluprun = false
cancel_spell()
add_to_chat(7,"No Tools Available To Cast Any Ninjutsu")
end
end
function skill_capped(id, data, modified, injected, blocked)
if id == 0x062 then
local packet = packets.parse('incoming', data)
skill = packet
updatedisplay()
end
if id == 0x0DF and skilluprun 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)
function updatedisplay()
local info = {}
info.mode = skilluptype[skillupcount]
info.modeb = skilluprun and info.mode or 'None'
info.start = (skilluprun and '\\cs(0,255,0)Started' or '\\cs(255,0,0)Stoped')
info.skillssing = (skill['Singing Capped'] and "Capped" or skill['Singing Level'])
info.skillstring = (skill['Stringed Instrument Capped'] and "Capped" or skill['Stringed Instrument Level'])
info.skillwind = (skill['Wind Instrument Capped'] and "Capped" or skill['Wind Instrument Level'])
info.skillgeo = (skill['Geomancy Capped'] and "Capped" or skill['Geomancy Level'])
info.skillbell = (skill['Handbell Capped'] and "Capped" or skill['Handbell Level'])
info.skill = {}
info.skill.Healing = (skill['Healing Magic Capped'] and "Capped" or skill['Healing Magic Level'])
info.skill.Enhancing = (skill['Enhancing Magic Capped'] and "Capped" or skill['Enhancing Magic Level'])
info.skill.Summoning = skill['Summoning Magic Level']
info.skill.Ninjutsu = (skill['Ninjutsu Capped'] and "Capped" or skill['Ninjutsu Level'])
info.skill.Blue = (skill['Blue Magic Capped'] and "Capped" or skill['Blue Magic Level'])
info.skillbulk = info.skill[info.mode]
info.type = stoptype
info.skill_ph = (get_rate(skill_ups) or 0) / 10
info.skill_total = (total_skill_ups or 0) / 10
info.GEOc = (color_GEO and 'Start GEO' or '\\cs(255,0,0)Start GEO\\cr')
info.HELc = (color_HEL and 'Start Healing' or '\\cs(255,0,0)Start Healing\\cr')
info.ENHc = (color_ENH and 'Start Enhancing' or '\\cs(255,0,0)Start Enhancing\\cr')
info.NINc = (color_NIN and 'Start Ninjutsu' or '\\cs(255,0,0)Start Ninjutsu\\cr')
info.SINc = (color_SIN and 'Start Singing' or '\\cs(255,0,0)Start Singing\\cr')
info.BLUc = (color_BLU and 'Start Blue Magic' or '\\cs(255,0,0)Start Blue Magic\\cr')
info.SMNc = (color_SMN and 'Start Summoning Magic' or '\\cs(255,0,0)Start Summoning Magic\\cr')
info.STOPc = (color_STOP and 'Stop Skillups' or '\\cs(255,0,0)Stop Skillups\\cr')
info.DOWNc = (color_DOWN and 'Shutdown After Skillup' or '\\cs(255,0,0)Shutdown After Skillup\\cr')
info.LOGc = (color_LOG and 'Logoff After Skillup' or '\\cs(255,0,0)Logoff After Skillup')
window:update(info)
window:show()
button:update(info)
button:show()
end
function file_write()
if not windower.dir_exists(lua_base_path..'data/'..player.name..'/Saves') then
windower.create_dir(lua_base_path..'data/'..player.name..'/Saves')
end
local file = io.open(lua_base_path..'data/'..player.name..'/Saves/skillup_data.lua',"w")
file:write(
'box.pos.x = '..tostring(box.pos.x)..
'\nbox.pos.y = '..tostring(box.pos.y)..
'\nboxa.pos.x = '..tostring(box.pos.x)..
'\nboxa.pos.y = '..tostring(box.pos.y)..
'')
file:close()
end
function set_color(name)
for i, v in pairs(_G) do
if string.contains(i, "color_") then
if i == ("color_"..name) then
_G[i] = false
else
_G[i] = true
end
end
end
end
function mouse(type, x, y, delta, blocked)
local mx, my = texts.extents(button)
local button_lines = button:text():count('\n') + 1
local hx = (x - boxa.pos.x)
local hy = (y - boxa.pos.y)
local location = {}
location.offset = my / button_lines
location[1] = {}
location[1].ya = 1
location[1].yb = location.offset
local count = 2
while count <= button_lines do
location[count] = {}
location[count].ya = location[count - 1].yb
location[count].yb = location[count - 1].yb + location.offset
count = count + 1
end
if type == 0 then
if window:hover(x, y) and window:visible() then
button:pos((box.pos.x - mx), box.pos.y)
elseif button:hover(x, y) and button:visible() then
window:pos((boxa.pos.x + mx), boxa.pos.y)
for i, v in ipairs(location) do
local switch = {[1]="GEO",[2]="HEL",[3]="ENH",[4]="NIN",[5]="SIN",[6]="BLU",[7]="SMN",[8]="STOP",[9]="DOWN",[10]="LOG"}
if hy > location[i].ya and hy < location[i].yb then
set_color(switch[i])
updatedisplay()
end
end
else
set_color("none")
updatedisplay()
return
end
elseif type == 2 then
if button:hover(x, y) and button:visible() then
for i, v in ipairs(location) do
local switchb = {[1]="startgeo",[2]="starthealing",[3]="startenhancing",[4]="startninjutsu",[5]="startsinging",[6]="startblue",[7]="startsmn",[8]="skillstop",[9]="aftershutdown",[10]="afterlogoff"}
if hy > location[i].ya and hy < location[i].yb then
send_command("gs c "..switchb[i])
updatedisplay()
end
end
end
end
end
windower.raw_register_event('mouse', mouse)
function action_message(actor_id, target_id, actor_index, target_index, message_id, param_1, param_2, param_3)
if message_id == 38 and target_id == player.id then
local ts = os.clock()
total_skill_ups = total_skill_ups + param_2
skill_ups[ts] = param_2
end
updatedisplay()
end
windower.raw_register_event('action message', action_message)
function get_rate(tab)
local t = os.clock()
local running_total = 0
for ts,points in pairs(tab) do
local time_diff = t - ts
if t - ts > 3600 then
tab[ts] = nil
else
running_total = running_total + points
end
end
return running_total
end
windower.raw_register_event('prerender',function()
if frame_count%30 == 0 and window:visible() then
updatedisplay()
end
frame_count = frame_count + 1
end)
By Selindrile 2015-03-17 02:59:02
Stock Lua 5.1 is not able to yield across a metamethod call, which are used quite extensively in Gearswap internally last time I checked.
Interesting, is there anything else I should be using in it's place?
What I'm currently doing is just creating a windower command with a wait and then a selfcommand to start the loop over, but there's some limits to that rather than using coroutine.sleep.
Just looking for someone to explain this addon a bit for me. It looks like it is an alternative to Spellcast.
Is it going to be replacing Spellcast? In which ways is it better or worse. I don't know any programming but I've slowly learned more and more about spellcast and the 'language' used in gearswap is confusing to me.
It says it uses packets so it potentially could be more detectable? but does that also eliminate any lag that spellcast may encounter?
I plan on redoing my PUP xml to include pet casting sets thanks to the new addon petschool. I'm just not sure if it's worth it to just wait until gearswap gets more popular or to go ahead and do it in spellcast.
If anyone could give me more info I'd greatly appreciate it.
|
|