From 688e13930681bca7881d19468745f7067e9bc5c2 Mon Sep 17 00:00:00 2001 From: Ninjune x Date: Sun, 8 Jan 2023 02:12:14 -0600 Subject: v1.8.6 --- commands/drawLine.js | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 commands/drawLine.js (limited to 'commands/drawLine.js') diff --git a/commands/drawLine.js b/commands/drawLine.js new file mode 100644 index 0000000..1374dea --- /dev/null +++ b/commands/drawLine.js @@ -0,0 +1,43 @@ +import constants from "../util/constants" +import { trace, drawEspBox } from "../util/renderUtil" +const PREFIX = constants.PREFIX + +let x = 0, + y = 0, + z = 0 + +export function drawLine(args) +{ + switch(args.length - 1) + { + case 0: + case 1: + x = 0 + y = 0 + z = 0 + ChatLib.chat(`${PREFIX}&bStopped drawing line.`) + return + case 2: + x = args[1] + y = Player.getY() + 1 + z = args[2] + break + case 3: + x = args[1] + y = args[2] + z = args[3] + break + default: + ChatLib.chat(constants.INVALIDARGS) + return + } + ChatLib.chat(`${PREFIX}&bNow drawing line to &a${x} ${Math.round(y)} ${z}`) +} + + +register("renderWorld", () => { + if(x == 0 && y == 0 && z == 0) return + + trace(x, y, z, 0, 0, 1, 0.86) + drawEspBox(x, y, z, 0, 0, 1, 0.86) // y no work +}) \ No newline at end of file -- cgit