Search found 27 matches

by EulersIdentity
Thu Aug 18, 2016 12:24 am
Forum: Help Forum
Topic: Text to textfile.
Replies: 5
Views: 1298

Re: Text to textfile.

It looks like he just added some error checking to the normal file IO functions for Lua. They should behave similarly to the standard io functions. There are tutorials on the io library -Here- and -Here- . To use his script, just copy-paste the whole thing into an empty script in Mudlet and you shou...
by EulersIdentity
Sat Aug 13, 2016 6:23 pm
Forum: Help Forum
Topic: How would I disable two triggers?
Replies: 1
Views: 760

Re: How would I disable two triggers?

Not sure I'm catching exactly what you want.

Name = TriggerFoo
Code: [show] | [select all] lua
send("Foo")
Name = TriggerBar
Code: [show] | [select all] lua
send("Bar")
disableTrigger("TriggerFoo")
disableTrigger("TriggerBar")
When 'TriggerBar' is matched, it should disable itself and 'TriggerFoo'. I hope that's what you're looking for.
by EulersIdentity
Fri Aug 12, 2016 12:13 am
Forum: Help Forum
Topic: Multiple alignments in geyser label?
Replies: 0
Views: 1158

Multiple alignments in geyser label?

I'm concatenating a bunch of strings, then echoing to a label. I want part of each line on the left, part on the right. I've tried <font align='left/right'> as well as <left>/<right> and neither are working. What do I do? Here's the kind of thing I'm attempting: -- update ih window function gui.ih_u...
by EulersIdentity
Tue Aug 02, 2016 4:10 pm
Forum: Help Forum
Topic: help with script
Replies: 6
Views: 1906

Re: help with script

What SlySven said. Here's a list of metacharacters. And HERE is an tool that'll let you check if your regular expressions are right. Using the start of line and end of line characters isn't necessary, but is generally recommended, as it prevents your trigger from matching unintended things. Like, if...
by EulersIdentity
Mon Aug 01, 2016 3:28 pm
Forum: Help Forum
Topic: help with script
Replies: 6
Views: 1906

Re: help with script

The trigger line will depend on the prompt.You'll want to brush up on your regular expressions if you haven't already. A simple example is that if your prompt reads thus: HP: 125 MP: 98 Then you'll make your trigger expression ^HP: (\d+) MP: (\d+)$ The (\d+) part captures any number which you can ge...
by EulersIdentity
Mon Aug 01, 2016 3:10 am
Forum: Help Forum
Topic: Easy way to check if a database entry exists
Replies: 0
Views: 1275

Easy way to check if a database entry exists

I want to check if a row exists with a particular field value and get a boolean value of whether or not it's there. Here's what I'm doing right now: function db_exists(sheet, field, val) local t = db:fetch(sheet, db:eq(field, val)) if t[1] then return true else return false end end Is there a quick ...
by EulersIdentity
Thu Aug 06, 2015 4:44 pm
Forum: General Forum
Topic: Mudlet features and API requests
Replies: 520
Views: 256936

Re: Mudlet features and API requests

I'm speaking from a position of ignorance, so sorry if this is nonsense, but wouldn't it be best to put the location of the settings files as early as possible in the hierarchy? Any time I've coded something that relies on a configuration file to determine its behavior, I've put that file in the sam...
by EulersIdentity
Thu Aug 06, 2015 4:27 pm
Forum: Help Forum
Topic: Ordering pets to move
Replies: 2
Views: 1027

Re: Ordering pets to move

You can capture the entire string of directions, then split the string up. Trigger: ^\(mapper\) (.+)\.$ Set up this function: function splitAtComma (str) local splitted = {} str = tostring(str:gsub(",","")) if string.find(str," ") then for word in string.gmatch(str, "%a+") do table.insert(splitted,w...
by EulersIdentity
Thu Aug 06, 2015 3:57 pm
Forum: General Forum
Topic: Mudlet features and API requests
Replies: 520
Views: 256936

Re: Mudlet features and API requests

[ ALERT ] - Socket got disconnected. English grammar dictates that this should be "Socket was disconnected." On a more serious note I would love an option in the settings menu to set the location of the profiles directory. I know that things like the symlink workaround exist, but this seems like ove...
by EulersIdentity
Thu Aug 06, 2015 3:47 pm
Forum: Mudlet Development
Topic: Mudlet 3.0.0-delta (preview #4)
Replies: 146
Views: 160633

Re: Mudlet 3.0.0-delta (preview #4)

Something that might have been related to my previous searching crashes: I've had a few times recently where I was selecting large amounts of text in the buffer and Mudlet crashed. It always happened when the buffer was scrolling quickly. I only mention this because the find next buttons also scroll...