aboutsummaryrefslogtreecommitdiff
path: root/commands/coords/yog.js
blob: e02b4a200deaea0ec7e5e170638c8127815b9fee (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import constants from "../../util/constants"
import { waypointRender } from "../../util/helperFunctions"

const PREFIX = constants.PREFIX
let yogWaypoints = []

export function yog(arg2) 
{
    const WAYPOINTNAME = "Yog"
    
    if(arg2 != "toggle")
    {
        new TextComponent(`${PREFIX}&bGo to the leftmost corner of the topaz crystal facing bal close to bal then do /cw coords yog toggle.`)
        .chat()
    }
    else
    {
        if(yogWaypoints[0] == undefined)
        {
            let startPos = [Player.getX(), Player.getY(), Player.getZ()],
             x = startPos[0], 
             y = startPos[1], 
             z = startPos[2]
            
            console.log(x + " " + y + " " + z)
            yogWaypoints.push([x + 10, y - 7, z - 27])
            yogWaypoints.push([x + 10, y - 7, z - 27])
            yogWaypoints.push([x + 28, y - 8, z + 15])
            yogWaypoints.push([x - 41, y - 3, z + 26])
            yogWaypoints.push([x - 32, y - 3, z + 45])
            yogWaypoints.push([x - 22, y - 3, z - 34])
            yogWaypoints.push([x + 28, y - 8, z + 36])
            yogWaypoints.push([x - 47, y - 3, z + 32])
            yogWaypoints.push([x - 43, y - 1, z + 4])
            yogWaypoints.push([x - 47, y + 2, z - 20])
            yogWaypoints.push([x + 11, y - 13, z + 40])
            yogWaypoints.push([x + 15, y - 13, z + 43])
            yogWaypoints.push([x - 44, y + 2, z - 29])
            yogWaypoints.push([x + 33, y - 4, z - 15])
            yogWaypoints.push([x - 6, y - 4, z - 34])
            yogWaypoints.push([x + 19, y - 12, z + 35])
            yogWaypoints.push([x + 16, y - 9, z - 15])
            ChatLib.chat(`${PREFIX}&b${WAYPOINTNAME} waypoints turned on!`)
        }
        else 
        {
            yogWaypoints = []
            ChatLib.chat(`${PREFIX}&b${WAYPOINTNAME} waypoints turned off!`)
        }
    }
}

register("renderWorld", () => {
    if(yogWaypoints.length < 1) return
    waypointRender(yogWaypoints)
})

register("worldLoad", () => {
    yogWaypoints = []
})

export default ""