Loading...   


sub EVENT_SPAWN{
	$nn = $npc->GetCleanName();
	if($instanceversion == 1){
		if($nn=~/fire/i){
			plugin::SetAnim("sit");
			$npc->TempName("");
			$npc->SpellEffect(462);
			$npc->SpellEffect(473);
			$npc->SpellEffect(641);
		}
		if($nn=~/wolf|bear|snake/i){
			my $sradius = 50;
			for($i = 1; $i <= plugin::RandomRange(1, 2); $i++){
				quest::spawn2(1007812, 0, 0, $x + plugin::RandomRange((0 - $sradius), $sradius), $y + plugin::RandomRange((0 - $sradius), $sradius), $z, $h);
			}
			my $StartMove = int(rand(25)) + 5;
			quest::settimer("dervishroam", $StartMove);
		}
		if($nn=~/orc|mammoth|ice boned skeleton|goblin/i){
			$npc->SpellEffect(459);
			my $StartMove = int(rand(25)) + 5;
			quest::settimer("dervishroam", $StartMove);
		}
		if($nn=~/kabor/i){
			quest::settimer("alkmessages", 1);
			quest::settimer("alkcast", 6);
		}
	}
}

sub EVENT_SAY{
	$nn = $npc->GetCleanName();
	if($npc->GetRace() == 11){ plugin::DiaWind("Who are you? Are you here to help us?"); }
	if($npc->GetNPCTypeID() == 1007813){ #:::  Rivervale Morell Thule
		# Port to -1387, 567, -180, 134
		if($npc->GetEntityVariable("sleeping") == 1){ 
			$npc->GMMove($npc->GetEntityVariable("sleepingx"), 
				$npc->GetEntityVariable("sleepingy"), 
				$npc->GetEntityVariable("sleepingz"), 
				$npc->GetEntityVariable("sleepingh"));
			if($text=~/enter dream/i){ 
				$client->MovePCInstance($zoneid, $instanceid, -1387, 567, -180, (134 * 2)); 
				plugin::DiaWind("You enter the {lb}2nd Dream Level~, not very different from what before... <br> mysterious noquotes");
			}
			else{
				plugin::DiaWind("Take the {lb}Antidote~ yourself and jump into the {lb}2nd dream stage~? mysterious [Enter Dream>");
			}
		}
		elsif(quest::istaskactivityactive(197, 3)){
			plugin::DiaWind("What are you waiting for?"); 
		}
		elsif(quest::istaskactivityactive(197, 2)){
			if($text=~/hail/i){
				plugin::DiaWind("Who are you? Why do I feel like I know you? [I'm here to help you>");
			}
			if($text=~/here to help you/i){
				plugin::DiaWind("Hrrmmm, I'm not sure... Why should I trust you? [There are forces working against you Morell, you need to trust me> +44+");
			}
			if($text=~/forces/i){
				plugin::DiaWind("How do I know you are not like the others? [Because the others are trying to mess with your head and take your powers> +44+");
			}
			if($text=~/take your powers/i){
				plugin::DiaWind("But I have no powers! Can't you see the {r}world is destroyed~! [You are dreaming Morell, we need to act fast or they are going to come for you> +44+");
			}
			if($text=~/you are dreaming more/i){
				plugin::DiaWind("Ok... then what do we do? [First, you are going to need to trust me. Second you will need to enter another level of sleep by taking my antidote> +44+");
			}
			if($text=~/taking my antidote/i){
				plugin::DiaWind("{y}Another level of dream state~? {r}Are you mad~? I am the {lb}God of Dreams~ and I've never done that! [Trust me, it is the only way> +44+");
			}
			if($text=~/it is the only way/i){
				plugin::DiaWind("Alright... I will do it...");
				quest::updatetaskactivity(197, 2);
			}
		}else{
			quest::emote("pays no attention to you");
		}
	}
	if($npc->GetNPCTypeID() == 1007814){ #:::  Everfrost Morell Thule
		# Port to -3472, 169, -350, 161
		if($npc->GetEntityVariable("sleeping") == 1){
			$npc->GMMove($npc->GetEntityVariable("sleepingx"), 
				$npc->GetEntityVariable("sleepingy"), 
				$npc->GetEntityVariable("sleepingz"), 
				$npc->GetEntityVariable("sleepingh"));
			if($text=~/enter dream/i){ 
				$client->MovePCInstance($zoneid, $instanceid, -3472, 169, -350, (161 * 2)); 
				plugin::DiaWind("You entered the {lb}3rd Dream Level~... <br> mysterious noquotes");
			}
			else{
				plugin::DiaWind("Take the {lb}Antidote~ yourself and jump into the {lb}3rd dream stage~? mysterious [Enter Dream>");
			}
		}
		elsif(quest::istaskactivityactive(197, 5)){
			if($text=~/hail/i){
				plugin::DiaWind("Who are you? Oh, {lb}I think I know who you are~... I think we {y}spoke here before~... I'm not quite sure though... [I'm going to need you to take the antidote again>"); 
			}
			if($text=~/take the antidote again/i){
				plugin::DiaWind("Hrmm alright, {y}yeah I remember now~, you wanted to go {y}several dream stages~... That must mean we're already in a {y}dream within a dream~? {r}Memory gets worse down here...~ [We need to be quick Morell> ");
			}
			if($text=~/we need to be quick/i){
				plugin::DiaWind("Sure thing... ");
			}		
		}
		else{
			quest::emote("pays no attention to you");
		}
	}
	if($npc->GetNPCTypeID() == 1007815){ #:::  Felwithe Morell Thule
		# Port to -6670, 144, -712, 98
		if($npc->GetEntityVariable("sleeping") == 1){
			$npc->GMMove($npc->GetEntityVariable("sleepingx"), 
				$npc->GetEntityVariable("sleepingy"), 
				$npc->GetEntityVariable("sleepingz"), 
				$npc->GetEntityVariable("sleepingh"));
			if($text=~/enter dream/i){ 
				$client->MovePCInstance($zoneid, $instanceid, -6670, 144, -712, (98 * 2)); 
				plugin::DiaWind("You entered the {lb}4th Dream Level~... <br> mysterious noquotes");
			}
			else{
				plugin::DiaWind("Take the {lb}Antidote~ yourself and jump into the {lb}4th dream stage~? mysterious [Enter Dream>");
			}
		}
		elsif($text=~/hail/i){
			plugin::DiaWind("I am ready...");
		}
	}
	if($nn=~/Firiona Vie/i){
		if($text=~/hail/i){
			plugin::DiaWind("You do realize you're doing more {r}harm~ than {lb}good~, don't you? [What do you mean? Morell is in trouble> +28+");
		}
		if($text=~/what do you mean/i){
			plugin::DiaWind("*Laughs - He doesn't need your help, {g}Norrath~ is {r}doomed~... You must realize that is futile... [This is just a dream> +63+");
		}
		if($text=~/this is just a dream/i){
			plugin::DiaWind("Perhaps you aren't listening... Whether you think this is a dream or not this is the subconscious of {lb}Morell Thule~, he is a god and what he knows
			about the {lb}destiny of this realm~ goes beyond your understanding you pathetic mortal... [I am going to help him regardless of your lack of faith> +28+"); 
		}
		if($text=~/regardless of your/i){
			plugin::DiaWind("That's what you think... +28+");
			quest::updatetaskactivity(197, 7, 1); 
			$npc->Attack($client);
			$npc->AddToHateList($client);
		}
	}
}

sub EVENT_TIMER{
	if($timer eq "dervishroam"){
		quest::stoptimer("dervishroam");
		plugin::RandomRoam(250, 250);
		my $NextMove = int(rand(45)) + 5;
		quest::settimer("dervishroam", $NextMove);
	}
	if($timer eq "alkmessages"){
		quest::shout(quest::ChooseRandom(
			"Norrath has never seen a greater wizard than myself!",
			"I created Norrath with all of my greatness and I will end it with my power!",
			"The Gift of Life is no longer...",
			"Bwahahahaha!",
		));
		quest::stoptimer("alkmessages");
		quest::settimer("alkmessages", plugin::RandomRange(1, 120));
	}
	if($timer eq "alkcast"){ quest::doanim(44); }
}

sub EVENT_COMBAT{
	$nn = $npc->GetCleanName();
	if($combat_state == 1){
		if($nn=~/giant rat/i){ quest::emote("squeaks"); }
		if($nn=~/beetle/i || $nn=~/klak/i){ quest::emote("clicks as it comes after " . $client->GetCleanName()); }
		if($nn=~/bear/i){ quest::emote("roars"); }
		if($nn=~/snake/i){ quest::emote("ssssss"); }
		if($nn=~/wolf/i){ quest::emote("roars as it lunges " . $client->GetCleanName()); }
		if($nn=~/wasp/i){ quest::emote("BZzzzzzzzzzzzztttttt"); }
		if($nn=~/crazed/i){ quest::say("Gooobiedooopgooop!!!"); }
		if($nn=~/orc/i){ quest::emote("grawwwww"); }
		if($nn=~/mammoth/i){ quest::emote("stomps in your direction"); }
		if($nn=~/giant/i){ quest::emote("stomps the earth around you"); }
	}
}

sub EVENT_ITEM{
	if(quest::istaskactivityactive(197, 3) || quest::istaskactivityactive(197, 5) || quest::istaskactivityactive(197, 9)){
		if(plugin::check_handin(\%itemcount, 6519 => 1)) {
			plugin::DiaWind("[{gold}Morell Thule~] Ooohhhhhh..... Getting tired........ 
			<br><br>
			{in}{bullet} It appears as if it is working... Now hail him again to make sure he is sleeping and then take the {lb}antidote~ yourself...
			mysterious nobracket");
			plugin::SetAnim("dead");
			$npc->SpellEffect(387);
			$npc->SetEntityVariable("sleeping", 1);
			$npc->SetEntityVariable("sleepingx", $x);
			$npc->SetEntityVariable("sleepingy", $y);
			$npc->SetEntityVariable("sleepingz", $z);
			$npc->SetEntityVariable("sleepingh", $h);
			quest::summonitem(6519);
			if(quest::istaskactivityactive(197, 3)){ quest::updatetaskactivity(197, 3, 1); }
			if(quest::istaskactivityactive(197, 5)){ quest::updatetaskactivity(197, 5, 1); }
			if(quest::istaskactivityactive(197, 9)){ quest::updatetaskactivity(197, 9, 1); }
		}
	}
}

sub EVENT_KILLED_MERIT{
	$nn = $npc->GetCleanName();
	if($nn=~/bixie|black bear|wasp|snake|beetle|klaknak|wolf|rat/i) { plugin::UpdateTaskActivity("solo", 197, 1, 1); }
	if($nn=~/barbarian|mammoth|polar bear|snow |ice /i) { plugin::UpdateTaskActivity("solo", 197, 4, 1); }
	if($nn=~/brownie|crushbone|elf/i) { plugin::UpdateTaskActivity("solo", 197, 6, 1); } 
	if($nn=~/drachnid|lurid|feral cock|plaguebone|angry mountain/i) { plugin::UpdateTaskActivity("solo", 197, 10, 1); } 
	if($nn=~/Kabor/i) { plugin::UpdateTaskActivity("solo", 197, 11, 1); } 
	if($nn=~/Firiona Vie/i) { plugin::UpdateTaskActivity("solo", 197, 8, 1); plugin::DiaWind("Obviously she was a projection, I wouldn't let it bother you... mysterious noquotes"); } 
}

Raw Paste Data