View Single Post
  #5  
Old 10-03-2016, 05:37 PM
lordnivek1
Sarnak
 
Join Date: Feb 2013
Posts: 65
Default

Quote:
Originally Posted by ghanja View Post
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)?
Reply With Quote