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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
RichE
Newbie


Joined: 18 Jan 2009
Posts: 8

PostPosted: Sun Jan 18, 2009 5:58 pm   

Trigger using variables
 
Searched throughout this forum and still can't find answer. I'm making an alias to create triggers based on certain variables.
variable zone1 = Tarsis
variable roomdesc = A Humble Inn.
I can change these 2 variables quickly.

Alias "addroom" creates #Trigger {@roomdesc} {#sub "@roomdesc (@zone1)"}

so i'm trying to quickly create this trigger
#trigger {A Humble Inn.} {#sub "A Humble Inn. (Tarsis)"

Thank you.
Reply with quote
Scirkhan
Apprentice


Joined: 14 Sep 2007
Posts: 167
Location: aztx

PostPosted: Mon Jan 19, 2009 1:21 am   
 
It sounds like you want to put the zone name of the room you are in after the room name of the room you are in..

RoomName (Zone)

I'm thinking someone *else* can loop through something causing that effect for you.
Is any of this based off the map?
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Tue Jan 20, 2009 5:47 pm   
 
Those quotes don't belong and create a literal string. It is possible that this enigma is failing over the use of the parenthesis in whatever secret plan you ply. OK, seriously, what do you want?

#sub {@roomdesc (@zone1)} or #sub {@roomdesc ~(@zone1~)}

I am overly cautious
Reply with quote
RichE
Newbie


Joined: 18 Jan 2009
Posts: 8

PostPosted: Wed Jan 21, 2009 2:10 pm   
 
No nothing is based off the map, and you are correct Scirkhan. I want to know what ZONE a room is in, so that if i spy on another character i can see what zone they are in.
Specifically, you only see the Room name. So I want to create trigger to substitute the Room name for the Room name and the sub.
I can do it longway and just go into the trigger menu and make these individually, just trying to find a shortcut.

So When i make this alias
Alias "addroom" puts this command into zmud = #Trigger {@roomdesc} {#sub "@roomdesc (@zone1)"}
Zmud will make the trigger, but the pattern will be @roomdesc and the action will be #sub {@roomdesc (@zone1)}
I want the value that is in the @roomdesc variable, not @roomdesc.

Thanks.
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Thu Jan 22, 2009 1:41 pm   
 
You want to query the mapper database?
Reply with quote
Scirkhan
Apprentice


Joined: 14 Sep 2007
Posts: 167
Location: aztx

PostPosted: Fri Jan 23, 2009 5:22 am   
 
#var roomdescAndzone "#sub {"@roomdesc" ("@zone1")}"
#exec {#trigger {@roomdesc} {@roomdescAndzone}}



You could also try using #Psub
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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