entity 함수도 사용할 수 있습니다. 타입은 ObjectValue<NPCEntity>입니다.
| Name | Description | Usage |
|---|---|---|
class(): String | NPC의 ID를 문자열로 반환합니다. | q.npc.class() |
name(): String | NPC의 이름을 반환합니다. | q.npc.name() |
level(): Double | NPC의 레벨을 반환합니다. | q.npc.level() |
has_aspect(aspect: String): Double | 1.0을 반환합니다: the NPC contains the aspect, otherwise returns 0.0>/code>. | q.npc.has_aspect('champion') |
face(isLeftSide: Boolean?): ObjectValue<ReferenceDialogueFaceProvider> | [ReferenceDialogueFaceProvider]의 ObjectValue를 반환합니다. isLeftSide의 기본값은 true입니다. | q.npc.face() |
in_battle(): Double | NPC가 배틀 중이면 1.0을 반환하고, 그렇지 않으면 0.0을 반환합니다. | q.npc.in_battle() |
battles(): ArrayStruct<CHECK TYPE> | 이 NPC가 현재 참여 중인 모든 배틀을 반환합니다. | q.npc.battles() |
stop_battles() | Stops all ongoing battles for this NPC. | q.npc.stop_battles() |
is_doing_activity(identifiers: String...): Double | NPC가 매개변수에 나열된 활동 중 하나를 수행 중이면 1.0, 그렇지 않으면 0.0을 반환합니다. | q.npc.is_doing_activity('rest', 'idle') |
run_script_on_client(script: String) | 서버에서 실행하면 NPC와 같은 월드에 있는 모든 플레이어에게 클라이언트에서 script를 실행하라는 패킷을 보냅니다. | q.npc.run_script_on_client('cobblemon:npc_battle_cooling_down') |
run_script(identifier: String): MoValue | identifier의 스크립트를 실행합니다. 스크립트 결과를 반환하며, 실패하면 0.0을 반환합니다. | q.npc.run_script('cobblemon:npc_battle_cooling_down') |
run_action_effect(actionIdentifier: String): Double | Runs an action effect. 1.0을 반환합니다: effect is found, 그렇지 않으면 0.0을 반환합니다. | q.npc.run_action_effect("cobblemon:generic_damage") |
put_pokemon_in_healer(position: ArrayStruct<Int>): Double | The NPC attempts to put pokemon in a healing machine at position. 1.0을 반환합니다: it succeeded, 그렇지 않으면 0.0을 반환합니다. | q.npc.put_pokemon_in_healer(t.pos) |
look_at_position(x: Double, y: Double, z: Double) | Makes the NPC look at the position of x, y, and z. | q.npc.look_at_position(0, 0, 0) |
environment(): MoLangEnvironment | NPC의 환경을 반환합니다. | q.npc.environment() |
party(): MoValue | NPC가 파티를 가지고 있으면 ObjectValue<PartyStore>를 반환하고, 그렇지 않으면 0.0을 반환합니다. | q.npc.party() |
has_party(): Double | 1.0을 반환합니다: NPC has a 파티, 그렇지 않으면 0.0을 반환합니다 | q.npc.has_party() |
is_npc(): Double | 1.0을 반환합니다. | q.npc.is_npc() |
can_battle(): Double | 1.0을 반환합니다: NPC has a 파티 and that 파티 has health or if the 파티 has isStatic set to false. 그렇지 않으면 0.0을 반환합니다 | q.npc.can_battle() |