Ok thanks dlsmd! and you mean this part:
if healingcount < 25 then
right?
Yes I did, the default is obis on. The obi works for day elements, but it doesn't work for weather spells. It looks like the day/weather rule is combined into one, instead of a separate line for day, weather, day/weather. I appreciate the help, but I still can't figure this out.
try changing lines:634-636 to this
i just use this (from http://pastebin.com/j1uY2YS2)Code:if (spell.skill == 'Elemental Magic' or string.find(spell.english,'Cur') or string.find(spell.english,'Bio') or string.find(spell.english,'Dia')) and (world.day_element == spell.element or world.weather_element == spell.element) and sets.Obi[spell.element] and Obi == 'ON' then -- Use Obi Toggle To Equip Normal Waist Gear -- if not Non_Obi_Spells:contains(spell.english) then equipSet = set_combine(equipSet,sets.Obi[spell.element]) end end
Code:Typ.abilitys = S{'/jobability','/pet','/weaponskill','/monsterskill'} sets.obi = { Fire = {back="Twilight Cape",waist="Karin Obi"}, Earth = {back="Twilight Cape",waist="Dorin Obi"}, Water = {back="Twilight Cape",waist="Suirin Obi"}, Wind = {back="Twilight Cape",waist="Furin Obi"}, Ice = {back="Twilight Cape",waist="Hyorin Obi"}, Lightning = {back="Twilight Cape",waist="Rairin Obi"}, Light = {back="Twilight Cape",waist="Korin Obi"}, Dark = {back="Twilight Cape",waist="Anrin Obi"}, } if not Typ.abilitys:contains(spell.prefix) then if spell.element == world.weather_element or spell.element == world.day_element then equip(sets.obi[spell.element]) end end
I have a few issues with this code, if for no other reason that it takes up two whole lines of word wrap to get the whole thing. There is also the fact that it will pull in spells that you don't want. Why would you want dia and bio but not drain/aspir. 'Cur' pulls in cursna in play unless it is explicitly in the Non_Obi_Spells tableCode:if (spell.skill == 'Elemental Magic' or string.find(spell.english,'Cur') or string.find(spell.english,'Bio') or string.find(spell.english,'Dia')) and (world.day_element == spell.element or world.weather_element == spell.element) and sets.Obi[spell.element] and Obi == 'ON' then -- Use Obi Toggle To Equip Normal Waist Gear -- if not Non_Obi_Spells:contains(spell.english) then equipSet = set_combine(equipSet,sets.Obi[spell.element]) end end
Could be cleaned up a bit
Here is how I would change it if it were me
Its not perfect, it does things like equip obis during helix spells but it should have the exact same functionality as the above code as long as the Non_Obi_Spells table is complete. It also doesn't handle weaponskills, but I would probably do that in another rule anyway.Code:if S{'Elemental Magic', 'Divine Magic', 'Healing Magic', 'Dark Magic'}:contains(spell.skill) and not Non_Obi_Spells:contains(spell.english) then if S{world.day_element, world.weather_element}:contains(spell.element) and Obi == 'ON' then equipSet = set_combine(equipSet, sets.Obi[spell.element] or {}) end end
If you know how\where to insert it, yea
Hi,
Is there anyway to handle invalid spells I try to cast?
For example, when on mnk/dnc, I have no access to cure spells or haste spell, but when I cast these spells I would like to send them to my mule to cast on my selected target.
I tried a very simple lua file.
This will fire for all valid JA I can use, but when I try to cast cure i just get a command error in game.Code:function precast(spell) windower.add_to_chat(55,"Precast") end
all spells/weaponskills/abilitys that you cant use(based on main/sub lvl and main/sub job and main hand weapon ) are handled under function filtered_action(spell)
but if the above passes some times you might not have the spell learned so in precast you would use:
this will only activate if the spell you try can be used by your main/sub job at there current lvl but have not learned yetCode:if not windower.ffxi.get_spells()[spell.id] then cancel_spell() return end
i use something like this in my skill up lua to check if you have the spell at your lvl learned
Thanks dlsmd. I totally should have read the documentation huh?
yup that does help but its no biggie i did the same thing
my question for this forum is does this look like this code would work??
http://pastebin.com/uhzNT8K1
im thinking about adding it to my ws include
You could use subtarget addon to make a macro to tell your mule to do whatever, but it doesnt work on monsters, just us players and trusts.
Subtarget doesn't do what I need it to do, thats why I'm going this route.
I want to bind a spell to a windower macro, say input /ma Haste <stpc> and then send this to my mule.
I cannot do this with SubTarget as you need to use 2 lines, input /ta <stpc> and then stg go mule haste. There is no way for windower to pause execution of the script while I am selecting the target, so the sta line goes off while I'm selecting the target.
I have got the subtarget addon working, but don't want to use up my in game macro slots.
I'm no pro but "/input ta <stpc>;stg go mule haste" doesnt work? When using spellcast i was able to set a variable and equip a set based on variable name in one line using in game macros with "/con sc var s stance Melee;sc s $stance". Ive never used windower macros before so i dont know how different they are. maybe insert a ";wait 2" or something between them?
For Mote's thf.lua, if I want a function for equipping Frenzy Sallet while slept, is this the right place to put it and have it work correctly? Or a better way? It's only useful while slept and engaged.
Code:function job_buff_change(buff, gain) if state.Buff[buff] ~= nil then state.Buff[buff] = gain if not midaction() then handle_equipping_gear(player.status) end end if buff == 'Sleep' and gain then equip({head="Frenzy Sallet"}) else send_command('input //gs c update') end end
That would work fine, though I'd revise it slightly:
That ensures that update is only called when you wake up, not every single time you gain or lose a buff. Might also put the Frenzy Sallet in its own set so that it shows up for //gs validate.Code:if buff == 'Sleep' then if gain then equip({head="Frenzy Sallet"}) else send_command('gs c update') end end