Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 07-09-2007, 01:57 PM
Striat
Sarnak
 
Join Date: Aug 2006
Posts: 60
Default

I don't propose the greatest or most ideal method for doing this. But, I do have a somewhat of ghetto solution for repopping via quest commands using spawn_condition. In my example, I use Freeport west. I first changed all west freeport's spawns to condition 1. In MySQL

Code:
UPDATE spawn2 SET _condition = 1 WHERE zone = 'freportw';
Then, I set up spawn conditions tab for the condition 1:

Code:
INSERT INTO `spawn_conditions` VALUES ('freportw', '1', '0', '2', 'Freeport Spawn');
As explained by FNW's spawn_condition tutorial post, the freportw is the short zone name. 1 is the condition id (we used one for npcs here). The next number is value. This number is compared against the cond_value tab in spawn2 also. If the current value of the spawn condition is greater than or equal to the current value of the cond_value for the particular spawn, the npc will spawn.

The default cond_id for a spawn is 1. Therefore, since our spawn condition value is 0, freport west npcs will not be spawned when you enter the zone. To make them spawn you'd have to change the 0 to 1 or higher. The 2 is the action command to DoRepop. Check out fnw's tutorial on spawn conditions for more action info. Freport Spawn is just for reading it. It has not functional effect.

Okay, now that the value has been set up, it's time to implement ingame quest command control. I created an npc named Trigger. Give him a spawn entry and do not alter his spawn condition info.

Here is a simple example of perl command for Trigger to control this in game:

Code:
sub EVENT_SAY { 
if($text=~/Hail/i){
	quest::say("Hello, $name.  Would you like to [pop], [depop], or [repop] the zone?"); 
	}

if($text=~/\bpop\b/i){
	quest::spawn_condition(freportw, 1, 1);
	quest::say("popping!");
	}
if($text=~/\bdepop\b/i){
	quest::spawn_condition(freportw,1,0);
	quest::say("depopping!");
	}
if($text=~/\brepop\b/i){
	quest::spawn_condition(freportw,1,0);
	quest::spawn_condition(freportw,1,1);
	quest::say("repopping!");
	}
}
Again, this is probably not the most ideal usage, but it does what you ask: perl command to repop a zone that is perfect for creating LDoN style zones or encounters
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:18 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3