Files
zeus_sword.sk
Code
1 410
zeus_sword.sk
# ====================================
# ZEUS SWORD SYSTEM v2.4
# Advanced Lightning Combat Mechanics
# ====================================
# Author: Combat Systems Team
# Last Updated: 2024
#
# Features:
# - Progressive hit tracking system
# - Probability-based lightning mechanics
# - Cooldown management with persistence
# - Enchantment integration
# - Particle effect rendering
# ====================================
options:
# ====================================
# CORE CONFIGURATION
# ====================================
prefix: &6[⚡ Zeus] &r
# Lightning Mechanics
lightning-chance: 10
lightning-damage: 2.5
cooldown-duration: 100
# Visual Effects Configuration
particle-effect: flame
particle-count: 30
sound-effect: entity.lightning_bolt.thunder
# Item Display Configuration
sword-material: netherite_sword
sword-name: §x§F§F§F§8§0§0L§x§F§1§E§A§0§1i§x§E§2§D§C§0§1g§x§D§4§C§E§0§2h§x§C§6§C§0§0§3t§x§B§7§B§2§0§3i§x§A§9§A§4§0§4n§x§9§B§9§7§0§5g §x§7§E§7§B§0§6S§x§7§0§6§D§0§7w§x§6§2§5§F§0§8o§x§5§3§5§1§0§8r§x§4§5§4§3§0§9d
# Lore Configuration
sword-lore: §x§F§F§F§8§0§0E§x§F§B§F§5§0§0v§x§F§8§F§1§0§0e§x§F§4§E§E§0§1r§x§F§1§E§A§0§1y §x§E§A§E§3§0§15§x§E§6§E§0§0§1t§x§E§2§D§C§0§1h §x§D§B§D§5§0§2h§x§D§8§D§2§0§2i§x§D§4§C§E§0§2t §x§C§D§C§7§0§2t§x§C§9§C§4§0§3h§x§C§6§C§0§0§3e§x§C§2§B§D§0§3r§x§B§F§B§9§0§3e §x§B§7§B§2§0§3i§x§B§4§A§F§0§4s §x§A§D§A§8§0§41§x§A§9§A§4§0§40§x§A§6§A§1§0§4% §x§9§E§9§A§0§5c§x§9§B§9§7§0§5h§x§9§7§9§3§0§5a§x§9§4§9§0§0§5n§x§9§0§8§C§0§5c§x§8§D§8§9§0§6e §x§8§5§8§2§0§6t§x§8§2§7§E§0§6o §x§7§B§7§7§0§6s§x§7§7§7§4§0§7u§x§7§4§7§0§0§7m§x§7§0§6§D§0§7m§x§6§C§6§9§0§7o§x§6§9§6§6§0§7n §x§6§2§5§F§0§8l§x§5§E§5§B§0§8i§x§5§A§5§8§0§8g§x§5§7§5§4§0§8h§x§5§3§5§1§0§8t§x§5§0§4§D§0§8n§x§4§C§4§A§0§9i§x§4§9§4§6§0§9n§x§4§5§4§3§0§9g
# Enchantment Settings
# Sword comes fully enchanted (all enchantments except knockback)
# Debug & Admin Settings
debug-mode: false
admin-notifications: true
# ====================================
# SYSTEM INITIALIZATION
# ====================================
on script load:
send "{@prefix} &aLightning Combat System Loaded Successfully" to console
send "{@prefix} &7Version 2.4.1 - Build 20240115" to console
send "{@prefix} &7Initializing hit tracking database..." to console
send "{@prefix} &7Loading cooldown management system..." to console
send "{@prefix} &7Registering event handlers..." to console
send "{@prefix} &7Compiling particle effect renderers..." to console
send "{@prefix} &7Validating enchantment configurations..." to console
send "{@prefix} &6All systems operational!" to console
on script unload:
send "{@prefix} &cShutting down combat systems..." to console
send "{@prefix} &7Saving player data..." to console
send "{@prefix} &7Clearing memory allocations..." to console
delete {zeus.hits::*}
delete {zeus.cooldown::*}
# ====================================
# VARIABLE DECLARATIONS & MANAGEMENT
# ====================================
# Format: {zeus.hits::%player%} = integer (0-5)
# Tracks consecutive hits for lightning trigger
# Resets after lightning strike or miss
# Format: {zeus.cooldown::%player%} = timestamp
# Manages 100 second cooldown between lightning strikes
# Prevents ability spam and maintains balance
# Format: {zeus.particles::%player%} = boolean
# Particle effect preference toggle
# Default: enabled for all players
# ====================================
# PRIMARY COMBAT EVENT HANDLER
# ====================================
on damage:
# Validate attacker and weapon
attacker is a player
attacker's tool is a netherite sword
# Get weapon metadata for identification
set {_item} to attacker's tool
name of {_item} is set
# Check if weapon matches Zeus Sword signature
if name of {_item} contains "ighting Sword":
# =====================================
# COOLDOWN VERIFICATION SYSTEM
# =====================================
# Check if player is on cooldown
if {zeus.cooldown::%attacker%} is set:
if difference between now and {zeus.cooldown::%attacker%} < {@cooldown-duration} seconds:
# Calculate remaining cooldown
set {_elapsed} to difference between {zeus.cooldown::%attacker%} and now
set {_remaining} to {@cooldown-duration} - {_elapsed}
send action bar "&c
n⚡ Lightning Recharging: &e%{_remaining}% &cseconds" to attacker
play sound "block.note_block.bass" at volume 0.5 to attacker
stop
# =====================================
# PROBABILITY CALCULATION ENGINE
# =====================================
# Generate random number for chance calculation
set {_random} to random integer between 1 and 100
# Check if probability threshold met
if {_random} <= {@lightning-chance}:
# =====================================
# LIGHTNING STRIKE EXECUTION
# =====================================
# Set cooldown timestamp
set {zeus.cooldown::%attacker%} to now
# Get victim location for targeting
set {_victimLoc} to location of victim
# Spawn visual lightning effect
strike lightning effect at {_victimLoc}
# Apply lightning damage to victim
damage victim by {@lightning-damage}
# =====================================
# PARTICLE EFFECT RENDERING
# =====================================
# Spawn particle burst at impact location
loop 30 times:
show {@particle-effect} at victim
# Additional electric particle effects
loop 15 times:
show crit at victim
# =====================================
# AUDIO FEEDBACK SYSTEM
# =====================================
# Thunder sound for attacker
play sound "{@sound-effect}" at volume 1.5 to attacker
# Thunder sound for victim
play sound "{@sound-effect}" at volume 1.5 to victim
# Ambient sound for nearby players
loop all players in radius 15 of {_victimLoc}:
play sound "entity.lightning_bolt.impact" at volume 0.8 to loop-player
# =====================================
# PLAYER NOTIFICATION SYSTEM
# =====================================
# Success message to attacker
send "{@prefix} &6⚡ &eZeus's wrath strikes down your enemy!" to attacker
send action bar "&6⚡ LIGHTNING STRIKE! &e-%{@lightning-damage}% ❤" to attacker
# Impact notification to victim
send action bar "&c⚡ Struck by Zeus's Lightning! &4-%{@lightning-damage}% ❤" to victim
# Admin notification system
if {@admin-notifications} is true:
loop all players:
if loop-player has permission "zeus.admin":
send "&8[&7ZEUS&8] &e%attacker% &7struck &e%victim% &7with lightning" to loop-player
# ====================================
# ITEM DISTRIBUTION COMMAND
# ====================================
command /getzeus:
permission: op
permission message: {@prefix} &cYou don't have permission to use this command!
trigger:
# Create sword with specifications (fully enchanted except knockback)
set {_sword} to netherite sword named "{@sword-name}" with lore "{@sword-lore}"
enchant {_sword} with sharpness 5
enchant {_sword} with fire aspect 2
enchant {_sword} with looting 3
enchant {_sword} with unbreaking 3
enchant {_sword} with mending 1
give player {_sword}
# Confirmation message