|
adamwalker Apprentice
Joined: 12 Mar 2005 Posts: 195
|
Posted: Sun Mar 11, 2007 11:14 am
Help wanted. How to input room description into mapper. |
Ok, what I want to do is run an alias that will "look".
Then what will happen is any text after trigger "%e[1;33m(%1)%e[0m." will be added to a variable.
Then when the line "You notice*" (Which is the end of the description) is recieved it will add all the contents of the variable into the room description.
There is also line breaks in the description so i need something that will successfully shuve em all together into the variable
Thanks, been tryin to get this to work for ages! |
|
|
|
adamwalker Apprentice
Joined: 12 Mar 2005 Posts: 195
|
Posted: Sun Mar 11, 2007 11:34 am |
what i do have.. but cant get it to work is....
state 1 %e[1;33m(%1)%e[0m.
#var myvar {}
#TEMP {*You notice {exits|a single}*} {
#noop %roomdesc( , @myvar)
#STATE myTrig 0
}
state 2 (*)
#addi myvar %line
which is all activated, and look entered, by an alias. all this worked (i think) in zmud |
|
|
|
adamwalker Apprentice
Joined: 12 Mar 2005 Posts: 195
|
Posted: Sun Mar 11, 2007 11:39 am |
so this is how it happens...
I run an alias that activates the trigger and look is entered
%e[1;33mROOM NAME%e[0m. (or whatever) is recieved and the temp trigger is made
then the 2nd state adds ALL TEXT RECIEVED to @myvar.
then the temp trigger fires at the end of the text (you notice exits north etc).
The triggers are disabled and the %roomdesc is added to the current room on the map
but the problem seems to be is that the 2nd state doesnt actually fire.... |
|
|
|
adamwalker Apprentice
Joined: 12 Mar 2005 Posts: 195
|
Posted: Sun Mar 11, 2007 12:32 pm |
You will all be happy to know... i have done it!!!!! one final problem tho. heh.
to make it one long full description i need to delete the | separators.
What i get is
line one contents|line two contents|line 3 contents
what i need is
one contents line two contents line 3 contents
so this was my idea was this
myvarb = %subregex( %trim( @myvara), " ", "|")
but its causing cmud to freeze |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sun Mar 11, 2007 1:27 pm |
myvara=%replace(@myvara, "|"," ")
Will replace | with spaces no need to use myvarb |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Tue Mar 13, 2007 12:02 pm |
You want it as one long line? I don't see the point, heh.
You might like this, though. If you want to be able to add multiline descriptions that are contained within your variable, you can use this:
#noop %roomdesc(%roomvnum(),%replace(@Myvar,"|","[%cr]")) |
|
|
|
|
|