Search found 176 matches
- Sat Jan 07, 2012 3:54 pm
- Forum: Mudlet Development
- Topic: Feature Request - show line number
- Replies: 12
- Views: 8842
Re: Feature Request - show line number
I see no issues with large scripts in Mudlet itself. Mudlet may not offer all the functionalities of a dedicated script editor, but it works well enough for my purposes, and I find it more comfortable to have everything in one place than having to toggle to other programs/files to edit some of my sc...
- Sun Oct 09, 2011 9:36 pm
- Forum: Help Forum
- Topic: Weird Lua misbehavour - what am I missing here?
- Replies: 4
- Views: 3141
Re: Weird Lua misbehavour - what am I missing here?
Ooh, I think you got it Vadi. I didn't even know you could use > and < on strings, so I assumed that if they were strings I would have got an error, so I didn't look into that much further. Turns out I was wrong! They are indeed strings. Well, they were strings, since obviously I fixed that now! Was...
- Sun Oct 09, 2011 6:48 pm
- Forum: Help Forum
- Topic: Weird Lua misbehavour - what am I missing here?
- Replies: 4
- Views: 3141
Weird Lua misbehavour - what am I missing here?
All right. I have the following bit of code somewhere: if (vitals.health>=oldhealth) and not ((vitals.health==vitals.maxhealth and vitals.mana==vitals.maxmana) or paracelsus.afflicted("blackout") or parry.succeeded or paracelsus.hit_avoided) then paracelsus.illusionDetected = true para.not...
- Thu Sep 29, 2011 6:03 pm
- Forum: General Forum
- Topic: Mudlet features and API requests
- Replies: 535
- Views: 652828
Re: Mudlet API requests
Functions to get the html code of the currently selected line. IE getHtml(window,linenumber) if no window, main is used. If no line number, then the last non ga or newline line is used. getHtml() would return the full html code of that line (exactly how copy html in the right context menu does) for...
- Mon Sep 19, 2011 2:00 am
- Forum: Help Forum
- Topic: Help with Table sorting
- Replies: 12
- Views: 7460
Re: Help with Table sorting
You wanted to sort the first table to become the second, no? That's what my script does. Use it on {"g","wh","t","h","th"} and it will give you {"th", "wh", "g", "h", "t"} If that's not what you meant...
- Mon Sep 19, 2011 1:04 am
- Forum: Help Forum
- Topic: Help with Table sorting
- Replies: 12
- Views: 7460
Re: Help with Table sorting
I have a table: begins_with = {"g","wh","t","h","th"} How do I sort them to something like this: begins_with ={"th","wh","g","h","t"} I tried using table.sort I don't think I am doing it correctly. f...
- Sun Sep 18, 2011 8:59 am
- Forum: Help Forum
- Topic: help with triggering on a lua function
- Replies: 5
- Views: 3575
Re: help with triggering on a lua function
In response to Manni's post: There's no real reason for doing that stuff. Why fire off prompt when you want to only fire when a certain variable is set? The trigger in the OP is the best way of doing this, except it will only fire when a line is received (but so will a prompt trigger). And if you do...
- Sat Sep 10, 2011 12:56 pm
- Forum: General Forum
- Topic: Mudlet features and API requests
- Replies: 535
- Views: 652828
Re: Mudlet API requests
I would like to see a table.match function. Syntax: table.match(s,pattern,var1,var2,...varN,varN+1) -- test to see if string s matches the given Pattern. If it matches, the position of the match in the string is returned (starting with 1). If it doesn't match, zero is returned. The optional VarN ar...
- Sun Sep 04, 2011 11:32 pm
- Forum: Help Forum
- Topic: Achaea EXP Show, not working?
- Replies: 8
- Views: 5470
Re: Achaea EXP Show, not working?
Oh one further thing. You need to initialise lastXP for the first time, otherwise it's still nil. So put this on top of the script, before the function:
lastXP = lastXP or tonumber(gmcp.Char.Vitals.nl)
That way, if lastXP is still undefined, it will be set to your current XP.
lastXP = lastXP or tonumber(gmcp.Char.Vitals.nl)
That way, if lastXP is still undefined, it will be set to your current XP.
- Sun Sep 04, 2011 11:07 pm
- Forum: Help Forum
- Topic: Achaea EXP Show, not working?
- Replies: 8
- Views: 5470
Re: Achaea EXP Show, not working?
if not tonumber(gmcp.Char.Vitals.nl) == lastXP then This line is the problem. The reason it isn't working is the order the operators are called. "not" has a higher order than "==" and is thus evaluated first. Thus, your line is, spelt out with brackets: if (not tonumber(gmcp.Cha...