Quote:
Originally Posted by ghanja
Code:
sub EVENT_DEATH_COMPLETE {
if(quest::ChooseRandom(0..3) == 0) {
quest::say("I am free of this mortal cell! Prepare for my wrath!");
quest::spawn(quest::ChooseRandom(123..125), 0, 0, $x, $y, $z);
}
}
Code:
perl -c checkcode.pl
|
Thank your for all the feed back and info from everyone. Being able to condense that down to three lines showed me some new stuff. the ChooseRandom I hadn't seen before. Could you use that to pick between numbers that are not X..X but instead a list of numbers. Like if i did ChooseRandom(123, 125, 1001, 2005)? Or even have both ChooseRandom(123, 125, 1001..2005)?