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
  #4  
Old 03-08-2015, 08:24 PM
Asylum
Sarnak
 
Join Date: Jun 2013
Posts: 81
Default

Here is an instance generator/destroyer npc I use in gfaydark to generate level-appropriate instances of crushbone.

Code:
sub EVENT_SAY {
	my $EnterInst = quest::saylink("Enter the Instance", 2);
	my $Destroy = quest::saylink("destroy", 2);
    my $worse = quest::saylink("worse", 2);
	my $evil = quest::saylink("evil", 2);
	my $InstId = quest::GetInstanceID("crushbone", $version);

	if($text=~/hail/i){
		quest::say("Thank Tunare you're here, $name!  Something dreadful is taking place inside Crushbone.  Yes, yes, I realize that the whole place is dreadful to begin with.  But it's much [$worse] now.");
	}
	if($text=~/worse/i){
		quest::say("Some new evil has moved in and set up shop, destroying everything inside.  Where the Crushbone Orcs were destructive and chaotic, this new [$evil] is much more of a threat to all of Tunare's creatures.");
	}
	if($text=~/evil/i){
		quest::say("If you are willing to assist us, I will need to ensure your safe passage.  Just say when you are ready and I can open a portal enabling you to [$EnterInst].  Also, if you are done fighting, or wish to start over, I can [$Destroy] any old instances that may be lingering.");
	}
	if ($text =~/Enter the Instance/i) {
		my $j;
		for($j=2; $j<=4; $j++) {
			my $version = $j;
			my $InstId = quest::GetInstanceID("crushbone", $version);
			if ($InstId > 0) {
				quest::MovePCInstance(58, $InstId, 166, -586, 3.13);
			}
			elsif ((quest::GetInstanceID("crushbone", $ulevel + 1)) > 0) {
				quest::MovePCInstance(58, quest::GetInstanceID("crushbone", $ulevel + 1), 166, -586, 3.13);
			}
			elsif ((quest::GetInstanceID("crushbone", $ulevel - 1)) > 0) {
				quest::MovePCInstance(58, quest::GetInstanceID("crushbone", $ulevel - 1), 166, -586, 3.13);
			}
			elsif (($ulevel >= (($version * 10) - 9)) && ($ulevel <= ($version * 10))) {
				my $i_id = quest::CreateInstance("crushbone", $version, 21600);
				quest::AssignGroupToInstance($i_id);
				quest::AssignToInstance($i_id);
				quest::MovePCInstance(58, $i_id, 166, -586, 3.13);
			}
		}
	}
	if($text=~/destroy/i){
		my $i;
		for($i=0; $i<=6; $i++) {
			quest::DestroyInstance(quest::GetInstanceID("crushbone", $i));
		}
	}
	if ($text =~/Daria sent me/i) {
		my $InstId = quest::GetInstanceID("crushbone", $version);
		if ($InstId > 0) {
			quest::MovePCInstance(58, $InstId, 166, -586, 3.13);
		}
		elsif ($ulevel >= 50 && (plugin::check_hasitemoncursor($client, 4621))) {
			my $i_id = quest::CreateInstance("crushbone", 6, 21600);
			quest::AssignGroupToInstance($i_id);
			quest::AssignToInstance($i_id);
			quest::MovePCInstance(58, $i_id, 166, -586, 3.13);
		}
	}
}
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 05:45 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