Booby trap boxes and doors with a variety of different traps for players with permission.
Available Traps
- Grenade - drops a grenade
- Beancan - drops a beancan grenade
- Explosive - detonates C4
- Landmine - drops a circle of landmines around the box
- Beartrap - drops a circle of beartraps around the box
- Radiation - create a radiation zone around the box
- Shock - electrocutes the looter
- Fire - burns the looter
Permisions
boobytraps.elements-- Allowss setting fire/shock booby trapsboobytraps.explosives-- Allows setting grenade/beancan/explosive booby trapsboobytraps.deployables-- Allows setting landmine/beartrap booby trapsboobytraps.admin-- Allows setting any trap, bypassing costs to use, and use of admin commands
Notes
- Traps are activated when a player opens the trapped object, or if the object takes damage!
- You can set traps on any kind of wood storage box/small stash, supply drops, rubbish piles, loot containers (barrels, military boxes, etc.), doors etc.
- Traps set on player placed boxes/doors will be saved, traps set on barrels and loot boxes will be wiped on restart/unload.
- It is not recommended to set traps on your main loot boxes as the box, and everything surrounding it will take damage!
- If you hear a noise when you open a box you had better run!
Chat Commands
Player Commands
/trap-- Displays the help menu and traps available to the player/trap costs-- Shows the costs for that trap type/trap set-- Set a trap on the object the player is looking at/trap remove-- Remove a trap if it is set by the player/trap check-- Check the object the player is looking at for any traps set by themselves
Admin Commands
/trap removeall-- Clear all currently set traps/trap list-- List all current traps to console
The admin commands also work in console without the /.
Configuration
Autotrap Options
Autotrap will assign a random enabled trap to loot/supply drops as it spawns. The chance for each can be adjust in the config (setting chance to 40 gives it a 1 in 40 chance of trapping the loot.)
You can also enable/disable loot and supply drop autotraps.
Trap Type Configuration
Example:
"BeancanGrenade": {
"AdminOnly": false, // Enables this trap to be used by admins only
"Costs": [ // The costs to set this trap
{
"Amount": 2, // Item amount
"Shortname": "grenade.beancan" // Item shortname
}
],
"DamageAmount": 30.0, // The amount of damage this trap will yield
"Duration": 0.0, // The amount of time this trap will run for (if applicable)
"Enabled": true, // Enable/Disable this trap type
"FuseTimer": 2.0, // The time from when the trap is activated till it goes off
"Radius": 4.0 // The radius of damage dealt from this trap
},
Note: Not all options will be relevant to each trap type! For example, as shown above, the field "duration" does not apply to the beancan trap.
Radiation
Duration is only applicable to the Radiation trap, it is the length of time the radiation will be active
Landmine and Beartraps
DamageAmount does not apply to the Landmine or Beartrap trapsThe amount of traps that will be laid is the amount you set the cost to in the config
Default Configuration
{
"AutotrapSettings": {
"AirdropChance": 40, // Chance to random trap supply drops
"LootContainerChance": 40, // Chance to random trap loot containers
"UseAirdrops": true, // Enable/Disable supply drop auto traps
"UseLootContainers": true //Enable/Disable loot container auto traps
},
"Options": {
"CanTrapBoxes": true, // Allow storage containers to be trapped by players
"CanTrapDoors": true, // Allow doors to be trapped by players
"CanTrapLoot": false, // Allow random loot containers to be trapped by players
"CanTrapSupplyDrops": true, // Allows supply drops to be trapped by players
"NotifyPlayersWhenTrapTriggered": true, // Notify players they have activated a trap
"NotifyRandomSetTraps": true, // Print console messages when a random trap is set
"OverrideCostsForAdmins": true, // Allow admins to set traps for no costs
"PlayTrapWarningSoundFX": true, // Triggers the trap sound effect when the object is opened/damaged
"RequireBuildingPrivToTrap": true, // Requires the player to have building privilege to place a trap
"RequireOwnershipToTrap": true // Requires ownership of the object to place a trap
},
"TrapTypes": {
"BeancanGrenade": {
"AdminOnly": false,
"Costs": [
{
"Amount": 2,
"Shortname": "grenade.beancan"
}
],
"DamageAmount": 30.0,
"Duration": 0.0,
"Enabled": true,
"FuseTimer": 2.0,
"Radius": 4.0
},
"Beartrap": {
"AdminOnly": false,
"Costs": [
{
"Amount": 10,
"Shortname": "trap.bear"
}
],
"DamageAmount": 0.0,
"Duration": 0.0,
"Enabled": true,
"FuseTimer": 2.0,
"Radius": 2.0
},
"Explosive": {
"AdminOnly": false,
"Costs": [
{
"Amount": 2,
"Shortname": "explosive.timed"
}
],
"DamageAmount": 110.0,
"Duration": 0.0,
"Enabled": true,
"FuseTimer": 3.0,
"Radius": 10.0
},
"Fire": {
"AdminOnly": false,
"Costs": [
{
"Amount": 50,
"Shortname": "lowgradefuel"
}
],
"DamageAmount": 1.0,
"Duration": 0.0,
"Enabled": true,
"FuseTimer": 3.0,
"Radius": 2.0
},
"Grenade": {
"AdminOnly": false,
"Costs": [
{
"Amount": 2,
"Shortname": "grenade.f1"
}
],
"DamageAmount": 75.0,
"Duration": 0.0,
"Enabled": true,
"FuseTimer": 3.0,
"Radius": 5.0
},
"Landmine": {
"AdminOnly": false,
"Costs": [
{
"Amount": 10,
"Shortname": "trap.landmine"
}
],
"DamageAmount": 0.0,
"Duration": 0.0,
"Enabled": true,
"FuseTimer": 2.0,
"Radius": 2.0
},
"Radiation": {
"AdminOnly": true,
"Costs": [],
"DamageAmount": 20.0,
"Duration": 20.0,
"Enabled": true,
"FuseTimer": 3.0,
"Radius": 10.0
},
"Shock": {
"AdminOnly": true,
"Costs": [],
"DamageAmount": 95.0,
"Duration": 0.0,
"Enabled": true,
"FuseTimer": 2.0,
"Radius": 2.0
}
}
}
MIT License
Copyright (c) 2019 k1lly0u
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

