Sending variables with script

Posted by Cyrgon on Thu 14 Jun 2007 04:26 PM — 5 posts, 23,431 views.

#0
Alright, so I have an alias named test.
Within, I have lua script as such:

var = tonumber (GetVariable("x")) or 0

Now, I want to Send this variable to the mud like this:

Send(say <var>)

Is this possible in any way?
I've looked through the help, the faq, searched on the forum, checked lua functions, and I've found nothing.

Anyone able to help? :)
USA #1
Send( "say "..var )

Send will push a string to the mud, so you just send it as a string.
#2
Sweet. Thanks man.
USA #3
Here's a good thing to get in the habit of doing. When you are looking to use a MUSHclient function, look it up in the list of script functions, and check the data types required. Then if you're unsure of certain methods used to alter the data in that data type, look it up in the lua tutorial provided at the lua wiki. This has saved me countless hours of trying to figure out some of these things on my own.

MUSHclient function list:
http://www.gammon.com.au/scripts/function.php
For a nice tutorial on Lua:
http://lua-users.org/wiki/TutorialDirectory
#4
Thanks a lot. That helped me out quite a bit.