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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-11-2012, 09:34 PM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 904
Default Simulated AE Rampage Script

I know there's now a special attack code for Wild Rampage, but I liked using this on an old NPC of mine because of the customizable damage and delivery messages. This is the exact same script I used before, however now it doesn't work. I'm assuming some thing has changed to break this script as it fires all the way up to the if ($client_search) part and stops. Any help is appreciated.

Code:
my $x;
my $y;
my $z;
my $h;


sub EVENT_COMBAT
   {

   if ($combat_state == 1)
      {
      quest::settimer("rampage",15);
      }

   if ($combat_state == 0)
      {
      $npc->WipeHateList();
      quest::stoptimer("rampage");
      quest::stoptimer("getclients");
      #$npc->SetHP($npc->GetMaxHP() * 1);
      }
   }

   
sub EVENT_TIMER
   {
   
   if ($timer eq "rampage")
      {
      quest::stoptimer("rampage");
      my $TimeRA = quest::ChooseRandom(15);
      quest::settimer("getclients", $TimeRA);
      }

   if ($timer eq "getclients")
      {
      $cmname = $npc->GetCleanName();
      my $MaxDam = $npc->GetMaxDMG();
      my $ShieldMaxDam = ($MaxDam * .80);
      my $ShieldMinDam = $ShieldMaxDam / 2;
      my $DamageVar = ($ShieldMaxDam - $ShieldMinDam);
      $entity_list->MessageClose($npc, 1, 2000, 13, "$cmname SLAMS his hammer into the ground!");
         my $list_check = 0;
      for ($list_check = 0; $list_check < 2000; $list_check++)
         {
         $client_search = $entity_list->GetClientByID($list_check);
         if ($client_search)
            {
###The script stops here
            my $x = $npc->GetX();
            my $y = $npc->GetY();
            my $z = $npc->GetZ();
            my $distanceCHK = $client_search->CalculateDistance($x, $y, $z);
            my $PLTarget = $npc->GetTarget();
            my $TargID = $PLTarget->GetID();
            my $ClID = $client_search->GetID();
            my $RampDamageVar = (int(rand($DamageVar ))) + (int($ShieldMinDam));
            if (($distanceCHK <= 2000) && ($TargID != $ClID))
               {
               $client_search->Damage($npc, $RampDamageVar, 7477, 1, true, -1, false);
               $client_search->Message(13, "$cmname hits YOU for $RampDamageVar points of damage!");
                    }
            }
         }
      }
   }


sub EVENT_DEATH
   {
   quest::stoptimer("rampage");
   quest::stoptimer("getclients");
   }
Reply With Quote
 


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 02:01 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3