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 04-08-2015, 01:22 PM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default Making a Npc Despawn

Writing a code for a simple quest trying to make the npc despawn and start respawn timer when item is turned in. Currently the npc wont despawn. Any clues what I missed?


Code:
sub EVENT_SAY {
	if($text=~/hail/i) {
		quest::say("Free me!");
	} 
	}
	
	
	
	sub EVENT_ITEM { 
	if(plugin::check_handin(\%itemcount, 19697 => 1)) { # Key
		quest::say("Thank you $name!");
	$mob->Depop(StartSpawnTimer);
		}
			plugin::return_items(\%itemcount);
}
	}
__________________
Owner and Developer - Everquest: A New World
Reply With Quote
  #2  
Old 04-08-2015, 01:42 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,595
Default

For the '$mob->Depop(StartSpawnTimer);' portion try this:
Code:
$npc->Depop(1);
Reply With Quote
  #3  
Old 04-08-2015, 01:58 PM
Leetsauce
Hill Giant
 
Join Date: Apr 2010
Posts: 169
Default

quest::depop(npc_type_id) # A single mob will de-spawn and not start the spawn timer.

This command will also work. The quest command happens to be the one I use for the depops I've worked with on my server.

Alternatively:

quest::depop_withtimer(npc_type_id) # A single mob will de-spawn and start the spawn timer.

This one will apply the timer if you ever need it to.

Last edited by Leetsauce; 04-08-2015 at 01:58 PM.. Reason: More info
Reply With Quote
  #4  
Old 04-08-2015, 10:48 PM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default

Worked perfectly KK ty sir flawless as always. Ty for the suggestion Leet,was going to give those a shot first but was worried as I have about 10 total mobs all with different ID's and really didnt feel like making a quest for each one,and was worried applying quest based on name could make wrong npc despawn,or all of them.
__________________
Owner and Developer - Everquest: A New World
Reply With Quote
  #5  
Old 04-08-2015, 10:53 PM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default

One more question. How can I make the turn in update a task? Was looking at the wiki but theres not a whole lot of break down on this.
__________________
Owner and Developer - Everquest: A New World
Reply With Quote
  #6  
Old 04-08-2015, 11:13 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,595
Default

Try this:
Code:
sub EVENT_ITEM { 
    if(plugin::check_handin(\%itemcount, 19697 => 1) && quest::istaskactivityactive(TASKID, ACTIVITYID)) { # Key
        quest::updatetaskactivity(TASKID, ACTIVITYID, 1);
        quest::say("Thank you $name!");
        $npc->Depop(1);
    }
    plugin::return_items(\%itemcount);
}
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 11:50 AM.


 

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