Page 1 of 1

Math.Rand?

Posted: Fri Oct 22, 2004 3:51 am
by OBCENEIKON
I am trying to generate a number between 100 and 400, I found this in the manual
Math
math Math

access to type(s): math

Creates a Math object which gives allows access to the math type members.
Example

/echo ${Math.Sqrt[49]}
Echos the square root of 49

/echo ${Math.Rand[500]}
Echos a random number between 0 and 500

/echo ${Math.Calc[49%6+25]}
Echos the result of 49%6+25, or 1+25
but didnt see anything to get a number between 2 givin numbers. is there a way to do this?

Posted: Fri Oct 22, 2004 4:21 am
by dont_know_at_all
/echo ${Math.Calc[${Math.Rand[300]}+100]}

Posted: Fri Oct 22, 2004 5:54 am
by Sharp of Fairlight
Hi.

I usually back out of my garage with my car but yesterday a friend of mine borrowed my car and returned it with the front towards the garage door. I need help with getting out of the garage. Is there a way to do this?

Posted: Fri Oct 22, 2004 6:13 am
by Cr4zyb4rd
Damn you Sharp...I think i just bit my tongue. :(

Posted: Fri Oct 22, 2004 9:38 am
by Chill
DKAA getting soft on us :D

Posted: Fri Oct 22, 2004 9:39 am
by OBCENEIKON
damn, read the manual, searched the boards, and still get flamed, its a no win situation. BTW thanks DKAA

Posted: Fri Oct 22, 2004 9:39 am
by Chill
Yes sharp, just drop a stick of Dynamite in the gas tank and blow it out. Will work, guranteed. :P
OBCENEIKON wrote:damn, read the manual, searched the boards, and still get flamed, its a no win situation.
Lolz. There are no instructions for tying your shoes in the manual either, but if you ask on here, yea you will prolly get flamed. Think thats the point Sharp was making.

Asking how to add 2 numbers together is kinda in the "shoe lace" category.

Posted: Fri Oct 22, 2004 10:51 am
by blueninja
Reading the manual and searching the boards is all good but there's a third step you forgot. Thinking.. ;)

Posted: Fri Oct 22, 2004 8:50 pm
by TheUnholy
Sharp of Fairlight wrote:Hi.

I usually back out of my garage with my car but yesterday a friend of mine borrowed my car and returned it with the front towards the garage door. I need help with getting out of the garage. Is there a way to do this?
hahahahahahaha

Posted: Fri Oct 22, 2004 11:57 pm
by Cams69
Need the MQ2GarageDoor plugin !

Posted: Sat Oct 23, 2004 9:52 am
by Jerle69
HAHA, great laugh Sharp. DKAA, next time give him the disco version, because your logic is too hard :)

Here's the real way!

Code: Select all

/declare i int
/declare mynum int 0
/for i 1 to 100
  /varset mynum ${Math.Calc[${Math.Rand[3]}+1+${mynum}]}
/next
/echo MyNumber (${mynum}) is teh win!

Posted: Sat Oct 23, 2004 1:49 pm
by Cr4zyb4rd
That's probably the type of answer they were expecting, Jerle :)