Files
tc-bounty-system.sk
Code
1 378
tc-bounty-system.sk
# =====================================
# TC BOUNTY SYSTEM
# Author: Generated Skript
# Version: 1.0
# Minecraft: 1.21+
# Skript: 2.8+
# =====================================
#
# FEATURES:
# - Place bounties on players with /bounty add
# - Red glowing effect on bounty targets
# - PvP rules: bounty players can attack anyone, normal players can only attack bounties
# - Auto-remove on death with rewards
# - Cooldown system
# - List all active bounties
# - Admin commands
#
# INSTALLATION:
# 1. Place in plugins/Skript/scripts/
# 2. Run: /sk reload tc-bounty-system
# 3. Configure options below as needed
# =====================================
options:
# ===== GENERAL SETTINGS =====
prefix: &c&l[&4&l⚔&c&l]&r
# ===== REWARD SETTINGS =====
reward-amount: 1000
reward-currency-name: coins
# ===== COOLDOWN SETTINGS =====
bounty-cooldown: 5 minutes
# ===== VISUAL EFFECTS =====
glow-color: red
enable-particles: true
particle-type: flame
# ===== SOUND SETTINGS =====
bounty-placed-sound: entity.wither.ambient
bounty-claimed-sound: entity.player.levelup
bounty-failed-sound: block.note_block.bass
# =====================================
# VARIABLES
# =====================================
# {bounties::*} - List of all players with active bounties
# {bounty.cooldown::%player%} - Cooldown timestamp for placing bounties
# {bounty.placer::%target%} - Who placed the bounty (for tracking)
# =====================================
# SCRIPT LOAD
# =====================================
on script load:
send "{@prefix} &aTCBountySystem v1.0 loaded successfully!" to console
send "&7Hunters vs Targets PvP system active!" to console
# =====================================
# HELPER FUNCTIONS
# =====================================
# Check if player has active bounty
function hasBounty(p: player) :: boolean:
loop {bounties::*}:
if loop-value is {_p}:
return true
return false
# Add bounty to player
function addBounty(target: player, placer: player):
# Add to bounty list
add {_target} to {bounties::*}
set {bounty.placer::%{_target}%} to {_placer}
# Apply red glowing effect (permanent until removed)
apply glowing to {_target} for 999 days
# Broadcast to server
broadcast ""
broadcast "{@prefix} &c&l⚠ A BOUNTY HAS BEEN PLACED ⚠"
broadcast "&7Target: &c&l%{_target}%"
broadcast "&7Placed by: &e%{_placer}%"
broadcast "&7Reward: &6{@reward-amount} &e{@reward-currency-name}"
broadcast "&a&l» &aHunters, eliminate the target!"
broadcast ""
# Sound effect for everyone
loop all players:
play sound "{@bounty-placed-sound}" with volume 1 and pitch 0.5 at loop-player
# Message to target
send "&c&l☠ &cYou now have a BOUNTY on your head!" to {_target}
send "&c&l☠ &cEveryone is hunting you, but you can fight back!" to {_target}
play sound "entity.ender_dragon.growl" with volume 1 and pitch 2 at {_target}
# Title notification to target
send title "&c&l⚠ BOUNTY PLACED ⚠" with subtitle "&7You are now a target!" to {_target} for 3 seconds
# Remove bounty from player
function removeBounty(target: player):
# Remove from bounty list
remove {_target} from {bounties::*}
delete {bounty.placer::%{_target}%}
# Remove glowing effect
remove glowing from {_target}
# Remove potion effects
remove luck from {_target}
# Notify target
send "{@prefix} &aYour bounty has been removed!" to {_target}
# Check if player is on cooldown
function isOnCooldown(p: player) :: boolean:
if {bounty.cooldown::%{_p}%} is set:
return true
return false
# Get remaining cooldown time
function getCooldownTime(p: player) :: text:
set {_remaining} to difference between now and {bounty.cooldown::%{_p}%}
return "%{_remaining}%"
# =====================================
# PARTICLE EFFECTS (Visual Enhancement)
# =====================================
every 1 second:
if {@enable-particles} is true:
loop {bounties::*}:
set {_target} to loop-value
if {_target} is online:
show {@particle-type} at {_target}
show {@particle-type} offset by 0.5, 1, 0.5 at {_target}
# =====================================
# COMMANDS
# =====================================
# Main bounty command
command /bounty [<text>] [<player>]:
aliases: /bount
trigger:
# No arguments - show help
if arg-1 is not set:
send ""
send "{@prefix} &c&lTCBOUNTY SYSTEM"
send ""
send "&7Commands:"
send "&e/bounty add <player> &7- Place a bounty"
send "&e/bounty remove <player> &7- Remove a bounty &c(admin)"
send "&e/bounty list &7- View all bounties"
send ""
send "&7Rules:"
send "&a&l» &7Normal players can &aONLY &7attack &cBounty Targets"
send "&a&l» &cBounty players &7can attack &aanyone"
send "&a&l» &7Normal players &ccannot &7damage each other"
send ""
stop
# /bounty add <player>
if arg-1 is "add":
if player does not have permission "tc.bounty.add":
send "{@prefix} &cYou don't have permission to place bounties!" to player
play sound "{@bounty-failed-sound}" with volume 1 and pitch 0.5 at player
stop
if arg-2 is not set:
send "{@prefix} &cUsage: /bounty add <player>" to player
stop
# Check if player is on cooldown
if isOnCooldown(player) is true:
send "{@prefix} &cYou must wait before placing another bounty!" to player
send "&7Cooldown: &e{@bounty-cooldown}" to player
play sound "{@bounty-failed-sound}" with volume 1 and pitch 0.5 at player
stop
# Check if target is online
if arg-2 is not online:
send "{@prefix} &cThat player is not online!" to player
play sound "{@bounty-failed-sound}" with volume 1 and pitch 0.5 at player
stop
# Check if target is self
if arg-2 is player:
send "{@prefix} &cYou cannot place a bounty on yourself!" to player
play sound "{@bounty-failed-sound}" with volume 1 and pitch 0.5 at player
stop
# Check if target already has bounty
if hasBounty(arg-2) is true:
send "{@prefix} &cThat player already has a bounty!" to player
play sound "{@bounty-failed-sound}" with volume 1 and pitch 0.5 at player
stop
# Place the bounty
addBounty(arg-2, player)