# ScriptClan

## 설명 <a href="#undefined" id="undefined"></a>

게임 내의 한 클랜과 대응하며, 해당 클랜에 대한 정보를 제공하는 클래스입니다.

## 속성 <a href="#undefined" id="undefined"></a>

| 형식                             | 설                                                                                                                                                                                                                                      |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| DateTime createdAt { get; }    | 클랜이 생성된 시점입니다. [예제](https://nekoland.atlassian.net/wiki/spaces/nekoland/pages/457113621/ScriptClan#%ED%81%B4%EB%9E%9C%EC%9D%B4-%EC%83%9D%EC%84%B1%EB%90%9C-%EC%8B%9C%EC%A0%90-%EC%B6%9C%EB%A0%A5%ED%95%98%EA%B8%B0)                    |
| long id { get; }               | 클랜의 고유 ID 입니다. [예제](https://nekoland.atlassian.net/wiki/spaces/nekoland/pages/457113621/ScriptClan#%ED%81%B4%EB%9E%9C%EC%9D%98-ID-%EC%B6%9C%EB%A0%A5%ED%95%98%EA%B8%B0)                                                                |
| long masterPlayerID { get; }   | 클랜 마스터 플레이어의 ID 입니다.                                                                                                                                                                                                                   |
| long\[] memberIDs { get; }     | 클랜의 모든 맴버들의 ID를 배열 형식으로 가져옵니다. [예제](https://nekoland.atlassian.net/wiki/spaces/nekoland/pages/457113621/ScriptClan#%EB%AA%A8%EB%93%A0-%ED%81%B4%EB%9E%9C-%EB%A7%B4%EB%B2%84%EB%93%A4%EC%9D%98-ID-%EC%B6%9C%EB%A0%A5%ED%95%98%EA%B8%B0) |
| Table customData { get; set; } | 클랜의 커스텀 데이터입니다.                                                                                                                                                                                                                        |
| string name { get; }           | 클랜의 고유 이름입니다. [예제](https://nekoland.atlassian.net/wiki/spaces/nekoland/pages/457113621/ScriptClan#%ED%81%B4%EB%9E%9C%EC%9D%98-%EC%9D%B4%EB%A6%84-%EC%B6%9C%EB%A0%A5%ED%95%98%EA%B8%B0)                                                 |

## 함수 <a href="#undefined" id="undefined"></a>

| 형식                            | 설명                                |
| ----------------------------- | --------------------------------- |
| string GetMemberName(long id) | 클랜 맴버들 중 아이디가 id 인 유저의 이름을 가져옵니다. |
| void Invalidate()             | 클랜 정보를 갱신합니다.                     |

## 사용 예제 <a href="#undefined" id="undefined"></a>

### **클랜이 생성된 시점 출력하기**

{% code overflow="wrap" lineNumbers="true" %}

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

{% endcode %}

### **클랜의 ID 출력하기**

{% code overflow="wrap" lineNumbers="true" %}

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

{% endcode %}

### **모든 클랜 맴버들의 ID 출력하기**

{% code overflow="wrap" lineNumbers="true" %}

```
local memberIDs = unit.player.clan.memberIDs;

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

{% endcode %}

### **클랜의 이름 출력하기**

{% code lineNumbers="true" %}

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

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.punkland.io/punkland/punkland-studio/script/undefined-1/scriptclan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
