View Single Post
  #1  
Old 02-05-2017, 01:31 AM
yakuza123
Fire Beetle
 
Join Date: Dec 2016
Posts: 3
Default Expedition Lockout voids #e invite

So this system is not perfect and a first addition so i expect that a lot of you could find a easier route to go about this but this is what i did......

I changed this to execute the sub commands.
Code:
            elsif($arg[1] eq "groupinvite"){
			ExpHandler_Group_invite($arg[2]);
            }
            elsif($arg[1] eq "invite"){
			ExpHandler_single_invite($arg[2]);
            }

I made these check for the users lockout for specific zone and if the user has it it wont allow the invite to go through...
Code:
sub ExpHandler_single_invite {
$found = 0;
$player22 = $_[0];
$connect2 = plugin::LoadMysql();
@AdvInfo = LoadExpeditionInfo();
my $query = "SELECT `player`, `lockout_name`, `lockout_expire` FROM `cust_ext_lockouts` WHERE `player` LIKE '%". $name . "%';";
my $query_handle = $connect2->prepare($query); $query_handle->execute();
		while (@row = $query_handle->fetchrow_array()){
		$found = 1;
		if($row[1] == $AdvInfo[4]){ 
$client->Message(15, "You are Currently locked how can you invite another?");  
}
}
if($found == 0) {
$client->Message(15, "#expedition groupinvite <playername>"); 
ExpeditionProcessInvite($player22); 
}
}
sub ExpHandler_group_invite {
$found = 0;
$player22 = $_[0];
$connect2 = plugin::LoadMysql();
@AdvInfo = LoadExpeditionInfo();
my $query = "SELECT `player`, `lockout_name`, `lockout_expire` FROM `cust_ext_lockouts` WHERE `player` LIKE '%". $name . "%';";
my $query_handle = $connect2->prepare($query); $query_handle->execute();
		while (@row = $query_handle->fetchrow_array()){
		$found = 1;
		if($row[1] == $AdvInfo[4]){ 
$client->Message(15, "You are Currently locked how can you invite another?");  
}
}
if($found == 0) {
$client->Message(15, "#expedition groupinvite <playername>"); 
ExpeditionProcessGroupInvite($player22); 
}
}
I am not much of a coder but this is what i came up with after a few hours of work i know it needs work but figured i would toss this out there for anyone looking for somewhere to start.... This was created so that once a boss died and a lockout was issued that the invite portion of expedition commands would be disabled....
Reply With Quote