Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # MFG's Skript to Create usable cannons!
- #
- #
- on click on dispenser:
- player's tool is gunpowder:
- line 1 of block behind block contains "[CANNON]":
- cancel event
- line 2 of block behind block contains "READY" or "NEEDS":
- if line 4 of block behind block is not set:
- set line 4 of block behind block to "<red>0"
- if number of gunpowder in the block's inventory is more than 4:
- message "<green>[CANNON]<yellow> Dude this cannon is already full!" to player
- stop
- #set {_line4} to 0
- #add uncoloured line 4 of block behind block to {_line4}
- #set {_line4} to {_line4} + 1
- add a gunpowder to the block's inventory
- remove 1 gunpowder from the player's tool
- set line 4 of block behind block to "<green>%number of gunpowder in the block's inventory%"
- stop
- player's tool is flint and steel:
- line 1 of block behind block contains "[CANNON]":
- cancel event
- line 2 of block behind block contains "READY" or "NEEDS":
- if line 4 of block behind block does not contain "0":
- set {_line4} to uncoloured line 4 of block behind block
- set {_facing} to the block's facing
- set {_inverse} to the block behind the block's facing
- play effect "smoke" at the block above the block's location
- play effect "active furnace" at the block above the block's location
- play "fireworks_launch" at the clicked block
- play "GHAST_FIREBALL" at the clicked block
- spawn a primed tnt in front of the block
- if number of gunpowder in the block is 1:
- push the last spawned entity upwards at speed .2
- push the last spawned entity {_facing} at speed .5
- if number of gunpowder in the block is 2:
- push the last spawned entity upwards at speed .2
- push the last spawned entity {_facing} at speed .75
- if number of gunpowder in the block is 3:
- push the last spawned entity upwards at speed .2
- push the last spawned entity {_facing} at speed 1
- if number of gunpowder in the block is 4:
- push the last spawned entity upwards at speed .2
- push the last spawned entity {_facing} at speed 1.25
- if number of gunpowder in the block is more than 4:
- push the last spawned entity upwards at speed .2
- push the last spawned entity {_facing} at speed 1.75
- remove all gunpowder from the block's inventory
- set line 4 of block behind block to "<red>0"
- set line 2 of block behind block to "<yellow>RELOADING"
- wait 1 second
- set {_safeloop} to 0
- set {_testboom} to false
- while {_testboom} is false :
- add 1 to {_safeloop}
- if {_safeloop} is more than 15:
- stop
- message "looping" to all players
- loop blocks in radius 2 around the last spawned entity:
- if loop-block is not air:
- if {_loc} is not set:
- set {_loc} to the loop-block's location
- message "setsetset" to player
- set {_testboom} to true
- message "This is when it will boom" to all players
- make an explosion of force 5 at {_loc}
- make a fake explosion at {_loc}
- teleport the last spawned entity to location 0, 0, 50000 of the last spawned entity's world
- exit 2 sections
- wait 3 ticks
- wait 5 seconds
- set line 2 of block behind block to "<green>Needs Powder!"
- on projectile hit:
- stop
- #message "It hit" to all players
- command /tt:
- trigger:
- stop
- #show "s;5;i;stone;c;say hi;l;TEST LORE||multiline||&cColor;n;&6HI!;s;9;i;20 grass;c;stop" with 1 rows named "OVEN!" to player
- on shoot:
- while projectile exists:
- loop entities in radius 5 of projectile:
- loop-entity is not shooter:
- loop-entity is not a arrow:
- make projectile home towards loop-entity
- wait 4 tick
Advertisement
Add Comment
Please, Sign In to add comment