GearSwap Offense Modes Help

Eorzea Time
 
 
 
Language: JP EN FR DE
users online
Forum » Windower » Support » GearSwap Offense Modes help
GearSwap Offense Modes help
 Shiva.Mortechai
Offline
Server: Shiva
Game: FFXI
user: Mortechai
Posts: 11
By Shiva.Mortechai 2020-05-14 19:16:03
Link | Quote | Reply
 
Code
function job_state_change(stateField, newValue, oldValue)
    if stateField == 'Offense Mode' then
        if newValue == 'Normal' then
            enable('main','sub','range')
        else
            disable('main','sub','range')
        end
    end
end


I need to know how to write it so I can include more than one offense mode in this arguement, how do I have to format the 'Normal'? Any help is greatly appreciated!
 Cpu
Offline
Posts: 249
By Cpu 2020-05-14 20:06:02
Link | Quote | Reply
 
Typing from mobile but I think this works:

if S{'Normal','Hybrid','Meva'}:contains(newValue) then
 Shiva.Mortechai
Offline
Server: Shiva
Game: FFXI
user: Mortechai
Posts: 11
By Shiva.Mortechai 2020-05-15 20:23:30
Link | Quote | Reply
 
Where would I plug that into that line of code?
 Cpu
Offline
Posts: 249
By Cpu 2020-05-18 12:41:42
Link | Quote | Reply
 
Shiva.Mortechai said: »
Where would I plug that into that line of code?
You would replace the existing if newValue line with the line that I provided...