|
Gearswap Support Thread
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2014-11-30 18:03:49
For the same issues I explained above, no. Additionally, you would need to check for the "more specific" requirements first, i.e. you have to check if Curaga V is appropriate first, otherwise it'll just use Curaga III, because if the player's HP is less than 46%, then it will also be less than 81%.
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-11-30 18:11:52
Code function pretarget(spell)
if T{"Cure","Cure II","Cure III","Cure IV"}:contains(spell.name) and spell.target.type == 'PLAYER' and not spell.target.charmed and AutoAga == 1 then
target_count = 0
for i=1,party.count
if party[i].hpp<80 then
target_count = target_count + 1
end
end
if target_count > 1 then
cancel_spell()
send_command(';input /ma "Curaga III" '..spell.target.name..';')
end
end
end
Target_count +1, could this be changed to +2 to make it only use it if 3 players in your party have low hp?
EDIT:: It appears Player Positions (x and y map co-ordinates) are also recordable, is it possible to map players who's hp is within these catagories AND are within say ~ 7 distance for curaga to hit them all?
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2014-11-30 18:14:55
If you want to change the condition, you would change it the 'if target_count > 1 then' to 'if target_count > 2 then', or even something like 'if target_count > party.count/2 then' if you wanted it to scale to your party in some way.
The target_count = target_count + 1 is a counter for the number of players whose HPP is less than 80.
Edit: I haven't played with x,y,z since they were fixed, so I'm not sure what it would look like, but yes, theoretically, you should be able to.
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-11-30 18:19:36
Ragnarok.Flippant said: »If you want to change the condition, you would change it the 'if target_count > 1 then' to 'if target_count > 2 then', or even something like 'if target_count > party.count/2 then' if you wanted it to scale to your party in some way.
The target_count = target_count + 1 is a counter for the number of players whose HPP is less than 80.
Edit: I haven't played with x,y,z since they were fixed, so I'm not sure what it would look like, but yes, theoretically, you should be able to.
Interesting I will certainly be trying to implement this then.
I just copied and pasted your Cure rule in and it says that
Line 5~ do expected near if.
there is an extra END in it also
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-11-30 18:24:02
Code function pretarget(spell)
if T{"Cure","Cure II","Cure III","Cure IV"}:contains(spell.name) and spell.target.type == 'PLAYER' and not spell.target.charmed and AutoAga == 1 then
target_count = 0
for i=1,party.count do
if party[i].hpp<80 then
target_count = target_count + 1
end
end
if target_count > 1 then
cancel_spell()
send_command(';input /ma "Curaga III" '..spell.target.name..';')
end
end
end
I assume the do was there?
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2014-11-30 18:25:43
Yup yup, I always forget the 'do' e_e
Don't see the extra end though (one is for the for statement).
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-11-30 18:28:41
Ragnarok.Flippant said: »Yup yup, I always forget the 'do' e_e
Don't see the extra end though (one is for the for statement).
Code function pretarget(spell)
if T{"Cure","Cure II","Cure III","Cure IV"}:contains(spell.name) and spell.target.type == 'PLAYER' and not spell.target.charmed and AutoAga == 1 then
target_count = 0
for i=1,party.count do
if party[i].hpp<80 then
target_count = target_count + 1
end
end
if target_count > 1 then
cancel_spell()
send_command(';input /ma "Curaga III" '..spell.target.name..';')
end
end
end
it was due to the missing do! lol.
So looking at it, the if HP rule is being checked only for the count, what if I wanted it to Differentiate between curaga 4 and 3 using HP again?
Your rule obviously works very well for just Curaga 3, but I don't see a direct way to backwards compose this to work for both, unless I used a different variable to Target_countCuraga3 or something?
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-11-30 18:33:26
Code function pretarget(spell)
if T{"Cure","Cure II","Cure III","Cure IV"}:contains(spell.name) and spell.target.type == 'PLAYER' and not spell.target.charmed and AutoAga == 1 then
target3_count = 0
target4_count = 0
for i=1,party.count do
if party[i].hpp<50 then
target4_count = target4_count + 1
elseif party[i].hpp<80 then
target3_count = target3_count + 1
end
end
if target3_count > 1 then
cancel_spell()
send_command(';input /ma "Curaga III" '..spell.target.name..';')
elseif target4_count > 1 then
cancel_spell()
send_command(';input /ma "Curaga IV" '..spell.target.name..';')
end
end
end
Would this work?
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2014-11-30 19:44:35
Technically, but it probably won't give you what you want to happen in certain scenarios.
First, Curaga V should take precedence whenever possible. As it stands now, if you have two people with 40% HP and two people with 70% HP, Curaga III will go off instead.
Second potential issue, if you have one person with 40% HP and one person with 70% HP, what do you want to happen? As it stands, it won't use any curaga, because both counters are only at 1. If you want it to use Curaga III, then you may want to check if target3_count+target4_count > 1. Or, you may want to change how your counters work so that a target with less than 50% HP would count towards both.
But maybe you want it so that if even one person benefits from the higher tier, you want to use that one? Maybe even based on how much MP you have left, and how much you estimate your return will be (well, the latter is highly dependent on player position, so that might not be something you want to consider until later).
Whatever you want should be technically possible, it's just a matter of being able to explain what you want enough to make sure you cover any situation. If you can think of as many possible scenarios and what action you want to take based on those conditions, it's easier to map the control flow.
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-11-30 19:55:34
Ragnarok.Flippant said: »Technically, but it probably won't give you what you want to happen in certain scenarios.
First, Curaga V should take precedence whenever possible. As it stands now, if you have two people with 40% HP and two people with 70% HP, Curaga III will go off instead.
Second potential issue, if you have one person with 40% HP and one person with 70% HP, what do you want to happen? As it stands, it won't use any curaga, because both counters are only at 1. If you want it to use Curaga III, then you may want to check if target3_count+target4_count > 1. Or, you may want to change how your counters work so that a target with less than 50% HP would count towards both.
But maybe you want it so that if even one person benefits from the higher tier, you want to use that one? Maybe even based on how much MP you have left, and how much you estimate your return will be (well, the latter is highly dependent on player position, so that might not be something you want to consider until later).
Whatever you want should be technically possible, it's just a matter of being able to explain what you want enough to make sure you cover any situation. If you can think of as many possible scenarios and what action you want to take based on those conditions, it's easier to map the control flow.
Hmm I see you're point.
I would want it to use the lower Curaga and the allow a Top off cure after wards etc (that can be done manually obviously).
At this stage MP return is not a concern, it's mainly for when Dual Boxing etc and I don't want to have to be hitting 8 different macros for for cures.
Personally I favor overcure, but if say ~
I had 2+ players at 80% and one above say 60, I'd want Curaga 3.
If I had 1 player at 75% and 2 at 60, I'd want curaga 3.
If I had 1 at 75 and 2 at 50, I'd want curaga 4 to full hp.
if it was 4+ player's I would say ~ Curaga 3 if all are above 60% but curaga 4 if one isn't.
Anything else can be ignored ~
It's getting complicated but I do see what you meant (btw I looked into POS checks and it does seem to work, however it's nailing the math for distance atm so I'll put that to one side.)
I don't want it for curaga 5 as I never use it and Curaga 4 is a potent spell already.
I appreciate this probably aint the easiet thing to work out so thanks for the assist!
Quetzalcoatl.Valli
Server: Quetzalcoatl
Game: FFXI
Posts: 1420
By Quetzalcoatl.Valli 2014-12-01 03:05:23
Ok, I um, sorta got it to work...
It does the idle, the tag, the tp, the ws, all nicely. but I don't know what this means, or what it is.
"Mote-Libs: Cycle: Unknown field [targetmode]"
It should be the ACC/Mod/PDT thing right?
This ***really makes my head hurt.
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-12-04 10:06:53
So as of 3 weeks, I have on the odd occasion experienced my character locking up and refusing to cast any spells until I UNLOAD GEARSWAP and reload it.
here is the WHM File (The curaga stuff is new so this is not the area causing the issue)
I've added a if midaction part to the sublimation thinking it might be due to this. however I don't see any error's that should cause it to lock.
Any assistance would be appreciated.
EDIT:: Nevermind spotted it....
Phoenix.Skyfire
Server: Phoenix
Game: FFXI
Posts: 116
By Phoenix.Skyfire 2014-12-04 22:34:04
Is there a code that will auto lockstyle into a predefined set when you zone into a new area? Without having to press any buttons.
Leviathan.Syagin
Server: Leviathan
Game: FFXI
Posts: 999
By Leviathan.Syagin 2014-12-05 05:40:27
Been practicing learning to write GS lingo since the combo of Mote and Conagh are the perfect WHM G.S. That being said I'm working on gaining some clarity I've been trying to understand how I would get a precast > Midcast function to work in sync:
>>sets.precast.FC.Curaga =<<
Does this require a "Function command" to get it to work or No? A visual template would be appreciated if it's not to much to ask.
At least i can have a visual to see rinse and repeat.
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2014-12-06 21:10:13
Is there a code that will auto lockstyle into a predefined set when you zone into a new area? Without having to press any buttons.
As far as I know, GS doesn't handle the zone event, but you can register the event yourself
Code windower.register_event('Zone change', function(new,old)
send_command('wait 2; gs equip lockstyle_set; input /lockstyle on')
end)
Didn't test this. It might be 'zone change'; the Windower documentation has it capitalized, but it's the only one that's capitalized, and I am too lazy to log in to test. I also am not sure if it fires immediately when zoning (black screen, can't do anything), or after the screen already loads. Guessing the latter, but if it's the former, might need to pump up the wait time.
Been practicing learning to write GS lingo since the combo of Mote and Conagh are the perfect WHM G.S. That being said I'm working on gaining some clarity I've been trying to understand how I would get a precast > Midcast function to work in sync:
>>sets.precast.FC.Curaga =<<
Does this require a "Function command" to get it to work or No? A visual template would be appreciated if it's not to much to ask.
At least i can have a visual to see rinse and repeat.
I am not quite sure what you mean, because you seem to imply that you are attempting to avoid functions, which isn't possible. Your whole GS file should be a list of functions.
Functions are basically a series of instructions that are executed each time they are called, and in GS, they are typically called by certain events. GS maps out most of these events automatically, so you just need to write the functions that go with these events; but you can, additionally, register your own events and make your own functions as you please.
Now, I don't know if you're looking to use Mote's templates or not. If you are, then you will have to read his wiki (https://github.com/Kinematics/GearSwap-Jobs/wiki) for instructions, because he is using GS's reserved functions in his structure already and you will be required to use functions that he's assigned for user use instead.
If you are not:
The most basic functions that you will want to cover is:
get_sets(): This is called only once: when your GS file is loaded. This is where you list your gear sets, and where most people also list global variables.
precast([ table] spell): This is called immediately after a spell is triggered but before it is started. Spells can also be canceled at this level.
midcast([ table] spell): This is called immediately after a spell is started.
aftercast([ table] spell): This is called immediately after a spell is completed.
status_change([string] new,[string]old): This is called whenever your status changes (engaged,idle,resting,dead).
buff_change([string]buff,[boolean]gain): This is called whenever you gain or lose a buff.
self_command([string]command): This is called whenever you issue a command through gs using //gs c [command].
Inside the beta_examples_and_information folder (in the GS addon folder) is an excel with a full list of event-prompted functions (for you to make), built-in functions (for you to use), and both local (spell tables--only available within spell-related functions) and global (everything else--available at any time) variables that you have access to. There are also many rudimentary examples of GS files for you to take a look at, although they probably have not been updated in a while and may use deprecated code.
I believe Mote also wrote a basic guide somewhere here, but I don't have a link. Maybe someone who knows could provide that.
Server: Ragnarok
Game: FFXI
Posts: 82
By Ragnarok.Worldslost 2014-12-06 21:17:58
I cant seem to get cancel conflicting buffs to work, any suggestions or did I get the incorrect code. Code -- Buff utility functions.
-------------------------------------------------------------------------------------------------------------------
local cancel_spells_to_check = S{'Sneak', 'Stoneskin', 'Spectral Jig', 'Trance', 'Monomi: Ichi', 'Utsusemi: Ichi'}
local cancel_types_to_check = S{'Waltz', 'Samba'}
-- Function to cancel buffs if they'd conflict with using the spell you're attempting.
-- Requirement: Must have Cancel addon installed and loaded for this to work.
function cancel_conflicting_buffs(spell, action, spellMap, eventArgs)
if cancel_spells_to_check:contains(spell.english) or cancel_types_to_check:contains(spell.type) then
if spell.action_type == 'Ability' then
local abil_recasts = windower.ffxi.get_ability_recasts()
if abil_recasts[spell.recast_id] > 0 then
add_to_chat(123,'Abort: Ability waiting on recast.')
eventArgs.cancel = true
return
end
elseif spell.action_type == 'Magic' then
local spell_recasts = windower.ffxi.get_spell_recasts()
if spell_recasts[spell.recast_id] > 0 then
add_to_chat(123,'Abort: Spell waiting on recast.')
eventArgs.cancel = true
return
end
end
if spell.english == 'Spectral Jig' and buffactive.sneak then
cast_delay(0.2)
send_command('cancel sneak')
elseif spell.english == 'Sneak' and spell.target.type == 'SELF' and buffactive.sneak then
send_command('cancel sneak')
elseif spell.english == ('Stoneskin') then
send_command('@wait 1.0;cancel stoneskin')
elseif spell.english:startswith('Monomi') then
send_command('@wait 1.7;cancel sneak')
elseif spell.english == 'Utsusemi: Ichi' then
send_command('@wait 1.7;cancel copy image,copy image (2)')
elseif (spell.english == 'Trance' or spell.type=='Waltz') and buffactive['saber dance'] then
cast_delay(0.2)
send_command('cancel saber dance')
elseif spell.type=='Samba' and buffactive['fan dance'] then
cast_delay(0.2)
send_command('cancel fan dance')
end
end
end
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-12-06 21:29:47
Code if abil_recasts[spell.recast_id] > 0 then
add_to_chat(123,'Abort: Ability waiting on recast.')
eventArgs.cancel = true
return
Should probably do ~
Code if spell.type == 'JobAbility' and windower.ffxi.get_ability_recasts()[spell.recast_id] > 0 then
add_to_chat(123,'Abort: Ability waiting on recast.')
Referring it to check something then check something within a rule but then nbit adding () for the function contains etc is whats causing the issue.
I use this on WHM and it works 100%
Server: Ragnarok
Game: FFXI
Posts: 82
By Ragnarok.Worldslost 2014-12-06 23:20:10
if spell.type == 'JobAbility' and windower.ffxi.get_ability_recasts()[spell.recast_id] > 0 then
add_to_chat(123,'Abort: Ability waiting on recast.')
Its not saying the lua is broken and on debugmode I dont even see a reference to this, all other events seems to be taking place. This is the code with your addendum. Code function cancel_conflicting_buffs(spell, action, spellMap, eventArgs)
if cancel_spells_to_check:contains(spell.english) or cancel_types_to_check:contains(spell.type) then
if spell.action_type == 'Ability' then
local abil_recasts = windower.ffxi.get_ability_recasts()
if spell.type == 'JobAbility' and windower.ffxi.get_ability_recasts()[spell.recast_id] > 0
then
add_to_chat(123,'Abort: Ability waiting on recast.')
eventArgs.cancel = true
return
end
elseif spell.action_type == 'Magic' then
local spell_recasts = windower.ffxi.get_spell_recasts()
if spell_recasts[spell.recast_id] > 0
then
add_to_chat(123,'Abort: Spell waiting on recast.')
eventArgs.cancel = true
return
end
end
Server: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2014-12-07 01:01:06
This may have been answered before and I missed it, however...
Awhile back, I had been trying to re-work the downgrade function of Curing Waltz included in Mote's libs into a downgrading Cure function. I came up with the following, but it doesn't change anything about any cures. It doesn't throw any errors, but it won't put any messages in the chat log, won't downgrade based on HP and won't downgrade based on MP. Effectively, it does nothing and seems like it isn't being triggered to begin with. I've probably taken something out of the Waltz function that is just breaking the entire thing, but I'm not sure what it's missing. Any help would be appreciated! Here's the paste:
http://pastebin.com/MErxfsQJ
Thank you all.
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2014-12-07 02:00:53
This may have been answered before and I missed it, however...
Awhile back, I had been trying to re-work the downgrade function of Curing Waltz included in Mote's libs into a downgrading Cure function. I came up with the following, but it doesn't change anything about any cures. It doesn't throw any errors, but it won't put any messages in the chat log, won't downgrade based on HP and won't downgrade based on MP. Effectively, it does nothing and seems like it isn't being triggered to begin with. I've probably taken something out of the Waltz function that is just breaking the entire thing, but I'm not sure what it's missing. Any help would be appreciated! Here's the paste:
http://pastebin.com/MErxfsQJ
Thank you all.
Well, without much information, and after a brief look,
Code local cureMPCost = {['Cure'] = 8, ['Cure II'] = 24, ['Cure III'] = 46, ['Cure IV'] = 88, ['Cure V'] = 135, ['Cure VI'] = 230}
local mpCost = cureMPcost
This makes no sense, because mpCost is now pointing to a table, then you try to do math with it. You want mpCost = cureMPcost[preferredCure].
As to whether that's your only issue or not, I don't know and that's a lot of code to look through without any hints as to what may be wrong. I recommend placing print('blah') in places to make sure it's hitting certain conditions. That way, you can narrow it down to the point that it's failing.
Ragnarok.Worldslost said: »I cant seem to get cancel conflicting buffs to work, any suggestions or did I get the incorrect code. Code -- Buff utility functions.
-------------------------------------------------------------------------------------------------------------------
local cancel_spells_to_check = S{'Sneak', 'Stoneskin', 'Spectral Jig', 'Trance', 'Monomi: Ichi', 'Utsusemi: Ichi'}
local cancel_types_to_check = S{'Waltz', 'Samba'}
-- Function to cancel buffs if they'd conflict with using the spell you're attempting.
-- Requirement: Must have Cancel addon installed and loaded for this to work.
function cancel_conflicting_buffs(spell, action, spellMap, eventArgs)
if cancel_spells_to_check:contains(spell.english) or cancel_types_to_check:contains(spell.type) then
if spell.action_type == 'Ability' then
local abil_recasts = windower.ffxi.get_ability_recasts()
if abil_recasts[spell.recast_id] > 0 then
add_to_chat(123,'Abort: Ability waiting on recast.')
eventArgs.cancel = true
return
end
elseif spell.action_type == 'Magic' then
local spell_recasts = windower.ffxi.get_spell_recasts()
if spell_recasts[spell.recast_id] > 0 then
add_to_chat(123,'Abort: Spell waiting on recast.')
eventArgs.cancel = true
return
end
end
if spell.english == 'Spectral Jig' and buffactive.sneak then
cast_delay(0.2)
send_command('cancel sneak')
elseif spell.english == 'Sneak' and spell.target.type == 'SELF' and buffactive.sneak then
send_command('cancel sneak')
elseif spell.english == ('Stoneskin') then
send_command('@wait 1.0;cancel stoneskin')
elseif spell.english:startswith('Monomi') then
send_command('@wait 1.7;cancel sneak')
elseif spell.english == 'Utsusemi: Ichi' then
send_command('@wait 1.7;cancel copy image,copy image (2)')
elseif (spell.english == 'Trance' or spell.type=='Waltz') and buffactive['saber dance'] then
cast_delay(0.2)
send_command('cancel saber dance')
elseif spell.type=='Samba' and buffactive['fan dance'] then
cast_delay(0.2)
send_command('cancel fan dance')
end
end
end
The obvious questions:
1. Are you calling this function (or is it called in Mote's includes)?
2. Do you have the Cancel addon loaded ( not the plugin)?
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-12-07 18:52:10
Flippant, I have something that's been bugging me..........
My gearswap file seems to lock up for no reason (happens when I spam spells) shortcuts still work, however normal manual selection etc doesn't
Code:
Code function get_sets()
send_command('input /macro book 7;wait .1;input /macro set 1') -- Change Default Macro Book Here --
curaga_benchmark = 30
safe_benchmark = 70
sublimation_benchmark = 30
AutoAga = 1
Sublimation = 1
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'
sets.TP = {}
sets.TP.Low = {head="Gendewitha Caubeen",neck="Asperity Necklace",ear1="Brutal Earring",
ear2="Suppanomi",body="Theophany briault +1",hands="Dynasty Mitts",ring1="Rajas ring",
ring2="Patricius Ring",back="Cheviot Cape",waist="Goading Belt",legs="Artsieq Hose",feet="Theo. Duckbills +1"}
sets.TP.Mid = {}
sets.TP.High = {}
sets.engaged = {}
sets.engaged.healing = {}
sets.engaged.healing.Curaga = {}
sets.engaged.healing.Cure = {}
sets.engaged.healing.Weather = {}
sets.ws = {}
sets.ws['Realmrazer'] = {head="Artsieq Hat",belt="Thunder Belt",necl="Nuna Gorget +1",
body="Theophany briault +1",hands="Dynasty Mitts",ring1="Levia. Ring",ring2="Aquasoul Ring",back="Refraction Cape",
belt="Thunder Belt",legs="Artsieq Hose",feet="Theo. Duckbills +1"}
sets.ws['Flash Nova'] = {head="Nahtirah Hat",neck="Eddy Necklace",ear1="Friomisi Earring",
ear2="Hecate's Earring",body="Bokwus Robe",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Songoma Ring",
back="Toro Cape",waist="Aswang Sash",legs="Theophany Pantaloons",feet="Weath. Souliers +1"}
sets.aftercast = {}
sets.aftercast.night = {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="Nares Trews",feet="Theo. Duckbills +1"}
sets.aftercast.defense = {main="Terra's Staff",ammo="Incantor Stone",
head="Gendewitha Caubeen",neck="Twilight Torque",ear1="Merman's Earring",ear2="Coral Earring",
body="Theophany briault +1",hands="Gendewitha Gages",ring1="Dark ring",ring2="Patricius Ring",
back="Cheviot Cape",waist="Siegel Sash",legs="Artsieq Hose",feet="Theo. Duckbills +1"}
sets.aftercast.day = {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="Nares Trews",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="Dark ring",ring2="Woltaris Ring",
back="Cheviot Cape",waist="Siegel Sash",legs="Nares Trews",feet="Desert Boots"}
sets.aftercast.resting = {main="Chatoyant Staff",feet="Chelona Boots"}
sets.precast = {}
sets.precast.fastcast = {ammo="Imaptiens",head="Nahtirah Hat",ear1="loquacious Earring",neck="Orunmila's Torque",
body="Anhur Robe",hands="Gendewitha Gages",back="Swith Cape",legs="Artsieq Hose",feet="Chelona Boots",
waist="Witful Belt",ear2="enchanter Earring +1",ring1="Prolix Ring",ring2="Lebeche Ring"}
sets.precast.enhancing = {ammo="Imaptiens",head="Nahtirah Hat",ear1="loquacious Earring",
body="Anhur Robe",hands="Gendewitha Gages",back="Swith Cape",legs="Artsieq Hose",feet="Chelona Boots",
waist="Siegel Sash",ear2="enchanter Earring +1",ring1="Prolix Ring",ring2="Lebeche Ring"}
sets.precast.stoneskin = {ammo="Imaptiens",head="Umuthi Hat",ear1="loquacious Earring",
body="Anhur Robe",hands="Gendewitha Gages",back="Swith Cape",legs="Artsieq Hose",feet="Chelona Boots",
waist="Siegel Sash",ear2="enchanter Earring +1",ring1="Prolix Ring",ring2="Lebeche Ring"}
sets.precast.cure = {ammo="Impatiens",head="Nahtirah Hat",ear1="Loquacious Earring",
body="Heka's Kalasiris",hands="Gendewitha Gages",ring1="Prolix Ring",legs="Orsn. Pantaln. +2",
feet="Cure Clogs",waist="Witful Belt",ring2="Lebeche Ring",back="Pahtli Cape"}
sets.precast.healing = {ammo="Imaptiens",head="Nahtirah Hat",ear1="loquacious Earring",
body="Anhur Robe",hands="Gendewitha Gages",back="Ogapepo Cape +1",ring1="Veneficium Ring",legs="Orsn. Pantaln. +2",
feet="Chelona Boots",waist="Witful Belt",ring2="lebeche Ring"}
sets.midcast = {}
sets.midcast.healing = {}
sets.midcast.healing.lyna = {ammo="Incantor Stone",head="Orison Cap +2",neck="Orunmila's Torque",
ear1="loquacious Earring",ear2="Enchntr. Earring +1",body="Hedera Cotehardie",hands="Gendewitha Gages",
ring1="Prolix Ring",ring2="Lebeche Ring",back="Swith Cape",waist="Witful Belt",legs="Orison Pantaloons +2",feet="Gende. Galosh. +1"}
sets.midcast.healing.caress = {ammo="Incantor Stone",head="Orison Cap +2",neck="Orunmila's Torque",
ear1="loquacious Earring",ear2="Enchntr. Earring +1",body="Hedera Cotehardie",hands="Orison Mitts +2",
ring1="Prolix Ring",ring2="Lebeche Ring",back="Swith Cape",waist="Witful Belt",legs="Artsieq Hose",feet="Gende. Galosh. +1"}
sets.midcast.healing.cursna = {ammo="Incantor Stone",head="Orison Cap +2",neck="Malison Medallion",ear1="Loquacious Earring",
ear2="Enchntr. Earring +1",body="Hedera Cotehardie",hands="Gendewitha Gages",ring1="Ephedra Ring",ring2="Ephedra Ring",
back="Mending Cape",waist="Witful Belt",legs="Artsieq Hose",feet="Gende. Galoshes"}
sets.midcast.healing.cursnacaress = {ammo="Incantor Stone",head="Orison Cap +2",neck="Malison Medallion",ear1="Loquacious Earring",
ear2="Enchntr. Earring +1",body="Hedera Cotehardie",hands="Orison Mitts +2",ring1="Ephedra Ring",ring2="Ephedra Ring",
back="Mending Cape",waist="Witful Belt",legs="Artsieq Hose",feet="Gende. Galoshes"}
sets.midcast.healing.curaga = {ammo="Incantor Stone",
main="Tamaxchi",sub="Genbu's Shield",head="Gende. Caubeen",body="Theo. Briault +1",hands="Theo. Mitts +1",legs="Orsn. Pantaln. +2",
feet="Piety Duckbills +1",neck="Nuna Gorget +1",waist="Cascade Belt",ear2="Cmn. Earring",ear1="Lifestorm Earring",left_ring="Sirona's Ring",
right_ring="Aquasoul Ring",back="Pahtli Cape",}
sets.midcast.healing.cure = {main="Tamaxchi",head="Gendewitha caubeen",neck="Colossus's Torque",
body="Orison Bliaud +2",hands="Theo. Mitts +1",back="Mending Cape",legs="Orsn. Pantaln. +2",
ring1="Sirona's Ring", ring2="Ephedra Ring", feet="Piety Duckbills +1", waist="Bishop's Sash",
ear2="Beatific Earring", ear1="Roundel Earring"}
sets.midcast.healing.weather = {main="Chatoyant Staff",sub="Mephitis Grip",ammo="Incantor Stone",head="Gende. Caubeen",body="Orison Bliaud +2",hands="Bokwus Gloves",legs="Orsn. Pantaln. +2",
feet="Piety Duckbills +1",neck="Colossus's Torque",waist="Korin Obi",left_ear="Roundel Earring",right_ear="Beatific Earring",left_ring="Sirona's Ring",
right_ring="Ephedra Ring",back="Twilight Cape"}
sets.midcast.healing.recast = {ammo="Incantor Stone",
head="Nahtirah Hat",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Theo. briault +1",hands="Dynasty Mitts",
back="Swith Cape",waist="Goading Belt",legs="Artsieq hose",feet="Piety Duckbills +1"}
sets.midcast.enhancing = {}
sets.midcast.enhancing.raw = {main="Beneficus",ammo="Incantor Stone",
head="Umuthi Hat",neck="Colossus's Torque",ear1="Augment. Earring",ear2="Androaa Earring",
body="Hyksos Robe",hands="Dynasty Mitts",
back="Swith Cape",waist="Olympus sash",legs="Piety Pantaloons",feet="Orsn. Duckbills +2"}
sets.midcast.enhancing.recast = {ammo="Incantor Stone",
head="Nahtirah Hat",neck="Colossus's Torque",ear1="Enchanter Earring +1",ear2="Loquacious Earring",
body="Theo. briault +1",hands="Dynasty Mitts",
back="Swith Cape",waist="Goading Belt",legs="Artsieq hose",feet="Piety Duckbills +1"}
sets.midcast.enhancing.barspell = {main="Beneficus",sub="Genbu's Shield",ammo="Incantor Stone",
head="Orison Cap +2",neck="Colossus's Torque",ear1="Augment. Earring",ear2="Androaa Earring",
body="Orison Bliaud +2",hands="Orison Mitts +2",
back="Mending Cape",waist="Olympus Sash",legs="Piety Pantaloons",feet="Orison Duckbills +2"}
sets.midcast.enhancing.regen = {main="Bolelabunga", legs="Theophany pantaloons",feet="Gendewitha galoshes",
hands="Orison Mitts +2",body="Piety Briault"}
sets.midcast.enhancing.turtle = {legs="Piety Pantaloons",feet="Piety Duckbills +1"}
sets.midcast.enhancing.stoneskin = {neck="Stone Gorget",waist="Siegel Sash",legs="Haven Hose",Ear1="Earthcry Earring"}
sets.midcast.divine = {}
sets.midcast.divine.holy = {main="Lehbrailg +2",sub="Mephitis Grip",head="Nahtirah Hat",neck="Eddy Necklace",
ear1="Friomisi Earring",ear2="Hecate's Earring",body="Bokwus Robe",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Songoma Ring",
back="Toro Cape",waist="Aswang Sash",legs="Theophany Pantaloons",feet="Weath. Souliers +1"}
sets.midcast.divine.banish = {main="Lehbrailg +2",sub="Mephitis Grip",head="Nahtirah Hat",neck="Eddy Necklace",
ear1="Friomisi Earring",ear2="Hecate's Earring",body="Bokwus Robe",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Songoma Ring",
back="Toro Cape",waist="Aswang Sash",legs="Theophany Pantaloons",feet="Weath. Souliers +1"}
sets.midcast.divine.repose = {ammo="Kalboron Stone",
main="Lehbrailg +2",sub="Mephitis Grip",head="Artsieq Hat",body="Theo. Briault +1",hands="Lurid Mitts",legs="Artsieq Hose",feet="Theo. Duckbills +1",
neck="Nuna Gorget +1",waist="Ovate Rope",left_ear="Lifestorm Earring",right_ear="Psystorm Earring",left_ring="Maquette Ring",right_ring="Sangoma Ring",
back="Refraction Cape"}
sets.midcast.divine.flash = { ammo="Kalboron Stone",
main="Lehbrailg +2",sub="Mephitis Grip",head="Artsieq Hat",body="Theo. Briault +1",hands="Lurid Mitts",legs="Artsieq Hose",feet="Theo. Duckbills +1",
neck="Imbodla Necklace",waist="Ovate Rope",left_ear="Lifestorm Earring",right_ear="Psystorm Earring",left_ring="Maquette Ring",right_ring="Sangoma Ring",
back="Refraction Cape"}
sets.midcast.enfeebling = {}
sets.midcast.enfeebling.accuracy = { ammo="Kalboron Stone",
main="Lehbrailg +2",sub="Mephitis Grip",head="Artsieq Hat",body="Theo. Briault +1",hands="Lurid Mitts",legs="Artsieq Hose",feet="Theo. Duckbills +1",
neck="Imbodla Necklace",waist="Ovate Rope",left_ear="Lifestorm Earring",right_ear="Psystorm Earring",left_ring="Maquette Ring",right_ring="Sangoma Ring",
back="Refraction Cape"}
sets.midcast.enfeebling.potency = {ammo="Kalboron Stone",
main="Lehbrailg +2",sub="Mephitis Grip",head="Artsieq Hat",body="Theo. Briault +1",hands="Lurid Mitts",legs="Artsieq Hose",feet="Theo. Duckbills +1",
neck="Imbodla Necklace",waist="Ovate Rope",left_ear="Lifestorm Earring",right_ear="Psystorm Earring",left_ring="Aquasoul Ring",right_ring="Sangoma Ring",
back="Refraction Cape",}
sets.midcast.elemental = {}
sets.midcast.elemental.accuracy = {main="Lehbrailg +2",sub="Mephitis Grip",head="Nahtirah Hat",neck="Eddy Necklace",
ear1="Friomisi Earring",ear2="Hecate's Earring",body="Bokwus Robe",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Songoma Ring",
back="Toro Cape",waist="Aswang Sash",legs="Gendewitha Spats",feet="Weath. Souliers +1"}
sets.JA = {}
sets.JA["Benediction"] = {Head="Piety Briault"}
sets.JA["Devotion"] = {Head="Piety Cap +1"}
end
function party_index_lookup(name)
for i=1,party.count do
if party[i].name == name then
return i
end
end
return nil
end
--function pretarget(spell)
-- if T{"Cure","Cure II","Cure III","Cure IV"}:contains(spell.name) and spell.target.type == 'PLAYER' and not spell.target.charmed and AutoAga == 1 then
-- if not party_index_lookup(spell.target.name) then
-- return
-- end
-- local target_count = 0
-- local total_hpp_deficit = 0
-- for i=1,party.count do
-- if party[i].hpp<75 and party[i].status_id ~= 2 and party[i].status_id ~= 3 then
-- target_count = target_count + 1
-- total_hpp_deficit = total_hpp_deficit + (100 - party[i].hpp)
-- end
-- end
-- if target_count > 1 then
-- cancel_spell()
-- if total_hpp_deficit / target_count > curaga_benchmark then
-- send_command(';input /ma "Curaga IV" '..spell.target.name..';')
--else
-- send_command(';input /ma "Curaga III" '..spell.target.name..';')
-- end
-- end
-- end
--end
Cures = S{'Cure','Cure II','Cure III','Cure IV','Cure V','Cure VI'}
Curagas = S{'Curaga','Curaga II','Curaga III','Curaga IV','Curaga V','Cura','Cura II','Cura III'}
Lyna = S{'Paralyna','Silena','Viruna','Erase','Cursna','Stona','Blindna','Poisona'}
Barspells = S{'Barfira','Barfire','Barwater','Barwatera','Barstone','Barstonra','Baraero','Baraera','Barblizzara','Barblizzard','Barthunder','Barthundra'}
Turtle = S{'Protectra V','Shellra V'}
Cursna = S{'Cursna'}
Regens = S{'Regen','Regen II','Regen III','Regen IV','Regen V'}
Enhanced = S{'Flurry','Haste','Refresh'}
Banished = S{'Banish','Banish II','Banish III','Banishga','Banishga II'}
Smited = S{'Holy','Holy II'}
Reposed = S{'Repose','Flash'}
Potency = S{'Slow','Paralyze'}
Defense = S{'Stoneskin'}
function precast(spell,action)
if midaction() then cancel_spell()
return
end
if spell.type == "WeaponSkill" then
if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
cancel_spell()
add_to_chat(8,'Unable To Use WeaponSkill: [Disengaged]')
return
else
equipSet = sets.ws
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
equip(equipSet)
end
elseif spell.type == "JobAbility" then
if spell.type == 'JobAbility' and windower.ffxi.get_ability_recasts()[spell.recast_id] > 0 then
cancel_spell()
return
end
if sets.JA[spell.english] then
equip(sets.JA[spell.english])
end
elseif spell.skill=='Healing Magic' then
if Cures:contains(spell.name) then
equip(sets.precast.cure)
elseif Curagas:contains(spell.name) then
equip(sets.precast.cure)
elseif Lyna:contains(spell.name) then
equip(sets.precast.healing)
else
equip(sets.precast.fastcast)
end
elseif spell.skill =='Enhancing Magic' then
equip(sets.precast.enhancing)
else
equip(sets.precast.fastcast)
end
end
function midcast(spell,action)
if spell.skill =='Healing Magic' then
if Cures:contains(spell.name) then
if world.day =='Lightsday' or world.weather_element == 'Light' or buffactive == 'Aurorastorm' then
if player.status == 'Engaged' then
equip(sets.engaged.healing.weather)
else
equip(sets.midcast.healing.weather)
end
else
if player.status == 'Engaged' then
equip(sets.engaged.healing.cure)
add_to_chat(8,'TP Sets Engaged')
else
equip(sets.midcast.healing.cure)
end
end
elseif Curagas:contains(spell.name) then
if world.day =='Lightsday' or world.weather_element == 'Light' or buffactive == 'Aurorastorm' then
if player.status == 'Engaged' then
equip(sets.engaged.healing.weather)
else
equip(sets.midcast.healing.weather)
end
else
if player.status == 'Engaged' then
equip(sets.engaged.healing.curaga)
else
equip(sets.midcast.healing.curaga)
end
end
elseif Lyna:contains(spell.name) then
if buffactive['Divine Caress'] then
equip(sets.midcast.healing.caress)
else
equip(sets.midcast.healing.lyna)
end
elseif Cursna:contains(spell.name) then
if buffactive['Divine Caress'] then
equip(sets.midcast.healing.cursnacaress)
else
equip(sets.midcast.healing.cursna)
end
else
equip(sets.midcast.healing.recast)
end
elseif spell.skill =='Enhancing Magic' then
if Regens:contains(spell.name) then
equip(sets.midcast.enhancing.regen)
elseif Barspells:contains(spell.name) then
equip(sets.midcast.enhancing.barspell)
elseif Turtle:contains(spell.name) then
equip(sets.midcast.enhancing.turtle)
elseif Enhanced:contains(spell.name) then
equip(sets.midcast.enhancing.recast)
elseif Defense:contains(spell.name) then
equip(sets.midcast.enhancing.stoneskin)
else
equip(sets.midcast.enhancing.raw)
end
elseif spell.skill =='Divine Magic' then
if Banished:contains(spell.name) then
equip(sets.midcast.divine.banish)
elseif Smited:contains(spell.name) then
equip(sets.midcast.divine.holy)
elseif Reposed:contains(spell.name) then
equip(sets.midcast.divine.repose)
elseif Flashed:contains(spell.name) then
equip(sets.midcast.divine.flash)
else
equip(sets.midcast.divine.flash)
end
elseif spell.skill =='Enfeebling Magic' then
if Potency:contains(spell.name) then
equip(sets.midcast.enfeebling.potency)
else
equip(sets.midcast.enfeebling.accuracy)
end
elseif spell.skill =='Elemental Magic' then
equip(sets.midcast.elemental.accuracy)
end
end
function aftercast(spell,action)
if Armor == '119' then
equip(sets.aftercast.defense)
else
Idle()
end
end
function AutoSublimation()
local total_mpp_deficit = 0
if player.mpp<75 then
total_mpp_deficit = (100 - player.mpp)
end
if buffactive['Sublimation: Complete'] then
if total_mpp_deficit > sublimation_benchmark then
if Sublimation == 1 then
windower.send_command('@wait 4;input /ja "Sublimation" <me>')
add_to_chat(039,'Sublimation Completed: MP Danger Zone')
end
elseif player.mpp < 75 then
if Sublimation == 1 then
windower.send_command('@wait 4;input /ja "Sublimation" <me>')
add_to_chat(159,'Sublimation Completed: MP Mid Range')
end
end
elseif not buffactive['Sublimation: Complete'] and not buffactive['Sublimation: Activated'] then
if Sublimation == 1 then
windower.send_command('@wait 4;input /ja "Sublimation" <me>')
end
end
end
function status_change(new,action)
if new == 'Idle' then
enable('main','sub')
if Armor == '119' then
equip(sets.aftercast.defense)
else
Idle()
end
elseif new == 'Resting' then
equip(sets.aftercast.resting)
elseif new == 'Engaged' then
disable('main','sub')
equipSet = sets.TP
if equipSet[AccArray[AccIndex]] then
equipSet = equipSet[AccArray[AccIndex]]
end
equip(equipSet)
end
end
function buff_change(buff,gain_or_loss)
if buff == "Sandstorm" then
Idle()
end
end
function Idle()
if buffactive['Sandstorm'] then
equip(sets.aftercast.move)
elseif world.time >= (17*60) or world.time <= (7*60) then
equip(sets.aftercast.night)
else
equip(sets.aftercast.day)
end
end
function pet_midcast(spell,action)
end
function pet_aftercast(spell,action)
end
function self_command(command)
if command == 'C1' then -- Accuracy Level Toggle --
AccIndex = (AccIndex % #AccArray) + 1
add_to_chat(158,'Accuracy Level: '..AccArray[AccIndex])
status_change(player.status)
elseif command == 'C15' then -- MDT 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 == 'A10' then -- Aga Toggle --
if AutoAga == 1 then
AutoAga = 0
add_to_chat(8,'Curaga 3 Mode: [Off]')
else
AutoAga = 1
add_to_chat(158,'Curaga 3 Mode: [ON]')
end
status_change(player.status)
elseif command == 'B10' then -- Sublimation Toggle --
if Sublimation == 1 then
Sublimation = 0
add_to_chat(8,'Auto Sublimation: [Off]')
else
Sublimation = 1
add_to_chat(158,'Auto Sublimation: [ON]')
end
status_change(player.status)
elseif command == 'SUPERCURE' then
if (windower.ffxi.get_spell_recasts()[215] > 0) then
send_command('input /ma "Cure V" <t>')
else
send_command('input /ja "Penury" <me>;wait 1.2;input /ma "Cure V" <me>')
end
elseif command == 'SUPERGEN' then
if (windower.ffxi.get_spell_recasts()[215] > 0) then
send_command('input /ma "Regen IV" <t>')
else
send_command('input /ja "Penury" <me>;wait 1.2;input /ma "Regen IV" <t>')
end
elseif command == 'SESUNA' then
if (windower.ffxi.get_spell_recasts()[246] > 0) then
send_command('input /ma "Esuna" <t>')
else
send_command('input /ja "Afflatus Misery" <me>;wait 1.2;input /ma "Esuna" <me>')
end
end
end
At first I thought it might be the sublimation rule, so I -- it out, but it still occurred so I -- out the curaga rule but it's still occurring.
I'm stumped as it's not just me it's happening too.... any ideas? I feel like I've missed something.
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-12-07 21:40:45
line 294-297 is your problem conagh, i've tried to figure out a way to use it but gearswap keeps locking up and there's no way to force no-action status or something back to a player.
basically the problem (i think) is this:
instant spell goes off and is canceled bcuz you are in midcast or something else and it'll lock up in midcast with nothing being casted so nothing can be casted bcuz it'll keep saying in midcast so the loop happens etc 294 is
equip(sets.precast.enhancing)
else
equip(sets.precast.fastcast)
end
But I think I see, maybe I should add it to function mp change...
Code windower.register_event('mp change', function(mp)
To create a action status...
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-12-07 22:19:31
Code windower.register_event('mp change', function(mp)
local total_mpp_deficit = 0
if player.mpp<75 then
total_mpp_deficit = (100 - player.mpp)
end
if buffactive['Sublimation: Complete'] and not midcast() then
if total_mpp_deficit > sublimation_benchmark then
if Sublimation == 1 then
windower.send_command('@wait 2;input /ja "Sublimation" <me>')
add_to_chat(039,'Sublimation Completed: MP Danger Zone')
end
elseif player.mpp < 75 then
if Sublimation == 1 then
windower.send_command('@wait 2;input /ja "Sublimation" <me>')
add_to_chat(159,'Sublimation Completed: MP Mid Range')
end
end
elseif not buffactive['Sublimation: Complete'] and not buffactive['Sublimation: Activated']and not midcast() then
if Sublimation == 1 then
windower.send_command('@wait 2;input /ja "Sublimation" <me>')
end
end
end)
Tried this instead? I assume you were referring to Sublimation trying to check Mpp when nothing changed...
This now checks if you mp changes and confirms you are not midaction without trying to cancel anything..
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-12-07 22:26:24
Oh wait...
Code if midaction() then cancel_spell()
return
end
this seems to be what stops it.............
it's checking if you are midaction and then cancels spells... but considers doing nothing as an action... as it's checking your MP changes and creates a fake action?
Deleting this seems to have fixed it.
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2014-12-07 23:51:52
midaction() should only ever return true if in the middle of a "spell" (or rather, the tables maintained by GS never get updated when the spell is completed, for whatever reason). Other events shouldn't be in the command_registry, so those are not what is causing the issue. And this table isn't reset when you reload your GS file, so if an entry is stuck on "midaction," you have to reload the GS addon itself to unblock it.
midaction() actually returns two values, boolean (true or false) and a spell table. By using Code if midaction() then b,s = midaction() cancel_spell() print('canceled by '..s.english) return end
and casting Protect immediately followed by spamming Cure (starting while Protect is still casting), I think I realize the issue (at least narrowed it down, anyway).
Even after the 3-second cooldown and I should be able to cast Cure, what prints is 'canceled by Cure,' meaning that the new spell is added into the command_registry even though it doesn't actually get through to the game, and since it never completes (since it technically never started), midaction never gets set to false.
I'll post a bug report to Windower x:
Cerberus.Conagh
Server: Cerberus
Game: FFXI
Posts: 3189
By Cerberus.Conagh 2014-12-08 00:17:02
Ragnarok.Flippant said: »midaction() should only ever return true if in the middle of a "spell" (or rather, the tables maintained by GS never get updated when the spell is completed, for whatever reason). Other events shouldn't be in the command_registry, so those are not what is causing the issue. And this table isn't reset when you reload your GS file, so if an entry is stuck on "midaction," you have to reload the GS addon itself to unblock it.
midaction() actually returns two values, boolean (true or false) and a spell table. By using Code if midaction() then b,s = midaction() cancel_spell() print('canceled by '..s.english) return end
and casting Protect immediately followed by spamming Cure (starting while Protect is still casting), I think I realize the issue (at least narrowed it down, anyway).
Even after the 3-second cooldown and I should be able to cast Cure, what prints is 'canceled by Cure,' meaning that the new spell is added into the command_registry even though it doesn't actually get through to the game, and since it never completes (since it technically never started), midaction never gets set to false.
I'll post a bug report to Windower x:
AHA KNEW IT WASN'T ME GOING MAD !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
At least it will get fixed
Just looking for someone to explain this addon a bit for me. It looks like it is an alternative to Spellcast.
Is it going to be replacing Spellcast? In which ways is it better or worse. I don't know any programming but I've slowly learned more and more about spellcast and the 'language' used in gearswap is confusing to me.
It says it uses packets so it potentially could be more detectable? but does that also eliminate any lag that spellcast may encounter?
I plan on redoing my PUP xml to include pet casting sets thanks to the new addon petschool. I'm just not sure if it's worth it to just wait until gearswap gets more popular or to go ahead and do it in spellcast.
If anyone could give me more info I'd greatly appreciate it.
|
|