![]() ![]() An array is an ordered sequence of zero or more values (string, number, boolean, null, object, or array), separated by commas.Because values can be objects or arrays, therefore objects can contain nested objects or arrays.įor example: Objects are contained inside curly braces. Arrays are contained inside square brackets. Because values can be objects or arrays, therefore arrays can contain nested objects or arrays. The JSON types are readily represented in Lua. Strings and numbers are the equivalent types in Lua. Objects and arrays can be represented as Lua tables. Note that in JSON the following (unquoted) words are reserved: false / null / true Objects as the normal key/value pairs, and arrays as numerically-keyed tables. Text is enclosed within double quotes ("). Save your world file, so that the plugin loads next time you open it.Choose the file GMCP_handler_NJG.xml (which you just saved in step 4) as a plugin.Go to the MUSHclient File menu -> Plugins.The "plugins" directory is usually under the "worlds" directory inside where you installed MUSHclient.Save to disk on your PC, preferably in your plugins directory, as: GMCP_handler_ a text editor (such as Notepad) and paste the plugin into it.Select all the page and copy it to the Clipboard.Go to the GitHub page: GMCP_handler_ save and install the GMCP_handler_NJG plugin do this: Here is an example of a GMCP-parsing plugin for MUSHclient: The following characters must be escaped with a preceding backslash, like this: The backslash (\) character acts as an "escape" character for embedding quotes within the string. ![]() The main GitHub page for this plugin is at. There you will find the commit history and other information. Reworked and simplified version of the one by Lasher and Fiendish, from Aardwolf. To save and install the GMCP_message_receiver_test plugin do this: The plugin uses the OnPluginTelnetSubnegotiation callback, which MUSHclient calls whenever a IAC SB xx. I believe you could also just not the type=table check and use a single loop, though it may require some modification on how you set up the bashingTable.Choose the file GMCP_message_receiver_test.xml (which you just saved in step 4) as a plugin.Save to disk on your PC, preferably in your plugins directory, as: GMCP_message_receiver_ to the GitHub page: GMCP_message_receiver_test.xml. You are not setting targName in what you posted, so that might be part of the issue. check to see if any of the mobs match and target by name(assuming id from gmcp) instead it's not a table - is this area one of those annoying ones with few generic targets? ntains(mobsInRoom, mob) and target:title() ~= targName:title() and autoBashing() is the entry a table? then we want to check if any of the mobs match it doesn't matter what's in the table, this will loop through it The horde entry should also be a table, as how you had it written would just set horde to the first string ("an orcish grunt") and ignore anything supplied after it.Īs for the loops, I rearranged them a bit based on what you have there. ![]() I think bashingTable is being declared wrong, to start with:īashingTable = }Thanks in advance for any and all assistance! This is my very first time working with functions and tables, so I feel super lost and overwhelmed. Horde = "an orcish grunt", "an orcish mage", I'm a trying to pull from the following table (it is very small, just testing things right now before I start populating the table more with different areas and such) so that if the mob is in the room, it will switch targets to the appropriate alias. Don't be fooled by "autoBashing", it's just what I call it. If ntains(mobsInRoom, v) and target:title() ~= targName:title() and autoBashing() thenĮndSo I have that. If ntains(mobsInRoom, v) and target:title() ~= k:title() and autoBashing() thenĮlseif type(bashingTable) = "table" then ![]()
0 Comments
Leave a Reply. |