Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Quests

Archive::Quests Archive area for Quests's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 06-24-2004, 03:07 AM
KhaN's Avatar
KhaN
Dragon
 
Join Date: Mar 2004
Location: France, Bordeaux.
Posts: 677
Default

Quote:
setglobal error inserting 4 : DBcore::Runquery : no result
Even if error appear, your global is still writen in DB, so, no worry.

For me, the quest should look like this, i know you want that your mobs spawn randomly, as i never used perl random function, i just applyed your random function as a sub, if your random function is correct (and after looking a perl website, it look like), it should work like this.

TriggerZek Script
Code:
sub EVENT_SPAWN 
{ 
 quest::setnexthpevent(40); 
} 
sub EVENT_HP 
{ 
 if ( $hpevent == 40 )
 {
  if ($VallonTrigger == "2") 
  { 
   quest::setglobal("VallonTrigger",$VallonTrigger + 1,"1","D1"); 
   Random (); 
   $VallonTrigger = ""; 
  } 
  if ($VallonTrigger == "3") 
  { 
   quest::setglobal("VallonTrigger",$VallonTrigger + 1,"1","D1"); 
   Random (); 
   $VallonTrigger = ""; 
  } 
 } 
}
sub Random 
{ 
 $random = int(rand(5)); 
 for ($i=0; $i < 5; $i++) 
 { 
  if ( $i == $random ) 
  { 
   $vallon = 214094; 
  } 
  else 
  { 
   $vallon = 214093; 
  } 
  if ( $i == 0 ) 
  { 
   quest::spawn($vallon,0,0,-637,1989,197,272); 
  } 
  elsif ( $i == 1 ) 
  { 
   quest::spawn($vallon,0,0,-556,1933,197,272); 
  } 
  elsif ( $i == 2 ) 
  { 
   quest::spawn($vallon,0,0,-559,2027,197,272); 
  } 
  elsif ( $i == 3 ) 
  { 
   quest::spawn($vallon,0,0,-557,1963,197,272); 
  } 
  elsif ( $i == 4 ) 
  { 
   quest::spawn($vallon,0,0,-585,1971,197,272); 
  } 
 } 
}
RealZek Script
Code:
sub EVENT_SPAWN 
{ 
 quest::setnexthpevent(40); 
 quest::setglobal("VallonTrigger","1","1","D1");
 $VallonTrigger = "";
} 
sub EVENT_HP 
{ 
 if ( $hpevent == 40 )
 {
  if ($VallonTrigger == "1")
  {
   quest::depop();
   quest::setglobal("VallonTrigger",$VallonTrigger + 1,"1","D1"); 
   Random ();
   $VallonTrigger = "";
  }
 }
}
sub Random
{
 $random = int(rand(5)); 
 for ($i=0; $i < 5; $i++)
 { 
  if ( $i == $random )
  { 
   $vallon = 214094; 
  }
  else
  { 
   $vallon = 214093; 
  } 
  if ( $i == 0 )
  { 
   quest::spawn($vallon,0,0,-637,1989,197,272); 
  }
  elsif ( $i == 1 )
  { 
   quest::spawn($vallon,0,0,-556,1933,197,272); 
  }
  elsif ( $i == 2 )
  { 
   quest::spawn($vallon,0,0,-559,2027,197,272); 
  }
  elsif ( $i == 3 )
  { 
   quest::spawn($vallon,0,0,-557,1963,197,272); 
  }
  elsif ( $i == 4 )
  { 
   quest::spawn($vallon,0,0,-585,1971,197,272); 
  }
 }
}
__________________

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 09:52 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