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
Sarnak
 
Join Date: Jul 2015
Location: Sunny California
Posts: 30
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: 198
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.
__________________
https://www.project1999.com
Reply With Quote
  #3  
Old 04-20-2021, 12:12 AM
ahamilton634's Avatar
ahamilton634
Sarnak
 
Join Date: Jul 2015
Location: Sunny California
Posts: 30
Default

Hmm...
Is there a guide on how to accomplish this?
Reply With Quote
  #4  
Old 04-20-2021, 10:05 AM
Turmoiltoad
Forum Guide
 
Join Date: Apr 2013
Posts: 27
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
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

Could use lua encounters as well.
Reply With Quote
  #6  
Old 04-25-2021, 01:46 AM
ahamilton634's Avatar
ahamilton634
Sarnak
 
Join Date: Jul 2015
Location: Sunny California
Posts: 30
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
  #7  
Old 01-05-2023, 10:14 AM
henrybecker361
Fire Beetle
 
Join Date: Jan 2023
Posts: 1
Default

It sounds like you are trying to set up a unique game mechanic that involves spawning a boss character after a certain number of spiders are killed. One way you could accomplish this is by using a quest script to check the value of the qglobal that counts the number of spiders killed, and then using quest::spawn2 to enable the disabled entry in the spawn2 table when the threshold is reached. You could then use a similar script to disable the entry again after the boss is killed.

As for the spawn conditions table, you might be able to find more information about it by searching online or asking other developers or players who have experience with the game. It could also be helpful to review the documentation or resources provided by the game's creators, if they have made any available. Good luck with your project!
__________________
d
Reply With Quote
  #8  
Old 01-05-2023, 03:48 PM
nilbog
Hill Giant
 
Join Date: Nov 2007
Posts: 198
Default

Oops, looks like I never replied back to this.

My proposed solution would be in perl.

Summary:
Invisible man controller spawns with 0 spider tokens.
Each time a spider is killed, it signals the controller. Controller increments spider token counter.
Once the controller has 20 spider tokens, spawn2 or unique_spawn whatever your boss npc id is and resets spider tokens to 0.

Code:
#invisible man controller

my $spidertoken = 0;

sub EVENT_SPAWN 
{
	$spidertoken = 0;
}

sub EVENT_SIGNAL 
{
	if ($spidertoken < 20)
	{
		$spidertoken++;
	}
	else
	{
		spawn2 whatever
		$spidertoken = 0;
	}
}
Code:
#spiders

sub EVENT_DEATH 
{
	quest::signalwith(controllernpcid,1,1);
}
__________________
https://www.project1999.com
Reply With Quote
  #9  
Old 01-05-2023, 08:52 PM
NatedogEZ's Avatar
NatedogEZ
Developer
 
Join Date: Dec 2012
Posts: 515
Default

zone_controller.pl

This npc can track the deaths of any NPC so no need for signals and such

Code:
my $kill_count_69420 = 0;

sub EVENT_DEATH_ZONE {
	if ($killed_npc_id == 69420) { #NPCID of whatever
		if ($kill_count_69420 < 20) {
			$kill_count_69420++;
		} else {
			$kill_count_69420 = 0;
			#We hit 20~ spawn something or whatever
		}
	}
}
Edit: just noticed how old the OP is on this.. but anyways this is a nice way for anyone who sees it :P

Last edited by NatedogEZ; 01-05-2023 at 09:04 PM..
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 01:21 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