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
LandenC
Newbie


Joined: 17 Nov 2004
Posts: 2

PostPosted: Wed Nov 17, 2004 5:24 pm   

Status line question
 
I want to put the highest rolled stat for each stat in the status line. Here is my autoroller code.

#TRIGGER {(%d)str (%d)int (%d)wis (%d)dex (%d)con (%d)chr Accept these stats} {#IF ((%1 >= @str) AND (%2 >= @int) AND (%3 >= @wis) AND (%4 >= @dex) AND (%5 >= @con) AND (%6 >= @chr) AND ((%1 + %2 + %3 + %4 + %5 + %6) >= @total)) {#SAY {These stats look okay, say yes????}} {no}} "" {nocr|prompt}

The mud looks like this...

14str 13int 17wis 13dex 15con 19chr Accept these stats? [Yes No]
15str 15int 17wis 17dex 18con 17chr Accept these stats? [Yes No]
14str 13int 15wis 16dex 14con 15chr Accept these stats? [Yes No]
17str 14int 13wis 18dex 15con 18chr Accept these stats? [Yes No]
18str 17int 16wis 17dex 16con 19chr Accept these stats? [Yes No]
15str 16int 15wis 19dex 18con 16chr Accept these stats? [Yes No]
15str 15int 13wis 14dex 18con 13chr Accept these stats? [Yes No]
17str 15int 14wis 14dex 19con 19chr Accept these stats? [Yes No]
14str 15int 14wis 14dex 18con 18chr Accept these stats? [Yes No]
16str 18int 15wis 15dex 17con 18chr Accept these stats? [Yes No]
14str 15int 16wis 19dex 19con 15chr Accept these stats? [Yes No]
16str 14int 13wis 14dex 15con 19chr Accept these stats? [Yes No]
14str 13int 15wis 15dex 16con 19chr Accept these stats? [Yes No]

Now how can i get the highest possible rolled stats in my status line?

Thanks,

Landen
Reply with quote
Loto
Apprentice


Joined: 05 May 2003
Posts: 194

PostPosted: Wed Nov 17, 2004 10:47 pm   
 
I think this would work...

#CLASS {Test}
#ALIAS clrhighs {
#VAR highstr 0
#VAR highdex 0
#var highcon 0
#VAR highwis 0
#VAR highint 0
#VAR highchr 0
}
#TRIGGER {(%d)str (%d)int (%d)wis (%d)dex (%d)con (%d)chr Accept these stats} {
#IF ((%1 >= @str) AND (%2 >= @int) AND (%3 >= @wis) AND (%4 >= @dex) AND (%5 >= @con) AND (%6 >= @chr) AND ((%1 + %2 + %3 + %4 + %5 + %6) >= @total)) {#SAY {These stats look okay, say yes????}} {no}
#IF (%1 > @highstr) {#VAR highstr %1} {}
#IF (%1 > @highint) {#VAR highint %1} {}
#IF (%1 > @highwis) {#VAR highwis %1} {}
#IF (%1 > @highdex) {#VAR highdex %1} {}
#IF (%1 > @highcon) {#VAR highcon %1} {}
#IF (%1 > @highchr) {#VAR highchr %1} {}
} "" {nocr|prompt}
#STAT {Highest Str: @highstr Highest Int: @highint Highest Wis: @highwis Highest Dex: @highdex Highest Con: @highcon Highest Chr: @highchr}
#CLASS 0

The same trigger you have now sets the highest for the variable highxxx if it is higher than what is currently there. The alias clrhighs clears the high variables for when you want to start over. This is untested.
_________________
*Llewlyn* makes a strange sound but is suddenly very silent as you place a silver sai in his back!
Reply with quote
LandenC
Newbie


Joined: 17 Nov 2004
Posts: 2

PostPosted: Thu Nov 18, 2004 12:16 am   
 
It worked with one minor change. The highstr, highint, etc... changed from them all being %1 to their respective %number.

Thanks for the help.
Reply with quote
Loto
Apprentice


Joined: 05 May 2003
Posts: 194

PostPosted: Thu Nov 18, 2004 2:25 am   
 
:D
_________________
*Llewlyn* makes a strange sound but is suddenly very silent as you place a silver sai in his back!
Reply with quote
Loto
Apprentice


Joined: 05 May 2003
Posts: 194

PostPosted: Thu Nov 18, 2004 2:39 am   
 
Sorry about that... knew I was forgetting something. :P
_________________
*Llewlyn* makes a strange sound but is suddenly very silent as you place a silver sai in his back!
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