Not looking for help here, but maybe trying to help others.
This little write up is for people like me who could do things in Lapper V5.7, but finding it bit harder in V5.8, and although fairly well explained in the write up, still need a little more specific information and/or example.
In v
5.7, you had a '
Register MsgAction' event/routine, which when someone typed a particular word, then lapper would automatically reply.
For instance, one of mine was;
Register MsgAction("gtg",MA_bye);
Register MsgAction("bye",MA_bye);
Register MsgAction("cya",MA_bye);
Sub MA_bye()
privMsg( "Bye, and thanks for racing with Sin'rs." );
EndSub
This little routine was called 'MA-bye', and would come into play when someone typed '
gtg', '
bye' or '
cya' (fairly standard and polite way of leaving a server).
In other words, each of the words between the quotes would act as a trigger word for lapper to reply to with my pre-prepared message.
As a polite "thank you", I got lapper to give an automatic reply of;
"
Bye, and thanks for racing with Sin'rs".
In v
5.8, this has been changed.
Now you would do;
Go to the "
SWITCH( $command )" section, then inbetween a "BREAK;" and "CASE" (BREAK is end of routine, CASE start of another), add the following;
CASE "gtg":
CASE "bye":
CASE "cya":
privMsg(langEngine( "%{main_bye}%" ));
BREAK;
This little routine is called 'main_bye'.
You then have to put a little bit of narrative in both the
EN(glish) and
FR(ench) language parts of lapper at the bottom of the lapper script.
In this instance, I've got;
Lang "EN"
main_bye = "Bye, and thanks for racing with Sin'rs.";
Lang "FR"
main_bye= "Bye et merci pour la course avec Sin'rs.";
(Many apologies if my French isn't correct).
This means that, as before, if someone types the word 'bye', lapper replies with "Bye, and thanks for racing with Sin'rs".
As with all messages, you can colour text with ^ and numbers.
In my slightly complicated example above, I've shown what happens when one of multiple words are chosen. You can do same with single word (only 1 line with CASE) or even more (multiple lines of CASE, such as all the colours in the rainbow, stars in the heavens, F1 driver names, old girlfriends, etc).
At the moment, all the sections are contained within the same lapper config file. I would expect (hint!), that in future releases, there may be separate files for each language.