Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 05-16-2010, 04:44 AM
Darkheat
Fire Beetle
 
Join Date: Apr 2010
Posts: 23
Default keeping a zone depoped for about 3 hours or so

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
Reply With Quote
  #2  
Old 05-16-2010, 06:55 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

Maybe setting spawn conditions might be something to consider.
Reply With Quote
  #3  
Old 05-17-2010, 12:09 PM
MNWatchdog
Hill Giant
 
Join Date: Feb 2006
Posts: 179
Default

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.
Reply With Quote
  #4  
Old 05-18-2010, 08:50 PM
Darkheat
Fire Beetle
 
Join Date: Apr 2010
Posts: 23
Default

Quote:
Originally Posted by MNWatchdog View Post
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
Reply With Quote
  #5  
Old 05-19-2010, 01:31 AM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 502
Default

Look at hollowshade as another option.

http://code.google.com/p/projecteqqu...g_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.
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
  #6  
Old 05-19-2010, 08:37 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Let me try and explain how this worked, Actually, AXClassic has an event in OOT 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;
Code:
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:
Code:
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;
Code:
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;
Code:
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;
Code:
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;
Code:
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;
Code:
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;
Code:
## 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.

Last edited by Angelox; 05-19-2010 at 09:05 AM..
Reply With Quote
  #7  
Old 05-19-2010, 11:37 AM
pfyon's Avatar
pfyon
Discordant
 
Join Date: Mar 2009
Location: Ottawa
Posts: 495
Default

If you want to keep the names of the NPCs intact, you can use something like:
Code:
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.
Reply With Quote
  #8  
Old 05-19-2010, 06:01 PM
MNWatchdog
Hill Giant
 
Join Date: Feb 2006
Posts: 179
Default

Quote:
Originally Posted by Darkheat View Post
Where can I find those files? I have the peq quest svn but I only see quests by zones don't see any examples
http://www.google.com/codesearch/p?h...a=N&cd=1&ct=rc



http://www.google.com/codesearch/p?h...a=N&cd=1&ct=rc
Reply With Quote
  #9  
Old 05-21-2010, 03:28 PM
Darkheat
Fire Beetle
 
Join Date: Apr 2010
Posts: 23
Default

Quote:
Originally Posted by Angelox View Post
Let me try and explain how this worked, Actually, AXClassic has an event in OOT 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;
Code:
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:
Code:
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;
Code:
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;
Code:
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;
Code:
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;
Code:
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;
Code:
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;
Code:
## 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
Reply With Quote
Reply


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 03:35 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