summaryrefslogtreecommitdiff
path: root/npc/functions/RNGesus.txt
blob: f71c2f28aa79b7a03d7401f25dc48ccef0163756 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Evol functions.
// Authors:
//    gumi
// Description:
//    Randomization helper functions.



// any(<arg>{, ...<arg>})
//     returns one argument randomly

function	script	any	{
    return getarg(rand(getargcount()));
}



// any_of(<array>)
//     returns any member of the array

function	script	any_of	{
    return getelementofarray(getarg(0), getarrayindex(getarg(0)) + rand(getarraysize(getarg(0)) - getarrayindex(getarg(0))));
}