View Single Post
  #8  
Old 12-18-2011, 05:41 AM
pepsiphreak79
Sarnak
 
Join Date: Sep 2011
Posts: 70
Default

ty for the help here is the base code that triggers her on approach to dance

ill be adding more things at some date like starting in a robe and taking it off with the modelchange when she is given plat
Code:
sub EVENT_SPAWN
{
	plugin::SetProx(20, 10);
}

sub EVENT_ENTER {
  quest::shout("I'm ready to get dirty Are you?");
  quest::settimer("dance",1);
}

sub EVENT_EXIT {
  quest::say("Come back any time!");
  quest::stoptimer("dance");;
}

sub EVENT_TIMER {

     if ($timer eq "dance")
     {
     quest::doanim(58);
     quest::settimer("dance",1);
     }
}




sub EVENT_SAY {
if($text =~ /Hail/i) {
	quest::say("Hello $name");
	quest::setanim(58); 
}
}
added this to my anim.pl plugin
Code:
#Akkadius
#Usage plugin::SetProx(X/Y Axis Range, Z Axis Range);
sub SetProx{	
	my $Range = $_[0];
	my $Z = $_[1];
	my $x = plugin::val('$x');
	my $y = plugin::val('$y');
	my $npc = plugin::val('$npc');
	my $z = $npc->GetZ();
	quest::set_proximity($x - $Range, $x + $Range, $y - $Range, $y + $Range, $z - $Z, $z + $Z);
	}
__________________
--Any Code by me is considered open source Beta--
Not a DEV not a Coder
Just a person....
Reply With Quote