|
Cabal_1969 Newbie
Joined: 13 May 2005 Posts: 5
|
Posted: Mon May 30, 2005 5:16 pm
a matter of time |
Hello, I been wondering how to make me a trigger/alias setup for reporting xp and quest points and other goodies...
Here is my though:
Each time I level the mud says , You raise a level!!!
So what my question is, how do I make a trigger etc that will
next time I level report how long it took and how many quest points I gained during that time?
Quest points gainer says :
The questmaster says, "As a reward, I am giving you 17 quest points,
So can you help me out?
Thanx |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4690 Location: Pensacola, FL, USA
|
Posted: Mon May 30, 2005 8:41 pm |
#TR {The questmaster says, "As a reward, I am giving you (%d) quest points} {#IF (@qp) {#VAR qp {%eval(@qp+%1)}} {#var qp {%1}}
#TR {You raise a level!} {
#ECHO Last level was at @leveltime
#VAR leveltime {%time(c)}
#ECHO This level was at @leveltime
#ECHO i made @qp Quest Points this level
#VAR qp {0}
} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
Private Adept
Joined: 10 Jan 2002 Posts: 264 Location: USA
|
Posted: Tue May 31, 2005 4:34 pm |
along with the previous trigger "#TR {The questmaster says, "As a reward, I am giving you (%d) quest points} {#IF (@qp) {#VAR qp {%eval(@qp+%1)}} {#var qp {%1}}"
add this:
#TR {^You raise a level!$} {leveltime}
ALIAS name: leveltime
value:
Code: |
lvltimenew=%time(dd|hh|mm|ss)
lvltimeday=%eval(%word( @lvltimenew, 1, "|")-%word( @lvltimeold, 1, "|"))
lvltimehour=%eval(%word( @lvltimenew, 2, "|")-%word( @lvltimeold, 2, "|"))
lvltimemin=%eval(%word( @lvltimenew, 3, "|")-%word( @lvltimeold, 3, "|"))
lvltimesec=%eval(%word( @lvltimenew, 4, "|")-%word( @lvltimeold, 4, "|"))
lvltimeold=@lvltimenew
#IF (@lvltimesec<0) {
#MATH lvltimemin (@lvltimemin-1)
#MATH lvltimesec (60-%abs(@lvltimesec))
}
#IF (@lvltimemin<0) {
#MATH lvltimehour (@lvltimehour-1)
#MATH lvltimemin (60-%abs(@lvltimemin))
}
#IF (@lvltimehour<0) {
#MATH lvltimeday (@lvltimeday-1)
#MATH lvltimehour (24-%abs(@lvltimehour))
}
#IF (@lvltimeday<0) {lvltimeday=0}
#SHOW {Last level: @lvltimeday~d @lvltimehour~h @lvltimemin~m @lvltimesec~s ~(Quest Points~: @qp~)}
|
or change the last #SHOW to gtell or whatever chan you want |
|
|
|
Cabal_1969 Newbie
Joined: 13 May 2005 Posts: 5
|
Posted: Tue May 31, 2005 7:07 pm |
You guys ROCK!!!
Thank you |
|
|
|
Cabal_1969 Newbie
Joined: 13 May 2005 Posts: 5
|
Posted: Wed Jun 01, 2005 2:09 am |
I have tried the triggers and now get something wierd....
when I levekl I put the output to group and get
Spearhawk tells the group '{Last level: 0d 23h 56m 12 s (Quest Points: 82)}'.
and I know it took less than an hour to level so what could be wrong?
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Jun 01, 2005 9:38 am |
Most likely lvltimeold was blank since initially setting it was not part of the script. It is now set with a value and should report things correctly.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Private Adept
Joined: 10 Jan 2002 Posts: 264 Location: USA
|
Posted: Wed Jun 01, 2005 5:43 pm |
ya, that is it exactly, your 1st level is displayed incorrectly after you install it, it will work fine now.
|
|
|
|
Cabal_1969 Newbie
Joined: 13 May 2005 Posts: 5
|
Posted: Mon Jul 04, 2005 9:24 pm |
I have noticed that if I level under one hour it does claim I levelled in 23 hrs and 49 minutes...is there something wrong with the code cause I can't find it...
|
|
|
|
|
|