that would be pretarget that only happens on command sent via chat i.e.(/item "Icarus Wing" <me>) or macro i.e.(/item "Icarus Wing" <me>) or windower console i.e.(input /item "Icarus Wing" <me>)
all spells/abilitys/items useage goes through precast/midcast/aftercast except for spells cast by pets thay only have pet_midcast/pet_aftercast tho for abilitys i would not use midcast as its to short
Is it possible to create a timer that, once elapsed, creates a party chat message?
A flow like this, sort of:
1) JA is used
2) Timer starts
3) Timer is over, message gets send to the party chat
No, but it could be added.
Yes I mean, how can I create that with gearswap? (or anything else, it doesn't necessarily have to be Gearswap I suppose)
i tried adding the code above sets.engaged.Melee in my Cor_gear.lua, and deleting the sets.engaged.ranged, set,also did //gc validate and tried to reload and was still getting the same error as before in console it read like this.
gearswap loaded your cor file!
gearswap: lua error (runtime) desktop/windower//addons/gearswap/flow.lua:301:
gearswap has detected an error in the user function get_sets:
...windower/addons/gearswap/data/COR.lua:19: attempt to call global 'M' (a nil value)
gearswap: lua error (runtime) ...desktop/windower//addons/gearswap/validate.lua:60 attempt to index local 'tiem_sets' (a nil value)
After doing this, i copied
your new cor.lua and cor_gear.lua into my cor cor.lua and cor_gear.lua just to see what/ if i got any error's again and in console it displayed:
gearswap loaded your cor file!
gearswap: lua error (runtime) desktop/windower//addons/gearswap/flow.lua:301:
gearswap has detected an error in the user function get_sets:
...windower/addons/gearswap/data/COR.lua:21: attempt to call global 'M' (a nil value)
i also tried to load several cor.lua's from gearswap shop thread
and each one gives me a different error all of the error have started with,
gearswap loaded your cor file!
gearswap: lua error (runtime) desktop/windower//addons/gearswap/flow.lua:301:
gearswap has detected an error in the user function get_sets:
So i looks to me like its not a problem with any of the actually cor.lua's im trying to use maybe sumit is in the wrong place or maybe a file out of date as some has mentioned to be before,
but as far as i am aware all the mote includes are in the right places as i have not moved any of them to different places. Also its Strange that this is only happening on my cor lua and not my other jobs i play?
yes you can but it involves creating a function for the message
like this
function timed_message(message)
send_command(message)
end
then use
coroutine.schedule(timed_message("input /p Hello"), 3) 3 is the time you want to wait in seconds
or just
coroutine.schedule(send_command("input /p Hello"), 3) 3 is the time you want to wait in seconds
If you mean a custom timer, then yes, it's possible, since you always know the duration (I thought you meant for buffs or recasts).
dlsmd's code works for that, personally I'd refactor the coroutine call into the function to make it a bit easier to use. In fact, I would couple it with the timer creation:
Now you can just use the following to automatically create a timer that generates a message when it's finished:Code:timed_message = function(name, time, message, color) color = color or 207 -- default color windower.send_command('timer c %s %u':format(name, time)) coroutine.schedule(windower.add_to_chat:prepare(color, message), time) end
Code:timed_message('Pizza', 15*60, 'Pizza is ready', 8)
Isn't the add_to_chat though a chatline that only the users see client-side?
My goal here is to send an automated message in partychat (or whatever chat mode I have currently selected in-game with the /cm command) to warn my other party members.
For example Perfect Defense.
I know my SMN skill, I know how long it's going to last.
I can set that amount of seconds in the coroutine and then add a message like "PD wearing off in 5 seconds" in my chat.
This was just an example, there are a couple of situations where I'd want to automatize this.
windower.send_command('input /p PD wearing off in 5 seconds')
Perfect!
So I would just need something like
coroutine.schedule(windower.send_command('input /p *message*'), time)
:D
It would be:
This will respect your current chat mode, it will enter the message as if you entered it into your chat box. Note the "prepare" in there, that is required.Code:timed_message = function(name, time, message, color) color = color or 207 -- default color windower.send_command('timer c %s %u':format(name, time)) coroutine.schedule(windower.send_command:prepare('input %s':format(message)), time) end
SIR, YES SIR!
(thanks guys, much apreciated <3)
How can I check if I am in the middle of casting from within buff_change()? I want to swap to my refresh gear when Sublimation is finished charging, but not if am in the middle of casting a spell.
ok im gonna log out in asec and try this, i have a Question tho inside the libs folder i have another folder called rev1, it has mote's include lua's in them. Do i need to also deletet this folder or just the lua's in there?
ok ive taken the include file out and when i started widower it doesn't seem to update like usually and i checked the libs folder and they haven't been Created either. is there a way to fix this or will i have to re down load windower?
delete the windower/updates folder
doing this will over write all of your addon/plugin files with fresh ones on the next time you load the windower profiler
this is the order to find out if a plugin/addon is messed up
1. reload the plugin/addon
1b. reload luacore if its an addon
1c. sometimes just shutting down ffxi and logging back in will fix it if you have been logged in for a long time
2. run the windower profiler to see if there is an update
3. delete the windower/updates folder then run the windower profiler if problem still exist after starting ffxi
4. make a bug report with a crash dump if posible