aboutsummaryrefslogtreecommitdiff
path: root/commands/drawLine.js
blob: 1374dea4447b7af0e0c3c439048b5c5c6aeff85d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
})