summaryrefslogblamecommitdiff
path: root/npc/functions/RNGesus.txt
blob: f71c2f28aa79b7a03d7401f25dc48ccef0163756 (plain) (tree)






















                                                                                                                             
// 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))));
}