Lua Commands Based On Time Of Day?

Eorzea Time
 
 
 
Language: JP EN FR DE
Version 3.1
New Items
users online
Forum » Windower » Support » Lua commands based on time of day?
Lua commands based on time of day?
 Asura.Bloodlusty
Offline
Server: Asura
Game: FFXI
Posts: 86
By Asura.Bloodlusty 2024-12-23 09:09:48
Link | Quote | Reply
 
Sorry if this has been asked or covered before

Can you add a command to change equipment based on time of day. I.e only use Lugra earring if between dusk to dawn

Can you add a command to equip moonshade earring if TP is below 2750tp

Are these possible / already done?
VIP
Offline
Posts: 922
By Lili 2024-12-23 10:06:59
Link | Quote | Reply
 
This has nothing to do with windower in general, it's a gearswap specific question, correct? In that case you should put it in the gearswap section.

And yes, this has been done before and is not difficult.
 Asura.Bloodlusty
Offline
Server: Asura
Game: FFXI
Posts: 86
By Asura.Bloodlusty 2024-12-23 12:55:23
Link | Quote | Reply
 
Thanks
 Carbuncle.Nynja
Offline
Server: Carbuncle
Game: FFXI
user: NynJa
Posts: 5131
By Carbuncle.Nynja 2024-12-23 14:01:38
Link | Quote | Reply
 
Lili said: »
is not difficult.

This is very subjective based on your coding skillset.

Can i rig up the code from scratch? No
Can i rip similar code from other gearswaps, edit it and make use of it to suit my needs? Yes

But someone who doesnt even know what a function is, they wouldnt even be able to steal the code and add it to their own lua.
Offline
By LightningHelix 2024-12-23 15:37:33
Link | Quote | Reply
 
time of day is
Code
windower.ffxi.get_info().time
which returns "number of minutes past 00:00 in the current vana'diel day" because uh, of course it does. thankfully you can just hardcode comparing it to the dusk/dawn times and never have to sweat any fancy conversion (fwiw, I always just floor it/60 to get hours and modulo 60 it to get minutes, hell if I know if there's some fancy lua time function built in)

player tp is
Code
windower.ffxi.get_player().vitals.tp
which returns your tp obviously

these go in whatever functions you're using to modify your equipsets, but since I don't know what you're doing, you'll have to do that part yourself

edit: for these and more fun functions, don't hesitate to use the windower wiki page which I have bookmarked at this point
[+]
 Asura.Bloodlusty
Offline
Server: Asura
Game: FFXI
Posts: 86
By Asura.Bloodlusty 2024-12-23 17:30:34
Link | Quote | Reply
 
Thanks all, appreciate the feedback. I’ll look into the web link, interesting that it can be done
 
Offline
Posts:
By 2024-12-23 17:41:04
 Undelete | Edit  | Link | Quote | Reply
 
Post deleted by User.
[+]