View Full Version : keeping a zone depoped for about 3 hours or so
Darkheat
05-16-2010, 04:44 AM
I am writing an event in crush bone where the elves take over crush bone in the process I need to depop the zone for two or three hours but I notice that the quest::depop() will only depop the zone until the spawn timers are up. Is there any way to keep all the mobs in the zone depopped until the repop command is used or the 3 hours is up?
If not what would be the best way to go about achieving this goal?
Thanks in advance
joligario
05-16-2010, 06:55 AM
Maybe setting spawn conditions might be something to consider.
MNWatchdog
05-17-2010, 12:09 PM
Look at the #Rallos_Zek_the_Warlord.pl re-write I did and a plugin I wrote, GetSpawn2IDs.pl, to go with it that's part of the PEQ quest download.
I'm not a fan of spawn conditions as they appear to require code to make sure a zone reverts to a previous state, while the way I did the RZ pit event, it modifies the re-spawn timers, thus making a respawning of the original mobs 100% likely even if the zone/server crashes, etc.
Darkheat
05-18-2010, 08:50 PM
Look at the #Rallos_Zek_the_Warlord.pl re-write I did and a plugin I wrote, GetSpawn2IDs.pl, to go with it that's part of the PEQ quest download.
I'm not a fan of spawn conditions as they appear to require code to make sure a zone reverts to a previous state, while the way I did the RZ pit event, it modifies the re-spawn timers, thus making a respawning of the original mobs 100% likely even if the zone/server crashes, etc.
Where can I find those files? I have the peq quest svn but I only see quests by zones don't see any examples
Shin Noir
05-19-2010, 01:31 AM
Look at hollowshade as another option.
http://code.google.com/p/projecteqquests/source/browse/trunk/quests/hollowshade/%23a_grimling_chieftain.pl
Basically you send a spawn condition that has no mobs set to that value, and that'd "depop the zone". and return the condition to return them.
Angelox
05-19-2010, 08:37 AM
Let me try and explain how this worked, Actually, AXClassic has an event in OOT (http://forums.axclassic.com/viewtopic.php?f=2&t=86) where all the NPCs and mobs in the zone turn into undead (Wolves, Skeles, etc) even the ship turns into a Ghost Ship.
I always look for ways to "mass produce" what I want
First, you would have to make the new NPCs;
SELECT * FROM npc_types WHERE (ID>=58000 AND ID<=58999) will tell you you have 59 npc's in that zone, and your next available id would be 58060, 58 being the zone ID and the range you have for adding npcs (58000 - 58999).
First thing is to duplicate all the NPC's in the zone:
UPDATE npc_types SET id=id +60 WHERE (ID>=58000 AND ID<=58999); Each npc in crushbone will duped with a new new id starting at 58061. So now, you have 59 more orcs. you need to isolate them so you can work on them individually if needed (PHP Editor in mind). set all them with two or three "###" Example, ###an_orc_pawn. This way, it would be almost impossible you screw up the original CB spawn (like mua!).
I also use MySql Query Browser, helps me get a better picture of what I'm doing. So, now you got the npcs in place, you need to convert them to elves;
your new npcs should be at 58061 - 58119 , so for wood elf;
UPDATE npc_types SET RACE=4 WHERE (ID>=58061 AND ID<=58119);
Now, they're all wood elves.. Still you might want to change other facial, armor, etc features, you can do this later, after you get them spawning.
you can "mass rename" like this;
UPDATE npc_types SET name= '###a_wood_elf' WHERE (ID>=58061 AND ID<=58119);You can later customize the names. but when checking out your zone, you will see all the wood elves.
You have to remove their old orc loottables;
UPDATE npc_types SET loottable_id=0 WHERE (ID>=58061 AND ID<=58119);Now you can set new ones, and not worry if any old ones are left.
Here's some examples from another port I did you could use as templates if you wanted to change levels, damage, HP, etc;
UPDATE npc_types SET level =level -15 WHERE (ID>=58000 AND ID<=58999) and level >=45;
UPDATE npc_types SET HP =HP +200 WHERE(ID>=58000 AND ID<=58999) and (level >=22 and level <=29);
UPDATE npc_types SET HP =HP -200 WHERE(ID>=58000 AND ID<=58999) and (level >=5 and level <=20);
UPDATE npc_types SET HP=1185 WHERE (ID>=81000 AND ID<=81999) and level =29;
UPDATE npc_types SET mindmg=14,maxdmg=58 WHERE (ID>=81000 AND ID<=81999);
UPDATE npc_types SET mindmg=14 WHERE (ID>=81000 AND ID<=81999) AND level >=28;
UPDATE npc_types SET mindmg=7 WHERE (ID>=81000 AND ID<=81999) AND (level >=20 AND level <=27);
UPDATE npc_types SET AC=600 WHERE (ID>=81000 AND ID<=81999);
UPDATE npc_types SET MR =MR -60 WHERE(ID>=81000 AND ID<=81999);
UPDATE npc_types SET mr=99, cr=99, dr=99, fr=99, pr=99, str=110, sta=110, dex=110, agi=110, _int=110, wis=110, cha=110 WHERE(ID>=81000 AND ID<=81999);
I did the same with spawn groups, here's how I made new spawns in Droga (for old Droga spawn), after I made the NPCs;
UPDATE spawn2 SET id=id +205206 WHERE zone = 'droga' AND (ID>=17438 AND ID<=17898);
UPDATE spawn2 SET id=id +197264 WHERE zone = 'droga' AND (ID>=25841 AND ID<=25921);
UPDATE spawn2 SET id=id +180416 WHERE zone = 'droga' AND (ID>=42770 AND ID<=42793);
UPDATE spawn2 SET spawngroupid=spawngroupid +160962 WHERE zone = 'droga' AND (spawngroupID>=80013 AND spawngroupID<=80498);
UPDATE spawn2 SET spawngroupid=spawngroupid +112165 WHERE zone = 'droga' AND (spawngroupID>=129296 AND spawngroupID<=129398);
UPDATE spawn2 SET spawngroupid=spawngroupid +36762 WHERE zone = 'droga' AND (spawngroupID>=204802 AND spawngroupID<=204826);
UPDATE spawngroup SET id=id +160962 WHERE name REGEXP 'droga' AND (ID>=80013 AND ID<=80498);
UPDATE spawngroup SET id=id +112165 WHERE name REGEXP 'droga' AND (ID>=129296 AND ID<=129398);
UPDATE spawngroup SET id=id +36762 WHERE name REGEXP 'droga' AND (ID>=204802 AND ID<=204826);
UPDATE spawnentry SET NPCid=NPCid +164 WHERE (npcID>=81000 AND npcID<=81999);
UPDATE spawnentry SET NPCid=NPCid +164 WHERE (npcID>=81000 AND npcID<=81999);
UPDATE spawnentry SET spawngroupid=spawngroupid +160962 WHERE (npcID>=81000 AND npcID<=81999) AND (spawngroupID>=80013 AND spawngroupID<=80498);
UPDATE spawnentry SET spawngroupid=spawngroupid +112165 WHERE (npcID>=81000 AND npcID<=81999) AND (spawngroupID>=129296 AND spawngroupID<=129398);
UPDATE spawnentry SET spawngroupid=spawngroupid +36762 WHERE (npcID>=81000 AND npcID<=81999) AND (spawngroupID>=204802 AND spawngroupID<=204826);A set of querys like the latter will duplicate all the spawns in the zone, all you have to do is set the spawn condition and make script, which can use time, grid-movement, PC movement, etc., as a trigger to switch from one spawn set to another. Here's an example of what might interest you for Crushbone;
## DAY/NIGHT MOBS
## PITCH BLACK Event in OOT
## Angelox
sub EVENT_SPAWN {
if (($zonetime >= 0)&&($zonetime <= 500)){ #nighttime
quest::spawn_condition(oot,7,0); #Day Mobs
quest::spawn_condition(oot,8,1); #Night Mobs
}else{ #daytime
quest::spawn_condition(oot,7,1); #Day Mobs
quest::spawn_condition(oot,8,0); #Night Mobs
}
}
sub EVENT_WAYPOINT{
if (($zonetime >= 0)&&($zonetime <= 500)){ #nighttime
quest::spawn_condition(oot,7,0); #Day Mobs
quest::spawn_condition(oot,8,1); #Night Mobs
}else{ #daytime
quest::spawn_condition(oot,7,1); #Day Mobs
quest::spawn_condition(oot,8,0); #Night Mobs
}
}This spawns my "witching hour" at midnight- 5 am EQ time.
What happens is, the invisible npc that spawns in to this script, will check time when spawning, and also moves on a two point grid with a delay, each movement checks the time and changes spawn if needed.
This event is fail proof - you zone into oot after midnight, and you'lll be standing on the Ghost Ship in a zone populated with undead types.
Spawngroups are tricky, you have to make sure all the numbers between all the related tables are correct, else it won't work. There's probably better querys for this, but it's what I used and what worked for me at the time.
So there you have it - looks complicated, but it isn't, just a lot of number juggling, and a little time consuming. Once understood, you can do all kinds of neat things with these techniques.
pfyon
05-19-2010, 11:37 AM
If you want to keep the names of the NPCs intact, you can use something like:
UPDATE npc_types SET name = CONCAT('###',name) WHERE (ID>=58061 AND ID<=58119);
That will prepend '###' to the name of each npc that meets the WHERE clause.
MNWatchdog
05-19-2010, 06:01 PM
Where can I find those files? I have the peq quest svn but I only see quests by zones don't see any exampleshttp://www.google.com/codesearch/p?hl=en#4iXX8pllqQQ/trunk/quests/potactics/%23Rallos_Zek_the_Warlord.pl&q=%23Rallos_Zek_the_Warlord.pl%20package:http://projecteqquests\.googlecode\.com&sa=N&cd=1&ct=rc
http://www.google.com/codesearch/p?hl=en#4iXX8pllqQQ/trunk/quests/plugins/GetSpawn2IDs.pl&q=GetSpawn2IDs.pl&sa=N&cd=1&ct=rc
Darkheat
05-21-2010, 03:28 PM
Let me try and explain how this worked, Actually, AXClassic has an event in OOT (http://forums.axclassic.com/viewtopic.php?f=2&t=86) where all the NPCs and mobs in the zone turn into undead (Wolves, Skeles, etc) even the ship turns into a Ghost Ship.
I always look for ways to "mass produce" what I want
First, you would have to make the new NPCs;
SELECT * FROM npc_types WHERE (ID>=58000 AND ID<=58999) will tell you you have 59 npc's in that zone, and your next available id would be 58060, 58 being the zone ID and the range you have for adding npcs (58000 - 58999).
First thing is to duplicate all the NPC's in the zone:
UPDATE npc_types SET id=id +60 WHERE (ID>=58000 AND ID<=58999); Each npc in crushbone will duped with a new new id starting at 58061. So now, you have 59 more orcs. you need to isolate them so you can work on them individually if needed (PHP Editor in mind). set all them with two or three "###" Example, ###an_orc_pawn. This way, it would be almost impossible you screw up the original CB spawn (like mua!).
I also use MySql Query Browser, helps me get a better picture of what I'm doing. So, now you got the npcs in place, you need to convert them to elves;
your new npcs should be at 58061 - 58119 , so for wood elf;
UPDATE npc_types SET RACE=4 WHERE (ID>=58061 AND ID<=58119);
Now, they're all wood elves.. Still you might want to change other facial, armor, etc features, you can do this later, after you get them spawning.
you can "mass rename" like this;
UPDATE npc_types SET name= '###a_wood_elf' WHERE (ID>=58061 AND ID<=58119);You can later customize the names. but when checking out your zone, you will see all the wood elves.
You have to remove their old orc loottables;
UPDATE npc_types SET loottable_id=0 WHERE (ID>=58061 AND ID<=58119);Now you can set new ones, and not worry if any old ones are left.
Here's some examples from another port I did you could use as templates if you wanted to change levels, damage, HP, etc;
UPDATE npc_types SET level =level -15 WHERE (ID>=58000 AND ID<=58999) and level >=45;
UPDATE npc_types SET HP =HP +200 WHERE(ID>=58000 AND ID<=58999) and (level >=22 and level <=29);
UPDATE npc_types SET HP =HP -200 WHERE(ID>=58000 AND ID<=58999) and (level >=5 and level <=20);
UPDATE npc_types SET HP=1185 WHERE (ID>=81000 AND ID<=81999) and level =29;
UPDATE npc_types SET mindmg=14,maxdmg=58 WHERE (ID>=81000 AND ID<=81999);
UPDATE npc_types SET mindmg=14 WHERE (ID>=81000 AND ID<=81999) AND level >=28;
UPDATE npc_types SET mindmg=7 WHERE (ID>=81000 AND ID<=81999) AND (level >=20 AND level <=27);
UPDATE npc_types SET AC=600 WHERE (ID>=81000 AND ID<=81999);
UPDATE npc_types SET MR =MR -60 WHERE(ID>=81000 AND ID<=81999);
UPDATE npc_types SET mr=99, cr=99, dr=99, fr=99, pr=99, str=110, sta=110, dex=110, agi=110, _int=110, wis=110, cha=110 WHERE(ID>=81000 AND ID<=81999);
I did the same with spawn groups, here's how I made new spawns in Droga (for old Droga spawn), after I made the NPCs;
UPDATE spawn2 SET id=id +205206 WHERE zone = 'droga' AND (ID>=17438 AND ID<=17898);
UPDATE spawn2 SET id=id +197264 WHERE zone = 'droga' AND (ID>=25841 AND ID<=25921);
UPDATE spawn2 SET id=id +180416 WHERE zone = 'droga' AND (ID>=42770 AND ID<=42793);
UPDATE spawn2 SET spawngroupid=spawngroupid +160962 WHERE zone = 'droga' AND (spawngroupID>=80013 AND spawngroupID<=80498);
UPDATE spawn2 SET spawngroupid=spawngroupid +112165 WHERE zone = 'droga' AND (spawngroupID>=129296 AND spawngroupID<=129398);
UPDATE spawn2 SET spawngroupid=spawngroupid +36762 WHERE zone = 'droga' AND (spawngroupID>=204802 AND spawngroupID<=204826);
UPDATE spawngroup SET id=id +160962 WHERE name REGEXP 'droga' AND (ID>=80013 AND ID<=80498);
UPDATE spawngroup SET id=id +112165 WHERE name REGEXP 'droga' AND (ID>=129296 AND ID<=129398);
UPDATE spawngroup SET id=id +36762 WHERE name REGEXP 'droga' AND (ID>=204802 AND ID<=204826);
UPDATE spawnentry SET NPCid=NPCid +164 WHERE (npcID>=81000 AND npcID<=81999);
UPDATE spawnentry SET NPCid=NPCid +164 WHERE (npcID>=81000 AND npcID<=81999);
UPDATE spawnentry SET spawngroupid=spawngroupid +160962 WHERE (npcID>=81000 AND npcID<=81999) AND (spawngroupID>=80013 AND spawngroupID<=80498);
UPDATE spawnentry SET spawngroupid=spawngroupid +112165 WHERE (npcID>=81000 AND npcID<=81999) AND (spawngroupID>=129296 AND spawngroupID<=129398);
UPDATE spawnentry SET spawngroupid=spawngroupid +36762 WHERE (npcID>=81000 AND npcID<=81999) AND (spawngroupID>=204802 AND spawngroupID<=204826);A set of querys like the latter will duplicate all the spawns in the zone, all you have to do is set the spawn condition and make script, which can use time, grid-movement, PC movement, etc., as a trigger to switch from one spawn set to another. Here's an example of what might interest you for Crushbone;
## DAY/NIGHT MOBS
## PITCH BLACK Event in OOT
## Angelox
sub EVENT_SPAWN {
if (($zonetime >= 0)&&($zonetime <= 500)){ #nighttime
quest::spawn_condition(oot,7,0); #Day Mobs
quest::spawn_condition(oot,8,1); #Night Mobs
}else{ #daytime
quest::spawn_condition(oot,7,1); #Day Mobs
quest::spawn_condition(oot,8,0); #Night Mobs
}
}
sub EVENT_WAYPOINT{
if (($zonetime >= 0)&&($zonetime <= 500)){ #nighttime
quest::spawn_condition(oot,7,0); #Day Mobs
quest::spawn_condition(oot,8,1); #Night Mobs
}else{ #daytime
quest::spawn_condition(oot,7,1); #Day Mobs
quest::spawn_condition(oot,8,0); #Night Mobs
}
}This spawns my "witching hour" at midnight- 5 am EQ time.
What happens is, the invisible npc that spawns in to this script, will check time when spawning, and also moves on a two point grid with a delay, each movement checks the time and changes spawn if needed.
This event is fail proof - you zone into oot after midnight, and you'lll be standing on the Ghost Ship in a zone populated with undead types.
Spawngroups are tricky, you have to make sure all the numbers between all the related tables are correct, else it won't work. There's probably better querys for this, but it's what I used and what worked for me at the time.
So there you have it - looks complicated, but it isn't, just a lot of number juggling, and a little time consuming. Once understood, you can do all kinds of neat things with these techniques.
Thanks for this post it is very helpful and gives me a few event ideas
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.