PDA

View Full Version : Zone repop?


Angelox
04-02-2007, 02:36 AM
Does anyone know of a way to repop the spawns in a specific zone via quest, or a command from outside the game?

sdabbs65
04-02-2007, 12:27 PM
Does anyone know of a way to repop the spawns in a specific zone via quest, or a command from outside the game?

heres some that i use...

quest::spawn2(39165, 0, 0, 464.4, 819, -678, 125);

or

quest::unique_spawn(14127,0,0,-3280+10,-6050+10,0);

quest::depop(); to remove

Angelox
04-02-2007, 01:17 PM
I was thinking more of a zone- wide repop

sdabbs65
04-03-2007, 01:21 AM
I was thinking more of a zone- wide repop

there not one for zone wide only one npc at a time.
the depop is all they have installed .
you could ask for it i suppose.



quest::spawn(npc_type,grid,guildwarset,x,y,z); - Spawn "npc_type" on "grid" with "guildwarset" (use 0) at "x","y","z".
quest::spawn2(npc_type,grid,guildwarset,x,y,z,head ing); - Spawn "npc_type" on "grid" with "guildwarset" (use 0) at "x","y","z" facing "heading".
quest::unique_spawn(npc_type,grid,guildwarset,x,y, z); - just like spawn() except will not spawn it if one of that npc_type is allready in zone.

Striat
07-09-2007, 01:57 PM
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

UPDATE spawn2 SET _condition = 1 WHERE zone = 'freportw';

Then, I set up spawn conditions tab for the condition 1:

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:

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