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


Joined: 29 Nov 2002
Posts: 12
Location: USA

PostPosted: Sun Aug 10, 2003 10:23 pm   

I need some help.
 
Where to begin. A friend of mine made me a script. It's a skill checking script. Basically when a skill or spell improves, the skill name and new percentage is sent to my ststus bar so i don't have to type practice everytime something improves and search for it just to see the improvment. This script works beautifully and I'll include it, but thats not my problem.

#CLASS {SkillCheck} {disable}
#TRIGGER {^(*) (%d)~% (*) (%d)~% (*) (%d)~%} {#ADDKEY Skills {%trim( %1)} %2;#ADDKEY Skills {%trim( %3)} %4;#ADDKEY Skills {%trim( %5)} %6;#GAG}
#TRIGGER {^(*) (%d)~% (*) (%d)~%} {#IF ((%len(%1) < 25) AND (%len(%3) < 25)) {#ADDKEY Skills {%trim(%1)} %2;#ADDKEY Skills {%trim(%3)} %4;#GAG}}
#TRIGGER {^(*) (%d)~%} {#IF (%len(%1) < 25) {#ADDKEY Skills {%trim(%1)} %2;#GAG}}
#TRIGGER {You have %d practice sessions left} {#T- SkillCheck;#status @SkillCheck has improved to %db( @Skills, @SkillCheck)}
#CLASS 0

#ALIAS skillcheck {#T+ SkillCheck;prac}
#VAR SkillCheck {evaluation}
#VAR Skills {axe1dagger1flail1mace1polearm1spear1sword40evaluation74enhanced damage1staff1parry1scrolls1staves1recall75}
#TRIGGER {You have become better at (*)!} {#CW bold,yellow;#BEEP;#VAR SkillCheck {%1};skillcheck}
#TRIGGER {You learn from your mistakes, and your (*) skill improves.} {#CW bold,yellow;#BEEP;#VAR SkillCheck {%1};skillcheck}
#TRIGGER {You learn from your mistakes, and your evaluation skill improves.} {eval}
#BUTTON 16 {Prac Off} {#t+ practemp} {Prac On} {#t- practemp;#t- alarm} {} {1} {} {Size} {68} {23} {Pos} {1} {404} {79} {47} {} {} "" {} {} {}
#STAT {@SkillCheck has improved to %db( @Skills, @SkillCheck)}

Thats the script in it's entirety. Now here is my problem. I wanna make a sister script that does virtually the same thing but with different information and I cannot dissect this script and make it work for my other idea for the life of me. As you can see this script displays your improved skill or spell and it's new number on the status bar. Well while I rank I hate typing "worth" everytime I kill something to see what my new exp tnl is. So I wanted to make a sister script that would read my exp tnl after every kill and display it on the status bar.
When I type worth i see the following:

You have 0 gold, 0 silver, and 304 experience (1746 exp to level).

So basically like I said before I want a script just like the skillcheck script that will read my exp tnl and place it on the status bar. I guess it would all trigger off of:

(*) is DEAD!!

since that is what my mud displays. Any help is much appreciated.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Aug 11, 2003 5:38 am   
 
First, you should take the #STATUS command out of any triggers. Instead of remaking the status bar every time something changes, just update the variables.

#TR {is DEAD!!} {worth}
#COND {(%d) exp to level} {#VAR tnl %1}
#STAT {@SkillCheck has improved to %db( @Skills, @SkillCheck). You need @tnl exp}
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