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 04-28-2013, 06:08 PM
Drakiyth's Avatar
Drakiyth
Dragon
 
Join Date: Apr 2012
Posts: 545
Default sub EVENT_SPAWN - Check for clients around npc. Need some help please.

I have an idea on how to buff temporary (swarm) pets based on the user's charisma but it requires that npc to check for the player with a certain item in their inventory && their charisma value.


Just an example below. This quest goes in the folder where that npc resides either templates or the zone folder with its name.pl

sub EVENT_SPAWN
{
my $x;
my $y;
my $z;
my $h;

$x = $npc->GetX();
$y = $npc->GetY();
$z = $npc->GetZ();
$h = $npc->GetHeading();


quest::set_proximity( $x-6,$x+6,$y-6,$y+6,$z-6,$z+6);
}

sub EVENT_???? (ENTER/EXIT WORK BUT ARE INCONVENIENT)
{

$cha = $client->GetCHA();
my $npcid = $npc->GetID();

if ($cha >= 50 && $cha <= 99 && $hasitem{1384})
{
quest::say("Test");
$npc->CastSpell(777,$npcid);
}


The example above works on proximity tests (EVENT_ENTER/EXIT) but it's annoying as hell since you have to move towards and away from the mob. So, my question to anybody reading this: How would you make an NPC check for the client and these conditions as soon as it's spawned only using sub EVENT_SPAWN?
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 07:08 PM.


 

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