View Single Post
  #20  
Old 09-16-2009, 05:03 PM
Domel
Fire Beetle
 
Join Date: Oct 2008
Location: Washington
Posts: 23
Default

This will make the doors in the Guild Lobby and Guild Hall functional. The global and instance are set for 18 hours.


\quests\guildlobby\player.pl
Code:
sub EVENT_CLICKDOOR {
  if($doorid == 258 || $doorid == 260) {
          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);
            }
            else
            {
                my $instanceID = quest::CreateInstance("guildhall", 0, 64800);
                quest::AssignToInstance($instanceID); 
                quest::setglobal("GuildInstance_$uguild_id",$instanceID,7,"H18");
                quest::MovePCInstance(345, $instanceID, 0, 0, 0);
            }
        }
    }
}
\quests\guildhall\player.pl
Code:
sub EVENT_CLICKDOOR {
  if($doorid == 258) {
          quest::movepc(344,0,590,0,128);
    }
}
It could use some tweaking to remove the global on server reset or if the Guild Hall is empty.
Reply With Quote