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-17-2021, 03:13 PM
ahamilton634's Avatar
ahamilton634
Fire Beetle
 
Join Date: Jul 2015
Location: Sunny California
Posts: 24
Default Boss spawn after kill count.

What I'm trying to accomplish is have a boss spawn after a certain number of spiders are killed. I have a working qglobal that counts how many spiders are killed, but I don't know how to accomplish the actual spawning. If I use quest::spawn then it'll spawn multiple instances of the boss. What I'd prefer to do is once is a certain number of spiders is killed, have it enable a disabled entry in the spawn2 table, and then after the boss is killed then disable that same entry. Is there a way to accomplish this?
I remember back in the day there was a page that went into each table on the database. I was trying to figure out the spawn conditions table but I couldn't find that page. Was it taken down?
Reply With Quote
  #2  
Old 04-17-2021, 03:27 PM
nilbog
Hill Giant
 
Join Date: Nov 2007
Posts: 194
Default

In lieu of using qglobals, you could have an invisible man acting as a controller that would count the number of spider deaths, and spawn the desired npc based on the number of kills.
__________________
http://www.project1999.com
Reply With Quote
  #3  
Old 04-20-2021, 12:12 AM
ahamilton634's Avatar
ahamilton634
Fire Beetle
 
Join Date: Jul 2015
Location: Sunny California
Posts: 24
Default

Hmm...
Is there a guide on how to accomplish this?
Reply With Quote
  #4  
Old 04-20-2021, 10:05 AM
Turmoiltoad
Sarnak
 
Join Date: Apr 2013
Posts: 25
Default

Perfect use case for a data bucket. https://eqemu.gitbook.io/server/cate...g-data-buckets

Code:
sub EVENT_DEATH_COMPLETE {
	#:: Key a data bucket
	$key = $npc->GetCleanName() . "-kill-count";
	#:: Match if the data bucket does not exist
	if (!quest::get_data($key)) {
		#:: Set the data bucket
		quest::set_data($key, 1);
	}
	else {
		#:: Iterate the kill count value stored in the data bucket
		quest::set_data($key, quest::get_data($key) + 1);
		#:: Match when the value reaches 50 (kills)
		if (quest::get_data($key) eq "50") {
			#:: Enable the spawn point for North Qeynos >> Fippy_Darkpaw (2001)
			quest::enable_spawn2(10875);
			#:: Reset the data bucket
			quest::delete_data($key);
		}
	}
}
Reply With Quote
  #5  
Old 04-20-2021, 08:09 PM
demonstar55
Developer
 
Join Date: Apr 2008
Location: MA
Posts: 1,152
Default

Could use lua encounters as well.
Reply With Quote
  #6  
Old 04-25-2021, 01:46 AM
ahamilton634's Avatar
ahamilton634
Fire Beetle
 
Join Date: Jul 2015
Location: Sunny California
Posts: 24
Default

Thanks! I'll give it a try.
Would this work for character specific instances too? Like every time a specific npc type dies, the killing PC gets a +1 and when they reach a certain value trigger an event? I know how to use the task system, but I want to try to do it without if possible.

Also, is there a lua guide? There used to be a pretty good guide on writing lua scripts for EQEMU servers but I can't seem to find it.
Reply With Quote
Reply

Thread Tools
Display Modes

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:06 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 - 2021, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3