Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-14-2013, 07:34 PM
Loxo
Fire Beetle
 
Join Date: Jun 2012
Posts: 5
Default Climb a tree

Code:
##a_Pine.pl
sub EVENT_SPAWN
{
	$x = $npc->GetX();
	$y = $npc->GetY();
	$z = $npc->GetZ();
	quest::set_proximity($x - 8, $x + 8, $y - 8, $y + 8, $z - 200, $z + 50);
}

sub EVENT_ENTER
{
$climberchar = ($client);
	$npc->SignalClient($climberchar, 1);
}
sub EVENT_EXIT
{
	$npc->SignalClient($climberchar, 2);
$climberchar = undef;
}
Code:
##player.pl
sub EVENT_SIGNAL
{
	if ($signal == 1) 
	{
	$weight = ($client->GetWeight() / 10);
	$basedex = $client->GetBaseDEX();
	$basestr = $client->GetBaseSTR();
	$climbertime = ((($basedex + $basestr) / ($weight + 1)*2));
		quest::settimer("treeclimb",3);
		quest::settimer("climber",$climbertime);
	}
	elsif ($signal == 2)
	{
		quest::stoptimer("climber");
		quest::stoptimer("treeclimb");
		$client->SetFlyMode(0);
	}
	else
	{
		quest::emote(" is broken");
	}
}

sub EVENT_TIMER
{
	if ($timer eq "treeclimb")
	{
		$client->SetFlyMode(1);
		$client->Message(10, "You begin to climb...");
		quest::stoptimer("treeclimb");
	}
	elsif ($timer eq "climber")
	{
	$climbervar = quest::ChooseRandom(1, 2, 3);
		if ($climbervar == 1)
		{
			$client->Message(10, "You almost lose your grip...");
			quest::doanim(12);
		}
		elsif ($climbervar == 2)
		{
			$client->Message(10, "You feel a bug crawl up your leg and almost lose your grip...");
			quest::doanim(23);
		}
		else
		{				
			$client->SetFlyMode(0);
			$client->Message(10, "You lose your grip...");
			quest::stoptimer("climber");
		}
	}
}
It always seems to work when all the parenthesis are there.
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 10:39 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