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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
GuinnessDNA
Beginner


Joined: 12 Feb 2003
Posts: 23

PostPosted: Tue Mar 11, 2003 11:07 pm   

Gemstone Exp Tracker (Not mind bar)
 
You guys are really gonna love this one. Every tick (half pulse) It will display "Exp Change: 29 Exp Until: 3745" if you absorbed 29 exp out of your bucket and if you've got 3745 exp left to go after the tick.

If you've got a mind bar already you probably have a gsl( r) trigger already, so you'll just want to add this to its "Value":

#add showexp 1
exp
#gag

then you'll want to add this following class:

#CLASS {Gemstone|Exper}
#VAR Exp {0}
#VAR SessionExp {0} {0}
#VAR ShowExp {0}
#VAR ExpUntil {0}
#VAR lastExp {0}
#VAR SessionTicks {0} {0}
#TRIGGER "expTrigger" {^ Level:%s%d%sExperience:%s&%dexp$} {#if (@showexp) {#gag}}
#COND "expTrigger" {^Next level at: %d exp.%sExp. until next lvl: &%dexpUntil$} {#if (@showexp) {#gag}} {within|param=1}
#COND "expTrigger" {^ Fame: %d%sMana: %d/%d Max$} {#if (@showexp) {#gag}} {within|param=1}
#COND "expTrigger" {^ Deeds: %d%sDeaths this level: %d$} {#if (@showexp) {#gag}} {within|param=1}
#COND "expTrigger" {^$} {#if (@showexp) {#gag}} {within|param=1}
#COND "expTrigger" {^{Your mind can't take much more of this! You must rest!|Your mind is numbed.|Your mind is becoming numbed.|Your mind is muddled.|Your mind is clear.|Your mind is fresh and clear.|Your mind is as clear as a bell.}$} {#if (@showexp) {#gag;#add showexp -1};;#T- expTrigger;#show %ansi( green, high)%if( %eval( @exp - @lastexp), Exp Change: %eval( @exp - @lastexp) Exp Until: @expUntil, "");#if (%eval( @exp - @lastexp) != 0) {#add sessionTicks 1};#add sessionExp %eval( @exp - @lastexp);lastexp = @exp} {within|param=1}
#BUTTON 77 {@sessionExp ~/ %eval(@expUntil+@sessionExp)} {#show Approx. %if( %eval( %eval( @expUntil/(@sessionexp/@sessionticks))/60), %eval( %eval( @expUntil/(@sessionexp/@sessionticks))/60)" hours and ")%mod( %eval( @expUntil/(@sessionexp/@sessionticks)), 60) minutes till level, at %eval( @sessionexp/@sessionticks) per minute.} {} {} {@sessionExp} {} {} {Size} {75} {30} {Pos} {0} {1034} {32848} {} {Gauge||10|%eval(@sessionExp+@expUntil)|%eval((@sessionExp+@expUntil)*0.75)|7} {} "" {Explore|Inset} {} {SessionExp}
#CLASS 0


If you do not already have a GSL r trigger then in between the #Class tags add this:

#TRIGGER {r} {#add showexp 1;exp;#gag} "" {gsl}


That should work great for ya (also adds a button that you'll probably need to move to wherever you want it that displays the exp you've gotten that session)

TODO list:
-Make sure those triggers for mind state are all correct, since making it i haven't dropped below a muddled mindstate. just gotta check the spelling and the like.
-Add the saturated mind state, the kind you get with exp awards.
-Every time you get exp from a creature the "r" GSL changes twice, you'll notice excessive prompts after searching (as well as after each tick, but after ticks its okay because it seperates the "#show" statement nicely) I imagine if someone figures out how to remove repeatitive carrage returns or prompts then this will fix itself.

Enjoy!

(updated because of session ticks updating when there was no change in exp, also made them default to 0. Made exp display button a guage and gave it a nifty action)

Mar 12 - Updated again. guage button has nicer command, and fixed "clear as a bell" state.
Reply with quote
GuinnessDNA
Beginner


Joined: 12 Feb 2003
Posts: 23

PostPosted: Wed Mar 12, 2003 12:31 am   
 
Couple little things, SessionExp and SessionTicks should have default of 0 and "use default" should be checked.

Also you'll notice after you get exp for killing something your mind state might flash for a second on the screen... this is just the Gag command being slow for some reason. let me know if anyone figures this out, thanks!

-Kifka
Reply with quote
Stregone
Wanderer


Joined: 07 Aug 2001
Posts: 53
Location: USA

PostPosted: Wed Mar 12, 2003 3:25 pm   
 
Very cool :)

-Stregone
Reply with quote
shalimar
GURU


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

PostPosted: Sat Mar 22, 2003 3:38 am   
 
I tried inputing it and it seems that nothing is progressing within it, not sure whats wrong but i got the latest beta version

Shalimar

AIM: shalimarwildcat
Reply with quote
shalimar
GURU


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

PostPosted: Sat Mar 22, 2003 6:52 pm   
 
for clarification on whats wrong...

it seems that the only variable that changes is @ShowExp

when doing 'guild work' it brings up my 'exp' twice for each lil bit i get

pushing the button has only ever showed me:
Approx. /60 hours and 0 minutes till level, at per minute.

thats all i see right now

Shalimar

AIM: shalimarwildcat
Reply with quote
GuinnessDNA
Beginner


Joined: 12 Feb 2003
Posts: 23

PostPosted: Sat Mar 22, 2003 11:07 pm   
 
I haven't downloaded the latest beta yet, i'm still running 6.53, but i'll download 6.55 soon and make sure its still working, i don't think thats whats causing the problem though.

From the sound of it it seems as if your exp trigger isn't firing, I don't have any characters in a guild so i'm not sure if maybe your exp displays diffrent, make sure that what is displayed for you when you type "exp" will match the "expTrigger" trigger
Reply with quote
shalimar
GURU


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

PostPosted: Mon Mar 24, 2003 12:01 am   
 
i fixed the problem, you were missing a few %s in the trigger that gags the exp line, works good now

Shalimar

AIM: shalimarwildcat
Reply with quote
Calbrenar
Beginner


Joined: 18 Nov 2003
Posts: 11

PostPosted: Wed Nov 19, 2003 2:50 pm   
 
Can anyone post the completed fixed code?
Reply with quote
shalimar
GURU


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

PostPosted: Fri Nov 21, 2003 10:31 pm   
 
here it is updated for GS4

#CLASS {Gemstone|Exper}
#VAR Exp {3120120}
#VAR SessionExp {180976} {0}
#VAR ShowExp {11}
#VAR ExpUntil {66380}
#VAR lastExp {3120120}
#VAR SessionTicks {1} {0}
#TRIGGER "expTrigger" {Level:%s%d%sDeeds: &%ddeeds} {#IF (@ShowExp) {#GAG}}
#COND {%sExperience:%s&%dexp%sDeaths this level:%s%d} {#IF (@ShowExp) {#GAG}} {within|param=1}
#COND {Exp. until next:%s&%dexpUntil%sDeath Recovery: %d} {#IF (@ShowExp) {#GAG}} {within|param=1}
#COND {Mental TPs: %d%sFame: &%dfame} {#IF (@ShowExp) {#GAG}} {within|param=1}
#COND {%sPhysical TPs: %d%sMana: %d/%d max} {#IF (@ShowExp) {#GAG}} {within|param=1}
#COND {{Your mind can't take much more of this!|Your mind is numbed.|Your mind is becoming numbed.|Your mind is muddled.|Your mind is clear.|Your mind is fresh and clear.|Your mind is as clear as a bell.}} {
#IF (@ShowExp) {
#GAG
#ADD ShowExp -1
}
#SHOW %ansi( green, high)%if( %eval( @Exp - @lastExp), Exp Change: %eval( @Exp - @lastExp) Exp Until: @ExpUntil)%ansi( blue, high)%if( %eval( @fame - @lastfame), Fame Change: %eval( @fame-@lastfame))
#IF (%eval( @Exp - @lastExp) != 0) {#ADD SessionTicks 1}
#ADD SessionExp %eval( @Exp - @lastExp)
lastExp = @Exp
lastFame = @fame
} {within|param=2}
#BUTTON 38 {@SessionExp ~/ %eval( @ExpUntil+@SessionExp)} {#show Approx. %if( %eval( %eval( @ExpUntil/(@SessionExp/@SessionTicks))/60), %eval( %eval( @ExpUntil/(@SessionExp/@SessionTicks))/60)" hours and ")%mod( %eval( @ExpUntil/(@SessionExp/@SessionTicks)), 60) minutes till level, at %eval( @SessionExp/@SessionTicks) per minute.} {} {} {@sessionExp} {} {} {Size} {200} {15} {Pos} {0} {134} {32848} {} {Gauge||10|%eval(@sessionExp+@expUntil)|%eval((@sessionExp+@expUntil)*0.75)|7} {} "" {Explore|Inset} {} {SessionExp}
#CLASS 0
Reply with quote
Calbrenar
Beginner


Joined: 18 Nov 2003
Posts: 11

PostPosted: Tue Nov 25, 2003 5:46 pm   
 
Thank you Shalimar
Reply with quote
Calbrenar
Beginner


Joined: 18 Nov 2003
Posts: 11

PostPosted: Tue Nov 25, 2003 5:48 pm   
 
Won't let me type exp anymore. I see a flash of mind state and then it disappears. Is that normal?
Reply with quote
shalimar
GURU


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

PostPosted: Sun Mar 21, 2004 5:31 am   
 
ok i fixed the problem with the flashing mindstate, and got rid of the error causing the change to display multiple times. Use these:

#TRIGGER {r} {#IF @showexp {} {#add showexp 1;exp};#var mindState %gsl( r);#if (@mindState=@cMS) {#abort 1};#if (@mindState=A) {#call %btnimage(mindState,GemstoneIIIImagesmindA.bmp)};#if (@mindState=B) {#call %btnimage(mindState,GemstoneIIIImagesmindB.bmp)};#if (@mindState=C) {#call %btnimage(mindState,GemstoneIIIImagesmindC.bmp)};#if (@mindState=D) {#call %btnimage(mindState,GemstoneIIIImagesmindD.bmp)};#if (@mindState=E) {#call %btnimage(mindState,GemstoneIIIImagesmindE.bmp)};#if (@mindState=F) {#call %btnimage(mindState,GemstoneIIIImagesmindF.bmp)};#if (@mindState=G) {#call %btnimage(mindState,GemstoneIIIImagesmindG.bmp)};#var cMS {@mindState}} "Mind" {gsl}

And:

#TRIGGER "expTrigger" {Level:%s%d%sDeeds: &%ddeeds} {#IF (@ShowExp) {#GAG}} "Gemstone|Exper"
#COND {%sExperience:%s&%dexp%sDeaths this level:%s%d} {#IF (@ShowExp) {#GAG}} {within|param=1}
#COND {Exp. until next:%s&%dexpUntil%sDeath Recovery: %d} {#IF (@ShowExp) {#GAG}} {within|param=1}
#COND {Mental TPs: %d%sFame: &%dfame} {#IF (@ShowExp) {#GAG}} {within|param=1}
#COND {%sPhysical TPs: %d%sMana: %d/%d max} {#IF (@ShowExp) {#GAG}} {within|param=1}
#COND {%s~(%d %x converted to %x~)} {#IF (@ShowExp) {#GAG}} {param=1}
#COND {{Your mind can't take much more of this!|Your mind is numbed.|Your mind is becoming numbed.|Your mind is muddled.|Your mind is clear.|Your mind is fresh and clear.|Your mind is as clear as a bell.|Your ability to reflect on your recent experiences is hindered by your injuries.}} {#IF (@ShowExp) {#GAG;ShowExp = ""};#SHOW %ansi( green, high)%if( %eval( @Exp - @lastExp), Exp Change: %eval( @Exp - @lastExp) Exp Until: @ExpUntil) %ansi( blue, high)%if( %eval( @fame - @lastfame), Fame Change: %eval( @fame-@lastfame));#IF (%eval( @Exp - @lastExp) != 0) {#ADD SessionTicks 1};#ADD SessionExp %eval( @Exp - @lastExp);lastExp = @Exp;lastFame = @fame} {within|param=2}
Reply with quote
Nazkel
Newbie


Joined: 19 May 2004
Posts: 1

PostPosted: Wed May 19, 2004 8:49 am   
 
I added everything right I believe, correct, and the bar on the top appeared with Shalimars exp... it will not change, i have restarted several times with no difference, why is the exp bar on the top not changing numbers? it says
Approx. 0 minutes till level, at -761729 per minute.
when i click the button

i am running 7.05
i have had similiar problems when trying to add buttons like health and putting variables into the caption
Reply with quote
nazradin
Apprentice


Joined: 23 Mar 2003
Posts: 114
Location: New Zealand

PostPosted: Thu May 20, 2004 5:30 am   
 
quote:
Originally posted by Nazkel

I added everything right I believe, correct, and the bar on the top appeared with Shalimars exp... it will not change, i have restarted several times with no difference, why is the exp bar on the top not changing numbers? it says
Approx. 0 minutes till level, at -761729 per minute.
when i click the button

i am running 7.05
i have had similiar problems when trying to add buttons like health and putting variables into the caption





when pasting in button variables it just pastes the actual value rather than the variable itself, make sure the actual button is

@sessionexp/@expuntil

naz
Reply with quote
Univarsity
Beginner


Joined: 24 Jan 2003
Posts: 11
Location: USA

PostPosted: Thu Aug 20, 2020 9:40 pm   
 
Can you help me set up an EXP counting trigger for normal ZMUD? My syntax currently states:
You have 123445 exp.

Can you help me add a trigger to tell me how much I've gained since the last time I've checked?
eg: You have 123449 exp.

You gained 4 exp.
Reply with quote
shalimar
GURU


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

PostPosted: Thu Aug 20, 2020 10:42 pm   
 
Code:
#TR {You have (%d) exp.} {
  #IF (%1>@exp) {#PRINT {You gained %eval(%1-@exp) exp.}}
  exp=%1
  }
_________________
Discord: Shalimar#3679
Reply with quote
Univarsity
Beginner


Joined: 24 Jan 2003
Posts: 11
Location: USA

PostPosted: Sun Aug 23, 2020 1:59 am   
 
Thanks Shalimar. That trigger code didn't seem to work for me though. Do I include all 4 lines?
Reply with quote
shalimar
GURU


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

PostPosted: Sun Aug 23, 2020 11:42 am   
 
Yes, put it on the command line.
_________________
Discord: Shalimar#3679
Reply with quote
Univarsity
Beginner


Joined: 24 Jan 2003
Posts: 11
Location: USA

PostPosted: Sun Aug 23, 2020 3:27 pm   
 
It wasn't working because I needed to include the entire code together. Thank you! It works now!!!

#VOTE FOR SHALIMAR!
#SHALIMAR FOR PRESIDENT!

By The Way, Do you know if there is a way to reset the tracker?
Reply with quote
Univarsity
Beginner


Joined: 24 Jan 2003
Posts: 11
Location: USA

PostPosted: Sat Aug 29, 2020 11:00 pm   
 
I guess it would have to do with deleting the variable for it to reset. There's no way to do that in-game instead of manually clicking delete is there?
Reply with quote
shalimar
GURU


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

PostPosted: Sun Aug 30, 2020 8:35 pm   
 
You could also just assign the variable a null value.
var=""
_________________
Discord: Shalimar#3679
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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