Gearswap Support Thread

Language: JP EN DE FR
2010-09-08
New Items
users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 46 47 48 ... 182 183 184
 Lakshmi.Byrth
VIP
Offline
Server: Lakshmi
Game: FFXI
user: Byrthnoth
Posts: 6184
By Lakshmi.Byrth 2015-01-07 10:18:27
Link | Quote | Reply
 
That's likely due to double-tapping a WS macro without any protection against it in your code.

precast -> midcast -> action is sent the first time
precast -> midcast -> action is sent the second time
Error for the first one -> aftercast
Action 2 is successful in the aftercast set -> aftercast 2

So you need to add an if not midaction() then check to your aftercast set.
 Ragnarok.Flippant
Offline
Server: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2015-01-07 20:42:04
Link | Quote | Reply
 
Quetzalcoatl.Mckenzee said: »
a couple quick questions

will spell.skill return weaponskill for weaponskills?

i wanna make sure that this syntax will work as well

gorget.Distortion = (Snow Gorget)
sets.precast.weaponskill.[ws_name] = (
head = "helmet",
neck = gorget[spell.WSA],
ear1 = "earring")


also, i'm planning on using //gs export to populate individual gearset include files. 1 want to double check that after initializing the gearset, simply calling the include and defining the gearset inside the exported file will cover it.

edit: also, does export provide support for naming the files/sets or does that need to be editted by hand?

spell.skill will return the combat skill ("Dagger" etc). spell.type will return "Weaponskill" for weaponskills.

Your gorget code will not work for a number of reasons, including many syntax errors. The most fundamental, though, is a logical error: the spell table does not exist until it is passed to the precast, midcast, or aftercast functions (it is a local variable because you do not know what the spell is until you are processing an action). If you wanted to determine the right gorget before hitting those functions, you would need to load the resources, then look up the various properties by name using the weaponskill table.

However, that is not very dynamic. It'd be far better to point the neck to a table, and during the precast function, set that table's name property to that of an appropriate gorget, such that Mote does. Stealing his code from libs, since I'm assuming you don't use his templates:

First, instantiate the variables we need (the include is for Mote's own maps (https://github.com/Kinematics/Mote-libs/blob/master/Mote-Mappings.lua), to be used for the skillchain elements, and the default is in case you leave your gorget in inaccessible inventory)
Code
include('Mote-Mappings.lua')
gear = {}
gear.default = {}
gear.ElementalGorget = {name = ""}
gear.ElementalBelt = {name = ""}
gear.default.weaponskill_neck = "Justiciar's Torque"


then, in your WS set, point to the gorget table
Code
sets.precast.weaponskill.Combo = {
        neck = gear.ElementalGorget
    }


then, in the precast function, call this function,
Code
set_elemental_gorget_belt(spell)


which will dynamically generate the appropriate string at gear.ElementalGorget.name based on the elemental properties of the weaponskill and your current inventory (taken from Mote-Utility.lua)
Code
-- Set the name field of the predefined gear vars for gorgets and belts, for the specified weaponskill.
function set_elemental_gorget_belt(spell)
    if spell.type ~= 'WeaponSkill' then
        return
    end
    -- Get the union of all the skillchain elements for the weaponskill
    local weaponskill_elements = S{}:
        union(skillchain_elements[spell.skillchain_a]):
        union(skillchain_elements[spell.skillchain_b]):
        union(skillchain_elements[spell.skillchain_c])
        
    gear.ElementalGorget.name = get_elemental_item_name("gorget", weaponskill_elements) or gear.default.weaponskill_neck or ""
    gear.ElementalBelt.name = get_elemental_item_name("belt", weaponskill_elements) or gear.default.weaponskill_waist or ""
end

function get_elemental_item_name(item_type, valid_elements, restricted_to_elements)
    local potential_elements = restricted_to_elements or elements.list
    local item_map = elements[item_type:lower()..'_of']
    for element in (potential_elements.it or it)(potential_elements) do
        if valid_elements:contains(element) and (player.inventory[item_map[element]] or player.wardrobe[item_map[element]]) then
            return item_map[element]
        end
    end
end


I haven't tested it, so let me know any errors; it's likely I've overlooked something since I'm really just copy and pasting segments of Mote's code and not actually looking through it.

To address the syntax errors, since you specifically asked:
1. Parenthesis are for functions, braces are for tables
2. Although it's meaningless from inside get_sets() either way, spell.WSA would actually need to be spell.wsA because just about everything is case sensitive. Mote uses spell.skillchain_a though, so the GS documentation may be out of date? Best way to see what a variable returns, or if it even exists, is to just put print(spell.wsA) from inside an appropriate function
3. Snow Gorget would need to be "Snow Gorget" because it is a string, otherwise the compiler will try to resolve each word as a variable and would run an error because you can't just list two variables like that
4. This is actually a logical error, but even if you did make "Snow Gorget" a string, neck would point to the table, not the string itself, and GS will not understand that because when it receives a table as a piece of equipment, it looks for the element at index ["name"], and the only element you have is [1]="Snow Gorget"
5. Periods and brackets both indicate the index of a table, but you can't use them together as you do in sets.precast.weaponskill.[ws_name]

As for your questions about //gs export, I am not sure what you're asking.


Cerberus.Conagh said: »
A Rather crude method would be to add a gain/loss function to check when you lose haste it sets a toggle

Toggle 0 no haste
toggle 1 Haste 1
Toggle 2 Haste 2

Triggers for toggle 1 and 2 would be something like this ..this is not the right way to parse chat messages and is just an example for a work around, it may be easier to just use the Packet id's like Batlemod does and make the trigger work directly from Battlemod updating this data within an include for your gearswap file.

Packet manipulation is a little beyond my skill but if I nail the chat log function to check it (and that target is you) then this could work... subject to some issues obviously and this is just a preliminary idea.
Code
windower.register_event('Chat Message',function(chat)   
	if string S{'Haste II','Haste 2'} then
		HasteToggle == 2
	elseif string S{'Haste'} then
		HasteToggle == 1
	end
end


Packet id's etc would be better in ways but then it's subject to Battlemod being maintained etc or rather that people who use this aspect if it were included report it if it breaks. But Packet ID parsing is for more robust than checking chat log messages (especially if you block those form your chat log).

P.S I'm learning how packets work and how to write the code for it, so if Flippant or Bryth don't beat me to it! I'll post somewhere, might even ask for it to be put into a repository or something

Someone once asked me about this before, in terms of parsing the chat. You don't want to change the toggle just because someone -initiates- the cast on you, for a couple reasons:
1. They could get interrupted
2. They could be casting Haste on you while you have Haste II and will get no effect; or, similarly, in situations you have a strong Slow on you

So you would need to focus on you -receiving- the haste. However, therein lies the issue since, when you gain the buff, it only says "haste" regardless of the level of haste. Can be done with a lot of hardcoding since it's not like the scenarios are infinite; it's just ugly.

As for solving it with packets, I'd have to actually log in to fiddle around and find out if and how and I am far too lazy for that v_v; All I know is you'd have to look somewhere further than just buff IDs, since they share the same number. That said, GEO Haste does have a different ID, so it'd be relatively easy to deal with that.

Bismarck.Stanislav said: »
I was wondering how to add sets with certain buffs such as haste2/geo-haste. My current THF/NIN lua uses certain buff stages such as haste only, haste & march, etc. and I wanted to add in sets with Haste2 & Indi/Geo-Haste as well. Thanks in advanced!

Haste from GEO spells is also called Haste, but since it stacks with the normal Haste spell, you can use buffactive.Haste==2. The only issue is determining whether you have Haste II + one March, GEO Haste + one March, and any Haste + one SV March. I just have a manual toggle for special situations like that, but other than that, there's nothing you can do just using the basic GS functions.

Asura.Limelol said: »
Cerberus.Conagh said: »
It does this, can also have various acc sets so if you say I want Low Acc, you can define a low acc ws set (can have infinite sets controlled by a toggle or by an acc parse rule to auto adjust sets etc....) you would have 1 WS macro but a toggle (so 2 macros to control what could be 10 sets)

You dont need a macro for TP gear it equis it after your WS is complete / spells / ja

Also accounts for instant cast etc.

and Makes gearing easier (you can swap from 80 slots on WAR to 80 slots of gear for WHM in about 2~3minutes)

Oh, alright. I can definitely see why everyone suggests this addon then. Thanks for the information.

And I'll have to read up on the first part about having multiple sets because it sounds pretty cool.

Another question:

I plan on tinkering around with this while leveling DNC. Obviously, I won't have a bunch of different sets, maybe just a ws set and some sets for my JAs.

If I leave the level 99 gearsets / gear I don't have in the script, will anything go wrong? Obviously, I won't be able to use level 99 gear at level ~55.

Conagh kinda answers your question, but I want to make sure you understand that just downloading the addon doesn't do anything for you automatically: the addons simply provides a platform for you to automate processes based on game events, the most common of which being equip changes. It's like a macro that is dynamic (what happens when you press the macro changes depending on your environment). If you set up a rule to equip a set based on your WS, then yes, it will automatically equip the gear for you. If you don't, it won't.

As for leaving the gear in, it shouldn't be a problem. Pretty sure Byrth has a check that prevents trying to send the packets out if it determines that you can't actually equip the gear.
[+]
 Quetzalcoatl.Valli
Offline
Server: Quetzalcoatl
Game: FFXI
user: valli
Posts: 1420
By Quetzalcoatl.Valli 2015-01-07 21:54:06
Link | Quote | Reply
 
Lakshmi.Byrth said: »
That's likely due to double-tapping a WS macro without any protection against it in your code.

precast -> midcast -> action is sent the first time
precast -> midcast -> action is sent the second time
Error for the first one -> aftercast
Action 2 is successful in the aftercast set -> aftercast 2

So you need to add an if not midaction() then check to your aftercast set.

I wish I could say it's something as simple as a "double-tap" persay, but it isn't. I can only assume it's due to the fact that 15 enemies are attacking and the packets just get jumbled.

Just to test it a couple times I would use the ws from the menu, to be certain it wasn't getting double pressed. Still occassionally fired in the wrong set. Makes me wonder, how many storms/smites/evis/etcetcetc were fired off in the wrong sets.
 Asura.Limelol
Offline
Server: Asura
Game: FFXI
user: Limelol
By Asura.Limelol 2015-01-07 22:10:22
Link | Quote | Reply
 
Ragnarok.Flippant said: »
Conagh kinda answers your question, but I want to make sure you understand that just downloading the addon doesn't do anything for you automatically: the addons simply provides a platform for you to automate processes based on game events, the most common of which being equip changes. It's like a macro that is dynamic (what happens when you press the macro changes depending on your environment). If you set up a rule to equip a set based on your WS, then yes, it will automatically equip the gear for you. If you don't, it won't.

As for leaving the gear in, it shouldn't be a problem. Pretty sure Byrth has a check that prevents trying to send the packets out if it determines that you can't actually equip the gear.

I see. I think I get how it works now, at least for the most part. Thanks for your input as well.

I'll start tinkering around with it to see what happens the next time I'm able to log on.
 Cerberus.Conagh
Offline
Server: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2015-01-07 22:12:01
Link | Quote | Reply
 
Quetzalcoatl.Valli said: »
What does one have to do to ensure gearswap always works? Cause I hate to break this, but it does not always get the gear on fast enough for the ws to process.

It's very obvious when using magical ws when the program fails to act quickly enough.

Fail vs success


1000 tp in the proper set minimum is 4k. meaning that first one was fired off in my melee set. Granted this only happens maybe 1 every 50 pulls, but 0 times is too many.


Based on your response above, any chance you could post your GS file and I can have a look see if it's something simple?

and Midaction() has it's own bugs. (ie 8 second cool down to cancel any packet data sent out that doesn't receive a return packet for example and locks your sets up.) so having it in could actually kill your WS swaps.
 Quetzalcoatl.Valli
Offline
Server: Quetzalcoatl
Game: FFXI
user: valli
Posts: 1420
By Quetzalcoatl.Valli 2015-01-07 22:15:12
Link | Quote | Reply
 
It's monts gs, I've just been changing the gear as I go, deleting unneeded things etc. Still working on it.
 Cerberus.Conagh
Offline
Server: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2015-01-07 22:18:25
Link | Quote | Reply
 
Line 326
Code
 if not midaction() then
            handle_equipping_gear(player.status)


If you have attempted to send out a packet, and it never send a return packet (ie you did touple tap a spell or something). It wont handle equip.

try removing the If not Midaction() and have a try.

I had the same issue on my thf (I hate using motes gearswaps personally due to the vast code that I didn't read or make the logic for, makes it harder to bug test) and removing it, fixed this issue.
 Quetzalcoatl.Valli
Offline
Server: Quetzalcoatl
Game: FFXI
user: valli
Posts: 1420
By Quetzalcoatl.Valli 2015-01-07 22:22:53
Link | Quote | Reply
 
It is a little overcomplicated... Been trying to stream line it as much as possible, little tougher when you don't have a damn clue what half the ***is for lol.

I'll delete that part and see how it goes. (I don't THINK that's the issue, but it could be.)
How much of this:
Code
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------

-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
    if state.Buff[buff] ~= nil then
        if not midaction() then
            handle_equipping_gear(player.status)
        end
    end
end

Do I delete? The whole thing, just the 2 lines?
 Cerberus.Conagh
Offline
Server: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2015-01-07 22:26:23
Link | Quote | Reply
 
Code
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
 
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
    if state.Buff[buff] ~= nil then
            handle_equipping_gear(player.status)
    end
end


Should do the trick.

If not I have a Bugging Template I use for my own files (sets that specify and deal with on action i.e WS / Ja / Precast / mid cast / aftercast / change buff etc etc and I'll PM you the WS testing stuff to make sure it changes it.
 Quetzalcoatl.Valli
Offline
Server: Quetzalcoatl
Game: FFXI
user: valli
Posts: 1420
By Quetzalcoatl.Valli 2015-01-08 00:17:28
Link | Quote | Reply
 
That did not fix it;


Worked fine for about an hour, but still rarely, fails. If it's due to the nature of the cleave, having so many mobs attacking, that's understandable.

//showswaps shows that it is actually swapping the correct gear (obviously) it's just not always processing.
 
Offline
Posts:
By 2015-01-08 00:25:27
 Undelete | Edit  | Link | Quote | Reply
 
Post deleted by User.
 Ragnarok.Flippant
Offline
Server: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2015-01-08 03:03:40
Link | Quote | Reply
 
What the not midaction() check is doing in these cases is making sure that you don't change gear if you are in the process of doing an action. For example, your TP set changes if you gain or lose Feint (you want AF2 pants equipped when it's on), so that code will swap you into the new set. If you delete the midaction() check, it will equip you into the set when you gain or lose the buff, even if you're in the middle of a WS. That is bad for obvious reasons. You should not remove it, unless you want to make it more likely to mess up your WS gear.

I don't know what your issue is, but it's not the buff_change thing.
 Cerberus.Conagh
Offline
Server: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2015-01-08 15:27:34
Link | Quote | Reply
 
eslim said: »
this should make it work?
Code
function job_buff_change(buff, gain)
	if not midaction() then
		status_change(player.status)
		handle_equipping_gear(player.status)
	end
end


Activating a WS is a status change and shouldn't need to be forced.

It could (and I stress this part) be an in issue with the incoming packet chunk being broken? while having 40 mobs hitting you.

Only way to see if it's the gearswap or something else (If it was me, I'd just arse inc packets etc but) would be to use a standard GS file not using motes and see if it's something that's inherint in this,
 Cerberus.Conagh
Offline
Server: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2015-01-08 15:29:25
Link | Quote | Reply
 
Ragnarok.Flippant said: »
What the not midaction() check is doing in these cases is making sure that you don't change gear if you are in the process of doing an action. For example, your TP set changes if you gain or lose Feint (you want AF2 pants equipped when it's on), so that code will swap you into the new set. If you delete the midaction() check, it will equip you into the set when you gain or lose the buff, even if you're in the middle of a WS. That is bad for obvious reasons. You should not remove it, unless you want to make it more likely to mess up your WS gear.

I don't know what your issue is, but it's not the buff_change thing.

Actually I used Vallis GS file and experienced the issue, but using a basic THF Template, I never saw this issue. (last night that ill today I forgot I tested it).

Worked fine for 2 hours (could be too small a sample)
 Asura.Limelol
Offline
Server: Asura
Game: FFXI
user: Limelol
By Asura.Limelol 2015-01-08 16:06:54
Link | Quote | Reply
 
Asura.Limelol said: »
If I leave the level 99 gearsets / gear I don't have in the script, will anything go wrong? Obviously, I won't be able to use level 99 gear at level ~55.

Providing an update on this because I was able to log on to test it.

I'm sure most people already knew or assumed this, but if you leave the gear in and you can't use it, it will still function properly.

For example, on my 60 DNC, I found the sets it would used. All of it was 99 gear. I changed 1 piece of gear to a low level piece of gear and it swapped into it flawlessly.
 Cerberus.Conagh
Offline
Server: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2015-01-09 04:10:33
Link | Quote | Reply
 
Something I've wondered (not seen it anywhere but hmmm).

Does GS have within it the ability to see if you behind a mob?
 Leviathan.Arcon
VIP
Offline
Server: Leviathan
Game: FFXI
user: Zaphor
Posts: 666
By Leviathan.Arcon 2015-01-09 04:40:18
Link | Quote | Reply
 
This is a piece of code I wrote on the Windower forums a while back. It aborts if you cannot see the mob:
Code
require('vectors')
 
precast = function(spell)
    if spell.target.type == 'MONSTER' then
        local dir = V{spell.target.x, spell.target.y} - V{player.x, player.y}
        local heading = V{}.from_radian(player.facing)
        local angle = V{}.angle(dir, heading):degree():abs()
        if angle > 90 then
            print('Aborting...')
            cancel_spell()
            return
        end
    end
 
   -- Other crap
end


This can be adjusted to check the mob's facing compared to yours. I haven't tested this yet, but it's a pretty minor change:
Code
require('vectors')

check_mob_facing = function(mob)
    local facing = vector.from_radian(mob.facing)
    local direction = V{player.x, player.y} - V{mob.x, mob.y}
    local angle = vector.angle(direction, facing):degree():abs()
    return angle > 90
end


This will return true if the mob is looking away from you (more than 90 degrees). If you want to increase it, just increase the number in the return statement.
 Cerberus.Conagh
Offline
Server: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2015-01-09 04:47:23
Link | Quote | Reply
 
Leviathan.Arcon said: »
This is a piece of code I wrote on the Windower forums a while back. It aborts if you cannot see the mob:
Code
require('vectors')
 
precast = function(spell)
    if spell.target.type == 'MONSTER' then
        local dir = V{spell.target.x, spell.target.y} - V{player.x, player.y}
        local heading = V{}.from_radian(player.facing)
        local angle = V{}.angle(dir, heading):degree():abs()
        if angle > 90 then
            print('Aborting...')
            cancel_spell()
            return
        end
    end
 
   -- Other crap
end


This can be adjusted to check the mob's facing compared to yours. I haven't tested this yet, but it's a pretty minor change:
Code
require('vectors')

check_mob_facing = function(mob)
    local facing = vector.from_radian(mob.facing)
    local direction = V{player.x, player.y} - V{mob.x, mob.y}
    local angle = vector.angle(dir, heading):degree():abs()
    return angle > 90
end


This will return true if the mob is looking away from you (more than 90 degrees). If you want to increase it, just increase the number in the return statement.


Nice can use this to update TP sets bodies.

Thanks
 Quetzalcoatl.Valli
Offline
Server: Quetzalcoatl
Game: FFXI
user: valli
Posts: 1420
By Quetzalcoatl.Valli 2015-01-09 08:32:37
Link | Quote | Reply
 
Where does one add this to the code?

*edited* instead of being intelligent and looking, I asked, THEN went to go look, and removed it.
 Cerberus.Conagh
Offline
Server: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2015-01-09 08:33:26
Link | Quote | Reply
 
Quetzalcoatl.Valli said: »
Where does one add this to the code? Also, I assume you were asking in reference to ambush, and that this is an RQT, but anyway.

Does the TA+5% work regardless of the direction, so long as you have the merits. I know that the ACC only counts from the back.

Only applies if you are behind the mob
 Quetzalcoatl.Valli
Offline
Server: Quetzalcoatl
Game: FFXI
user: valli
Posts: 1420
By Quetzalcoatl.Valli 2015-01-09 08:40:37
Link | Quote | Reply
 
Any chance you could take the gs i posted back there, and show me specifically where to add that directional rule for the tp set?

As well as where an if buff active march rule would go for the tp sets, I get the general idea, just don't know how to apply it.
 Cerberus.Conagh
Offline
Server: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2015-01-09 08:50:31
Link | Quote | Reply
 
Quetzalcoatl.Valli said: »
Any chance you could take the gs i posted back there, and show me specifically where to add that directional rule for the tp set?

As well as where an if buff active march rule would go for the tp sets, I get the general idea, just don't know how to apply it.

Er I don't use motes gearswaps to know if it works, because his includes *** block alot of other things....... I can have a look in a bit I guess
 Quetzalcoatl.Valli
Offline
Server: Quetzalcoatl
Game: FFXI
user: valli
Posts: 1420
By Quetzalcoatl.Valli 2015-01-09 08:52:46
Link | Quote | Reply
 
See I don't even know what that means. I'm only using his because it's easily available.

If there was a more streamlined version, that still did everything I need it to do (and the things it does that I have no idea how they work like Waltz calculations...).
 Cerberus.Conagh
Offline
Server: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2015-01-09 08:54:14
Link | Quote | Reply
 
Quetzalcoatl.Valli said: »
See I don't even know what that means. I'm only using his because it's easily available.

If there was a more streamlined version, that still did everything I need it to do (and the things it does that I have no idea how they work like Waltz calculations...).


Well for example ~

Adding my own commands don't work~
Adding Automated WS's based on TP don't work~

just a couple of things, I'll post one with what you need later on, I'd need to build it I guess.
 Valefor.Ophannus
Offline
Server: Valefor
Game: FFXI
user: Ophannus
Posts: 241
By Valefor.Ophannus 2015-01-09 12:47:00
Link | Quote | Reply
 
Pastebin: http://pastebin.com/3TK5hNxg

I have a set called StunAlacrity
Code
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
if spell.english == 'Stun' and buffactive['Alacrity'] then
   equip(sets.StunAlacrity)


When Alacrity is active and Stun is cast, it's supposed to use StunAlacrity set, not my regular stun set. For some reason it never uses my StunAlacrity set however.

Frequently when I cast stun, after the cast, I return to my idle set. But 50% of the time when returning to my idle set, everything is switched back to idle EXCEPT for Apamajas II and Sangoma Ring. When I cast stun AGAIN, it will swap all 16 slots back to idle. It's weird. 50% of stuns aftercast in full idle, 50% of stun casts aftercast in full idle but leave on the main and right_ring from my stun set. Can't figure it out. It's not a spelling or syntax issue because, like I said, I'll cast stun once, and return to idle gear, then cast stun again and return to all idle gear except my Apamajas II and Sangoma Ring remain on. It alternates between these two 50/50, every time.

Also when Aurorastorm is up, the lua never puts on my CureWithLightWeather set even though I have this code:
Code
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
if world.weather_element == 'Light' then
return 'CureWithLightWeather'
end


Instead it just uses my regular cure set, every time(probably a similar issue is going on with my stuns not detecting if alacrity is up)

Please assist :(

If Mote's include is screwing ***up, can anyone just give me their workable SCH gearswap and I'll just migrate my sets over and use that? Need to be able to have a gearswap that uses specific gear for spells depending on strategems/weather/day.
 Cerberus.Conagh
Offline
Server: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2015-01-09 12:50:30
Link | Quote | Reply
 
Valefor.Ophannus said: »
Pastebin: http://pastebin.com/3TK5hNxg

I have a set called StunAlacrity
Code
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
if spell.english == 'Stun' and buffactive['Alacrity'] then
   equip(sets.StunAlacrity)


When Alacrity is active and Stun is cast, it's supposed to use StunAlacrity set, not my regular stun set. For some reason it never uses my StunAlacrity set however.

Frequently when I cast stun, after the cast, I return to my idle set. But 50% of the time when returning to my idle set, everything is switched back to idle EXCEPT for Apamajas II and Sangoma Ring. When I cast stun AGAIN, it will swap all 16 slots back to idle. It's weird. 50% of stuns aftercast in full idle, 50% of stun casts aftercast in full idle but leave on the main and right_ring from my stun set. Can't figure it out...

Also when Aurorastorm is up, the lua never puts on my CureWithLightWeather set even though I have this code:
Code
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
if world.weather_element == 'Light' then
return 'CureWithLightWeather'
end


Please assist :(


I use this really basic SCH one, I don't take the job seriously so I'm sure there's better but it has various stun sets. You could use this until either Motenten comes back explains, or someone else who uses Motes GS files explains.
Code
function get_sets()
	send_command('input /macro book 4;wait .1;input /macro set 1') -- Change Default Macro Book Here --
    timer_reg = {}
    perp_cycle = false
    sets = {}
         
    sets.aftercast_Idle_noSub = {main="Bolelabunga",sub="Genbu's Shield",ammo="Incantor Stone",
        head="Nefer Khat",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
        body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Woltaris Ring",ring2="Dark Ring",
        back="Shadow Mantle",waist="Korin Obi",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
     
    sets.aftercast_Idle_Sub = {main="Bolelabunga",sub="Genbu's Shield",ammo="Incantor Stone",
        head="Nefer Khat",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
        body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Woltaris Ring",ring2="Dark Ring",
        back="Shadow Mantle",waist="Korin Obi",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
	
	sets.aftercast_IdleStun = {main="Apamajas II",sub="Mephitis Grip",ammo="Inacantor Stone",
        head="Nahtirah Hat",neck="Eddy Necklace",ear1="Lifestorm Earring",ear2="Psystorm Earring",
        body="Hedera Cotehardie",hands="Acad. Bracers",ring1="Sangoma Ring",ring2="Maquette Ring",
        back="Swith Cape",waist="Witful belt",legs="Artsieq Hose",feet="Peda. Loafers"}

	sets.ExtremeStun = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Inacantor Stone",
        head="Peda. M.Board +1",neck="Eddy Necklace",ear1="Lifestorm Earring",ear2="Psystorm Earring",
        body="Hedera Cotehardie",hands="Acad. Bracers",ring1="Sangoma Ring",ring2="Maquette Ring",
        back="Swith Cape",waist="Witful belt",legs="Artsieq Hose",feet="Peda. Loafers"}

	sets.aftercast_IdleNight = {main="Bolelabunga",sub="Genbu's Shield",ammo="Incantor Stone",
		head="Nefer Khat",neck="Twilight Torque",ear1="Merman's Earring",ear2="Coral Earring",
		body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Dark ring",ring2="Woltaris Ring",
		back="Cheviot Cape",waist="Siegel Sash",legs="Assiduity Pants +1",feet="Theo. Duckbills +1"}
	
	sets.aftercast_Idle119 = {main="Terra's Staff",ammo="Incantor Stone",
		head="Gendewitha Caubeen",neck="Twilight Torque",ear1="Merman's Earring",ear2="Coral Earring",
		body="Hagondes Coat",hands="Gendewitha Gages",ring1="Dark ring",ring2="Patricius Ring",
		back="Cheviot Cape",waist="Siegel Sash",legs="Artsieq Hose",feet="Gendewitha Galoshes"}
	
	sets.aftercast_IdleDay = {main="Bolelabunga",sub="Genbu's Shield",ammo="Incantor Stone",
		head="Nefer Khat",neck="Twilight Torque",ear1="Merman's Earring",ear2="Coral Earring",
		body="Heka's Kalasiris",hands="Lurid Mitts",ring1="Dark ring",ring2="Woltaris Ring",
		back="Cheviot Cape",waist="Siegel Sash",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
	
    sets.aftercast_Move = {main="Bolelabunga",sub="Genbu's Shield",ammo="Incantor Stone",
        head="Nefer Khat",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
        body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Woltaris Ring",ring2="Dark Ring",
        back="Shadow Mantle",waist="Korin Obi",legs="Assiduity Pants +1",feet="Desert boots"}
		
    sets.aftercast_Idle = sets.aftercast_Idle_noSub
         
    sets.precast_FastCast = {ammo="Incantor Stone",head="Nahtirah Hat",ear2="Loquacious Earring",
        body="Anhur Robe",hands="Gendewitha Gages",back="Swith Cape",legs="Artsieq hose",feet="Peda. Loafers"}
     
    sets.Resting = {main="Chatoyant Staff",sub="Mephitis Grip",
		head="Nahtirah Hat",neck="Twilight Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
		body="Hagondes Coat",hands="Nares Cuffs",ring1="Sangoma Ring",ring2="Maquette Ring",
		back="Shadow Mantle",waist="Korin Obi",legs="Assiduity Pants +1",feet="Chelona Boots"}
	
	--MAB Sets--
	sets.midcast_ElementalMagic = {}
	
    sets.midcast_ElementalMagic.index = {'Standard','Accuracy'}
    midcast_ElementalMagic_ind = 1
	
    sets.midcast_ElementalMagic.Standard = {
		main="Keraunos",
		sub="Mephitis Grip",
		ammo="Savant's Treatise",
		head="Hagondes Hat",
		body="Hagondes Coat",
		hands="Hagondes Cuffs +1",
		legs="Hagondes Pants +1",
		feet="Umbani Boots",
		neck="Eddy Necklace",
		waist="Aswang Sash",
		left_ear="Friomisi Earring",
		right_ear="Hecate's Earring",
		left_ring="Icesoul Ring",
		right_ring="Sangoma Ring",
		back="Toro Cape"}
    
    sets.midcast_ElementalMagic.Accuracy = {
		main="Lehbrailg +2",
		sub="Mephitis Grip",
		ammo="Savant's Treatise",
		head="Hagondes Hat",
		body="Hagondes Coat",
		hands="Hagondes Cuffs +1",
		legs="Artsieq Hose",
		feet="Umbani Boots",
		neck="Eddy Necklace",
		waist="Aswang Sash",
		left_ear="Lifestorm Earring",
		right_ear="Psystorm Earring",
		left_ring="Icesoul Ring",
		right_ring="Sangoma Ring",
		back="Toro Cape"}
	
    sets.midcast_DarkMagic = {main="Lehbrailg +2",sub="Arbuda Grip",ammo="Hasty Pinion",
        head="Appetence Crown",neck="Aesir Torque",ear1="Hirudinea Earring",ear2="Loquacious Earring",
        body="Hedera Cotehardie",hands="Ayao's Gages",ring1="Balrahn's Ring",ring2="Excelsis Ring",
        back="Merciful Cape",waist="Goading Belt",legs="Auspex Slops",feet="Umbani Boots"}
     
    sets.midcast_EnfeeblingMagic = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Savant's Treatise",
        head="Artsieq Hat",neck="Imbodla Necklace",ear1="Lifestorm Earring",ear2="Psystorm Earring",
        body="Hagondes Coat",hands="Lurid Mitts",ring1="Sangoma Ring",ring2="Maquette Ring",
        back="Refraction Cape",waist="Ornate ROpe",legs="Artsieq hose",feet="Artsieq Boots"}
     
    sets.midcast_Impact = {main="Lehbrailg +2",sub="Wizzan Grip",ammo="Witchstone",
        neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Novio Earring",
        hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Icesoul Ring",body="Hagondes Coat",
        back="Searing Cape",waist="Maniacus Sash",legs="Hagondes Pants",feet="Umbani Boots"}
     
    sets.midcast_Embrava = {main="Kirin's Pole",sub="Fulcio Grip",ammo="Savant's Treatise",
        head="Svnt. Bonnet +2",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
        body="Anhur Robe",hands="Savant's Bracers +2",
        back="Merciful Cape",waist="Cascade Belt",legs="Shedir Seraweels",feet="Rubeus Boots"}
		
	sets.midcast_Regen = {main="Bolelabunga",ammo="Savant's Treatise",
        head="Svnt. Bonnet +2",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
        body="Anhur Robe",hands="Savant's Bracers +2",
        back="Merciful Cape",waist="Cascade Belt",legs="Shedir Seraweels",feet="Rubeus Boots"}
     
    sets.midcast_EnhancingMagic = {main="Kirin's Pole",sub="Fulcio Grip",ammo="Incantor Stone",
        head="Svnt. Bonnet +2",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
        body="Anhur Robe",hands="Gendewitha Gages",
        back="Swith Cape",waist="Ninurta's Sash",legs="Artsieq hose",feet="Peda. Loafers"}
     
    sets.precast_Stun = {main="Apamajas II",sub="Mephitis Grip",ammo="Inacantor Stone",
        head="Nahtirah Hat",neck="Eddy Necklace",ear1="Lifestorm Earring",ear2="Psystorm Earring",
        body="Hedera Cotehardie",hands="Gendewitha Gages",ring1="Sangoma Ring",ring2="Maquette Ring",
        back="Swith Cape",waist="Goading Belt",legs="Artsieq Hose",feet="Peda. Loafers"}
         
     
    sets.midcast_Cure = {main="Tamaxchi",sub="genbu's Shield",head="Hyksos Khat +1",neck="Healing Torque",
    body="Heka's Kalasiris",hands="Bokwus Gloves",back="Oretanis's Cape",legs="Scholar's Pants",
	feet="Peda. Loafers",ring1="Sirona's Ring",ring2="Ephedra Ring",ear1="Beatific Earring",
	Ear2="Lifestorm Earring"}
     
    sets.midcast_Helix = {main="Lehbrailg +2",sub="Wize Grip",ammo="Witchstone",
        head="Hagondes Hat",neck="Stoicheion Medal",ear1="Hecate's Earring",ear2="Friomisi Earring",
        body="Hagondes Coat",hands="Hagondes Cuffs +1",ring1="Maquette Ring",ring2="Dark Ring",
        back="Toro Cape",waist="Maniacus Sash",legs="Hagondes Pants +1",feet="Umbani Boots"}
     
    sets.midcast_Stoneskin = {main="Kirin's Pole",neck="Stone Gorget",waist="Siegel Sash",legs="Shedir Seraweels"}
     
    sets.Obi = {}
    sets.Obi.Fire = {waist='Karin Obi',back='Twilight Cape',lring='Zodiac Ring'}
    sets.Obi.Earth = {waist='Dorin Obi',back='Twilight Cape',lring='Zodiac Ring'}
    sets.Obi.Water = {waist='Suirin Obi',back='Twilight Cape',lring='Zodiac Ring'}
    sets.Obi.Wind = {waist='Furin Obi',back='Twilight Cape',lring='Zodiac Ring'}
    sets.Obi.Ice = {waist='Hyorin Obi',back='Twilight Cape',lring='Zodiac Ring'}
    sets.Obi.Thunder = {waist='Rairin Obi',back='Twilight Cape',lring='Zodiac Ring'}
    sets.Obi.Light = {waist='Korin Obi',back='Twilight Cape',lring='Zodiac Ring',main="Chatoyant Staff"}
    sets.Obi.Dark = {waist='Anrin Obi',back='Twilight Cape',lring='Zodiac Ring'}
     
    sets.staves = {}
     
    sets.staves.damage = {}
    sets.staves.damage.Thunder = {main="Apamajas I"}
    sets.staves.damage.Fire = {main="Atar I"}
     
    sets.staves.accuracy = {}
    sets.staves.damage.Thunder = {main="Apamajas II"}
    sets.staves.damage.Ice = {main="Vourukasha II"}
     
    stuntarg = 'Shantotto'
 
 
end
 
function precast(spell,action)
    if spell.skill=='Elemental Magic' then
		if buffactive.darkarts or buffactive.Addendumblack then
        cast_delay(0.1)
        set_combine(sets['precast_FastCast'],{
			head="Peda. M.Board +1",})		
		else
        cast_delay(0.1)
        equip(sets['precast_FastCast'])	
		end
    elseif spell.english == 'Stun' then
        cast_delay(0.1)
        equip(sets['precast_Stun'])
        if not buffactive.thunderstorm then
            add_to_chat(8,'--------- Thunderstorm is down ---------')
        elseif not buffactive.klimaform then
            add_to_chat(8,'----------- Klimaform is down -----------')
        end
    else
        equip(sets['precast_FastCast'])
        cast_delay(0.1)
    end
end
 
function pretarget(spell)
    if spell.name == 'Regen V' and spell.target.type and spell.target.type == 'PLAYER' and not buffactive.perpetuance and not spell.target.charmed and not pianissimo_cycle then
        cancel_spell()
        perp_cycle = true
        send_command('input /ja "Perpetuance" <me>;wait 1.5;input /ma "'..spell.name..'" '..spell.target.name..';')
        return
    end
    if spell.name ~= 'Perpetuance' then
        perp_cycle = false
    end
end 
 
function midcast(spell,action)
    if string.find(spell.english,'Cur') then
        equip(sets.midcast_Cure)
        if spell.element == world.weather_element or spell_element == world.day_element then
            equip({main="Chatoyant Staff"},sets.Obi[spell.element])
        end
        if buffactive.rapture then
            equip({head="Savant's Bonnet +2"})
        end
    elseif spell.english == 'Impact' then
        local tempset = sets['midcast_Impact']
        tempset['body'] = 'Twilight Cloak'
        tempset['head'] = empty
        equip(tempset)
    elseif spell.skill=="Elemental Magic" then
        if string.find(spell.english,'helix') then
            equip(sets['midcast_Helix'])
			if buffactive.thunderstorm then
            equip({waist="Rairin Obi"})
			elseif buffactive.hailstorm then
			equip({waist="Hyorin Obi"})
			elseif buffactive.windstorm then
			equip({waist="Furin Obi"})
			elseif buffactive.rainstorm then
			equip({waist="Suirin Obi"})
			elseif buffactive.firestorm then
			equip({waist="Karin Obi"})
			elseif buffactive.sandstorm then
			equip({waist="Dorin Obi"})
			elseif buffactive.voidstorm then
			equip({waist="Anrin Obi"})
			elseif buffactive.aurorastorm then
			equip({waist="Korin Obi"})
			end
        else
			equip(sets.midcast_ElementalMagic[sets.midcast_ElementalMagic.index[midcast_ElementalMagic_ind]])
			if buffactive.thunderstorm then
            equip({waist="Rairin Obi"})
			elseif buffactive.hailstorm then
			equip({waist="Hyorin Obi"})
			elseif buffactive.windstorm then
			equip({waist="Furin Obi"})
			elseif buffactive.rainstorm then
			equip({waist="Suirin Obi"})
			elseif buffactive.firestorm then
			equip({waist="Karin Obi"})
			elseif buffactive.sandstorm then
			equip({waist="Dorin Obi"})
			elseif buffactive.voidstorm then
			equip({waist="Anrin Obi"})
			elseif buffactive.aurorastorm then
			equip({waist="Korin Obi"})
			end
        end
	
        if buffactive.ebullience then
            equip({head="Savant's Bonnet +2"})
        end
        if buffactive.klimform then
            equip ({feet="Savant's Loafers +2"})
        end
    elseif spell.skill=="Enfeebling Magic" then
		equip(sets.midcast_EnfeeblingMagic)

	 
	 
    elseif spell.english == 'Stoneskin' then
        equip(sets['midcast_Stoneskin'])
    elseif spell.skill == 'Enhancing Magic' then
        if spell.english == 'Embrava' then
            equip(sets['midcast_Embrava'])
            if not buffactive.perpetuance then
                add_to_chat(8,'--------- Perpetuance is down ---------')
            end
            if not buffactive.accession then
                add_to_chat(8,'--------- Accession is down ---------')
            end
            if not buffactive.penury then
                add_to_chat(8,'--------- Penury is down ---------')
            end
        elseif spell.english == 'Regen V' then
             equip(sets['midcast_Regen'])
				add_to_chat(8,'--------- Regen Test---------')
            if not buffactive.perpetuance then
                add_to_chat(8,'--------- Perpetuance is down ---------')
            end
            if not buffactive.accession then
                add_to_chat(8,'--------- Accession is down ---------')
            end
            if not buffactive.penury then
                add_to_chat(8,'--------- Penury is down ---------')
            end
		
        elseif buffactive.perpetuance then
            equip(sets['midcast_EnhancingMagic'],{hands="Savant's Bracers +2"})
        else
            equip(sets['midcast_EnhancingMagic'])
        end
	elseif spell.english == 'Stun' then
	windower.send_command('@wait 5;input /ja "Alacrity" <me>')
		if buffactive.haste and buffactive.march then 
			equip(sets.ExtremeStun)
		elseif Armor =="Lehbrailg" and buffactive.alacrity then
			equip(sets.ExtremeStun)
		elseif buffactive.haste and not buffactive.march then
					equip(sets.aftercast_IdleStun)
			send_command('input /p -------March is Down-------')
		elseif buffactive.march and not buffactive.haste then
					equip(sets.aftercast_IdleStun)
			send_command('input /p -------Haste is Down-------')			
		else
			equip(sets.aftercast_IdleStun)
			send_command('input /p -------No Magic Haste [ GET IT SORTED ]-------  Stunning Target is gunna suck')
		end
    end
     
    if spell.english == 'Sneak' then
        send_command('@wait 1.8;cancel 71;')
    end
end    
 
function aftercast(spell,action)
    		if Armor == '119' then
			equip(sets.aftercast_Idle119)
			elseif Armor == 'Stun' then
			equip(sets.aftercast_IdleStun)
			else
                Idle()
			end
     
    if spell.english == 'Sleep' or spell.english == 'Sleepga' then
        send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
    elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
        send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
    elseif spell.english == 'Break' or spell.english == 'Breakga' then
        send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
	elseif spell.enflish == 'Stun' then
		send_command('@wait 4;input /ja "Alacrity" <me>')
    end
end
 
function status_change(new,action)
        if new=='Idle' then
			if Armor == '119' then
			equip(sets.aftercast_Idle119)
			elseif Armor == 'Stun' then
			equip(sets.aftercast_IdleStun)
			elseif Armor == 'Lehbrailg' then
			equip(sets.ExtremeStun)
			else
                Idle()
			end
        elseif new=='Resting' then
                equip(sets.Resting)
        end
			if Armor == 'PDT' then
		equip(sets.PDT)
		end
end

function Idle()
	if buffactive['Sandstorm'] then
		send_command('@wait 1;input /echo ------- Sandstorm Move Wear Activated -------')
       
			equip(sets.aftercast_Move)
	elseif world.time >= (17*60) or world.time <= (7*60) then -- night time
			equip(sets.aftercast_IdleNight)
	else
			equip(sets.aftercast_IdleDay)
		end
	end
	
 
 
function buff_change(buff,gain_or_loss)
        if buff == "Sandstorm" then
                Idle()
        end
end
 
function pet_midcast(spell,action)
end
 
function pet_aftercast(spell,action)
end
 
     
	
	
function self_command(command)
    if command == 'M2' then
        midcast_ElementalMagic_ind = midcast_ElementalMagic_ind +1
        if midcast_ElementalMagic_ind > #sets.midcast_ElementalMagic.index then midcast_ElementalMagic_ind = 1 end
        send_command('@input /echo <----- TP Set changed to '..sets.midcast_ElementalMagic.index[midcast_ElementalMagic_ind]..' ----->')
        equip(sets.midcast_ElementalMagic[sets.midcast_ElementalMagic.index[midcast_ElementalMagic_ind]])
	
	elseif command == 'C7' then -- PDT Toggle --
		if Armor == 'PDT' then
			Armor = 'none'
			add_to_chat(8,'PDT Set: [Unlocked]')
		else
			Armor = 'PDT'
			add_to_chat(158,'PDT Set: [Locked]')
		end
		status_change(player.status)
	elseif command == 'C15' then -- 119 Toggle --
		if Armor == '119' then
			Armor = 'None'
			add_to_chat(8,'119 Set: [Unlocked]')
		else
			Armor = '119'
			add_to_chat(158,'119 Set: [Locked]')
		end
		status_change(player.status)
		
	elseif command == 'C30' then -- 119 Toggle --
		if Armor == 'Lehbrailg' then
			Armor = 'None'
			add_to_chat(8,'Extreme Stun: [Off]')
		else
			Armor = 'Lehbrailg'
			add_to_chat(158,'Extreme Stun: [On]')
		end
		status_change(player.status)		
		
	elseif command == 'Stun' then -- Stun Idle Toggle --
		if Armor == 'Stun' then
			Armor = 'None'
			add_to_chat(8,'Stun Set: [Unlocked]')
		else
			Armor = 'Stun'
			add_to_chat(158,'Stun Set: [Locked]')
		end
		status_change(player.status)
	end
end
 
 
-- This function is user defined, but never called by GearSwap itself. It's just a user function that's only called from user functions. I wanted to check the weather and equip a weather-based set for some spells, so it made sense to make a function for it instead of replicating the conditional in multiple places.
 
function weathercheck(spell_element,set)
    if spell_element == world.weather_element or spell_element == world.day_element then
        equip(set,sets['Obi_'..spell_element])
    else
        equip(set)
    end
end


This uses various ets based on buffs, screams at people for dropping haste / marches (cos people are *** stupid) or if you are dual boxing it's a nice little reminder.

Has like 3 stun sets?

Also uses alacrity after you cast stun if it's up, that could be an issue if you want rid so feel free to delete that part.
 Valefor.Ophannus
Offline
Server: Valefor
Game: FFXI
user: Ophannus
Posts: 241
By Valefor.Ophannus 2015-01-09 12:53:45
Link | Quote | Reply
 
Do you think the problem might be syntax/format?

his has
Code
 if string.find(spell.english,'Cur') then
          if spell.element == world.weather_element
          


and mine has
Code
if spell.action_type == 'Magic' then
if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
if world.weather_element == 'Light'


Is mine a deprecated format?
 Cerberus.Conagh
Offline
Server: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2015-01-09 13:07:13
Link | Quote | Reply
 
Valefor.Ophannus said: »
Do you think the problem might be syntax/format?

his has
Code
 if string.find(spell.english,'Cur') then
          if spell.element == world.weather_element
          


and mine has
Code
if spell.action_type == 'Magic' then
if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
if world.weather_element == 'Light'


Is mine a deprecated format?

No and his would equip ***on Cursna.
Code
if spell.action_type == 'Magic' then
        if spell.skill == 'Healing Magic' then
            if spell.english:startswith('Cura') then
				if spell.element == world.weather_element
					return 'Weather'
				else
					return 'Cure'
				end
			end
		end
	end


Sets should be named~
Code
sets.midcast['Healing Magic']['Cure']
sets.midcast['Healing Magic']['Weather']


Amended as the code was wrong.
 Valefor.Ophannus
Offline
Server: Valefor
Game: FFXI
user: Ophannus
Posts: 241
By Valefor.Ophannus 2015-01-09 13:36:44
Link | Quote | Reply
 
So should I copypasta that code and see if it works?
 Cerberus.Conagh
Offline
Server: Cerberus
Game: FFXI
user: onagh
Posts: 3189
By Cerberus.Conagh 2015-01-09 13:39:34
Link | Quote | Reply
 
Valefor.Ophannus said: »
So should I copypasta that code and see if it works?

That was sorta the point :o
First Page 2 3 ... 46 47 48 ... 182 183 184
Log in to post.