[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  aliases/variables regarding stances
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

aliases/variables regarding stances

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Posted by Deldro09   (1 post)  [Biography] bio
Date Fri 06 Nov 2009 11:54 PM (UTC)
Hm... to start out, Lua looks quite demanding, but I want to know how can I do an attack where certain moves are based on stances, and if in one particular stance, you can do another set of moves that won't throw the proper stancing/attacks out of order. Here's an example:

Stances: Ein, Vae, Gya, Lya, Riz
Attacks: lateral, vertical.

The alias I want to use is like "bsh" for bash

Inside the alias, if in the Vae stance, I can only do "sitara lateral @target, sitara vertical @target
and if I am in the Ein stance, I have to do Sitara vertical @target, sitara lateral @target

How can that be placed correctly to bash with ease and flow properly between stances, when starting an attack with each denizen?
[Go to top] top

Posted by Blainer   (191 posts)  [Biography] bio
Date Reply #1 on Sat 07 Nov 2009 03:37 AM (UTC)

Amended on Sat 07 Nov 2009 03:39 AM (UTC) by Blainer

stances = {
            Ein = { "vertical", "lateral"},
            Vae = {"lateral", "vertical"}

So if I have a varaible set to my current stance called stance and one called target I can do this.
stances = {
            Ein = { "vertical", "lateral"},
            Vae = {"lateral", "vertical", "as many moves as I want"},
            Gya = {"vertiacal", "side ways", "etc"}
--I use the stance variable to reference the table with the moves in it.
first_move = stances[@stance][1]
second_move = stances[@stance][2]

--I put it together and send it to the MUD
Send("Sitara "..first_move.." "..@target)
Send("Sitara "..second_move.." "..@target)

This is sent to the MUD
>>Sitara vertical goblin
>>Sitara lateral goblin

I didn't test this and I think it's what you where asking for.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]