# ClickTP

## Source Code (V1.0.0)

<details>

<summary><a href="https://cdn.discordapp.com/attachments/1119691421734154332/1119691421977432205/ClickTP.js">ClickTP.js</a> (Click Link to Download)</summary>

```javascript
// gimhook: {"name":"ClickTP","description":"A mod that lets you teleport to where you shift-click!","version":"1.0.0","author":"Blackhole927","license":"MIT"}
(() => {
  gimhook.addHook("join", () => {
      console.log("Game joined!")
      console.log("Test...")
      var w = 0
      var h = 0
      var clickTPon = false;
      onmousemove = function(e) {
          w = window.innerWidth
          h = window.innerHeight
          mouseX = e.clientX
          mouseY = e.clientY
          mouseX -= w/2
          mouseX = mouseX/(w)
          mouseY -= h/2
          mouseY = mouseY/h
          zoom = gimhook.graphics.camera.getZoom()
          zoom = 1/zoom
          mouseX *= zoom
          mouseY *= zoom
          mouseX *= 2
          mouseY *= 2

      }
      onmousedown = function(e) {
          if (e.shiftKey) {
              xy = gimhook.graphics.player.getPosition()
              xy["x"] += mouseX*(w/2)
              xy["y"] += mouseY*(h/2)
          }

          gimhook.graphics.player.setPosition(xy["x"], xy["y"])
      }
  });
})();
```

</details>

## How to Use It

After installing the mod, hold down `SHIFT` while clicking with your mouse. You will move in the direction of your mouse.

## Changelog

| Version | Changes                                        |
| ------- | ---------------------------------------------- |
| v1.0.0  | Added shift-click teleportation functionality. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gimhook.coder-gage.dev/gimforge-mods/clicktp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
