Now go back to your main config, in onPlayerJoined bind the following:
$${$$<greeting.txt>}$$
In the text editor create greeting.txt and add the following:
IFCONTAINS(%@&adminz%,~%JOINEDPLAYER%~);
STOP();
ENDIF;
IFCONTAINS(%@&greetz%,~%JOINEDPLAYER%~);
ECHO("Ohai %JOINEDPLAYER%!");
ELSE;
LOG("&cAn unrecognised player &6%JOINEDPLAYER%&c joined the game!");
LOG("&cPress &6[Y]&c to add them to the auto-greet list.");
LOG("&cPress &6[N]&c to add them to the ignore list.");
SET(@waiting);
SET(@&newplayer,%JOINEDPLAYER%);
IMPORT("YesNo");
DO(10);WAIT(1);WHILE(@waiting);
IF(@waiting);
LOG("&cTimed out, you will be prompted next time &6%JOINEDPLAYER%&c joins the game");
ENDIF;
UNIMPORT();
ENDIF;
Bind any key in your main config to:
$${SET(@&greetz,"");SET(@&adminz,"");}$$
Run that macro once to set the two variables to empty, then delete it.
You should now be prompted when a new player joins the game whether you want to auto-greet them or add them to the ignore list.
I've got it all added in, exactly as you've posted. I'll be giving it a try in a short while. Though... looking at it, I barely understand exactly what the scripts are actually doing... heh. Might be due to having a major migraine going right now...
Thanks for taking the time to post a script for me, yourself, Mumfrey. I appreciate it.
Edit: Update! Works great. I've already been able to add the owner to the "Don't expose him snooping!" list, and a member to the "Oh hai there!" greet list. Cheers!
I have a string, randomly, changing every times a message is sent. In this example we're gonna take the string "c trop un ouf, je sais pas pk". I know that's french, but I think you can help me without understand However, in english it means "He's so skilled, I don't know why", but in text messages language, that I don't like in my server. This string is @&message.
He's made to color every wrong word in red, and the rest in green. The "tmwords.txt" is a textfile containing all of the wrong words, separated by a "|". Words [^c |pk] are in this textfile, and also in the string as you can see.
I tried this script and the output string is "c trop un ouf, je sais pas pk", but it is supposed to be "c trop un ouf, je sais pas pk". That's why I asked this question.
Thanks !
[^c|pk]?
shouldn't it be (c|pk)? (or just c|pk, but i like parentseses, make it easier to read)
Haha, it's one of those scripts you spend an hour trying to figure out what's wrong, then it turns out to be the simplest thing ever
(.*) Repeats the previous item zero or more times. Greedy, so as many items as possible will be matched before trying permutations with less matches of the preceding item, up to the point where the preceding item is not matched at all.
(.*?) Repeats the previous item zero or more times. Lazy, so the engine first attempts to skip the previous item, before trying permutations with ever increasing matches of the preceding item.
...because it output the first wrong word and the string before two times, without the rest of the string, I don't know why, maybe because the IMTACHES doesn't support the syntax : IFMATCHES(%&string%,(thing1)(thing2)(thing3),{&var1,&var2,&var3});.
Thanks Mart !
No, as far as i know ifmatches does not support that
glad i could (eventually =P) help
uhm... Its rare to see this error, I used the same mods as before, now im getting a crash. I think its related to the last mod I installed, it uses the ayt.class. Imma go use an backup before installing the last mod, I cant create macro lol. gotta remove this mod.
uh wait, I tried reinstalling mods, looks like its improved chat mod crashing macro mod. Macro mod works, but when its time to add/edit, poof crash. I used this mod since 1.0.0 and I never encountered this bug. Same mods as before.
I've also noted that same bug when I add ImprovedChat to the merry little mix I have. If I leave ImprovedChat out, I can edit macros. If I add it in, and try to edit, I get a crash. Any suggestions? (I'm also using SKMCLauncher, but I suspect that's not entirely relevant).
The classes used by ImprovedChat are as follows:
arm
arn
asu
asw
atg
atk
ayc
Then there's all the other support code the mod seems to use.
I've also noted that same bug when I add ImprovedChat to the merry little mix I have. If I leave ImprovedChat out, I can edit macros. If I add it in, and try to edit, I get a crash. Any suggestions? (I'm also using SKMCLauncher, but I suspect that's not entirely relevant).
I already know about this, it's because the version of IC compiled by GuntherDW unnecessarily renames two of the fields in the text field class. You can make them work together by setting the option gui.textboxhighlight.enabled to 0 in the config file. Then go bug Gunther to fix his mistake.
$${
IFMATCHES(%CHAT%,.+ to the server!$);
MATCH(%CHAT%,^&f(.+) to the server!)
WAIT(1)
ECHO(/whois %JOINEDPLAYER%);
ENDIF;
}$$
it keeps saying player not found
This is because %CHAT% contains the prefix as well and your two regex seem to contradict one another. Also JOINEDPLAYER is not available in the onChat event only in the onPlayerJoined event, so you can either:
Put the WHOIS command into the onPlayerJoined event:
$${ECHO("/whois %JOINEDPLAYER%")}$$
Continue to use onChat, but use a regex match to extract the player name:
$${
IFMATCHES("%CHATCLEAN%","([a-z0-9_]{2,16}) to the server!$",&joinedplayer,1);
WAIT(1)
ECHO("/whois %&joinedplayer%");
ENDIF;
Do either of those things and it should work as expected, depending on the chat format of course.
The Meaning of Life, the Universe, and Everything.
Location:
Mount Vernon
Join Date:
12/13/2012
Posts:
43
Location:
Mount Vernon
Minecraft:
PhoenixOfWar
Xbox:
Cause Im Ninja
Member Details
Is it possible to modify the GUI Screen for the parameter input screens?
Ex. Have command /broadcast run and it has the $$u parameter. So the $$u screen pops up so that I can enter some text into the parameter to pass it along to my broadcast command. Now, what I want to do is pretty simple, just toss a Label onto that screen with the color codes for easy reference. I have a label like that, on my chat screen, but I'd like to add one to the input screen now... Any way?
@Mumfrey
How goes the wiki? Any status updates, estimated time, etc? I'm stuck to basic commands/scripts that I scrounge from the forum, due to not knowing anything about the scripting style/syntax for this mod. Can't wait to be able to look through a wiki.
Is it possible to modify the GUI Screen for the parameter input screens?
Ex. Have command /broadcast run and it has the $$u parameter. So the $$u screen pops up so that I can enter some text into the parameter to pass it along to my broadcast command. Now, what I want to do is pretty simple, just toss a Label onto that screen with the color codes for easy reference. I have a label like that, on my chat screen, but I'd like to add one to the input screen now... Any way?
Sorry it's not possible to modify this screen at the moment, I might be able to add a controls panel for this screen in the future but it's not especially easy at the moment because of the way that screen is structured.
How goes the wiki? Any status updates, estimated time, etc? I'm stuck to basic commands/scripts that I scrounge from the forum, due to not knowing anything about the scripting style/syntax for this mod. Can't wait to be able to look through a wiki.
Slowly but surely, I basically just do a little in my lunch break at work every day since it's time that would otherwise be wasted.
Sorry it's not possible to modify this screen at the moment, I might be able to add a controls panel for this screen in the future but it's not especially easy at the moment because of the way that screen is structured.
Slowly but surely, I basically just do a little in my lunch break at work every day since it's time that would otherwise be wasted.
Okay, fair enough.
More importantly, great work on this mod. Stumbled upon it about a week ago and been loving it ever since.
I can't find a download link in it... please give the link?
The links are working fine. Are you doublechecking it's the download link for Macro / Keybind mod? By the way, Just saying something is wrong, not working, or "Can't find it" doesn't help. People can't help you if you didn't actually look [Links are on the first post of this topic] and if you say downloads aren't working, we don't know what is wrong.
Im getting a no sound problem when installing the liteloader on a mac. I install Optifine, Reis Minimap, then the liteloader and the sound file goes missing. Any ideas what im doing wrong?
[Edit] I tried installing JUST LiteLoader and still having the same problem
Get a chance to see the log i posted of liteloader.txt not working on a mac with MagicLauncher? Thanks.
Yes we have been investigating this, but the only person we can find with a Mac to test it doesn't experience this problem so it's not been easy to track down.
Im getting a no sound problem when installing the liteloader on a mac. I install Optifine, Reis Minimap, then the liteloader and the sound file goes missing. Any ideas what im doing wrong?
[Edit] I tried installing JUST LiteLoader and still having the same problem
The mac archiver overwrites the "com" folder instead of merging it, back up the contents of that folder before installing LiteLoader and then merge the old contents back in. It's a bug with the archiver not with the mod itself.
Thanks for taking the time to post a script for me, yourself, Mumfrey. I appreciate it.
Edit: Update! Works great. I've already been able to add the owner to the "Don't expose him snooping!" list, and a member to the "Oh hai there!" greet list. Cheers!
[^c|pk]?
shouldn't it be (c|pk)? (or just c|pk, but i like parentseses, make it easier to read)
'Cause tomorrow spring is here
Only if the variable doesn't exist. If the variable does exist then it is replaced before the formatting codes are.
Haha, it's one of those scripts you spend an hour trying to figure out what's wrong, then it turns out to be the simplest thing ever
(.*)
Repeats the previous item zero or more times. Greedy, so as many items as possible will be matched before trying permutations with less matches of the preceding item, up to the point where the preceding item is not matched at all.
(.*?)
Repeats the previous item zero or more times. Lazy, so the engine first attempts to skip the previous item, before trying permutations with ever increasing matches of the preceding item.
you used the first, you want(ed)? the second
'Cause tomorrow spring is here
No, as far as i know ifmatches does not support that
glad i could (eventually =P) help
'Cause tomorrow spring is here
I've also noted that same bug when I add ImprovedChat to the merry little mix I have. If I leave ImprovedChat out, I can edit macros. If I add it in, and try to edit, I get a crash. Any suggestions? (I'm also using SKMCLauncher, but I suspect that's not entirely relevant).
The classes used by ImprovedChat are as follows:
(Post 27)
Cheers, The Viking (Dr Smokey)
Image Removed
I already know about this, it's because the version of IC compiled by GuntherDW unnecessarily renames two of the fields in the text field class. You can make them work together by setting the option gui.textboxhighlight.enabled to 0 in the config file. Then go bug Gunther to fix his mistake.
$${
IFMATCHES(%CHAT%,.+ to the server!$);
MATCH(%CHAT%,^&f(.+) to the server!)
WAIT(1)
ECHO(/whois %JOINEDPLAYER%);
ENDIF;
}$$
it keeps saying player not found
This is because %CHAT% contains the prefix as well and your two regex seem to contradict one another. Also JOINEDPLAYER is not available in the onChat event only in the onPlayerJoined event, so you can either:
Ex. Have command /broadcast run and it has the $$u parameter. So the $$u screen pops up so that I can enter some text into the parameter to pass it along to my broadcast command. Now, what I want to do is pretty simple, just toss a Label onto that screen with the color codes for easy reference. I have a label like that, on my chat screen, but I'd like to add one to the input screen now... Any way?
@Mumfrey
How goes the wiki? Any status updates, estimated time, etc? I'm stuck to basic commands/scripts that I scrounge from the forum, due to not knowing anything about the scripting style/syntax for this mod. Can't wait to be able to look through a wiki.
Sorry it's not possible to modify this screen at the moment, I might be able to add a controls panel for this screen in the future but it's not especially easy at the moment because of the way that screen is structured.
Slowly but surely, I basically just do a little in my lunch break at work every day since it's time that would otherwise be wasted.
Okay, fair enough.
More importantly, great work on this mod. Stumbled upon it about a week ago and been loving it ever since.
Please fix.
The links are working fine. Are you doublechecking it's the download link for Macro / Keybind mod? By the way, Just saying something is wrong, not working, or "Can't find it" doesn't help. People can't help you if you didn't actually look [Links are on the first post of this topic] and if you say downloads aren't working, we don't know what is wrong.
[Edit] I tried installing JUST LiteLoader and still having the same problem
Yes we have been investigating this, but the only person we can find with a Mac to test it doesn't experience this problem so it's not been easy to track down.
The mac archiver overwrites the "com" folder instead of merging it, back up the contents of that folder before installing LiteLoader and then merge the old contents back in. It's a bug with the archiver not with the mod itself.