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
  #7  
Old 01-04-2013, 11:58 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Quote:
Originally Posted by javewow View Post
you's .pl no working no loot!
Code:
use warnings;

sub EVENT_SPAWN {
	my $rands	= quest::ChooseRandom(15270,15275,15075,15271,15279,15212,15079,15274,15272);
	my $randa	= quest::ChooseRandom(2031,2036,2030,2034,2027,2038,2026,2029,2025,2032,2028,2033);
	my $randw	= quest::ChooseRandom(5043,6032,6030,7022,7024,94155,6031);
	my $rewardr	= quest::ChooseRandom(1,2,3,4,5,6,7,8,9,10);

	if($NPCRace!=54)
	{

		if($rewardr < 4) {
			quest::addloot($rands,1);
		}
		elsif($rewardr ~~ [4..6]) {
			quest::addloot($randw,1);
		}
		elsif($rewardr ~~ [7..9]) {
			quest::addloot($randa,1);
		}
		elsif($rewardr > 9)
		{quest::addloot($randw,1);
		}
	}
}

sub EVENT_COMBAT {
	my $NPCRace = $npc->GetRace();

	if($combat_state == 1) {
		$npc->Heal();
	}

	if($NPCRace==54) {
		quest::say("your blood will spill.");
	}
	else {
		quest::say("Time to die $name!");
	}
}


sub EVENT_DEATH
{
		quest::say("Arrg defeated by a subroutine reversion!");
}
I did not test the above, give it a try, or, try changing:

Code:
sub EVENT_DEATH
{
to

Code:
sub EVENT_SPAWN
{
To see if it returns more favorable results. Perl therefore quests are indeed working otherwise right?

*edited: excuse the odd code format, copy/pasted from a PM I sent and I see it retained it's odd format once again.. wierd.
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:15 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