# KuolemanLoukku
on skript load:
register new custom shaped recipe with result beetroot soup using sugar, water, wheat, wheat
# register new custom shapeless recipe with result blaze rod with lore "&eYdin: Taikasieni" using brown mushroom, nether star, redstone, air, stick, air, feather, stick, air
on craft:
if event-item is blaze powder:
cancel event
# Aateliset
command /lisaa-ammatti [<text>]:
trigger:
if player is "JustRaikas":
add arg-1 to {ammatit::*}
send "&cLisätty"
command /erota [<player>]:
trigger:
command /alamainen [<player>]:
trigger:
command /aatelinen [<player>]:
trigger:
command /nimitä [<player>] [<text>]:
trigger:
if arg-1 is not set:
send "&eSyötä kuka nimitetään"
stop
if arg-2 is not set:
send "&eSyötä mihin arvoon &c%arg-1% &enimitetään"
stop
if {ammatit::*} contains arg-2:
set {%arg-1's uuid%::ammatti} to "%arg-2%"
else:
send "&cAmmattia ei löytynyt"
command /kivetä [<player>] [<text>]:
trigger:
command /puolla [<offline player>]:
trigger:
if {%arg-1%::saaty} is "Kivisydän":
#Alkoholi
on skript load:
register new custom shapeless recipe with result potion with lore "&cSiideri" using brown mushroom, water bottle, apple, air, sugar, sugar, air, air, air
#Lukkosysteemi
on rightclick:
event-block is any door
player's tool is magma cream
{%event-block%::lukossa} is not true
if name of player's tool is "Magma Cream":
if block under event-block is door:
set {%event-block%::lukossa} to true
set {%block under event-block%::lukossa} to true
set {%event-block%::lukossa:lukonnimi} to "Stone Hoe"
set {%block under event-block%::lukossa:lukonnimi} to "Stone Hoe"
wait 1 tick
remove player's tool from player
send "&eOvi on nyt lukittu"
if block above event-block is door:
set {%event-block%::lukossa} to true
set {%block above event-block%::lukossa} to true
set {%event-block%::lukossa:lukonnimi} to "Stone Hoe"
set {%block above event-block%::lukossa:lukonnimi} to "Stone Hoe"
wait 1 tick
remove player's tool from player
send "&eOvi on nyt lukittu"
stop
if block under event-block is door:
set {%event-block%::lukossa} to true
set {%block under event-block%::lukossa} to true
set {%event-block%::lukossa:lukonnimi} to name of player's tool
set {%block under event-block%::lukossa:lukonnimi} to name of player's tool
wait 1 tick
remove player's tool from player
send "&eOvi on nyt lukittu"
if block above event-block is door:
set {%event-block%::lukossa} to true
set {%block above event-block%::lukossa} to true
set {%event-block%::lukossa:lukonnimi} to name of player's tool
set {%block above event-block%::lukossa:lukonnimi} to name of player's tool
wait 1 tick
remove player's tool from player
send "&eOvi on nyt lukittu"
on rightclick:
event-block is door
player's tool is stone hoe
{%event-block%::lukossa} is true
if name of player's tool is not {%event-block%::lukossa::lukonnimi}:
cancel event
send "&cAvain ei sovi lukkoon"
set {rikkiavain} to random integer between 1 to 50
if {rikkiavain} is 5:
remove player's tool from player
send "&eVoihan rämä! Avaimesi meni rikki"
else:
send player title "&eLukko aukesi"
on leftclick:
event-block is door
player's tool is stone hoe
{%event-block%::lukossa} is true
if name of player's tool is not {%event-block%::lukossa::lukonnimi}:
send "&cYrität irrottaa lukkoa muta avain ei väänny."
else:
if block above event-block is door:
send "Lukko irtoaa ovesta"
give player magma cream named {%event-block%::lukossa::lukonnimi}
delete {%event-block%::*}
delete {%block above event-block%::*}
if block under event-block is door:
send "Lukko irtoaa ovesta"
give player magma cream named {%event-block%::lukossa::lukonnimi}
delete {%event-block%::*}
delete {%block under event-block%::*}
#Postisysteemi
on place:
event-block is sign
if block behind sign is chest:
line 1 of event-block is "Postilaatikko"
if {%player's uuid%::postiosoite} is not set:
set line 3 of event-block to "&e%player%"
set {%player's uuid%::postiosoite} to block behind event-block
else:
set line 3 of event-block to "&c%player%"
set line 4 of event-block to "&3Epävirallinen"
on break:
if event-block is sign:
if block behind event-block is chest:
if {%player's uuid%::postiosoite} is location of block behind event-block:
delete {%player's uuid::postiosoite}
send "Postiosoite poistettu"
else:
send "&cVain postilaatikon omistaja voi tuhota sen"
if event-block is chest:
if block in front event-block is sign:
if {%player's uuid%::postiosoite} is location of event-block:
delete {%player's uuid::postiosoite}
send "Postiosoite poistettu"
else:
send "&cVain postilaatikon omistaja voi tuhota sen"
cancel event
#Pankkisysteemi
on rightclick on iron block:
player has permission "pankki.painarahaa"
block above event-block is air
block 2 blocks above event-block is piston
block above 3 blocks event-block is chest
loop all items in block 3 blocks above event-block:
if loop-item is lapiz lazuli:
remove loop-item from block 3 blocks above event-block
drop 2 blaze powder at 1 block above event-block
if loop-item is flint:
remove loop-item from block 3 blocks above event-block
drop 2 ghast tear at 1 block above event-block
on rightclick:
player's tool is paper
lore of player's tool contains "&eKKP"
if {%name of player's tool%::saldo} is not set:
send "&cPankkitiliä ei löytynyt. Se on saatettu sulkea"
stop
send "%{%name of player's tool%::saldo}%"
command /uusipankkitili:
permission ammatit.pankkiiri
permission message: Et ole Pankkiiri
trigger:
if player have 50 blaze powder:
remove 50 blaze powder from player
set {_tilinimi} to "KKP-%random integer between 1 and 99999999%"
give player paper named {_tilinimi} with lore "&eKKP | Kuololan KeskusPankki"
set {%{_tilinimi}%::saldo} to 0
command /pankkivirkailija [<number>]:
permission: ammatit.pankkivirkailija
permission message: Et ole Pankkivirkailija tai Pankkiiri!
trigger:
if arg-1 is not set:
send "&cKuinka paljon aiot nostaa/tallettaa rahaa?"
stop
if player's tool is paper:
lore of player's tool contains "&eKKP"
if {%name of player's tool%::saldo} is not set:
send "&cPankkitiliä ei löytynyt. Se on saatettu sulkea"
stop
open chest with 1 row named "&cPankki | %player%" to player
format slot 1 of player with blaze rod named "&cNosta rahaa" to close then run [pankki("nosta", player, name of player's tool, arg-1)]
format slot 7 of player with blaze rod named "&cTalleta rahaa" to close then run [pankki("talleta", player, name of player's tool, arg-1)]
on anvil rename:
event-item's lore contains "&eKKP"
cancel event
send "&cPankkiasioihin liittyviä papereita ei voi uudelleennimetä"
function pankki(tapa: text , p: player, tili: text , maara: number):
if {_tapa} is "nosta":
if {%{_tili}%::saldo} is smaller than {_maara}:
give {%{_tili}%::saldo} blaze powder to {_p}
set {%{_tili}%::saldo} to 0
else:
give {_maara} blaze powder to {_p}
remove {_maara} from {%{_tili}%::saldo}
if {_tapa} is "talleta":
if {_p} have {_maara} blaze powder:
remove {_maara} blaze powder from {_p}
add {_maara} to {%{_tili}%::saldo}
#Istuminen
on player drink:
if {%player's uuid%::jano} is 100:
cancel event
send "&eEt jaksa juoda enempää"
else:
add random integer between 1 and 20 to {%player's uuid%::jano}
if {%player's uuid%::jano} is greater than 100:
set {%player's uuid%::jano} to 100
send "<blue>Janotilanteesi: %{%player's uuid%::jano}%"
every 120 seconds:
loop all players:
if {%loop-player's uuid%::jano} is 0:
damage player by 5 hearts
send "Kuihdut janonpuutteen takia!"
stop
if loop-player is sprinting:
if biome at loop-player is desert:
remove random integer between 10 and 30 from {%loop-player's uuid%::jano}
else:
remove random integer between 5 and 25 from {%loop-player's uuid%::jano}
else:
if biome at loop-player is desert:
remove random integer between 5 and 25 from {%loop-player's uuid%::jano}
else:
remove random integer between 5 and 20 from {%loop-player's uuid%::jano}
on rightclick on any stairs:
spawn armor stand at location below event-block
set {_entity} to last spawned entity
set is visible of {_entity} to false
make player ride {_entity}
while {_entity} exists:
if player is sneaking:
eject any passenger of {_entity}
wait 2 ticks
delete {_entity}
wait 5 tick
on message:
cancel event
if {%player%.channel} is "global":
broadcast "&7[&r%{%player's uuid%::prefix}%&7] &e%player% &2%message%"
else if {%player%.channel} is "local":
send "&7[&r%{%player's uuid%::prefix}%&7] &e%player% &e%message%" to all players in radius 99 of player
else if {%player%.channel} is "kuiskaa":
send "&7[&r%{%player's uuid%::prefix}%&7] &e%player% &e%message%" to all players in radius 10 of player
else if {%player%.channel} is "vartiostot":
loop all players:
loop-player has permission "kanavat.var"
send "&7[&r%{%player's uuid%::prefix}%&7] &e%player% &e%message%" to loop-player
command /kanava [<text>]:
trigger:
if arg-1 is not set:
send "&eKanavat"
send ""
send "&cglobal"
send "&clocal"
send "&ckuiskaa"
if player has permission "kanavat.var":
send "&cvartiostot"
if arg-1 is "global" or "g":
set {%player%.kanava} to "global"
send "&cVaihdettu kanavalle %arg-1%"
if arg-1 is "local" or "l":
set {%player%.kanava} to "local"
send "&cVaihdettu kanavalle %arg-1%"
if arg-1 is "kuiskaa" or "k":
set {%player%.kanava} to "kuiskaa"
send "&cVaihdettu kanavalle %arg-1%"
if arg-1 is "vartiostot" or "var":
player has permission "kanavat.var"
set {%player%.kanava} to "vartiostot"
send "&cVaihdettu kanavalle %arg-1%"
on join:
set {%player%.channel} to "global"
if {%player's uuid%::ammatti} is not set:
if {%player's uuid%::saaty} is "Aatelinen":
set {%player's uuid%::prefix} to "&eAatelinen"
if {%player's uuid%::saaty} is "Alamainen":
set {%player's uuid%::prefix} to "Alamainen"
if {%player's uuid%::saaty} is "Irtolainen":
set {%player's uuid%::prefix} to "Irtolainen"
else:
set {%player's uuid%::prefix} to {%player's uuid%::ammatti}
on skript load:
register new custom shaped recipe with result beetroot soup using sugar, water, wheat, wheat
# register new custom shapeless recipe with result blaze rod with lore "&eYdin: Taikasieni" using brown mushroom, nether star, redstone, air, stick, air, feather, stick, air
on craft:
if event-item is blaze powder:
cancel event
# Aateliset
command /lisaa-ammatti [<text>]:
trigger:
if player is "JustRaikas":
add arg-1 to {ammatit::*}
send "&cLisätty"
command /erota [<player>]:
trigger:
command /alamainen [<player>]:
trigger:
command /aatelinen [<player>]:
trigger:
command /nimitä [<player>] [<text>]:
trigger:
if arg-1 is not set:
send "&eSyötä kuka nimitetään"
stop
if arg-2 is not set:
send "&eSyötä mihin arvoon &c%arg-1% &enimitetään"
stop
if {ammatit::*} contains arg-2:
set {%arg-1's uuid%::ammatti} to "%arg-2%"
else:
send "&cAmmattia ei löytynyt"
command /kivetä [<player>] [<text>]:
trigger:
command /puolla [<offline player>]:
trigger:
if {%arg-1%::saaty} is "Kivisydän":
#Alkoholi
on skript load:
register new custom shapeless recipe with result potion with lore "&cSiideri" using brown mushroom, water bottle, apple, air, sugar, sugar, air, air, air
#Lukkosysteemi
on rightclick:
event-block is any door
player's tool is magma cream
{%event-block%::lukossa} is not true
if name of player's tool is "Magma Cream":
if block under event-block is door:
set {%event-block%::lukossa} to true
set {%block under event-block%::lukossa} to true
set {%event-block%::lukossa:lukonnimi} to "Stone Hoe"
set {%block under event-block%::lukossa:lukonnimi} to "Stone Hoe"
wait 1 tick
remove player's tool from player
send "&eOvi on nyt lukittu"
if block above event-block is door:
set {%event-block%::lukossa} to true
set {%block above event-block%::lukossa} to true
set {%event-block%::lukossa:lukonnimi} to "Stone Hoe"
set {%block above event-block%::lukossa:lukonnimi} to "Stone Hoe"
wait 1 tick
remove player's tool from player
send "&eOvi on nyt lukittu"
stop
if block under event-block is door:
set {%event-block%::lukossa} to true
set {%block under event-block%::lukossa} to true
set {%event-block%::lukossa:lukonnimi} to name of player's tool
set {%block under event-block%::lukossa:lukonnimi} to name of player's tool
wait 1 tick
remove player's tool from player
send "&eOvi on nyt lukittu"
if block above event-block is door:
set {%event-block%::lukossa} to true
set {%block above event-block%::lukossa} to true
set {%event-block%::lukossa:lukonnimi} to name of player's tool
set {%block above event-block%::lukossa:lukonnimi} to name of player's tool
wait 1 tick
remove player's tool from player
send "&eOvi on nyt lukittu"
on rightclick:
event-block is door
player's tool is stone hoe
{%event-block%::lukossa} is true
if name of player's tool is not {%event-block%::lukossa::lukonnimi}:
cancel event
send "&cAvain ei sovi lukkoon"
set {rikkiavain} to random integer between 1 to 50
if {rikkiavain} is 5:
remove player's tool from player
send "&eVoihan rämä! Avaimesi meni rikki"
else:
send player title "&eLukko aukesi"
on leftclick:
event-block is door
player's tool is stone hoe
{%event-block%::lukossa} is true
if name of player's tool is not {%event-block%::lukossa::lukonnimi}:
send "&cYrität irrottaa lukkoa muta avain ei väänny."
else:
if block above event-block is door:
send "Lukko irtoaa ovesta"
give player magma cream named {%event-block%::lukossa::lukonnimi}
delete {%event-block%::*}
delete {%block above event-block%::*}
if block under event-block is door:
send "Lukko irtoaa ovesta"
give player magma cream named {%event-block%::lukossa::lukonnimi}
delete {%event-block%::*}
delete {%block under event-block%::*}
#Postisysteemi
on place:
event-block is sign
if block behind sign is chest:
line 1 of event-block is "Postilaatikko"
if {%player's uuid%::postiosoite} is not set:
set line 3 of event-block to "&e%player%"
set {%player's uuid%::postiosoite} to block behind event-block
else:
set line 3 of event-block to "&c%player%"
set line 4 of event-block to "&3Epävirallinen"
on break:
if event-block is sign:
if block behind event-block is chest:
if {%player's uuid%::postiosoite} is location of block behind event-block:
delete {%player's uuid::postiosoite}
send "Postiosoite poistettu"
else:
send "&cVain postilaatikon omistaja voi tuhota sen"
if event-block is chest:
if block in front event-block is sign:
if {%player's uuid%::postiosoite} is location of event-block:
delete {%player's uuid::postiosoite}
send "Postiosoite poistettu"
else:
send "&cVain postilaatikon omistaja voi tuhota sen"
cancel event
#Pankkisysteemi
on rightclick on iron block:
player has permission "pankki.painarahaa"
block above event-block is air
block 2 blocks above event-block is piston
block above 3 blocks event-block is chest
loop all items in block 3 blocks above event-block:
if loop-item is lapiz lazuli:
remove loop-item from block 3 blocks above event-block
drop 2 blaze powder at 1 block above event-block
if loop-item is flint:
remove loop-item from block 3 blocks above event-block
drop 2 ghast tear at 1 block above event-block
on rightclick:
player's tool is paper
lore of player's tool contains "&eKKP"
if {%name of player's tool%::saldo} is not set:
send "&cPankkitiliä ei löytynyt. Se on saatettu sulkea"
stop
send "%{%name of player's tool%::saldo}%"
command /uusipankkitili:
permission ammatit.pankkiiri
permission message: Et ole Pankkiiri
trigger:
if player have 50 blaze powder:
remove 50 blaze powder from player
set {_tilinimi} to "KKP-%random integer between 1 and 99999999%"
give player paper named {_tilinimi} with lore "&eKKP | Kuololan KeskusPankki"
set {%{_tilinimi}%::saldo} to 0
command /pankkivirkailija [<number>]:
permission: ammatit.pankkivirkailija
permission message: Et ole Pankkivirkailija tai Pankkiiri!
trigger:
if arg-1 is not set:
send "&cKuinka paljon aiot nostaa/tallettaa rahaa?"
stop
if player's tool is paper:
lore of player's tool contains "&eKKP"
if {%name of player's tool%::saldo} is not set:
send "&cPankkitiliä ei löytynyt. Se on saatettu sulkea"
stop
open chest with 1 row named "&cPankki | %player%" to player
format slot 1 of player with blaze rod named "&cNosta rahaa" to close then run [pankki("nosta", player, name of player's tool, arg-1)]
format slot 7 of player with blaze rod named "&cTalleta rahaa" to close then run [pankki("talleta", player, name of player's tool, arg-1)]
on anvil rename:
event-item's lore contains "&eKKP"
cancel event
send "&cPankkiasioihin liittyviä papereita ei voi uudelleennimetä"
function pankki(tapa: text , p: player, tili: text , maara: number):
if {_tapa} is "nosta":
if {%{_tili}%::saldo} is smaller than {_maara}:
give {%{_tili}%::saldo} blaze powder to {_p}
set {%{_tili}%::saldo} to 0
else:
give {_maara} blaze powder to {_p}
remove {_maara} from {%{_tili}%::saldo}
if {_tapa} is "talleta":
if {_p} have {_maara} blaze powder:
remove {_maara} blaze powder from {_p}
add {_maara} to {%{_tili}%::saldo}
#Istuminen
on player drink:
if {%player's uuid%::jano} is 100:
cancel event
send "&eEt jaksa juoda enempää"
else:
add random integer between 1 and 20 to {%player's uuid%::jano}
if {%player's uuid%::jano} is greater than 100:
set {%player's uuid%::jano} to 100
send "<blue>Janotilanteesi: %{%player's uuid%::jano}%"
every 120 seconds:
loop all players:
if {%loop-player's uuid%::jano} is 0:
damage player by 5 hearts
send "Kuihdut janonpuutteen takia!"
stop
if loop-player is sprinting:
if biome at loop-player is desert:
remove random integer between 10 and 30 from {%loop-player's uuid%::jano}
else:
remove random integer between 5 and 25 from {%loop-player's uuid%::jano}
else:
if biome at loop-player is desert:
remove random integer between 5 and 25 from {%loop-player's uuid%::jano}
else:
remove random integer between 5 and 20 from {%loop-player's uuid%::jano}
on rightclick on any stairs:
spawn armor stand at location below event-block
set {_entity} to last spawned entity
set is visible of {_entity} to false
make player ride {_entity}
while {_entity} exists:
if player is sneaking:
eject any passenger of {_entity}
wait 2 ticks
delete {_entity}
wait 5 tick
on message:
cancel event
if {%player%.channel} is "global":
broadcast "&7[&r%{%player's uuid%::prefix}%&7] &e%player% &2%message%"
else if {%player%.channel} is "local":
send "&7[&r%{%player's uuid%::prefix}%&7] &e%player% &e%message%" to all players in radius 99 of player
else if {%player%.channel} is "kuiskaa":
send "&7[&r%{%player's uuid%::prefix}%&7] &e%player% &e%message%" to all players in radius 10 of player
else if {%player%.channel} is "vartiostot":
loop all players:
loop-player has permission "kanavat.var"
send "&7[&r%{%player's uuid%::prefix}%&7] &e%player% &e%message%" to loop-player
command /kanava [<text>]:
trigger:
if arg-1 is not set:
send "&eKanavat"
send ""
send "&cglobal"
send "&clocal"
send "&ckuiskaa"
if player has permission "kanavat.var":
send "&cvartiostot"
if arg-1 is "global" or "g":
set {%player%.kanava} to "global"
send "&cVaihdettu kanavalle %arg-1%"
if arg-1 is "local" or "l":
set {%player%.kanava} to "local"
send "&cVaihdettu kanavalle %arg-1%"
if arg-1 is "kuiskaa" or "k":
set {%player%.kanava} to "kuiskaa"
send "&cVaihdettu kanavalle %arg-1%"
if arg-1 is "vartiostot" or "var":
player has permission "kanavat.var"
set {%player%.kanava} to "vartiostot"
send "&cVaihdettu kanavalle %arg-1%"
on join:
set {%player%.channel} to "global"
if {%player's uuid%::ammatti} is not set:
if {%player's uuid%::saaty} is "Aatelinen":
set {%player's uuid%::prefix} to "&eAatelinen"
if {%player's uuid%::saaty} is "Alamainen":
set {%player's uuid%::prefix} to "Alamainen"
if {%player's uuid%::saaty} is "Irtolainen":
set {%player's uuid%::prefix} to "Irtolainen"
else:
set {%player's uuid%::prefix} to {%player's uuid%::ammatti}