New Code For Gearswap Lua I Made It Auto Reraise

Language: JP EN DE FR
users online
Forum » 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
Link | Quote | Reply
 
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 | Quote | Reply
 
Post deleted by User.
[+]
Offline
Posts: 464
By drakefs 2023-07-10 11:46:55
Link | Quote | Reply
 
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
Server: Asura
Game: FFXI
user: Meeeeeep
Posts: 156
By Asura.Sensarity 2023-07-10 12:19:35
Link | Quote | Reply
 
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
Server: Quetzalcoatl
Game: FFXI
user: Tomasello
Posts: 313
By Quetzalcoatl.Tomasello 2023-07-10 13:12:07
Link | Quote | Reply
 
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
Server: Quetzalcoatl
Game: FFXI
user: Xilk
Posts: 1419
By Quetzalcoatl.Xilkk 2023-07-10 13:27:27
Link | Quote | Reply
 
yes, it only activates if you hp lands less than 8% but you still alive.
 Quetzalcoatl.Tomasello
Offline
Server: Quetzalcoatl
Game: FFXI
user: Tomasello
Posts: 313
By Quetzalcoatl.Tomasello 2023-07-10 13:28:08
Link | Quote | Reply
 
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
Link | Quote | Reply
 
Code
windower.register_event('hpp change',
function(new_hpp,old_hpp)
    if new_hpp < 5 then
        equip(sets.Reraise)
    end
end
Log in to post.