View Single Post
  #3  
Old 05-05-2010, 03:33 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Script examples: (Pardon some of the slop organization as it warped on copy and paste)

Code:
plugin::DoAnim:
Code:
sub EVENT_SAY
{
if($text=~/Hail/i){
quest::say("Well hello there ol' lad! How are yeh today!");
plugin::DoAnim(wave);
}
if($text=~/repond to text above/i){
quest::say("Hah! If you weren't such a kidder $name I'd call yeh a fool!");
plugin::DoAnim(laugh);
}
}
Code:
plugin::SetAnim:
This would be a diseased Iksar in the overthere theme people will see. Lays on the ground dead after spawn to avoid clients from seeing them standing up right using the timer instead of straight up using it in a sub EVENT_SPAWN:
Code:
sub EVENT_SPAWN
{
	quest::settimer("Die",1); 
	$x = $npc->GetX();
	$y = $npc->GetY();
	$z = $npc->GetZ();
	quest::set_proximity($x - 5, $x + 5, $y - 5, $y + 5, $z - 4, $z + 4);
}

sub EVENT_TIMER {
	 if($timer eq "Die") {
	  quest::stoptimer("Die");
	  plugin::SetAnim(dead);
 }
}

sub EVENT_ENTER {
		my $x = $npc->GetX();
        my $y = $npc->GetY();
        my $z = $npc->GetZ();
        my $h = $npc->GetHeading();
		$client->Message(15, "The Iksar appears to be a test subject instead of using their own race, the Shissar.");
		}
		}
Reply With Quote