Add oneblock.sk
This commit is contained in:
487
oneblock.sk
Normal file
487
oneblock.sk
Normal file
@ -0,0 +1,487 @@
|
||||
on load:
|
||||
set {orecooldown::*} to 0
|
||||
set {mobcooldown::*} to 0
|
||||
set {hmobcooldown::*} to 0
|
||||
set {fmobcooldown::*} to 0
|
||||
set {sucobblecooldown::*} to 0
|
||||
set {ucobblecooldown::*} to 0
|
||||
set {cobblecooldown::*} to 0
|
||||
set {uorecooldown::*} to 0
|
||||
set {oneblock::*} to false
|
||||
|
||||
on damage:
|
||||
if attacker is a player:
|
||||
if {oneblock::%victim%.log} is false:
|
||||
send "&cYou've been hit. Log out within 10 seconds and you're dead." to victim
|
||||
set {oneblock::%victim%.log} to true
|
||||
wait 10 seconds
|
||||
set {oneblock::%victim%.log} to false
|
||||
send "&cYou can &lsafely &cLog out now." to victim
|
||||
|
||||
on quit:
|
||||
if {oneblock::%player%.log} is true:
|
||||
broadcast "&c%player% has combat logged!"
|
||||
|
||||
on join:
|
||||
message "Welcome to Deblok, a gamemode originally made by rare1k, and further developed by the Ethereal team." to player
|
||||
message "To start, break the dirt in the middle of the world." to player
|
||||
message "Once you collect some dirt, do /sell to sell your dirt, and /shop to buy materials!" to player
|
||||
message "Have fun!" to player
|
||||
set {oneblock::%player%.firstjoin} to true
|
||||
if {oneblock::%player%.log} is true:
|
||||
execute console command "/clear %player%"
|
||||
kill player
|
||||
send "&cYou combat logged so now all of your stuff is gone." to player
|
||||
send "By the way, nobody has your stuff." to player
|
||||
set {oneblock::%player%.log} to false
|
||||
|
||||
on every 5 seconds:
|
||||
if block at location(0.5, 64.5, 0.5, world "world") is not dirt or grass block:
|
||||
execute console command "/fill 0 64 0 0 64 0 dirt"
|
||||
|
||||
|
||||
command /store:
|
||||
aliases: /s
|
||||
permission: skript.cmd
|
||||
trigger:
|
||||
make player execute command "/shop"
|
||||
|
||||
|
||||
|
||||
on place of cobblestone:
|
||||
if enchantments of past event-block = Unbreaking 1:
|
||||
message "&cDecompress this by right clicking." to player
|
||||
cancel event
|
||||
on rightclick holding cobblestone:
|
||||
if enchantments of player's tool = Unbreaking 1:
|
||||
cancel event
|
||||
wait a tick
|
||||
remove 1 of cobblestone of unbreaking 1 from player
|
||||
loop 9 times:
|
||||
drop 1 cobblestone 2 blocks above player
|
||||
wait a tick
|
||||
on block break:
|
||||
if event-block's location = location(0.5, 64.5, 0.5, world "world"):
|
||||
cancel event
|
||||
if event-entity is a player:
|
||||
give 1 dirt to player
|
||||
|
||||
|
||||
on place:
|
||||
if event-block = water or lava:
|
||||
if enchantments of player's tool = Unbreaking 1:
|
||||
wait a tick
|
||||
remove 1 bucket from the player
|
||||
|
||||
on break:
|
||||
if "%event-block%" contains "glazed terracotta":
|
||||
if "%player's tool%" contains "shovel":
|
||||
cancel event
|
||||
message "&cYour shovel is too fast." to player
|
||||
if "%player's tool%" contains "pickaxe":
|
||||
cancel event
|
||||
if "%player's tool%" does not contain "pickaxe" or "shovel":
|
||||
cancel event
|
||||
message "&r" to player
|
||||
message "&cThis is the wrong tool." to player
|
||||
message "Use a &lshovel&r to break this." to player
|
||||
message "Use a &lpickaxe&r to use this." to player
|
||||
message "&r" to player
|
||||
|
||||
if "%player's tool%" contains "pickaxe":
|
||||
if event-block is light gray glazed terracotta:
|
||||
if {cobblecooldown::%event-block's location%%player%} = 1:
|
||||
cancel event
|
||||
exit
|
||||
set {cobblecooldown::%event-block's location%%player%} to 1
|
||||
drop cobblestone above event-block's location without velocity
|
||||
|
||||
loop 12 times:
|
||||
|
||||
make player see event-block as air
|
||||
wait 1 ticks
|
||||
set {cobblecooldown::%event-block's location%%player%} to 0
|
||||
make player see event-block as light gray glazed terracotta
|
||||
if event-block = gray glazed terracotta:
|
||||
if {ucobblecooldown::%event-block's location%%player%} = 1:
|
||||
cancel event
|
||||
exit
|
||||
set {ucobblecooldown::%event-block's location%%player%} to 1
|
||||
|
||||
loop 8 times:
|
||||
make player see event-block as gray stained glass
|
||||
wait 3 ticks
|
||||
drop cobblestone 2 blocks above event-block's location without velocity
|
||||
set {_num} to a random integer from 0 to 10
|
||||
if {_num} = 10:
|
||||
set {_chance} to a random integer from 1 to 4
|
||||
set {_item::1} to "lapis lazuli"
|
||||
set {_item::2} to "iron ingot"
|
||||
set {_item::3} to "redstone ore"
|
||||
set {_item::4} to "gold ingot"
|
||||
if {_chance} is not 3 or 1:
|
||||
send action bar "&aYou got a %({_item::%{_chance}%} parsed as an item)%" to player
|
||||
drop ({_item::%{_chance}%} parsed as an item) 2 blocks above event-block's location without velocity
|
||||
else:
|
||||
send action bar "&aYou got 8 %({_item::%{_chance}%} parsed as an item)%" to player
|
||||
drop 8 of ({_item::%{_chance}%} parsed as an item) 2 blocks above event-block's location without velocity
|
||||
|
||||
|
||||
loop 32 times:
|
||||
|
||||
make player see event-block as gray stained glass
|
||||
wait 1 ticks
|
||||
|
||||
set {ucobblecooldown::%event-block's location%%player%} to 0
|
||||
make player see event-block as gray glazed terracotta
|
||||
if event-block = green glazed terracotta:
|
||||
if {sucobblecooldown::%event-block's location%%player%} = 1:
|
||||
cancel event
|
||||
exit
|
||||
set {sucobblecooldown::%event-block's location%%player%} to 1
|
||||
|
||||
loop 3 times:
|
||||
loop 5 times:
|
||||
make player see event-block as green stained glass
|
||||
wait 4 ticks
|
||||
drop (cobblestone of unbreaking 1 named "&eSuper Cobblestone" with lore "Right click to decompress") 2 blocks above event-block's location without velocity
|
||||
set {_num} to a random integer from 0 to 10
|
||||
if {_num} > 7:
|
||||
set {_chance} to a random integer from 1 to 4
|
||||
set {_item::1} to "lapis lazuli"
|
||||
set {_item::2} to "iron ingot"
|
||||
set {_item::3} to "redstone ore"
|
||||
set {_item::4} to "gold ingot"
|
||||
if {_chance} is not 3 or 1:
|
||||
send action bar "&aYou got 3 %({_item::%{_chance}%} parsed as an item)%" to player
|
||||
drop 3 of ({_item::%{_chance}%} parsed as an item) 2 blocks above event-block's location without velocity
|
||||
else:
|
||||
send action bar "&aYou got 12 %({_item::%{_chance}%} parsed as an item)%" to player
|
||||
drop 12 of ({_item::%{_chance}%} parsed as an item) 2 blocks above event-block's location without velocity
|
||||
|
||||
|
||||
loop 60 times:
|
||||
|
||||
make player see event-block as green stained glass
|
||||
wait 1 ticks
|
||||
|
||||
set {sucobblecooldown::%event-block's location%%player%} to 0
|
||||
make player see event-block as green glazed terracotta
|
||||
if event-block = cyan glazed terracotta:
|
||||
set {_num} to a random integer from 0 to 100
|
||||
set {_mob} to a random integer from 1 to 9
|
||||
set {animal::1} to "cow"
|
||||
set {animal::2} to "chicken"
|
||||
set {animal::3} to "sheep"
|
||||
set {animal::4} to "cod"
|
||||
set {animal::5} to "rabbit"
|
||||
set {animal::6} to "salmon"
|
||||
set {animal::7} to "wolf"
|
||||
set {animal::8} to "pig"
|
||||
set {animal::9} to "mooshroom"
|
||||
set {hostile::1} to "zombie"
|
||||
set {hostile::2} to "skeleton"
|
||||
set {hostile::3} to "silverfish"
|
||||
set {hostile::4} to "creeper"
|
||||
set {hostile::5} to "phantom"
|
||||
set {hostile::6} to "spider"
|
||||
set {hostile::7} to "enderman"
|
||||
set {hostile::8} to "vindicator"
|
||||
set {hostile::9} to "pillager"
|
||||
if {mobcooldown::%event-block's location%%player%} = 1:
|
||||
cancel event
|
||||
exit
|
||||
set {mobcooldown::%event-block's location%%player%} to 1
|
||||
cancel event
|
||||
if {_num} > 66:
|
||||
send action bar "&cYou got a fiesty one!" to player
|
||||
spawn ({hostile::%{_mob}%} parsed as entity type) above event-block's location
|
||||
|
||||
else if {_num} > 0:
|
||||
send action bar "&eYou got a friendly one!" to player
|
||||
spawn ({animal::%{_mob}%} parsed as entity type) above event-block's location
|
||||
|
||||
loop 120 times:
|
||||
|
||||
make player see event-block as cyan stained glass
|
||||
wait 1 ticks
|
||||
set {mobcooldown::%event-block's location%%player%} to 0
|
||||
make player see event-block as cyan glazed terracotta
|
||||
if event-block = cyan glazed terracotta:
|
||||
set {_num} to a random integer from 0 to 100
|
||||
set {_mob} to a random integer from 1 to 9
|
||||
set {animal::1} to "cow"
|
||||
set {animal::2} to "chicken"
|
||||
set {animal::3} to "sheep"
|
||||
set {animal::4} to "cod"
|
||||
set {animal::5} to "rabbit"
|
||||
set {animal::6} to "salmon"
|
||||
set {animal::7} to "wolf"
|
||||
set {animal::8} to "pig"
|
||||
set {animal::9} to "mooshroom"
|
||||
set {hostile::1} to "zombie"
|
||||
set {hostile::2} to "skeleton"
|
||||
set {hostile::3} to "silverfish"
|
||||
set {hostile::4} to "creeper"
|
||||
set {hostile::5} to "phantom"
|
||||
set {hostile::6} to "spider"
|
||||
set {hostile::7} to "enderman"
|
||||
set {hostile::8} to "vindicator"
|
||||
set {hostile::9} to "pillager"
|
||||
if {mobcooldown::%event-block's location%%player%} = 1:
|
||||
cancel event
|
||||
exit
|
||||
set {mobcooldown::%event-block's location%%player%} to 1
|
||||
cancel event
|
||||
if {_num} > 66:
|
||||
send action bar "&cYou got a fiesty one!" to player
|
||||
spawn ({hostile::%{_mob}%} parsed as entity type) above event-block's location
|
||||
|
||||
else if {_num} > 0:
|
||||
send action bar "&eYou got a friendly one!" to player
|
||||
spawn ({animal::%{_mob}%} parsed as entity type) above event-block's location
|
||||
|
||||
loop 120 times:
|
||||
|
||||
make player see event-block as cyan stained glass
|
||||
wait 1 ticks
|
||||
set {mobcooldown::%event-block's location%%player%} to 0
|
||||
make player see event-block as cyan glazed terracotta
|
||||
if event-block = red glazed terracotta:
|
||||
set {_mob} to a random integer from 1 to 9
|
||||
set {hostile::1} to "zombie"
|
||||
set {hostile::2} to "skeleton"
|
||||
set {hostile::3} to "silverfish"
|
||||
set {hostile::4} to "creeper"
|
||||
set {hostile::5} to "phantom"
|
||||
set {hostile::6} to "spider"
|
||||
set {hostile::7} to "enderman"
|
||||
set {hostile::8} to "vindicator"
|
||||
set {hostile::9} to "pillager"
|
||||
if {hmobcooldown::%event-block's location%%player%} = 1:
|
||||
cancel event
|
||||
exit
|
||||
set {hmobcooldown::%event-block's location%%player%} to 1
|
||||
cancel event
|
||||
send action bar "&cYou got a %({hostile::%{_mob}%} parsed as entity type)%!" to player
|
||||
spawn ({hostile::%{_mob}%} parsed as entity type) above event-block's location
|
||||
|
||||
loop 100 times:
|
||||
|
||||
make player see event-block as red stained glass
|
||||
wait 1 ticks
|
||||
set {hmobcooldown::%event-block's location%%player%} to 0
|
||||
make player see event-block as red glazed terracotta
|
||||
if event-block = blue glazed terracotta:
|
||||
set {_mob} to a random integer from 1 to 9
|
||||
set {animal::1} to "cow"
|
||||
set {animal::2} to "chicken"
|
||||
set {animal::3} to "sheep"
|
||||
set {animal::4} to "cod"
|
||||
set {animal::5} to "rabbit"
|
||||
set {animal::6} to "salmon"
|
||||
set {animal::7} to "wolf"
|
||||
set {animal::8} to "pig"
|
||||
set {animal::9} to "mooshroom"
|
||||
if {fmobcooldown::%event-block's location%%player%} = 1:
|
||||
cancel event
|
||||
exit
|
||||
set {fmobcooldown::%event-block's location%%player%} to 1
|
||||
cancel event
|
||||
send action bar "&eYou got a %({animal::%{_mob}%} parsed as entity type)%!" to player
|
||||
spawn ({animal::%{_mob}%} parsed as entity type) above event-block's location
|
||||
|
||||
loop 100 times:
|
||||
|
||||
make player see event-block as blue stained glass
|
||||
wait 1 ticks
|
||||
set {fmobcooldown::%event-block's location%%player%} to 0
|
||||
make player see event-block as blue glazed terracotta
|
||||
if event-block = purple glazed terracotta:
|
||||
|
||||
cancel event
|
||||
if {uorecooldown::%player%} = 1:
|
||||
cancel event
|
||||
exit
|
||||
|
||||
set {uorecooldown::%player%} to 1
|
||||
loop 4 times:
|
||||
loop 20 times:
|
||||
set {_num} to a random integer from 0 to 100
|
||||
set {_amnt} to a random integer from 1 to 4
|
||||
make player see event-block as purple stained glass
|
||||
wait 1 ticks
|
||||
|
||||
if {_num} > 99:
|
||||
drop 1 ancient debris above event-block's location without velocity
|
||||
send action bar "&5You got 1 &lAncient Debris&r&e!" to player
|
||||
|
||||
else if {_num} > 88:
|
||||
drop 1 emerald above event-block's location without velocity
|
||||
send action bar "&5You got 1 &lEmerald&r&e!" to player
|
||||
|
||||
else if {_num} > 80:
|
||||
drop 1 diamond above event-block's location without velocity
|
||||
send action bar "&5You got 1 &lDiamond&r&e!" to player
|
||||
|
||||
else if {_num} > 70:
|
||||
drop {_amnt} of iron ingot above event-block's location without velocity
|
||||
send action bar "&eYou got %{_amnt}% &lIron&r&e!" to player
|
||||
|
||||
else if {_num} > 59:
|
||||
drop {_amnt} * 9 of gold nugget above event-block's location without velocity
|
||||
send action bar "&eYou got %{_amnt}% &lGold&r&e!" to player
|
||||
|
||||
else if {_num} > 23:
|
||||
drop {_amnt} of coal above event-block's location without velocity
|
||||
send action bar "&eYou got %{_amnt}% &lCoal&r&e!" to player
|
||||
|
||||
else if {_num} > 0:
|
||||
drop cobblestone above event-block's location without velocity
|
||||
send action bar "&eYou got &lCobblestone&r&e!" to player
|
||||
|
||||
set {uorecooldown::%player%} to 0
|
||||
make player see event-block as purple glazed terracotta
|
||||
|
||||
if event-block = light blue glazed terracotta:
|
||||
set {_num} to a random integer from 0 to 100
|
||||
set {_amnt} to a random integer from 1 to 4
|
||||
cancel event
|
||||
if {orecooldown::%event-block's location%%player%} = 1:
|
||||
cancel event
|
||||
exit
|
||||
|
||||
set {orecooldown::%event-block's location%%player%} to 1
|
||||
loop 120 times:
|
||||
|
||||
make player see event-block as light blue stained glass
|
||||
wait 1 ticks
|
||||
set {orecooldown::%event-block's location%%player%} to 0
|
||||
make player see event-block as light blue glazed terracotta
|
||||
|
||||
if {_num} = 99:
|
||||
drop 1 ancient debris above event-block's location without velocity
|
||||
send action bar "&5You got 1 &lAncient Debris&r&e!" to player
|
||||
exit
|
||||
if {_num} = 98:
|
||||
drop 1 emerald above event-block's location without velocity
|
||||
send action bar "&5You got 1 &lEmerald&r&e!" to player
|
||||
exit
|
||||
if {_num} = 97:
|
||||
drop 1 diamond above event-block's location without velocity
|
||||
send action bar "&5You got 1 &lDiamond&r&e!" to player
|
||||
exit
|
||||
if {_num} > 87:
|
||||
drop {_amnt} of iron ingot above event-block's location without velocity
|
||||
send action bar "&eYou got %{_amnt}% &lIron&r&e!" to player
|
||||
exit
|
||||
if {_num} > 79:
|
||||
drop {_amnt} * 9 of gold nugget above event-block's location without velocity
|
||||
send action bar "&eYou got %{_amnt}% &lGold&r&e!" to player
|
||||
exit
|
||||
if {_num} > 73:
|
||||
drop {_amnt} of coal above event-block's location without velocity
|
||||
send action bar "&eYou got %{_amnt}% &lCoal&r&e!" to player
|
||||
exit
|
||||
if {_num} > 10:
|
||||
drop cobblestone above event-block's location without velocity
|
||||
send action bar "&eYou got &lCobblestone&r&e!" to player
|
||||
exit
|
||||
if {_num} > 0:
|
||||
send action bar "&cYou got &lnothing." to player
|
||||
exit
|
||||
|
||||
|
||||
|
||||
on block damage:
|
||||
if "%event-block%" contains "glazed terracotta":
|
||||
if "%player's tool%" contains "shovel":
|
||||
wait 10 ticks
|
||||
if event-block = purple glazed terracotta:
|
||||
give player 9 light blue glazed terracotta named "&eOre Generator" with lore "Mine this with a shovel to break.", and "Mine this block with a pickaxe to have a chance to get an ore."
|
||||
if event-block = green glazed terracotta:
|
||||
give player green glazed terracotta of Unbreaking 1 named "&lSUPER UPGRADED &eCobblestone Generator" with lore "Mine this with a shovel to break.", and "Mine this block with a pickaxe to generate 25 cobblestone."
|
||||
if event-block = gray glazed terracotta:
|
||||
give player gray glazed terracotta of unbreaking 1 named "&lUPGRADED &eCobblestone Generator" with lore "Mine this with a shovel to break.", and "Mine this block with a pickaxe to generate 8 cobblestone."
|
||||
if event-block = red glazed terracotta:
|
||||
give player red glazed terracotta of Unbreaking 1 named "&lHostile &eMob Spawner" with lore "Mine this with a shovel to break.", and "Mine this block with a pickaxe to spawn 4 random hostile mobs."
|
||||
if event-block = blue glazed terracotta:
|
||||
give player blue glazed terracotta of Unbreaking 1 named "&lFriendly &eMob Spawner" with lore "Mine this with a shovel to break.", and "Mine this block with a pickaxe to spawn 4 random friendly mobs."
|
||||
if event-block = light gray glazed terracotta:
|
||||
give player light gray glazed terracotta named "&eCobblestone Generator" with lore "Mine this with a shovel to break.", and "Mine this block with a pickaxe to generate cobblestone."
|
||||
if event-block = light blue glazed terracotta:
|
||||
give player light blue glazed terracotta named "&eOre Generator" with lore "Mine this with a shovel to break.", and "Mine this block with a pickaxe to have a chance to get an ore."
|
||||
if event-block = cyan glazed terracotta:
|
||||
give player cyan glazed terracotta named "&9Mob Spawner" with lore "Mine this with a shovel to break.", and "Mine this block with a pickaxe to spawn a random mob."
|
||||
set event-block to air
|
||||
|
||||
|
||||
|
||||
|
||||
command /help [<string>]:
|
||||
trigger:
|
||||
if arg-1 is not set:
|
||||
message "&lDeblokMC Help&r:" to player
|
||||
message "&e/help generators&r for help on using generators" to player
|
||||
message "&e/getstarted&r to get started" to player
|
||||
else if arg-1 is "generators":
|
||||
message "To get started with a generator:" to player
|
||||
message "First you can mine it with a &epickaxe&r to &euse&r it." to player
|
||||
message "Then if you don't want it, mine it with a &cshovel&r to &cdestroy&r it." to player
|
||||
else if arg-1 is "getstarted":
|
||||
message "&cUse /getstarted." to player
|
||||
else:
|
||||
message "&cIncorrect usage. Try /help."
|
||||
command /getstarted:
|
||||
usage: /getstarted
|
||||
trigger:
|
||||
message "Welcome to Deblok! This is a gamemode originally created by rare1k, and continued by the Ethereal team." to player
|
||||
message "&eGet started by mining the piece of dirt in the center (at 0,0)." to player
|
||||
message "Then once you have enough dirt, you can sell it using &e/sellgui&r" to player
|
||||
message "and finally with your braincells (or money) you can buy other items using &e/shop&r or the Shop NPC" to player
|
||||
message "Have fun!" to player
|
||||
|
||||
|
||||
on death of a enderman:
|
||||
|
||||
set {_loc} to victim's location
|
||||
set {_num} to a random integer from 0 to 100
|
||||
if {_num} is 1:
|
||||
drop an ender eye at position of victim
|
||||
|
||||
on death of a skeleton:
|
||||
|
||||
set {_loc} to victim's location
|
||||
set {_num} to a random integer from 0 to 200
|
||||
if {_num} is 1:
|
||||
drop an wither skeleton skull at position of victim
|
||||
|
||||
on death of a creeper:
|
||||
set {_loc} to victim's location
|
||||
if attacker is a player:
|
||||
set {_num} to a random integer from 0 to 100
|
||||
set {_disc} to a random integer from 0 to 13
|
||||
set {discs::1} to "music disc 13"
|
||||
set {discs::2} to "music disc cat"
|
||||
set {discs::3} to "music disc 11"
|
||||
set {discs::4} to "music disc mellohi"
|
||||
set {discs::5} to "music disc blocks"
|
||||
set {discs::6} to "music disc chirp"
|
||||
set {discs::7} to "music disc far"
|
||||
set {discs::8} to "music disc mall"
|
||||
set {discs::9} to "music disc stal"
|
||||
set {discs::10} to "music disc strad"
|
||||
set {discs::11} to "music disc ward"
|
||||
set {discs::12} to "music disc wait"
|
||||
set {discs::13} to "music disc pigstep"
|
||||
if {_num} is 1:
|
||||
send action bar "&6You got &l%({discs::%{_disc}%} parsed as item)%&r&8." to attacker
|
||||
drop ({discs::%{_disc}%} parsed as item) at position of victim
|
||||
|
||||
on break:
|
||||
if event-block is sand:
|
||||
set {_num} to a random integer from 0 to 100
|
||||
if {_num} > 92:
|
||||
send "&eYou got gravel!" to player
|
||||
drop gravel above event-block without velocity
|
||||
|
Reference in New Issue
Block a user