View Single Post
  #3  
Old 04-12-2008, 08:40 PM
fault
Hill Giant
 
Join Date: Sep 2005
Posts: 114
Default

Quote:
Originally Posted by trevius View Post
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.

So there is no True percentage/randomizing currently for quests?

Something like.

Code:
$san =  math.random(1,100);
if ($san < 60) then
 quest::summonitem(common item);
else if (($san > 60) and ($san < 90)) then
 quest::summonitem(medium rare item);
else if ($san > 90) then
 quest::summonitem(rare item);

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.
Reply With Quote