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
Wspaedt1977
Beginner


Joined: 13 Feb 2022
Posts: 13

PostPosted: Mon Feb 14, 2022 12:06 am   

Help this poor idiot out.
 
If you want to give someone my location when they ask for it say in Communication Channel, I believe I'm on the right track but just missing a step.

[Channel:] Person name: Locates

So trigger pattern would be: (%w) Locates

In the command box for CmuD i put: channel I am standing here at: @room and @roomdirs

I have setup in variables: @room and @roomdirs
but not sure how to capture the data for the @room and @roomdirs variables.


FYI this is what a room looks like: Circular Courtyard [e].
Reply with quote
chaossdragon
Apprentice


Joined: 09 Apr 2008
Posts: 167

PostPosted: Mon Feb 14, 2022 5:10 am   
 
This should "work" but someone with a higher paygrade may have a better option...
#TR {^&{room} ~[&{roomdirs}~]$} {}
Reply with quote
Wspaedt1977
Beginner


Joined: 13 Feb 2022
Posts: 13

PostPosted: Mon Feb 14, 2022 11:58 pm   
 
I couldn't get it to work.
Basically what I trying to do is capture the room I standing in and the exit there.
And be able to tell them where I'm located

I'm willing to start from beginning if I can get it to work.
Reply with quote
mikeC130
Apprentice


Joined: 03 Jul 2006
Posts: 108

PostPosted: Tue Feb 15, 2022 3:49 pm   
 
If CMUD is mapping for you, the variables you are looking for are already available. In particular, the %roomname() variable will return the name of your current room, and %roomexit() should return the list of exits.
Reply with quote
Wspaedt1977
Beginner


Joined: 13 Feb 2022
Posts: 13

PostPosted: Tue Feb 15, 2022 4:59 pm   
 
No no using the mapper at all. Maybe that is the problem...
If not using the mapper how does one grab the info.

Thanks
Reply with quote
hpoonis2010
Adept


Joined: 18 Jun 2019
Posts: 279

PostPosted: Wed Feb 16, 2022 6:24 am   
 
You would have to ALIAS your mud 'look' command.

Then apply triggers against the room info. Something like...

#ALIAS clook {
#T+ clook_trig
}

#TR clook_trig {(room name pattern)} {
$roomname=%trim(%1)
#SEND shout 'I am in room $roomname'
#T- clook_trig
}
Reply with quote
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 175

PostPosted: Tue Mar 15, 2022 6:54 pm   
 
(%w) Locates <--- someone asking for location?

so it would be #TR {$(%w)%sLocates} {channel I am standing here at: @room and @roomdirs}

to capture room location:

look or whatever command shows the room information then...

#TR {(*)%s~[(%w)~].} {room=%1;roomdirs=%2}

this will capture the room info to those variables and then your "someone saying locates on "channel" line will send that info from the room capture trigger
Reply with quote
Wspaedt1977
Beginner


Joined: 13 Feb 2022
Posts: 13

PostPosted: Sat Apr 02, 2022 12:46 am   
 
Chris123zugg,,, That worked great!
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