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
deathkitty
Apprentice


Joined: 14 Apr 2008
Posts: 105

PostPosted: Thu May 22, 2008 10:45 am   

How do I round a number in a variable DOWN?
 
trigger:

pattern:
^You are dead

action:
#math energy @energy-(@energy/4)




the idea is that when you die it takes 25% away from the energy

however energy can be between 0 and 100, so you can get some odd numbers sometimes. I need it to round down the result it gets after taking 1/4 away but I can't work out what i need to do that
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu May 22, 2008 11:18 am   
 
#math energy @energy*3/4
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
deathkitty
Apprentice


Joined: 14 Apr 2008
Posts: 105

PostPosted: Thu May 22, 2008 3:57 pm   
 
thanks!
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