Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Feature Requests

Development::Feature Requests Post suggestions/feature requests here.

Reply
 
Thread Tools Display Modes
  #1  
Old 05-23-2011, 10:04 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default add functinoality to quest::depop()

quest::depop does not cause the respawn timer for a NPC with a respawn timer to kick in.

Here is an example from Manaetic_Behemoth.pl
Code:
quest::spawn2(206074,0,0,$x,$y,$z,0);
quest::depop();
#update spawn timer after depop or mob will repop when zone resets
#quest::updatespawntimer(spawn2.id,(int(rand(DB_Variance))+DB_Respawn-(DB_Variance/2))*1000); #variance setting
quest::updatespawntimer(42135,(int(rand(25920))+129600-(25920/2))*1000); #respawn with variance
Could we get 2 optional parameters added to quest::depop?

1: BOOL
FALSE = Default. Just depop. Current functionality.
TRUE = Use Respawn time and variance in DB if parameter 2 is not present or = 0

2: INT
A respawn timer passed by quest script, only used when optional parameter 1 is present and = TRUE. This is useful for various PoP bosses who have shortened respawn tiemrs on event failure.
Reply With Quote
  #2  
Old 05-23-2011, 11:22 AM
Kayen
Developer
 
Join Date: Mar 2009
Location: -
Posts: 228
Default

Just use.

$npc->Depop(StartSpawnTimer= true)
Reply With Quote
  #3  
Old 05-23-2011, 11:57 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

This shows how poor my c++ skills are I didn't see that in the code when I was trying to figure it out.
Reply With Quote
  #4  
Old 06-18-2011, 10:30 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

Ok I tested this out last night and using $npc->Depop(StartSpawnTimer= true) causes the quest file to fail.
Reply With Quote
  #5  
Old 06-18-2011, 10:47 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

What exact syntax did you use? It is of type Mob, but NPC should inherit from Mob. I will test this out in a minute.
Reply With Quote
  #6  
Old 06-18-2011, 11:59 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

It looks like you would use $npc->Depop(0) or $npc->Depop(1). It defaults to true, so you don't need any arguments. If that isn't working, then there is something else wrong.
Reply With Quote
  #7  
Old 06-18-2011, 03:42 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

It definitely does not default to 1. The whole reason I made this post was because NPCs that are quest::depop always repop when you #repop after their quest depops them. The way it read to me was that quest::depop was calling ->Depop.

I'm not home now, but I'll look in to it again tonight.
Reply With Quote
  #8  
Old 06-18-2011, 04:07 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

Ok, I think I fixed it then; running some final tests before committing. Depop with true was resetting the timer, but not writing it to the database. So if you did #repop, waited for the normal respawn time, or the zone was reset, the NPC would respawn. I changed it so that setting it true will restart the clock. Default is changed to false. Here are the methods:

quest::depop(id) - NPC id optional. Depops the NPC and does not reset the timer. As long as zone is up or until #repop is done, NPC stays depopped.
$npc->Depop() - Reset is optional and defaulted to false. This acts just like the quest::depop() method.
$npc->Depop(1) - Depops the NPC as if it were killed. NPC will repop based upon normal spawntimer value.

There is also still the quest::dis(en)able_spawn2 which I didn't change.
Reply With Quote
  #9  
Old 11-12-2011, 11:45 PM
Robregen
Developer
 
Join Date: May 2011
Posts: 108
Default

I tried using this quest::disable_spawn2 with quest::enable_spawn2.

It looks like quest::disable_spawn2 acts like a quest::depop(). it won't respawn with quest::enable_spawn2 unless the zone is reset or I use #repop command. It would be a nice feature to use since I can have it respawn at a proper time than to have to spawn too early.

EDIT: Looks like it works if I throw in $npc->Depop(1) function. then use quest::disable_spawn2 after it or on another script.
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 02:22 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