Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Josiah.Bruns
Apprentice


Joined: 04 Mar 2007
Posts: 103

PostPosted: Wed Sep 16, 2009 3:57 pm   

trying to get the mapper to work
 
I am trying to get a trigger to capture and set the room title and room exits info. unfortunatly the room description and room title don't show together in either verbose or brief mode.

This is my code:
#Trig (%*) {~((%*)~)
%roomname(,%1)

this is me trying to replace the word "and" and "," and " " thats commas spaces and the word and with either pipes or nothing.
%roomexit(,%concat("{",%replace(%replace(%replace(%2,",","|"),"and","|")," ",""),"}"))

one other issue i have is its sending the text to the mud i.e. %roomname(,%1) sends the text to the mud that i am trying to set in the mapper and the mud says >What?


here is the mud text i am working with.
Quote:
> e
The sign flashes a warning sign at you.
Farcaern Cathedral (north, south, east, west and southeast)
A tall statue of Talyessin.
A newspaper.
Wand of Printorn.
Packrat the Bringer of Death.
Jestre the Priest Guildmaster.
An obnoxious flashing sign. Your life may depend on reading it.
A large snow drift.
> e
The green east of the Cathedral (north, south, west, east and up)
> e
Highgate between the Laughing Swede and the Deity Booth (north, south, west and east)
> e
Highgate south of MacTavish's (north, west and east)
> e
Highgate (north, south, west and east)
> e
Highgate just west of the Porta Aurea (west, east and south)
> e
The Porta Aurea of Farcaern (north, south, west, east, northeast and southeast)
An accomplished young pickpocket.
A basilisk tooth.
A rusty dagger.
> The common street scum stares at you and your purse.
Reply with quote
Posideon
Beginner


Joined: 06 Feb 2005
Posts: 26

PostPosted: Wed Sep 16, 2009 4:41 pm   
 
To stop it from sending the information to the mud you want to #CALL %roomname that way it will process it, but not send as input.

as far as your replaceing "," " " and "and" to pipe chars and what you need you can use just this..

%replace(%replace(%1,", ","|")," and ","|")

that will replace ", " to "|" as well as change the " and " to "|" I tested that and it worked fine for me. Hope that helps
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed Sep 16, 2009 7:10 pm   
 
I think the mapper should be able to handle lines like this just fine, without you having to do anything at all. Just reconfigure it. Tell it you don't want to capture room descriptions, just room names and exits.

if you can't get the mapper configuration to work, it would probably be better to use #tag rather than calling %roomname yourself. For one thing, your trigger is going to try to rename the room every time it sees a line like that--an awful lot of extra calls to the mapper database.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net