Skip to content
moxcomic edited this page Dec 3, 2023 · 13 revisions

Archer Scripts

  • Support Golang
  • Support Javascript

Attention

package name must be main

example auto.go:

package main

import (
  "github.com/moxcomic/lq"
)

func onLogin() { }

func onRoomGameStart() { }

func onMatchGameStart() { }

func onNewRound() { }

func onRoundEnd() { }

func onPlayerLeaving(seat int) { }

func onExecute(result *lq.NotifyAIResult, risk []float64, rating, matches, fivePer, tenPer float64)

func onGameEnd() { }

func onServerDisconnect() { }

example auto.js:

// The js doesn't need to be imported, it can be used directly
// For example: const hand = gamestate.Inst().HandTile()
const main = {
  onLogin: () => { },
  onRoomGameStart: () => { },
  onMatchGameStart: () => { },
  onNewRound: () => { },
  onRoundEnd: () => { },
  onPlayerLeaving: (seat) => { },
  onExecute: (result, risk, r, m, f, t) => { },
  onGameEnd: () => { },
  onServerDisconnect: () => { }
};
Clone this wiki locally