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
  #2  
Old 07-06-2019, 06:21 PM
Almusious
Fire Beetle
 
Join Date: Sep 2012
Posts: 25
Default

Code:
## Zone: PoKnowledge
## Clerical Buffs

sub EVENT_SPAWN
{
	quest::set_proximity($x - 800, $x + 800, $y - 800, $y + 800);
	quest::settimer("fiveminutes", 300);
	quest::settimer("thirtyminutes", 1800);
}

sub EVENT_TIMER
{
	if ($timer eq "fiveminutes")
	{
		quest::stoptimer("fiveminutes");
		quest::settimer("buffaoe");
		quest::shout("Buffing AOE buffs in five minutes, get near me before that time!");
	}
	elsif ($timer eq "thirtyminutes")
	{
		quest::stoptimer("thirtyminutes");
		quest::settimer("thirtyminutes");
	}
	elsif ($timer eq "buffaoe")
	{
		quest::shout("Casting AOE spell(s) now! If you aren't in range too bad!");
		my @clientlist = $entity_list->GetClientList();
		foreach $singeclient (@clientlist)
		{
			if ($singleclient)
			{
				if ($singleclient->CalculateDistance($x, $y, $z) <= 40)
				{
					$npc->CastSpell(1111, $singeclient->GetID()); ## Change 1111 to whichever spell, copy/paste this line how ever many times
				}
			}
		}
		quest::stoptimer("buffaoe");
		quest::settimer("fiveminutes");
	}
}

sub EVENT_ENTER
{
	$npc->SetAppearance(1);
	if (quest::ChooseRandom(0..40) <= 20)
	{
		quest::shout("Casting Temp and Virtue for donations beside the main bank!");
	}
}

sub EVENT_SIGNAL 
{
	quest::shout("Casting Temp and Virtue for donations beside the main bank!");
}

sub EVENT_SAY 
{
	if ($text=~/Hail/i)
	{
		if ($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 ($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_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 ...");
	}
}
It may be what you're after. Only checked it for syntax.
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 09:09 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