Skip to main content

Getting Started

Octarine

Octarine is a private cheat for Dota 2, Deadlock that allows you to create your own scripts using a TypeScript API.

Getting Started

warning

The documentation is written for people who know the basics of TypeScript / JavaScript and have practical experience. Please do not contact support with questions regarding the documentation, as they will remain unanswered.

If you have any questions about the API, please ask on our Discord server. There, you will receive answers directly from the cheat developers.

Preparation

  1. Install NodeJS.
  2. Restart the Octarine Client.
  3. Enable developer mode on the website.
  4. Create the necessary folders as shown below:
disk or folder:
├── github.com
│ ├── octarine-public
│ └── your-login-github
  1. Clone the repository https://github.com/octarine-public/wrapper into the octarine-public folder.
  2. Make a copy of the repository https://github.com/octarine-public/example-repo and clone it into the your-login-github folder.
  3. Install yarn for both wrapper and example-repo:
yarn install

Connecting a Script

8a. Add example-repo to local scripts on the website by specifying the folder path on your disk, for example: C:\github.com\octarine-public\example-repo

Advantage: changes are applied immediately when you reload scripts — no need to commit/push.

Via Git (for publishing)

8b. Add the copy of "example-repo" to local scripts on the website, example link: https://github.com/qzore/example-repo@main

To add a private repository, use a GitHub token, example link: https://qzore:ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@github.com/qzore/example-repo@main

Afterwards, your folder structure should look like this:

disk or folder:
├─── github.com
│ ├── octarine-public
│ │ └── wrapper
│ └── qzore
│ └── example-repo
│ ├── index.ts
│ └── other files and folders...
AI-assisted development

The example-repo includes an INSTRUCTIONS.md file with instructions for AI assistants (Claude Code, Cursor, etc.). This file helps AI understand the project structure, available APIs, and write scripts correctly. We recommend keeping it in your repository and extending it as needed.

caution

Octarine and Dota 2 must be running for the following steps.

  1. To ensure everything is set up correctly and the script is installed, open the console. Enter chrome://inspect in the address bar and select Open dedicated DevTools for Node. Go to http://localhost:9222/json. Find "Main Worker" and click on devtoolsFrontendUrl.

    If everything is correct, when you enter a match you should see an Example section in the Octarine menu with settings, and a 2D square displayed on screen.

Code example (example-repo/index.ts)
example-repo/index.ts
import {
Color,
EventsSDK,
GUIInfo,
LocalPlayer,
Menu,
naga_siren_mirror_image,
npc_dota_hero_naga_siren,
Rectangle,
RendererSDK,
TextFlags,
Vector2
} from "github.com/octarine-public/wrapper/index"

new (class ExampleScript {
// Menu
private readonly entry = Menu.AddEntry("Example")

// — Ability section
private readonly abilityTree = this.entry.AddNode("Naga Siren")
private readonly castKey = this.abilityTree.AddKeybind("Cast Mirror Image", "None", "Press to cast Mirror Image")

// — Drawing section
private readonly drawTree = this.entry.AddNode("2D Square Demo")
private readonly drawState = this.drawTree.AddToggle("State", true)
private readonly size = this.drawTree.AddSlider("Square Size", 150, 50, 500)
private readonly rotation = this.drawTree.AddSlider("Rotation", 0, 0, 360)
private readonly opacity = this.drawTree.AddSlider("Opacity", 180, 0, 255)
private readonly borderWidth = this.drawTree.AddSlider("Border Width", 2, 0, 10)
private readonly fillColor = this.drawTree.AddColorPicker("Fill Color", new Color(50, 150, 255))
private readonly borderColor = this.drawTree.AddColorPicker("Border Color", new Color(255, 255, 255))
private readonly showText = this.drawTree.AddToggle("Show Info Text", true)

constructor() {
this.castKey.OnPressed(() => this.CastFirstSpell())
EventsSDK.on("Draw", this.Draw.bind(this))
EventsSDK.on("GameEnded", this.GameEnded.bind(this))
}

// — Ability logic
private CastFirstSpell(): void {
const hero = LocalPlayer?.Hero
if (hero === undefined || !(hero instanceof npc_dota_hero_naga_siren)) {
return
}
const ability = hero.Spells.find(spell => spell instanceof naga_siren_mirror_image)
if (ability === undefined || !ability.CanBeCasted()) {
return
}
hero.CastNoTarget(ability, false, true)
}

// — Drawing logic
private Draw(): void {
if (!this.drawState.value) {
return
}

const screenW = RendererSDK.WindowSize.x
const screenH = RendererSDK.WindowSize.y
const squareSize = GUIInfo.ScaleHeight(this.size.value)
const fill = this.fillColor.SelectedColor.SetA(this.opacity.value)

const pos = new Vector2((screenW - squareSize) / 2, (screenH - squareSize) / 2)
const vecSize = new Vector2(squareSize, squareSize)

RendererSDK.FilledRect(pos, vecSize, fill, this.rotation.value)

if (this.borderWidth.value > 0) {
RendererSDK.OutlinedRect(
pos,
vecSize,
this.borderWidth.value,
this.borderColor.SelectedColor,
this.rotation.value
)
}

if (this.showText.value) {
const textRect = new Rectangle()
const textY = pos.y + squareSize + GUIInfo.ScaleHeight(10)
textRect.pos1.CopyFrom(new Vector2(pos.x, textY))
textRect.pos2.CopyFrom(new Vector2(pos.x + squareSize, textY + GUIInfo.ScaleHeight(30)))
RendererSDK.TextByFlags(
`Size: ${this.size.value} | Rotation: ${this.rotation.value}`,
textRect,
Color.White,
1.2,
TextFlags.Center
)
}
}

private GameEnded(): void {
this.castKey.isPressed = false
}
})()

Applying Changes

  • Local scripts: simply reload scripts through the Octarine menu in-game: Settings -> Reload Scripts.
  • Git: commit your changes, then reload scripts the same way.

To receive notifications about available changes and know when to reload scripts, enable the Notifications -> Update Alerts option.

Auto-reload

If you hold down the script reload key while the menu is open, auto-reload mode will be enabled. In this mode, scripts will reload automatically: on push for Git scripts, or on file changes for local scripts.

info

Examples of other scripts: https://github.com/octarine-public