http://www.ffxiah.com/node/145
I used this as a starting point after spellcast was nixed. It explains things enough so you can pick up a simple job lua file and can probably figure it out from there.
http://www.ffxiah.com/node/145
I used this as a starting point after spellcast was nixed. It explains things enough so you can pick up a simple job lua file and can probably figure it out from there.
So I'm currently trying to make an asleep set when I get hit with sleep or I use sleeping potion:
but it doesn't work when I pop sleeping potion. I haven't tested by getting mobs to sleep me, but I just pasted this from my RUN embolden setup so it should work. Does the status effect from sleeping potions differ from spells?Code:function buff_change(buff,gain) if (buff == "Sleep" and gain) and (player.hp > 100) then if Asleep == 1 then equip({head="Frenzy Sallet"}) else equip(sets.Asleep) end else if (player.status == "Engaged") then equip(sets.engaged[sets.engaged.index[Engaged]]) else equip(sets.aftercast[sets.aftercast.index[Idle]]) end end end
im guessing that Asleep is a setting you have to control your sleep gear that gets equiped
Code:function buff_change(buff,gain,buff_table) if buff == "sleep" then if gain then if Asleep == 1 and player.hp > 100 then equip({head="Frenzy Sallet"}) else equip(sets.Asleep) end else if (player.status == "Engaged") then equip(sets.engaged[sets.engaged.index[Engaged]]) else equip(sets.aftercast[sets.aftercast.index[Idle]]) end end end end
yes, I was trying to make a toggle so that it switches between frenzy sallet/berserker and regain gear when I'm slept. sleeping potion doesn't trigger it at all so was wondering what went wrong in there.
So the (de)buff has to be lowercase for this to work, was the only problem I saw >_> thanks for the help
if you look at windower\res\buffs.lua you can find the correct name to use for a buff (use the en= one for English)
for sleep:
for Aquaveil:Code:[19] = {id=19,en="sleep",ja="睡眠",enl="asleep",jal="睡眠"},
for me when i get sleep i perfer to use thisCode:[39] = {id=39,en="Aquaveil",ja="アクアベール",enl="Aquaveil",jal="アクアベール"},
Code:if buff == "sleep" then if gain then equip({neck="Opo-opo Necklace",back="Aries Mantle"}) disable("neck","back") else enable("neck","back") equip(gear_equip(buff,'buff_change'))--reequip my gear to my current settings end
Yea, I wanted to use that for quick tp gain, but if toggled off then I would wear vim torque or frenzy sallet to wake up during combat.
I have another question though: if I have 2 pld and I use practically identical lua (minus gear) for them, would I be able to put functions like
in another lua and just include it in both files? So that way I can just edit that single lua instead of both character job lua for 1 change?Code:function precast(spell,action) if midaction() then return send_command("input /echo You're in the middle of an action!") end if sets.precast[spell.english] then equip(sets.precast[spell.english]) if spell.name == "Chant du Cygne" then if world.time <= (7*60) or world.time >= (17*60) then equip(sets.precast.Nighttime) end end elseif spell.action_type == "Magic" then if string.find(spell.name,'Cure') and Cure_Cheat == 1 then equip(sets.precast.FC_Cure) else equip(sets.precast.FC) end end end
Anyone know what the exact debuff name is for avoidance down? Short of running to the WKR to test if that is the name, there isn't a great way to go do that.
Due to Halphas and other NMs using it, I wanted to make a quick buff gain rule for changing my tanking set on RUN to take off inquartata equipment while it is on. It would let me swap 3-4 pieces and toss on pieces like the Engraved Belt from moving DT around. Since Ogmas and Turms hands/feet have none.
It's "Avoidance Down", see:
https://github.com/Windower/Resource.../lua/buffs.lua
Code:[572] = {id=572,en="Avoidance Down",ja="回避能力ダウン",enl="afflicted with Avoidance Down",jal="回避能力ダウン"},
Hi, I'm currently trying to create a mode in Gearswap that lets me switch between which Runes to use, but when I activate it it always casts Ignis instead of the current mode state. How would I go about fixing this?
Code:function get_sets() mote_include_version = 2 include('Mote-Include.lua') end function user_setup() state.RuneMode = M{['description']='RuneMode', 'Ignis', 'Gelus', 'Flabra', 'Tellus', 'Sulpor', 'Unda', 'Lux', 'Tenebrae'} send_command('bind ^f8 gs c cycle RuneMode') send_command('bind ^q @input /ja "'..state.RuneMode.value..'" <me>') end function init_gear_sets() end function file_unload() send_command('unbind ^f8') send_command('unbind ^q') end
Having issues getting my second duplicate ring to equip 100% of the time.
More often than not it wont equip, even when debugging gs through console, and is hit and miss when casting spells.
I even made sure to separate where they are on the equip order, and separated the bags theyre in.
Bolded above.Code:sets.midcast['Elemental Magic'] = {lring={name="Shiva Ring +1",bag="Inventory"},main="Lathi",sub="Niobid Strap",ranged="",ammo="Pemphredo Tathlum", head="Merlinic Hood",neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring", body="Count's Garb",hands="Amalric Gages",rring={name="Shiva Ring +1",bag="Wardrobe1"}, back="Toro Cape",waist="Yamabuki-no-Obi",legs="Merlinic Shalwar",feet="Merlinic Crackows"}
Thoughts?
Trying to use chat message for register_events to see when debuffs wear off on mule so I can reapply:
keeps saying "')' expected near message" but I have no idea how to make this work.Code:windower.register_event('chat message', function(chat message) if string.find('Dia effect wears off.') and (buff == "Dia" and not lose) then send_command('input /l Dia wore off') end end)
You could try this:
Mine equips fine despite using no priorityCode:sets.midcast['Elemental Magic'] = { lring={name="Shiva Ring +1",priority=1}, main="Lathi",sub="Niobid Strap", ranged="",ammo="Pemphredo Tathlum", head="Merlinic Hood", neck="Mizukage-no-Kubikazari", ear1="Friomisi Earring", ear2="Barkarole Earring", body="Count's Garb", hands="Amalric Gages", rring={name="Shiva Ring +1",priority=12}, back="Toro Cape", waist="Yamabuki-no-Obi", legs="Merlinic Shalwar", feet="Merlinic Crackows"}
no your code is wrong
this is incorrect look belowCode:windower.register_event('chat message', function(chat message) [MISSING PARENTHESES HERE] if string.find('Dia effect wears off.') and (buff == "Dia" and not lose) then send_command('input /l Dia wore off') end end) <- why is this parenthesis here?
but ill explain:
[MISSING PARENTHESES HERE] --no that is not what is missing
<- why is this parenthesis here? --this closes off the windower.register_event
this is all messed up
first
chat message is why you get the "')' expected near message" error it should not have a space aka: chat_message
buff == "Dia" will cause an error every time because there is no buff variable in this function the same goes for lose
--if you created a buff and a lose varable globally then you can put them back in
i just hope that 'Dia effect wears off.' is the exact string your looking forCode:windower.raw_register_event('chat message', function(message,sender,mode,gm) if string.find(message, 'Dia effect wears off.') then send_command('input /l Dia wore off') end end)