View Single Post
  #14  
Old 08-31-2009, 06:00 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Here is a working script for doing this.

Code:
sub EVENT_SAY {

	if ($text =~/hail/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");
		}
	}

		
}
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote