|
Scarn Apprentice
Joined: 24 Jul 2005 Posts: 137
|
Posted: Mon May 14, 2012 1:22 pm
CMUD Map Script issues. |
Hello all,
I've recently switched to CMUD (v3) and despite a few teething problems I'm now filly converted from my old zMUD. The only issue I can't seem to solve is the map rooms scripts!
I use simple scripts to make golding easier, and have a variable that changes in certain rooms.
Eg in a certain room I'd type "dodo" and because of the variable it would run a zMUD selling alias.
The issue I am having is when I type "dodo" it is just sending the name of the alias, not the alias itself... basically I can't set a variable to be an alias name.
Anyone else experiencing this? |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon May 14, 2012 5:27 pm |
You need to use the #SEND command. Commands cannot start with a variable. If the value of a variable is a command that you want executed by the mud, then you use #SEND @myvariable.
By the way, the best way to do this in Cmud 3.xx might be to define a generic alias "dodo", and define the variable in each room class. The room classes enable and disable automatically, so you should end up with only one variable enabled at a time. Is that how you are doing it? |
|
|
|
Scarn Apprentice
Joined: 24 Jul 2005 Posts: 137
|
Posted: Mon May 14, 2012 7:42 pm |
Yeah I get all that, and that is all working fine... my issue is this.
Example:
I walk into a room with a quest in it, and my Variable named DODO is changed to "armourqueststart".
I then have an alias (doit) that sends the Variable DODO, in this case.. doit would send armourqueststart.
This still happens, however 'armourqueststart' is a client alias.
In short, the way it used to work on zMUD is I'd walk into the room and type 'doit', that would then (through the use of a variable) send the client alias armourqueststart (which would move some stuff, climb stuff etc...).
On CMud with the map and aliases imported in from zMUD, it just sends the actual word armourqueststart and doesn't run the client alias.
I hope that explains it a little cleared. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon May 14, 2012 8:23 pm |
I'm pretty sure I do understand and this is what I was talking about before. This is a change in Cmud from Zmud. The problem is almost certainly in the alias "doit". How is it "sending" the variable DODO? Is the value of the alias simply "@DODO"? If so, that's why I said you cannot have a command start with a variable. It would work in Zmud but will not work in Cmud. If the value of the variable is a mud command, then you would do "#SEND @DODO". If the value of the variable is a Cmud command, you do "#EXEC @DODO". I believe in this case you need "#EXEC @DODO"
Note that #EXEC is extremely inefficient and should be avoided. It may be the simplest solution in this particular case, but you should keep it in mind.
Do you want this to happen _every_ time you enter the room? If so, there may be an alternative way of doing this. |
|
|
|
Scarn Apprentice
Joined: 24 Jul 2005 Posts: 137
|
Posted: Mon May 14, 2012 8:32 pm |
Nah, only want it to happen when I enter the command... I'm familiar with walk scripts, I rarely use them as I like to have full control over my character.
#EXEC worked, thank you so much! |
|
|
|
|
|