New to Mudlet

Post Reply
Tsara
Posts: 6
Joined: Sat Feb 06, 2010 11:09 am

New to Mudlet

Post by Tsara »

Hello everyone, today I played around a bit with Mudlet and so far I like it.
It feels fast and looks clean. Two things that greatly frustrated me in Zmud, namely how to address variables and a lack of a decent math library are solved in Mudlet.

Now there are some things that annoy me and I hope that there is a workaround them or that I am doing something wrong cause these already start to irritate me.

First off all I don't like the decision to make all variables global. Its far more practical to not be bothered with variables or aliases outside the scope you are working on. The workaround to use longer names works, but it makes your code unclear and longer. Then again I might get accustomed to it and I did not use it in Zmud either. I tried it though but couldn't let it work consistently without having to resort to unique names.

A more problematic issue however is that I can not group keys, aliases or triggers. For example I made 12 keys that map my numerical keypad keys to send various movement directions to the mud. When I make a group called movement (without an assigned command or key) and drag and drop the keys into it, they are placed outside of the group each time I log back in. Doesn´t matter if I save my profile and the group with the keys itself. What I basically want is that I can group keys inside a folder or even better yet: group several keys, aliases and triggers in the same folder so these are abstracted for my view (even though they are all global) and be able to activate or deactivate such a group of items when I need.

There really should be a way to select several items and manipulate them all at once.

Is it possible to make a copy of a key or alias as I find a lot of my keys, like the movement keys, are very similar and I don't want to fully type each of them. Or better yet, be able to define a proto type alias and then use new proto type to fill in the particular details.

Why does Mudlet change my keyboard (language) settings?

User avatar
Jules
Posts: 118
Joined: Sun Oct 11, 2009 5:41 pm
Location: Plymouth State University - Sophomore

Re: New to Mudlet

Post by Jules »

Lua makes use of the LOCAL method, which keeps variables inside of the scope of what you are doing, which is just what you want. Mudlet's Global Variable system is useful when building complex combat systems, which take input from a number of places, and can keep track of variables accordingly. For example:

Code: Select all

function testFunction()
local test = 20
send("print " ..test)
end
Obviously, that's a pretty simple example, but if you pasted that into your own scripts, you couldn't call the variable "test" outside of the function testFunction().

On the note of keys not staying in groups, I had that problem with Mudlet back in 1.0.4, when on Windows. What version of Mudlet are you using right now?

The way that you should be grouping things is by making a new group, clicking on the group, then making a new item to fall within that group, instead of making a whole bunch of items and drag-dropping them into their correct place. That's what helped me out when I had that problem, however... Maybe it's a bug in the system?

Tsara
Posts: 6
Joined: Sat Feb 06, 2010 11:09 am

Re: New to Mudlet

Post by Tsara »

Well I am using version 1.06 but I was told there was still a bug with grouping keys.

Local is only used inside functions correct? I just read from http://www.lua.org/pil/15.2.html about local and it looks like several of my other questions are answered there too.

User avatar
Jules
Posts: 118
Joined: Sun Oct 11, 2009 5:41 pm
Location: Plymouth State University - Sophomore

Re: New to Mudlet

Post by Jules »

Local is mostly used within Functions, but realistically, it can be used within anything that requires a variable. Locals are great when simplifying code down because you can localize variables easier, to shorten commands up.

Denarii
Posts: 111
Joined: Thu Dec 03, 2009 10:54 pm

Re: New to Mudlet

Post by Denarii »


Post Reply