Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 12-12-2011, 01:02 PM
pepsiphreak79
Sarnak
 
Join Date: Sep 2011
Posts: 70
Default perminent dancing npc

I havnet found a way to make my npc permanently dance yet
Does anyone have a way to make a doanim stay on?
or do i need to make it just loop over and over somehow?

Im trying to craft up a stripper club where the npcs are dancing non stop till you hail them and get the adult epic im gonna work on then they go back to dancing
__________________
--Any Code by me is considered open source Beta--
Not a DEV not a Coder
Just a person....
Reply With Quote
  #2  
Old 12-12-2011, 01:45 PM
dr00dguy
Fire Beetle
 
Join Date: Feb 2011
Posts: 8
Default

I'm not a coder by any means but I would think using a timer would do the trick.

Code:
sub EVENT_SPAWN {

quest::settimer("dance",1);
}

sub EVENT_TIMER {

     if ($timer eq "dance")
     {
     quest::doanim(58);
     }
}
Reply With Quote
  #3  
Old 12-14-2011, 05:15 PM
LordAdakos
Sarnak
 
Join Date: Dec 2007
Posts: 57
Default

that would work, but you'd need to make it reset the timer in the timer event, so it will loop
Reply With Quote
  #4  
Old 12-14-2011, 05:30 PM
dr00dguy
Fire Beetle
 
Join Date: Feb 2011
Posts: 8
Default

yah noticed that after i posted but was to late to edit lol. and I am sure there is a better way to do it, but its a start.

Code:
sub EVENT_SPAWN {

     quest::settimer("dance",1);
}

sub EVENT_TIMER {

     if ($timer eq "dance")
     {
     quest::doanim(58);
     quest::settimer("dance",1);
     }
}
Reply With Quote
  #5  
Old 12-14-2011, 05:40 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

Timers are already set to repeat.
Reply With Quote
  #6  
Old 12-14-2011, 05:56 PM
Aeryn
Fire Beetle
 
Join Date: Jun 2011
Posts: 20
Default

this is one that i use, for some npcs
Code:
sub EVENT_SPAWN {
   quest::settimer("dance6", 2);
}

sub EVENT_TIMER {
   if($timer eq "dance6") {
      my $anivar1 = quest::ChooseRandom(58, 59, 60, 63, 62);
      quest::doanim($anivar1);
   }
}
change numbers if you want different animations
Reply With Quote
  #7  
Old 12-18-2011, 04:38 AM
pepsiphreak79
Sarnak
 
Join Date: Sep 2011
Posts: 70
Default

wow thx guys Im working on writing a few custom quests involving many zones and lvls and that includeds an adult themed quest naughty language and actions lol i just got stuck with that pemra dance lol i so far havnt got the just of most the advanced or eq specific codings only the simple stuff ...
Task system for instance but i never did like it anyway lol so im making this all old school text quest with saylinks for slow typers kinda writing a custom epic later on once i get each quest built in the future ill post when i can a full .pl source of each npc and ill post all sql additions or possibly zip each full quest up and post that way im workin on all at once as somthing strikes me to add i add it its slow cause of the coding and life has me so occupied that writing a few long arse stories is not on the top of the list lol
__________________
--Any Code by me is considered open source Beta--
Not a DEV not a Coder
Just a person....
Reply With Quote
  #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
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:22 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3