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
  #1  
Old 12-30-2007, 03:49 AM
Annihilator
Sarnak
 
Join Date: May 2007
Posts: 47
Default Level restricting quest variables

I've been doing some modification to the standard buff bot scripts Vicar_Qadar, Illusionist_Nomaad and Dieffer_Wolfhugger that came with Angelox's Classic database. Specifically, I've been modifying them to cast more spells. However, I've noticed a glitch and I'm not quite sure what I can do to resolve this. Maybe one of the more experienced PERL scripters can shed some light for me?

Here is one of the sample scripts
Code:
#zone:PoKnowledge
#Angelox

sub EVENT_SAY { 
if(($text=~/hail/i)&&($ulevel<= 45)){
$npc->SetAppearance(0);
quest::say("Hello $name, For a donation of 5pp, I'll cast Spirit of the Wolf on you.");
}
elsif(($text=~/hail/i)&&($ulevel=>46)){
$npc->SetAppearance(0);
quest::say("Hello $name, For a donation of 15pp, I'll cast Spirit of Eagle on you.");
 }
}

sub EVENT_SPAWN
{
	$x = $npc->GetX();
	$y = $npc->GetY();
	quest::set_proximity($x - 90, $x + 90, $y - 90, $y + 90);
}

sub EVENT_ENTER
{
	$npc->SetAppearance(1);
	my $random_result = int(rand(100));
	if ($random_result<=15){
	quest::shout("Casting SoW and SoE for donations behind the main bank!");
	}else{
	#Do Nothing
 }
}

sub EVENT_ITEM{
  if (($platinum>=15)&&($ulevel=> 46)){
    $npc->SetAppearance(0);
    #quest::selfcast(2517);
    $npc->CastSpell(2517,$userid);
    quest::say("Casting Spirit of Eagle, Good hunting!");

  }elsif(($platinum>=5)&&($ulevel<= 45)){
    $npc->SetAppearance(0);
    #quest::selfcast(278);
    $npc->CastSpell(278,$userid);
    quest::say("Casting Spirit of the Wolf, Good hunting!");
  }else{
    quest::say("Thank you for your donation $name, it wasn't enough though ...");
 }
}

sub EVENT_SIGNAL {
quest::shout("Casting SoW and SoE for donations behind the main bank!");
}
As you can see, there are level prerequisit strings coded in to allow the variants of spells to be cast for the specific level range for the buffs. However, even though the text is properly displayed when the level range is met, the script will still allow the higher level spell to be cast on the lower level character regardless of the $ulevel statement. Is this a glitch in the PERL processor or EQEmu? The version of PERL I'm using is ActivePerl 5.8.7.813.
Reply With Quote
 

Thread Tools
Display Modes

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:41 PM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3