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
blkno1
Novice


Joined: 26 May 2002
Posts: 30
Location: USA

PostPosted: Tue Mar 30, 2004 4:04 am   

Trigger Help
 
This is for the MUD Medievia. I need a trigger for...

Experience Points: 1,183,140,813 To Level: Leveled +83,140,813

Im looking to capture...

Experience Points: @VAR1 To Level: @VAR2

@VAR1 = 1,183,140,813
@VAR2 = Leveled +83,140,813

The problem I am having is if I havent met the level requirements The word Leveled is missing. Is there away to assign both or just the number to @VAR2?

This is what I came up with.

#TRIGGER {Experience Points: %1 To Level: %2 %3 } {#VAR cxp %1;#VAR levxp %2;#VAR tnlxp %3}

This works fine til the word leveled is removed.
Reply with quote
blkno1
Novice


Joined: 26 May 2002
Posts: 30
Location: USA

PostPosted: Tue Mar 30, 2004 5:46 am   
 
I think I got it to work.
This is the output from the MUD (Medievia)

Experience Points: 1,183,140,813 To Level: Leveled +83,140,813
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
AutoQuest Points: 2,388 To Level: 284
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Leading Points: 195,012,811 To Level: Leveled +85,082,811
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Trading Points: 11,129,464 To Level: 1,870,536
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Egg Points: 364 To Level: Leveled +114
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Code:

#CLASS {TNL}
#ALIAS saytnl {say To Next Level: Experience Points:@tnlxp Autoquest Points:@tnlaq Leading Points:@tnllp Trading Points:@tnltp Egg Points:@tnlep}
#ALIAS rtnl {
  #VAR tnlxp 0
  #VAR tnlep 0
  #VAR tnlaq 0
  #VAR tnllp 0
  #VAR tnltp 0
  #MESS 3 TNL Values have been reset!
  }
#ALIAS clantnl {cl To Next Level: Experience Points:@tnlxp Autoquest Points:@tnlaq Leading Points:@tnllp Trading Points:@tnltp Egg Points:@tnlep}
#ALIAS formtnl {ft To Next Level: Experience Points:@tnlxp Autoquest Points:@tnlaq Leading Points:@tnllp Trading Points:@tnltp Egg Points:@tnlep}
#ALIAS towntnl {town To Next Level: Experience Points:@tnlxp Autoquest Points:@tnlaq Leading Points:@tnllp Trading Points:@tnltp Egg Points:@tnlep}
#VAR tnlxp {(Leveled +83,140,813 )}
#VAR tnlaq {(284 )}
#VAR tnllp {(Leveled +85,082,811 )}
#VAR tnlep {(Leveled +114)}
#VAR tnltp {(1,870,536 )}
#TRIGGER {Experience Points: %1 To Level: %2 %3} {#VAR tnlxp (%2 %3)}
#TRIGGER {AutoQuest Points: %1 To Level: %2 %3 } {#VAR tnlaq (%2 %3)}
#TRIGGER {Leading Points: %1 To Level: %2 %3 } {#VAR tnllp (%2 %3)}
#TRIGGER {Trading Points: %1 To Level: %2 %3} {#VAR tnltp (%2 %3)}
#TRIGGER {Egg Points: %1 To Level: %2 %3 } {#VAR tnlep (%2 %3)}
#CLASS 0


This is what my script spits out...

You say, 'To Next Level: Experience Points:(Leveled +83,140,813 ) Autoquest Points:(284 ) Leading Points:(Leveled +85,082,811 ) Trading Points:(1,870,536 ) Egg Points:(Leveled +114)'.

Seems to work ok. Is there a better way of doing this? Or maybe more efficient?

-jim Very Happy
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Tue Mar 30, 2004 7:04 am   
 
First read the pattern matching help file

#TRIGGER {Experience Points: (%d) To Level: (*) } {#VAR cxp %1;#VAR tnlxp %2}
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