Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Thu Aug 27, 2009 3:19 am   

New trigger
 
Ok i need some help on this, I want to make it so that every time i type exp, that it calculates my change in xp from the last time i typed xp.

Experience till level: 5156521

is what it shows when i type exp.

I would like to have under it
Experience till level: 5156521
Change in XP = blah

any suggestions on how i can do that?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4790
Location: Pensacola, FL, USA

PostPosted: Thu Aug 27, 2009 3:44 am   
 
#TR {Experience till level: (%d)} {#SAY {Change in XP = %eval(%1-@xp)};xp=%1}
_________________
Discord server
Reply with quote
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Thu Aug 27, 2009 5:55 am   
 
awesome thanks. i figured it was something easy
Reply with quote
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Fri Aug 28, 2009 3:40 am   
 
Ok maybe you can tell me why this isn't working

#tr {heroism (%s) (%d)} #SAY {Change in Skill = %eval(%1-@hskill)};hskill=%1}


Skill
awareness 40
bandage 41
blindfighting 40
buddha palm 44
calm 40
chant 92
Change in Skill = 0
chi purge 41
climb 40
combination attack 49
dodge 91
dragon punch 40
Change in Skill = 0
feign death 40
fishing 40
fist of dragon (obtained at level 46)
heroism 60
Change in Skill = 0
kick 40
martial arts 92
Change in Skill = 0
mine 47
quivering palm 51
Change in Skill = 0
regenerate 58
Change in Skill = 0
retreat 40
roundkick 40
Change in Skill = 0
safe fall 40
springleap 41
swim 40
switch opponents 40
unarmed damage 92

it won't register any changes. I'm trying %2 instead of %1 now, but skills take for ever to tnoch and and wanted to try and notch them while afk and see how much they changed over night.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri Aug 28, 2009 3:52 am   
 
%s is for spaces... not sure what you're trying to capture. If you're trying to capture one or more words, then the digit afterward, you'd need to change it to:

#TRIGGER {heroism (*) (%d)} {Change in Skill = %eval(%1-@hskill)};hskill=%1}

Charneus
Reply with quote
Ggoss
Apprentice


Joined: 01 Nov 2006
Posts: 114

PostPosted: Fri Aug 28, 2009 4:01 am   
 
oh it doesn't show correctly on cut and paste there is a huge gap between the skill and # which is why i was using %s.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri Aug 28, 2009 5:16 am   
 
Well, I made a mistake on mine (hasty judgment, in the middle of packing) anyway.

I don't know what your actual output is because you really haven't shown what is MUD output.

However, if you need to, then just do:

#TRIGGER {heroism*(%d)} {Change in Skill = %eval(%1-@hskill)};hskill=%1}

Remember, each time you put () around something in a trigger, it's capturing it into a parameter.

Charneus
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4790
Location: Pensacola, FL, USA

PostPosted: Fri Aug 28, 2009 6:29 am   
 
#TRIGGER {heroism*(%d)} {#SAY {Change in Skill = %eval(%1-@hskill)};hskill=%1}

also, use the code BBC tag to preserve spacing
_________________
Discord server
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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