Search found 10 matches

by Ryan
Sat May 29, 2010 8:20 pm
Forum: Help Forum
Topic: [Solved]Function works with one word search but not 2 words
Replies: 4
Views: 3392

Re: Function works with one word search but not 2 words

I don't see any problems in the code you posted. But there are a few places where I know I'd be likely to get errors: - cntTbl[poisonType] isn't initialized to 0 for sea anemone poison types correctly (which means the multi-word thing would just be a coincidence) - psntbl isn't initialized properly ...
by Ryan
Wed Jul 22, 2009 4:28 pm
Forum: Help Forum
Topic: filter trigger problem
Replies: 2
Views: 3260

Re: filter trigger problem

Playing around with it a bit, I noticed a bug with selectCaptureGroup and replace that might cause you some stress. Basically, selectCaptureGroup selects by the position of the group in the line, but that position changes when you use replace on a previously captured group. Mudlet is smart enough to...
by Ryan
Wed Jul 22, 2009 3:07 pm
Forum: Help Forum
Topic: filter trigger problem
Replies: 2
Views: 3260

Re: filter trigger problem

Filter triggers actually only pass their capture groups (matches[1]) on to their children. So you'd need to put () around the regex in your InventoryFilter trigger to get it to pass that to the children. But just set it not to be a filter trigger, because non-filtered trigger groups pass the full li...
by Ryan
Wed Jul 22, 2009 3:26 am
Forum: Help Forum
Topic: disableTimer("name")
Replies: 3
Views: 3481

Re: disableTimer("name")

Re: first post--yeah, it looks like a bug to me. Disabling non-temp timers works just fine outside the timer's script, but doesn't seem to work inside the script, even if it's inside a function called from that script. The easiest workaround is probably just to have your Charge timer create a tempTi...
by Ryan
Sun Jul 12, 2009 12:57 pm
Forum: Mudlet Development
Topic: Displaying variables
Replies: 8
Views: 7908

Re: Displaying variables

Sorry, I had intended to post it as a package after cleaning the code up, but got distracted and forgot. Here it is!

And put my vote as a yes for treeviews. They're perfect.
by Ryan
Sun Jul 12, 2009 12:56 pm
Forum: Scripts & Packages
Topic: Pretty display for tables
Replies: 1
Views: 4421

Pretty display for tables

I got sick of trying to work with printTable, so I wrote my own display function. It can handle variables of any type including nested tables. It also lets you specify a format to use for number variables. Here's an example of how it looks on an arbitrary complex table: table { 1: 'first' 2: true 3:...
by Ryan
Sat Jul 11, 2009 10:37 am
Forum: Mudlet Development
Topic: Displaying variables
Replies: 8
Views: 7908

Re: Displaying variables

Actually, nearly all my useful variables are tables. I only have a handful of global variables that aren't tables, and most of those are ones I'll never need to think about again. A bunch of my most important tables are tables of booleans or nested tables, so printTable was basically useless. I fina...
by Ryan
Mon Jun 22, 2009 7:55 pm
Forum: Help Forum
Topic: multiline AND triggers: how to do them?
Replies: 1
Views: 3562

Re: multiline AND triggers: how to do them?

This is a perfect example of what I just requested in the feature requests thread. Here's how I'd solve this problem. Set the multiline/AND option for the first trigger and leave line delta as 1. Add a second condition as a Lua function: return line ~= "You ease yourself out of the Dragon stanc...
by Ryan
Mon Jun 22, 2009 7:19 pm
Forum: Mudlet Development
Topic: Last requests before feature freeze
Replies: 46
Views: 37478

Re: Last requests before feature freeze

This feature is already included. Chose the logical and trigger option and set line delta to 0. The trigger will only match if all conditions on the list are true on the same line. Then how do I make a multi-line trigger that explicitly _doesn't_ match on the same line? As an example, say I want to...
by Ryan
Mon Jun 22, 2009 1:38 am
Forum: Mudlet Development
Topic: Last requests before feature freeze
Replies: 46
Views: 37478

Re: Last requests before feature freeze

An option for multiline/AND triggers to require conditions to match on different lines. For instance, if I have a multi-line trigger with A as pattern 1 and B as pattern 2, the option would make it so the trigger won't fire on a single line that contains both A and B. An option to choose which captu...