I'm trying to make it so that when I use the item, I get a completly random outfit with addons.
But the problem is, if I create 5 different chars and use the item the same amount of times, it always gives the same outfits in an specific order.
Is there a way to make it truly random?
But the problem is, if I create 5 different chars and use the item the same amount of times, it always gives the same outfits in an specific order.
Is there a way to make it truly random?
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
addons = {0, 1, 2, 3}
outfits = {157, 153, 279, 278, 128, 136, 288, 289, 148, 144,
137, 129, 270, 273, 131, 139, 138, 130, 269, 268,
132, 140, 252, 251, 150, 146, 155, 151, 158, 154,
133, 141, 134, 142, 149, 145, 325, 324, 541, 542,
516, 514, 512, 513, 471, 472, 466, 465, 464, 463,
433, 432, 430, 431, 329, 328, 366, 367, 335, 336,
325, 324}
doCreatureChangeOutfit (cid, {lookType = outfits[math.random(62)], lookHead = math.random(132) , lookBody = math.random(132), lookLegs = math.random(132), lookFeet = math.random(132), lookAddons = 3 } )
end