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
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Wed Jul 31, 2002 10:58 pm   

Materia Magica: XP and Quest timer status bar
 
NOTE: This script requires zMUD version 6.20 or higher.

This script adds experience and quest information to your status bar.

An example status bar:
XPTNL-> 456,298 QUESTS: time-> 12:34 available->3

--Experience to next level (XPTNL) is taken from 'score' and updated when you gain xp. It is useful for a quick reminder of how close to leveling you are.

--A quest timer and counter is included. The quest timer counts down the time left in a quest or the time you can quest again, as appropriate, and shows the time in real-minutes and real-seconds. The quest counter tracks how many quests you have performed in the last six real-hours and displays how many you have available. If you have no quests available, the timer will display how long until you may quest again. This script uses the Tick Timer, so if you're using it for anything else, there will be a conflict.

You must adjust the Tick Timer settings (open View->Preferences->Tick Timer), setting "Timeout Margin" to zero and "Timeout Command" to #TS 0;chekqt.

Status displays may initially be inaccurate up to six hours after adding the script.

If you have any questions, you may imail Belix, as well as email me through this site.


#CLASS {Status bar}
#STAT {XPTNL-> %format("&7.0n",@xptnl) QUESTS: time-> %if(%tick=-1,"idle",%eval(%tick/60) :%if(%mod(%tick,60)<10,"0","")%mod(%tick,60)) available->%eval(5-%numitems(@qtimes))}
#CLASS 0

#CLASS {Status bar|Quest timer}
#ALIAS chekqt {#IF !%null( @qtimes) {#IF ((%eval( @doy-@qtimes.1.1) >= 2) OR (%eval( %secs-@qtimes.1.2+%if( %eval( %secs-@qtimes.1.2) < 0, 86400000, 0)) > 21600000)) {#DELNITEM qtimes 1;chekqt}}}
#VAR doy {}
#VAR qtimes {}
#VAR cumdays {0|31|59|90|120|151|181|212|243|273|304|334} {0|31|59|90|120|151|181|212|243|273|304|334}
#TRIGGER {You have (%d) minutes remaining {to complete this quest|before you can quest again}.} {chekqt;#IF (%numitems( @qtimes) < 5) {#TSET %eval( %1*15)} {#TSET %max( %eval( (21600000+@qtimes.1.2-%secs+%if( %eval( %secs-@qtimes.1.2)<0, 86400000, 0))/1000), %eval( %1*15))}}
#TRIGGER {^{Lord|Lady} %w tells you 'I'm sorry, but I don't have any quests for you right now. Try again later, or try another questmaster.'} {quest status}
#TRIGGER {You are player ~[%d~] connected since November 29th, 1996.} {#VARIABLE doy %eval( %time( d) + %item( @cumdays, %time( m)) + %if( ((%time( m)>=3) & !%mod( %time( yyyy), 4)), 1, 0));#SHOW This is day @doy in the year %time( yyyy)~.;quest status}
#TRIGGER {You have completed a part of your quest!} {#BEEP;quest status}
#TRIGGER {^{Lord|Lady} %w tells you 'Not all of your quest was completed, but I will give you a partial reward for your efforts.'} {#ADDITEM qtimes %concat( @doy, "|", %secs);quest status}
#TRIGGER {All parts of your quest are complete. Return to your quest master in time to receive your reward!} {#BEEP;quest status}
#TRIGGER {^{Lord|Lady} %w tells you 'Congratulations on completing your quest, %w!'} {#ADDITEM qtimes %concat( @doy, "|", %secs);quest status}
#TRIGGER {You aren't currently on any quests.} {chekqt;#IF (%numitems( @qtimes)<5) {#TSET 0} {#TSET %max( %eval( (21600000-%secs+@qtimes.1.2)/1000), 0)}}
#TRIGGER {^{Lord|Lady} %w tells you, 'You didn't complete any parts of your quest, I'm sorry.'} {quest status}
#ALARM 0:00:00 {#VARIABLE doy %eval( %time( d) + %item( @cumdays, %time( m)) + %if( ((%time( m)>=3) & !%mod( %time( yyyy), 4)), 1, 0))}
#TRIGGER {You have run out of time for your quest.} {quest status}
#CLASS 0

#CLASS {Status bar|XP tracker}
#VAR xptnl {762000}
#TRIGGER {You have %n experience points and need (%n) to advance.} {#VAR xptnl %1}
#TRIGGER {You receive (%n) experience points.} {#MATH xptnl (@xptnl - %1)}
#TRIGGER {^{Lord|Lady} %w tells you 'As a reward for your valor, I am awarding you %d quest points, %d practices, (%n) experience points, and %n gold pieces!'} {#MATH xptnl (@xptnl - %1)}
#CLASS 0



Troubadour
Reply with quote
Wyndle
Beginner


Joined: 28 Mar 2007
Posts: 20
Location: < here and there >

PostPosted: Thu Apr 05, 2007 2:39 pm   
 
I've got a slight tweak to add:

Code:
#TRIGGER {You {receive|gain} (%n) experience points.} {#MATH xptnl (@xptnl - %1);#IF (@xptnl <= 0) {score}}
#TRIGGER {^{Lord|Lady} %w tells you 'As a reward for your valor, I am awarding you %d quest points, %d practices, (%n) experience points, and %n gold pieces!'} {#MATH xptnl (@xptnl - %1);#IF (@xptnl <= 0) {score}}
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