Unknown2010-10-26 14:46:01
Where can I find a list of colours that Mushclient will accept. Eg. lightblue, dimgrey, white, etc.
Esano2010-10-27 07:13:31
CODE
 Â
  enabled="y"
  regexp="y"
  send_to="12"
  sequence="100"
  >
 Â
 Â
Be warned, it's a long long list.
Unknown2010-10-27 07:57:48
Awesome, it even shows the colours! Thanks!
Unknown2010-10-27 07:57:48
Whoops, double post
Unknown2010-10-27 07:58:10
Bleurgh, triple post?!
Neos2010-10-29 04:04:56
How do I remove mush from my comp? Do I just delete all relevant files? I'm not seeing an uninstall option.
I just want it gone.
I just want it gone.
Faymar2010-10-29 07:51:33
QUOTE (Caerulo @ Oct 26 2010, 05:46 PM) <{POST_SNAPBACK}>
Where can I find a list of colours that Mushclient will accept. Eg. lightblue, dimgrey, white, etc.
Edit -> Colour Picker
or
CTRL+ALT+P
Lendren2010-11-03 16:09:26
It's always the simplest things that get me stuck. In a menu alias, how can I evaluate something like GetInfo() in the middle of a command to be sent to the MUD (e.g., "honours GetInfo(86)" to get the honors of the name under the cursor)?
Simple things usually get me hung up because MUSHclient's help files are so badly organized, and you can't find the answer in a search because there's no words to search on that won't be in a frillion other topics.
Simple things usually get me hung up because MUSHclient's help files are so badly organized, and you can't find the answer in a search because there's no words to search on that won't be in a frillion other topics.
Unknown2010-11-03 16:48:26
Send("honours " .. GetInfo(86))
Would be the syntax, but I can't find what is GetInfo(86). The help files seem to stop at 84, then skip to 101.
Would be the syntax, but I can't find what is GetInfo(86). The help files seem to stop at 84, then skip to 101.
Unknown2010-11-03 16:53:57
GetInfo help shows that 86 is the word under the cursor. Lendren's question was about Lua syntax more than MUSHclient, which is the source of confusion for most people learning MUSHclient coding.
Lendren2010-11-03 18:42:16
QUOTE (Caerulo @ Nov 3 2010, 12:48 PM) <{POST_SNAPBACK}>
Send("honours " .. GetInfo(86))
Would be the syntax, but I can't find what is GetInfo(86). The help files seem to stop at 84, then skip to 101.
Would be the syntax, but I can't find what is GetInfo(86). The help files seem to stop at 84, then skip to 101.
That, plus setting the Send To to "Script" (not "Execute" as was my first guess) is what did it. Thanks!
Esano2010-11-04 06:22:53
Execute basically parses it as if you typed it in and hit enter - checks for aliases and such.
Unknown2010-11-04 06:28:45
Heh, Execute kills my Mushclient far too many times because I forgot to check if my alias created an infinite loop or not.
Eg.
Alias: get gold
Send: get gold
put gold in pack
Send to: Execute
GET GOLD
*pause for a moment*
put gold in pack (X infinity)
Mushclient hangs.
Oops.
Eg.
Alias: get gold
Send: get gold
put gold in pack
Send to: Execute
GET GOLD
*pause for a moment*
put gold in pack (X infinity)
Mushclient hangs.
Oops.
Unknown2010-12-09 11:33:06
I'm trying to create a table within a table if it doesn't already exist, using a function:
So, if I did
I would get
When what I wanted is
How do I go about getting the result I want?
CODE
if not flesh then
  flesh = {
    fleshcount = {}
  }
end
function flesh:addname(name)
  if not flesh.fleshcount.name then
  flesh.fleshcount.name = {}
  end
end
return flesh
  flesh = {
    fleshcount = {}
  }
end
function flesh:addname(name)
  if not flesh.fleshcount.name then
  flesh.fleshcount.name = {}
  end
end
return flesh
So, if I did
CODE
flesh:addname(Tester)
or
flesh:addname("Tester")
or
flesh:addname("Tester")
I would get
CODE
name table: 05C4BF08
When what I wanted is
CODE
Tester table: 05C4BF08
How do I go about getting the result I want?
Esano2010-12-09 13:19:27
Don't use the shorthand - rather than
flesh.fleshcount.name = {}
do
= {}
so it knows what's a variable and what's a string.
flesh.fleshcount.name = {}
do
= {}
so it knows what's a variable and what's a string.
Unknown2010-12-09 13:52:01
Thanks!
Although, for some reason, I couldn't get it to work with
= {}
but had to use
flesh = {}
instead, which worked!
Although, for some reason, I couldn't get it to work with
= {}
but had to use
flesh = {}
instead, which worked!
Unknown2010-12-09 14:30:46
The first part must be a valid variable, so the second syntax is the correct one. When using a variable as the key, you need the square bracket syntax instead of the dotted notation. You also need the square brackets when your key has spaces or other non-alphanumeric characters in it.
And, you can use a Lua shorthand trick to initialize a table with a single line:
And, you can use a Lua shorthand trick to initialize a table with a single line:
CODE
flesh.fleshcount = flesh.fleshcount or {}
Sylphas2010-12-19 03:00:03
How do I set up a temporary timer that sends autoreply:deleteQuerent(person) after a certain amount of time? DoAfter only sends to world. AddTimer isn't kicking out errors, but isn't actually adding a timer that I can see, either. For reference, I've been trying something like: AddTimer("", 0, self.timeout, 0, "", 16389, "autoreply:deleteQuerent(" .. person .. ")")
Unknown2010-12-19 03:05:40
Try DoAfterSpecial. I use ImportXML to make my own custom timers with all the options I need.
Sylphas2010-12-19 03:40:40
QUOTE (Zarquan @ Dec 18 2010, 10:05 PM) <{POST_SNAPBACK}>
Try DoAfterSpecial. I use ImportXML to make my own custom timers with all the options I need.
That worked well, thanks! Last question: does Lua have a built in ismember function of some sort to check if something is in a list? I seem to recall seeing one, but I forget what it is and had written my own because I assumed it didn't.