Gearswap Support Thread

Langues: JP EN DE FR
users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 36 37 38 ... 182 183 184
 Cerberus.Conagh
Offline
Serveur: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-10-23 21:50:39
Link | Citer | R
 
Ragnarok.Flippant said: »
if midaction() then cancel_spell() return end

This worked perfectly thankyou, I had incorrectly placed this as a seperate rule altogether >> move to precast and no issues.
 Siren.Inuyushi
Offline
Serveur: Siren
Game: FFXI
user: Inuyushi
Posts: 507
By Siren.Inuyushi 2014-10-24 14:25:11
Link | Citer | R
 
A few questions for a couple things I've been trying to do. First off, I'm using Mote's gearswap files with everything in a sidecar file.

1 - Does Mote's gearswap automatically equip obis/zodiac ring/twilight cape?

2 - I've been trying to make the BLU.lua in "Refresh" combat mode only equip the correct piece of Serpentes during the right time of day with:
Code
function customized_melee_set(meleeSet)
	if state.Buff.sleep then
		meleeSet = set_combine(meleeSet, sets.buff.Sleep)
	elseif state.Buff.reive then
		meleeSet = set_combine(meleeSet, {neck="Arciela's Grace +1"})
	end
	
	if state.OffenseMode == "Refresh" then
		if world.time >= (17*60) or world.time <= (7*60) then
			meleeSet = set_combine(sets.engaged.Refresh, {hands="Serpentes Gloves"})
		else
			meleeSet = set_combine(sets.engaged.Refresh, {feet="Serpentes Sabots"})
		end
	end
	
	return meleeSet
end


3 - I also am trying to get the neck piece to auto lock to Arciela's Grace +1 while in a reive with this code and catch when I gain the sleep buff.

None of it works. I do have the following in the job_setup function that was supposed to make the sleep gear work. I also have sets.buff.Sleep defined.
Code
state.Buff.sleep = buffactive.sleep or false"


Am I going about this the right way? Should I define sets for reives? such as sets.engaged.Reive, sets.engaged.DW.Reive?

Trying to figure all this out, any help is appreciated!

Also, big thanks to Mote for all the work he has done so far!
 Quetzalcoatl.Orestes
Offline
Serveur: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2014-10-24 16:33:30
Link | Citer | R
 
Siren.Inuyushi said: »
A few questions for a couple things I've been trying to do. First off, I'm using Mote's gearswap files with everything in a sidecar file.

1 - Does Mote's gearswap automatically equip obis/zodiac ring/twilight cape?
I'm pretty sure it does. This is the syntax.
Code
sets.example = {
    ring1=gear.ElementalRing,
    back=gear.ElementalCape,
    waist=gear.ElementalObi
}

Mote has the default gear setup in Mote-Globals.lua. You can see what he has assigned here.
You should be able to change them, by redefining them in user or job_setup. ex: gear.default.obi_ring = "Strendu Ring"

Siren.Inuyushi said: »
2 - I've been trying to make the BLU.lua in "Refresh" combat mode only equip the correct piece of Serpentes during the right time of day with:
Code
function customized_melee_set(meleeSet)
	if state.Buff.sleep then
		meleeSet = set_combine(meleeSet, sets.buff.Sleep)
	elseif state.Buff.reive then
		meleeSet = set_combine(meleeSet, {neck="Arciela's Grace +1"})
	end
	
	if state.OffenseMode == "Refresh" then
		if world.time >= (17*60) or world.time <= (7*60) then
			meleeSet = set_combine(sets.engaged.Refresh, {hands="Serpentes Gloves"})
		else
			meleeSet = set_combine(sets.engaged.Refresh, {feet="Serpentes Sabots"})
		end
	end
	
	return meleeSet
end
If you're using mote_include_version = 2, you'll need to correct state.OffenseMode == "Refresh" to state.OffenseMode.value == "Refresh"

Siren.Inuyushi said: »
3 - I also am trying to get the neck piece to auto lock to Arciela's Grace +1 while in a reive with this code and catch when I gain the sleep buff.

None of it works. I do have the following in the job_setup function that was supposed to make the sleep gear work. I also have sets.buff.Sleep defined.
Code
state.Buff.sleep = buffactive.sleep or false"


Am I going about this the right way? Should I define sets for reives? such as sets.engaged.Reive, sets.engaged.DW.Reive?

Trying to figure all this out, any help is appreciated!

Also, big thanks to Mote for all the work he has done so far!

The buff is called "Reive Mark". This should be all you need.
Code
function customize_melee_set(meleeSet)
    if buffactive['Reive Mark'] then
        meleeSet = set_combine(meleeSet, sets.reive)
    end
    return meleeSet
end


As for "sleep". Having sleep cast on you doesn't warrant any action from gearswap, since you didn't cast the spell on yourself. The customize_melee_set() function is triggered as the last step when gearswap is constructing your current gear set. So, in this instance your code isn't being executed, as being slept didn't warrant your lua to build a gear set.

If you want to catch "sleep", you can do that in job_buff_change()
Code
function job_buff_change(buff, gain)
    
    if string.lower(buff) == "sleep" and gain and player.hp > 200 then
        equip(sets.Berserker)
    end

end


edit: fixed a syntax issue
 Siren.Inuyushi
Offline
Serveur: Siren
Game: FFXI
user: Inuyushi
Posts: 507
By Siren.Inuyushi 2014-10-24 22:19:21
Link | Citer | R
 
Thanks Orestes! The reive gear is equipping and the correct Serpentes gear is equipping while engaged for refresh. Couple things that I can't rap up:

I want to be able to list equipment for spells in the main/sub slot that will change when I'm not in a melee stance. I tried adding a 'None' melee stance so that when I'm in 'None' my weapons/shields change out depending on action. And when I want to engage, I go into one of the melee stances (Normal, Acc, etc). Sadly this isn't working. It works for my RDM_gear.lua, any idea why it works in RDM and not in BLU?

Quetzalcoatl.Orestes said: »
Siren.Inuyushi said: »
A few questions for a couple things I've been trying to do. First off, I'm using Mote's gearswap files with everything in a sidecar file.

1 - Does Mote's gearswap automatically equip obis/zodiac ring/twilight cape?
I'm pretty sure it does. This is the syntax.
Code
sets.example = {
    ring1=gear.ElementalRing,
    back=gear.ElementalCape,
    waist=gear.ElementalObi
}

Mote has the default gear setup in Mote-Globals.lua. You can see what he has assigned here.
You should be able to change them, by redefining them in user or job_setup. ex: gear.default.obi_ring = "Strendu Ring"

What you gave will let me set a default ring to equip if I put gear.ElementalRing in the set. What I'm looking for is to have a default nuking set with MAB, Magic Damage+ in each slot by default. And depending on spell, I can update the ring/back/waist slot to equip if it's the correct day (for ring), day or weather (for cape and obi). I would imagine I would need something in the customize_idle_set and customize_melee_set functions, I just don't know what exactly. Something that would compare the spell element to world.day_element and world.weather_element? Then do a set_combine(meleeSet, sets.Elemental_day) or something of the nature.

As for the sleep gear... that will work to equip it when I get put to sleep. Will it go back to my previous set when I wake? Or do I need to do something like
Code
function job_buff_change(buff, gain)
     
    if string.lower(buff) == "sleep" and gain and player.hp > 200 then
        equip(sets.Berserker)
elseif string.lower(buff) == "sleep" and lost then
equip(meleeSet)
    end
 
end


Or will gswap automatically go back to the previous set once sleep is lost?

Lastly... I have it set to equip regen gear when my hpp < 95%, which is great. But, is there a way to make it automatically go to my idle gear (with PDT gear and such) when my hp breaks 95%?

Sorry if this is coming across too demanding. I'm not a programmer by nature. Just a normal Mechanical Engineer. All help is appreciated!
Offline
Posts: 324
By Xavierr 2014-10-25 07:03:10
Link | Citer | R
 
recently decided to bring my GEO up to par and I can't figure out how to write a rule for a pet idle set. I would like to have a pet -dt set go on for when my luopon is out and go back into a refresh idle set when it is not. If anyone can toss an example of it on here I would appreciate it.
 Cerberus.Tidis
MSPaint Winner
Offline
Serveur: Cerberus
Game: FFXI
user: tidis
Posts: 3927
By Cerberus.Tidis 2014-10-25 22:46:56
Link | Citer | R
 
I'm having problems trying to get my Oneiros only equipped when I'm at or above 100mp, it never swaps back to Rajas Ring right now, sorry if my lua file is a bit messy, I've been trying to do this myself and I'm still rubbish at gearswap.
Code
function get_sets()
    TP_Index = 1
    Idle_Index = 1

    sets.weapons = {}
    sets.weapons[1] = {main="Izhiikoh"}
    sets.weapons[2]={main="Sandnung"}
    
    sets.JA = {}
    sets.JA.Conspirator = {body="Raider's Vest +2"}
    sets.JA.Accomplice = {head="Raid. Bonnet +2"}
    sets.JA.Collaborator = {head="Raid. Bonnet +2"}
    sets.JA['Perfect Dodge'] = {hands="Plun. Armlets +1"}
    sets.JA.Steal = {head="Plun. Bonnet",neck="Rabbit Charm",hands="Thief's Kote",
        waist="Key Ring Belt",legs="Pill. Culottes +1",feet="Pillager's Poulaines"}
    sets.JA.Flee = {feet="Pillager's Poulaines"}
    sets.JA.Despoil = {legs="Raid. Culottes +2",feet="Raid. Poulaines +2"}
    sets.JA.Mug = {head="Plun. Bonnet"}
	sets.JA["Assassin's Charge"] = {feet="Plun. Poulaines +1"}
	sets.JA.Hide = {body="Pillager's Vest"}
	sets.JA.Feint = {legs="Plunderer's Culottes"}
    
    sets.WS = {}
    sets.WS.SA = {}
    sets.WS.TA = {}
    sets.WS.SATA = {}
	sets.WS.AC = {}
    
    sets.WS.Evisceration = {head="Felistris Mask",neck="Rancor Collar",ear1="Moonshade Earring",ear2="Brutal Earring",
		body="Plunderer's Vest",hands="Pill. Armlets +1",ring1="Rajas Ring",ring2="Epona's Ring",
		back="Atheling Mantle",waist="Wanion Belt",legs="Pill. Culottes +1",feet="Plun. Poulaines +1"}
		
	sets.WS["Rudra's Storm"] = {head="Felistris Mask",neck="Rancor Collar",ear1="Moonshade Earring",ear2="Brutal Earring",
		body="Plunderer's Vest",hands="Pill. Armlets +1",ring1="Rajas Ring",ring2="Thundersoul Ring",
		back="Atheling Mantle",waist="Wanion Belt",legs="Pill. Culottes +1",feet="Plun. Poulaines +1"}
	
	sets.WS["Aeolian Edge"] = set_combine(sets.WS.Evisceration,{head="Thaumas Hat",legs="Raid. Culottes +2",neck="Stoicheion Medal",
		ear1="Novio Earring",ear2="Hecate's Earring",waist="Breeze Belt"})
	
    sets.WS.SA.Evisceration = {head="Pillager's Bonnet",neck="Rancor Collar",ear1="Moonshade Earring",ear2="Brutal Earring",
		body="Plunderer's Vest",hands="Raid. Armlets +2",ring1="Rajas Ring",ring2="Epona's Ring",
		back="Atheling Mantle",waist="Wanion Belt",legs="Pill. Culottes +1",feet="Plun. Poulaines +1"}

	sets.WS.TA.Evisceration = {head="Pillager's Bonnet",neck="Rancor Collar",ear1="Moonshade Earring",ear2="Brutal Earring",
		body="Plunderer's Vest",hands="Raid. Armlets +2",ring1="Rajas Ring",ring2="Epona's Ring",
		back="Atheling Mantle",waist="Wanion Belt",legs="Pill. Culottes +1",feet="Plun. Poulaines +1"}
	
    TP_Set_Names = {"Normal","TH","Evasion"}
    sets.TP = {}
    sets.TP['Normal'] = {range="Raider's Bmrng.",head="Felistris Mask",neck="Asperity Necklace",
        ear1="Dudgeon Earring",ear2="Heartseeker Earring",body="Thaumas Coat",hands="Pill. Armlets +1",
        ring1="Oneiros Ring",ring2="Epona's Ring",back="Atheling Mantle",waist="Nusku's Sash",
        legs="Pill. Culottes +1",feet="Plun. Poulaines +1"}
        
    sets.TP['TH'] = {range="Raider's Bmrng.",head="Felistris Mask",neck="Asperity Necklace",
        ear1="Dudgeon Earring",ear2="Heartseeker Earring",body="Thaumas Coat",hands="Plun. Armlets +1",
        ring1="Rajas Ring",ring2="Epona's Ring",back="Atheling Mantle",waist="Nusku's Sash",
        legs="Pill. Culottes +1",feet="Raid. Poulaines +2"}
        
    sets.TP.Evasion = {head="Espial Cap",body="Espial Gambison",hands="Espial Bracers",legs="Espial Hose",feet="Espial Socks",
		ear1="Ethereal Earring",ear2="Elusive Earring",ring1="Rajas Ring",ring2="Heed Ring",neck="Torero Torque",back="Boxer's Mantle"}

    Idle_Set_Names = {'Normal','MDT'}
    sets.Idle = {}
    sets.Idle.Normal = {head="Felistris Mask",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
        body="Thaumas Coat",hands="Pill. Armlets +1",ring1="Rajas Ring",ring2="Epona's Ring",
        back="Atheling Mantle",waist="Nusku's Sash",legs="Pill. Culottes +1",feet="Skd. Jambeaux +1"}
		
	sets.Idle.MDT = {head="Espial Cap",neck="Twilight Torque",ear1="Merman's Earring",ear2="Merman's Earring",
		body="Avalon Breastplate",hands="Merman's Mittens",ring1="Minerva's Ring",ring2="Shadow Ring",legs="Espial Hose",
		feet="Espial Socks"}

	sets.midcast = {}
	sets.midcast.Ranged = {head="Umbani Cap",body="Skadi's Cuirie +1",hands="Buremte Gloves",legs="Thur. Tights +1",feet="Pillager's Poulaines",
		neck="Ej Necklace",waist="Elanid Belt",ear1="Clearview Earring",ear2="Volley Earring",ring1="Hajduk Ring",ring2="Hajduk Ring",
		back="Jaeger Mantle"}
end

function precast(spell)
    if sets.JA[spell.english] then
        equip(sets.JA[spell.english])
    elseif spell.type=="WeaponSkill" then
        if sets.WS[spell.english] then equip(sets.WS[spell.english]) end
        if buffactive['sneak attack'] and buffactive['trick attack'] and sets.WS.SATA[spell.english] then equip(sets.WS.SA[spell.english])
        elseif buffactive['sneak attack'] and sets.WS.SA[spell.english] then equip(sets.WS.SA[spell.english])
        elseif buffactive['trick attack'] and sets.WS.TA[spell.english] then equip(sets.WS.TA[spell.english]) end
    end
end

function midcast(spell)
	if spell.name=="Ranged" then
		equip(sets.midcast.Ranged)
	end
end

function aftercast(spell)
	if spell.english == "Feint" and not spell.interrupted then
		return
	else
        status_gear()
    end
end

function status_change(new,old)
    if T{'Idle','Resting'}:contains(new) then
        equip(sets.Idle[Idle_Set_Names[Idle_Index]])
    elseif new == 'Engaged' then
		if player.mp >= 100 then
		    equip(set_combine(sets.TP[sets.TP.index[TP_Index]], {ring1="Rajas Ring"}))
		else
			equip(sets.TP[sets.TP.index[TP_Index]])
		end
	end
end

function status_change(new,old)
    status_gear()
end

function status_gear()
    if T{'Idle','Resting'}:contains(player.status) then
        equip(sets.Idle[Idle_Set_Names[Idle_Index]])
    elseif player.status == 'Engaged' then
        equip(sets.TP[TP_Set_Names[TP_Index]])
        if buffactive.Feint then
            equip(sets.JA.Feint)
        end
    end
end

function buff_change(buff,gain_or_loss)
    if buff=="Sneak Attack" then
        soloSA = gain_or_loss
    elseif buff=="Trick Attack" then
        soloTA = gain_or_loss
	elseif buff=="Feint" and not gain then
        status_gear()
    end
end

function self_command(command)
    if command == 'toggle TP set' then
        TP_Index = TP_Index +1
        if TP_Index > #TP_Set_Names then TP_Index = 1 end
        send_command('@input /echo ----- TP Set changed to '..TP_Set_Names[TP_Index]..' -----')
        equip(sets.TP[TP_Set_Names[TP_Index]])
    elseif command == 'toggle Idle set' then
        Idle_Index = Idle_Index +1
        if Idle_Index > #Idle_Set_Names then Idle_Index = 1 end
        send_command('@input /echo ----- Idle Set changed to '..Idle_Set_Names[Idle_Index]..' -----')
        equip(sets.Idle[Idle_Set_Names[Idle_Index]])
    end
end
 Cerberus.Conagh
Offline
Serveur: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-10-25 22:56:45
Link | Citer | R
 
Code
        if player.mp >= 100 then
            equip(set_combine(sets.TP[sets.TP.index[TP_Index]], {ring1="Rajas Ring"}))
        else


This checks that your mp is Bigger than 100 it equips Rajas.
Code
if player.mp < 100 then
            equip(set_combine(sets.TP[sets.TP.index[TP_Index]], {ring1="Rajas Ring"}))



This would then check if your mp is less than 100 it uses Rajas instead

I use mp rules like this~
Code
function get_sets()
send_command('input /macro book 7;wait .1;input /macro set 1') -- Change Default Macro Book Here --
		
		AccIndex = 1
		AccArray = {"Low","Mid","High"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. Default ACC Set Is LowACC. The First TP Set Of Your Main Weapon Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
		Armor = 'None'
		Rings = "Oneiros Ring"

sets.tp ={ring1=Rings}
	

Code
			if player.mp < 99 then
				Rings = "Rajas Ring"
			else
			        Rings = "Oneiros Ring"
			end
 Cerberus.Tidis
MSPaint Winner
Offline
Serveur: Cerberus
Game: FFXI
user: tidis
Posts: 3927
By Cerberus.Tidis 2014-10-25 23:03:43
Link | Citer | R
 
Oh god damn it, I suffered with that for so long and it was something simple like that, cheers Conagh, think I'll give that a quick try.
 Cerberus.Conagh
Offline
Serveur: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-10-25 23:24:23
Link | Citer | R
 
Cerberus.Tidis said: »
Oh god damn it, I suffered with that for so long and it was something simple like that, cheers Conagh, think I'll give that a quick try.

in gearswap if what you're doing feels over complicated, you're doing it wrong :£

You could also throw in the "Oni" ring section where it changes a QUick add to chat message to let you know it monitored the change in mp


add_to_chat(9,'MP under 100 swapping to Rajas')

then you can break down if its the code or an error in the way you're handling your sets.
Code
function get_sets()

		AccIndex = 1
		AccArray = {"LowACC","AvgACC","MidACC","HighACC"}

sets.Idle 			= {}

sets.ring 			= {ring1="Rajas Ring"}

sets.TP 			= {}

sets.TP.lowACC 		= {} -- Gear you equip normmally including a Normal Ring

sets.TP.AvgACC 		= {}

sets.TP.MidACC 		= {}

sets.TP.HighAcc		= {}

end

function status_change(new,old)
if new == 'Engaged' then
	equipSet = sets.TP
	if equipSet[AccArray[AccIndex]] then
			equipSet = equipSet[AccArray[AccIndex]]
	end
	if player.mp > 100 then
		equip(set_combine(equipSet,sets.ring))
	end
		equip(equipSet)
	else
		equip(sets.Idle[IdleArray[IdleIndex]])
	end
end


windower.register_event('mp change', function(mp)
status_change(player.status)
end)



The 'mp change' bit I added as I believe this forces an Status_Change update and makes sure your gear changes as your MP changes.

I know this works guaranteed, been using similar code on WHM Melee and SAM for Months. Of course this would only throw out a "status change" request when MP changes so you can swap this to HP or TP instead.
 Cerberus.Tidis
MSPaint Winner
Offline
Serveur: Cerberus
Game: FFXI
user: tidis
Posts: 3927
By Cerberus.Tidis 2014-10-25 23:47:14
Link | Citer | R
 
So I got it working now, it seemed I had a couple functions doing essentially the same thing and I don't know if one was overwriting the other, also I had this:
Code
equip(set_combine(sets.TP[sets.TP.index[TP_Index]], {ring1="Rajas Ring"}))


which didn't work until I changed it to:
Code
 equip(set_combine(sets.TP[TP_Set_Names[TP_Index]], {ring1="Rajas Ring"}))
 Cerberus.Conagh
Offline
Serveur: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-10-25 23:53:23
Link | Citer | R
 
Cerberus.Tidis said: »
So I got it working now, it seemed I had a couple functions doing essentially the same thing and I don't know if one was overwriting the other, also I had this:
Code
equip(set_combine(sets.TP[sets.TP.index[TP_Index]], {ring1="Rajas Ring"}))


which didn't work until I changed it to:
Code
 equip(set_combine(sets.TP[TP_Set_Names[TP_Index]], {ring1="Rajas Ring"}))

There's lots of ways to do it, it helps if you try and organise your sets into Blocks makes it easier to read and then have all your "TP set rules" in once place so you can dodge that sorta stuff.
 Cerberus.Conagh
Offline
Serveur: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-10-26 00:07:04
Link | Citer | R
 
Siren.Inuyushi said: »
As for the sleep gear... that will work to equip it when I get put to sleep. Will it go back to my previous set when I wake? Or do I need to do something like
Code
function job_buff_change(buff, gain)
      
    if string.lower(buff) == "sleep" and gain and player.hp > 200 then
        equip(sets.Berserker)
elseif string.lower(buff) == "sleep" and lost then
equip(meleeSet)
    end
  
end


Or will gswap automatically go back to the previous set once sleep is lost?

Lastly... I have it set to equip regen gear when my hpp < 95%, which is great. But, is there a way to make it automatically go to my idle gear (with PDT gear and such) when my hp breaks 95%?

Code
	if buff == "sleep" and gain and player.hpp < 95 and player.status == "Engaged" then 
		equip({neck="Berserker's Torque"})
	else
		status_change(player.status)
	end


Is all you need
 Ragnarok.Flippant
Offline
Serveur: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2014-10-26 01:24:19
Link | Citer | R
 
Cerberus.Conagh said: »
I use mp rules like this~
Code
function get_sets()
send_command('input /macro book 7;wait .1;input /macro set 1') -- Change Default Macro Book Here --
		
		AccIndex = 1
		AccArray = {"Low","Mid","High"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. Default ACC Set Is LowACC. The First TP Set Of Your Main Weapon Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
		Armor = 'None'
		Rings = "Oneiros Ring"

sets.tp ={ring1=Rings}
	

Code
			if player.mp < 99 then
				Rings = "Rajas Ring"
			else
			        Rings = "Oneiros Ring"
			end

This won't work. Rings is passed by value, not reference, at the time the table sets.tp is created. Changing the value of Rings later will not update that table, as sets.tp.ring1 is pointing to a string, not a pointer. If you want to use this method, you would have to make Rings a table, with the attribute name pointing to the string. i.e. Rings = {name="Oneiros Ring"}. Then change the name attribute, i.e. Rings.name = "Rajas Ring". That way, sets.tp.ring1 is pointing to a table, which is assigned by reference.

Cerberus.Conagh said: »
Siren.Inuyushi said: »
As for the sleep gear... that will work to equip it when I get put to sleep. Will it go back to my previous set when I wake? Or do I need to do something like
Code
function job_buff_change(buff, gain)
      
    if string.lower(buff) == "sleep" and gain and player.hp > 200 then
        equip(sets.Berserker)
elseif string.lower(buff) == "sleep" and lost then
equip(meleeSet)
    end
  
end


Or will gswap automatically go back to the previous set once sleep is lost?

Lastly... I have it set to equip regen gear when my hpp < 95%, which is great. But, is there a way to make it automatically go to my idle gear (with PDT gear and such) when my hp breaks 95%?

Code
	if buff == "sleep" and gain and player.hpp < 95 and player.status == "Engaged" then 
		equip({neck="Berserker's Torque"})
	else
		status_change(player.status)
	end


Is all you need

I highly do not recommend using this. It will force the status_change function during actions--so if you happen to lose or gain a buff while you're casting a spell, you'll end up in your idle/engaged gear instead of proper midcast gear. At the very least, change the 'else' to 'elseif not midaction() then'.
 Cerberus.Conagh
Offline
Serveur: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-10-26 02:23:10
Link | Citer | R
 
Ragnarok.Flippant said: »
Cerberus.Conagh said: »
I use mp rules like this~
Code
function get_sets()
send_command('input /macro book 7;wait .1;input /macro set 1') -- Change Default Macro Book Here --
		
		AccIndex = 1
		AccArray = {"Low","Mid","High"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. Default ACC Set Is LowACC. The First TP Set Of Your Main Weapon Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
		Armor = 'None'
		Rings = "Oneiros Ring"

sets.tp ={ring1=Rings}
	

Code
			if player.mp < 99 then
				Rings = "Rajas Ring"
			else
			        Rings = "Oneiros Ring"
			end

This won't work. Rings is passed by value, not reference, at the time the table sets.tp is created. Changing the value of Rings later will not update that table, as sets.tp.ring1 is pointing to a string, not a pointer. If you want to use this method, you would have to make Rings a table, with the attribute name pointing to the string. i.e. Rings = {name="Oneiros Ring"}. Then change the name attribute, i.e. Rings.name = "Rajas Ring". That way, sets.tp.ring1 is pointing to a table, which is assigned by reference.

Cerberus.Conagh said: »
Siren.Inuyushi said: »
As for the sleep gear... that will work to equip it when I get put to sleep. Will it go back to my previous set when I wake? Or do I need to do something like
Code
function job_buff_change(buff, gain)
      
    if string.lower(buff) == "sleep" and gain and player.hp > 200 then
        equip(sets.Berserker)
elseif string.lower(buff) == "sleep" and lost then
equip(meleeSet)
    end
  
end


Or will gswap automatically go back to the previous set once sleep is lost?

Lastly... I have it set to equip regen gear when my hpp < 95%, which is great. But, is there a way to make it automatically go to my idle gear (with PDT gear and such) when my hp breaks 95%?

Code
	if buff == "sleep" and gain and player.hpp < 95 and player.status == "Engaged" then 
		equip({neck="Berserker's Torque"})
	else
		status_change(player.status)
	end


Is all you need

I highly do not recommend using this. It will force the status_change function during actions--so if you happen to lose or gain a buff while you're casting a spell, you'll end up in your idle/engaged gear instead of proper midcast gear. At the very least, change the 'else' to 'elseif not midaction() then'.

I posted a better alternative after that which works far better but it can work (it was lazy code on the fly but there's a methodology for it although I'm not an advocate of it).

The force to Status_change is a valid point, I'll take another look at my rules again when at home to do so properly and get the full code, good catch.
Offline
Posts: 19
By Darknightleo 2014-10-26 03:59:42
Link | Citer | R
 
Hello! I'm not exactly sure where else to turn.
Does anyone have a good Corsair GS file I could download off of them? I've tried searching through multiple threads, but any I find are so old they barely work anymore. Or the download link is broken.

Any help is appreciated, thanks!
 Siren.Inuyushi
Offline
Serveur: Siren
Game: FFXI
user: Inuyushi
Posts: 507
By Siren.Inuyushi 2014-10-26 09:36:43
Link | Citer | R
 
Darknightleo said: »
Hello! I'm not exactly sure where else to turn.
Does anyone have a good Corsair GS file I could download off of them? I've tried searching through multiple threads, but any I find are so old they barely work anymore. Or the download link is broken.

Any help is appreciated, thanks!

If you want a file where you can just drop your sets into a predefined file, I'd recommend Mote's. He has a COR file. You can download all of this files here
 
Offline
Posts:
By 2014-10-26 09:52:43
 Undelete | Edit  | Link | Citer | R
 
Post deleted by User.
 Ragnarok.Flippant
Offline
Serveur: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2014-10-26 12:27:07
Link | Citer | R
 
You mean to use spell.skill when comparing to all the combat skills, not spell.type. Also, use parenthesis around or comparisons (not sure how Lua processes compound expressions, but typically the and is processed first, so, for example, your first condition will cancel every Marksmanship spell, regardless of distance; I always use them just to be sure anyway).

Can shorten it a bit using S table and the contain function. Can also combine the two conditionals since your processing is identical. And lastly, we can conclude, practically speaking, that if the WS is not archery or marksmanship skill, it must be a close-range skill, so we shouldn't need to check.
Code
if spell.type:lower() == 'weaponskill' then
    if (spell.target.distance > 21.2 and S{'archery','marksmanship'}:contains(spell.skill:lower())) or spell.target.distance > 4.2 then
        cancel_spell()
        add_to_chat(123, '**!!Canceled '..spell.name..'. '..spell.target.name..' is Too Far!!**')
        eventArgs.handled = true
        return handle_equipping_gear(player.status)
    end


Didn't test, let me know if it doesn't work D;
Offline
Posts: 324
By Xavierr 2014-10-26 15:22:17
Link | Citer | R
 
Is there a way to use a different Idle set for when a Luopan is present as compared to when one is not? I've been trying a few methods but can't seem to get it to work.
 Bismarck.Inference
Offline
Serveur: Bismarck
Game: FFXI
user: Inference
Posts: 417
By Bismarck.Inference 2014-10-26 16:18:18
Link | Citer | R
 
Aren't luopan's considered pets? If so then :
Code
if pet.isvalid then
   equip(Luopan specific set)
else
   equip(normal Idle Set)
end

Should work.
Offline
Posts: 324
By Xavierr 2014-10-26 16:56:46
Link | Citer | R
 
That is actually exactly what I have. I have tried this in aftercast and in function but neither one seems to do what I want it to do. I'll paste the entire thing up when I get off work and maybe someone will see something I can't.
Offline
Posts: 19
By Darknightleo 2014-10-26 17:35:10
Link | Citer | R
 
Xavierr said: »
That is actually exactly what I have. I have tried this in aftercast and in function but neither one seems to do what I want it to do. I'll paste the entire thing up when I get off work and maybe someone will see something I can't.
I couldn't get that to work for luopans, either. So I just made it a PetPDT set that's an offshoot of my normal PDT Idle.
 
Offline
Posts:
By 2014-10-26 18:31:00
 Undelete | Edit  | Link | Citer | R
 
Post deleted by User.
 Cerberus.Conagh
Offline
Serveur: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-10-26 18:53:37
Link | Citer | R
 
eslim said: »
that's the closest to a working code that i've seen but it didn't work >< i put the marksmanship and archery weaponskills in my rng lua (which is what i tested the code on) as .. = S{'..', '..'} etc too but it
Code
isn't registering the weaponskills. i've also tried contains:(spell.english) and am thinking the S{'archery','marksmanship'}:contains(spell.skill:lower()) needs more clarity.

any help is appreciated!
Code
ranged_ws = S{"Flaming Arrow", "Piercing Arrow", "Dulling Arrow", "Sidewinder", "Arching Arrow",
	"Empyreal Arrow", "Refulgent Arrow", "Apex Arrow", "Namas Arrow", "Jishnu's Radiance", "Hot Shot", 
	"Split Shot", "Sniper Shot", "Slug Shot", "Heavy Shot", "Detonator", "Last Stand", "Trueflight","Wildfire"}


Code
function pretarget(spell,action)
	if player.status ~= 'Engaged' then 
		if (spell.target.distance >5 and spell.type == 'Weaponskill' and not ranged_ws[spell.name]) or (spell.target.distance > 21 and spell.type == '/weaponskill') then
		cancel_spell()
		return
		end


This is how I do it in mine, but I don't use motes... and I don't think I've ever actually tested it..
 
Offline
Posts:
By 2014-10-26 19:09:27
 Undelete | Edit  | Link | Citer | R
 
Post deleted by User.
 Cerberus.Conagh
Offline
Serveur: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2014-10-26 19:30:08
Link | Citer | R
 
eslim said: »
woot! i got it to work finally, tyvm ^O^!!
Code
	if spell.type:lower() == 'weaponskill' then
		if (spell.target.distance > 4.2 and not ranged_ws:contains(spell.english)) or (spell.target.distance > 21.2 and ranged_ws:contains(spell.english)) then
			cancel_spell()
			add_to_chat(123, '**!!Canceled '..spell.name..'. '..spell.target.name..' is Too Far!!**')
			eventArgs.handled = true
		end
	end

then i put ranged_ws = S{'..', '..'} in user_setup()

Glad I helped
 Quetzalcoatl.Orestes
Offline
Serveur: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2014-10-26 22:46:37
Link | Citer | R
 
Siren.Inuyushi said: »
Thanks Orestes! The reive gear is equipping and the correct Serpentes gear is equipping while engaged for refresh. Couple things that I can't rap up:

I want to be able to list equipment for spells in the main/sub slot that will change when I'm not in a melee stance. I tried adding a 'None' melee stance so that when I'm in 'None' my weapons/shields change out depending on action. And when I want to engage, I go into one of the melee stances (Normal, Acc, etc). Sadly this isn't working. It works for my RDM_gear.lua, any idea why it works in RDM and not in BLU?

Quetzalcoatl.Orestes said: »
Siren.Inuyushi said: »
A few questions for a couple things I've been trying to do. First off, I'm using Mote's gearswap files with everything in a sidecar file.

1 - Does Mote's gearswap automatically equip obis/zodiac ring/twilight cape?
I'm pretty sure it does. This is the syntax.
Code
sets.example = {
    ring1=gear.ElementalRing,
    back=gear.ElementalCape,
    waist=gear.ElementalObi
}

Mote has the default gear setup in Mote-Globals.lua. You can see what he has assigned here.
You should be able to change them, by redefining them in user or job_setup. ex: gear.default.obi_ring = "Strendu Ring"

What you gave will let me set a default ring to equip if I put gear.ElementalRing in the set. What I'm looking for is to have a default nuking set with MAB, Magic Damage+ in each slot by default. And depending on spell, I can update the ring/back/waist slot to equip if it's the correct day (for ring), day or weather (for cape and obi). I would imagine I would need something in the customize_idle_set and customize_melee_set functions, I just don't know what exactly. Something that would compare the spell element to world.day_element and world.weather_element? Then do a set_combine(meleeSet, sets.Elemental_day) or something of the nature.

As for the sleep gear... that will work to equip it when I get put to sleep. Will it go back to my previous set when I wake? Or do I need to do something like
Code
function job_buff_change(buff, gain)
     
    if string.lower(buff) == "sleep" and gain and player.hp > 200 then
        equip(sets.Berserker)
elseif string.lower(buff) == "sleep" and lost then
equip(meleeSet)
    end
 
end


Or will gswap automatically go back to the previous set once sleep is lost?

Lastly... I have it set to equip regen gear when my hpp < 95%, which is great. But, is there a way to make it automatically go to my idle gear (with PDT gear and such) when my hp breaks 95%?

Sorry if this is coming across too demanding. I'm not a programmer by nature. Just a normal Mechanical Engineer. All help is appreciated!

I'm a little unclear on what you're trying to do with your weapon slots. Is there an example lua i can see that's already doing what you want?

As for obis, they do exactly that with the special sets I mentioned. If there's an obi in your inventory for the day matching the spell you're using, it will be used. Otherwise, the default will be used, specified in the syntax above.

The last thing you mentioned doesn't sound possible. Your changing doesn't trigger any sort of event we can piggy back on. You could check hp when your status changes from engaged to idle and vice versa. You could also check it when you use an ability, or when you hit the update button (F12).
 Ragnarok.Flippant
Offline
Serveur: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2014-10-27 00:38:03
Link | Citer | R
 
Xavierr said: »
That is actually exactly what I have. I have tried this in aftercast and in function but neither one seems to do what I want it to do. I'll paste the entire thing up when I get off work and maybe someone will see something I can't.

pet.isvalid is not updated fast enough to register your pet immediately after a Geo spell (probably something to do with pet taking a second to pop first in game). Does your code work if you trigger something else after having casted the Geo spell, or manually update your idle gear?

You could create and maintain your own variable, something like
Code
function aftercast(spell,action)
	if not spell.interrupted then
		if string.find(spell.english,'Geo') then
			luopan = true
		elseif spell.english=="Full Circle" or not pet.isvalid then
			luopan = false
		end
	end
	status_gear()
end


and use the variable to determine your idle gear.
Offline
Posts: 516
By Kooljack 2014-10-27 00:55:11
Link | Citer | R
 
this wont work idk:
Code
hands={"Xaddi Gauntlets",augments={"Accuracy+15"}}


this samlua has this built into the code, not sure if it works beccause i dont have acc+8 ontronif but i tried use the same idea to change xaddi gauntlets based on acc differentiator between the two pairs I have but it won't work, any ideas for me to try?
Code
legs={"Otronif Brais +1",augments={"Accuracy +8"}}
Offline
Posts: 516
By Kooljack 2014-10-27 00:56:11
Link | Citer | R
 
what would i use to swap; say, the pre-determened augment armor (paths ABC), what would the code look like to have those different pieces swapping how one needs? is my question as best as I can ask. tough sometimes hehe

any help;) /bow /salute All~
First Page 2 3 ... 36 37 38 ... 182 183 184
Log in to post.