Advertisement
Guest User

Waypoint Code 1.4

a guest
Mar 31st, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 86.34 KB | None | 0 0
  1. #####################################################################################################################################################
  2. ### FILE NAME           : player.pl (Waypoint) will be copied/moved to global_player.pl later
  3. ### VERSION             : 1.4
  4. ### UPDATED             : March 31, 2013
  5. ### QUEST               : Create Solo, Raid, and Guild instances with custom invites
  6. ### REQURIED PLUGIN 1   : globals.pl (plugin::var, plugin::val) for subs to get variable values (Might copy plugins to a sub later)
  7. ### REQURIED PLUGIN 2   : check_hasitem.pl (plugin::check_hasitem) to determine prices via item
  8. ### ITEM IDS            : 119998 = Waypoint, 120003 = Free Waypoint
  9. ### QGLOBAL VARIABLE    : XXX = Instance ID, YYY = Auto Increment ID
  10. ### QGLOBAL SOLO        : $name_Solo_$zonesn_$zoneid
  11. ### QGLOBAL RAID        : $name_Raid_$zonesn_$zoneid, XXX_RaidI_Leader, XXX__RaidI_Time, XXX_RaidI_$zonesn_$zoneid, XXX_RaidI_Status_YYY
  12. ### QGLOBAL GUILD       : $name_Guild_$zonesn_$zoneid, XXX_Guild_$zonesn_$zoneid, XXX_GuildI_Leader, XXX__GuildI_Time, XXX_GuildI_$zonesn_$zoneid, XXX_GuildI_Status_YYY
  13. ### QGLOBAL SPAM DELAY  : SPAM_SOLO_$zonesn_$name, SPAM_GUILD_$zonesn_$name, SPAM_RAID_$zonesn_$name (Set to 3600 seconds to re-create instances)
  14. ### Special Thanks      : Used code from Akkadius, Trevius, Natedog, Hateborne and a few other people
  15. ###
  16. ### STUFF TO DO         :
  17. ###                       Edit: maybe change syntax to add "#" or "." before commands for instance
  18. ###                       Add: my $GuildName = $client->GuildID(); my $GuildName = quest::getguildnamebyid($guildID);
  19. ###                       Add: my $RaidGroup = $client->GetRaid(); my $raidID = $RaidGroup->GetID();
  20. ###                       Add: One command from leader to port entire guild/raid into the instance, might require to be in same zone name though.
  21. ###
  22. ### OTHER NOTES         : This is done 100% without DBI, just qglobals. Using DBI would probably be
  23. ###                       more simple and shorter, but also could create more lag on the database.
  24. ### CHANGES             :
  25. ###                         03/31/2013
  26. ###                         Added Qglobal $name_Guild_$zonesn_$zoneid
  27. ###                         guild join and raid join now use <name> instead of <id>
  28. ###                         Player gets message of being BANNED when getting banned, or trying to join when banned
  29. ###                         Player gets message that you were not invited if trying to join before getting invited
  30. ###                         Added command Waypoint to bring up the menu in addition to Instance or Instances
  31. ###                         Added Spam Delay Global for Creating Instances in same zone and tell player how many seconds left to create again
  32. ###
  33. ###                         03/30/2013
  34. ###                         Changed menu system, put some commands under the "More Options" saylink to reduce menu size
  35. ###                         Changed instance durations from 14400 to 86400 (4 hrs to 24 hrs)
  36. ###                         Updated prices and per zone
  37. ###                         Created sub zone id to zone name (Hope I didn't re-create something that already exist lol)
  38. ###                         Added $zoneid to $zonesn in qglobal name and passed to $signal, telling players in a different zone which zone to be used
  39. ###                         $signal remove - greater than 1000000000 (1 billion) = remove player from instance
  40. ###                         $signal zone id - has $zoneid * 1000000 (1 million) for $zoneid to pass through signal via int ($signal / 1000000)
  41. ###                         $signal instance id - has instance id passed by int ($signal % 1000000) to get the value under 1 million for instance id
  42. ###                         Added / Updated signal to give message to player that was invited regardless of any status (pending, joined, removed)
  43. ###                         With the above update, players can re-invite players that did not receive the message or was zoning at the time, etc.
  44. ###                         Updated Popup window info when being invited, removed, or choosing to leave instance
  45. ###                         Decided to not "upgrade" solo instances to guild/raid that was suggested, for now.
  46. ###                         Decided not to use invite whole raid group or syntax join player/guild names, still need to use the ids provided.
  47. #####################################################################################################################################################
  48.  
  49. sub EVENT_SAY
  50. {
  51.     my $SoloStatus      = 1;
  52.     my $GuildStatus     = 1;
  53.     my $RaidStatus      = 1;
  54.  
  55.     if ($text=~/^Instance$/i || $text=~/^Instances$/i || $text=~/^Waypoint$/i)
  56.     {
  57.         my $freeinstance = plugin::check_hasitem($client, 120003);  #EDIT item ID for FREE instance item
  58.         my $paidinstance = plugin::check_hasitem($client, 119998);  #EDIT item ID for PAID instance item
  59.         $client->Message(315," ");
  60.         if ($freeinstance)
  61.         {
  62.             $client->Message(315,"Free Waypoint Menu");
  63.             $client->Message(315,"------------------------------");
  64.         }
  65.         elsif ($paidinstance)
  66.         {
  67.             $client->Message(315,"Reglar Waypoint Menu");
  68.             $client->Message(315,"---------------------------------");
  69.         }
  70.         else
  71.         {
  72.             $client->Message(315,"Non Discount Waypoint Menu");
  73.             $client->Message(315,"-------------------------------------------");
  74.         }
  75.     }
  76.  
  77.     ###############################################################################################
  78.     ### START SOLO INSTANCES ######################################################################
  79.     if ($SoloStatus == 1)
  80.     {
  81.         if ($text=~/^Instance$/i || $text=~/^Instances$/i || $text=~/^Waypoint$/i)
  82.         {
  83.             my $SoloInstanceID  = "$name" . "_Solo_" . "$zonesn" . "_" . "$zoneid";
  84.             if (defined($qglobals{"$SoloInstanceID"}))
  85.             {
  86.                 my $EnterSoloInstance = quest::saylink("Enter Solo", 1);
  87.                 my $DeleteSoloInstance = quest::saylink("Delete Solo", 1);
  88.                 $client->Message(315,"[$EnterSoloInstance] [$DeleteSoloInstance]");
  89.             }
  90.             else
  91.             {
  92.                 my $SoloCreate = quest::saylink("Create Solo Instance", 1);
  93.                 my $SoloCost = SOLO_PRICE();
  94.                 $client->Message(315,"[$SoloCreate] : $SoloCost Platinum");
  95.             }
  96.             $qglobals{"$SoloInstanceID"} = undef;
  97.         }
  98.  
  99.         if($text=~/^Create Solo Instance$/i)
  100.         {
  101.             my $SoloInstanceID  = "$name" . "_Solo_" . "$zonesn" . "_" . "$zoneid";
  102.             if (defined($qglobals{"$SoloInstanceID"}))
  103.             {
  104.                 $client->Message(315,"You already have a solo instance for $zonesn.");
  105.             }
  106.             else
  107.             {
  108.                 my $accountid = $client->AccountID();
  109.                 my $bankcredit = $qglobals{"BankCredit_$accountid"};
  110.                 my $SoloCost = SOLO_PRICE();
  111.                 my $cost = $SoloCost;
  112.                 my $SPAM_NAME = "SPAM_SOLO_" . $zonesn . "_$name";
  113.                 my $SPAM_TIME = 3600; # Make 3600 / 1 HR
  114.                 if ($bankcredit < $cost)
  115.                 {
  116.                     $client->Message(315,"You need ". ($cost - $bankcredit) . " more plat!");
  117.                 }
  118.                 elsif (defined($qglobals{"$SPAM_NAME"}))
  119.                 {
  120.                     my $SPAM_VALUE  = $qglobals{"$SPAM_NAME"};
  121.                     my $TIME_LEFT   = $SPAM_TIME + $SPAM_VALUE - time();
  122.                     $client->Message(315,"You can create another Solo Instance in $TIME_LEFT seconds.");
  123.                 }
  124.                 else
  125.                 {
  126.                     quest::setglobal("$SPAM_NAME",time(),"7","S$SPAM_TIME"); # PREVENT CREATE SPAM FOR THIS ZONE
  127.                     PayInstance("BankCredit", $cost, "Solo Instance");
  128.                     my $InstVersion = 0;            # Must be 0 to load NPCs into an instance
  129.                     my $InstanceDuration = 86400;
  130.                     my $EnterSoloInstance = quest::saylink("Enter Solo", 1);
  131.                     my $InstID = quest::CreateInstance("$zonesn", $InstVersion, $InstanceDuration);
  132.                     quest::setglobal("$SoloInstanceID","$InstID","7","S$InstanceDuration");
  133.                     quest::AssignToInstance($InstID);
  134.                     # $client->Message(315," ");
  135.                     $client->Message(315,"You created a solo instance ($InstID) for $zonesn.");
  136.                     $client->Message(315,"Would you like to $EnterSoloInstance instance?");
  137.                 } # create instance then send
  138.                 $qglobals{"$SPAM_NAME"}  = undef;
  139.             }
  140.             $qglobals{"$SoloInstanceID"} = undef;
  141.         }
  142.  
  143.         if($text=~/^Enter Solo$/i)
  144.         {
  145.             my $SoloInstanceID = "$name" . "_Solo_" . "$zonesn" . "_" . "$zoneid";
  146.             if (defined($qglobals{"$SoloInstanceID"}))
  147.             {
  148.                 my $timestamp = localtime(time);
  149.                 my $InstID = $qglobals{"$SoloInstanceID"};
  150.                 my $Cx = $client->GetX();
  151.                 my $Cy = $client->GetY();
  152.                 my $Cz = $client->GetZ();
  153.                 quest::popup("ENTER SOLO INSTANCE","<br>
  154.                             <c \"#FE2E2E\">Moving you to SOLO instance!<br>
  155.                             <br>
  156.                             <c \"#FFFF49\">Time : &nbsp;&nbsp;&nbsp;<c \"#00FF00\">$timestamp<br>
  157.                             <c \"#FFFF49\">Name : &nbsp; <c \"#00FF00\">$name<br>
  158.                             <c \"#FFFF49\">Zone : &nbsp;&nbsp;&nbsp; <c \"#00FF00\">$zonesn<br>
  159.                             <c \"#FFFF49\">Type : &nbsp;&nbsp;&nbsp;&nbsp; <c \"#00FF00\">Solo<br>
  160.                             <br>
  161.                             <c \"#00BFFF\">ENJOY!<br>
  162.                             <br>
  163.                             <br>
  164.                             ",1050,0);
  165.                 $client->Message(315, " ");
  166.                 $client->Message(315, "Moving you to solo instance ($InstID) for $zonesn.");
  167.                 quest::MovePCInstance($zoneid, $InstID, $Cx, $Cy, $Cz);
  168.             }
  169.             else
  170.             {
  171.                 $client->Message(315,"You do not have a solo instance for $zonesn.");
  172.             } # create instance then send
  173.             $qglobals{"$SoloInstanceID"} = undef;
  174.         }
  175.  
  176.         if ($text=~/^Delete Solo$/i)
  177.         {
  178.             my $SoloInstanceID  = "$name" . "_Solo_" . "$zonesn" . "_" . "$zoneid";
  179.             if (defined($qglobals{"$SoloInstanceID"}))
  180.             {
  181.                 my $InstID = $qglobals{"$SoloInstanceID"};
  182.                 quest::DestroyInstance($InstID);
  183.                 quest::delglobal($SoloInstanceID);
  184.                 $client->Message(315, " ");
  185.                 $client->Message(315, "Solo Instance ($InstID) Deleted!");
  186.  
  187.             }
  188.             else
  189.             {
  190.                 $client->Message(315, "You do not have a solo instance to delete!");
  191.             }
  192.             $qglobals{"$SoloInstanceID"} = undef;
  193.         }
  194.     }
  195.     ###  END SOLO INSTANCES #######################################################################
  196.     ###############################################################################################
  197.  
  198.  
  199.     ###############################################################################################
  200.     ### START RAID INSTANCES #####################################################################
  201.     if ($RaidStatus == 1)
  202.     {
  203.         if ($text=~/^Instance$/i || $text=~/^Instances$/i || $text=~/^Waypoint$/i)
  204.         {
  205.             my $RaidID = $name;
  206.             my $RaidInstanceID = "$RaidID" . "_Raid_" . "$zonesn" . "_" . "$zoneid";
  207.             if (defined($qglobals{"$RaidInstanceID"}))
  208.             {
  209.                 my $EnterRaidInstance       = quest::saylink("Enter Raid", 1);
  210.                 my $DeleteRaidInstance      = quest::saylink("Delete Raid", 1);
  211.                 my $RaidList                = quest::saylink("Raid List", 1);
  212.                 $client->Message(315,"[$EnterRaidInstance] [$DeleteRaidInstance] [$RaidList]");
  213.             }
  214.             else
  215.             {
  216.                 my $RaidCreate = quest::saylink("Create Raid Instance", 1);
  217.                 my $RaidCost = RAID_PRICE();
  218.                 $client->Message(315,"[$RaidCreate] : $RaidCost Platinum");
  219.             }
  220.             $qglobals{"$RaidInstanceID"} = undef;
  221.         }
  222.  
  223.         if($text=~/^Create Raid Instance$/i)
  224.         {
  225.             my $RaidID = $name;
  226.             my $RaidInstanceID = "$RaidID" . "_Raid_" . "$zonesn" . "_" . "$zoneid";
  227.             if (defined($qglobals{"$RaidInstanceID"}))
  228.             {
  229.                 $client->Message(315,"You already have a Raid Instance for $zonesn.");
  230.             }
  231.             else
  232.             {
  233.                 my $accountid = $client->AccountID();
  234.                 my $bankcredit = $qglobals{"BankCredit_$accountid"};
  235.                 my $RaidCost = RAID_PRICE();
  236.                 my $cost = $RaidCost;
  237.                 my $SPAM_NAME = "SPAM_RAID_" . $zonesn . "_$name";
  238.                 my $SPAM_TIME = 3600; # Make 3600 / 1 HR
  239.                 if ($bankcredit < $cost)
  240.                 {
  241.                     $client->Message(315,"You need ". ($cost - $bankcredit) . " more plat!");
  242.                 }
  243.                 elsif (defined($qglobals{"$SPAM_NAME"}))
  244.                 {
  245.                     my $SPAM_VALUE  = $qglobals{"$SPAM_NAME"};
  246.                     my $TIME_LEFT   = $SPAM_TIME + $SPAM_VALUE - time();
  247.                     $client->Message(315,"You can create another Raid Instance in $TIME_LEFT seconds.");
  248.                 }
  249.                 else
  250.                 {
  251.                     quest::setglobal("$SPAM_NAME",time(),"7","S$SPAM_TIME"); # PREVENT CREATE SPAM FOR THIS ZONE
  252.                    
  253.                     PayInstance("BankCredit", $cost, "Raid Instance");
  254.                     my $InstVersion = 0; # Must be 0 to load NPCs in an instance
  255.                     my $InstanceDuration = 86400;
  256.                     my $EnterRaidInstance = quest::saylink("Enter Raid", 1);
  257.                     my $InstID = quest::CreateInstance("$zonesn", $InstVersion, $InstanceDuration);
  258.  
  259.                     my $LeaderZone = $InstID . "_RaidI_" . $zonesn . "_" . "$zoneid";               # Qglobal name for Raid Instance ID + zone to do raid invites
  260.                     quest::setglobal("$LeaderZone","$InstID","7","S$InstanceDuration");             # Qglobal name for Raid Instance ID + zone to do raid invites
  261.  
  262.                     my $LeaderName = $InstID . "_RaidI_Leader";                                     # Qglobal Instance/Zone ID to Leaders Name
  263.                     quest::setglobal("$LeaderName","$name","7","S$InstanceDuration");               # Qglobal Instance/Zone ID to Leaders Name
  264.  
  265.                     my $LeaderTime = $InstID . "_RaidI_Time";                                       # Qglobal Raid Instance Timer
  266.                     my $Expire_Time = time() + $InstanceDuration;                                   # Qglobal Raid Instance Timer
  267.                     quest::setglobal("$LeaderTime","$Expire_Time","7","S$InstanceDuration");        # Qglobal Raid Instance Timer
  268.  
  269.                     quest::setglobal("$RaidInstanceID","$InstID","7","S$InstanceDuration");         # Qglobal Set Raid Instance ID
  270.                     quest::AssignToInstance($InstID);
  271.                     # $client->Message(315," ");
  272.                     $client->Message(315,"You created a Raid Instance ($InstID) for $zonesn.");
  273.                     $client->Message(315,"Would you like to $EnterRaidInstance instance?");
  274.                     $qglobals{"$LeaderZone"} = undef;
  275.                     $qglobals{"$LeaderName"} = undef;
  276.                 } # create instance then send
  277.                 $qglobals{"$SPAM_NAME"}  = undef;
  278.             }
  279.             $qglobals{"$RaidInstanceID"} = undef;
  280.         }
  281.  
  282.         if($text=~/^Enter Raid$/i)
  283.         {
  284.             my $RaidID = $name;
  285.             my $RaidInstanceID = "$RaidID" . "_Raid_" . "$zonesn" . "_" . "$zoneid";
  286.             if (defined($qglobals{"$RaidInstanceID"}))
  287.             {
  288.                 my $timestamp = localtime(time);
  289.                 my $InstID = $qglobals{"$RaidInstanceID"};
  290.                 my $Cx = $client->GetX();
  291.                 my $Cy = $client->GetY();
  292.                 my $Cz = $client->GetZ();
  293.                 quest::popup("ENTER RAID INSTANCE","<br>
  294.                             <c \"#FE2E2E\">Moving you to a RAID instance!<br>
  295.                             <br>
  296.                             <c \"#FFFF49\">Time : &nbsp;&nbsp;&nbsp;<c \"#00FF00\">$timestamp<br>
  297.                             <c \"#FFFF49\">Name : &nbsp; <c \"#00FF00\">$name<br>
  298.                             <c \"#FFFF49\">Zone : &nbsp;&nbsp;&nbsp; <c \"#00FF00\">$zonesn<br>
  299.                             <c \"#FFFF49\">Type : &nbsp;&nbsp;&nbsp;&nbsp; <c \"#00FF00\">Raid<br>
  300.                             <br>
  301.                             <c \"#00BFFF\">ENJOY!<br>
  302.                             <br>
  303.                             ",1050,0);
  304.                 $client->Message(315, " ");
  305.                 $client->Message(315, "Moving you to Raid Instance ($InstID) for $zonesn.");
  306.                 quest::AssignToInstance($InstID);
  307.                 quest::MovePCInstance($zoneid, $InstID, $Cx, $Cy, $Cz);
  308.             }
  309.             else
  310.             {
  311.                 $client->Message(315,"You do not have a Raid Instance for $zonesn.");
  312.             }   # create instance then send
  313.             $qglobals{"$RaidInstanceID"} = undef;
  314.         }
  315.  
  316.         if ($text=~/^Delete Raid$/i)
  317.         {
  318.             $client->Message(315, " ");
  319.             my $RaidID = $name;
  320.             my $RaidInstanceID = "$RaidID" . "_Raid_" . "$zonesn" . "_" . "$zoneid";
  321.             if (defined($qglobals{"$RaidInstanceID"}))
  322.             {
  323.                 my $InstID = $qglobals{"$RaidInstanceID"};
  324.                 my $LeaderZone = $InstID . "_RaidI_" . $zonesn . "_" . "$zoneid";       # Qglobal name for charid + zonesn to invite raid
  325.                 my $LeaderName = $InstID . "_RaidI_Leader";                             # Qglobal ID to Name
  326.                 my $LeaderTime = $InstID . "_RaidI_Time";                               # Qglobal Time
  327.  
  328.                 # DELETE Raid Player Invited List
  329.                 my $count = 1;
  330.                 my $raid_invite_name = $InstID . "_RaidI_Status_";
  331.                 my $temp_del = "";
  332.                 while ($count > 0)
  333.                 {
  334.                     if (defined($qglobals{"$raid_invite_name$count"}))
  335.                     {
  336.                         $temp_del = $raid_invite_name . $count;
  337.                         quest::delglobal($temp_del);
  338.                         $count ++;
  339.                     }
  340.                     else
  341.                     {
  342.                         $count = $count - 1;
  343.                         quest::gmsay("GM: Deleted $count Invited Players!", 18, 0);
  344.                         $count = 0;
  345.                     }
  346.                 }
  347.                 # END DELETE Raid Player Invited List
  348.  
  349.                 quest::DestroyInstance($InstID);
  350.                 quest::delglobal($RaidInstanceID);
  351.                 quest::delglobal($LeaderZone);
  352.                 quest::delglobal($LeaderName);
  353.                 quest::delglobal($LeaderTime);
  354.                 $client->Message(315, "Raid Instance ($InstID) Deleted!");
  355.                 $qglobals{"$LeaderZone"} = undef;
  356.                 $qglobals{"$LeaderName"} = undef;
  357.                 $qglobals{"$LeaderTime"} = undef;
  358.             }
  359.             else
  360.             {
  361.                 $client->Message(315, "You do not have a Raid Instance to delete!");
  362.             }
  363.             $qglobals{"$RaidInstanceID"} = undef;
  364.         }
  365.     }
  366.     ###  END RAID INSTANCES ######################################################################
  367.     ###############################################################################################
  368.  
  369.  
  370.     ###############################################################################################
  371.     ### START GUILD INSTANCES #####################################################################
  372.     if ($GuildStatus == 1)
  373.     {
  374.         if ($text=~/^Instance$/i || $text=~/^Instances$/i || $text=~/^Waypoint$/i)
  375.         {
  376.             my $GuildID = $uguild_id;
  377.             my $GuildInstanceID = "$GuildID" . "_Guild_"  . "$zonesn" . "_" . "$zoneid";
  378.             if (defined($qglobals{"$GuildInstanceID"}))
  379.             {
  380.                 my $EnterGuildInstance      = quest::saylink("Enter Guild", 1);
  381.                 my $DeleteGuildInstance     = quest::saylink("Delete Guild", 1);
  382.                 my $GuildList               = quest::saylink("Guild List", 1);
  383.                 $client->Message(315,"[$EnterGuildInstance] [$DeleteGuildInstance] [$GuildList]");
  384.             }
  385.             else
  386.             {
  387.                 my $GuildCreate = quest::saylink("Create Guild Instance", 1);
  388.                 my $GuildCost = GUILD_PRICE();
  389.                 $client->Message(315,"[$GuildCreate] : $GuildCost Platinum");
  390.             }
  391.             $qglobals{"$GuildInstanceID"} = undef;
  392.         }
  393.  
  394.         if($text=~/^Create Guild Instance$/i)
  395.         {
  396.             my $GuildID = $uguild_id;
  397.             my $GuildInstanceID = "$GuildID" . "_Guild_"  . "$zonesn" . "_" . "$zoneid";    # Unique Guild Instance via Guild ID
  398.             my $GuildInstanceID2 = "$name" . "_Guild_"  . "$zonesn" . "_" . "$zoneid";      # Who created Guild Instance, used for Invites
  399.             if (defined($qglobals{"$GuildInstanceID"}))
  400.             {
  401.                 $client->Message(315,"You already have a Guild Instance for $zonesn.");
  402.             }
  403.             else
  404.             {
  405.                 my $accountid = $client->AccountID();
  406.                 my $bankcredit = $qglobals{"BankCredit_$accountid"};
  407.                 my $GuildCost = GUILD_PRICE();
  408.                 my $cost = $GuildCost;
  409.                 my $SPAM_NAME = "SPAM_GUILD_" . $zonesn . "_$name";
  410.                 my $SPAM_TIME = 3600; # Make 3600 / 1 HR
  411.                 if ($bankcredit < $cost)
  412.                 {
  413.                     $client->Message(315,"You need ". ($cost - $bankcredit) . " more plat!");
  414.                 }
  415.                 elsif (defined($qglobals{"$SPAM_NAME"}))
  416.                 {
  417.                     my $SPAM_VALUE  = $qglobals{"$SPAM_NAME"};
  418.                     my $TIME_LEFT   = $SPAM_TIME + $SPAM_VALUE - time();
  419.                     $client->Message(315,"You can create another Guild Instance in $TIME_LEFT seconds.");
  420.                 }
  421.                 else
  422.                 {
  423.                     quest::setglobal("$SPAM_NAME",time(),"7","S$SPAM_TIME"); # PREVENT CREATE SPAM FOR THIS ZONE
  424.                    
  425.                     PayInstance("BankCredit", $cost, "Guild Instance");
  426.                     my $InstVersion = 0;            # MUST be 0 to load NPCs in an instance!
  427.                     my $InstanceDuration = 86400;
  428.                     my $EnterGuildInstance = quest::saylink("Enter Guild", 1);
  429.                     my $InstID = quest::CreateInstance("$zonesn", $InstVersion, $InstanceDuration);
  430.  
  431.                     my $LeaderZone = $InstID . "_GuildI_" . $zonesn . "_" . "$zoneid";              # Qglobal name for Guild Instance ID + zone to do guild invites
  432.                     quest::setglobal("$LeaderZone","$InstID","7","S$InstanceDuration");             # Qglobal name for Guild Instance ID + zone to do guild invites
  433.  
  434.                     my $LeaderName = $InstID . "_GuildI_Leader";                                    # Qglobal Instance/Zone ID to Leaders Name
  435.                     quest::setglobal("$LeaderName","$name","7","S$InstanceDuration");               # Qglobal Instance/Zone ID to Leaders Name
  436.  
  437.                     my $LeaderTime = $InstID . "_GuildI_Time";                                      # Qglobal Guild Instance Timer
  438.                     my $Expire_Time = time() + $InstanceDuration;                                   # Qglobal Guild Instance Timer
  439.                     quest::setglobal("$LeaderTime","$Expire_Time","7","S$InstanceDuration");        # Qglobal Guild Instance Timer
  440.  
  441.                     quest::setglobal("$GuildInstanceID","$InstID","7","S$InstanceDuration");        # Qglobal Set Guild Instance ID
  442.                     quest::setglobal("$GuildInstanceID2","$InstID","7","S$InstanceDuration");       # Qglobal Set Guild Instance ID 2
  443.                     quest::AssignToInstance($InstID);
  444.                     # $client->Message(315," ");
  445.                     $client->Message(315,"You created a Guild Instance ($InstID) for $zonesn.");
  446.                     $client->Message(315,"Would you like to $EnterGuildInstance instance?");
  447.                     $qglobals{"$LeaderZone"} = undef;
  448.                     $qglobals{"$LeaderName"} = undef;
  449.                 } # create instance then send
  450.                 $qglobals{"$SPAM_NAME"}  = undef;
  451.             }
  452.             $qglobals{"$GuildInstanceID"} = undef;
  453.             $qglobals{"$GuildInstanceID2"} = undef;
  454.         }
  455.  
  456.         if($text=~/^Enter Guild$/i)
  457.         {
  458.             my $GuildID = $uguild_id;
  459.             my $GuildInstanceID = "$GuildID" . "_Guild_"  . "$zonesn" . "_" . "$zoneid";
  460.             if (defined($qglobals{"$GuildInstanceID"}))
  461.             {
  462.                 my $timestamp = localtime(time);
  463.                 my $InstID = $qglobals{"$GuildInstanceID"};
  464.                 my $Cx = $client->GetX();
  465.                 my $Cy = $client->GetY();
  466.                 my $Cz = $client->GetZ();
  467.                 quest::popup("ENTER GUILD INSTANCE","<br>
  468.                             <c \"#FE2E2E\">Moving you to a GUILD instance!<br>
  469.                             <br>
  470.                             <c \"#FFFF49\">Time : &nbsp;&nbsp;&nbsp;<c \"#00FF00\">$timestamp<br>
  471.                             <c \"#FFFF49\">Name : &nbsp; <c \"#00FF00\">$name<br>
  472.                             <c \"#FFFF49\">Zone : &nbsp;&nbsp;&nbsp; <c \"#00FF00\">$zonesn<br>
  473.                             <c \"#FFFF49\">Type : &nbsp;&nbsp;&nbsp;&nbsp; <c \"#00FF00\">Guild<br>
  474.                             <br>
  475.                             <c \"#00BFFF\">ENJOY!<br>
  476.                             <br>
  477.                             ",1050,0);
  478.                 $client->Message(315, " ");
  479.                 $client->Message(315, "Moving you to Guild Instance ($InstID) for $zonesn.");
  480.                 quest::AssignToInstance($InstID);
  481.                 quest::MovePCInstance($zoneid, $InstID, $Cx, $Cy, $Cz);
  482.             }
  483.             else
  484.             {
  485.                 $client->Message(315,"You do not have a Guild Instance for $zonesn.");
  486.             }   # create instance then send
  487.             $qglobals{"$GuildInstanceID"} = undef;
  488.         }
  489.  
  490.         if ($text=~/^Delete Guild$/i)
  491.         {
  492.             $client->Message(315, " ");
  493.             my $GuildID = $uguild_id;
  494.             my $GuildInstanceID = "$GuildID" . "_Guild_"  . "$zonesn" . "_" . "$zoneid";
  495.             my $GuildInstanceID2 = "$name" . "_Guild_"  . "$zonesn" . "_" . "$zoneid";
  496.             if (defined($qglobals{"$GuildInstanceID"}))
  497.             {
  498.                 my $InstID = $qglobals{"$GuildInstanceID"};
  499.                 my $LeaderZone = $InstID . "_GuildI_" . $zonesn . "_" . "$zoneid";
  500.                 my $LeaderName = $InstID . "_GuildI_Leader";
  501.                 my $LeaderTime = $InstID . "_GuildI_Time";
  502.                 # DELETE List of Players Invited to Guild Instance
  503.                 my $count = 1;
  504.                 my $guild_invite_name = $InstID . "_GuildI_Status_";
  505.                 my $temp_del = "";
  506.                 while ($count > 0)
  507.                 {
  508.                     if (defined($qglobals{"$guild_invite_name$count"}))
  509.                     {
  510.                         $temp_del = $guild_invite_name . $count;
  511.                         quest::delglobal($temp_del);
  512.                         $count ++;
  513.                     }
  514.                     else
  515.                     {
  516.                         $count = $count - 1;
  517.                         quest::gmsay("GM: Deleted $count Invited Players!", 18, 0);
  518.                         $count = 0;
  519.                     }
  520.                 }
  521.                 # END DELETE List of Players Invited to Guild Instance
  522.                 quest::DestroyInstance($InstID);
  523.                 quest::delglobal($GuildInstanceID);
  524.                 quest::delglobal($GuildInstanceID2);
  525.                 quest::delglobal($LeaderZone);
  526.                 quest::delglobal($LeaderName);
  527.                 quest::delglobal($LeaderTime);
  528.                 $client->Message(315, "Guild Instance ($InstID) Deleted!");
  529.  
  530.                 $qglobals{"$LeaderZone"} = undef;
  531.                 $qglobals{"$LeaderName"} = undef;
  532.                 $qglobals{"$LeaderTime"} = undef;
  533.             }
  534.             else
  535.             {
  536.                 $client->Message(315, "You do not have a Guild Instance to delete!");
  537.             }
  538.             $qglobals{"$GuildInstanceID"} = undef;
  539.             $qglobals{"$GuildInstanceID2"} = undef;
  540.         }
  541.     }
  542.     ###  END GUILD INSTANCES ######################################################################
  543.     ###############################################################################################
  544.  
  545.  
  546.     if ($text=~/^Instance$/i || $text=~/^Instances$/i || $text=~/^Waypoint$/i)
  547.     {
  548.         my $LeaveInstance   = quest::saylink("Leave Instance", 1);
  549.         my $MoreOptions     = quest::saylink("More Options", 1);
  550.         $client->Message(315, "[$LeaveInstance] [$MoreOptions]");
  551.     }
  552.  
  553.  
  554.     if($text=~/^Guild Invite$/i)
  555.     {
  556.         $client->Message(315, " ");
  557.         $client->Message(315, "Syntax: guild invite <Player Name>");
  558.     }
  559.  
  560.  
  561.     if($text=~/^Raid Invite$/i)
  562.     {
  563.         $client->Message(315, " ");
  564.         $client->Message(315, "Syntax: raid invite <Player Name>");
  565.     }
  566.  
  567.  
  568.     # INVITE Guild Member
  569.     if($text=~/^Guild Invite /i && $text ne "Guild Invite")
  570.     {
  571.         my $GuildID = $uguild_id;
  572.         my $GuildInstanceID = "$GuildID" . "_Guild_"  . "$zonesn" . "_" . "$zoneid";
  573.         if (defined($qglobals{"$GuildInstanceID"}))
  574.         {
  575.             my $GetFriendName = substr($text, 13);
  576.             my $Instance_Invite = 0 + $qglobals{"$GuildInstanceID"};
  577.             $client->Message(315, " ");
  578.             $client->Message(315, "You sent an invite to $GetFriendName to join Guild Instance ($Instance_Invite) in $zonesn.");
  579.             my $ZoneConvert = $zoneid * 1000000; # Include Zone ID in the Signal, multiple of 1 million (1-999 Million)
  580.             $Instance_Invite = $Instance_Invite + $ZoneConvert;
  581.             quest::crosszonesignalclientbyname($GetFriendName, $Instance_Invite);
  582.         }
  583.         else
  584.         {
  585.             $client->Message(315, " ");
  586.             $client->Message(315, "You do not have a Guild Instance for inviting.");
  587.         }
  588.         $qglobals{"$GuildInstanceID"} = undef;
  589.     }
  590.  
  591.  
  592.     # INVITE Raid Member
  593.     if($text=~/^Raid Invite /i && $text ne "Raid Invite")
  594.     {
  595.         my $RaidID = $name;
  596.         my $RaidInstanceID = "$RaidID" . "_Raid_" . "$zonesn" . "_" . "$zoneid";
  597.         if (defined($qglobals{"$RaidInstanceID"}))
  598.         {
  599.             my $GetFriendName = substr($text, 12);
  600.             my $Instance_Invite = 0 + $qglobals{"$RaidInstanceID"};
  601.             $client->Message(315, " ");
  602.             $client->Message(315, "You sent an invite to $GetFriendName to join Raid Instance ($Instance_Invite) in $zonesn.");
  603.             my $ZoneConvert = $zoneid * 1000000; # Include Zone ID in the Signal, multiple of 1 million (1-999 Million)
  604.             $Instance_Invite = $Instance_Invite + $ZoneConvert;
  605.             quest::crosszonesignalclientbyname($GetFriendName, $Instance_Invite);
  606.         }
  607.         else
  608.         {
  609.             $client->Message(315, " ");
  610.             $client->Message(315, "You do not have a Raid Instance for inviting.");
  611.         }
  612.         $qglobals{"$RaidInstanceID"} = undef;
  613.     }
  614.  
  615.  
  616.     # REMOVE Guild Member
  617.     if($text=~/^Guild Remove /i && $text ne "Guild Remove")
  618.     {
  619.         my $GuildID = $uguild_id;
  620.         my $GuildInstanceID = "$GuildID" . "_Guild_"  . "$zonesn" . "_" . "$zoneid";
  621.         if (defined($qglobals{"$GuildInstanceID"}))
  622.         {
  623.             my $GetFriendName = substr($text, 13);
  624.             my $Instance_Remove = 0 + $qglobals{"$GuildInstanceID"};
  625.             my $Instance_Remove2 =  $Instance_Remove + 1000000000; # 1,000,000,000
  626.             quest::crosszonesignalclientbyname($GetFriendName, $Instance_Remove2);
  627.             $client->Message(315, " ");
  628.             $client->Message(315, "You removed $GetFriendName from Guild Instance ($Instance_Remove) in $zonesn.");
  629.         }
  630.         else
  631.         {
  632.             $client->Message(315, " ");
  633.             $client->Message(315, "You do not have a Guild Instance for removing.");
  634.         }
  635.         $qglobals{"$GuildInstanceID"} = undef;
  636.     }
  637.  
  638.  
  639.     # REMOVE Raid Member
  640.     if($text=~/^Raid Remove /i && $text ne "Raid Remove")
  641.     {
  642.         my $RaidID = $name;
  643.         my $RaidInstanceID = "$RaidID" . "_Raid_" . "$zonesn" . "_" . "$zoneid";
  644.         if (defined($qglobals{"$RaidInstanceID"}))
  645.         {
  646.             my $GetFriendName = substr($text, 12);
  647.             my $Instance_Remove = 0 + $qglobals{"$RaidInstanceID"};
  648.             my $Instance_Remove2 =  $Instance_Remove + 1000000000; # 1,000,000,000
  649.             quest::crosszonesignalclientbyname($GetFriendName, $Instance_Remove2);
  650.             $client->Message(315, " ");
  651.             $client->Message(315, "You removed $GetFriendName from Raid Instance ($Instance_Remove) in $zonesn.");
  652.         }
  653.         else
  654.         {
  655.             $client->Message(315, " ");
  656.             $client->Message(315, "You do not have a Raid Instance for removing.");
  657.         }
  658.         $qglobals{"$RaidInstanceID"} = undef;
  659.     }
  660.  
  661.  
  662.     if($text=~/^guild join$/i)
  663.     {
  664.         $client->Message(315, " ");
  665.         $client->Message(315,"Syntax: guild join <Player Name>");
  666.     }
  667.  
  668.  
  669.     if($text=~/^raid join$/i)
  670.     {
  671.         $client->Message(315, " ");
  672.         $client->Message(315,"Syntax: raid join <Player Name>");
  673.     }
  674.  
  675.     if($text=~/^guild remove$/i)
  676.     {
  677.         $client->Message(315, " ");
  678.         $client->Message(315,"Syntax: guild remove <Player Name>");
  679.     }
  680.  
  681.  
  682.     if($text=~/^raid remove$/i)
  683.     {
  684.         $client->Message(315, " ");
  685.         $client->Message(315,"Syntax: raid remove <Player Name>");
  686.     }
  687.  
  688.  
  689.  
  690.     ###############################################################################################
  691.     ### JOIN JOIN GUILD INSTANCE ##################################################################
  692.     if($text=~/^guild join /i)
  693.     {
  694.         # OLD METHOD VIA JOIN ID INSTEAD OF JOIN NAME
  695.         # my $GetJoinID = substr($text, 11);
  696.         # my $Check_G_Invite = $GetJoinID . "_GuildI_" . $zonesn . "_" . "$zoneid";
  697.         # my $Check_G_Leader = $GetJoinID . "_GuildI_Leader";
  698.  
  699.         my $Check_G_Leader = substr($text, 11);
  700.         my $Check_G_Invite = "_GuildI_" . $zonesn . "_" . "$zoneid";
  701.         my $GetGuildInstanceGlobal = $Check_G_Leader . "_Guild_" . $zonesn . "_" . $zoneid;
  702.         my $GetJoinID = 0;
  703.  
  704.         if (defined($qglobals{"$GetGuildInstanceGlobal"}))
  705.         {
  706.             $GetJoinID = $qglobals{"$GetGuildInstanceGlobal"};
  707.             $Check_G_Invite = $GetJoinID . $Check_G_Invite;
  708.         }
  709.  
  710.         if (defined($qglobals{"$Check_G_Invite"}))
  711.         {
  712.             # Find Player Qglobal to change status
  713.             my $count                   = 1;
  714.             my $guild_invite_name       = $GetJoinID . "_GuildI_Status_";
  715.             my $guild_invite_pending    = $name . "_pending";
  716.             my $guild_invite_joined     = $name . "_joined";
  717.             my $guild_invite_removed    = $name . "_removed";
  718.             my $compare_name            = "";
  719.             my $Leader = $Check_G_Leader;
  720.             while ($count > 0)
  721.             {
  722.                 if (defined($qglobals{"$guild_invite_name$count"}))
  723.                 {
  724.                     $compare_name = $qglobals{"$guild_invite_name$count"};
  725.                     if ($compare_name eq $guild_invite_pending || $compare_name eq $guild_invite_joined)
  726.                     {
  727.                         # When pending or joined qglobal name found, change value from pending to joined, then enter.
  728.                         my $GetSeconds = GET_TIME_LEFT("GUILD", $GetJoinID);
  729.                         quest::setglobal("$guild_invite_name$count","$guild_invite_joined","7","S$GetSeconds");
  730.                         my $timestamp = localtime(time);
  731.                         my $Cx = $client->GetX();
  732.                         my $Cy = $client->GetY();
  733.                         my $Cz = $client->GetZ();
  734.                         quest::popup("ENTERING INVITED GUILD INSTANCE","<br>
  735.                             <c \"#FE2E2E\">Moving you to a INVITED Guild Instance ($GetJoinID)!<br>
  736.                             <br>
  737.                             <c \"#FFFF49\">Time : &nbsp;&nbsp;&nbsp;<c \"#00FF00\">$timestamp<br>
  738.                             <c \"#FFFF49\">Name : &nbsp; <c \"#00FF00\">$name<br>
  739.                             <c \"#FFFF49\">Zone : &nbsp;&nbsp;&nbsp; <c \"#00FF00\">$zonesn<br>
  740.                             <c \"#FFFF49\">Type : &nbsp;&nbsp;&nbsp;&nbsp; <c \"#00FF00\">$Leader Guild Instance<br>
  741.                             <br>
  742.                             <c \"#00BFFF\">ENJOY!<br>
  743.                             <br>
  744.                             ",1050,0);
  745.                         $client->Message(315, " ");
  746.                         $client->Message(315, "Moving you to $Leader Guild Instance ($GetJoinID) for $zonesn.");
  747.                         $qglobals{"$guild_invite_name"} = undef;
  748.                         quest::MovePCInstance($zoneid, $GetJoinID, $Cx, $Cy, $Cz);
  749.                         $count = 0;
  750.                     }
  751.                     elsif ($compare_name eq $guild_invite_removed)
  752.                     {
  753.                         $client->Message(315, " ");
  754.                         $client->Message(315, "You were BANNED from $Leader Guild Instance ($GetJoinID) for $zonesn.");
  755.                         $count = 0;
  756.                     }
  757.                     else
  758.                     {
  759.                         $count ++;
  760.                     }
  761.                 }
  762.                 else
  763.                 {
  764.                     $client->Message(315,"You were not invited to $Leader Guild Instance $GetJoinID in $zonesn!");
  765.                     $count = 0;
  766.                 }
  767.             }
  768.         }
  769.         else
  770.         {
  771.             $client->Message(315,"Guild Instance $Check_G_Leader in $zonesn does not exist!");
  772.         }
  773.         $qglobals{"$Check_G_Invite"} = undef;
  774.         $qglobals{"$Check_G_Leader"} = undef;
  775.     }
  776.     ###  END JOIN GUILD INSTANCE ##################################################################
  777.     ###############################################################################################
  778.  
  779.  
  780.     ###############################################################################################
  781.     ### JOIN RAID INSTANCE ########################################################################
  782.     ### $name_Raid_$zonesn_$zoneid, XXX_RaidI_Leader, XXX__RaidI_Time, XXX_RaidI_$zonesn_$zoneid, XXX_RaidI_Status_YYY
  783.     if($text=~/^raid join /i)
  784.     {
  785.         # OLD CODE FOR raid join <id> instead of raid join <name>
  786.         # my $GetJoinID = substr($text, 10);
  787.         # my $Check_R_Invite = $GetJoinID . "_RaidI_" . $zonesn . "_" . "$zoneid";
  788.         # my $Check_R_Leader = $GetJoinID . "_RaidI_Leader";
  789.         # $name_Raid_$zonesn_$zoneid
  790.  
  791.         my $Check_R_Leader = substr($text, 10);
  792.         my $Check_R_Invite = "_RaidI_" . $zonesn . "_" . "$zoneid";
  793.         my $GetRaidInstanceGlobal = $Check_R_Leader . "_Raid_" . $zonesn . "_" . $zoneid;
  794.         my $GetJoinID = 0;
  795.         if (defined($qglobals{"$GetRaidInstanceGlobal"}))
  796.         {
  797.             $GetJoinID = $qglobals{"$GetRaidInstanceGlobal"};
  798.             $Check_R_Invite = $GetJoinID . $Check_R_Invite;
  799.         }
  800.  
  801.         if (defined($qglobals{"$Check_R_Invite"}))
  802.         {
  803.             # Find Player Qglobal to change status
  804.             my $count                   = 1;
  805.             my $raid_invite_name        = $GetJoinID . "_RaidI_Status_";
  806.             my $raid_invite_pending     = $name . "_pending";
  807.             my $raid_invite_joined      = $name . "_joined";
  808.             my $raid_invite_removed     = $name . "_removed";
  809.             my $compare_name            = "";
  810.             my $Leader = $Check_R_Leader;
  811.             while ($count > 0)
  812.             {
  813.                 if (defined($qglobals{"$raid_invite_name$count"}))
  814.                 {
  815.                     $compare_name = $qglobals{"$raid_invite_name$count"};
  816.                     if ($compare_name eq $raid_invite_pending || $compare_name eq $raid_invite_joined)
  817.                     {
  818.                         # When qglobal name found, change value from pending to joined, then enter
  819.                         my $GetSeconds = GET_TIME_LEFT("RAID", $GetJoinID);
  820.                         quest::setglobal("$raid_invite_name$count","$raid_invite_joined","7","S$GetSeconds");
  821.  
  822.                         my $timestamp = localtime(time);
  823.                         my $Cx = $client->GetX();
  824.                         my $Cy = $client->GetY();
  825.                         my $Cz = $client->GetZ();
  826.                         quest::popup("ENTERING INVITED RAID INSTANCE","<br>
  827.                             <c \"#FE2E2E\">Moving you to a INVITED Raid Instance ($GetJoinID)!<br>
  828.                             <br>
  829.                             <c \"#FFFF49\">Time : &nbsp;&nbsp;&nbsp;<c \"#00FF00\">$timestamp<br>
  830.                             <c \"#FFFF49\">Name : &nbsp; <c \"#00FF00\">$name<br>
  831.                             <c \"#FFFF49\">Zone : &nbsp;&nbsp;&nbsp; <c \"#00FF00\">$zonesn<br>
  832.                             <c \"#FFFF49\">Type : &nbsp;&nbsp;&nbsp;&nbsp; <c \"#00FF00\">$Leader Raid Instance<br>
  833.                             <br>
  834.                             <c \"#00BFFF\">ENJOY!<br>
  835.                             <br>
  836.                             ",1050,0);
  837.                         $client->Message(315, " ");
  838.                         $client->Message(315, "Moving you to $Leader Raid Instance ($GetJoinID) for $zonesn.");
  839.                         $qglobals{"$raid_invite_name"} = undef;
  840.                         quest::MovePCInstance($zoneid, $GetJoinID, $Cx, $Cy, $Cz);
  841.                         $count = 0;
  842.                     }
  843.                     elsif ($compare_name eq $raid_invite_removed)
  844.                     {
  845.                         $client->Message(315, " ");
  846.                         $client->Message(315, "You were BANNED from $Leader Raid Instance ($GetJoinID) for $zonesn.");
  847.                         $count = 0;
  848.                     }
  849.                     else
  850.                     {
  851.                         $count ++;
  852.                     }
  853.                 }
  854.                 else
  855.                 {
  856.                     $client->Message(315,"You were not invited to $Leader Raid Instance $GetJoinID in $zonesn!");
  857.                     $count = 0;
  858.                 }
  859.             }
  860.         }
  861.         else
  862.         {
  863.             $client->Message(315,"Raid Instance for $Check_R_Leader in $zonesn does not exist!");
  864.         }
  865.         $qglobals{"$Check_R_Invite"} = undef;
  866.         $qglobals{"$Check_R_Leader"} = undef;
  867.     }
  868.     ###  END JOIN RAID INSTANCE ###################################################################
  869.     ###############################################################################################
  870.  
  871.  
  872.     #################################################################################################################################################
  873.     # LIST of players invited/assigned to Guild Instance
  874.     if($text=~/^Guild List$/i)
  875.     {
  876.         my $timestamp = localtime(time);
  877.         $client->Message(315," ");
  878.         my $GuildID = $uguild_id;
  879.         my $GuildInstanceID = "$GuildID" . "_Guild_"  . "$zonesn" . "_" . "$zoneid";
  880.         if (defined($qglobals{"$GuildInstanceID"}))
  881.         {
  882.             my $Check_G_Invite = $qglobals{"$GuildInstanceID"} . "_GuildI_" . $zonesn . "_" . "$zoneid";
  883.             my $Check_G_Leader = $qglobals{"$GuildInstanceID"} . "_GuildI_Leader";
  884.             my $GID = $qglobals{"$GuildInstanceID"};
  885.  
  886.             # GET TIME LEFT UNTIL INSTANCE EXPIRES
  887.             my $LeaderTime  = $GID . "_GuildI_Time";
  888.             my $ExpireTime  = $qglobals{"$LeaderTime"};
  889.             my $TimeLeft    = $ExpireTime - time();
  890.             my $GetDays     = int($TimeLeft/(24*60*60));
  891.             my $GetHours    = ($TimeLeft/(60*60))%24;
  892.             my $GetMins     = ($TimeLeft/60)%60;
  893.             my $GetSecs     = $TimeLeft%60;
  894.  
  895.             $client->Message(315,"Expires: $GetDays Day, $GetHours Hr, $GetMins Min, $GetSecs Sec");
  896.             $client->Message(315,"List of players in your Guild Instance ($GID) in $zonesn!");
  897.             my $names_list = "";
  898.             my $temp_name = "";
  899.             my $guild_invite_name = $GID . "_GuildI_Status_";
  900.             my $count = 1;
  901.             my $player_count = 0;
  902.             while ($count > 0)
  903.             {
  904.                 if (defined($qglobals{"$guild_invite_name$count"}))
  905.                 {
  906.                     $player_count = $count;
  907.                     $temp_name = $qglobals{"$guild_invite_name$count"};
  908.                     if ($temp_name=~/pending$/i)
  909.                     {
  910.                         my $player_name = $temp_name;
  911.                         $player_name =~ s/_pending//; # string substitute flag
  912.                         my $player_status = " - Pending";
  913.                         my $yellow = "<c \"#AEB404\">";
  914.                         my $white = "<c \"#FFFFFF\">";
  915.                         my $player_space = "&nbsp;";
  916.                         my $BR = "<br>";
  917.                         my $player_number = "<c \"#0489B1\">$count : "; # Teal Color
  918.                         $names_list = $names_list . $player_number . $white . $player_name . $yellow . $player_status . $BR;
  919.                     }
  920.                     elsif ($temp_name=~/joined$/i)
  921.                     {
  922.                         my $player_name = $temp_name;
  923.                         $player_name =~ s/_joined//;
  924.                         my $player_status = " - Joined";
  925.                         my $green = "<c \"#298A08\">";
  926.                         my $white = "<c \"#FFFFFF\">";
  927.                         my $player_space = "&nbsp;";
  928.                         my $BR = "<br>";
  929.                         my $player_number = "<c \"#0489B1\">$count : "; # Teal Color
  930.                         $names_list = $names_list . $player_number . $white . $player_name . $green . $player_status . $BR;
  931.                     }
  932.                     elsif ($temp_name=~/removed$/i)
  933.                     {
  934.                         my $player_name = $temp_name;
  935.                         $player_name =~ s/_removed//;
  936.                         my $player_status = " - Removed";
  937.                         my $red = "<c \"#FE2E2E\">";
  938.                         my $white = "<c \"#FFFFFF\">";
  939.                         my $player_space = "&nbsp;";
  940.                         my $BR = "<br>";
  941.                         my $player_number = "<c \"#0489B1\">$count : "; # Teal Color
  942.                         $names_list = $names_list . $player_number . $white . $player_name . $red . $player_status . $BR;
  943.                     }
  944.                     else
  945.                     {
  946.                         quest::gmsay("GM: GUILD LIST ADD NAME ERROR.", 18, 0);
  947.                     }
  948.                     # quest::gmsay("GM: $temp_name added to List", 18, 0);
  949.                     $count ++;
  950.                 }
  951.                 else
  952.                 {
  953.                     # quest::gmsay("GM: End of List", 18, 0);
  954.                     $count = 0;
  955.                 }
  956.             }
  957.             quest::popup("GUILD INSTANCE LIST","
  958.                             Expires: $GetDays Day, $GetHours Hr, $GetMins Min, $GetSecs Sec <br>
  959.                             <c \"#FE2E2E\">List of ($player_count) players in Guild Instance ($GID) in $zonesn<br>
  960.                             &nbsp;<br>
  961.                             $names_list
  962.                             <br>
  963.                             ",1050,0);
  964.             $qglobals{"$Check_G_Invite"} = undef;
  965.             $qglobals{"$Check_G_Leader"} = undef;
  966.         }
  967.         else { $client->Message(315,"You do not have a Guild Instance in $zonesn!"); }
  968.         $qglobals{"$GuildInstanceID"} = undef;
  969.     }
  970.     # End Guild Instance LIST
  971.     #################################################################################################################################################
  972.  
  973.  
  974.     #################################################################################################################################################
  975.     # List of players invited/assigned to Raid Instance
  976.     if($text=~/^Raid List$/i)
  977.     {
  978.         # my $timestamp = localtime(time);
  979.         $client->Message(315," ");
  980.  
  981.         my $RaidID = $name;
  982.         my $RaidInstanceID = "$RaidID" . "_Raid_" . "$zonesn" . "_" . "$zoneid";
  983.         if (defined($qglobals{"$RaidInstanceID"}))
  984.         {
  985.             my $Check_G_Invite = $qglobals{"$RaidInstanceID"} . "_RaidI_" . $zonesn . "_" . "$zoneid";
  986.             my $Check_G_Leader = $qglobals{"$RaidInstanceID"} . "_RaidI_Leader";
  987.             my $GID = $qglobals{"$RaidInstanceID"};
  988.  
  989.             # GET TIME LEFT UNTIL INSTANCE EXPIRES
  990.             my $LeaderTime  = $GID . "_RaidI_Time";
  991.             my $ExpireTime  = $qglobals{"$LeaderTime"};
  992.             my $TimeLeft    = $ExpireTime - time();
  993.             my $GetDays     = int($TimeLeft/(24*60*60));
  994.             my $GetHours    = ($TimeLeft/(60*60))%24;
  995.             my $GetMins     = ($TimeLeft/60)%60;
  996.             my $GetSecs     = $TimeLeft%60;
  997.  
  998.             $client->Message(315,"Expires: $GetDays Day, $GetHours Hr, $GetMins Min, $GetSecs Sec");
  999.             $client->Message(315,"List of players in your Raid Instance ($GID) in $zonesn!");
  1000.             my $names_list = "";
  1001.             my $temp_name = "";
  1002.             my $raid_invite_name = $GID . "_RaidI_Status_";
  1003.             my $count = 1;
  1004.             my $player_count = 0;
  1005.             while ($count > 0)
  1006.             {
  1007.                 if (defined($qglobals{"$raid_invite_name$count"}))
  1008.                 {
  1009.                     $player_count = $count;
  1010.                     $temp_name = $qglobals{"$raid_invite_name$count"};
  1011.                     if ($temp_name=~/pending$/i)
  1012.                     {
  1013.                         my $player_name = $temp_name;
  1014.                         $player_name =~ s/_pending//; # string substitute flag
  1015.                         my $player_status = " - Pending";
  1016.                         my $yellow = "<c \"#AEB404\">";
  1017.                         my $white = "<c \"#FFFFFF\">";
  1018.                         my $player_space = "&nbsp;";
  1019.                         my $BR = "<br>";
  1020.                         my $player_number = "<c \"#0489B1\">$count : "; # Teal Color
  1021.                         $names_list = $names_list . $player_number . $white . $player_name . $yellow . $player_status . $BR;
  1022.                     }
  1023.                     elsif ($temp_name=~/joined$/i)
  1024.                     {
  1025.  
  1026.                         my $player_name = $temp_name;
  1027.                         $player_name =~ s/_joined//;
  1028.  
  1029.                         my $player_status = " - Joined";
  1030.                         my $green = "<c \"#298A08\">";
  1031.                         my $white = "<c \"#FFFFFF\">";
  1032.                         my $player_space = "&nbsp;";
  1033.                         my $BR = "<br>";
  1034.                         my $player_number = "<c \"#0489B1\">$count : "; # Teal Color
  1035.                         $names_list = $names_list . $player_number . $white . $player_name . $green . $player_status . $BR;
  1036.                     }
  1037.                     elsif ($temp_name=~/removed$/i)
  1038.                     {
  1039.                         my $player_name = $temp_name;
  1040.                         $player_name =~ s/_removed//;
  1041.                         my $player_status = " - Removed";
  1042.                         my $red = "<c \"#FE2E2E\">";
  1043.                         my $white = "<c \"#FFFFFF\">";
  1044.                         my $player_space = "&nbsp;";
  1045.                         my $BR = "<br>";
  1046.                         my $player_number = "<c \"#0489B1\">$count : "; # Teal Color
  1047.                         $names_list = $names_list . $player_number . $white . $player_name . $red . $player_status . $BR;
  1048.                     }
  1049.                     else
  1050.                     {
  1051.                         quest::gmsay("GM: RAID LIST ADD NAME ERROR.", 18, 0);
  1052.                     }
  1053.                     # quest::gmsay("GM: $temp_name added to List", 18, 0);
  1054.                     $count ++;
  1055.                 }
  1056.                 else
  1057.                 {
  1058.                     # quest::gmsay("GM: End of List", 18, 0);
  1059.                     $count = 0;
  1060.                 }
  1061.             }
  1062.             quest::popup("RAID INSTANCE LIST","
  1063.                             Expires: $GetDays Day, $GetHours Hr, $GetMins Min, $GetSecs Sec <br>
  1064.                             <c \"#FE2E2E\">List of ($player_count) players in Raid Instance ($GID) in $zonesn<br>
  1065.                             &nbsp;<br>
  1066.                             $names_list
  1067.                             <br>
  1068.                             ",1050,0);
  1069.             $qglobals{"$Check_G_Invite"} = undef;
  1070.             $qglobals{"$Check_G_Leader"} = undef;
  1071.         }
  1072.         else { $client->Message(315,"You do not have a Raid Instance in $zonesn!"); }
  1073.         $qglobals{"$RaidInstanceID"} = undef;
  1074.     }
  1075.     # End Raid Instance LIST
  1076.     #################################################################################################################################################
  1077.  
  1078.  
  1079.     if($text=~/^More Options$/i)
  1080.     {
  1081.         # $client->Message(315, " ");
  1082.         my $GuildInvite     = quest::saylink("Guild Invite", 1);
  1083.         my $GuildJoin       = quest::saylink("Guild Join", 1);
  1084.         my $GuildRemove     = quest::saylink("Guild Remove", 1);
  1085.         my $RaidInvite      = quest::saylink("Raid Invite", 1);
  1086.         my $RaidJoin        = quest::saylink("Raid Join", 1);
  1087.         my $RaidRemove      = quest::saylink("Raid Remove", 1);
  1088.         my $Deposit = quest::saylink("Deposit",1);
  1089.         my $Withdraw = quest::saylink("Withdraw",1);
  1090.         my $Balance = quest::saylink("Balance",1);
  1091.         $client->Message(315, "More Waypoint Options ...");
  1092.         $client->Message(315, "[$RaidInvite] [$RaidJoin] [$RaidRemove]");
  1093.         $client->Message(315, "[$GuildInvite] [$GuildJoin] [$GuildRemove]");
  1094.         $client->Message(315, "[$Balance] [$Deposit] [$Withdraw]");
  1095.     }
  1096.  
  1097.  
  1098.     if($text =~ /^Balance$/i)
  1099.     {
  1100.         # plugin::CreditStatusAccount("BankCredit");
  1101.         Check_Balance("BankCredit");
  1102.     }
  1103.  
  1104.  
  1105.     if($text =~ /^Deposit$/i)
  1106.     {
  1107.         $client->Message(315," ");
  1108.         $client->Message(315,"Just give a Waypoint any amount of platinum you'd like to deposit!");
  1109.     }
  1110.  
  1111.     if($text =~ /^Withdraw$/i)
  1112.     {
  1113.         $client->Message(315," ");
  1114.         $client->Message(315,"Withdraw not available.");
  1115.     }
  1116.  
  1117.  
  1118.     if($text=~/^Leave Instance$/i)
  1119.     {
  1120.         my $Cx = $client->GetX();
  1121.         my $Cy = $client->GetY();
  1122.         my $Cz = $client->GetZ();
  1123.         my $Ch = $client->GetHeading();
  1124.         my $timestamp = localtime(time);
  1125.         $client->Message(315," ");
  1126.         $client->Message(315,"Moving you back to public zone in $zonesn!");
  1127.         quest::popup("LEAVE INSTANCE","<br>
  1128.                             <c \"#FE2E2E\">You choose to leave instance.<br>
  1129.                             <c \"#FE2E2E\">Moving you to a PUBLIC zone!<br>
  1130.                             <br>
  1131.                             <c \"#FFFF49\">Time : &nbsp;&nbsp;&nbsp;<c \"#00FF00\">$timestamp<br>
  1132.                             <c \"#FFFF49\">Name : &nbsp; <c \"#00FF00\">$name<br>
  1133.                             <c \"#FFFF49\">Zone : &nbsp;&nbsp;&nbsp; <c \"#00FF00\">$zonesn<br>
  1134.                             <c \"#FFFF49\">Type : &nbsp;&nbsp;&nbsp;&nbsp; <c \"#00FF00\">Public<br>
  1135.                             <br>
  1136.                             <c \"#00BFFF\">ENJOY!<br>
  1137.                             <br>
  1138.                             ",1050,0);
  1139.         quest::movepc($zoneid, $Cx, $Cy, $Cz, $Ch);
  1140.     }
  1141.  
  1142.     # $qglobals{"$SoloInstanceID"} = undef;
  1143.     # $qglobals{"$GuildInstanceID"} = undef;
  1144.     # $qglobals{"$Check_G_Invite"}  = undef;
  1145.     # $qglobals{"$Check_G_Leader"}  = undef;
  1146.  
  1147. } # End EVENT_SAY
  1148.  
  1149.  
  1150. sub EVENT_SIGNAL
  1151. {
  1152.     # 1000000000 is to remove player from Guild and Raid Instances (1,000,000,000)
  1153.     my $signal_ID = 0;
  1154.     my $signal_zone_ID = 0;
  1155.     my $signal_instance_ID = 0;
  1156.     if ($signal > 1000000000)
  1157.     {
  1158.         $signal_ID = $signal - 1000000000;              # If remove flag, use signal - 1 million
  1159.     }
  1160.     else
  1161.     {
  1162.         $signal_ID = $signal;                           # else no remove flag, just use signal
  1163.     }
  1164.     $signal_zone_ID = int ($signal_ID / 1000000);       # $ZoneConvert = $zoneid * 1000000;
  1165.     $signal_instance_ID = int ($signal_ID % 1000000);
  1166.  
  1167.     my $Check_G_Invite = $signal_instance_ID . "_GuildI_" . $zonesn . "_" . "$zoneid";
  1168.     my $Check_G_Leader = $signal_instance_ID . "_GuildI_Leader";
  1169.     my $Check_R_Invite = $signal_instance_ID . "_RaidI_" . $zonesn . "_" . "$zoneid";
  1170.     my $Check_R_Leader = $signal_instance_ID . "_RaidI_Leader";
  1171.  
  1172.     # quest::gmsay("GM: signal_ID = $signal_ID / signal_zone_ID = $signal_zone_ID / signal_instance_ID = $signal_instance_ID", 18, 0);
  1173.  
  1174.     #############################################################################################################################
  1175.     # IF GUILD INVITE ###########################################################################################################
  1176.     if (defined($qglobals{"$Check_G_Invite"}))
  1177.     {
  1178.         my $Leader = $qglobals{"$Check_G_Leader"};
  1179.         quest::AssignToInstance($signal_instance_ID);
  1180.  
  1181.         # Create a qglobal list of players invited/assigned to Guild Instance
  1182.         my $count = 1;
  1183.         my $guild_invite_name       = $signal_instance_ID . "_GuildI_Status_";
  1184.         my $guild_invite_pending    = $name . "_pending";
  1185.         my $guild_invite_joined     = $name . "_joined";
  1186.         my $guild_invite_removed    = $name . "_removed";
  1187.         while ($count > 0)
  1188.         {
  1189.             if (defined($qglobals{"$guild_invite_name$count"}))
  1190.             {
  1191.                 if ($qglobals{"$guild_invite_name$count"} eq $guild_invite_pending ||
  1192.                     $qglobals{"$guild_invite_name$count"} eq $guild_invite_joined)
  1193.                 {
  1194.                     if ($signal > 1000000000)
  1195.                     {
  1196.                         my $Cx = $client->GetX();
  1197.                         my $Cy = $client->GetY();
  1198.                         my $Cz = $client->GetZ();
  1199.                         my $Ch = $client->GetHeading();
  1200.                         my $timestamp = localtime(time);
  1201.                         $client->Message(315," ");
  1202.                         $client->Message(315,"You have been removed from $Leader Guild Instance ($signal_instance_ID) in $zonesn!");
  1203.                         quest::popup("YOU HAVE BEEN REMOVED","<br>
  1204.                             <c \"#FE2E2E\">You have been removed from $Leader Guild Instance.<br>
  1205.                             <c \"#FE2E2E\">Moving you to a PUBLIC zone!<br>
  1206.                             <br>
  1207.                             <c \"#FFFF49\">Time : &nbsp;&nbsp;&nbsp;<c \"#00FF00\">$timestamp<br>
  1208.                             <c \"#FFFF49\">Name : &nbsp; <c \"#00FF00\">$name<br>
  1209.                             <c \"#FFFF49\">Zone : &nbsp;&nbsp;&nbsp; <c \"#00FF00\">$zonesn<br>
  1210.                             <c \"#FFFF49\">Type : &nbsp;&nbsp;&nbsp;&nbsp; <c \"#00FF00\">Public<br>
  1211.                             <br>
  1212.                             <c \"#00BFFF\">You have been removed from Guild Instance ($signal_instance_ID) in $zonesn!<br>
  1213.                             <br>
  1214.                             ",1050,0);
  1215.                         my $GetSeconds = GET_TIME_LEFT("GUILD", $signal_instance_ID);
  1216.                         quest::setglobal("$guild_invite_name$count","$guild_invite_removed","7","S$GetSeconds");
  1217.                         $count = 0;
  1218.                         quest::movepc($zoneid, $Cx, $Cy, $Cz, $Ch);
  1219.                     }
  1220.                     else
  1221.                     {
  1222.                         my $GetSeconds = GET_TIME_LEFT("GUILD", $signal_instance_ID);
  1223.                         my $correct_zone = GET_ZONE_NAME_BY_ID($signal_zone_ID);
  1224.                         quest::setglobal("$guild_invite_name$count","$guild_invite_pending","7","S$GetSeconds");
  1225.                         $client->Message(315," ");
  1226.                         $client->Message(315,"$Leader has re-invited you to join a Guild Instance in $correct_zone.");
  1227.                         $client->Message(315,"Type: guild join $Leader (when you are in $correct_zone)");
  1228.                         quest::gmsay("GM: $signal_zone_ID = $correct_zone", 18, 0);
  1229.                     }
  1230.                     $count = 0;
  1231.                 }
  1232.                 elsif ($qglobals{"$guild_invite_name$count"} eq $guild_invite_removed)
  1233.                 {
  1234.                     if ($signal < 1000000000)
  1235.                     {
  1236.                         my $GetSeconds = GET_TIME_LEFT("GUILD", $signal_instance_ID);
  1237.                         my $correct_zone = GET_ZONE_NAME_BY_ID($signal_zone_ID);
  1238.                         quest::setglobal("$guild_invite_name$count","$guild_invite_pending","7","S$GetSeconds");
  1239.                         $client->Message(315," ");
  1240.                         $client->Message(315,"$Leader has re-invited you to join a Guild Instance in $correct_zone.");
  1241.                         $client->Message(315,"Type: guild join $Leader (when you are in $correct_zone)");
  1242.                         quest::gmsay("GM: $signal_zone_ID = $correct_zone", 18, 0);
  1243.                     }
  1244.                     $count = 0;
  1245.                 }
  1246.                 else
  1247.                 {
  1248.                     $count ++;
  1249.                 }
  1250.             }
  1251.             else
  1252.             {
  1253.                 ###############################################################################
  1254.                 my $GetSeconds = GET_TIME_LEFT("GUILD", $signal_instance_ID);
  1255.                 my $correct_zone = GET_ZONE_NAME_BY_ID($signal_zone_ID);
  1256.                 quest::setglobal("$guild_invite_name$count","$guild_invite_pending","7","S$GetSeconds");
  1257.                 $client->Message(315," ");
  1258.                 $client->Message(315,"$Leader has invited you to join a Guild Instance in $correct_zone.");
  1259.                 $client->Message(315,"Type: guild join $Leader (when you are in $correct_zone)");
  1260.                 quest::gmsay("GM: $signal_zone_ID = $correct_zone", 18, 0);
  1261.                 $count = 0;
  1262.             }
  1263.         }
  1264.         $qglobals{"$Check_G_Invite"} = undef;
  1265.         $qglobals{"$Check_G_Leader"} = undef;
  1266.     }
  1267.     # END IF GUILD INVITE #######################################################################################################
  1268.     #############################################################################################################################
  1269.  
  1270.  
  1271.     #############################################################################################################################
  1272.     # IF RAID INVITE ############################################################################################################
  1273.     if (defined($qglobals{"$Check_R_Invite"}))
  1274.     {
  1275.         my $Leader = $qglobals{"$Check_R_Leader"};
  1276.         quest::AssignToInstance($signal_instance_ID);
  1277.  
  1278.         # Create a qglobal list of players invited/assigned to Raid Instance
  1279.         my $count = 1;
  1280.         my $raid_invite_name        = $signal_instance_ID . "_RaidI_Status_";
  1281.         my $raid_invite_pending     = $name . "_pending";
  1282.         my $raid_invite_joined      = $name . "_joined";
  1283.         my $raid_invite_removed     = $name . "_removed";
  1284.         while ($count > 0)
  1285.         {
  1286.             if (defined($qglobals{"$raid_invite_name$count"}))
  1287.             {
  1288.                 if ($qglobals{"$raid_invite_name$count"} eq $raid_invite_pending ||
  1289.                     $qglobals{"$raid_invite_name$count"} eq $raid_invite_joined)
  1290.                 {
  1291.                     if ($signal > 1000000000)
  1292.                     {
  1293.                         my $Cx = $client->GetX();
  1294.                         my $Cy = $client->GetY();
  1295.                         my $Cz = $client->GetZ();
  1296.                         my $Ch = $client->GetHeading();
  1297.                         my $timestamp = localtime(time);
  1298.                         $client->Message(315," ");
  1299.                         $client->Message(315,"You have been removed from $Leader Raid Instance ($signal_instance_ID) in $zonesn!");
  1300.                         quest::popup("YOU HAVE BEEN REMOVED","<br>
  1301.                             <c \"#FE2E2E\">You have been removed from $Leader Raid Instance.<br>
  1302.                             <c \"#FE2E2E\">Moving you to a PUBLIC zone!<br>
  1303.                             <br>
  1304.                             <c \"#FFFF49\">Time : &nbsp;&nbsp;&nbsp;<c \"#00FF00\">$timestamp<br>
  1305.                             <c \"#FFFF49\">Name : &nbsp; <c \"#00FF00\">$name<br>
  1306.                             <c \"#FFFF49\">Zone : &nbsp;&nbsp;&nbsp; <c \"#00FF00\">$zonesn<br>
  1307.                             <c \"#FFFF49\">Type : &nbsp;&nbsp;&nbsp;&nbsp; <c \"#00FF00\">Public<br>
  1308.                             <br>
  1309.                             <c \"#00BFFF\">You have been removed from Raid Instance ($signal_instance_ID) in $zonesn!<br>
  1310.                             <br>
  1311.                             ",1050,0);
  1312.                         my $GetSeconds = GET_TIME_LEFT("RAID", $signal_instance_ID);
  1313.                         quest::setglobal("$raid_invite_name$count","$raid_invite_removed","7","S$GetSeconds");
  1314.                         $count = 0;
  1315.                         quest::movepc($zoneid, $Cx, $Cy, $Cz, $Ch);
  1316.                     }
  1317.                     else
  1318.                     {
  1319.                         my $GetSeconds = GET_TIME_LEFT("RAID", $signal_instance_ID);
  1320.                         my $correct_zone = GET_ZONE_NAME_BY_ID($signal_zone_ID);
  1321.                         quest::setglobal("$raid_invite_name$count","$raid_invite_pending","7","S$GetSeconds");
  1322.                         $client->Message(315," ");
  1323.                         $client->Message(315,"$Leader has re-invited you to join a Raid Instance in $zonesn.");
  1324.                         $client->Message(315,"Type: raid join $Leader (when you are in $correct_zone)");
  1325.                         quest::gmsay("GM: $signal_zone_ID = $correct_zone", 18, 0);
  1326.                     }
  1327.                     $count = 0;
  1328.                 }
  1329.                 elsif ($qglobals{"$raid_invite_name$count"} eq $raid_invite_removed)
  1330.                 {
  1331.                     if ($signal < 1000000000)
  1332.                     {
  1333.                         my $GetSeconds = GET_TIME_LEFT("RAID", $signal_instance_ID);
  1334.                         my $correct_zone = GET_ZONE_NAME_BY_ID($signal_zone_ID);
  1335.                         quest::setglobal("$raid_invite_name$count","$raid_invite_pending","7","S$GetSeconds");
  1336.                         $client->Message(315," ");
  1337.                         $client->Message(315,"$Leader has re-invited you to join a Raid Instance in $zonesn.");
  1338.                         $client->Message(315,"Type: raid join $Leader (when you are in $correct_zone)");
  1339.                         quest::gmsay("GM: $signal_zone_ID = $correct_zone", 18, 0);
  1340.                     }
  1341.                     $count = 0;
  1342.                 }
  1343.                 else
  1344.                 {
  1345.                     $count ++;
  1346.                 }
  1347.             }
  1348.             else
  1349.             {
  1350.                 ###############################################################################
  1351.                 my $GetSeconds = GET_TIME_LEFT("RAID", $signal_instance_ID);
  1352.                 my $correct_zone = GET_ZONE_NAME_BY_ID($signal_zone_ID);
  1353.                 quest::setglobal("$raid_invite_name$count","$raid_invite_pending","7","S$GetSeconds");
  1354.                 $client->Message(315," ");
  1355.                 $client->Message(315,"$Leader has invited you to join a Raid Instance in $zonesn.");
  1356.                 $client->Message(315,"Type: raid join $Leader (when you are in $correct_zone)");
  1357.                 quest::gmsay("GM: $signal_zone_ID = $correct_zone", 18, 0);
  1358.                 $count = 0;
  1359.             }
  1360.         }
  1361.         $qglobals{"$Check_R_Invite"} = undef;
  1362.         $qglobals{"$Check_R_Leader"} = undef;
  1363.     }
  1364.     # END IF RAID INVITE ########################################################################################################
  1365.     #############################################################################################################################
  1366.  
  1367. } # End EVENT_SIGNAL
  1368.  
  1369.  
  1370. #################################################################################################################################
  1371. ####   CUSTOM SUBS   ############################################################################################################
  1372. #################################################################################################################################
  1373.  
  1374.  
  1375. ### Usage: PayInstance("Creditname", Cost, "Solo/Guild/Raid");
  1376. ### This will take into account the whole account of the player
  1377. sub PayInstance
  1378. {
  1379.     my $CreditName = $_[0];
  1380.     my $Cost = $_[1];
  1381.     my $Instance_Type = $_[2]; # Solo, Guild, or Raid
  1382.     my $client = plugin::val('$client');
  1383.     my $name = plugin::val('$name');
  1384.     my $zonesn = plugin::val('$zonesn');
  1385.     my $qglobals = plugin::var('qglobals');
  1386.     my $space = "_";
  1387.     my $accountid = $client->AccountID();
  1388.     my $accountname = $client->AccountName();
  1389.     # my $CreditAmnt = $qglobals{"$CreditName$space$accountid"};
  1390.     my $CreditAmnt = $qglobals->{"$CreditName$space$accountid"};
  1391.     my $CreditAmnt2 = commify2($CreditAmnt - $Cost);
  1392.     my $CostCommify = commify2($Cost);
  1393.     if ($CreditAmnt < $Cost)
  1394.     {
  1395.         $client->Message(315,"Insuffient funds... You need " . ($Cost - $CreditAmnt) . " more Platinum pieces.");
  1396.     }
  1397.     else
  1398.     {
  1399.         $CreditAmnt -= $Cost;
  1400.         $client->SetGlobal("$CreditName$space$accountid", "$CreditAmnt", 7, 'F');
  1401.         $client->Message(315," ");
  1402.         $client->Message(315,"You now have $CreditAmnt2 platinum left.");
  1403.         my $ClientCheck = PlayerClientCheck();
  1404.         my $timestamp = localtime(time);
  1405.         quest::popup("Account Balance","
  1406.             <c \"#FFFF66\">Time : </c> $timestamp </c> <br>
  1407.             <c \"#FFFF66\">Client : </c> $ClientCheck </c> <br>
  1408.             <c \"#FFFF66\">Account : </c> $accountname <br>
  1409.             <c \"#FFFF66\">Character : </c>$name <br>
  1410.             <c \"#FFFF66\">Zone Name : </c>$zonesn <br>
  1411.             <c \"#FFFF66\">Instance Type : </c>$Instance_Type <br>
  1412.             <c \"#FFFF66\">Cost from Account : </c>  <c \"#FE2E2E</c> - $CostCommify </c> <br>
  1413.             <c \"#FFFF66\">Remaining Balance : </c> <c \"#33FF99\"> $CreditAmnt2 </c> <br>
  1414.             <br>
  1415.             <c \"#FE2E2E\">WARNING:  </c> Like other <c \"#FFFF66\">Qglobals</c>, sometimes the zone will bug out
  1416.             and not see the current values. If your balance or instance has disappeared, try going to a public zone
  1417.             or different zone to see if it gets refresh.
  1418.             We apologize for the inconvenience as it will reappear in time.
  1419.             ");
  1420.     }
  1421.     $qglobals{"$CreditName$space$accountid"} = undef;
  1422. } # End PayInstance
  1423.  
  1424.  
  1425. ### POP UP TO DISPLAY WAYPOINT BALANCE
  1426. sub Check_Balance
  1427. {
  1428.     my $CreditName = $_[0];
  1429.     my $client = plugin::val('$client');
  1430.     my $name = plugin::val('$name');
  1431.     my $zonesn = plugin::val('$zonesn');
  1432.     my $qglobals = plugin::var('qglobals');
  1433.     my $space = "_";
  1434.     my $accountid = $client->AccountID();
  1435.     my $accountname = $client->AccountName();
  1436.     # my $CreditAmnt = $qglobals{"$CreditName$space$accountid"};
  1437.     my $CreditAmnt = $qglobals->{"$CreditName$space$accountid"};
  1438.     my $CreditAmnt2 = commify2($CreditAmnt);
  1439.     # my $CreditAmnt2 = $CreditAmnt - $Cost;
  1440.     my $ClientCheck = PlayerClientCheck();
  1441.     my $timestamp = localtime(time);
  1442.     quest::popup("Account Balance","
  1443.             <c \"#FFFF66\">Time : </c> $timestamp </c> <br>
  1444.             <c \"#FFFF66\">Client : </c> $ClientCheck </c> <br>
  1445.             <c \"#FFFF66\">Account : </c> $accountname <br>
  1446.             <c \"#FFFF66\">Character : </c>$name <br>
  1447.             <c \"#FFFF66\">Zone Name : </c>$zonesn <br>
  1448.             <c \"#FFFF66\">Remaining Balance : </c> <c \"#33FF99\"> $CreditAmnt2 </c> <br>
  1449.             <br>
  1450.             <c \"#FE2E2E\">WARNING:  </c> Like other <c \"#FFFF66\">Qglobals</c> , sometimes the zone will bug out
  1451.             and not see the current values. If your balance or instance has disappeared, try going to a public zone
  1452.             or different zone to see if it gets refresh.
  1453.             We apologize for the inconvenience as it will reappear in time.
  1454.             ");
  1455.     $client->Message(315," ");
  1456.     $client->Message(315,"You now have $CreditAmnt2 platinum left.");
  1457.     $qglobals{"$CreditName$space$accountid"} = undef;
  1458. } # End Check_Balance
  1459.  
  1460.  
  1461. ### Check Expansion Name
  1462. sub PlayerClientCheck
  1463. {
  1464.     my $client = plugin::val('$client');
  1465.     my $clientver = $client->GetClientVersion();
  1466.     my $ShowClient = "";
  1467.     if      ($clientver == 2)   { $ShowClient = "Titanium"; }
  1468.     elsif   ($clientver == 3)   { $ShowClient = "Secrets of Faydwer"; }
  1469.     elsif   ($clientver == 4)   { $ShowClient = "Seeds of Destruction"; }
  1470.     elsif   ($clientver == 5)   { $ShowClient = "Underfoot"; }
  1471.     else                        { $ShowClient = "Other"; }
  1472.     return "$ShowClient";
  1473. }
  1474.  
  1475.  
  1476. ### Change 1000000 to 1,000,000
  1477. sub commify2
  1478. {
  1479.    local $_  = shift;
  1480.    s{(?<!\d|\.)(\d{4,})}
  1481.     {my $n = $1;
  1482.      $n=~s/(?<=.)(?=(?:.{3})+$)/,/g;
  1483.      $n;
  1484.     }eg;
  1485.    return $_;
  1486. }
  1487.  
  1488.  
  1489. sub SOLO_PRICE
  1490. {
  1491.     my $client = plugin::val('$client');
  1492.     my $freeinstance = plugin::check_hasitem($client, 120003);  #EDIT item ID for FREE instance item
  1493.     my $paidinstance = plugin::check_hasitem($client, 119998);  #EDIT item ID for PAID instance item
  1494.     my $new_price = 5000;
  1495.  
  1496.     if      ($freeinstance) { $new_price = 0; }
  1497.     elsif   ($paidinstance) {
  1498.                                 # $new_price = 1000;
  1499.                                 if ($zonesn eq "trakanon" ||
  1500.                                     $zonesn eq "permafrost" ||
  1501.                                     $zonesn eq "dalnir" ||
  1502.                                     $zonesn eq "velketor" ||
  1503.                                     $zonesn eq "eastkarana" ||
  1504.                                     $zonesn eq "highpasshold" ||
  1505.                                     $zonesn eq "highpass" ||
  1506.                                     $zonesn eq "unrest" ||
  1507.                                     $zonesn eq "crushbone" ||
  1508.                                     $zonesn eq "sebilis" ||
  1509.                                     $zonesn eq "lakerathe" ||
  1510.                                     $zonesn eq "soldungb" ||
  1511.                                     $zonesn eq "citymist" ||
  1512.                                     $zonesn eq "qeytoqrg" ||
  1513.                                     $zonesn eq "mistmoore" ||
  1514.                                     $zonesn eq "steamfont" ||
  1515.                                     $zonesn eq "gukbottom" ||
  1516.                                     $zonesn eq "oot" ||
  1517.                                     $zonesn eq "najena" ||
  1518.                                     $zonesn eq "befallen")
  1519.                                                                 { $new_price  = 25000; }
  1520.                                 if ($zonesn eq "postorms")      { $new_price  = 75000; }
  1521.                                 if ($zonesn eq "hohonora")      { $new_price  = 125000; }
  1522.                                 if ($zonesn eq "illsalin")      { $new_price  = 175000; }
  1523.                                 if ($zonesn eq "anguish")       { $new_price  = 275000; }
  1524.                                 if ($zonesn eq "lopingplains")  { $new_price  = 425000; }
  1525.                                 if ($zonesn eq "frozenshadow")  { $new_price  = 6000000; }
  1526.                             }
  1527.     else                    { $new_price = 50000000; } # 50 Million Plat for not having a 1 Million Plat Waypoint Clickie
  1528.  
  1529.     return $new_price;
  1530. }
  1531.  
  1532.  
  1533. sub GUILD_PRICE
  1534. {
  1535.     my $freeinstance = plugin::check_hasitem($client, 120003);  #EDIT item ID for FREE instance item
  1536.     my $paidinstance = plugin::check_hasitem($client, 119998);  #EDIT item ID for PAID instance item
  1537.     my $new_price = 20000;
  1538.  
  1539.     if      ($freeinstance) { $new_price = 0; }
  1540.     elsif   ($paidinstance) {
  1541.                                 # $new_price = 3000;
  1542.                                 if ($zonesn eq "trakanon" ||
  1543.                                     $zonesn eq "permafrost" ||
  1544.                                     $zonesn eq "dalnir" ||
  1545.                                     $zonesn eq "velketor" ||
  1546.                                     $zonesn eq "eastkarana" ||
  1547.                                     $zonesn eq "highpasshold" ||
  1548.                                     $zonesn eq "highpass" ||
  1549.                                     $zonesn eq "unrest" ||
  1550.                                     $zonesn eq "crushbone" ||
  1551.                                     $zonesn eq "sebilis" ||
  1552.                                     $zonesn eq "lakerathe" ||
  1553.                                     $zonesn eq "soldungb" ||
  1554.                                     $zonesn eq "citymist" ||
  1555.                                     $zonesn eq "qeytoqrg" ||
  1556.                                     $zonesn eq "mistmoore" ||
  1557.                                     $zonesn eq "steamfont" ||
  1558.                                     $zonesn eq "gukbottom" ||
  1559.                                     $zonesn eq "oot" ||
  1560.                                     $zonesn eq "najena" ||
  1561.                                     $zonesn eq "befallen")
  1562.                                                                 { $new_price  = 25000; }
  1563.                                 if ($zonesn eq "postorms")      { $new_price  = 100000; }
  1564.                                 if ($zonesn eq "hohonora")      { $new_price  = 150000; }
  1565.                                 if ($zonesn eq "illsalin")      { $new_price  = 250000; }
  1566.                                 if ($zonesn eq "anguish")       { $new_price  = 350000; }
  1567.                                 if ($zonesn eq "lopingplains")  { $new_price  = 500000; }
  1568.                                 if ($zonesn eq "frozenshadow")  { $new_price  = 9000000; }
  1569.                             }
  1570.     else                    { $new_price = 50000000; } # 50 Million Plat for not having a 1 Million Plat Waypoint Clickie
  1571.  
  1572.     return $new_price;
  1573. }
  1574.  
  1575.  
  1576. sub RAID_PRICE
  1577. {
  1578.     my $freeinstance = plugin::check_hasitem($client, 120003);  #EDIT item ID for FREE instance item
  1579.     my $paidinstance = plugin::check_hasitem($client, 119998);  #EDIT item ID for PAID instance item
  1580.     my $new_price = 20000;
  1581.  
  1582.     if      ($freeinstance) { $new_price = 0; }
  1583.     elsif   ($paidinstance) {
  1584.                                 # $new_price = 5000;
  1585.                                 if ($zonesn eq "trakanon" ||
  1586.                                     $zonesn eq "permafrost" ||
  1587.                                     $zonesn eq "dalnir" ||
  1588.                                     $zonesn eq "velketor" ||
  1589.                                     $zonesn eq "eastkarana" ||
  1590.                                     $zonesn eq "highpasshold" ||
  1591.                                     $zonesn eq "highpass" ||
  1592.                                     $zonesn eq "unrest" ||
  1593.                                     $zonesn eq "crushbone" ||
  1594.                                     $zonesn eq "sebilis" ||
  1595.                                     $zonesn eq "lakerathe" ||
  1596.                                     $zonesn eq "soldungb" ||
  1597.                                     $zonesn eq "citymist" ||
  1598.                                     $zonesn eq "qeytoqrg" ||
  1599.                                     $zonesn eq "mistmoore" ||
  1600.                                     $zonesn eq "steamfont" ||
  1601.                                     $zonesn eq "gukbottom" ||
  1602.                                     $zonesn eq "oot" ||
  1603.                                     $zonesn eq "najena" ||
  1604.                                     $zonesn eq "befallen")
  1605.                                                                 { $new_price  = 25000; }
  1606.                                 if ($zonesn eq "postorms")      { $new_price  = 100000; }
  1607.                                 if ($zonesn eq "hohonora")      { $new_price  = 150000; }
  1608.                                 if ($zonesn eq "illsalin")      { $new_price  = 250000; }
  1609.                                 if ($zonesn eq "anguish")       { $new_price  = 350000; }
  1610.                                 if ($zonesn eq "lopingplains")  { $new_price  = 500000; }
  1611.                                 if ($zonesn eq "frozenshadow")  { $new_price  = 9000000; }
  1612.                             }
  1613.     else                    { $new_price = 50000000; } # 50 Million Plat for not having a 1 Million Plat Waypoint Clickie
  1614.  
  1615.     return $new_price;
  1616. }
  1617.  
  1618.  
  1619. ### Gets the amount of time left for the instance so we can sync/set qglobal expire times
  1620. ### for invited player (on list) qglobal and leader created instance qglobal to expire at same time
  1621. sub GET_TIME_LEFT
  1622. {
  1623.     my $instance_type   = $_[0]; # GUILD / RAID
  1624.     my $InstID          = $_[1]; # ID OF INSTANCE
  1625.     my $TimeName        = "";
  1626.     my $qglobals        = plugin::var('qglobals');
  1627.     my $LeaderTime      = "";
  1628.     my $ExpireTime      = 0;
  1629.     my $TimeLeft        = 0;
  1630.  
  1631.     if ($instance_type eq "RAID")   { $TimeName = "_RaidI_Time"; }
  1632.     if ($instance_type eq "GUILD")  { $TimeName = "_GuildI_Time"; }
  1633.     $LeaderTime = $InstID . $TimeName;
  1634.     if (defined($qglobals{"$LeaderTime"}))
  1635.     {
  1636.         $ExpireTime = $qglobals{"$LeaderTime"};
  1637.         $TimeLeft = $ExpireTime - time();
  1638.     }
  1639.  
  1640.     return $TimeLeft
  1641. }
  1642.  
  1643.  
  1644. sub GET_ZONE_NAME_BY_ID
  1645. {
  1646.     if ($_[0] == 0) { return("Invalid Zone"); }
  1647.     elsif ($_[0] == 1) { return("qeynos"); }
  1648.     elsif ($_[0] == 2) { return("qeynos2"); }
  1649.     elsif ($_[0] == 3) { return("qrg"); }
  1650.     elsif ($_[0] == 4) { return("qeytoqrg"); }
  1651.     elsif ($_[0] == 5) { return("highpass"); }
  1652.     elsif ($_[0] == 6) { return("highkeep"); }
  1653.     elsif ($_[0] == 8) { return("freportn"); }
  1654.     elsif ($_[0] == 9) { return("freportw"); }
  1655.     elsif ($_[0] == 10) { return("freporte"); }
  1656.     elsif ($_[0] == 11) { return("runnyeye"); }
  1657.     elsif ($_[0] == 12) { return("qey2hh1"); }
  1658.     elsif ($_[0] == 13) { return("northkarana"); }
  1659.     elsif ($_[0] == 14) { return("southkarana"); }
  1660.     elsif ($_[0] == 15) { return("eastkarana"); }
  1661.     elsif ($_[0] == 16) { return("beholder"); }
  1662.     elsif ($_[0] == 17) { return("blackburrow"); }
  1663.     elsif ($_[0] == 18) { return("paw"); }
  1664.     elsif ($_[0] == 19) { return("rivervale"); }
  1665.     elsif ($_[0] == 20) { return("kithicor"); }
  1666.     elsif ($_[0] == 21) { return("commons"); }
  1667.     elsif ($_[0] == 22) { return("ecommons"); }
  1668.     elsif ($_[0] == 23) { return("erudnint"); }
  1669.     elsif ($_[0] == 24) { return("erudnext"); }
  1670.     elsif ($_[0] == 25) { return("nektulos"); }
  1671.     elsif ($_[0] == 25) { return("nektulos"); }
  1672.     elsif ($_[0] == 26) { return("cshome"); }
  1673.     elsif ($_[0] == 27) { return("lavastorm"); }
  1674.     elsif ($_[0] == 28) { return("nektropos"); }
  1675.     elsif ($_[0] == 29) { return("halas"); }
  1676.     elsif ($_[0] == 30) { return("everfrost"); }
  1677.     elsif ($_[0] == 31) { return("soldunga"); }
  1678.     elsif ($_[0] == 32) { return("soldungb"); }
  1679.     elsif ($_[0] == 33) { return("misty"); }
  1680.     elsif ($_[0] == 34) { return("nro"); }
  1681.     elsif ($_[0] == 35) { return("sro"); }
  1682.     elsif ($_[0] == 36) { return("befallen"); }
  1683.     elsif ($_[0] == 37) { return("oasis"); }
  1684.     elsif ($_[0] == 38) { return("tox"); }
  1685.     elsif ($_[0] == 39) { return("hole"); }
  1686.     elsif ($_[0] == 40) { return("neriaka"); }
  1687.     elsif ($_[0] == 41) { return("neriakb"); }
  1688.     elsif ($_[0] == 42) { return("neriakc"); }
  1689.     elsif ($_[0] == 43) { return("neriakd"); }
  1690.     elsif ($_[0] == 44) { return("najena"); }
  1691.     elsif ($_[0] == 45) { return("qcat"); }
  1692.     elsif ($_[0] == 46) { return("innothule"); }
  1693.     elsif ($_[0] == 47) { return("feerrott"); }
  1694.     elsif ($_[0] == 48) { return("cazicthule"); }
  1695.     elsif ($_[0] == 49) { return("oggok"); }
  1696.     elsif ($_[0] == 50) { return("rathemtn"); }
  1697.     elsif ($_[0] == 51) { return("lakerathe"); }
  1698.     elsif ($_[0] == 52) { return("grobb"); }
  1699.     elsif ($_[0] == 53) { return("aviak"); }
  1700.     elsif ($_[0] == 54) { return("gfaydark"); }
  1701.     elsif ($_[0] == 55) { return("akanon"); }
  1702.     elsif ($_[0] == 56) { return("steamfont"); }
  1703.     elsif ($_[0] == 57) { return("lfaydark"); }
  1704.     elsif ($_[0] == 58) { return("crushbone"); }
  1705.     elsif ($_[0] == 59) { return("mistmoore"); }
  1706.     elsif ($_[0] == 60) { return("kaladima"); }
  1707.     elsif ($_[0] == 61) { return("felwithea"); }
  1708.     elsif ($_[0] == 62) { return("felwitheb"); }
  1709.     elsif ($_[0] == 63) { return("unrest"); }
  1710.     elsif ($_[0] == 64) { return("kedge"); }
  1711.     elsif ($_[0] == 65) { return("guktop"); }
  1712.     elsif ($_[0] == 66) { return("gukbottom"); }
  1713.     elsif ($_[0] == 67) { return("kaladimb"); }
  1714.     elsif ($_[0] == 68) { return("butcher"); }
  1715.     elsif ($_[0] == 69) { return("oot"); }
  1716.     elsif ($_[0] == 70) { return("cauldron"); }
  1717.     elsif ($_[0] == 71) { return("airplane"); }
  1718.     elsif ($_[0] == 72) { return("fearplane"); }
  1719.     elsif ($_[0] == 73) { return("permafrost"); }
  1720.     elsif ($_[0] == 74) { return("kerraridge"); }
  1721.     elsif ($_[0] == 75) { return("paineel"); }
  1722.     elsif ($_[0] == 76) { return("hateplane"); }
  1723.     elsif ($_[0] == 77) { return("arena"); }
  1724.     elsif ($_[0] == 78) { return("fieldofbone"); }
  1725.     elsif ($_[0] == 79) { return("warslikswood"); }
  1726.     elsif ($_[0] == 80) { return("soltemple"); }
  1727.     elsif ($_[0] == 81) { return("droga"); }
  1728.     elsif ($_[0] == 82) { return("cabwest"); }
  1729.     elsif ($_[0] == 83) { return("swampofnohope"); }
  1730.     elsif ($_[0] == 84) { return("firiona"); }
  1731.     elsif ($_[0] == 85) { return("lakeofillomen"); }
  1732.     elsif ($_[0] == 86) { return("dreadlands"); }
  1733.     elsif ($_[0] == 87) { return("burningwood"); }
  1734.     elsif ($_[0] == 88) { return("kaesora"); }
  1735.     elsif ($_[0] == 89) { return("sebilis"); }
  1736.     elsif ($_[0] == 90) { return("citymist"); }
  1737.     elsif ($_[0] == 91) { return("skyfire"); }
  1738.     elsif ($_[0] == 92) { return("frontiermtns"); }
  1739.     elsif ($_[0] == 93) { return("overthere"); }
  1740.     elsif ($_[0] == 94) { return("emeraldjungle"); }
  1741.     elsif ($_[0] == 95) { return("trakanon"); }
  1742.     elsif ($_[0] == 96) { return("timorous"); }
  1743.     elsif ($_[0] == 97) { return("kurn"); }
  1744.     elsif ($_[0] == 98) { return("erudsxing"); }
  1745.     elsif ($_[0] == 100) { return("stonebrunt"); }
  1746.     elsif ($_[0] == 101) { return("warrens"); }
  1747.     elsif ($_[0] == 102) { return("karnor"); }
  1748.     elsif ($_[0] == 103) { return("chardok"); }
  1749.     elsif ($_[0] == 104) { return("dalnir"); }
  1750.     elsif ($_[0] == 105) { return("charasis"); }
  1751.     elsif ($_[0] == 106) { return("cabeast"); }
  1752.     elsif ($_[0] == 107) { return("nurga"); }
  1753.     elsif ($_[0] == 108) { return("veeshan"); }
  1754.     elsif ($_[0] == 109) { return("veksar"); }
  1755.     elsif ($_[0] == 110) { return("iceclad"); }
  1756.     elsif ($_[0] == 111) { return("frozenshadow"); }
  1757.     elsif ($_[0] == 112) { return("velketor"); }
  1758.     elsif ($_[0] == 113) { return("kael"); }
  1759.     elsif ($_[0] == 114) { return("skyshrine"); }
  1760.     elsif ($_[0] == 114) { return("skyshrine"); }
  1761.     elsif ($_[0] == 115) { return("thurgadina"); }
  1762.     elsif ($_[0] == 116) { return("eastwastes"); }
  1763.     elsif ($_[0] == 117) { return("cobaltscar"); }
  1764.     elsif ($_[0] == 118) { return("greatdivide"); }
  1765.     elsif ($_[0] == 119) { return("wakening"); }
  1766.     elsif ($_[0] == 120) { return("westwastes"); }
  1767.     elsif ($_[0] == 121) { return("crystal"); }
  1768.     elsif ($_[0] == 123) { return("necropolis"); }
  1769.     elsif ($_[0] == 124) { return("templeveeshan"); }
  1770.     elsif ($_[0] == 125) { return("sirens"); }
  1771.     elsif ($_[0] == 126) { return("mischiefplane"); }
  1772.     elsif ($_[0] == 127) { return("growthplane"); }
  1773.     elsif ($_[0] == 128) { return("sleeper"); }
  1774.     elsif ($_[0] == 129) { return("thurgadinb"); }
  1775.     elsif ($_[0] == 130) { return("erudsxing2"); }
  1776.     elsif ($_[0] == 150) { return("shadowhaven"); }
  1777.     elsif ($_[0] == 151) { return("bazaar"); }
  1778.     elsif ($_[0] == 151) { return("bazaar"); }
  1779.     elsif ($_[0] == 152) { return("nexus"); }
  1780.     elsif ($_[0] == 153) { return("echo"); }
  1781.     elsif ($_[0] == 154) { return("acrylia"); }
  1782.     elsif ($_[0] == 155) { return("sharvahl"); }
  1783.     elsif ($_[0] == 156) { return("paludal"); }
  1784.     elsif ($_[0] == 157) { return("fungusgrove"); }
  1785.     elsif ($_[0] == 158) { return("vexthal"); }
  1786.     elsif ($_[0] == 159) { return("sseru"); }
  1787.     elsif ($_[0] == 160) { return("katta"); }
  1788.     elsif ($_[0] == 161) { return("netherbian"); }
  1789.     elsif ($_[0] == 162) { return("ssratemple"); }
  1790.     elsif ($_[0] == 163) { return("griegsend"); }
  1791.     elsif ($_[0] == 164) { return("thedeep"); }
  1792.     elsif ($_[0] == 165) { return("shadeweaver"); }
  1793.     elsif ($_[0] == 166) { return("hollowshade"); }
  1794.     elsif ($_[0] == 167) { return("grimling"); }
  1795.     elsif ($_[0] == 168) { return("mseru"); }
  1796.     elsif ($_[0] == 169) { return("letalis"); }
  1797.     elsif ($_[0] == 170) { return("twilight"); }
  1798.     elsif ($_[0] == 171) { return("thegrey"); }
  1799.     elsif ($_[0] == 172) { return("tenebrous"); }
  1800.     elsif ($_[0] == 173) { return("maiden"); }
  1801.     elsif ($_[0] == 174) { return("dawnshroud"); }
  1802.     elsif ($_[0] == 175) { return("scarlet"); }
  1803.     elsif ($_[0] == 176) { return("umbral"); }
  1804.     elsif ($_[0] == 179) { return("akheva"); }
  1805.     elsif ($_[0] == 180) { return("arena2"); }
  1806.     elsif ($_[0] == 181) { return("jaggedpine"); }
  1807.     elsif ($_[0] == 182) { return("nedaria"); }
  1808.     elsif ($_[0] == 183) { return("tutorial"); }
  1809.     elsif ($_[0] == 184) { return("load"); }
  1810.     elsif ($_[0] == 185) { return("load2"); }
  1811.     elsif ($_[0] == 186) { return("hateplaneb"); }
  1812.     elsif ($_[0] == 187) { return("shadowrest"); }
  1813.     elsif ($_[0] == 188) { return("tutoriala"); }
  1814.     elsif ($_[0] == 189) { return("tutorialb"); }
  1815.     elsif ($_[0] == 190) { return("clz"); }
  1816.     elsif ($_[0] == 200) { return("codecay"); }
  1817.     elsif ($_[0] == 201) { return("pojustice"); }
  1818.     elsif ($_[0] == 202) { return("poknowledge"); }
  1819.     elsif ($_[0] == 203) { return("potranquility"); }
  1820.     elsif ($_[0] == 204) { return("ponightmare"); }
  1821.     elsif ($_[0] == 205) { return("podisease"); }
  1822.     elsif ($_[0] == 206) { return("poinnovation"); }
  1823.     elsif ($_[0] == 207) { return("potorment"); }
  1824.     elsif ($_[0] == 208) { return("povalor"); }
  1825.     elsif ($_[0] == 209) { return("bothunder"); }
  1826.     elsif ($_[0] == 210) { return("postorms"); }
  1827.     elsif ($_[0] == 211) { return("hohonora"); }
  1828.     elsif ($_[0] == 212) { return("solrotower"); }
  1829.     elsif ($_[0] == 213) { return("powar"); }
  1830.     elsif ($_[0] == 214) { return("potactics"); }
  1831.     elsif ($_[0] == 215) { return("poair"); }
  1832.     elsif ($_[0] == 216) { return("powater"); }
  1833.     elsif ($_[0] == 217) { return("pofire"); }
  1834.     elsif ($_[0] == 218) { return("poeartha"); }
  1835.     elsif ($_[0] == 219) { return("potimea"); }
  1836.     elsif ($_[0] == 220) { return("hohonorb"); }
  1837.     elsif ($_[0] == 221) { return("nightmareb"); }
  1838.     elsif ($_[0] == 222) { return("poearthb"); }
  1839.     elsif ($_[0] == 223) { return("potimeb"); }
  1840.     elsif ($_[0] == 224) { return("gunthak"); }
  1841.     elsif ($_[0] == 225) { return("dulak"); }
  1842.     elsif ($_[0] == 226) { return("torgiran"); }
  1843.     elsif ($_[0] == 227) { return("nadox"); }
  1844.     elsif ($_[0] == 228) { return("hatesfury"); }
  1845.     elsif ($_[0] == 229) { return("guka"); }
  1846.     elsif ($_[0] == 230) { return("ruja"); }
  1847.     elsif ($_[0] == 231) { return("taka"); }
  1848.     elsif ($_[0] == 232) { return("mira"); }
  1849.     elsif ($_[0] == 233) { return("mmca"); }
  1850.     elsif ($_[0] == 234) { return("gukb"); }
  1851.     elsif ($_[0] == 235) { return("rujb"); }
  1852.     elsif ($_[0] == 236) { return("takb"); }
  1853.     elsif ($_[0] == 237) { return("mirb"); }
  1854.     elsif ($_[0] == 238) { return("mmcb"); }
  1855.     elsif ($_[0] == 239) { return("gukc"); }
  1856.     elsif ($_[0] == 240) { return("rujc"); }
  1857.     elsif ($_[0] == 241) { return("takc"); }
  1858.     elsif ($_[0] == 242) { return("mirc"); }
  1859.     elsif ($_[0] == 243) { return("mmcc"); }
  1860.     elsif ($_[0] == 244) { return("gukd"); }
  1861.     elsif ($_[0] == 245) { return("rujd"); }
  1862.     elsif ($_[0] == 246) { return("takd"); }
  1863.     elsif ($_[0] == 247) { return("mird"); }
  1864.     elsif ($_[0] == 248) { return("mmcd"); }
  1865.     elsif ($_[0] == 249) { return("guke"); }
  1866.     elsif ($_[0] == 250) { return("ruje"); }
  1867.     elsif ($_[0] == 251) { return("take"); }
  1868.     elsif ($_[0] == 252) { return("mire"); }
  1869.     elsif ($_[0] == 253) { return("mmce"); }
  1870.     elsif ($_[0] == 254) { return("gukf"); }
  1871.     elsif ($_[0] == 255) { return("rujf"); }
  1872.     elsif ($_[0] == 256) { return("takf"); }
  1873.     elsif ($_[0] == 257) { return("mirf"); }
  1874.     elsif ($_[0] == 258) { return("mmcf"); }
  1875.     elsif ($_[0] == 259) { return("gukg"); }
  1876.     elsif ($_[0] == 260) { return("rujg"); }
  1877.     elsif ($_[0] == 261) { return("takg"); }
  1878.     elsif ($_[0] == 262) { return("mirg"); }
  1879.     elsif ($_[0] == 263) { return("mmcg"); }
  1880.     elsif ($_[0] == 264) { return("gukh"); }
  1881.     elsif ($_[0] == 265) { return("rujh"); }
  1882.     elsif ($_[0] == 266) { return("takh"); }
  1883.     elsif ($_[0] == 267) { return("mirh"); }
  1884.     elsif ($_[0] == 268) { return("mmch"); }
  1885.     elsif ($_[0] == 269) { return("ruji"); }
  1886.     elsif ($_[0] == 270) { return("taki"); }
  1887.     elsif ($_[0] == 271) { return("miri"); }
  1888.     elsif ($_[0] == 272) { return("mmci"); }
  1889.     elsif ($_[0] == 273) { return("rujj"); }
  1890.     elsif ($_[0] == 274) { return("takj"); }
  1891.     elsif ($_[0] == 275) { return("mirj"); }
  1892.     elsif ($_[0] == 276) { return("mmcj"); }
  1893.     elsif ($_[0] == 277) { return("chardokb"); }
  1894.     elsif ($_[0] == 278) { return("soldungc"); }
  1895.     elsif ($_[0] == 279) { return("abysmal"); }
  1896.     elsif ($_[0] == 280) { return("natimbi"); }
  1897.     elsif ($_[0] == 281) { return("qinimi"); }
  1898.     elsif ($_[0] == 282) { return("riwwi"); }
  1899.     elsif ($_[0] == 283) { return("barindu"); }
  1900.     elsif ($_[0] == 284) { return("ferubi"); }
  1901.     elsif ($_[0] == 285) { return("snpool"); }
  1902.     elsif ($_[0] == 286) { return("snlair"); }
  1903.     elsif ($_[0] == 287) { return("snplant"); }
  1904.     elsif ($_[0] == 288) { return("sncrematory"); }
  1905.     elsif ($_[0] == 289) { return("tipt"); }
  1906.     elsif ($_[0] == 290) { return("vxed"); }
  1907.     elsif ($_[0] == 291) { return("yxtta"); }
  1908.     elsif ($_[0] == 292) { return("uqua"); }
  1909.     elsif ($_[0] == 293) { return("kodtaz"); }
  1910.     elsif ($_[0] == 294) { return("ikkinz"); }
  1911.     elsif ($_[0] == 295) { return("qvic"); }
  1912.     elsif ($_[0] == 296) { return("inktuta"); }
  1913.     elsif ($_[0] == 297) { return("txevu"); }
  1914.     elsif ($_[0] == 298) { return("tacvi"); }
  1915.     elsif ($_[0] == 299) { return("qvicb"); }
  1916.     elsif ($_[0] == 300) { return("wallofslaughter"); }
  1917.     elsif ($_[0] == 301) { return("bloodfields"); }
  1918.     elsif ($_[0] == 302) { return("draniksscar"); }
  1919.     elsif ($_[0] == 303) { return("causeway"); }
  1920.     elsif ($_[0] == 304) { return("chambersa"); }
  1921.     elsif ($_[0] == 305) { return("chambersb"); }
  1922.     elsif ($_[0] == 306) { return("chambersc"); }
  1923.     elsif ($_[0] == 307) { return("chambersd"); }
  1924.     elsif ($_[0] == 308) { return("chamberse"); }
  1925.     elsif ($_[0] == 309) { return("chambersf"); }
  1926.     elsif ($_[0] == 316) { return("provinggrounds"); }
  1927.     elsif ($_[0] == 317) { return("anguish"); }
  1928.     elsif ($_[0] == 318) { return("dranikhollowsa"); }
  1929.     elsif ($_[0] == 319) { return("dranikhollowsb"); }
  1930.     elsif ($_[0] == 320) { return("dranikhollowsc"); }
  1931.     elsif ($_[0] == 328) { return("dranikcatacombsa"); }
  1932.     elsif ($_[0] == 329) { return("dranikcatacombsb"); }
  1933.     elsif ($_[0] == 330) { return("dranikcatacombsc"); }
  1934.     elsif ($_[0] == 331) { return("draniksewersa"); }
  1935.     elsif ($_[0] == 332) { return("draniksewersb"); }
  1936.     elsif ($_[0] == 333) { return("draniksewersc"); }
  1937.     elsif ($_[0] == 334) { return("riftseekers"); }
  1938.     elsif ($_[0] == 335) { return("harbingers"); }
  1939.     elsif ($_[0] == 336) { return("dranik"); }
  1940.     elsif ($_[0] == 337) { return("broodlands"); }
  1941.     elsif ($_[0] == 338) { return("stillmoona"); }
  1942.     elsif ($_[0] == 339) { return("stillmoonb"); }
  1943.     elsif ($_[0] == 340) { return("thundercrest"); }
  1944.     elsif ($_[0] == 341) { return("delvea"); }
  1945.     elsif ($_[0] == 342) { return("delveb"); }
  1946.     elsif ($_[0] == 343) { return("thenest"); }
  1947.     elsif ($_[0] == 344) { return("guildlobby"); }
  1948.     elsif ($_[0] == 345) { return("guildhall"); }
  1949.     elsif ($_[0] == 346) { return("barter"); }
  1950.     elsif ($_[0] == 347) { return("illsalin"); }
  1951.     elsif ($_[0] == 348) { return("illsalina"); }
  1952.     elsif ($_[0] == 349) { return("illsalinb"); }
  1953.     elsif ($_[0] == 350) { return("illsalinc"); }
  1954.     elsif ($_[0] == 351) { return("dreadspire"); }
  1955.     elsif ($_[0] == 354) { return("drachnidhive"); }
  1956.     elsif ($_[0] == 355) { return("drachnidhivea"); }
  1957.     elsif ($_[0] == 356) { return("drachnidhiveb"); }
  1958.     elsif ($_[0] == 357) { return("drachnidhivec"); }
  1959.     elsif ($_[0] == 358) { return("westkorlach"); }
  1960.     elsif ($_[0] == 359) { return("westkorlacha"); }
  1961.     elsif ($_[0] == 360) { return("westkorlachb"); }
  1962.     elsif ($_[0] == 361) { return("westkorlachc"); }
  1963.     elsif ($_[0] == 362) { return("eastkorlach"); }
  1964.     elsif ($_[0] == 363) { return("eastkorlacha"); }
  1965.     elsif ($_[0] == 364) { return("shadowspine"); }
  1966.     elsif ($_[0] == 365) { return("corathus"); }
  1967.     elsif ($_[0] == 366) { return("corathusa"); }
  1968.     elsif ($_[0] == 367) { return("corathusb"); }
  1969.     elsif ($_[0] == 368) { return("nektulosa"); }
  1970.     elsif ($_[0] == 369) { return("arcstone"); }
  1971.     elsif ($_[0] == 370) { return("relic"); }
  1972.     elsif ($_[0] == 371) { return("skylance"); }
  1973.     elsif ($_[0] == 372) { return("devastation"); }
  1974.     elsif ($_[0] == 373) { return("devastationa"); }
  1975.     elsif ($_[0] == 374) { return("rage"); }
  1976.     elsif ($_[0] == 375) { return("ragea"); }
  1977.     elsif ($_[0] == 376) { return("takishruins"); }
  1978.     elsif ($_[0] == 377) { return("takishruinsa"); }
  1979.     elsif ($_[0] == 378) { return("elddar"); }
  1980.     elsif ($_[0] == 379) { return("elddara"); }
  1981.     elsif ($_[0] == 380) { return("theater"); }
  1982.     elsif ($_[0] == 381) { return("theatera"); }
  1983.     elsif ($_[0] == 382) { return("freeporteast"); }
  1984.     elsif ($_[0] == 383) { return("freeportwest"); }
  1985.     elsif ($_[0] == 384) { return("freeportsewers"); }
  1986.     elsif ($_[0] == 385) { return("freeportacademy"); }
  1987.     elsif ($_[0] == 386) { return("freeporttemple"); }
  1988.     elsif ($_[0] == 387) { return("freeportmilitia"); }
  1989.     elsif ($_[0] == 388) { return("freeportarena"); }
  1990.     elsif ($_[0] == 389) { return("freeportcityhall"); }
  1991.     elsif ($_[0] == 390) { return("freeporttheater"); }
  1992.     elsif ($_[0] == 391) { return("freeporthall"); }
  1993.     elsif ($_[0] == 392) { return("northro"); }
  1994.     elsif ($_[0] == 393) { return("southro"); }
  1995.     elsif ($_[0] == 394) { return("crescent"); }
  1996.     elsif ($_[0] == 395) { return("moors"); }
  1997.     elsif ($_[0] == 396) { return("stonehive"); }
  1998.     elsif ($_[0] == 397) { return("mesa"); }
  1999.     elsif ($_[0] == 398) { return("roost"); }
  2000.     elsif ($_[0] == 399) { return("steppes"); }
  2001.     elsif ($_[0] == 400) { return("icefall"); }
  2002.     elsif ($_[0] == 401) { return("valdeholm"); }
  2003.     elsif ($_[0] == 402) { return("frostcrypt"); }
  2004.     elsif ($_[0] == 403) { return("sunderock"); }
  2005.     elsif ($_[0] == 404) { return("vergalid"); }
  2006.     elsif ($_[0] == 405) { return("direwind"); }
  2007.     elsif ($_[0] == 406) { return("ashengate"); }
  2008.     elsif ($_[0] == 407) { return("highpasshold"); }
  2009.     elsif ($_[0] == 408) { return("commonlands"); }
  2010.     elsif ($_[0] == 409) { return("oceanoftears"); }
  2011.     elsif ($_[0] == 410) { return("kithforest"); }
  2012.     elsif ($_[0] == 411) { return("befallenb"); }
  2013.     elsif ($_[0] == 412) { return("highpasskeep"); }
  2014.     elsif ($_[0] == 413) { return("innothuleb"); }
  2015.     elsif ($_[0] == 414) { return("toxxulia"); }
  2016.     elsif ($_[0] == 415) { return("mistythicket"); }
  2017.     elsif ($_[0] == 416) { return("kattacastrum"); }
  2018.     elsif ($_[0] == 417) { return("thalassius"); }
  2019.     elsif ($_[0] == 418) { return("atiiki"); }
  2020.     elsif ($_[0] == 419) { return("zhisza"); }
  2021.     elsif ($_[0] == 420) { return("silyssar"); }
  2022.     elsif ($_[0] == 421) { return("solteris"); }
  2023.     elsif ($_[0] == 422) { return("barren"); }
  2024.     elsif ($_[0] == 423) { return("buriedsea"); }
  2025.     elsif ($_[0] == 424) { return("jardelshook"); }
  2026.     elsif ($_[0] == 425) { return("monkeyrock"); }
  2027.     elsif ($_[0] == 426) { return("suncrest"); }
  2028.     elsif ($_[0] == 427) { return("deadbone"); }
  2029.     elsif ($_[0] == 428) { return("blacksail"); }
  2030.     elsif ($_[0] == 429) { return("maidensgrave"); }
  2031.     elsif ($_[0] == 430) { return("redfeather"); }
  2032.     elsif ($_[0] == 431) { return("shipmvp"); }
  2033.     elsif ($_[0] == 432) { return("shipmvu"); }
  2034.     elsif ($_[0] == 433) { return("shippvu"); }
  2035.     elsif ($_[0] == 434) { return("shipuvu"); }
  2036.     elsif ($_[0] == 435) { return("shipmvm"); }
  2037.     elsif ($_[0] == 436) { return("mechanotus"); }
  2038.     elsif ($_[0] == 437) { return("mansion"); }
  2039.     elsif ($_[0] == 438) { return("steamfactory"); }
  2040.     elsif ($_[0] == 439) { return("shipworkshop"); }
  2041.     elsif ($_[0] == 440) { return("gyrospireb"); }
  2042.     elsif ($_[0] == 441) { return("gyrospirez"); }
  2043.     elsif ($_[0] == 442) { return("dragonscale"); }
  2044.     elsif ($_[0] == 443) { return("lopingplains"); }
  2045.     elsif ($_[0] == 444) { return("hillsofshade"); }
  2046.     elsif ($_[0] == 445) { return("bloodmoon"); }
  2047.     elsif ($_[0] == 446) { return("crystallos"); }
  2048.     elsif ($_[0] == 447) { return("guardian"); }
  2049.     elsif ($_[0] == 448) { return("steamfontmts"); }
  2050.     elsif ($_[0] == 449) { return("cryptofshade"); }
  2051.     elsif ($_[0] == 451) { return("dragonscaleb"); }
  2052.     elsif ($_[0] == 452) { return("oldfieldofbone"); }
  2053.     elsif ($_[0] == 453) { return("oldkaesoraa"); }
  2054.     elsif ($_[0] == 454) { return("oldkaesorab"); }
  2055.     elsif ($_[0] == 455) { return("oldkurn"); }
  2056.     elsif ($_[0] == 456) { return("oldkithicor"); }
  2057.     elsif ($_[0] == 457) { return("oldcommons"); }
  2058.     elsif ($_[0] == 458) { return("oldhighpass"); }
  2059.     elsif ($_[0] == 459) { return("thevoida"); }
  2060.     elsif ($_[0] == 460) { return("thevoidb"); }
  2061.     elsif ($_[0] == 461) { return("thevoidc"); }
  2062.     elsif ($_[0] == 462) { return("thevoidd"); }
  2063.     elsif ($_[0] == 463) { return("thevoide"); }
  2064.     elsif ($_[0] == 464) { return("thevoidf"); }
  2065.     elsif ($_[0] == 465) { return("thevoidg"); }
  2066.     elsif ($_[0] == 466) { return("oceangreenhills"); }
  2067.     elsif ($_[0] == 467) { return("oceangreenvillage"); }
  2068.     elsif ($_[0] == 468) { return("oldblackburrow"); }
  2069.     elsif ($_[0] == 469) { return("bertoxtemple"); }
  2070.     elsif ($_[0] == 470) { return("discord"); }
  2071.     elsif ($_[0] == 471) { return("discordtower"); }
  2072.     elsif ($_[0] == 472) { return("oldbloodfield"); }
  2073.     elsif ($_[0] == 473) { return("precipiceofwar"); }
  2074.     elsif ($_[0] == 474) { return("olddranik"); }
  2075.     elsif ($_[0] == 475) { return("toskirakk"); }
  2076.     elsif ($_[0] == 476) { return("korascian"); }
  2077.     elsif ($_[0] == 477) { return("rathechamber"); }
  2078.     elsif ($_[0] == 480) { return("brellsrest"); }
  2079.     elsif ($_[0] == 481) { return("fungalforest"); }
  2080.     elsif ($_[0] == 482) { return("underquarry"); }
  2081.     elsif ($_[0] == 483) { return("coolingchamber"); }
  2082.     elsif ($_[0] == 484) { return("shiningcity"); }
  2083.     elsif ($_[0] == 485) { return("arthicrex"); }
  2084.     elsif ($_[0] == 486) { return("foundation"); }
  2085.     elsif ($_[0] == 487) { return("lichencreep"); }
  2086.     elsif ($_[0] == 488) { return("pellucid"); }
  2087.     elsif ($_[0] == 489) { return("stonesnake"); }
  2088.     elsif ($_[0] == 490) { return("brellstemple"); }
  2089.     elsif ($_[0] == 491) { return("convorteum"); }
  2090.     elsif ($_[0] == 492) { return("brellsarena"); }
  2091.     elsif ($_[0] == 493) { return("weddingchapel"); }
  2092.     elsif ($_[0] == 494) { return("weddingchapeldark"); }
  2093.     elsif ($_[0] == 495) { return("dragoncrypt"); }
  2094.     elsif ($_[0] == 700) { return("feerrott2"); }
  2095.     elsif ($_[0] == 701) { return("thulehouse1"); }
  2096.     elsif ($_[0] == 702) { return("thulehouse2"); }
  2097.     elsif ($_[0] == 703) { return("housegarden"); }
  2098.     elsif ($_[0] == 704) { return("thulelibrary"); }
  2099.     elsif ($_[0] == 705) { return("well"); }
  2100.     elsif ($_[0] == 706) { return("fallen"); }
  2101.     elsif ($_[0] == 707) { return("morellcastle"); }
  2102.     elsif ($_[0] == 708) { return("somnium"); }
  2103.     elsif ($_[0] == 709) { return("alkabormare"); }
  2104.     elsif ($_[0] == 710) { return("miragulmare"); }
  2105.     elsif ($_[0] == 711) { return("thuledream"); }
  2106.     elsif ($_[0] == 712) { return("neighborhood"); }
  2107.     elsif ($_[0] == 724) { return("argath"); }
  2108.     elsif ($_[0] == 725) { return("arelis"); }
  2109.     elsif ($_[0] == 726) { return("sarithcity"); }
  2110.     elsif ($_[0] == 727) { return("rubak"); }
  2111.     elsif ($_[0] == 728) { return("beastdomain"); }
  2112.     elsif ($_[0] == 729) { return("resplendent"); }
  2113.     elsif ($_[0] == 730) { return("pillarsalra"); }
  2114.     elsif ($_[0] == 731) { return("windsong"); }
  2115.     elsif ($_[0] == 732) { return("cityofbronze"); }
  2116.     elsif ($_[0] == 733) { return("sepulcher"); }
  2117.     elsif ($_[0] == 734) { return("eastsepulcher"); }
  2118.     elsif ($_[0] == 735) { return("westsepulcher"); }
  2119.     elsif ($_[0] == 996) { return("arttest"); }
  2120.     elsif ($_[0] == 998) { return("fhalls"); }
  2121.     elsif ($_[0] == 999) { return("apprentice"); }
  2122.     else { return("ELSE ERROR ZONE ID TO NAME"); }
  2123. } # End GET_ZONE_NAME_BY_ID()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement