Well, it does switch configs based on the IP but at that time, I want it to switch to other config.
Basically, what I want: if day of the week is sunday and time is between 3 pm and 6 pm, make server1 use config2 and server2 use config1.
If it's too complicated or laggy, I will continue using buttons
ooh, okay
Well, you could put it on onJoinGame, but then it will only change when you log on
Or maybe bind it to a commonly used action, like your tab key
have it open the playerlist as normal but ALSO check the time while it's at it
or you could have a constantly running script, which, while it isn't laggy, just seems like something that i personally reallllllllly wouldn't want to do
In either case you would be checking the value of the TIME and DATE variables and then changing Config(name) based on that
If you've decided which one you want, i could write an example =P
Well, you could put it on onJoinGame, but then it will only change when you log on
Or maybe bind it to a commonly used action, like your tab key
have it open the playerlist as normal but ALSO check the time while it's at it
or you could have a constantly running script, which, while it isn't laggy, just seems like something that i personally reallllllllly wouldn't want to do
In either case you would be checking the value of the TIME and DATE variables and then changing Config(name) based on that
If you've decided which one you want, i could write an example =P
OnJoinGame is a great option, I don't see any reason why should it check several times.
OnJoinGame is a great option, I don't see any reason why should it check several times.
Well, it just means if you start playing at 2:45 and play 'till 7:00 or something it won't change until/unless you leave and rejoin the server, hence the other options =P
onJoinGame:
$${$$<configcheck>}$$
in a file called configcheck.txt:
...oh wait, i don't know what DATE and TIME are actually formatted as xD
but something along the lines of
IFMATCHES(%DATE%,<pattern for saturdays and sundays>)
IFMATCHES(%TIME%,<pattern for time range>)
Config(otherconfig)
ENDIF
ENDIF
Well, it just means if you start playing at 2:45 and play 'till 7:00 or something it won't change until/unless you leave and rejoin the server, hence the other options =P
It (obviously) requires a server restart to switch IPs, so yeah, that's not an issue
For the day of the week you can use the TIME(&var,"dateformat") command using java's SimpleDateFormat character "u" to get the day of the week (1-7, 1 being Monday, 7 being Sunday).
TIME(&day,"u");
IFMATCHES(%&day%,"7");
//do things
ENDIF;
For the day of the week you can use the TIME(&var,"dateformat") command using java's SimpleDateFormat character "u" to get the day of the week (1-7, 1 being Monday, 7 being Sunday).
TIME(&day,"u");
IFMATCHES(%&day%,"7");
//do things
ENDIF;
I know I'm just some non-contributing, non-regular person but I'm certainly a long-time user of the mod.
The server I play on is actually pretty dependent on them. I guess no one realized just how much until we'd already gone and updated to 1.7.2. Now we're over a month past that decision and the player base is dwindling.
So if you're close to finishing or just need a little push, just know that all of us over here are waiting with bated breath, asking every day, constantly forlornly checking this thread for a glimmer of hope of an update. Our community means a lot to us and believe it or not, your mod and by extension you are a big part of it!
ooh, okay
Well, you could put it on onJoinGame, but then it will only change when you log on
Or maybe bind it to a commonly used action, like your tab key
have it open the playerlist as normal but ALSO check the time while it's at it
or you could have a constantly running script, which, while it isn't laggy, just seems like something that i personally reallllllllly wouldn't want to do
In either case you would be checking the value of the TIME and DATE variables and then changing Config(name) based on that
If you've decided which one you want, i could write an example =P
'Cause tomorrow spring is here
OnJoinGame is a great option, I don't see any reason why should it check several times.
Well, it just means if you start playing at 2:45 and play 'till 7:00 or something it won't change until/unless you leave and rejoin the server, hence the other options =P
onJoinGame:
$${$$<configcheck>}$$
in a file called configcheck.txt:
...oh wait, i don't know what DATE and TIME are actually formatted as xD
but something along the lines of
IFMATCHES(%DATE%,<pattern for saturdays and sundays>)
IFMATCHES(%TIME%,<pattern for time range>)
Config(otherconfig)
ENDIF
ENDIF
'Cause tomorrow spring is here
It (obviously) requires a server restart to switch IPs, so yeah, that's not an issue
Aaaah, okay, i see what you mean now
Then yeah, just gotta somehow...
i'm sorry, i have no idea what DATE and TIME actually look like.., could you do $${Log(%TIME%);Log(%DATE%)}$$ in the game and see what it shows?
figuring out if a day is a sunday could turn out to be quite difficult though =P
'Cause tomorrow spring is here
Indeed
For the day of the week you can use the TIME(&var,"dateformat") command using java's SimpleDateFormat character "u" to get the day of the week (1-7, 1 being Monday, 7 being Sunday).
Oh my..., thank you so much
well, uh, in that case..,
TIME(&day,"u");
#day = %&day%
MATCH(%TIME%,"(..):(..):(..)",{&hour,&minute,&second})
#hour = %&hour%
#minute = %&minute%
#second = %&second%
IF((#day = 7) && (15 < #hour < 18));
Config(otherconfig)
ENDIF;
//hopefully you can set a counter with a leading 0, test it with the following script
$${#a = 0;#a = 02;IF(#a = 2);Log(true);Else;Log(False);ENDIF}$$
if it says true, then the script should work (hopefully)
'Cause tomorrow spring is here
So, I tried the 2nd script and it did say "true", but the main script still did nothing (I changed 18 to 22 to test).
Agh, darn emotes..., you replaced those with ColonOpenbraket, right? ( : and ( )
alternatively, maybe it doesn't allow two comparisons together like that, could use
((15 < #hour)&&(#hour < 22))
'Cause tomorrow spring is here
Emotes are fine (although that's what code tags are for :D) but it still won't work...
Alright, maximum debug time then (sorry for running you back and forth like this)
'Cause tomorrow spring is here
I wouldn't think you could do double comparisons, most programming languages don't have that so it wouldn't make sense for Macros to have it.
oh, really?
javascript and python do..., maybe it's a high-level vs low-level thing
thanks for the info
'Cause tomorrow spring is here
(and retried the original script)
Oh, so they do.... I wonder if most actually do...never tried it in some languages *shrug*
EDIT: Java doesn't, so maybe it's a high-level thing.
1. aah, sorry..., i'm getting really bad at this recently =(
2. Does it have anything to do with all the & signs being replaced by &?
it's a reallllllllly annoying glitch minecraftforums has =/
3. you can't, but there's no reason to
IIF(condition,string1,string2) is simply a shorthand notation for
IF(condition);Echo(string1);ELSE;Echo(string2);ENDIF
you can use an ELSE for any kind of IF command, IFMATCHES; IFCONTAINS, whatever =P
in this case you would have
$${IF(~CTRL);Echo(/command);ELSE;yourscript;ENDIF}$$
'Cause tomorrow spring is here
2) I don't think that doing the thing with the percent's like mart is work, can you try
3) IIF only supports ECHOing what you give it, so you'll need to use if's:
The server I play on is actually pretty dependent on them. I guess no one realized just how much until we'd already gone and updated to 1.7.2. Now we're over a month past that decision and the player base is dwindling.
So if you're close to finishing or just need a little push, just know that all of us over here are waiting with bated breath, asking every day, constantly forlornly checking this thread for a glimmer of hope of an update. Our community means a lot to us and believe it or not, your mod and by extension you are a big part of it!
Best of luck!
Since when is "Grave" a key?
When live give you lemons, make apple pie.