Jump to content

Insane Limits Requests


Recommended Posts

Originally Posted by tchum*:

 

Hi, i'm trying to make a script that will give the k/d ratio of the targeted player to player that request it.

Everything is working except... except the most important part of the script, it give the k/d of the player that request it instead of the targeted player.

If somone can help me, could be great!

It's just the player.Kdr who give me problem in the last line of the code.

 

Code:

Match m = Regex.Match(player.LastChat, @"^\s*[/[email protected]]kd\s+([^\s]+)", RegexOptions.IgnoreCase);
if (!m.Success)
    return false;
List<String> vips = plugin.GetReservedSlotsList();
if (!vips.Contains(player.Name)) {
    plugin.SendPlayerMessage(player.Name, "You Can't use this command.");
    return false;
}
// Match target player name
String name = m.Groups[1].Value;
List<PlayerInfoInterface> all = new List<PlayerInfoInterface>();
all.AddRange(team1.players);
all.AddRange(team2.players);
all.AddRange(team3.players);
all.AddRange(team4.players);
PlayerInfoInterface target = null;
int count = 0;
foreach (PlayerInfoInterface p in all) {
    if (Regex.Match(p.Name, name, RegexOptions.IgnoreCase).Success) {
        target = p;
        ++count;
    }
}
if (count == 0 || target == null) {
    plugin.SendPlayerMessage(player.Name, "No player name matches '" + name + "'");
    return false;
} else if (count > 1) {
    plugin.SendPlayerMessage(player.Name, "Too many names match '" + name + "', try again");
    return false;
}

                                                                        //NEED HELP HERE PLEASE.
plugin.SendPlayerMessage(player.Name, target.Name + " Has a K/D of: " + player.Kdr );
return false;
* Restored post. It could be that the author is no longer active.
Link to post

Originally Posted by maxdralle*:

 

@hodor

everything is possible with insane limits. its the best plugin.

IL expression for KD limit with ea guid whitelist:

Code:

(player.Kills/player.Deaths > 5) && (player.EAGuid != "EA_123...")
or IL expression for KD limit with vip whitelist:

Code:

(player.Kills/player.Deaths > 5) && (!plugin.GetReservedSlotsList().Contains(player.Name))
* Restored post. It could be that the author is no longer active.
Link to post

Originally Posted by Hodor*:

 

Thank you man!

 

Work:

Code:

(player.Kills/player.Deaths > 5) && (player.EAGuid != "EA_123...")
Doesnt work:

Code:

(player.Kills/player.Deaths > 5) && (!plugin.GetReservedSlotsList().Contains(player.Name))
* Restored post. It could be that the author is no longer active.
Link to post

Originally Posted by xloneshadowx*:

 

Can someone tell me why this is not working for the map Flood Zone and the little bird

// chopper kill farm limit

//////////////////////////////

// info > settings for insane limits: limit_evaluation: OnKill ; limit_first_check: Code ; limit_action: none

 

// SETTINGS

int MaxHeliKillsInfo = 40; // single info player yell

int MaxHeliKillsPyell = 45; // warning player yell

int MaxHeliKillsAdminKill = 50; // auto admin kill

int MaxHeliKillsAutoKick = 60; // auto admin kick / 15 minute time ban

 

bool useWhitelist = true;

bool PutReservedSlotsInWhitelist = true;

 

// SETTINGS - END

 

 

if (useWhitelist && plugin.isInList(killer.Name, "Player_Whitelist")) { return false; }

if ((PutReservedSlotsInWhitelist) && (plugin.GetReservedSlotsList().Contains(killer.Nam e))) { return false; }

 

int iHeliKills = 0;

if (server.PlayerCount

if ((server.MapFileName == "MP_Siege") || (server.MapFileName == "MP_Tremors") || (server.MapFileName == "MP_Flooded")) {

if (kill.Category == "VehicleAir") {

if (server.RoundData.issetInt("chopper_kills_" + killer.Name)) iHeliKills = server.RoundData.getInt("chopper_kills_" + killer.Name);

iHeliKills++;

server.RoundData.setInt("chopper_kills_" + killer.Name, iHeliKills);

if (iHeliKills >= MaxHeliKillsAutoKick) {

// kick

plugin.SendGlobalMessage("HELI-FARM-LIMIT: " + killer.Name + " BANNED (15 min.) for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round.");

plugin.ConsoleWrite("^8^HELI-FARM-LIMIT:^8^n " + killer.Name + " BANNED (15 min.) for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round. (" + plugin.FriendlyMapName(server.MapFileName) + " - K/D: " + killer.KillsRound + "/" + killer.DeathsRound + " - Heli Kills: " + iHeliKills.ToString());

plugin.PRoConChat("^8^bHELI-FARM-LIMIT:^8^n " + killer.Name + " BANNED (15 min.) for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round. (" + plugin.FriendlyMapName(server.MapFileName) + " - K/D: " + killer.KillsRound + "/" + killer.DeathsRound + " - Heli Kills: " + iHeliKills.ToString());

plugin.EABanPlayerWithMessage(EABanType.Name, EABanDuration.Temporary, killer.Name, 15, "TIME-BANNED (15 min.) for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round. (K/D/K.Heli: " + killer.KillsRound + "/" + killer.DeathsRound + "/" + iHeliKills.ToString() + ")");

} else if (iHeliKills >= MaxHeliKillsAdminKill) {

// kill

plugin.PRoConChat("^8^bHELI-FARM-LIMIT:^8^n " + killer.Name + " KILLED for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round.");

plugin.SendGlobalMessage("HELI-FARM-LIMIT: " + killer.Name + " KILLED for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round.");

plugin.SendPlayerYell(killer.Name, "[HELI-FARM-LIMIT] [WARNING]\n" + killer.Name +" KILLED for more than " + MaxHeliKillsPyell.ToString() + " Chopper kills per round.\n Change your vehicle!", 10);

plugin.KillPlayer(killer.Name);

} else if (iHeliKills >= MaxHeliKillsPyell) {

// warning yell

plugin.PRoConChat("(Psay + Pyell " + killer.Name + ") ^8^bHELI-FARM-LIMIT:^8^n [WARNING] " + killer.Name + " only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")");

plugin.SendPlayerYell(killer.Name, "[HELI-FARM-LIMIT] [WARNING]\n" + killer.Name + " only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")", 4);

plugin.SendPlayerMessage(killer.Name, "HELI-FARM-LIMIT: [WARNING] " + killer.Name +" only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")");

} else if (iHeliKills >= MaxHeliKillsInfo) {

// info yell

 

plugin.PRoConChat("(Psay + Pyell " + killer.Name + ") [HELI-FARM-LIMIT] [iNFO] " + killer.Name +" only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")");

plugin.SendPlayerYell(killer.Name, "[HELI-FARM-LIMIT] [iNFO]\n" + killer.Name +" only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")", 10);

plugin.SendPlayerMessage(killer.Name, "HELI-FARM-LIMIT: [iNFO] " + killer.Name +" only " + MaxHeliKillsPyell.ToString() + " Chopper kills per round! (" + iHeliKills + "/" + MaxHeliKillsAdminKill + ")");

}

}

}

}

* Restored post. It could be that the author is no longer active.
Link to post
  • 9 months later...

Hello there can you guys fix this code

 

// Insane Limits - VIP Commands
// !lead, !killme, !switchme
// SETUP Insane Limits: Evaluation: OnAnyChat    ;   First_check: Code
 
 
// SETTINGS
bool EnableLeadCmd = true;     // true / false
bool EnableKillmeCmd = true;     // true / false
bool EnableSwitchmeCmd = true;     // true / false
// SETTINGS END
 
 
if ((player.LastChat).Length < 1) { return false; }
bool tmp_SendMsg = false;
 
if (Regex.Match(player.LastChat, @"^/?[!|@]lead$", RegexOptions.IgnoreCase).Success) {
    // squad leader command
    if (EnableLeadCmd) {
        if (plugin.GetReservedSlotsList().Contains(player.Name)) {
            plugin.ServerCommand("squad.leader", player.TeamId.ToString(), player.SquadId.ToString(), player.Name);
        } else {
            tmp_SendMsg = true;
        }
    }
} else if (Regex.Match(player.LastChat, @"^/?[!|@]killme$", RegexOptions.IgnoreCase).Success) {
    // killme command
    if (EnableKillmeCmd) {
        if (plugin.GetReservedSlotsList().Contains(player.Name)) {
            plugin.KillPlayer(player.Name);
        } else {
            tmp_SendMsg = true;
        }
    }
} else if (Regex.Match(player.LastChat, @"^/?[!|@]switchme$", RegexOptions.IgnoreCase).Success) {
    // team switch command
    if (EnableSwitchmeCmd) {
        if (plugin.GetReservedSlotsList().Contains(player.Name)) {
            plugin.ServerCommand("admin.movePlayer", player.Name, server.OppositeTeamId(player.TeamId).ToString(), "0", "true");
        } else {
            tmp_SendMsg = true;
        }
    }
}
 
// send message based on player language
if (tmp_SendMsg) {
    if ((player.CountryCode == "br") || (player.CountryCode == "pt")) {
        // message for brasil, portugal
        plugin.SendPlayerMessage(player.Name, plugin.R("So para VIPs"));
        plugin.PRoConChat("PlayerSay " + player.Name + ") So para VIPs");
    } else {
        // default message
        plugin.SendPlayerMessage(player.Name, plugin.R("Sorry, this command is for !VIP SLOT players only"));
        plugin.PRoConChat("PlayerSay " + player.Name + ") Sorry, this command is for !VIP SLOT players only");
    }
}
 
 
 
i test it it not work 
Link to post

 

Hello there can you guys fix this code

 

// Insane Limits - VIP Commands
// !lead, !killme, !switchme
// SETUP Insane Limits: Evaluation: OnAnyChat    ;   First_check: Code
 
 
// SETTINGS
bool EnableLeadCmd = true;     // true / false
bool EnableKillmeCmd = true;     // true / false
bool EnableSwitchmeCmd = true;     // true / false
// SETTINGS END
 
 
if ((player.LastChat).Length < 1) { return false; }
bool tmp_SendMsg = false;
 
if (Regex.Match(player.LastChat, @"^/?[!|@]lead$", RegexOptions.IgnoreCase).Success) {
    // squad leader command
    if (EnableLeadCmd) {
        if (plugin.GetReservedSlotsList().Contains(player.Name)) {
            plugin.ServerCommand("squad.leader", player.TeamId.ToString(), player.SquadId.ToString(), player.Name);
        } else {
            tmp_SendMsg = true;
        }
    }
} else if (Regex.Match(player.LastChat, @"^/?[!|@]killme$", RegexOptions.IgnoreCase).Success) {
    // killme command
    if (EnableKillmeCmd) {
        if (plugin.GetReservedSlotsList().Contains(player.Name)) {
            plugin.KillPlayer(player.Name);
        } else {
            tmp_SendMsg = true;
        }
    }
} else if (Regex.Match(player.LastChat, @"^/?[!|@]switchme$", RegexOptions.IgnoreCase).Success) {
    // team switch command
    if (EnableSwitchmeCmd) {
        if (plugin.GetReservedSlotsList().Contains(player.Name)) {
            plugin.ServerCommand("admin.movePlayer", player.Name, server.OppositeTeamId(player.TeamId).ToString(), "0", "true");
        } else {
            tmp_SendMsg = true;
        }
    }
}
 
// send message based on player language
if (tmp_SendMsg) {
    if ((player.CountryCode == "br") || (player.CountryCode == "pt")) {
        // message for brasil, portugal
        plugin.SendPlayerMessage(player.Name, plugin.R("So para VIPs"));
        plugin.PRoConChat("PlayerSay " + player.Name + ") So para VIPs");
    } else {
        // default message
        plugin.SendPlayerMessage(player.Name, plugin.R("Sorry, this command is for !VIP SLOT players only"));
        plugin.PRoConChat("PlayerSay " + player.Name + ") Sorry, this command is for !VIP SLOT players only");
    }
}
 
 
 
i test it it not work 

 

its work not need anything , sorry 

Link to post
  • Plugin Developer

@dev007

 

i think the command !nextmap is a part of the xvotemap plugin: https://myrcon.net/topic/160-xvotemap-1560/

 

 

otherwise you can do it with insane limits:

/////////////////////////////////
// !nextmap
/////////////////////////////////
// info > settings for insane limits: limit_evaluation: OnAnyChat     ;     limit_first_check: Code        ;        limit_action: none

if ((player.LastChat).Length < 1) { return false; }

if (Regex.Match(player.LastChat, @"!next|nextmap|next map|!map", RegexOptions.IgnoreCase).Success) {
    plugin.SendGlobalMessage("!NEXT map: " + plugin.FriendlyMapName(server.NextMapFileName));
    plugin.PRoConChat("!NEXT map: " + plugin.FriendlyMapName(server.NextMapFileName));
}
Link to post

 

@dev007

 

i think the command !nextmap is a part of the xvotemap plugin: https://myrcon.net/topic/160-xvotemap-1560/

 

 

otherwise you can do it with insane limits:

/////////////////////////////////
// !nextmap
/////////////////////////////////
// info > settings for insane limits: limit_evaluation: OnAnyChat     ;     limit_first_check: Code        ;        limit_action: none

if ((player.LastChat).Length < 1) { return false; }

if (Regex.Match(player.LastChat, @"!next|nextmap|next map|!map", RegexOptions.IgnoreCase).Success) {
    plugin.SendGlobalMessage("!NEXT map: " + plugin.FriendlyMapName(server.NextMapFileName));
    plugin.PRoConChat("!NEXT map: " + plugin.FriendlyMapName(server.NextMapFileName));
}

yup sir it work 100% thank you

 

 

last what i need  , there was code i was used with insane limits: for game mode counter , i need code for CQ maps 

Link to post

Hi, is it possible to enable/disable others plugins with an insane limits script?
Because i'm trying to do a script for that and my the script is compilled by insane limits and working but it doesnt disable/enable the plugin

plugin.ServerCommand("procon.plugin.enable", "CAdaptiveTicketCount", "false");

When i enter this command directly in the procon console it work, the plugin is desactived, but with my script, nothing happen

procon.plugin.enable CAdaptiveTicketCount false
Edited by Uninstaller
Link to post
  • 3 weeks later...
  • 2 months later...
  • Plugin Developer
30 minutes ago, Skillmanonline said:

Can someone help me make a very simple code. 

When player request !rules it is shown in his chat.

I just have a few rules some please help with clear explanations 

 

Thanks 

I don't remember the IL syntax off the top of my head so if nobody else responds you could just use the 'server rules on request' plugin. You can find the download in the old plugin zips thread.

 

Link to post
34 minutes ago, ColColonCleaner said:

I don't remember the IL syntax off the top of my head so if nobody else responds you could just use the 'server rules on request' plugin. You can find the download in the old plugin zips thread.

 

Thank you so much! your own post still had all the working plugins :)

Thanks again been going at it for hours (because i am a noob but still) 

Link to post
  • 5 weeks later...
On 2/12/2019 at 8:56 AM, ImportBot said:

Originally Posted by xloneshadowx*:

 

Can someone tell me why this is not working for the map Flood Zone and the little bird

You get this code fixed, i am looking for something for hardline too

Link to post
  • 2 weeks later...
  • 11 months later...

So im looking into having maybe a vote to change the gamemode in my server and have it load all the maps for said gamemode before the votemap comes in so they can still vote for whatever map they want how feasable is that? i think it is possible just dont know how much overhead it would put on my procon layer 😕 Thanks in advance :) 

Link to post
  • 3 months later...

Heyo guys, im looking for a limit like the Metro/Locker No Explosives one, just for the Anti Air Vehicles tunguska, lad-25 and the pgz95.

 

I tried to rewrite the metro no explosives for aa but it wont work sadly. Does anyone has help? i cant compile my version :(

Link to post
  • 4 weeks later...
On 7/21/2021 at 9:08 PM, Lyzz said:

i want to do some action if someone kills with a heli or jet

this is my code so far. but it never triggers

 

if(kill.Weapon.Contains("Z-11W")){return true;}

Vehicle kills do not show up as a weapon. (You will have to look at VehicleDetails/Name etc.

Use the KillReasonInterface for this:

public interface KillReasonInterface
    {
        String Name { get; } // weapon name or reason, like Suicide
        String Detail { get; } // BF4: ammo or attachment
        String AttachedTo { get; } // BF4: main weapon when Name is a secondary attachment, like M320
        String VehicleName { get; } // BF4: if Name is Death, this is the vehicle's name
        String VehicleDetail { get; } // BF4: if Name is Death, this is the vehicle's detail (stuff after final slash)
    }
    

How to get to it: (method of plugin)

 KillReasonInterface FriendlyWeaponName(String killWeapon); 
            // BF3 example: "Weapons/XP2_L86/L86" => KillReasonInterface("L86", null, null)
            // BF4 example: "U_AK12_M320_HE" => KillReasonInterface("M320", "HE", "AK12")
            // BF4 vehicle example: "Gameplay/Vehicles/AH6/AH6_Littlebird" => KillReasonInterface("Death", null, null, "AH6", "AH6_Littlebird")

KillReasonInterface x = plugin.FriendlyWeapnName(kill.Weapon);

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Our picks

    • Game Server Hosting:

      We're happy to announce that EZRCON will branch out into the game server provider scene. This is a big step for us so please having patience if something doesn't go right in this area. Now, what makes us different compared to other providers? Well, we're going with the idea of having a scaleable server hosting and providing more control in how you set up your server. For example, in Minecraft, you have the ability to control how many CPU cores you wish your server to have access to, how much RAM you want to use, how much disk space you want to use. This type of control can't be offered in a single service package so you're able to configure a custom package the way you want it.

      You can see all the available games here. Currently, we have the following games available.

      Valheim (From $1.50 USD)


      Rust (From $3.20 USD)


      Minecraft (Basic) (From $4.00 USD)


      Call of Duty 4X (From $7.00 USD)


      OpenTTD (From $4.00 USD)


      Squad (From $9.00 USD)


      Insurgency: Sandstorm (From $6.40 USD)


      Changes to US-East:

      Starting in January 2022, we will be moving to a different provider that has better support, better infrastructure, and better connectivity. We've noticed that the connection/routes to this location are not ideal and it's been hard getting support to correct this. Our contract for our two servers ends in March/April respectively. If you currently have servers in this location you will be migrated over to the new provider. We'll have more details when the time comes closer to January. The new location for this change will be based out of Atlanta, GA. If you have any questions/concerns please open a ticket and we'll do our best to answer them.
      • 1 reply
    • Hello All,

      I wanted to give an update to how EZRCON is doing. As of today we have 56 active customers using the services offered. I'm glad its doing so well and it hasn't been 1 year yet. To those that have services with EZRCON, I hope the service is doing well and if not please let us know so that we can improve it where possible. We've done quite a few changes behind the scenes to improve the performance hopefully. 

      We'll be launching a new location for hosting procon layers in either Los Angeles, USA or Chicago, IL. Still being decided on where the placement should be but these two locations are not set in stone yet. We would like to get feedback on where we should have a new location for hosting the Procon Layers, which you can do by replying to this topic. A poll will be created where people can vote on which location they would like to see.

      We're also looking for some suggestions on what else you would like to see for hosting provider options. So please let us know your thoughts on this matter.
      • 4 replies
    • Hi All,

      So seeing as Venice Unleased is released, I'm looking into if I should offer game hosting for it. I would like some feedback on this subject.

      VU - Experience Battlefield 3 like never before! (veniceunleashed.net)
      • 3 replies
    • So as the topic title says, should EZRCON offer general web hosting services?
      • 1 reply
    • Added ability to disable the new API check for player country info


      Updated GeoIP database file


      Removed usage sending stats


      Added EZRCON ad banner



      If you are upgrading then you may need to add these two lines to your existing installation in the file procon.cfg. To enable these options just change False to True.

      procon.private.options.UseGeoIpFileOnly False
      procon.private.options.BlockRssFeedNews False



       
      • 2 replies
×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.