![]() The second is to send this using the lua alias: sendGMCP 'Comm. The "\" at the end of the regex code indicates that the character between it and the "$" symbol is the last character in the string. The script initializes it on startup, so restarting Mudlet is one option. In this instance it would execute the code "await Vaxarn." Now take note, that if you saw - Vaxarn arrives from the ether and dies.- nothing would happen. This code then sends two commands one to dash to the north and the other to await whatever was captured. Ie, if you get - Vaxarn arrives from the ether - it will execute the code successfully. Above you'll see that the capture is going to grab anything and everything before the word "arrives" if the rest of the trigger line is indeed called. Now, it's noted that all of the command lines to be executed below the triggers are all scripted in Lua, so some functions may be a little confusing at first, but eventually you'll get the hang of it. Here's an example of a successfull variable set from a trigger. Just as when the Alias mentioned above captures everything between the "z" character and the pressing the enter key, triggers can be set to capturing specific lines as well. Setting triggers as a perl regex code is the simplest and most effective way of creating and adjusting variables. If you are looking for an immersive browser RPG game, Achaea will add more excitement to your life. There are many different and special classes that you will be able to reach. In the world of Achaea, you will be able to discover yourself while you are improving your character. Triggers lines can be set to an Exact Match, beginning of line substring, a substring, or a perl regex code. Achaea is a text-based RPG flagship game. Now when a code comes across your screen saying that "A cat enters the room." you will instantaneously pet the cute little thing! Now, just as aliases are case sensitive Triggers are as well. 1 Mudlet Packages 1.1 Current MUDs with listed packages 2 Package listing by MUD 2.1 Achaea 2.2 Aetolia 2.3 God Wars II 2.4 Discworld MUD 2.5 Imperian 2.6 Lusternia 2.7 Midkemia Online 2.8 Non-specific Packages 2.8. and set the command to be executed as - send("pet cat"). Triggers are lines of code that you tell the system "if this comes across the screen then execute the command listed below." One can enter into a trigger line - A cat enters the room. The easiest explanation of a trigger in the Mudlet environment is a giant "if/then" statement. ![]() The periods before and after the quotations are needed to indicate that the word before, in between of, or after them is a variable and it needs to put it's value there. When using a variable in a Lua script if it's not in a command that is to be sent it can be left alone for further evaluation, like - if target = "Vaxarn" then send("attack ".target). ![]() Values can be set to variables by either using aliases or triggers. Basically until you hit the enter key, you're going to set the variable's value to whatever you have just put as the input. So if i entered "z rock" into the input line it would get the value as "rock". var = matches - This would set the variable "var" to the captured value. Afflictions, defences, players, and room items. Tk Simple, efficient, and easy to integrate GMCP tracking. I'm trying to maintain both the dropbox files and this repository, but this repository will always be updated first. Not this is useless unless you assign a specified variable to it.įor the regex line listed above the captured line can be set to a variable by using the "matches" function. Use these, not the links in my forums posts. This captures anything and everything after "z" until i hit the enter key. The Perl Regex line that i use is ^z (\w )$. One that i use often is my targeting script. Most of the time we tell what value to set to what variable. Variables are items that have values associated with them.
0 Comments
Leave a Reply. |