Carbuncle.Galmaximas said:
»can you give an example of what this would look like via gearsawp I.E is it a function or what? thanks in advance
Here's an example for
Desert Boots. In gearswap, you can have a function called job_buff_change(buff, gain). This function is called whenever you get (or lose) a buff. So, I coded it so if I get Sandstorm, it pulls my Desert Boots out of my sack and equips them. As soon as I lose sandstorm, it puts them back away.
Now, in that rare scenario I actually do get sandstorm, I'll run faster. I'll probably also code it so it happens if there's weather going on too.
It looks like this:
Code
if (buff=="Sandstorm" and gain) then
if (not player.inventory["Desert Boots"]) then
send_command("get Desert Boots")
if (not pet.isvalid or (pet.isvalid and pet.status == 'Idle')) then
send_command("wait 1; gs equip sets.DesertBoots")
end
end
elseif (buff=="Sandstorm" and not gain) then
if (player.inventory["Desert Boots"]) then
if (pet.isvalid) then
equip({feet="Convoker's Pigaches +1"})
else
equip({feet="Serpentes Sabots"})
end
send_command("put Desert Boots sack")
end
end
Note there's some pet like stuff in there, cause I'm a summoner, so I'm adjusting the equip whether or not my pet is currently attacking something (I don't care about it if I'm in combat). You wouldn't need all that, but you might have conditions of your own if you're a different job.
This will only equip it once, but if you tweak your customize_idle_set function, you can make it so it will maintain it on your idle set if you still have the buff and change your boots for some reason:
Code
if (buffactive["Sandstorm"] and player.inventory["Desert Boots"]) then
idleSet = set_combine(idleSet, {feet="Desert Boots"})
end
And, if you want to be super sure that the boots get put away properly and get taken out properly (just in case you like disconnect or something, who knows!) you can add an extra check before that too:
Code
if (player.inventory["Desert Boots"] and not buffactive["Sandstorm"]) then
send_command("put Desert Boots sack")
elseif (buffactive["Sandstorm"] and not player.inventory["Desert Boots"]) then
send_command("get Desert Boots")
end
Hurray for coding. I'm getting to be a big fan of doing stuff like this for conditional items. I'm doing it for my
Balrahn's Ring and
reive necklace too.