|
Loto Apprentice
Joined: 05 May 2003 Posts: 194
|
Posted: Wed Apr 21, 2004 10:18 pm
Level and Prac |
I need something that computes how many times you need to die to get your practices reset.
All I've got so far is this:
#ALIAS level {#VAR level1 %1}
which sets the variable level1 to %1
Now I need an alias that takes the variable level1, divides it by 10, adds one, and does #SAY the result. I would also like a trigger that removes 1 from level1 for the text 'Ouch, you lose a level.'
Can someone help me? I have no idea about how to do this. |
|
|
|
Loto Apprentice
Joined: 05 May 2003 Posts: 194
|
Posted: Wed Apr 21, 2004 10:42 pm |
I've got it mostly done. I have a trigger reprac to do:
#eval @clevel/10+1
But I need it to round @clevel/10 before it adds one.
I need it to round like this: x.5 or higher rounds up. Below x.5 rounds down. So if @clevel=15... @clevel/10=1.5 I need it to round that to 2, than add 1.
I also need a trigger still to subtract 1 from clevel for the message:
Ouch, you lose a level. |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Wed Apr 21, 2004 11:18 pm |
Try this:
#trigger {Ouch, you lose a level.} {#add CLevel1 -1}
As for the rounding, I don't have a clue how you'd do it =P |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Thu Apr 22, 2004 12:52 am |
Rounding made easy
#eval @clevel/10+(@clevel10)/5+1 |
|
|
|
|
|