Advertisement
Guest User

Untitled

a guest
May 24th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.23 KB | None | 0 0
  1. sub GroupInstance
  2. {
  3.         ###Usage: plugin::GroupInstance("HalasWolv[S]",1,"halas",29,2,(xcoord),(ycoord),(zcoord);
  4.         ###Akkadius of Blood of the Akkadian
  5.         my $text = plugin::val('$text');
  6.         my $client = plugin::val('$client');
  7.         my $InstanceName = $_[0];
  8.         my $InstVersion = $_[1];
  9.         my $ZoneShortName = $_[2];
  10.         my $Zone_ID = $_[3];
  11.         my $Duration = $_[4];
  12.         my $Xentrance = $_[5];
  13.         my $Yentrance = $_[6];
  14.         my $Zentrance = $_[7];
  15.         my $group = $client->GetGroup();
  16.         my $groupID = quest::getgroupidbychar($charid);
  17.             if (defined($qglobals{"$InstanceName_$groupID"}))
  18.             {
  19.                 my $QGlobalValue = $qglobals{"$InstanceName_$groupID"};
  20.                 quest::AssignToInstance($QGlobalValue);
  21.                 quest::MovePCInstance($Zone_ID, $QGlobalValue, $Xentrance, $Yentrance, $Zentrance);
  22.             }
  23.             else
  24.             {
  25.                 my $instanceID = quest::CreateInstance($ZoneShortName, $InstVersion,($Duration * 60 * 60));
  26.                 quest::AssignToInstance($instanceID);
  27.                 quest::setglobal("$InstanceName_$groupID",$instanceID,7,"H{$Duration}");
  28.                 quest::MovePCInstance($Zone_ID, $instanceID, $Xentrance, $Yentrance, $Zentrance);
  29.             }
  30.         if ($groupid = 0)
  31.         {
  32.             quest::popup("Requirements","You need to have a group to enter this instance",0,0);
  33.         }
  34. }
  35.  
  36.         return 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement