Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 04-20-2010, 03:53 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

As far as the script, make a file for the shortname. And then insert the appropriate script quoted earlier into player.pl and then #reloadpl in game to clear the memory cache.

If you take the NPC route and put that same instance function on an NPC, make sure you enable Qglobals for the NPC using the script mentioned above:

Code:
sub EVENT_SAY {

	if ($text =~/hail/i)
        {
        quest::say("Hello $name, would you like to be transfered to your [GuildHall]?");
        }

        if($text =~/Guildhall/i)
	{
		quest::say("Let me see...");
		if($uguild_id > 0)
		{
			if (defined($qglobals{"GuildInstance_$uguild_id"}))
			{
				my $QGlobalValue = $qglobals{"GuildInstance_$uguild_id"};
				quest::AssignToInstance($qglobals{"GuildInstance_$uguild_id"});
				quest::MovePCInstance(345, $QGlobalValue, 0, 0, 0);
				quest::say("Moving you to the instance now");
			}
			else
			{
				quest::say("No instance existed, so creating one");
				my $instanceID = quest::CreateInstance("guildhall", 0, -1);
				quest::AssignToInstance($instanceID);
				quest::setglobal("GuildInstance_$uguild_id",$instanceID,7,"M60");
				quest::MovePCInstance(345, $instanceID, 0, 0, 0);
				quest::say("Moving you to the instance now");
			}
		}
		else
		{
			quest::say("I am sorry but you are not part of a guild");
		}
	}


}

The Guild Bank ZONE ID is set in Rules_Values:
Code:
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'World:GuildBankZoneID', '345', 'ID of zone the Guild Bank works in. Default 345, guildhall');
The reason for this is: as quoted by Derision
Quote:
The guild bank is stored in the memory of that instance of that zone. While deposits/withdrawals etc are written to the database immediately, there is no mechanism to inform Guild Bankers in other zones to refresh their in-memory copies when changes are made.

Without that restriction, item duplication would be rampant.

While you might not like it, I believe it is live-like, and I really didn't feel like spending the extra hours required to allow the facility to have multiple guild bankers.

With the way inter-zone communication is handled via packets, assuring accurate synchronisation between zones is virtually impossible, without putting guild banks in shared memory and using mutexes to access them, and the facility to easily do that is not currently there. (It is technically possible).
Hope that helps!

Last edited by Akkadius; 04-20-2010 at 03:54 AM.. Reason: Because I felt like it
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 02:49 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3