Gearswap Support Thread

Language: JP EN DE FR
New Items
2023-11-19
users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 21 22 23 ... 181 182 183
Offline
Posts: 66
By Avebian 2014-07-10 13:26:39
Link | Quote | Reply
 
Is it possible to Combine two variables like spell.type and spell.skill?

I want combine 'White Magic' and 'Enfeebling Magic' So spells like slow, para, etc equip one set, and the blackmagic enfeebs another. Tried everything I can think of with no luck.
 Fenrir.Motenten
VIP
Offline
Server: Fenrir
Game: FFXI
user: Motenten
Posts: 764
By Fenrir.Motenten 2014-07-10 13:51:07
Link | Quote | Reply
 
Vafruvant said:
Small question: is there a way to have a specific set for cures when they are cast on yourself?

Try spell.target.type == 'SELF'.

Avebian said:
Is it possible to Combine two variables like spell.type and spell.skill?

It depends on what you mean by 'combine', and how you've designed your sets; but regardless, yes.

One possible problem you might be having, based on what you wrote: spell.type will have 'WhiteMagic', not 'White Magic', while spell.skill will have 'Enfeebling Magic', not 'EnfeeblingMagic'. The space was added to skills, but not to types.

One possible example:
Code
sets.midcast['Enfeebling Magic']['WhiteMagic'] = {}

function midcast(spell)
    local equipSet = sets.midcast
    if equipSet[spell.skill] then
        equipSet = equipSet[spell.skill]
        if equipSet[spell.type] then
            equipSet = equipSet[spell.type]
        end
    end
    equip(equipSet)
end
Offline
Posts: 66
By Avebian 2014-07-10 13:59:49
Link | Quote | Reply
 
Ah the space, thanks for that. Got it working with

if spell.skill == 'Enfeebling Magic' and spell.type == 'WhiteMagic' then
 Asura.Vafruvant
Offline
Server: Asura
Game: FFXI
user: Vafruvant
Posts: 363
By Asura.Vafruvant 2014-07-11 00:00:35
Link | Quote | Reply
 
Fenrir.Motenten said: »
Vafruvant said:
Small question: is there a way to have a specific set for cures when they are cast on yourself?

Try spell.target.type == 'SELF'.
I tried that, and it actually stopped swapping anything for cures, but that much I remedied. I changed the precast to midcast and it at least swapped into my normal cure set. The self-specific cure set still isn't functional. Here's the revised code, and my two sets:
Code
sets.midcast.Cure = {ammo="Brigantia Pebble",neck="Nesanica Torque",ear1="Hospitaler Earring",legs="Blitzer Poleyn",ring1="Sirona's Ring"}
sets.midcast.Cure.Self = set_combine(sets.midcast.Cure, {head="Shabti Armet",ear2="Oneiros Earring",hands="Buremte Gloves",waist="Chuq'aba Belt"})
Code
function midcast(spell,action)
	if spell.english:startswith('Cure') and spell.target.type == 'SELF' then
		equip(sets.midcast.Cure.Self)
	end
end
 Asura.Vafruvant
Offline
Server: Asura
Game: FFXI
user: Vafruvant
Posts: 363
By Asura.Vafruvant 2014-07-11 12:35:15
Link | Quote | Reply
 
As an aside, my WHM lua is putting on my aftercast gear before the spell completely casts. By using "showswaps" alongside Battlemod, it switches into the aftercast gear before the spell goes off, leaving me with a net 0% Cure Potency. Obviously this is a problem, being WHM lol. I was wondering if this was a common problem with an easy solution. Thanks!
 Fenrir.Motenten
VIP
Offline
Server: Fenrir
Game: FFXI
user: Motenten
Posts: 764
By Fenrir.Motenten 2014-07-11 12:41:52
Link | Quote | Reply
 
Sounds like an issue with your overall gearswap file, then. Can't answer based on the snippets provided; please link to a copy of the entire file on pastebin or similar.
 Asura.Vafruvant
Offline
Server: Asura
Game: FFXI
user: Vafruvant
Posts: 363
By Asura.Vafruvant 2014-07-11 13:07:18
Link | Quote | Reply
 
Fenrir.Motenten said: »
Sounds like an issue with your overall gearswap file, then. Can't answer based on the snippets provided; please link to a copy of the entire file on pastebin or similar.
No problem, here's the pastebin: http://pastebin.com/K1yBCFpH

It's mostly copied from your WHM file, with primarily only gear tweaks.
 Lakshmi.Zerowone
Offline
Server: Lakshmi
Game: FFXI
user: Zerowone
Posts: 6949
By Lakshmi.Zerowone 2014-07-11 13:22:10
Link | Quote | Reply
 
Asura.Vafruvant said: »
As an aside, my WHM lua is putting on my aftercast gear before the spell completely casts. By using "showswaps" alongside Battlemod, it switches into the aftercast gear before the spell goes off, leaving me with a net 0% Cure Potency. Obviously this is a problem, being WHM lol. I was wondering if this was a common problem with an easy solution. Thanks!

According to Byrth you are going to want to put your rules from the precast function into the midcast as well.
The reason why you want the mirroring in the midcast is because there are times when the gearswap is so fast it switches to after cast before the action has reached midcast. However, if you have specific midcast rules for certain actions you do not want to place the correlating precast rules in midcast.

ex1: for WS and JAs that only have precast rules you want to copy and paste their specific rules from the precast function into the midcast function.

ex2: CorsairShot or Quick Draw: In precast you would want a condition to equip Mirke to activate the augment. For Midcast you would want all your MAB/MAcc gear equipped to enhance potency.


Also, when using showswaps if the precast and midcast gear is the same it will not appear in the log. It will just show precast and after cast.
 Asura.Vafruvant
Offline
Server: Asura
Game: FFXI
user: Vafruvant
Posts: 363
By Asura.Vafruvant 2014-07-11 13:43:40
Link | Quote | Reply
 
Lakshmi.Zerowone said: »
Asura.Vafruvant said: »
As an aside, my WHM lua is putting on my aftercast gear before the spell completely casts. By using "showswaps" alongside Battlemod, it switches into the aftercast gear before the spell goes off, leaving me with a net 0% Cure Potency. Obviously this is a problem, being WHM lol. I was wondering if this was a common problem with an easy solution. Thanks!

According to Byrth you are going to want to put your rules from the precast function into the midcast as well.
The reason why you want the mirroring in the midcast is because there are times when the gearswap is so fast it switches to after cast before the action has reached midcast. However, if you have specific midcast rules for certain actions you do not want to place the correlating precast rules in midcast.

ex1: for WS and JAs that only have precast rules you want to copy and paste their specific rules from the precast function into the midcast function.

ex2: CorsairShot or Quick Draw: In precast you would want a condition to equip Mirke to activate the augment. For Midcast you would want all your MAB/MAcc gear equipped to enhance potency.


Also, when using showswaps if the precast and midcast gear is the same it will not appear in the log. It will just show precast and after cast.
I don't understand what the point of having a fast cast set would be, then. I have my capped cure casting time gear on precast, which does equip, it shows equipping the midcast but it just switches out before the spell goes off. It isn't a precast/midcast problem, it is a midcast/aftercast problem.
 Lakshmi.Zerowone
Offline
Server: Lakshmi
Game: FFXI
user: Zerowone
Posts: 6949
By Lakshmi.Zerowone 2014-07-11 16:06:53
Link | Quote | Reply
 
With regard to the point of using a fast cast set read the part in bold italics.

But it sounds like your function midcast has an issue. Wouldn't know how to help ya without seeing the code.
Offline
Posts: 41
By Silverfox6868 2014-07-11 18:28:54
Link | Quote | Reply
 
Need help
with obi
not changing
http://pastebin.com/T1fSbUwA
Offline
Posts: 107
By Miang 2014-07-11 18:42:32
Link | Quote | Reply
 
Pretty sure things like
Code
if Dark == world.weather_element or Dark == world.day_element then
need to be
Code
if world.weather_element == 'Dark' or world.day_element == 'Dark' then

The quotes around the word 'Dark' are needed, otherwise it's looking for a variable called Dark, which isn't set, so has a value of nil.
Offline
Posts: 41
By Silverfox6868 2014-07-11 19:37:40
Link | Quote | Reply
 
That doesnt work either wtf with these damn obis
Offline
Posts: 103
By Santi 2014-07-11 20:47:49
Link | Quote | Reply
 
My time dependent gear isn't changing by itself anymore. Gearswap also can't detect whether its day or night.

Did something change to where I have to alter my lua? Or is this a bug?
 Lakshmi.Zerowone
Offline
Server: Lakshmi
Game: FFXI
user: Zerowone
Posts: 6949
By Lakshmi.Zerowone 2014-07-11 21:35:52
Link | Quote | Reply
 
Silverfox6868 said: »
Need help
with obi
not changing
http://pastebin.com/T1fSbUwA

try this one: http://pastebin.com/Q2vMERzz

lines 220, 248 and 255 for examples. Should work.
Use //gs showswaps to verify etc.
 Phoenix.Yocuz
Offline
Server: Phoenix
Game: FFXI
user: Irwlz
Posts: 40
By Phoenix.Yocuz 2014-07-11 21:37:13
Link | Quote | Reply
 
-- Fast Cast set
sets.precast.FC =
{
ammo="Incantor Stone"
head="Creed Armet +2",
body="Reverence Surcoat +1",
hands="Buremte Gloves",
legs="Enif Cosciales",
Right_ring = "Prolix Ring",
Left_ear = "Loquac. Earring"
}

getting an error says its from this line of code the

sets.precast.Fc =

says expected '}' to close at line 43

please help
 Lakshmi.Zerowone
Offline
Server: Lakshmi
Game: FFXI
user: Zerowone
Posts: 6949
By Lakshmi.Zerowone 2014-07-11 21:43:50
Link | Quote | Reply
 
Would need to see the code above it, that section looks clean but there could be an issue with a missing closing } above that section.
 Phoenix.Yocuz
Offline
Server: Phoenix
Game: FFXI
user: Irwlz
Posts: 40
By Phoenix.Yocuz 2014-07-11 21:47:38
Link | Quote | Reply
 
function get_sets()
magicT = "Normal"
enga = 0

-- Smart PLD
smartPLD = true
curepos = true
-- Pourcentage of HP you want to autoequip Twilight set
HPofReraise = 10

----------------- SMART PLD VARIABLES ----------------------
--- Add here the name of the monsters move you wanna autoequip PDT set
PDTTrigger = S{"Ripper Fang", "Chomp Rush", "Scythe Tail", "Cyclotail", "Delta Thrust", "Torpefying Charge", "Head Butt", "Tortoise Stomp", "Painful Whip", "Recoil Dive", "Gnash", "Deathgnash", "Seismic Tail", "Big Scissors", "Megascissors", "Drill Branch", "Pinecone Bomb"}
--- Add here the name of the monsters move you wanna autoequip MDT set
MDTTrigger = S{"Whirling Inferno", "Foul Breath", "Tarichutoxin", "Aqua Fortis", "Regurgitation", "Calcifying Mist", "Aqua Breath", "Earth Breath", "Tetsudo Tremor", "Palsynyxis", "Aqua Ball", "Leeching Current", "Seaspray", "Venom Shower", "Bubble Shower", "Marine Mayhem", "Tidal Guillotine", "Leafstorm"}
--- Add here the name of the monsters you want Smart PLD on
MonsterTrigger = S{"Ark Angel EV", "Ark Angel MR", "Ark Angel TT", "Ark Angel GK", "Ark Angel MR", "Pandemonium Warden"}







-- JA Precast
sets.precast = {}

-- Relic Augmented JA
sets.precast['Iron Will'] = {head="Cab. Coronet +1"}
sets.precast['Fealty'] = {body="Cab. Surcoat +1"}
sets.precast['Chivalry'] = {hands="Cab. Gauntlets +1"}
sets.precast['Invincible'] = {legs="Cab. Breeches +1"}
sets.precast['Guardian'] = {feet="Cab. Leggings +1"}
-- Other JA
sets.precast['Cover'] = {head="Rev. Coronet +1"}
sets.precast['Holy Circle'] = {feet="Rev. Leggings +1"}
sets.precast['Divine Emblem'] = {feet="Creed Sabatons +2"}


-- Fast Cast set
sets.precast.FC =
{
ammo="Incantor Stone"
head="Creed Armet +2",
body="Reverence Surcoat +1",
hands="Buremte Gloves",
legs="Enif Cosciales",
Right_ring = "Prolix Ring",
Left_ear = "Loquac. Earring"
}
 Bismarck.Inference
Offline
Server: Bismarck
Game: FFXI
user: Inference
Posts: 417
By Bismarck.Inference 2014-07-11 21:48:08
Link | Quote | Reply
 
You're missing a comma after Incantor Stone
[+]
 Phoenix.Yocuz
Offline
Server: Phoenix
Game: FFXI
user: Irwlz
Posts: 40
By Phoenix.Yocuz 2014-07-11 21:53:04
Link | Quote | Reply
 
ah ty now i had more problems but i fixed the missing commas


sigh now its saying i have a nil value >.<
 Bismarck.Inference
Offline
Server: Bismarck
Game: FFXI
user: Inference
Posts: 417
By Bismarck.Inference 2014-07-11 21:56:49
Link | Quote | Reply
 
Make sure every complex set has it's more basic parts defined, much like how you have sets.precast={}, you can't have sets.TP.Sword without sets.TP={}, can't have sets.TP.Sword.High without sets.TP.Sword={}, etc. You can chose to put gear in the more basic sets if you desire, but they at least have to exist.
[+]
 Phoenix.Yocuz
Offline
Server: Phoenix
Game: FFXI
user: Irwlz
Posts: 40
By Phoenix.Yocuz 2014-07-11 22:08:14
Link | Quote | Reply
 
inf u are amazing u helped me figure it out i didnt have a midcast defined u *** rock
 Phoenix.Yocuz
Offline
Server: Phoenix
Game: FFXI
user: Irwlz
Posts: 40
By Phoenix.Yocuz 2014-07-11 22:12:32
Link | Quote | Reply
 
lol now that it loaded i got another error figures!!
 Phoenix.Yocuz
Offline
Server: Phoenix
Game: FFXI
user: Irwlz
Posts: 40
By Phoenix.Yocuz 2014-07-11 22:19:46
Link | Quote | Reply
 
GearSwap: Lua error (runtime) gearswap/flow.lua93:
user event error ... windower4/addons/gearswap/data/yocuz/yocuz_pld.lua:576: attempt to compare number with nil



if player.hpp <= HPtoReraise then
equip(sets.AutoRR)
add_to_chat(501, '*-*-*-*-*-*-*-*-* [ HP < '..HPtoReraise..' - Twilight set ON ] *-*-*-*-*-*-*-*-*')
end
end)
 Bismarck.Inference
Offline
Server: Bismarck
Game: FFXI
user: Inference
Posts: 417
By Bismarck.Inference 2014-07-11 22:24:42
Link | Quote | Reply
 
Upload whole file on pastebin :

http://pastebin.com/

and post the link here, I'd need to see how you define that but my guess would be its not a number (where you defined HPtoReraise you did HPtoReraise == 'something' rather than just HPtoReraise = 10) but would be better to just look at the whole thing rather than blind guessing.
 Phoenix.Yocuz
Offline
Server: Phoenix
Game: FFXI
user: Irwlz
Posts: 40
By Phoenix.Yocuz 2014-07-11 22:28:38
Link | Quote | Reply
 
http://pastebin.com/XjGQndXk

this is the pastebin im still filling in my sets some are blank
 Bismarck.Inference
Offline
Server: Bismarck
Game: FFXI
user: Inference
Posts: 417
By Bismarck.Inference 2014-07-11 22:30:56
Link | Quote | Reply
 
I don't even see HPtoReraise anywhere else besides that rule. Somewhere near the beginning just type HPtoReraise = 50 or whatever number you want it to be.
 Phoenix.Yocuz
Offline
Server: Phoenix
Game: FFXI
user: Irwlz
Posts: 40
By Phoenix.Yocuz 2014-07-11 22:32:49
Link | Quote | Reply
 
it is all the way at the top already set to 10
 Phoenix.Yocuz
Offline
Server: Phoenix
Game: FFXI
user: Irwlz
Posts: 40
By Phoenix.Yocuz 2014-07-11 22:33:13
Link | Quote | Reply
 
on line 9
 Phoenix.Yocuz
Offline
Server: Phoenix
Game: FFXI
user: Irwlz
Posts: 40
By Phoenix.Yocuz 2014-07-11 22:33:49
Link | Quote | Reply
 
ffs says of not to lol
First Page 2 3 ... 21 22 23 ... 181 182 183
Log in to post.