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 07-06-2019, 02:43 PM
Zoid13erg
Fire Beetle
 
Join Date: Jul 2016
Posts: 7
Default NPC Buffing Scripting Help

Hey I am hoping I can get some help with scripting my npc buff bot i have in PoK. Currently I have it set to Shout every so often that Buffs are available. I would like to change 2 things:

1) set a timer to shout or ooc that there will be an AoE buff in 5 mins + the aoe buff cast.

2) how to make the npc self cast a spell on itself every 30 mins or so.

Here is what I have so far, I have not implemented both of the items on my wishlist yet. so far I have it able to shout and take donations for buffs

Quote:
#zone:PoKnowledge
#Clerical

sub EVENT_SAY {
if(($text=~/hail/i)&&($ulevel<= 45)){
$npc->SetAppearance(0);
quest::say("Hello $name, I can buff you with Temperance for a fee of 10pp, and my friend over there has enchanter buffs.");
}
elsif(($text=~/hail/i)&&($ulevel=>46)){
$npc->SetAppearance(0);
quest::say("Hello $name, I can buff you with Virtue for a fee of 50pp, and my friend over there has cleric buffs");
}
}

sub EVENT_SPAWN
{
$x = $npc->GetX();
$y = $npc->GetY();
quest::set_proximity($x - 800, $x + 800, $y - 800, $y + 800);
}

sub EVENT_ENTER
{
$npc->SetAppearance(1);
my $random_result = int(rand(40));
if ($random_result<=20){
quest::shout("Casting Temp and Virtue for donations beside the main bank!");
}else{
#Do Nothing
}
}

sub EVENT_ITEM{
if (($platinum>=50)&&($ulevel=> 46)){
$npc->SetAppearance(0);
$npc->CastSpell(3479,$userid);
quest::say("Casting Virtue, Good hunting!");
}elsif(($platinum>=10)&&($ulevel<= 45)){
$npc->SetAppearance(0);
$npc->CastSpell(3692,$userid);
quest::say("Casting Temperance, Good hunting!");
}else{
quest::say("Thank you for your donation $name, it wasn't enough though ...");
}
}

sub EVENT_SIGNAL {
quest::shout("Casting Temp and Virtue for donations beside the main bank!");
}
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:25 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3