I've been toying around with Lua on MUSHclient to create a script to use in a game, but so far I have been unsuccessful in getting it right. I looked through other forum posts but couldn't piece together how to use extended variables to switch the variables each time.
I'm trying to make a script that will build a ship on a MUD.
General syntax for the building is:
buildship <ship> <part>
where ship is the name of the ship frame and part is the name of one of four parts (hull, circuits, weapons, engines). I was trying to use extended variables, but couldn't place the script right for this part, so I used normal triggers to do it.
Once a part is built, the success message (as I don't fail the process) is:
You finish modifying the ship.
which should route back to the buildship <ship> <part> command using the same part.
Once one part of the ship is complete, it will say (upon trying to build the same part again):
Your <ship> doesnt need any more of that.
which was the queue to start building on a different part. I wanted the script to move to circuits (if currently on hull), weapons (if currently on circuits), or engines (if currently on weapons), but I couldn't figure out how to alter the variables to do this.
Can anyone help me develop a script that would do this? For all intents and purposes, I lack scripting knowledge, but I've been using the resources and still couldn't get the script right.
I'm using Lua, MUSHclient 4.24.
I'm trying to make a script that will build a ship on a MUD.
General syntax for the building is:
buildship <ship> <part>
where ship is the name of the ship frame and part is the name of one of four parts (hull, circuits, weapons, engines). I was trying to use extended variables, but couldn't place the script right for this part, so I used normal triggers to do it.
Once a part is built, the success message (as I don't fail the process) is:
You finish modifying the ship.
which should route back to the buildship <ship> <part> command using the same part.
Once one part of the ship is complete, it will say (upon trying to build the same part again):
Your <ship> doesnt need any more of that.
which was the queue to start building on a different part. I wanted the script to move to circuits (if currently on hull), weapons (if currently on circuits), or engines (if currently on weapons), but I couldn't figure out how to alter the variables to do this.
Can anyone help me develop a script that would do this? For all intents and purposes, I lack scripting knowledge, but I've been using the resources and still couldn't get the script right.
I'm using Lua, MUSHclient 4.24.