ArcherArcher
Home
Quick Start
Project Introduction
  • 简体中文
  • English
Home
Quick Start
Project Introduction
  • 简体中文
  • English
  • Home
  • Basic Configuration

    • Project Introduction
    • Quick Start
    • FAQ
    • Contact Us
  • Advanced Development

    • Basic Knowledge
    • Basic Framework
    • Majsoul Development

      • Tile Names

        • Basic
      • Manager

        • Lobby Manager
      • Game Interfaces

        • Basic
      • LQ

        • Basic
      • Action Types

        • Basic
      • Game State

        • Basic
      • Login Event

        • Login Event
        • Advanced - Mahjong Event Login
      • Discard Actions

        • Basics
        • Advanced
      • Chii (Eat)
      • Pon
      • Kong
      • Cancel, Skip
  • Plugin System

    • Basic Usage
    • Resource Plugin Development
  • Auto Review

    • Automatic Review
  • Tenhou Room

    • Playing in Tenhou Private Room with Mortal Bot

Notes

  • To use this package, you need to enable 【Auto Settings】-> 【Built-in Mode】.

Package Name

  • actions

Import

  • import "github.com/moxcomic/Archer/actions"

Interface Methods

NameParametersReturn ValueNotes
NewMajsoulActionsNone*actions.MajsoulMajsoul interface instance

Instance Methods

NameParametersReturn ValueNotes
JoinroomId: int, roomType: intNoneStart matchmaking, roomType is always 0
ReJoinNoneNoneDeprecated
CancelJoinNoneNoneCancel matchmaking
ConfirmNoneNoneDeprecated
BackToHomeNoneNoneDeprecated
HuansanzhangNoneNoneSwap three tiles, only available in this mode
BabeiNoneNoneExecute Babei
Discardtile: string, tsumogiri: boolNoneDiscard a tile, tile is the tile name, tsumogiri indicates if it's the last drawn tile
Riichitile: string, tsumogiri: boolNoneDeclare Riichi, tile is the tile name, tsumogiri indicates if it's the last drawn tile
Chiitile0: string, tile1: stringNoneChii, tile0 and tile1 are the tiles to use for Chii
Pontile0: string, tile1: stringNonePon, tile0 and tile1 are the tiles to use for Pon
Daimingkantile: stringNoneDaimingkan, tile is the tile name
Kakantile: stringNoneKakan, tile is the tile name
Ankantile: stringNoneAnkan, tile is the tile name
RyukyokuNoneNoneNine Terminal Tiles
TsumoNoneNoneTsumo (Self-draw win)
RonNoneNoneRon (Win by discard)
CancelNoneNoneCancel or skip
ComeBackNoneNone"I'm back", called when a player is detected as leaving

Example Code

actions.NewMajsoulActions().Discard("1m", true)