|
Gearswap Support Thread
By Miang 2014-07-03 14:35:33
I realized that obi isn't equipping for area weather effects or sch storm weather effects.
http://pastebin.com/uh1Lbg5q
Also; unless I missed something in my absence from the game and zodiac ring now sucks, there's no rules for day spells in this file either.
How can I modify precast gear based on buffs active? E.g. Addle, dark arts casting cure, subtle sorcery, caster's roll, etc?
I promise to help people out with gearswap once I figure it out on my own >.< I used to get a lot of people asking for my old spellcast file. So many things have changed with 80 more inventory spaces and the functionality of gearswap though! For weather I use Code
if spell.element == world.weather_element or
spell.element == world.day_element or
(spell.element == 'Lightning' and buffactive['Thunderstorm']) or
(spell.element == 'Ice' and buffactive['Hailstorm']) or
(spell.element == 'Water' and buffactive['Rainstorm']) or
(spell.element == 'Fire' and buffactive['Firestorm']) or
(spell.element == 'Earth' and buffactive['Sandstorm']) or
(spell.element == 'Wind' and buffactive['Windstorm']) or
(spell.element == 'Light' and buffactive['Aurorastorm']) or
(spell.element == 'Dark' and buffactive['Voidstorm']) then
if spell.skill == 'Elemental Magic' then
equip(sets[spell.element])
elseif string.find(spell.english,'Cure') then
equip(sets[spell.element])
end
end
and my sets for obis are called: Code
sets['Lightning'] = {back="Twilight Cape",waist="Rairin Obi"}
sets['Ice'] = {back="Twilight Cape",waist="Hyorin Obi"}
sets['Water'] = {back="Twilight Cape",waist="Suirin Obi"}
sets['Fire'] = {back="Twilight Cape",waist="Karin Obi"}
sets['Earth'] = {back="Twilight Cape",waist="Dorin Obi"}
sets['Wind'] = {back="Twilight Cape",waist="Furin Obi"}
sets['Light'] = {back="Twilight Cape",waist="Korin Obi"}
sets['Dark'] = {back="Twilight Cape",waist="Anrin Obi"}
I've named them like this to match what spell.element returns
You mention modifying precast based on buffs active, it's normally as simple as if buffactive['addle'] then or if not buffactive['addle'] then for the inverse. e.g. Code
if buffactive['Light Arts'] then
equip(sets.precast['Grimoire'])
end
Cerberus.Conagh
Serveur: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-07-05 15:13:03
Code
windower.register_event('tp change', function(new, old)
if Autoja ==1 then
if player.tp > 450 and not buffactive['Hasso'] or not buffactive['Seigan'] then
send_command('/ja "Hasso" <me>')
return true;
end
end)
Anyone know why the Hasso is not being used when it drops ?
Lakshmi.Byrth
VIP
Serveur: Lakshmi
Game: FFXI
Posts: 6184
By Lakshmi.Byrth 2014-07-05 15:48:03
send_command('input /ja "Hasso" <me>')
or
send_command('hasso')
Bismarck.Snprphnx
Serveur: Bismarck
Game: FFXI
Posts: 2704
By Bismarck.Snprphnx 2014-07-05 15:54:31
send_command('input /ja "Hasso" <me>')
or
send_command('hasso')
I was helping someone with a RNG lua file, and we couldn't get
send_command('DecoyShot') or send_command('Decoy Shot') to work, same for Double Shot. We had to use send_command('input /ja "Decoy Shot" <me>')
Only reason I could think was it was because of it being a two word JA. Not sure if that matters or not.
Lakshmi.Byrth
VIP
Serveur: Lakshmi
Game: FFXI
Posts: 6184
By Lakshmi.Byrth 2014-07-05 16:02:34
They'd have to have shortcuts loaded for the second option to work.
Bismarck.Snprphnx
Serveur: Bismarck
Game: FFXI
Posts: 2704
By Bismarck.Snprphnx 2014-07-05 16:04:46
Gotcha. Thanks for the info.
By Refia1 2014-07-06 04:04:56
motes, can you tell me what i did wrong? trying to get the smn lua you have to equip sacrifice torque when slept:
Code function job_buff_change(buff, gain)
if buff == 'Sleep' then
if gain and pet.isvalid then
equip({neck="Sacrifice Torque"})
else
send_command('gs c update')
end
end
end
I have this placed under the other function job_buff_change.
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-07-06 04:12:21
Quote: under the other function job_buff_change
That's your problem. Any given function should only ever be defined once within a file. The only exception is when you're redefining a function in a sidecar file (eg: your local init_gear_sets function, to replace the one in the main job file).
By Refia1 2014-07-06 04:19:17
Quote: under the other function job_buff_change
That's your problem. Any given function should only ever be defined once within a file. The only exception is when you're redefining a function in a sidecar file (eg: your local init_gear_sets function, to replace the one in the main job file).
ook i deleted it and still not working :(, this is what changed it to:
Code function job_buff_change(buff, gain)
if state.Buff[buff] ~= nil then
state.Buff[buff] = gain
handle_equipping_gear(player.status)
elseif buff == 'Sleep' then
if gain and pet.isvalid then
equip({neck="Sacrifice Torque"})
else
send_command('gs c update')
end
elseif storms:contains(buff) then
handle_equipping_gear(player.status)
end
end
Fenrir.Jinjo
VIP
Serveur: Fenrir
Game: FFXI
Posts: 2269
By Fenrir.Jinjo 2014-07-06 04:34:41
I can't really address your issue because I've never glanced over Mote's files but if you weren't aware, everything is case sensitive.
What exactly isn't working? Have you checked possible solutions through //gs showswaps or //gs debugmode?
Additionally, is there any particular reason that you're using send_command to trigger a GearSwap defined self_command 'update' rather than just declaring the function 'update' [ function update() end ] and calling that?
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-07-06 04:35:03
Please define "not working". Which action did you perform to test it, and what parts of the code were executed? You can add add_to_chat lines within the function to see what bits are being run.
VIP
Serveur: Fenrir
Game: FFXI
Posts: 764
By Fenrir.Motenten 2014-07-06 04:40:42
And Jinjo: The call to 'update' is for self-command handling that's part of the Mote-* library; it calls a specific series of functions that are intended to equip proper gear and keep state vars updated and such. A call to handle_equipping_gear() may be all that's technically needed for this, though.
Fenrir.Jinjo
VIP
Serveur: Fenrir
Game: FFXI
Posts: 2269
By Fenrir.Jinjo 2014-07-06 04:46:56
I use a similar function, I just wasn't sure why it was handled under self_command and not its own function; seemed roundabout. Regardless, could do self_command('update') or whatever the function/params are instead. It's not a priority or an issue, obviously, just irked me because of how it ends up being handled using send_command().
By Avebian 2014-07-06 05:19:14
I have a simple gearswap macro that I like to use, my problem is that I can't figure out how to make it ignore Moogle trust refresh. Is that even possible?
if not buffactive['refresh'] then
send_command('wait 3;/ma refresh')
Can I define refresh as something else to recognize the spell buff instead of moogle?
Also is there a guide or list somewhere that I can find all the different commands,functions,etc that I can use with gearswap?
Fenrir.Jinjo
VIP
Serveur: Fenrir
Game: FFXI
Posts: 2269
By Fenrir.Jinjo 2014-07-06 05:23:58
If they're the same buff ID, there's nothing you can do with buffactive. I'm fairly certain the GEO buff uses a different ID, though, so you could do a custom check if you were inclined. If buffactive works with IDs, that would simplify things for you; I'm honestly unsure if it does.
(The Moogle is a GEO right? >.>)
By Avebian 2014-07-06 05:32:33
ya it's a geo but i don't know, cause moogle refresh stacks with geo refresh too. I'm guessing there's nothing for it then.
Fenrir.Jinjo
VIP
Serveur: Fenrir
Game: FFXI
Posts: 2269
By Fenrir.Jinjo 2014-07-06 05:37:05
You could do something like...
if not windower.ffxi.get_player().buffs[43] then
...etc
if buffactive doesn't accept ID.
By Avebian 2014-07-06 05:54:46
thanks for your help Jinjo, looks like buffactive does work with ID's so I got it working =)
Cerberus.Conagh
Serveur: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-07-06 08:45:54
send_command('input /ja "Hasso" <me>')
or
send_command('hasso')
Much appreciated, I queried because the option of Code send_command('/ja "somethingelse" <me>') worked fine for other JA, but it's an easy fix ;) Much appreciated.
By Refia1 2014-07-06 15:31:51
Please define "not working". Which action did you perform to test it, and what parts of the code were executed? You can add add_to_chat lines within the function to see what bits are being run.
It's not working as in its not equipping my torque when I am slept. I had fenrir hit mob until it forced a tp move and I got slept and nothing occurred.
Phoenix.Warusha
Serveur: Phoenix
Game: FFXI
Posts: 62
By Phoenix.Warusha 2014-07-06 22:57:57
Figured it out.
Serveur: Phoenix
Game: FFXI
Posts: 282
By Phoenix.Chomeymatt 2014-07-08 18:55:31
http://pastebin.com/SiADB4ba
getting an error saying: 184 '}' expected to (close '{' at linen 181) near range
Ramuh.Austar
Serveur: Ramuh
Game: FFXI
Posts: 10481
By Ramuh.Austar 2014-07-08 18:57:04
Your sub slot has the comma before the closing quotations instead of after.
Serveur: Phoenix
Game: FFXI
Posts: 282
By Phoenix.Chomeymatt 2014-07-08 18:57:32
thanks
By Mozhat 2014-07-08 19:48:03
Please define "not working". Which action did you perform to test it, and what parts of the code were executed? You can add add_to_chat lines within the function to see what bits are being run.
It's not working as in its not equipping my torque when I am slept. I had fenrir hit mob until it forced a tp move and I got slept and nothing occurred.
I have had the same problem. No one wanted to help fix it so I went back to the old way to wake me up. Use the macros
Example:
Carby
/equip neck "Sacrifice Torque" <wait 2>
/equip neck "Caller's Pendant"
/ma "Carbuncle" <me>
Asura.Nanabi
Serveur: Asura
Game: FFXI
Posts: 340
By Asura.Nanabi 2014-07-09 10:15:47
I got a very noob question...
I modded Byrth's PLD lua and it's working for me for the most part
However I really want to be able to do the set swap myself with macro line without binding key
And at the bottom of the lua there's this string of codes
Code function self_command(command)
if command == 'toggle TP set' then
if TP_ind == 1 then
TP_ind = 2
send_command('@input /echo SOLO SET')
elseif TP_ind == 2 then
TP_ind = 1
send_command('@input /echo DD SET')
end
elseif command == 'toggle Idle set' then
if Idle_ind == 1 then
Idle_ind = 2
send_command('@input /echo KITING SET')
elseif Idle_ind == 2 then
Idle_ind = 3
send_command('@input /echo SUPERTANKING SET')
elseif Idle_ind == 3 then
Idle_ind = 1
send_command('@input /echo NORMAL SET')
end
elseif command == 'DT' then
equip(sets.DT)
end
end
I was wondering how do I use it? what's the command that I'd need to type in the macro box if there's such thing?
Serveur: Odin
Game: FFXI
Posts: 81
By Odin.Acacia 2014-07-09 10:52:34
ook i deleted it and still not working :(, this is what changed it to:
Code function job_buff_change(buff, gain)
if state.Buff[buff] ~= nil then
state.Buff[buff] = gain
handle_equipping_gear(player.status)
elseif buff == 'Sleep' then
if gain and pet.isvalid then
equip({neck="Sacrifice Torque"})
else
send_command('gs c update')
end
elseif storms:contains(buff) then
handle_equipping_gear(player.status)
end
end
I had a similar problem with my sacrifice torque, the issue is that the buff is called 'sleep' (with a lower case 's') not 'Sleep'
This is my buff_change function: Code
function buff_change(name, gain)
if pet.isvalid and name == "Avatar's Favor" then
if gain then
equip(sets.perpetuation.favor)
else
equip(sets.perpetuation, sets.perpetuation[pet.name] or {})
end
elseif pet.isvalid and name == 'sleep' then
if gain then
equip({neck='Sacrifice Torque'})
else
equip({neck="Caller's Pendant"})
end
end
end
Serveur: Sylph
Game: FFXI
Posts: 305
By Sylph.Elgorian 2014-07-09 11:42:39
Setting up the gear is kind of simple. I'm just really confused about the rules and stuff and toggling between like TP, TPAcc DT etc.
I used the Byth_MNK as reference.
This part all makes sense for the most part. Code function get_sets()
sets.precast = {}
sets.precast.Boost = {}
sets.precast.Counterstance = {}
sets.precast.Dodge = {}
sets.precast.Focus = {}
sets.precast.Mantra = {}
sets.precast.Waltz = {}
sets.precast.Chakra = {
ammo="Tantra Tathlum",
head="Uk'uxkaj Cap",
neck="Tjukurrpa Medal",
ear1="Soil Pearl",
ear2="Soil Pearl",
body="Anchorite's Cyclas",
hands="Hesychast's Gloves",
ring1="Terrasoul Ring",
ring2="Terrasoul Ring",
back="Anchoret's Mantle",
waist="Warwolf Belt",
legs="Espial Hose",
feet="Thurandaut Boots"
}
sets.precast['Victory Smite'] = {}
sets.precast['Shijin Spiral'] = {}
sets.precast.WS = {}
sets.Idle = {}
sets.TP = {}
sets.TP.DD = {}
sets.TP.Acc = {}
sets.TP.Solo = {}
sets.DT = {}
sets.DT.Magic = {}
sets.DT.Physi = {}
end
function precast(spell)
if player.equipment.head == 'Reraise Hairpin' then disable('head')
else enable('head') end
if player.equipment.left_ear == 'Reraise Earring' then disable('ear1')
else enable('ear1') end
if sets.precast[spell.english] then
equip(sets.precast[spell.english])
elseif spell.type=="WeaponSkill" then
equip(sets.precast.WS)
elseif string.find(spell.english,'Waltz') then
equip(sets.precast.Waltz)
end
end
function midcast(spell)
end
I guess I get lost right around in that chunk somewhere.
I have different TP sets and DT sets but how does it know to stay in a certain one or to switch out?
Also how would I make a rule for darksday shadow mantle chakra.
Code
function aftercast(spell)
if player.status =='Engaged' then
equip(sets.aftercast.TP)
else
equip(sets.aftercast.Idle)
end
end
function status_change(new,old)
if T{'Idle','Resting'}:contains(new) then
equip(sets.aftercast.Idle)
elseif new == 'Engaged' then
equip(sets.aftercast.TP)
end
end
function self_command(command)
if command == 'toggle TP set' then
if sets.aftercast.TP == sets.TP.DD then
sets.aftercast.TP = sets.TP.Solo
send_command('@input /echo SOLO SET')
elseif sets.aftercast.TP == sets.TP.Solo then
sets.aftercast.TP = sets.TP.DD
send_command('@input /echo DD SET')
end
elseif command == 'DT' then
equip(sets.DT)
end
end
Serveur: Sylph
Game: FFXI
Posts: 305
By Sylph.Elgorian 2014-07-09 12:55:52
I think I'm getting the hang of it now.
http://pastebin.com/PYvbrjB5
I guess my only question at this point is with the following:
Code
function self_command(command)
if command == 'toggle TP set' then
if sets.aftercast.TP == sets.TP.DD then
sets.aftercast.TP = sets.TP.Solo
send_command('@input /echo SOLO SET')
elseif sets.aftercast.TP == sets.TP.Solo then
sets.aftercast.TP = sets.TP.DD
send_command('@input /echo DD SET')
end
elseif command == 'DT' then
equip(sets.DT)
end
end
I don't see the Accuracy set in that anywhere so how do I toggle back to that if I need to? Currently it defaults to Accuracy set when engaging then I type "//gs c toggle TP set" and it will switch between Solo and DD? Still kind of confused on how that part works but pretty sure I have everything else down for the most part.
Also where would the Shadow Mantle for Chakra fit in?
Serveur: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2014-07-10 08:39:29
Small question: is there a way to have a specific set for cures when they are cast on yourself? I have a defined set for cure potency in general, but I don't want to swap into the "cure effects received +X%" gear unless it's specifically on me. I have tried this: Code function precast(spell,action)
if spell.english:startswith('Cure') and spell.target.name == player.name then
equip(sets.midcast.Cure.Self)
end
end but that didn't do it, it is still just equipping my full set of cure potency, omitting entirely the other set I defined (sets.midcast.Cure.Self) for the cast. I am still really green with GearSwap, so please don't mind my ignorance if I made some n00b mistake. Thanks! Let me know if any other information is required.
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.
|
|