Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local deb = require("component").debug
- local event = require("event")
- local cmd = deb.runCommand
- local wrld, block, n = 0
- local WORLD = deb.getWorld(wrld)
- local tContinuum = {}
- local tOres = {
- -- [ID] = {Name, Size, Meta}
- [14] = {"minecraft:gold_ore", 1, 0},
- [15] = {"minecraft:iron_ore", 1, 0},
- [16] = {"minecraft:coal", 1, 0},
- [21] = {"minecraft:dye", 6, 4},
- [56] = {"minecraft:diamond", 1, 0},
- [73] = {"minecraft:redstone", 4, 0},
- [129] = {"minecraft:emerald", 1, 0}
- }
- local tWaste = {
- "minecraft:stained_hardened_clay",
- "minecraft:hardened_clay",
- "minecraft:yellow_flower",
- "minecraft:wheat_seeds",
- "minecraft:cobblestone",
- "minecraft:netherrack",
- "minecraft:red_flower",
- "minecraft:soul_sand",
- "minecraft:sandstone",
- "minecraft:end_stone",
- "minecraft:gravel",
- "minecraft:stone",
- "minecraft:grass",
- "minecraft:stone",
- "minecraft:dirt",
- "minecraft:sand",
- }
- local tEffects = {
- -- [Name] = {ID, bad/good}
- "Speed","Slowness","Haste","Mining Fatigue","Strength","Instant Health","Instant Damage","Jump Boost","Nausea","Regeneration","Resistance","Fire Resistance","Water Breathing","Invisibility","Blindness","Night Vision","Hunger","Weakness","Poison","Wither","Health Boost","Absorption","Saturation","Glowing","Levitation","Luck","Bad Luck",
- ["Speed"] = {1, 1},
- ["Slowness"] = {2, 0},
- ["Haste"] = {3, 1},
- ["Mining Fatigue"] = {4, 0},
- ["Strength"] = {5, 1},
- ["Instant Health"] = {6, 1},
- ["Instant Damage"] = {7, 1},
- ["Jump Boost"] = {8, 1},
- ["Nausea"] = {9, 0},
- ["Regeneration"] = {10, 1},
- ["Resistance"] = {11, 1},
- ["Fire Resistance"] = {12, 1},
- ["Water Breathing"] = {13, 1},
- ["Invisibility"] = {14, 1},
- ["Blindness"] = {15, 0},
- ["Night Vision"] = {16, 1},
- ["Hunger"] = {17, 0},
- ["Weakness"] = {18, 0},
- ["Poison"] = {19, 0},
- ["Wither"] = {20, 0},
- ["Health Boost"] = {21, 1},
- ["Absorption"] = {22, 1},
- ["Saturation"] = {23, 1},
- ["Glowing"] = {24, 1},
- ["Levitation"] = {25, 1},
- ["Luck"] = {26, 1},
- ["Bad Luck"] = {27, 0}
- }
- local tEnchants = {
- -- [ID] = {Name, MaxLevel}
- [0] = {"Protection", 4},
- [1] = {"Fire Protection", 4},
- [2] = {"Feather Falling", 4},
- [3] = {"Blast Protection", 4},
- [4] = {"Projectile Protection", 4},
- [5] = {"Respiration", 3},
- [6] = {"Aqua Affinity", 1},
- [7] = {"Thorns", 3},
- [8] = {"Depth Strider", 3},
- [9] = {"Frost Walker", 2},
- [10] = {"Curse of Binding", 1},
- --------
- [16] = {"Sharpness", 5},
- [17] = {"Smite", 5},
- [18] = {"Bane of Arthropods", 5},
- [19] = {"Knockback", 2},
- [20] = {"Fire Aspect", 2},
- [21] = {"Looting", 3},
- [22] = {"Sweeping Edge", 3},
- --------
- [32] = {"Efficiency", 5},
- [33] = {"Silk Touch", 1},
- [34] = {"Unbreaking", 3},
- [35] = {"Fortune", 3},
- --------
- [48] = {"Power", 5},
- [49] = {"Punch", 2},
- [50] = {"Flame", 1},
- [51] = {"Infinity", 1},
- --------
- [61] = {"Luck of the Sea", 3},
- [62] = {"Lure", 3},
- --------
- [70] = {"Mending", 1},
- [71] = {"Curse of Vanishing", 1}
- }
- tContinuum.clear = function(Player)
- for i = 1, #tWaste do
- cmd("clear "..Player.." "..tWaste[i])
- end
- end
- tContinuum.mine = function(Player, d)
- local p = deb.getPlayer(Player)
- if p.getWorld().getDimensionId() == wrld then
- local pX, pY, pZ = p.getPosition()
- pX, pY, pZ = math.ceil(pX)-1, math.ceil(pY), math.ceil(pZ)-1
- p.setPosition(pX+0.5, pY, pZ+0.5)
- n = 0
- for a = -d, d do
- block = WORLD.getBlockId(pX+a, pY-1, pZ+a)
- if block == 89 and WORLD.getBlockId(a+pX, pY-1, pZ-a) == 89 then
- n = n + 1
- else
- return nil
- end
- end
- if WORLD.getBlockId(pX, pY+2, pZ) == 57 then
- cmd("setblock ".. pX .." ".. pY+2 .." ".. pZ .." air")
- if n == 9 then
- for x = pX-d, pX+d do
- for y = 1, pY-1 do
- for z = pZ-d, pZ+d do
- block = WORLD.getBlockId(x, y, z)
- if tOres[block] then
- cmd("setblock "..x.." "..y.." "..z.." stone")
- cmd("give "..Player.." "..table.concat(tOres[block], " "))
- end
- end
- end
- end
- end
- end
- end
- end
- while true do
- e = {event.pull("chat_message")}
- if e[4] == "clear" then
- tContinuum.clear(e[3])
- elseif e[4] == "mine" then
- tContinuum.mine(e[3], 4)
- end
- os.sleep()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement