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 03-19-2017, 01:32 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Sounds like the hot potato quest I once did, which, I cannot find now. So, this is all untested, but, along the lines of what I did (really wish I could find it, as many little neat quests were in that directory). Haven't tested any of the following for shit. If I come across that directory, then I'll share that quest, but in the meantime:

Code:
## /quests/global/global_player.pl may NOT work I would suggest placing this in each zone's /quests/<zonesn>/player.pl
sub EVENT_TIMER {
	if ($timer eq "tempcheck$charid") 
	{
		foreach (0..30,251..340,2000..2015,2030..2190,2500,2501,2531..2550) 
		{
			if ($client->GetItemAt($_) and plugin::NoRentItem($client->GetItemIDAt($_))) 
			{
				$slot_item_id = $client->GetItemIDAt($_);
				if (!defined $qglobals{"looted$slot_item_id"})
				{
					$client->Message(15, "Your ".$client->GetItemAt($_)->GetName()." has poofed!");
					$client->NukeItem($client->GetItemIDAt($_));
				}
			}
		}
	}
}





## /quests/global/global_player.pl
## ensure item you make as the "hot potato" (any and all) are LORE!
sub EVENT_LOOT {
	if (plugin::NoRentItem($looted_id))
	{
		if (!$client->GetGlobal("looted$looted_id"))
		{
			$client->SetGlobal("looted$looted_id", 1, 5, "M30");
			quest::settimer("tempcheck$charid", 30);
		}
	}
}





## /plugins/NoRentItem.pl
sub NoRentItem {
	my $ic = $_[0];
	my $dbh = plugin::MySQL_Connect();
	my $sth = $dbh->prepare("SELECT `norent` FROM `items` WHERE ID = ".$ic." LIMIT 1");
	$sth->execute();	
	@data = $sth->fetchrow_array();
	$sth->finish();
	$dbh->disconnect();
	if ($data[0] == 0) { return 1; }
	else { return 0; }
}

return 1;
global_player.pl is screwy in its behavior (not to say it doesn't work "correctly" it's just finicky) so I'd heed the suggestion within the code.
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:29 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