HeliControl for Rust

Manage helicopter health, player damage, configure turrets/rockets, and more!

Total Downloads: 23,772 - First Release: Sep 18, 2015 - Last Update: Aug 29, 2017

5/5, 68 likes
  1. Shady757
    Optional Dependencies:
    http://oxidemod.org/plugins/n-teleportation.1832/
    Configuration File:
    Yes
    HeliControl is a plugin that allows you to tweak various settings of Helicopters on your server.

    Chat Commands:
    /callheli
    /callheli <playername>
    /callheli <playername> <amount of helis to call>
    /killheli
    /killheli forced
    /killgibs
    /killnapalm
    /getshortname <item name (doesn't need quotes)>
    /strafe
    - Tells the heli to strafe your position.
    /strafe <playername> - Tells the heli to strafe the target's position.
    /helidest <playername> - Tells the heli to start flying to this player's position.
    /helispawn - Allows you to add a spawn point for the Helicopter to use, if the config has it allowed.
    /updatehelis - Updates all Helicopters to the current config's settings. Please note that you still need to reload the plugin after any config changes, then run this command.
    /tpheli - Teleports you to the ground near the active Helicopter.
    /unlockcrates - Unlocks all the currently locked Helicopter crates.


    Server/Console Commands: (no slash)
    callheli
    callheli <playername>
    callheli <playername> <amount of heli' to call>
    callheli pos <x> <y> <z> <amount of heli to call>

    killheli
    getshortname <item name (doesn't need quotes)>


    getshortname will give you the name of the item to use when setting up custom loot spawns. You can find the spawns file in the /oxide/data directory. More info on lootspawns below.

    killheli kills ALL helicopters instantly. They will not drop any box loot.


    Config settings with description: (Please keep in mind everything in the config is the default according to Rust)
    -1 values generally indicate untouched values (leaves it to Rust to handle)
    Code (Text):

    Damage - Global damage multiplier (default 1.0) - This scales the amount of damage the Helicopter takes from any sources.

    Gibs - Health of gibs (default 500) - The health that the helicopter "gibs" (harvest-able parts that appear after heli is destroyed) have.

    Gibs - Time until gibs can be harvested in seconds (default 480) - The amount of time required until the gibs can be hit and properly harvested/extracted.

    Health - Base Helicopter health (default 10000) - The base Helicopter health (not the rotors!)

    Health - Main rotor health (default 750) - The health of the 'main' (top/big) rotor.

    Health - Tail rotor health (default 375) - The health of the tail rotor.

    Loot - Max Crates to drop (default 4) - The amount of crates to drop when the Helicopter is destroyed.

    Loot - Time before unlocking crates (default -1) - The time until the helicopter's loot crates can be looted.

    Loot - Use custom spawns (default false) - If set to true, this will use the custom spawns as defined by HeliControl's loot data file.

    Misc - Helicopter can shoot while dying (default true) - If set to false, the Helicopter will no longer be able to shoot it's turret while it's crashing to the ground.

    Misc - Helicopter speed (default 25) - Controls helicopter speed, higher = faster.

    Misc - Helicopter startup length in seconds (default 0) - If Helicopter speed is not the same as Helicopter speed, this is how long it will remain in the 'startup' speed.

    Misc - Helicopter startup speed (default 25) - The speed of the Helicopter while it's in it's startup time (read above setting).

    Misc - Maximum helicopter life time in minutes (default 15) - How long until the Helicopter will leave/despawn.

    Misc - Prevent crates from spawning when forcefully killing helicopter (default true) - If set to false, /killheli will still let the helicopter drop it's loot crates.

    Misc - Water required to extinguish napalm flames (default 10000) - The amount of water required to extinguish the flames from the Helicopter.

    Rockets - Blunt damage to deal (default 175) - The amount of damage a single rocket should do with the 'Blunt' damage type.

    Rockets - Explosion damage to deal (default 100) - The amount of damage a single rocket should do with the 'Explosion' damage type.

    Rockets - Explosion radius (default 6) - The radius of the explosion from a single Helicopter rocket.

    Rockets - Max helicopter rockets (default 12) - How many rockets the Helicopter should shoot when strafing (set to 0 to disable!).

    Rockets - Time between each rocket in seconds (default 0.2) - How long to wait before firing another rocket during a strafe.

    Spawning - Automatically call helicopter after this many seconds (default 0) - How often to automatically call a Helicopter.

    Spawning - Automatically call helicopter if one is already flying (default false) - If set to true, the plugin will still spawn Helicopters after the elapsed spawn timer if one is already flying.

    Spawning - Disable helicopter (default false) - If set to true, the Helicopter will never spawn.

    Spawning - Disable helicopter gibs (default false) - If set to true, the Helicopter will not have gibs/debris when it dies.

    Spawning - Disable helicopter napalm (default false) - If set to true, the Helicopter will not have napalm.

    Spawning - Disable Rust's default spawns (default false) - If set to true, Rust will not natively spawn any helicopters and it will be up to HeliControl and other plugins to spawn helicopters.

    Spawning - Max active helicopters (default -1) - The maximum amount of Helicopters that can be flying at any time from any source.

    Spawning - Use custom helicopter spawns (default false) - If set to true, the helicopter will automatically spawn at any custom spawn points that have been created for it.

    Turrets - Helicopter bullet accuracy (default 2) - Controls the accuracy of the machine guns on the helicopter. (higher = less accurate (I think))

    Turrets - Helicopter bullet damage (default 20) - How much damage a single bullet from the helicopter machine guns should deal.

    Turrets - Max range (default 300) - The maximum range the turret can shoot.

    Turrets - Time between turret bursts in seconds (default 3) - Time to wait before doing another 'burst' of machine gun fire.

    Turrets - Turret burst length in seconds (default 3) - How long the turret 'burst' should last.

    Turrets - Turret fire rate in seconds (default 0.125) - How fast the turret should shoot.
     

    Permissions are as follows:
    helicontrol.callheli (gives you access /callheli)
    helicontrol.killheli (gives you access /killheli)
    helicontrol.killgibs (gives you access to /killgibs)
    helicontrol.killnapalm (gives you access to /killnapalm)
    helicontrol.helispawn (gives you access to /helispawn)
    helicontrol.strafe (gives you access to /strafe)
    helicontrol.update (gives you access to /updatehelis)
    helicontrol.destination (gives you access to /helidest)
    helicontrol.admin (gives you permission to everything)

    Giving a player access to call a heli with a cooldown/limit:

    The config options under "Cooldowns" and "Limits" in the Config are added as permissions. For example: helicontrol.limit.1, will grant them the first limit permission, with the specified amount of times they are allowed to use it per day, as per the config. Same goes for Cooldown.

    When the permission is added to the group or player, they will be able to call it whenever the cooldown elapses, provided they have not hit their limit. The limit resets as soon as the time switches over to the next day. A limit does NOT need to be specified, nor does a cooldown. If you set a limit without a cooldown, they can call it as often as they want. If you set a cooldown without a limit, they can call it much as they want.

    By default, players with the cooldown or limit permissions can only call a Helicopter in general, and not to a specific target. To let them call it to themselves, use permission: helicontrol.callheliself -- To let them call it to a target, use helicontrol.callhelitarget -- Do not use helicontrol.callheli unless you want them to be able to call it as much as they want, and wherever.


    Players can only call a Helicopter using the chat command, the console command requires the "helicontrol.callheli" or "helicontrol.admin" permission.

    Good guide on permissions:
    Using Oxide's permission system | Oxide

    P.S, it is worth noting that by default, HeliControl should not change any of the Helicopter's behavior, and will only add chat/console commands.

    This config file will be automatically generated and located in /oxide/config/HeliControl.json
    Code (Text):

    {
      "Cooldowns": {
        "Cooldown.0": 86400.0,
        "Cooldown.1": 86400.0,
        "Cooldown.2": 86400.0,
        "Cooldown.3": 86400.0,
        "Cooldown.4": 86400.0,
        "Cooldown.5": 86400.0,
        "Cooldown.6": 86400.0,
        "Cooldown.7": 86400.0,
        "Cooldown.8": 86400.0,
        "Cooldown.9": 86400.0
      },
      "Damage - Global damage multiplier": 1.0,
      "Gibs - Health of gibs": 500.0,
      "Gibs - Time until gibs can be harvested in seconds": 480.0,
      "Health - Base Helicopter health": 10000.0,
      "Health - Main rotor health": 750.0,
      "Health - Tail rotor health": 375.0,
      "Limits": {
        "Limit.0": 5,
        "Limit.1": 5,
        "Limit.2": 5,
        "Limit.3": 5,
        "Limit.4": 5,
        "Limit.5": 5,
        "Limit.6": 5,
        "Limit.7": 5,
        "Limit.8": 5,
        "Limit.9": 5
      },
      "Loot - Max Crates to drop": 4,
      "Loot - Time before unlocking crates": -1.0,
      "Loot - Use Custom loot spawns": false,
      "Misc - Helicopter can shoot while dying": true,
      "Misc - Helicopter speed": 25.0,
      "Misc - Helicopter startup length in seconds": 0.0,
      "Misc - Helicopter startup speed": 25.0,
      "Misc - Maximum helicopter life time in minutes": 15,
      "Misc - Prevent crates from spawning when forcefully killing helicopter": true,
      "Misc - Water required to extinguish napalm flames": 10000,
      "Rockets - Blunt damage to deal": 175.0,
      "Rockets - Explosion damage to deal": 100.0,
      "Rockets - Explosion radius": 6.0,
      "Rockets - Max helicopter rockets": 12,
      "Rockets - Time between each rocket in seconds": 0.2,
      "Spawning - Automatically call helicopter after this many seconds": 0.0,
      "Spawning - Automatically call helicopter if one is already flying": false,
      "Spawning - Disable Helicopter": false,
      "Spawning - Disable helicopter gibs": false,
      "Spawning - Disable helicopter napalm": false,
      "Spawning - Disable Rust's default spawns": false,
      "Spawning - Max active helicopters": -1,
      "Spawning - Use custom helicopter spawns": false,
      "Turrets - Helicopter bullet accuracy": 2.0,
      "Turrets - Helicopter bullet damage": 20.0,
      "Turrets - Helicopter bullet speed": 250,
      "Turrets - Max range": 300.0,
      "Turrets - Time between turret bursts in seconds": 3.0,
      "Turrets - Turret burst length in seconds": 3.0,
      "Turrets - Turret fire rate in seconds": 0.125
    }
     
    Spawn System:
    There is no weight system as of yet, so if you want one lootbox to be rarer, add more of the others, by copying and pasting. Duplicates are definitely okay.
    Here's an example loot file that you can modify, thanks to Resistance:
    HeliControlData (click this)


    Default HeliControlData.json - located in /oxide/data/HeliControlData.json:
    Use https://www.jsonlint.com/ to validate your JSON after editing it!
    Code (Text):
    {
      "HeliInventoryLists": [
        {
          "lootBoxContents": [
            {
              "name": "rifle.ak",
              "amount": 1,
              "isBP": false
            },
            {
              "name": "ammo.rifle.hv",
              "amount": 128,
              "isBP": false
            }
          ]
        },
        {
          "lootBoxContents": [
            {
              "name": "rifle.bolt",
              "amount": 1,
              "isBP": false
            },
            {
              "name": "ammo.rifle.hv",
              "amount": 128,
              "isBP": false
            }
          ]
        },
        {
          "lootBoxContents": [
            {
              "name": "explosive.timed",
              "amount": 3,
              "isBP": false
            },
            {
              "name": "ammo.rocket.hv",
              "amount": 3,
              "isBP": false
            }
          ]
        },
        {
          "lootBoxContents": [
            {
              "name": "lmg.m249",
              "amount": 1,
              "isBP": false
            },
            {
              "name": "ammo.rifle",
              "amount": 100,
              "isBP": false
            }
          ]
        }
      ]
    }
    Default HeliControl weapons data file (oxide\data\HeliControlWeapons.json):
    Code (Text):
    {
      "WeaponList": {
        "Assault Rifle": 1.0,
        "Bolt Action Rifle": 1.0,
        "Hunting Bow": 1.0,
        "Crossbow": 1.0,
        "M249": 1.0,
        "Eoka Pistol": 1.0,
        "Revolver": 1.0,
        "Semi-Automatic Pistol": 1.0,
        "Semi-Automatic Rifle": 1.0,
        "Pump Shotgun": 1.0,
        "Waterpipe Shotgun": 1.0,
        "Custom SMG": 1.0,
        "Thompson": 1.0
      }
    }

    Using this plugin in your own Plugin (C#):
    Code (Text):

    using Oxide.Core.Plugins;

    [PluginReference]
    Plugin HeliControl;


    var heli = HeliControl?.Call("callCoordinates", Vector3.Zero);
    if (heli == null) return; //This will call a Helicopter at the specified coordinates. The null check is probably not needed, as it should only return null if the prefab path in Rust changes.
     
    php300, CrazyDoo, Westingham and 6 others like this.