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


Joined: 07 Jun 2011
Posts: 8

PostPosted: Wed Jun 15, 2011 2:03 am   

EXP tracking
 
I am tryin to resurrect my old exp gained setup. I rebuilt from an old notepad copy of my ancient zMud file so here are the scraps i have together. I am currently having a brain freeze how to piece it back into something reasonable, and I have a feeling maybe i have bloated it bigger than i should have. Its been almost 10 years since i made the original and/or played so it is all confusing to me now.

Wanting something i can turn on or off with either a button or alias/command, as i only want to keep track of exp sessions me and a group will have or maybe I solo. But have it off while force loading or popping items off mobiles or pk.

current Variables:

@exp
@Xp
@xpcounter1
@xpcounter2

Alias repxp = gt I have gained @xpcounter1 and @xpcounter2 for fighting, since we started.

---------------------------------------------------------------------------------------------------------
The full line from game for killing a mobile:

You've gained 124785 experience for the kill, and 23786 for fighting.

What I had before apparently broke this into 2 triggers:

You've gained (%d) experience for the kill
, and (%d) for fighting.

The variable @xpcounter1 assigned to first line, and @xpcounter2 assigned to second apparently, but I am not sure how they were assigned:

#add @xpcounter1 %1 - for the first perhaps
#add @xpcounter2 %1 - for the second?


I am at a loss where to go from here since that is all i have from my old file. And apparently what I have doesn't work.

Any help or suggestions would be appreciated.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Jun 15, 2011 2:14 am   
 
It would be:

Code:
#ADD xpcounter1 %1
#ADD xpcounter2 %1


Fix those and it should start counting properly.

However, you can do this with one trigger...

Code:
#TRIGGER {You've gained (%d) experience for the kill, and (%d) for fighting.} {#ADD xpcounter1 %1;#ADD xpcounter2 %2}


Hope this helps you.
Reply with quote
Sagern
Newbie


Joined: 07 Jun 2011
Posts: 8

PostPosted: Wed Jun 15, 2011 2:51 am   
 
thanks! Yes having one trigger is good. I have sat here wondering why i even had 2 triggers for it. It worked before so was afraid to make any changes. I moved the trig into a spare button to turn off when i want, but one question. How would i reset the numbers every time i turn it off?
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Jun 15, 2011 4:13 am   
 
Just add the following code to your #T- "Trigger" button:

Code:
xpcounter1=0
xpcounter2=0
Reply with quote
Sagern
Newbie


Joined: 07 Jun 2011
Posts: 8

PostPosted: Sun Jul 10, 2011 3:48 am   
 
thanks for the help, sorry for the late reply i was working out of town. its working great :)
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