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


Joined: 15 Nov 2008
Posts: 10

PostPosted: Tue Mar 10, 2009 5:16 pm   

Multiple Exits and Target
 
Hi.
I am currently using zmud 7.21.
I could use a little help to set @target to 1.@target.

EX.
#ALIAS ta {
#VAR target %1
#SH ~[ ~@target set to {%1}. ~]

#alias {to} {ta*orc*}
#alias {1} {ta 1.@target} <----- Problem here is that what it actually does is targeting 1.1 *orc* and adding more 1 numbers the more I press 1

EX2.

#ALIAS td {
#VAR door %1
#SH ~[ ~@door set to {%1}. ~]

#alias {oe} {open @door}
#alias {oee} {open 2.@door} <---- Problem as above.

If anyone wanna help me figure out this riddle i´d be greatful.

Thank you

/Christian
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Mar 10, 2009 7:59 pm   
 
#alias {oee} {open %concat("2.",%right(@door,%eval(%pos(".",@door)+1)))}
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Somnium
Beginner


Joined: 15 Nov 2008
Posts: 10

PostPosted: Tue Mar 10, 2009 8:53 pm   
 
Thanx Vijlante.
Though it wasn´t really what I had in mind.
What I was looking for was the targeting script.

ex.
tdd < ---- to get 2.exit (of anykind) assinged to the oee
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Wed Mar 11, 2009 12:18 am   
 
I've been working on my targeting all day too, same mud (MUME is the very best one EVA).

My spells and attacks process targets so I don't really have a target script per se. I would edit one out if I knew exactly what you want, to press 1 <enter> and get 1.orc? (that could mess up db calls if you use those)

my form is in every alias, I have this line to solve the problem you mentioned:

Code:
#if (%pos( ".", @target)) {#var target %subregex( @target, "\d+", "%1")} {#var target %concat( %1, ".", @target)}



Today I added some code for typos:
Code:
#sh {Sexy foobar. Target reclaimed}



I have way too much time on my hands.

I looked at my [totally legal] door script. I'd share but it remembers doors so is unreadable with db variables atm and you are using another convention (interesting) entirely.
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Wed Mar 11, 2009 2:52 am   
 
I looked at this target script but felt it was too much away from the topic, so am withdrawing.
Reply with quote
Thrillhouse8
Beginner


Joined: 21 Sep 2004
Posts: 18

PostPosted: Tue Mar 24, 2009 10:16 pm   
 
I want to get something straight first. You want either/both a targetting or/and door alias that take the form of <number>.<target>, such that the number of characters you enter dictate the <number> set? For instance, if you entered 'oeeeeeeeeee', you would open 10.door, correct? If that is the case, is there a limit to the number of mobs or doors available to you?
Reply with quote
Thrillhouse8
Beginner


Joined: 21 Sep 2004
Posts: 18

PostPosted: Tue Mar 24, 2009 10:59 pm   
 
I've not worked with zMUD for a while, so I'm not sure if it accepts a regex like this.
#ALIAS o([e]+) {open %length(%1).@door}
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