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: Mon Jan 20, 2003 6:36 pm   

I need some serious help.
 
Alright. Ideally I want to set something up that will capture something from the mud, place it in a variable and show it to me later in a trigger.

What I want to do is, whenever a skill or spell goes up I would like to set a trigger to display the new skill/spell percentage rather then having to look through this for it:

door bash 100% regeneration 100% crush 1%
war paint 1% axe 1% dagger 1%
mace 40% polearm 1% spear 1%
two-handed wielding 1% dual wield 1% sword 1%
archery 1% advanced archery 1% whip 1%
tame 1% find water 1% shield cleave 1%
ambush 1% moving ambush 1% pugil 1%
lash 1% protection heat cold 1% evaluation 3%
enhanced damage 100% staff 1% bash 100%
wild fury 1% toughen 1% skull bash 1%
crushing blow 1% warcry 1% battle scream 1%
dirt kicking 1% disarm 1% dodge 1%
hand to hand 1% kick 1% parry 1%
trip 1% second attack 1% third attack 1%
acute vision 1% camouflage 1% camp 1%
fast healing 1% skin 1% butcher 1%
recall 75% herb 1% forage 1%

I thought I could make a trigger so that when I type prac (and get all that) I could set a trigger that would take each skill and place it's number into a variable.

I have a trigger setup currently that does the following:

Pattern: You have become better at (%W)!
Value:#co bold,yellow;#beep;prac

I'd prefer to have the trigger just do a #show and show me the new percentage for just the ONE skill that improved instead of having to search through the whole prac screen, find the skill and see how much it improved. Does what I want make any sense? Can anyone help me?

Dielantha
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Mon Jan 20, 2003 10:29 pm   
 
something like this should work:

#alias practicetrap {
#t+ practicetrap
practice}
#tr {You have become better at (*)!} {
#co bold,yellow
#beep
#add %1 1
#show %1 has improved to @%1}
#class practicetrap {
#tr {(*)%s(%d)~%%s(*)(%d)~%%s(*)%s(%d)~%} {
#var %1 %2
#var %3 %4
#var %5 %6
}
#tr {^$} {#t- pacticetrap}
#class 0

i haven't tested it, but you can see the principle of the script. You'll need to practicetrap once to set the initial (current) values for each of your skills. the first trigger in the practicetrap class is the tricky one, i assumed that the output from you mud has more spaces than what was displayed, so used the %s wildcard. you'll also have to watch for the case where the ending line has only 1 or 2 skills on it, instead of 3. if this happens frequently, add 2 more triggers to practicetrap class like the first one, but with this
(*)%s(%d)~%
pattern repeated once or twice.



moon.icebound.net:9000
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Jan 21, 2003 2:45 am   
 
#AL skillcheck {#T+ SkillCheck;prac}
#CLASS SkillCheck disable
#TR {^(*) (%d)~% (*) (%d)~% (*) (%d)~%} {#ADDKEY Skills {%trim(%1)} %2;#ADDKEY Skills {%trim(%3)} %4;#ADDKEY Skills {%trim(%5)} %6;#GAG}
#TR {^(*) (%d)~% (*) (%d)~%} {#IF ((%len(%1) < 25) AND (%len(%3) < 25)) {#ADDKEY Skills {%trim(%1)} %2;#ADDKEY Skills {%trim(%3)} %4;#GAG}}
#TR {^(*) (%d)~%} {#IF (%len(%1) < 25) {#ADDKEY Skills {%trim(%1)} %2;#GAG}}
#TR {You have %d practices left} {#T- SkillCheck;#SHOW {@SkillCheck has improved to %db(@Skills, @SkillCheck)}}
#CLASS 0
#TR {You have become better at (*)!} {#CW bold,yellow;#BEEP;#VAR SkillCheck {%1};skillcheck}

Not tested. Verify the phrase "You have %d practices left", I used this to detect the end of the practice table.

Won't work. The second and third triggers in the SkillCheck class will fire on 3-skill lines also.

#IF checks added to triggers. $ removed from pattern ends to allow trailing spaces (as shown in sample output). It should work now. Still untested.

LightBulb
Senior Member
Jan 21 -- 12:00 More typos corrected
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Tue Jan 21, 2003 6:23 am   
 


door bash 100% regeneration 100% crush 1%
war paint 1% axe 1% dagger 1%
mace 40% polearm 1% spear 1%
two-handed wielding 1% dual wield 1% sword 1%
archery 1% advanced archery 1% whip 1%
tame 1% find water 1% shield cleave 1%
ambush 1% moving ambush 1% pugil 1%
lash 1% protection heat cold 1% evaluation 3%
enhanced damage 100% staff 1% bash 100%
wild fury 1% toughen 1% skull bash 1%
crushing blow 1% warcry 1% battle scream 1%
dirt kicking 1% disarm 1% dodge 1%
hand to hand 1% kick 1% parry 1%
trip 1% second attack 1% third attack 1%
acute vision 1% camouflage 1% camp 1%
fast healing 1% skin 1% butcher 1%
recall 75% herb 1% forage 1%



Just to see it spaced happily.

Ton Diening
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