Punkland
English
English
  • PUNKLAND
    • Introduction to Punkland
    • 🔔Update History
      • Studio
      • APP
      • Server
  • Punkland Studio
    • 📖Getting Started
      • How to Download Punkland Studio
      • Checking Version and Updates
      • New Project
      • Map Making
        • Add Map
        • Sub Map Creation
        • Edit Map
      • Studio Interface
        • [File] Tab
        • [Edit] Tab
        • [View] Tab
        • [Game] Tab
        • [Tool] Tab
      • Test Play
      • Publish Game
    • 💻Basic Guide
      • Database
      • MP3 to OGG Converter
      • Translation Export
        • Translation Import
      • Script
      • Resource Market
      • Data Export
        • Data Import
      • Help
      • Project Management
      • Text Commands
      • GM Commands
      • Stats
      • Damage Formula
      • Item Formula
      • QnA
    • 👑Advanced Guide
      • Resource Manager
      • Sprite Manager
      • Layout Manager
      • Top Menu Manager
      • Event page Manager
      • Spine
    • Script Tutorial
      • Use Script
      • Script Docs
      • Server Script
        • ScriptClan
        • ScriptColor
      • Client Script
      • Sample Script
        • UI
        • Monster AI
        • Pet AI
        • Particle
    • Web3 Tutorial
      • Minting and Connection NFT
      • Connectiong ERC-20 Token
    • Effective Punkland
      • Communicating with the Server
      • RunLater
      • HTTP Requests
  • Official Link
    • Punkland Studio Download
    • Website
    • Discord
    • Korea community
Powered by GitBook
On this page
  1. Punkland Studio
  2. Script Tutorial

Client Script

  • The client script must exist in the project folder or in Scripts with a file name like Hello.lua to be read.

script
explanation

Client.width

Gets the width of the screen.

Client.height

Gets the vertical size of the screen.

Client.ShowAlert(text, callback)

Displays a notification message.

Client.ShowYesNoAlert(text, callback)

Displays a Yes/No notification message.

Client.ShowBuyItem(id, amount, callback)

Displays a message to purchase a specific item.

Client.Quit()

Close the client.

ScriptEventPublisher Client.GetTopic(topic)

Register a specific topic to exchange messages with the server.

Client.FireEvent(topic, args…)

Sends a message to the server with a specific topic.

Client.RunLater(callback, t)

Executes a callback function after t seconds.

Camera

Object that controls the camera

Point

A class that contains x, y coordinates

Rect

A class that contains a rectangle with x, y, width, and height.

Image

A class that outputs images

Text

A class that prints text

Slider

A class that outputs a control controller.

Button

Class that outputs the button

Panel

A class that outputs a panel.

ScrollPanel

A class that outputs a scrolling panel.

GridPanel

A class that outputs panels arranged in a grid.

PreviousScriptColorNextSample Script

Last updated 5 months ago