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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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
 


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