New Code For Gearswap Lua I Made It Auto Reraise

Eorzea Time
 
 
 
言語: JP EN FR DE
日本語版のFFXIVPRO利用したい場合は、上記の"JP"を設定して、又はjp.ffxivpro.comを直接に利用してもいいです
users online
フォーラム » Windower » General » new code for gearswap lua i made it auto Reraise
new code for gearswap lua i made it auto Reraise
By Asura.Aragan 2023-07-10 08:38:15  
new code for gearswap lua i made it


if hp 8% auto gear change to Twilight or Crepuscular for auto Reraise

u can change hp % number with low 5%
.
Code
--Author : Aragan (Asura)
--new code gearswap lua if hp 8% auto gear change to Twilight or Crepuscular and not need reraise item never
--and u can change hp % number with low 5% 
--copy paste code under function if not have function  paste all

--add this set with sets gear 
sets.Reraise = {head="Twilight Helm", body="Twilight Mail"}


function job_self_command(cmdParams, eventArgs)
    if player.hpp < 8 then --if have lag click f12 for change to sets.Reraise this code add from Aragan Asura
        equip(sets.Reraise)
        send_command('input //gs equip sets.Reraise')
        eventArgs.handled = true
    end
    return 
end

function job_update(cmdParams, eventArgs)
    job_self_command()
end
 
Offline
Posts:
By 2023-07-10 08:58:42
 Undelete | Edit  | Link | 引用 | 返事
 
Post deleted by User.
[+]
Offline
Posts: 464
By drakefs 2023-07-10 11:46:55  
KujahFoxfire said: »
job_self_command() and job_update() is not a default gearswap function and probably wont even be called in majority of luas outside of certain templates/pre-existing ones.

Those are specific to mote based luas, used to allow adding functionality to self_command() and update(), which are apart of GS, without editing the mote-includes.lua.

If you are not using a mote based lua, you can simply drop the "job_" or add said functionality to your existing self_command() and update().

I do agree with your edit to the OPs code. That would work much better.
[+]
 Asura.Sensarity
Offline
サーバ: Asura
Game: FFXI
user: Meeeeeep
Posts: 157
By Asura.Sensarity 2023-07-10 12:19:35  
I'd rather not die in it so I can get an arise instead.
Wtf were they thinking not making crep set give auto arise? Especially given the jank drop rate.
[+]
 Quetzalcoatl.Tomasello
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Tomasello
Posts: 313
By Quetzalcoatl.Tomasello 2023-07-10 13:12:07  
I don't really see the point of this... If I get hit for 3k dmg is it going to put this gear on before the KO so I can get up? Or does it only go on if my hp lands at less than 8%?
 Quetzalcoatl.Xilkk
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Xilk
Posts: 1419
By Quetzalcoatl.Xilkk 2023-07-10 13:27:27  
yes, it only activates if you hp lands less than 8% but you still alive.
 Quetzalcoatl.Tomasello
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Tomasello
Posts: 313
By Quetzalcoatl.Tomasello 2023-07-10 13:28:08  
In that case, this would probably work too...

Code
windower.register_event('hpp change',function(new_hpp,old_hpp)
	if new_hpp < 8 then
		send_command("input /pcmd kick 'Shitty WHM'")
	end
end)
[+]
necroskull Necro Bump Detected! [429 days between previous and next post]
By Asura.Aragan 2024-09-11 10:45:39  
Code
windower.register_event('hpp change',
function(new_hpp,old_hpp)
    if new_hpp < 5 then
        equip(sets.Reraise)
    end
end