Grouping issues

Posted by AesInkdancer on Sun 12 Oct 2008 04:10 PM — 6 posts, 22,830 views.

#0
I'm using MUSHclient to play Achaea, having just moved over from Nexus, and grouping is not working for me.

Before, I could just type #groupoff travel to turn off my travel group, but now that doesn't work, even if I change my speedwalk symbol to something other than #.

I tried using the 'world.EnableGroup "group", 0' command, but it doesn't do anything except confuse the system.

What am I doing wrong?
USA #1
Lua doesn't see 0 as false. use true and false instead.

world.EnableGroup 'travel', false
Australia Forum Administrator #2
Quote:

I tried using the 'world.EnableGroup "group", 0' command, but it doesn't do anything except confuse the system.


The words "confuse the system" have confused the programmers.

If I try your example I actually got:


 unexpected symbol near ','


The actual error message always helps. :)

In Lua if you have multiple arguments you have to put them in brackets, like this:


world.EnableGroup ("foogroup", false)

-- or

world.EnableGroup ("foogroup", true)


A bit of testing shows that, whilst WillFa is right about Lua in general treating 0 as true, the function EnableGroup will actually work correctly if you use 0 and 1, it was the brackets that were your problem.

#3
Error message from Achaea:

1286h, 1803m ex-world.EnableGroup 'travel', false
You've baffled me!

(It gives me the phrases normally used to respond to typos in commands)
Netherlands #4
Put a / in front of the command, or whatever you have selected as Script Prefix in the Configuration -> Scripts section.
Australia Forum Administrator #5
I notice you have chosen to not follow my suggestion about putting brackets around the arguments. If you are using Lua you need those.

If you want to make an alias to do that it needs to do "send to script", here are examples:


<aliases>

  <alias
   match="#groupoff"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>
EnableGroup ("travel", false)
Note ("Travel group now OFF")
</send>
  </alias>

  <alias
   match="#groupon"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>
EnableGroup ("travel", true)
Note ("Travel group now ON")
</send>
  </alias>

</aliases>


See: http://mushclient.com/pasting for how to copy those examples into the client.