Mudlet Questions

by Rika

Back to Mechanic's Corner.

Unknown2012-04-26 04:20:40
^dooo (\\d+) (.+)$


local loop = 0
while loop < tonumber(matches) do
echo(matches)
loop = loop + 1
end


:P
Unknown2012-04-26 05:40:02
Draylor:

^dooo (\\d+) (.+)$


local loop = 0
while loop < tonumber(matches) do
echo(matches)
loop = loop + 1
end


:P


I saw what demonnic posted, I needed the breakdown of it. Beautiful! Thank you!
Zalandrus2012-04-28 20:28:26
A couple of best practice questions I guess:

-Maps: a long time ago I used to use the LMap, but I remember this not being that compatible with Mudlet. Is the best mapper/speedwalker to use now the in-game one? How do people deal with the limited radius of pathfinding?
-Composing: best way to get normal (not even fancy) formatting in news posts and other composed pieces?
Vadi2012-04-28 20:51:22
Use Mudlet's mapper, it does autowalking for you and comes with a map.

Composing: Mudlet opens a window for you that use can use to format stuff in.
Zalandrus2012-04-28 21:15:29
Awesome! Only thing is that the alias 'rf' doesn't seem to return anything for me (eg I do 'rf pool of stars', or 'room find pool of stars', and nothing happens). All the other mapping aliases work though...help?
Unknown2012-04-28 21:29:01
1. Click the package manager icon and remove the mapper scripts.

2. Install the updated script from here.
(Install via the script editor, not through the package manager.)

3. Restart Mudlet.

4. Enjoy :)
Aldani2012-05-03 19:18:18
Am I missing some obvious way to have the mapper open doors?
Daganev2012-05-03 19:50:26
I don't have a system yet so many of the functions aren't defined yet, but I've written what I think might be some valid lua scripts for my offense. Is this the right place for people to look it over and tell me if it makes sense or what I'm missing? Or is this for more quick and easy questions?
Vadi2012-05-03 20:14:05
Aldani:

Am I missing some obvious way to have the mapper open doors?


That's been added recently, just update your mapper script.
Daganev2012-05-04 13:22:00
I'm trying to make a trigger to ID my current weapons.

Attached is a screenshot. Can someone please explain why I'm not getting any echos? Thanks (I do get echos in other triggers)

http://www.daganev.com/images/weaponsImage.jpg
Ushaara2012-05-04 13:44:54
Looks like you need to tick the 'multiline/AND' box, and should then have leftWeapon = multimatches and rightWeapon = multimatches.

matches matches the whole line, the first wildcard takes matches. First argument of multimatches is the line number, second the wildcard.
Daganev2012-05-04 13:52:37
Ushaara:

Looks like you need to tick the 'multiline/AND' box, and should then have leftWeapon = multimatches and rightWeapon = multimatches.

matches matches the whole line, the first wildcard takes matches. First argument of multimatches is the line number, second the wildcard.



Thanks, but the Echo still isn't showing up. Is there a way in mudlet to see the current value of a var without echo or send?

edit: I disabled the "multiline" feature and kept hte multimatches and . Now I get a new echo line which reads "test", before I assign any variables, and that line echoes out great. However any line after the assigning of variables does not work.
Daganev2012-05-04 14:25:32
Could be, but I feel like it's something else. If you notice in the image, the trigger is highlighting the matched words correctly. But I'll try that luacode from command line thing. Thanks.

Well that scripting utility worked wonders!

The final working code was as follows:


echo("test ")
leftWeapon = "same"
rightWeapon = "other"
leftWeapon = string.trim(multimatches)
rightWeapon = string.trim(multimatches)
echo("Left weapon is "..leftWeapon.." and Right weapon is "..rightWeapon)

Output was:


ii weapon
You are wielding:
hammer7933 : Aynaral, the Merciless in your left hand.
hammer8689 : Elyks, Shadow of the Dusk in your right hand.test Left weapon is hammer7933 and
Right weapon is hammer8689




Apparently there were some leading spaces in the line that were getting caught, and those spaces messed up the echo somehow.

I set the trigger to multiline obviously.
Ushaara2012-05-04 14:36:08
Hrmwrm. This working fine for me as a reference anyway: http://i.imgur.com/wZGMW.png
Daganev2012-05-04 14:41:50
Daganev2012-05-06 06:40:41
Say I have a multi-line trigger, how can I gag all the lines that match the pattern and then display my own custom echo?
Unknown2012-05-11 14:41:51
I'm sorry if this has been asked before, but is there an efficient way to share packages between profiles? As in, have changes you make to the code in one package be reflected across any profiles using that package?

I guess it has to do with the way mudlet saves and loads packages, I'm just not sure how that works yet. I noticed when I created a new profile that the mudlet_mapper was already there, so it must save that in some shared local directory...just not sure how I could mimic that for certain scripts I want every character to be able to utilize.
Neos2012-05-11 14:44:13
Deschain:

I'm sorry if this has been asked before, but is there an efficient way to share packages between profiles? As in, have changes you make to the code in one package be reflected across any profiles using that package?

I guess it has to do with the way mudlet saves and loads packages, I'm just not sure how that works yet. I noticed when I created a new profile that the mudlet_mapper was already there, so it must save that in some shared local directory...just not sure how I could mimic that for certain scripts I want every character to be able to utilize.

That mudlet_mapper script is the basic one packaged with mudlet, it's not very good.
http://forums.mudlet.org/viewtopic.php?f=7&t=2423