Mudlet Questions

by Rika

Back to Mechanic's Corner.

Sylphas2010-12-27 18:01:31
QUOTE (AquaNeos @ Dec 27 2010, 12:42 PM) <{POST_SNAPBACK}>
Capitalizes the word. I believe that's the second time you've made a function of your own, while there was already something there.


Yeah. sad.gif That'll teach me to use the first library reference I find on google.
Unknown2010-12-28 05:19:22
QUOTE (Sylphas @ Dec 27 2010, 06:01 PM) <{POST_SNAPBACK}>
Yeah. sad.gif That'll teach me to use the first library reference I find on google.


From my own recollections at 05:00h, string.title is actually part of the Mudlet API rather than directly from Lua. Just a random FYI.

Lua-users.org, my friend. smile.gif

In fact, check this page.

I think you will like.
Sylphas2010-12-28 05:23:39
QUOTE (Draylor @ Dec 28 2010, 12:19 AM) <{POST_SNAPBACK}>
Lua-users.org, my friend. smile.gif

In fact, check this page.

I think you will like.


string.title() is not on that sheet, nor is there a function to tell you if a given value is found in a table. tongue.gif
Unknown2010-12-28 05:34:17
QUOTE (Sylphas @ Dec 28 2010, 05:23 AM) <{POST_SNAPBACK}>
string.title() is not on that sheet, nor is there a function to tell you if a given value is found in a table. tongue.gif


Read my reply closer. You must have read it before my edit.

Also, of course there is no function to check a value in a table. That PDF is a reference, not a tutorial scream.gif
Neos2010-12-28 05:49:57
QUOTE (Draylor @ Dec 28 2010, 12:19 AM) <{POST_SNAPBACK}>
From my own recollections at 05:00h, string.title is actually part of the Mudlet API rather than directly from Lua. Just a random FYI.

Lua-users.org, my friend. smile.gif

In fact, check this page.

I think you will like.

I swear I saw string.title on the lua online manual, but after searching thoroughly through it, no luck. Turns out it is just for mudlet. I didn't know that.
Section pertaining to string functions for the regular lua API.
Unknown2010-12-30 01:51:46
I'm not sure what's going wrong here, but I have an alias that does this

CODE
function = on
enableTrigger()
blah


The key part being defining variable 'function' as 'on'.

Then I have a trigger that does this

CODE
if function == on then
   echo()
else
end


But the trigger is not responding to the function defined by the alias i.e. it's ignoring the value of 'function' and is firing regardless if it's 'on' or 'off'

Such a simple thing but I can't get it to work.
Unknown2010-12-30 02:24:08
You cannot have a variable called 'function'

You can, however, use:

CODE
= 1
notation.

Also, I am not sure you can use on and off as booleans in Lua, too. Could be wrong on that though, so check.
Vadi2010-12-30 02:33:15
true/false as booleans
Sylphas2010-12-30 02:42:10
You can use on exactly as you are, you just need quotes around it to make it a string. If you want a real boolean, use true/false, like Vadi said.
Jules2010-12-30 04:24:51
So, to put that into context:
CODE
function_ = "on"
if function_ == "on" then
  --$#!*'s goin' down
else
  --Moar stuff's goin' down
end

Following Python notation (which I use for scripting languages, though your mileage may vary), end any built-in keywords with an underscore to make it perfectly viable. It reads essentially the same, just ignore that underscore!
Unknown2010-12-30 04:34:57
Thanks everyone, it's the notation that gets to me all the time. All better now.
Dysolis2010-12-30 05:45:42
How do you stop m&m from auto rejecting lusted people?
Lilia2010-12-30 05:47:33
mmignore lovers
Dysolis2010-12-30 08:25:07
thanks!
Daraius2010-12-30 15:45:03
Er, I opened up Mudlet for the first time in a while, not having changed any of my settings or anything since last time, and I got this:

An open landing.
Banks of clouds roil about here. The wide spiral stair of the gallery twists
both upwards and down from here, joined by this small landing. To the south a
sweeping view of the main hall can be seen beyond the low, yellow quartz
balustrade which matches the taller banister of the winding stairs. The round
walls of the cylindrical stairwell are formed of opaque, flax colored beryl,
flooding the place with soft light. Narrow, clear panel windows are set at
irregular angles and varying heights, that beams of light refract across the
floor and walls in a bright, crisscrossed lattice all the way up the stairwell.
Away from the landing, short hallways adorned with small, crystal framed color
studies, lead off to individual studios
Surrounded by forks of yellow lightning,
a silver thunderbird spreads his broad, leathery wings here, jade eyes glowing
with a noble intellect.
You see exits leading north, #FFFF00>south, up,
and down.



How to fix?
Ileein2010-12-30 16:05:53
Try CONFIG MXP OFF.
Dysolis2011-01-01 19:30:12
QUOTE (Ileein @ Dec 30 2010, 11:05 AM) <{POST_SNAPBACK}>
Try CONFIG MXP OFF.


how would you do a target in the middle when generally I'm used to doing send("point staff" ..target)
INFLUENCE WITH LIBERTY
Anisu2011-01-01 19:43:32
QUOTE (Dysolis @ Jan 1 2011, 08:30 PM) <{POST_SNAPBACK}>
how would you do a target in the middle when generally I'm used to doing send("point staff" ..target)
INFLUENCE WITH LIBERTY

send("influence " .. influenceTarget .. " with liberty")
Lilia2011-01-01 20:02:36
I think a major point to make here is -never- use the same variable for bashing and influencing. That's how you get Fraesic to freeze everyone at the Matrix.
Dysolis2011-01-01 23:11:01
Ok in the system M&m i'm using, there is a reflex from the geomancy meld that I think is the tremors effect. Everytime that message fires I do "stand' and everytime I stand it shows up as I stand up but when I don't really need to. Will I use the same mmignore command to ignore that message or is there another way to go about it?