Last active
August 5, 2017 01:24
Magikcraft Spells, by markhellewell.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const magik = magikcraft.io; | |
function arrow(repeats = 200, delay = 300) { | |
magik.dixit('Arrow!'); | |
const sender = magik.getSender(); | |
const arrow = magik.type("entity.Arrow").class; | |
const hurl = (thing) => () => sender.launchProjectile(thing) | |
const volley = () => magik.doNTimes(hurl(arrow), repeats, delay, null); | |
magik.doNTimes(volley, repeats, delay*10, null); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const magik = magikcraft.io; | |
function cl() { | |
const Material = magik.type('Material'); | |
const world = magik.getSender().getWorld(); | |
function p5() { | |
const x0 = looking.getX(); | |
const y0 = looking.getY(); | |
const z0 = looking.getZ(); | |
function blast(X,Z, Y) { | |
const looking = magik.aspecto(); | |
const location = looking; | |
location.setX(X); | |
location.setZ(Z); | |
world.strikeLightning(location); | |
let b = world.getBlockAt(location); | |
while(b.getType().equals(Material.AIR)){ | |
Y--; | |
location.setY(Y); | |
b = location.getBlock(); | |
} | |
world.getBlockAt(location).setType(Material.OBSIDIAN); | |
} | |
const r = 8; | |
const items = 40; | |
for(let i = 0; i < items; i++) { | |
const x = x0 + r * Math.cos(2 * Math.PI * i / items); | |
const z = z0 + r * Math.sin(2 * Math.PI * i / items); | |
blast(x,z,y0); | |
} | |
} | |
// const x = looking.getX(); | |
// const y = looking.getY(); | |
// const z = looking.getZ(); | |
function blast() { | |
const looking = magik.aspecto(); | |
const X = looking.getX(); | |
const Y = looking.getY(); | |
const Z = looking.getZ(); | |
const location = looking; | |
location.setX(X + Math.random() * 10 - 5); | |
location.setZ(Z + Math.random() * 10 - 5); | |
world.strikeLightning(location); | |
} | |
magik.doNTimes(() => { | |
magik.doNTimes(() => { | |
magik.doNTimes(() => {blast()}, 15, 500)}, | |
15)}, | |
15, p5); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const magik = magikcraft.io; | |
function feed(playerName) { | |
magik.satio(playerName); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const magik = magikcraft.io; | |
function feedme() { | |
magik.satio(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const magik = magikcraft.io; | |
function fly(){ | |
magik.volare(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const magik = magikcraft.io; | |
function glow(name) { | |
magik.radiatum(name); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const magik = magikcraft.io; | |
function sb(repeats = 200, delay = 300) { | |
magik.dixit('Snowball!'); | |
const sender = magik.getSender(); | |
const snowball = magik.type("entity.Snowball").class; | |
const hurl = (thing) => () => sender.launchProjectile(thing) | |
const volley = () => magik.doNTimes(hurl(snowball), repeats, delay, null); | |
magik.doNTimes(volley, repeats, delay*10, null); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment