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 02-11-2012, 10:37 PM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 904
Default

Quote:
Originally Posted by lerxst2112 View Post
Something like this might work, and it'd be more efficient since it's not going to try and retrieve 2000 clients.

Code:
my @clientlist = $entity_list->GetClientList();
foreach $ent (@clientlist)
{
    my $x = $npc->GetX();
    my $y = $npc->GetY();
    my $z = $npc->GetZ();
    my $distanceCHK = $ent->CalculateDistance($x, $y, $z);
    my $PLTarget = $npc->GetTarget();
    my $TargID = $PLTarget->GetID();
    my $ClID = $ent->GetID();
    my $RampDamageVar = (int(rand($DamageVar ))) + (int($ShieldMinDam));
    if (($distanceCHK <= 2000) && ($TargID != $ClID))
    {
        $ent->Damage($npc, $RampDamageVar, 7477, 1, true, -1, false);
        $ent->Message(13, "$cmname hits YOU for $RampDamageVar points of damage!");
    }
}
Like this? (still doesn't get to the damage portion)

Code:
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 @clientlist = $entity_list->GetClientList();
		foreach $ent (@clientlist) 
			{
			my $x = $npc->GetX();
			my $y = $npc->GetY();
			my $z = $npc->GetZ();
			my $distanceCHK = $ent->CalculateDistance($x, $y, $z);
			my $PLTarget = $npc->GetTarget();
			my $TargID = $PLTarget->GetID();
			my $ClID = $ent->GetID();
			my $RampDamageVar = (int(rand($DamageVar ))) + (int($ShieldMinDam));
			if (($distanceCHK <= 2000) && ($TargID != $ClID))
				{
				$ent->Damage($npc, $RampDamageVar, 7477, 1, true, -1, false);
				$ent->Message(13, "$cmname hits YOU for $RampDamageVar points of damage!");
				}
			}	
		}
   }
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 04:48 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