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
  • Method
  • Function
  • Example
  • Print when the clan was created
  • Print out the clan ID
  • Print all clan members' IDs
  • Print the clan name
  1. Punkland Studio
  2. Script Tutorial
  3. Server Script

ScriptClan

This class corresponds to a clan within the game and provides information related to the specific clan.

Method

form
explanation

DateTime createdAt { get; }

This is when the clan was created.

long id { get; }

This is the unique ID of the clan.

long masterPlayerID { get; }

This is the ID of the clan master player.

long[] memberIDs { get; }

Gets the IDs of all members of the clan in array format.

Table customData { get; set; }

This is the clan's custom data.

string name { get; }

The unique name of the clan.

Function

form
explanation

string GetMemberName(long id)

Get the name of the user whose ID is id among the clan members.

void Invalidate()

Update clan information.

Example

Print when the clan was created

local myClan = unit.player.clan; 
print(myClan.createdAt.ToLocalTime());

Print out the clan ID

local myClan = unit.player.clan; 
print(myClan.id);

Print all clan members' IDs

local memberIDs = unit.player.clan.memberIDs;

for i = 0, #memberIDs do
  print(memberIDs[i]);
end

Print the clan name

local myClan = unit.player.clan;
print(myClan.name);
PreviousServer ScriptNextScriptColor

Last updated 5 months ago