Random with percentages
I am looking for randoms with percentages. IE you turn in an item to an npc and he randomly gives you items where som elesser items are a greator chance then major items.
Source quest I am trying to write up: http://everquest.allakhazam.com/db/quest.html?quest=604 He randomly gives you 3 items, one is very common, the second is medium-rare the 3rd is a rareity. |
To change rarity, just add in multiples of the more common ones. So, if you want the chances to be 60% for common, 30% for uncommon and 10% for rare, just do:
(item1, item1, item1, item1, item1, item1, item2, item2, item2, item3) Should be simple enough to do any percentage of chance you want. |
Quote:
So there is no True percentage/randomizing currently for quests? Something like. Code:
$san = math.random(1,100); use some lua expressions there I really wouldn't know how perl would define math.random, but it gives you the exact idea. Does perl allow Us to add functions for quests on the fly? To much lua in my head lua was easy to add function to. |
you can do a random % in the way you decribed.
this is a sample of my own quest code: Code:
$deal=int(rand(100)+1); |
All times are GMT -4. The time now is 11:08 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.