summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-07-14 01:42:21 -0300
committerJesusaves <cpntb1@ymail.com>2019-07-14 01:42:21 -0300
commita8aea065bd5e995a4b21072654f210003790a14a (patch)
treef4f78cd2524bba3beb56367010861ebc1576298e
parent09499a38cffad29d5c82a04600ca820d544e55e8 (diff)
downloadserverdata-a8aea065bd5e995a4b21072654f210003790a14a.tar.gz
serverdata-a8aea065bd5e995a4b21072654f210003790a14a.tar.bz2
serverdata-a8aea065bd5e995a4b21072654f210003790a14a.tar.xz
serverdata-a8aea065bd5e995a4b21072654f210003790a14a.zip
"Improve" rand2() randomness (well, this is still awkward)
-rw-r--r--npc/functions/main.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index c0fa64282..055c7630e 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -245,13 +245,13 @@ function script npctalkonce {
// rand2( min, max )
function script rand2 {
if (getargcount() == 2) {
- .@min=getarg(0)*10;
- .@max=getarg(1)*10+9;
+ .@min=getarg(0)*100;
+ .@max=getarg(1)*100+99;
} else {
.@min=0;
- .@max=getarg(0)*10-1;
+ .@max=getarg(0)*100-1;
}
- return rand(.@min, .@max)/10;
+ return rand(.@min, .@max)/100;
}
// returns one argument randomly