Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- prefix: &f[&aTD&f]
- mprefix: &f[&aTD&f] &6>>&f
- {TD::edittingmap::%arg-1%} = {TD::edittingmap::%player%}
- {TD::blockLoc::%{TD::cancelBreak::num::%location of event-block%}%} = {TD::blockLoc::%{Count}%}
- {TD::blockType::%{TD::cancelBreak::num::%location of event-block%}%} = {TD::blockType::%{Count}%}
- {TD::wSign::%arg 2%::warp} = {TD::wSign::%{_name}%::warp} = {TD::wSign::%location of clicked block%::warp}
- {TD::wSign::%location of targeted block%} = {TD::wSign::%location of clicked block%}
- {TD::warps::%arg 2%} = {TD::warps::%{_name}%}
- on join:
- if world of player is "TD":
- clear inventory of player
- set gamemode of player to adventure
- on enderman place:
- if world of event-block is "TD":
- cancel event
- on enderman pickup:
- if world of event-block is "TD":
- cancel event
- on place:
- if world of event-block is "TD":
- if {TD::edittingmap::%player%} is not set:
- cancel event
- stop
- else:
- set {TD::blockLoc::%{Count}%} to location of event-block
- set {TD::blockType::%{Count}%} to type of event-block
- set {TD::cancelBreak::%location of event-block%} to true
- set {TD::cancelBreak::num::%location of event-block%} to {Count}
- add 1 to {Count}
- on break:
- if world of event-block is "TD":
- if {TD::edittingmap::%player%} is not set:
- if {TD::cancelBreak::%location of event-block%} is true:
- cancel event
- stop
- else:
- if {TD::cancelBreak::%location of event-block%} is true:
- delete {TD::blockLoc::%{TD::cancelBreak::num::%location of event-block%}%}
- delete {TD::blockType::%{TD::cancelBreak::num::%location of event-block%}%}
- delete {TD::cancelBreak::%location of event-block%}
- delete {TD::cancelBreak::num::%location of event-block%}
- remove 1 from {Count}
- on rightclick:
- if clicked block is a sign:
- if {TD::wSign::%location of clicked block%} is set:
- set {_name} to {TD::wSign::%location of clicked block%}
- set {_warp} to {TD::wSign::%{_name}%::warp}
- teleport player to {TD::warps::%{_warp}%}
- on death:
- if world of victim is "TD":
- if name of victim is "&2Zombie :: 1":
- clear drops
- on drop:
- if world of player is "TD":
- if gamemode of player is not creative:
- cancel event
- on inventory click:
- if world of player is "TD":
- if gamemode of player is not creative:
- cancel event
- every 1 tick:
- loop all entities in world "TD":
- if name of loop-value is "&2Zombie :: 1":
- if distance between loop-value and {loc2} is smaller than 2:
- if loop-value is alive:
- kill loop-value
- set {health} to {health}-1
- if {health} is more than 0:
- send "{@prefix} &4Health: &f%{health}%" to all players in world "TD"
- else:
- send "{@prefix} &4Je hebt verloren!" to all players in world "TD"
- delete {health}
- loop all entities in world "TD":
- if name of loop-value-2 is "&2Zombie :: 1":
- kill loop-value-2
- else:
- make loop-value pathfind to {loc2} with speed 1
- every 5 seconds:
- loop {towers::archer::*}:
- if {health} is set:
- if {health} is more than 0:
- loop all entities in radius 50 around location of loop-value:
- #Shoot arrow to entity
- command /wave [<text>]:
- trigger:
- if player has permission "TD.startWave":
- clear inventory of player
- set {sword} to a wooden sword named "&fSword - Tier I"
- set {builder} to brick block named "&fTorens"
- #Functies voor items
- set slot 0 of player to {sword}
- set slot 4 of player to {builder}
- if {health} is not set:
- set {health} to 10
- if {health} is 0:
- set {health} to 10
- set {loc2} to location at -1, 96, -8
- set {_loc} to location at -1, 97, 6
- spawn zombie pigman at {_loc}
- set name of last spawned zombie pigman to "&2Zombie :: %arg 1%"
- wait 1 second
- spawn zombie pigman at {_loc}
- set name of last spawned zombie pigman to "&2Zombie :: %arg 1%"
- wait 1 second
- spawn zombie pigman at {_loc}
- set name of last spawned zombie pigman to "&2Zombie :: %arg 1%"
- #clear all items in players inventory
- command /editmap [<offline player>]:
- trigger:
- if arg 1 is not set:
- if player has permission "TD.editmap":
- if {TD::edittingmap::%player%} is not set:
- set {TD::edittingmap::%player%} to true
- send "{@mprefix} Je kan de map nu bewerken."
- else:
- clear {TD::edittingmap::%player%}
- send "{@mprefix} Je kan de map niet meer bewerken."
- else:
- send "{@mprefix} &4Je hebt hier &convoldoende permissies &4voor!"
- else:
- if player has permission "TD.editmap.others":
- if {TD::edittingmap::%arg-1%} is not set:
- set {TD::edittingmap::%arg-1%} to true
- if arg-1 is player:
- send "{@mprefix} Je kan de map nu bewerken."
- else:
- send "{@mprefix} Je kan de map nu bewerken." to arg 1
- send "{@mprefix} De speler &l%arg 1% &fkan de map nu bewerken."
- else:
- clear {TD::edittingmap::%arg-1%}
- if arg-1 is player:
- send "{@mprefix} Je kan de map niet meer bewerken."
- else:
- send "{@mprefix} Je kan de map niet meer bewerken." to arg 1
- send "{@mprefix} De speler &l%arg 1% &fkan de map niet meer bewerken."
- else:
- send "{@mprefix} &4Je hebt hier &convoldoende permissies &4voor!"
- command /reset:
- trigger:
- if player has permission "TD.resetmap":
- if {TD::reset::%player%} is true:
- send "{@mprefix} &4Je bent de map al aan het resetten."
- else:
- set {TD::reset::%player%} to true
- send "{@mprefix} De map aan het resetten..."
- loop {Count} times:
- set {Count} to loop-value
- set block at location of {TD::blockLoc::%{Count}%} to {TD::blockType::%{Count}%}
- wait 10 ticks
- delete {TD::reset::%player%}
- send "{@mprefix} Map gereset!"
- else:
- send "{@mprefix} &4Je hebt hier &convoldoende permissies &4voor!"
- # 1 -> create/remove, 2 -> mapnaam, 3 -> warp (bij create), 4 -> spelers (bij create)
- # 1 -> setwarp, 2 -> naam
- # 1 -> warplist
- command /sign [<text>] [<text>] [<text>] [<text>]:
- trigger:
- if player has permission "TD.joinsign":
- if arg 1 is "setwarp":
- if arg 2 is set:
- if {TD::warpList::*} doesn't contain "%arg 2%":
- send "{@mprefix} Warp %arg 2% gemaakt!"
- add arg 2 to {TD::warpList::*}
- set {TD::warps::%arg 2%} to location of player
- set {_name} to arg 2
- else:
- send "{@mprefix} &4De warp &c%arg 2% &4is al in gebruik."
- else:
- send "{@mprefix} &4Je moet nog een &cwarpnaam &4opgeven."
- else if arg 1 is "warplist":
- if {TD::warpList::*} is not empty:
- send "{@mprefix} Dit is de lijst met alle warps:%nl%%{TD::warpList::*}%"
- else:
- send "{@mprefix} Er zijn geen warps."
- else if arg 1 is "create":
- if targeted block is not a sign:
- send "{@mprefix} &4Een join sign kan alleen een sign zijn."
- else if {TD::%location of targeted block%} is set:
- send "{@mprefix} &4Het getargete blok is al een join sign."
- else if arg 2 is set:
- if {TD::signList::*} contains arg 2:
- send "{@mprefix} &4De naam &c%arg 2% &4is al in gebruik."
- else:
- if arg 3 is set:
- send "%{TD::warpList::*}%"
- if {TD::warpList::*} doesn't contain arg 3:
- send "{@mprefix} &4De warp &c%arg 3% &4bestaat niet."
- else:
- if arg 4 is set:
- send "{@mprefix} Join sign gemaakt met de volgende eigenschappen:%nl%&fNaam: %arg 2%%nl%&fWarp: %arg 3%%nl%&fSpelers: %arg 4%"
- add arg 2 to {TD::signList::*}
- set {TD::wSign::%location of targeted block%} to arg 2
- set {TD::wSign::%arg 2%::warp} to arg 3
- set {TD::wSign::%arg 2%::maxP} to arg 4
- else:
- send "{@mprefix} &4Je moet nog een &caantal spelers &4opgeven."
- else:
- send "{@mprefix} &4Je moet nog een &cwarp &4en &caantal spelers &4opgeven."
- else:
- send "{@mprefix} &4Je moet nog een &cnaam, warp &4en &caantal spelers &4opgeven."
- else if arg 1 is "remove":
- if targeted block is not a sign:
- send "{@mprefix} &4Een join sign kan alleen een sign zijn."
- else:
- send "{@mprefix} Join sign aan het verwijderen..."
- set {_name} to {TD::wSign::%location of targeted block%}
- remove {_name} from {TD::signList::*}
- delete {TD::wSign::%location of targeted block%}
- delete {TD::wSign::%{_name}%::warp}
- delete {TD::wSign::%{_name}%::maxP}
- wait 3 ticks
- send "{@mprefix} Join sign verwijderd!"
- else if arg 1 is set:
- send "{@mprefix} &4Het argument &c%arg 1% &4is ongeldig, kies uit de volgende argumenten: &ccreate, remove &4of &csetwarp&4."
- else:
- send "{@mprefix} &4Je moet nog opgeven wat je wil doen, &ccreate, remove &4of &csetwarp&4."
- on click:
- if player is holding brick block named "&fTorens":
- cancel event
- open chest with 1 rows named "&fTorens" to player
- set {_loc} to location of targeted block
- #send "%z-coordinate of location of targeted block%" to player
- make gui slot 0 of player with a arrow named "&2Archer Tower" to close then run function createTower(player, "archer", "%x-coordinate of location of targeted block%", "%y-coordinate of location of targeted block%", "%z-coordinate of location of targeted block%")
- #make gui slot 0 of player with a arrow named "&2Archer Tower" to close then run function createTower(player, "archer", world of player, x-coordinate of location of clicked block, y-coordinate of location of clicked block, z-coordinate of location of clicked block)
- #make gui slot 0 of player with a arrow named "&2Archer Tower" to close then run function createTower(player, "archer", x-coordinate of location of clicked block, y-coordinate of location of clicked block, z-coordinate of location of clicked block, world of player)
- #function createTower(p: Player, tower: String, w: World, x: Number, y: Number, z: Number):
- function createTower(p: Player, tower: String, x: String, y: String, z: String):
- if {_tower} is "archer":
- set {_w} to world of {_p}
- if {_y} starts with "-":
- replace "-" in {_y} with ""
- set {_y} to {_y} parsed as a number
- set {_y1} to "-%{_y}+1%"
- set {_y2} to "-%{_y}+2%"
- set {_y3} to "-%{_y}+3%"
- set {_y4} to "-%{_y}+4%"
- else:
- set {_y} to {_y} parsed as a number
- set {_y1} to {_y}+1
- set {_y2} to {_y}+2
- set {_y3} to {_y}+3
- set {_y4} to {_y}+4
- set {_x} to {_x} parsed as a number
- set {_z} to {_z} parsed as a number
- set {_loc1} to location {_x}, {_y1}, {_z} of world {_w}
- set {_loc2} to location {_x}, {_y2}, {_z} of world {_w}
- set {_loc3} to location {_x}, {_y3}, {_z} of world {_w}
- set {_loc4} to location {_x}, {_y4}, {_z} of world {_w}
- set block at location of {_loc1} to oak_log
- set block at location of {_loc2} to oak_log
- set block at location of {_loc3} to cobblestone_wall
- set block at location of {_loc4} to anvil
- add {_loc4} to {towers::archer::*}
- #set {_x} to x-coordinate of {_loc}
- #set {_y} to y-coordinate of {_loc}
- #set {_z} to z-coordinate of {_loc}
- #set {_world} to world of {_loc}
- #set {_y1} to {_y}+1
- #set {_loc1} to location {_x}, {_y}, {_z} of world {_world}
- #send "%{_loc}%" to {_p}
- #send "%{_x}%" to {_p}
- #send "%{_y}%" to {_p}
- #send "%{_z}%" to {_p}
- #send "%{_world}%" to {_p}
- #set block at location of {_loc1} to dirt
- #send to {_p}
- #send "%{_tower}%" to {_p}
- #send "%{_loc}%" to {_p}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement