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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Wed Jul 11, 2007 11:20 pm   

OMG I did Math!
 
OK, please don't laugh, because I am quite proud of this. I never expected to use algebra and my teacher passed me because he was dating my attractive older sister.


%eval( 50 - (200 - (@sips + (50 * %int( (200 - @sips) / 50)))))

50 is the number of sips in a batch of magical potion
200 is the maximum amount in a standard vial

I can not fill '50' from my pot over 200 but I can pour '50' from a vial to a vial leaving a remainder in the second.

That is the remainder, or amount of cost * price per sip to "top off" a vial from a vial.

Anyway, being sucky at even multiplication I wonder if that was really dumb for math. I can't feel badly, I wooted.

Probably someone will go, oh x = y + 50, something like that.

What is certainly good, was while trying figure that one I realized:

#if (%1 = "VN") {jobs = %int( %eval( (200 - @sips) / 50))} {jobs = %int( %eval( (240 - @sips) / 120))}

instead of the old:

#var jobs 0
#var sips %number( @sips)
#if (%1 = "VN") {#if (@sips < 151) {#if (@sips < 101) {#if (@sips < 51) {#if (@sips < 1) {jobs = 4} {jobs = 3}} {jobs = 2}} {jobs = 1}} {#noop}} {#if (@sips < 121) {#if (@sips < 1) {jobs = 2} {jobs = 1}} {#noop}}

which was awful

anyway, if you read this, you must be a really smart person. I would get a headache looking at that, if I didn't need it.
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Wed Jul 11, 2007 11:44 pm   
 
actually not the cost, which is without the -50, it is the price in gold of lost potion. I think that is more interesting then paying more for another of what you just bought

*shrug
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Wed Jul 11, 2007 11:49 pm   
 
oh this is used in an estimate
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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