EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Plane of Mischief Sphynx Dancers (https://www.eqemulator.org/forums/showthread.php?t=39735)

jpyou127 06-06-2015 08:43 PM

Plane of Mischief Sphynx Dancers
 
I am working on getting the sphynx to dance. I have Roxxanne responding to hails and dancing the marinara as well as teaching a PC to dance. I cannot seem to figure out how to call the other 3 in the room to "say" and "doanim"

Here is what I have so far:

Code:

sub EVENT_SAY {
  if ($text=~/hail/i) {
    quest::say("Well hello! We are great dancers. Would you like to see us dance? Or maybe you would like us to teach you to dance?");
        quest::settimer("do_the_marinara", 3);
  }
  elsif($text=~/see you dance/i) {
    quest::say("Hey! Yeah! Do the Marinara!");
        quest::doanim(33)
  }
  elsif($text=~/teach me dance/i) {
    quest::say("Look at you! You can dance! Go, go, go! That's the spirit, you got it! Keep up the good work! Don't get too tired now, you are looking a little pale!");
        quest::selfcast(1246)
  }       
}       
sub EVENT_TIMER{
    if($timer eq "do_the_marinara"){
      my @nlist = $entity_list->GetNPCList();
        foreach my $n (@nlist){
                        if($n->GetMob()=Roxxanne){
                $n->Say("Hey! Yeah! Do the Marinara!");
                $n->DoAnim(33);
                        }
            if($n->GetMob()=Ashley){
                $n->Say("Hey! Yeah! Do the Marinara!");
                $n->DoAnim(33);
            }
            if($n->GetMob()=Brittina){
                $n->Say("Hey! Yeah! Do the Marinara!");
                $n->DoAnim(33);
            }
                        if($n->GetMob()=Diana){
                $n->Say("Hey! Yeah! Do the Marinara!");
                $n->DoAnim(33);
        }
        quest::stoptimer($timer);
    }
}

I realize I have Roxxanne emoting 2 times. Just trying to determine if I am going about this the right way or the wrong way. I am learning the scripting as I go along also


Peyton

Kingly_Krab 06-06-2015 09:19 PM

I may not be cultured, but what is the marinara? Here's me re-write, it's untested, so use at your own discretion:
Code:

sub EVENT_SAY {
    if ($text=~/hail/i) {
        quest::say("Well hello! We are great dancers. Would you like to see us dance? Or maybe you would like us to teach you to dance?");
        quest::settimer("do_the_marinara", 3);
    } elsif($text=~/see you dance/i) {
        quest::say("Hey! Yeah! Do the Marinara!");
        quest::doanim(33)
    } elsif($text=~/teach me dance/i) {
        quest::say("Look at you! You can dance! Go, go, go! That's the spirit, you got it! Keep up the good work! Don't get too tired now, you are looking a little pale!");
        quest::selfcast(1246)
    }   
}

sub EVENT_TIMER{
    if($timer eq "do_the_marinara"){
        my @nlist = $entity_list->GetNPCList();
        foreach my $n (@nlist){
            if($n->GetEnt()->GetCleanName()=~/Roxxanne/i){
                $n->GetEnt()->Say("Hey! Yeah! Do the Marinara!");
                $n->GetEnt()->DoAnim(33);
            }
           
            if($n->GetEnt()->GetCleanName()=~/Ashley/i){
                $n->GetEnt()->Say("Hey! Yeah! Do the Marinara!");
                $n->GetEnt()->DoAnim(33);
            }
           
            if($n->GetEnt()->GetCleanName()=~/Brittina/i){
                $n->GetEnt()->Say("Hey! Yeah! Do the Marinara!");
                $n->GetEnt()->DoAnim(33);
            }
           
            if($n->GetEnt()->GetCleanName()=~/Diana/i){
                $n->GetEnt()->Say("Hey! Yeah! Do the Marinara!");
                $n->GetEnt()->DoAnim(33);
            }
        }
        quest::stoptimer("do_the_marinara");
    }
}


jpyou127 06-06-2015 09:46 PM

Thanks I will give it a go!

In the plane of mischief the Sphynx dancers say Marinara. The dialog I have in the script came from Al'kabor server. I am trying to recreate it, spent time finding the sphynx's dance animation and the correct spell that is cast.

Peyton

jpyou127 06-06-2015 09:58 PM

It didnt trigger the other 3 NPCs to /say or doanim. I am wondering if I am trying to call them incorrectly.

Peyton

NatedogEZ 06-06-2015 11:13 PM

Both of those scripts have syntax errors missing ; at the end of selfcast and the doanim if you missed that :)

jpyou127 06-06-2015 11:25 PM

Ok I got it to work as it seems to have been scripted on live.

One issue I still have is the teach to dance spell is supposed to bbe Magi Curse that stuns and spins, but on the UF client it just stuns, no spin. But it is the correct spell.

Here is the code: Roxxanne.pl

Code:

sub EVENT_SAY {
    if ($text=~/hail/i) {
        quest::say("Well hello! We are great dancers. Would you like to see us dance? Or maybe you would like us to teach you to dance?");
    }
       
        elsif($text=~/see you dance/i) {
        quest::settimer("do_the_marinara", 1);   
    }
       
        elsif($text=~/teach me dance/i) {
        quest::say("Look at you! You can dance! Go, go, go! That's the spirit, you got it! Keep up the good work! Don't get too tired now, you are looking a little pale!");
        quest::selfcast(1246);
    }   
}

sub EVENT_TIMER{
    if($timer eq "do_the_marinara"){
        my @nlist = $entity_list->GetNPCList();
        foreach my $n (@nlist){
            if($n->GetCleanName()=~/Roxxanne/i){
                $n->DoAnim(33);
            }
                       
                        if($n->GetCleanName()=~/Ashley/i){
                $n->Say("Hey! Yeah! Do the Marinara!");
                $n->DoAnim(33);
            }
           
            if($n->GetCleanName()=~/Brittina/i){
                $n->Say("Hey! Yeah! Do the Marinara!");
                $n->DoAnim(33);
            }
           
            if($n->GetCleanName()=~/Diana/i){
                $n->Say("Hey! Yeah! Do the Marinara!");
                $n->DoAnim(33);
            }
        }
        quest::stoptimer("do_the_marinara");
    }
}

Thanks for your help King!


Peyton

jpyou127 06-06-2015 11:26 PM

Roger that NateDog! This is fun to learn to do this =)

Now for the treasure chest and halfings in the front yard!

Peyton


All times are GMT -4. The time now is 06:19 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.