command /slayerblade:
permission: op
trigger:
give player a netherite sword named "&6Slayer Blade" with lore "&7Automatically sells mob drops"
send "&aYou have received the &6Slayer Blade&a!" to player
command /slayblade:
permission: op
trigger:
give player a netherite sword named "&6Slayer Blade" with lore "&7Automatically sells mob drops"
send "&aYou have received the &6Slayer Blade&a!" to player
on death of a living entity:
if attacker is a player:
if attacker's tool is a netherite sword named "&6Slayer Blade":
add 1 to {slayerblade::kills::%attacker's uuid%}
call updateSlayerBladeLevel(attacker)
set {_multiplier} to call getMultiplier(attacker)
set {_drops::*} to drops
clear drops
loop {_drops::*}:
set {_worth} to call itemWorth(loop-item)
set {_value} to loop-item's amount * {_worth} * {_multiplier}
add {_value} to {balance::%attacker's uuid%}
send "&aSold mob drops for &6%{_value}% &acurrency!" to attacker
function updateSlayerBladeLevel(p: player):
set {_uuid} to "%{_p's uuid}%"
set {_kills} to {slayerblade::kills::%{_uuid}%}
set {_currentLevel} to {slayerblade::level::%{_uuid}%}
if {_currentLevel} is not set:
set {_currentLevel} to 0
set {_requiredKills} to ({_currentLevel} + 1) * 500
if {_kills} >= {_requiredKills}:
add 1 to {slayerblade::level::%{_uuid}%}
set {slayerblade::kills::%{_uuid}%} to 0
send "&aYour Slayer Blade is now level &6%{slayerblade::level::%{_uuid}%}%&a!" to {_p}
function getMultiplier(p: player) :: number:
set {_uuid} to "%{_p's uuid}%"
set {_level} to {slayerblade::level::%{_uuid}%}
if {_level} is not set:
set {_level} to 0
set {_multiplier} to 1.1 + {_level} * 0.1
return {_multiplier}
function itemWorth(i: itemtype) :: number:
set {_price} to 0
if {_i} is rotten flesh:
set {_price} to 1
if {_i} is bone:
set {_price} to 2
if {_i} is string:
set {_price} to 2
if {_i} is spider eye:
set {_price} to 3
if {_i} is gunpowder:
set {_price} to 3
if {_i} is ender pearl:
set {_price} to 10
if {_i} is blaze rod:
set {_price} to 8
if {_i} is ghast tear:
set {_price} to 15
if {_i} is slimeball:
set {_price} to 5
if {_i} is leather:
set {_price} to 4
if {_i} is raw beef:
set {_price} to 4
if {_i} is raw porkchop:
set {_price} to 4
if {_i} is raw chicken:
set {_price} to 3
if {_i} is feather:
set {_price} to 1
if {_i} is wool:
set {_price} to 2
if {_i} is rabbit hide:
set {_price} to 2
if {_i} is rabbit foot:
set {_price} to 5
if {_i} is raw mutton:
set {_price} to 3
if {_i} is raw rabbit:
set {_price} to 3
if {_i} is cooked beef:
set {_price} to 5
if {_i} is cooked porkchop:
set {_price} to 5
if {_i} is cooked chicken:
set {_price} to 4
if {_i} is cooked mutton:
set {_price} to 4
if {_i} is cooked rabbit:
set {_price} to 4
if {_i} is phantom membrane:
set {_price} to 7
if {_i} is shulker shell:
set {_price} to 10
if {_i} is nether star:
set {_price} to 100
if {_i} is wither skeleton skull:
set {_price} to 20
if {_i} is dragon's breath:
set {_price} to 50
if {_i} is rabbit's foot:
set {_price} to 5
if {_i} is pufferfish:
set {_price} to 3
if {_i} is tropical fish:
set {_price} to 2
if {_i} is cod:
set {_price} to 2
if {_i} is salmon:
set {_price} to 3
if {_i} is ink sac:
set {_price} to 4
if {_i} is nautilus shell:
set {_price} to 8
if {_i} is prismarine shard:
set {_price} to 6
if {_i} is prismarine crystals:
set {_price} to 7
if {_i} is turtle shell:
set {_price} to 12
if {_i} is trident:
set {_price} to 20
# Add more items and their worth as needed
return {_price}
permission: op
trigger:
give player a netherite sword named "&6Slayer Blade" with lore "&7Automatically sells mob drops"
send "&aYou have received the &6Slayer Blade&a!" to player
command /slayblade:
permission: op
trigger:
give player a netherite sword named "&6Slayer Blade" with lore "&7Automatically sells mob drops"
send "&aYou have received the &6Slayer Blade&a!" to player
on death of a living entity:
if attacker is a player:
if attacker's tool is a netherite sword named "&6Slayer Blade":
add 1 to {slayerblade::kills::%attacker's uuid%}
call updateSlayerBladeLevel(attacker)
set {_multiplier} to call getMultiplier(attacker)
set {_drops::*} to drops
clear drops
loop {_drops::*}:
set {_worth} to call itemWorth(loop-item)
set {_value} to loop-item's amount * {_worth} * {_multiplier}
add {_value} to {balance::%attacker's uuid%}
send "&aSold mob drops for &6%{_value}% &acurrency!" to attacker
function updateSlayerBladeLevel(p: player):
set {_uuid} to "%{_p's uuid}%"
set {_kills} to {slayerblade::kills::%{_uuid}%}
set {_currentLevel} to {slayerblade::level::%{_uuid}%}
if {_currentLevel} is not set:
set {_currentLevel} to 0
set {_requiredKills} to ({_currentLevel} + 1) * 500
if {_kills} >= {_requiredKills}:
add 1 to {slayerblade::level::%{_uuid}%}
set {slayerblade::kills::%{_uuid}%} to 0
send "&aYour Slayer Blade is now level &6%{slayerblade::level::%{_uuid}%}%&a!" to {_p}
function getMultiplier(p: player) :: number:
set {_uuid} to "%{_p's uuid}%"
set {_level} to {slayerblade::level::%{_uuid}%}
if {_level} is not set:
set {_level} to 0
set {_multiplier} to 1.1 + {_level} * 0.1
return {_multiplier}
function itemWorth(i: itemtype) :: number:
set {_price} to 0
if {_i} is rotten flesh:
set {_price} to 1
if {_i} is bone:
set {_price} to 2
if {_i} is string:
set {_price} to 2
if {_i} is spider eye:
set {_price} to 3
if {_i} is gunpowder:
set {_price} to 3
if {_i} is ender pearl:
set {_price} to 10
if {_i} is blaze rod:
set {_price} to 8
if {_i} is ghast tear:
set {_price} to 15
if {_i} is slimeball:
set {_price} to 5
if {_i} is leather:
set {_price} to 4
if {_i} is raw beef:
set {_price} to 4
if {_i} is raw porkchop:
set {_price} to 4
if {_i} is raw chicken:
set {_price} to 3
if {_i} is feather:
set {_price} to 1
if {_i} is wool:
set {_price} to 2
if {_i} is rabbit hide:
set {_price} to 2
if {_i} is rabbit foot:
set {_price} to 5
if {_i} is raw mutton:
set {_price} to 3
if {_i} is raw rabbit:
set {_price} to 3
if {_i} is cooked beef:
set {_price} to 5
if {_i} is cooked porkchop:
set {_price} to 5
if {_i} is cooked chicken:
set {_price} to 4
if {_i} is cooked mutton:
set {_price} to 4
if {_i} is cooked rabbit:
set {_price} to 4
if {_i} is phantom membrane:
set {_price} to 7
if {_i} is shulker shell:
set {_price} to 10
if {_i} is nether star:
set {_price} to 100
if {_i} is wither skeleton skull:
set {_price} to 20
if {_i} is dragon's breath:
set {_price} to 50
if {_i} is rabbit's foot:
set {_price} to 5
if {_i} is pufferfish:
set {_price} to 3
if {_i} is tropical fish:
set {_price} to 2
if {_i} is cod:
set {_price} to 2
if {_i} is salmon:
set {_price} to 3
if {_i} is ink sac:
set {_price} to 4
if {_i} is nautilus shell:
set {_price} to 8
if {_i} is prismarine shard:
set {_price} to 6
if {_i} is prismarine crystals:
set {_price} to 7
if {_i} is turtle shell:
set {_price} to 12
if {_i} is trident:
set {_price} to 20
# Add more items and their worth as needed
return {_price}