Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /zm [<text="join">] [<integer>]:
- trigger:
- if arg-1 is "join":
- if {zm::limit::%player%} don't exist:
- set {zm::limit::%player%} to 2
- if {zm::game} is not set:
- set {zm::join::%player%} to true
- set {_player} to 0
- loop {zm::join::*}:
- set {_player} to {_player} + 1
- {_player} is 1
- broadcast "&r[ZM]ゾンビゲームが20秒後にスタートします。"
- wait 20 second
- #ゲームスタート
- set {zm::game} to true
- set {zm::spawnlist::0} to location at 53, 62, 60
- loop {zm::join::*}:
- teleport loop-index parsed as player to location at 32, 62, 60
- message "&r[ZM]ゲームが始まりました。ゾンビが来ます。" to loop-index parsed as player
- set {_round} to 0
- loop 30 times:
- broadcast "&r&l[ZM]ラウンドスタート。"
- set {_round} to {_round} + 1
- set {_list} to 0
- loop {zm::spawnlist::*}:
- add 1 to {_list}
- if {_round} is 10:
- set {_random} to random integer between 0 and {_list}
- spawn 1 creeper at {zm::spawnlist::%{_random}%}
- else if {_round} is 20:
- set {_random} to random integer between 0 and {_list}
- spawn 1 creeper at {zm::spawnlist::%{_random}%}
- else if {_round} is 30:
- set {_random} to random integer between 0 and {_list}
- spawn 1 zombie at {zm::spawnlist::%{_random}%}
- else:
- loop {_round}*8 times:
- set {_random} to random integer between 0 and {_list}
- spawn 1 zombie at {zm::spawnlist::%{_random}%}
- set last spawned entity's tool to gold nugget with no NBT
- add "{AttributeModifiers:[{AttributeName:""generic.attackDamage"",Name:""generic.attackDamage"",Amount:10,Operation:0,UUIDLeast:969024,UUIDMost:307421,Slot:""mainhand""}],display:{Name:""§rZombie Coin""}}" to nbt of last spawned entity's tool
- set last spawned entity's max health to 20 + ({_round}*10)
- set last spawned entity's walk speed to 0.05 + ({_round}*0.4)
- heal last spawned entity
- delete {_player}
- loop {zm::join::*}:
- set {_player} to true
- if {_player} is not set:
- broadcast "&4&l[ZM]誰もいなくなりました。GAME OVER"
- delete {zm::join::*}
- delete {zm::limit::*}
- delete {zm::spawnlist::*}
- delete {zm::game}
- loop all zombies in radius 50 around location at 32, 62, 60:
- kill loop-entity
- set block at location at 32, 63, 72 to sign
- set 1st line of block at location at 32, 63, 72 to "&k&rZombie"
- set 2nd line of block at location at 32, 63, 72 to "1"
- set block at location at 32, 62, 73 to oak plank
- set block at location at 32, 63, 73 to oak plank
- stop
- loop 200 times:
- delete {_zm::zombie}
- wait 5 second
- loop all zombies in radius 50 around location at 32, 62, 60:
- set {_zm::zombie} to {_zm::zombie} + 1
- delete {_player}
- loop {zm::join::*}:
- set {_player} to true
- if {_player} is not set:
- broadcast "&4&l[ZM]誰もいなくなりました。GAME OVER"
- delete {zm::join::*}
- delete {zm::limit::*}
- delete {zm::spawnlist::*}
- delete {zm::game}
- loop all zombies in radius 50 around location at 32, 62, 60:
- kill loop-entity
- set block at location at 32, 63, 72 to sign
- set 1st line of block at location at 32, 63, 72 to "&k&rZombie"
- set 2nd line of block at location at 32, 63, 72 to "1"
- set block at location at 32, 62, 73 to oak plank
- set block at location at 32, 63, 73 to oak plank
- stop
- {_zm::zombie} is not set
- exit this loop
- if {_zm::zombie} is set:
- broadcast "&r&l[ZM]1000秒が経過しました。時間がかかりすぎです。"
- broadcast "&r&l[ZM]ラウンド終了。10秒待ってください。"
- wait 10 second
- broadcast "&r[ZM]30ラウンドがすべてクリアされました。"
- loop {zm::join::*}:
- teleport loop-index parsed as player to location at 8, 63, 8
- delete {zm::join::*}
- delete {zm::limit::*}
- delete {zm::spawnlist::*}
- delete {zm::game}
- loop all zombies in radius 50 around location at 32, 62, 60:
- kill loop-entity
- set block at location at 32, 63, 72 to sign
- set 1st line of block at location at 32, 63, 72 to "&k&rZombie"
- set 2nd line of block at location at 32, 63, 72 to "1"
- set block at location at 32, 62, 73 to oak plank
- set block at location at 32, 63, 73 to oak plank
- stop
- else:
- {zm::join::%player%} is not set
- if {zm::limit::%player%} > 0:
- set {zm::limit::%player%} to {zm::limit::%player%} - 1
- teleport player to location at 32, 62, 60
- set {zm::join::%player%} to true
- else:
- message "&r&l[ZM]復活可能回数が0です。復活できません。"
- else if arg-1 is "open":
- if arg-2 is 2:
- player has 100 gold nugget named "&rZombie Coin"
- remove 100 gold nugget named "&rZombie Coin" from player's inventory
- if arg-2 is 3:
- player has 200 gold nugget named "&rZombie Coin"
- remove 200 gold nugget named "&rZombie Coin" from player's inventory
- else if arg-1 is "reset":
- delete {zm::join::*}
- delete {zm::limit::*}
- delete {zm::spawnlist::*}
- delete {zm::game}
- on death of player:
- delete {zm::join::%player%}
- on quit:
- delete {zm::join::%player%}
- on pick up:
- event-item is gold nugget named "&rZombie Coin"
- wait 1 tick
- remove event-item from player's inventory
- give player event-item's item amount of gold nugget named "&rZombie Coin"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement