PDA

View Full Version : PERL Command request


Sarepean
10-27-2004, 02:42 PM
I would like to request a quest::random() function. I'm imagining the use to be something like:

sub EVENT_ITEM
{
if($itemcount(xxx) == x)
{
quest::random(5);

---------------------------------------------------

and then some way of choosing what happens should a 1, 2, 3, 4, or a 5 be rolled.

I know little to nothing about PERL, and I probably need to learn some, but I figured I'd suggest this to the pros so that I have less of a chance of screwing it all up (I learned my lesson when Visual C++ kicked my ass in the 10th chapter).


BTW, I've been keeping up with the daily PERL compiles and I think you guys are doing a great job. I feel as if the emulated server is already able to do more than the Live server and I'm sure others probably feel the same way. Thanks. =)

-Sarepean

animepimp
10-27-2004, 03:59 PM
Look in the quests forum. There is a random function built into perl that you can use. And a simple if statement lets you do different things for different numbers.

mattmeck
10-27-2004, 04:35 PM
we have a gambler on S2K, pay some PP then guess a number, if its the number that the RAN function picked you win big.