Search found 1099 matches

by Jor'Mox
Sat Sep 08, 2018 3:10 pm
Forum: Scripts & Packages
Topic: Easy Auto Wrapping Console Class
Replies: 2
Views: 1204

Easy Auto Wrapping Console Class

Here is a simple script that creates an autoConsole class that automatically readjusts text in the window whenever it is resized. I added all of the relevant functions that can be used to interact with a miniConsole to the class, so the returned object can use them as methods. One exception is that ...
by Jor'Mox
Fri Sep 07, 2018 7:25 pm
Forum: Help Forum
Topic: Keeping variables through multiple lines
Replies: 4
Views: 906

Re: Keeping variables through multiple lines

There are several predefined character groups in regex, such as \w, \d, and \s (they are all letters, numbers and _, all numbers, and all white space, respectively). But if you instead use the upper case version of the letter, you get everything NOT in that group. So \W is everything that isn't a le...
by Jor'Mox
Thu Sep 06, 2018 8:13 pm
Forum: Help Forum
Topic: Cant save trigger/alias/butons
Replies: 11
Views: 1908

Re: Cant save trigger/alias/butons

Make a new script, and for the first line of that script, put this: print(getMudletHomeDir()) Then save the script. Something will be printed to the screen. I have a feeling that the normal alias that lets you execute code from the command line that they are asking you to use likely also got deleted...
by Jor'Mox
Thu Sep 06, 2018 4:28 pm
Forum: Mudlet Mapper
Topic: Generic Mapping Script
Replies: 373
Views: 78425

Re: Generic Mapping Script

Okay, so we can easily make a revised pattern to get the optional water exits, like this: ^([A-Z].+)\(([\w\s,]+)\)\s*\[?([\w\s,]*)\]? And then we modify the script to combine both sets of captured exits before searching them, like this: local dirs = {n = 'north', s = 'south', w = 'west', e = 'east',...
by Jor'Mox
Thu Sep 06, 2018 11:34 am
Forum: Mudlet Mapper
Topic: Generic Mapping Script
Replies: 373
Views: 78425

Re: Generic Mapping Script

Okay, I think the key will be changing the way we do the direction replacement. In doing so, we will make it so we can detect if there are real exits being detected or not, and if there aren't, we will ignore that match because it isn't really exits. Like this (using this as the trigger pattern: ^([...
by Jor'Mox
Wed Sep 05, 2018 5:11 pm
Forum: Mudlet Mapper
Topic: Generic Mapping Script
Replies: 373
Views: 78425

Re: Generic Mapping Script

With a pattern like that, I would recommend a reset variable like you have for the exits, since it is possible you will see additional lines that start with a capital letter by accident. Also, I would broaden the range of possible characters to include apostrophes, hyphens, and punctuation marks, an...
by Jor'Mox
Wed Sep 05, 2018 3:27 pm
Forum: Help Forum
Topic: Sync with online DB
Replies: 16
Views: 2671

Re: Sync with online DB

I recommend putting in some display type statements to help debug your function. Print out the first line of the file, so you can see if it has the text you are looking for. Then print something showing that you made it inside the if statement. Then print out the new URL you are trying to match to s...
by Jor'Mox
Tue Sep 04, 2018 2:16 pm
Forum: Mudlet Mapper
Topic: Generic Mapping Script
Replies: 373
Views: 78425

Re: Generic Mapping Script

So, I'll admit I haven't wandered around until I found a fire, but I connected to Two Towers, and got the mapper working in brief mode using these two triggers: Room Name and Exits pattern: ^([A-Z].*)\(([\w\s,]+)\) if not found_exits then found_exits = true map.prompt.room = matches[2] map.prompt.ex...
by Jor'Mox
Tue Sep 04, 2018 12:12 pm
Forum: Mudlet Mapper
Topic: Generic Mapping Script
Replies: 373
Views: 78425

Re: Generic Mapping Script

Did you also add this to your prompt trigger?: found_exits = false

Without that, you would only ever find your exits a single time. The reset is key.
by Jor'Mox
Tue Sep 04, 2018 12:35 am
Forum: Help Forum
Topic: click callback on gauges
Replies: 3
Views: 781

Re: click callback on gauges

I’m not certain about gauges within Geyser, as it doesn’t use the gauges that Mudlet provides, but the standard Mudlet gauges actually use three labels, one for the back part of the gauge that you see, one for the front, and one for the text. This is because it used to be that the text was written o...