anyway to do this?
<elseif spell="Impetus" BuffActive="Impetus">
<changespell spell="Focus" />
</elseif>
Code:if spell.english == 'Impetus' and buffactive.impetus then cancel_spell() send_command('input /ja Focus <me>') end
For whatever reason Mote, using your SCH.lua and it doesn't use Savant's Loafers +2 for Klimaform nukes with the matching weather, always uses Hagondes.
Edit: Nevermind, works now, no idea what i was doing wrong.
Okay, so I have a few updates and general questions. I'm trying to update my issues list ( https://github.com/Byrth/Lua/issues ). Currently I have 9 open issues:
* 3 of these are unfixable (the two Battlemod ones and player.equipment). I'd close these, but I don't want people to open similar issues.
* 2 of them are trivial but not done (pet_acquired() for Charm and changing cast_delay()'s implementation in pretarget)
* 2 of them are real and difficult to fix - Disabling abilities that people can't use and switching to using the resources library are each probably a day of work.
* 1 of them might be impossible (precast vs. pretarget issue for the spellcast emulator program)
* 1 of them might already work - Does anyone know if Shortcuts' target creation works in Ballista? I haven't done Ballista in over a year and haven't had a chance to test it.
Please let me know if you guys find issues, want libraries exposed, etc. Just open issues at the link above and I'll do it.
Beyond that, LuaCore's event_unregister issue is really the only barrier stopping GearSwap from attaining all the functionality that I had envisioned. When event_unregister is fixed it will become possible to add custom user events without occasionally crashing when you change jobs, which is the current problem. After this is implemented I will likely also introduce a ../Gearswap/data/libs folder where people can push common include files (at the discretion of the people maintaining the windower repository) for the entire userbase to enjoy.
The way that windower.register_event() has been implemented within the GearSwap user environment allows you to change gear in response to any arbitrary event. Similar events, ie. triggering gear changes based on time of day, weather changes, day changes, area name, etc., could be clustered into common include "libraries." These libs could be used by people that don't necessarily understand the underlying code (much like GearSwap's native events). Less savory events, like one responding to monster TP moves, would never be added to the common repository.
GearSwap is built with the intention of being fairly resistant to FFXI client changes. There are fairly few hardcoded resources (all in statics.lua) and mostly it relies on LuaCore. As long as LuaCore and the resources are maintained (and don't change too much), GearSwap will likely not break. Once I have solved the four addressable issues above and unregister_event is fixed / I've reacted to it, I will likely take GearSwap out of beta and simultaneously freeze its development. It has reached its goal, I'd say.
I don't play FFXI anymore, but good work Byrth.Kinda fun to think back to the days when I was helping you out with Windower and Spellcast stuff, haha.
<elseif Type="Waltz">
<if Spell="Curing*">
<if TPLT="20">
<addtochat color="28">%Spell Canceled: [%tpTP]</addtochat>
<cancelspell />
<return />
</if>
<elseif TPLT="35">
<changespell spell="Curing Waltz" />
</elseif>
<elseif TPLT="50">
<changespell spell="Curing Waltz II" />
</elseif>
</if>
</elseif>
help translating this please ^^
I guess this should work
Code:function pretarget(spell) if string.find(spell.english,'Curing') then if player.tp < 20 then cancel_spell() send_command('input /echo "'..spell.name..'" Canceled ;') return elseif player.tp > 20 and player.tp < 35 then cancel_spell() send_command('input /ja "Curing Waltz" '..spell.target.name..';') elseif player.tp > 35 and player.tp < 50 then cancel_spell() send_command('input /ja "Curing Waltz II" '..spell.target.name..';') end end end
That will fail when you have exactly 20 or 35 TP. Also, it'll create an infinite loop. Also, use add_to_chat instead of send_command('input /echo..'). Also, don't use string.find for a name match as simple as this.
Going to make an assumption that the only spell macro'd in game is Curing Waltz III, and that the user wants it adjusted downwards if they don't have enough TP. If this is not the case then further adjustments are necessary. (Note: While just adding to the spells that it looks for when making the TP determination would seem ok, it would reintroduce the infinite loop, so we'd need further refinements.)
Of course setting this in pretarget means that if your macro is /ja "Curing Waltz III" <stpc>, and you hit the macro and try to select a target while allowing your character to autoattack and gain TP, you won't be able to do so. It will cancel out before allowing you to select the target, and you'll be forced to use the lower tier waltz even if you have enough TP for a higher tier by the time you hit enter. So if you want to allow targeting to occur before determining whether you have sufficient TP, this needs to go in precast instead.
Code:function precast(spell) if spell.english == 'Curing Waltz III' then if player.tp < 20 then cancel_spell() add_to_chat(122,'"'..spell.name..'" canceled. Insufficient TP ('..tostring(player.tp)..')') elseif player.tp < 35 then cancel_spell() send_command('input /ja "Curing Waltz" '..spell.target.name) elseif player.tp < 50 then cancel_spell() send_command('input /ja "Curing Waltz II" '..spell.target.name) end end end
Could you use the input /raw command to bypass the infinite loop or gearswap doesn't care about that tag???
/raw doesn't mean anything to GearSwap. If you want your next command to go through without processing, you have to implement that.
thank you so much guys!
So it must be processed at the windower level before it is sent to GS which is how it was treated with spellcast. I have a ton of code based on it so I hope it works that way or I will be rewriting everything ugh...
so, i am vexed?
gearswap loads, but i get: user file problem/lua:102: '=' expected near 'II'
i think it's referring to: sets.midcast.Refresh II = {legs="Estoqueur's Fuseau +2"} seeing as my est legs are not loading (definitely not getting the extra 1 mp/tic) but there's very clearly a '=' right there? if i change the "Refresh II" to just "Refresh" the error message goes away but the legs still don't swap in (on either spell)
any thoughts?
You can't use spaces in set names without quoting them. sets.midcast.Refresh II should instead be sets.midcast['Refresh II']