Lazarus
Master
Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1
Hybris Ultima Online
|
RE: Random function
(07-11-2012 04:52 PM)darksun84 Wrote: It's better you use R1,10 for "clarity", but RAND(10) it's from 0 to 9 !
Just try to do RAND(1) and you'll get always 0
IF ((<SWORDSMANSHIP> >= 100.0) && (<R1,10>))
Like this?
or:
IF ((<SWORDSMANSHIP> >= 100.0) && <R1,10>)
or:
IF ((<SWORDSMANSHIP> >= 100.0) && (R1,10))
^_^ 1º rly?
|
|
07-12-2012 03:30 AM |
|
|
Extreme
Grandmaster Poster
Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20
SphereCommunity
|
|
07-12-2012 03:33 AM |
|
|
Lazarus
Master
Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1
Hybris Ultima Online
|
RE: Random function
(07-12-2012 03:33 AM)Extreme Wrote: 1º and 2º its ok.
(R1,10) don't work.
Extreme, I m falling in love with you
hahaha ^_^ thank you very much.
Another question, if i want more randoms in the same script i will use R2?
or still R1?
LIKE:
IF ((<SWORDSMANSHIP> >= 100.0) && (<R1,10>))
SAD
ADSASA
IF ((<FENCING> >= 100.0) && (<R1,10>))
ASDSA
SADSADSA
IF ((<MACE..> >= 100.0) && (<R1,10>))
EFHNEBGFVHAEGF
I think R1 it's the same like =1 in mine script
^_^
(This post was last modified: 07-12-2012 03:41 AM by Lazarus.)
|
|
07-12-2012 03:37 AM |
|
|
Extreme
Grandmaster Poster
Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20
SphereCommunity
|
|
07-12-2012 03:47 AM |
|
|
Lazarus
Master
Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1
Hybris Ultima Online
|
RE: Random function
(07-12-2012 03:47 AM)Extreme Wrote: <RX,Y>
Randoms from X to Y
If you want something like 50 to 100, use <R50,100>
But, in this script it's the same take the random from 1 to 10 like the 50 to 60... 10 numbers to random.
^_^ ¿Rly ?
If i want 50 % chance i'll take 50 to 100, or 1 to 50.
This will be a nice informative thread for new scripters about the random function.
|
|
07-12-2012 03:50 AM |
|
|
Extreme
Grandmaster Poster
Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20
SphereCommunity
|
RE: Random function
Yes, but you don't need use <R50,60> to do 10%, just use <R1,10>, its best to understand.
If you want 50% use <R1,2>, 33% <R1,3>, 25% <R1,4>, etc...
STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
|
|
07-12-2012 03:54 AM |
|
|
Lazarus
Master
Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1
Hybris Ultima Online
|
RE: Random function
(07-12-2012 03:54 AM)Extreme Wrote: Yes, but you don't need use <R50,60> to do 10%, just use <R1,10>, its best to understand.
If you want 50% use <R1,2>, 33% <R1,3>, 25% <R1,4>, etc...
yepyepyep yeyeppyepyepe =DD==DD
Thanks very much ^_^
we can add a new thread in the SCRIPT HELP to add's all the questions of FUNCTIONS like this ?
^_^ that will be nice and informative
See ya in the forummmm and thanks to all for helping!
|
|
07-12-2012 04:17 AM |
|
|
Lazarus
Master
Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1
Hybris Ultima Online
|
RE: Random function
(07-12-2012 03:54 AM)Extreme Wrote: Yes, but you don't need use <R50,60> to do 10%, just use <R1,10>, its best to understand.
If you want 50% use <R1,2>, 33% <R1,3>, 25% <R1,4>, etc...
Just to advice: this doesn't works
IF ((<SWORDSMANSHIP> >= 100.0) && <R1,10>)
neither this:
IF ((<SWORDSMANSHIP> >= 100.0) && (<R1,10>))
I don't know why but... doesn't works o.o
|
|
07-12-2012 10:54 AM |
|
|
Extreme
Grandmaster Poster
Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20
SphereCommunity
|
RE: Random function
(07-12-2012 10:54 AM)Lazarus Wrote: (07-12-2012 03:54 AM)Extreme Wrote: Yes, but you don't need use <R50,60> to do 10%, just use <R1,10>, its best to understand.
If you want 50% use <R1,2>, 33% <R1,3>, 25% <R1,4>, etc...
Just to advice: this doesn't works
IF ((<SWORDSMANSHIP> >= 100.0) && <R1,10>)
neither this:
IF ((<SWORDSMANSHIP> >= 100.0) && (<R1,10>))
I don't know why but... doesn't works o.o
Maybe <SRC.SWORDMANSHIP> ?
Or <R1,10> == 1 ?
=D
STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
|
|
07-12-2012 11:03 AM |
|
|