Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script("Player Join") {
- trigger("playerjoin")
- @broadcast(@player("name") + " has joined.")
- }
- script("Timer Test") {
- trigger("timer")
- timer(1000000)
- @broadcast("&1Script Line " + script("line") + ": &f" + "timer Test")
- foreach(value in RespawningBlocks){
- @setblock(value, "minecraft:stone")
- @spawn(value, "zombie", 1)
- //@broadcast(@get("velocity", @spawn(value, "zombie", 1)))
- }
- }
- script("Change Health Test") {
- trigger("ChangeHealth")
- @broadcast("&1Script Line " + script("line") + ": &f" + "Woop Woop Woop")
- }
- script("Explosion Test") {
- trigger("explosion")
- @broadcast("&1Script Line " + script("line") + ": &f" + "You canceled an explosion")
- @cancel()
- }
- script("Entity Interact Test") {
- trigger("interactEntity")
- @broadcast("&1Script Line " + script("line") + ": &f" + @player("name") + "interacted with " + @entity("type"))
- }
- //script("Hunger Change Test") {
- // trigger("ChangeHunger")
- // @broadcast(@player("name") + " has joined.")
- //}
- script("Entity Spawn") {
- var public blockedmobs = {"creeper", "enderman", "slime", "bullet", "xporb"}
- var public knownEntities = {"creeper", "enderman", "slime", "xporb", "skeleton", "item", "slime". "zombie"}
- trigger("entitySpawn")
- //@broadcast(string(@entity("type")))
- //@cancel()
- foreach(value in blockedmobs){
- //@broadcast(value + ", " + string(@entity("type")))
- if(value ~ string(@entity("type"))){
- //@broadcast(string(@entity("type")))
- @cancel()
- }
- }
- foreach(value in knownEntities){
- if(value !~ string(@entity("type"))){
- //@broadcast(string(@entity("type")))
- }
- }
- }
- script("Block Interact") {
- //var public debug = {"Script Line: " + script("line") + " " +}
- //var public testdebug = script("line")
- var public BannedItems = {"flansmod:gl6", "flansmod:mk2Frag", "flansmod:m67", "flansmod:rgd33", "flansmod:type97", "flansmod:gl1", "flansmod:c4"}
- var public BannedInventories = {"minecraft:crafting_table", "flansmod:german", "flansmod:japanese", "flansmod:american", "flansmod:modern", "flansmod:british", "flansmod:russian", "flansmod:modernAdvanced", "flansmod:flansWorkbench"}
- //var public LumberEXP = {"Ghaz_ranka" : {0}, "Hawk_eye0091" : {0}}
- //var public LumberLevel = {"Ghaz_ranka" : 0, "Hawk_eye0091" : 0}
- var blockinteractfired = false
- var local Zone1 = {895, -1280, 256, 0, 1023, -1152}
- trigger("interactBlock")
- //var parse @player("name") + "_test" + @block("id")= "test"
- //@send($(@player("name") + "_test" + @block("id")))
- //@broadcast(@get("item_lore", @player("hand", %"player"%)))
- @broadcast("&1Script Line " + script("line") + ": &f" + @block("id"))
- foreach(value in BannedInventories){
- if(value ~ @block("id")){
- if (%"Interaction"% ~ "right"){
- @cancel()
- @send("&1Script Line " + script("line") + ": &f" + "This inventory is blocked")
- }
- }
- }
- if (@vector("x", @entity("location")) < Zone1[1] and @vector("x", @entity("location")) > Zone1[2] and @vector("y", @entity("location")) < 256 and @vector("y", @entity("location")) > 0 and @vector("z", @entity("location")) < 1023 and @vector("z", @entity("location")) > -1152) {
- @broadcast ("&1Script Line " + script("line") + ": &f" + @player("name") + " is in Zone 1")
- foreach(value in BannedItems){
- if(@player("hand") !~ null and value ~ @item("id", @player("hand"))){
- @cancel()
- @send("This is a banned item in Zone 1")
- blockinteractfired = true
- break
- }
- if (!blockinteractfired){
- if (%"Interaction"% ~ "right" and @player("hand") !~ null){
- @broadcast("&1Script Line " + script("line") + ": &f" + @player("name") + " interacted with a block while holding " + @item("id", @player("hand")))
- blockinteractfired = true
- break
- }
- if (%"Interaction"% ~ "left" and @item("id", @player("hand")) ~ "minecraft:stone_axe"){
- //@broadcast("Line62Test: Test")
- if (@block("id", %"from"%) ~ "minecraft:log"){
- //@send("test")
- blockinteractfired = true
- LumberEXP[@player("name")][1] = LumberEXP[@player("name")][1] + 1
- @send("You gained " + LumberEXP[@player("name")][1] + " Lumbering EXP")
- }
- }
- }
- }
- }
- if (@vector("x", @entity("location")) > 895 or @vector("x", @entity("location")) < -1280 or @vector("y", @entity("location")) > 256 or @vector("y", @entity("location")) < 0 or @vector("z", @entity("location")) > 1023 or @vector("z", @entity("location")) < -1152) {
- if(!blockinteractfired){
- @broadcast ("&1Script Line " + script("line") + ": &f" + @player("name") + " is not in Zone 1")
- blockinteractfired = true
- break
- }
- }
- }
- script("Item Drop") {
- trigger("itemdrop")
- foreach(item in %"ItemStacks"%) {
- @broadcast("&1Script Line " + script("line") + ": &f" + @player("name") + " dropped " + @item("id", item))
- }
- }
- script("Block Break") {
- trigger("blockbreak")
- foreach (transaction in %"Transactions"%) {
- @broadcast(@vector("x", @transaction("before", transaction)))
- }
- @cancel()
- }
- script("Player Block Break") {
- var public unbreakableblocks = {"minecraft:bedrock"}
- //var public RespawningBlocks = {"world", 0, 0, 0}
- var fired = false
- trigger("playerblockbreak")
- //@broadcast("block break")
- //@cancel()
- RespawningBlocksNumber = size(RespawningBlocks) + 1
- RespawningBlocks[RespawningBlocksNumber] = @location("array", %"from"%)
- @broadcast(RespawningBlocks)
- var array = @location("array", @entity("location"))
- var x = array[2]
- var y = array[3]
- var z = array[4]
- if (x < 895 and x > -1280 and y < 256 and y > 0 and z < 1023 and z > -1152) {
- foreach(value in Admins){
- if(value ~ @player("name")){
- foreach(value in unbreakableblocks){
- if(value ~ @block("id", %"from"%)){
- //var blockname = @block("id")
- //set blockname = substring(id, find(id, ":") + 1)
- @send(@block("id") + " is banned")
- @cancel()
- }
- if(value !~ @block("id")){
- //var blockname = @block("id")
- //set blockname = substring(id, find(id, ":") + 1)
- @broadcast("&1Script Line " + script("line") + ": &f" + @player("name") + " broke " + @block("id", %"from"%) + " at " + @location("string"))
- }
- }
- fired = true
- break
- }
- if(!fired){
- @send("You are not able to build here")
- @cancel()
- fired = true
- break
- }
- }
- }
- }
- script("Block Place") {
- var public bannedblocks = {"minecraft:tnt"}
- var fired = false
- trigger("playerblockplace")
- if (@vector("x", @entity("location")) < 895 and @vector("x", @entity("location")) > -1280 and @vector("y", @entity("location")) < 256 and @vector("y", @entity("location")) > 0 and @vector("z", @entity("location")) < 1023 and @vector("z", @entity("location")) > -1152) {
- foreach(value in Admins){
- if(value ~ @player("name")){
- foreach(value in bannedblocks){
- if(value ~ @block("id", %"to"%)){
- //var blockname = @block("id")
- //set blockname = substring(id, find(id, ":") + 1)
- @send(@block("id", %"to"%) + " is banned")
- //@cancel()
- }
- if(value !~ @block("id")){
- //var blockname = @block("id")
- //set blockname = substring(id, find(id, ":") + 1)
- @broadcast("&1Script Line " + script("line") + ": &f" + @player("name") + " placed " + @block("id", %"to"%) + " at " + @location("string"))
- }
- }
- fired = true
- break
- }
- if(!fired){
- @send("You are not able to build here")
- @cancel()
- fired = true
- break
- }
- }
- }
- }
- //script("Player Death") {
- //trigger("death")
- //@broadcast("A player has died")
- //}
- script("Admin Command") {
- //var public Admins = {"Ghaz_ranka"}
- trigger("command")
- command("Admin")
- @cancel()
- var arguments = split(%"Arguments"%, " ")
- if (arguments[1] ~ "list"){
- @send("Admins: " + string(Admins))
- }
- foreach(value in Admins){
- if(value ~ @player("name")){
- var arguments = split(%"Arguments"%, " ")
- if (arguments[1] ~ "add"){
- Admins += arguments[2]
- @send("Admins: " + string(Admins))
- }
- if (arguments[1] ~ "remove"){
- remove(Admins, arguments[2])
- @send("Admins: " + string(Admins))
- }
- }
- }
- }
- script("Moderator Command") {
- var public Moderators = {"Ghaz_ranka"}
- trigger("command")
- command("Moderator")
- @cancel()
- var arguments = split(%"Arguments"%, " ")
- if (arguments[1] ~ "list"){
- @send("&1Moderators: &f" + string(Moderators))
- }
- foreach(value in Admins){
- if(value ~ @player("name")){
- var arguments = split(%"Arguments"%, " ")
- if (arguments[1] ~ "add"){
- Moderators += arguments[2]
- @send("Moderators: " + string(Moderators))
- }
- if (arguments[1] ~ "remove"){
- remove(Moderators, arguments[2])
- @send("Moderators: " + string(Moderators))
- }
- }
- }
- }
- script("Variable Editor Command") {
- trigger("command")
- command("variable")
- @cancel()
- var arguments = split(%"Arguments"%, " ")
- if (arguments[2] ~ "list"){
- @send("&1" + arguments[1] + ":&f " + string($(arguments[1])))
- }
- foreach(value in Admins){
- if(value ~ @player("name")){
- var arguments = split(%"Arguments"%, " ")
- if (arguments[2] ~ "add"){
- $(arguments[1]) += arguments[3]
- @send("Added: " + arguments[3])
- }
- if (arguments[2] ~ "remove"){
- remove($(arguments[1]), arguments[3])
- @send("Removed: " + string($(arguments[1])))
- }
- }
- }
- }
- script("Array Editor Command") {
- trigger("command")
- command("Array")
- @cancel()
- var arguments = split(%"Arguments"%, " ")
- if (arguments[3] ~ "list"){
- @send("&1" + arguments[1] + ":&f " + string($(arguments[1])))
- }
- foreach(value in Admins){
- if(value ~ @player("name")){
- var arguments = split(%"Arguments"%, " ")
- if (arguments[3] ~ "add"){
- $(arguments[1]) += arguments[3]
- @send("Added: " + arguments[3])
- }
- if (arguments[3] ~ "remove"){
- removeIndex($(arguments[1]), arguments[2])
- @send("Removed: " + string($(arguments[1])))
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment