> For the complete documentation index, see [llms.txt](https://plugins.phbot.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://plugins.phbot.org/phbot-api/character.md).

# Character

## get\_character\_data()

This function returns stats of the current character.

#### Usage

`get_character_data()`

#### Returns

`None` or an object containing character data.

* The object can be empty.

```
{
	'server': '',
	'name': '',
	'model': 1907,
	'guild': '',
	'job_name': '',
	'region': 25000,
	'x': 6428.2373046875,
	'y': 1086.672607421875,
	'hp': 32207,
	'mp': 8744,
	'hp_max': 32207,
	'mp_max': 8744,
	'level': 110,
	'dead': False,
	'gold': 99920423940,
	'current_exp': 34360711,
	'max_exp': 4044607839,
	'sp': 997208910,
	'job_current_exp': 1698,
	'job_max_exp': 70875,
	'player_id': 33349,
	'account_id': 3,
	'locale': 22,
	'exp_ratio': 1.0
}
```

## get\_position()

This function returns the character's current position.

#### Usage

`get_position()`

#### Returns

`None` or an object containing position data.

```
{
    'region': 24744,
    'z': -52.93023681640625,
    'y': 828.7999877929688,
    'x': 6435.89990234375
}
```

## get\_active\_skills()

This function returns a dictionary of active skills.

#### Usage

`get_active_skills()`

#### Returns

`None` or a dictionary of active skills.

```
{
	5411: {
		'name': 'Increase Moving speed 100%',
		'servername': 'SKILL_MALL_MOVE_SPEED_UP_100_01'
	}
}
```

## get\_skills()

This function returns a dictionary of the players skills.

#### Usage

`get_skills()`

#### Returns

`None` or a dictionary of all the players skills.

```
{
	1414: {
		'name': 'Flame body - Extreme',
		'servername': 'SKILL_CH_FIRE_GONGUP_C_03',
		'level': 64,
		'mastery': 275,
		'cast_time': 1000,
		'cooldown': 5000,
		'duration': 617647,
		'active': False,
		'can_cast': True
	},
	1286: {
		'name': 'Grass Walk - Flow',
		'servername': 'SKILL_CH_LIGHTNING_GYEONGGONG_A_12',
		'level': 45,
		'mastery': 274,
		'cast_time': 0,
		'cooldown': 15000,
		'duration': 511849,
		'active': False,
		'can_cast': False
	},
	992: {
		'name': '4 Arrow Combo ',
		'servername': 'SKILL_CH_BOW_CHAIN_C_09',
		'level': 67,
		'mastery': 259,
		'cast_time': 561,
		'cooldown': 4000,
		'duration': 0,
		'active': False,
		'can_cast': True
	},
	7835: {
		'name': 'Anti Devil Bow - Annihilate',
		'servername': 'SKILL_CH_BOW_CRITICAL_E_06',
		'level': 100,
		'mastery': 259,
		'cast_time': 530,
		'cooldown': 4000,
		'duration': 0,
		'active': False,
		'can_cast': True
	},
	984: {
		'name': '3 Arrow Combo',
		'servername': 'SKILL_CH_BOW_CHAIN_B_09',
		'level': 45,
		'mastery': 259,
		'cast_time': 909,
		'cooldown': 4000,
		'duration': 0,
		'active': False,
		'can_cast': True
	},
	1398: {
		'name': 'Fire Shield - Phoenix',
		'servername': 'SKILL_CH_FIRE_SHIELD_A_06',
		'level': 23,
		'mastery': 275,
		'cast_time': 2000,
		'cooldown': 5000,
		'duration': 410924,
		'active': False,
		'can_cast': True
	},
	1053: {
		'name': 'Demon Soul Arrow',
		'servername': 'SKILL_CH_BOW_NORMAL_A_05',
		'level': 35,
		'mastery': 259,
		'cast_time': 0,
		'cooldown': 5000,
		'duration': 471429,
		'active': False,
		'can_cast': True
	},
	1: {
		'name': 'Normal Attack',
		'servername': 'SKILL_PUNCH_01',
		'level': 0,
		'mastery': 0,
		'cast_time': 1500,
		'cooldown': 1500,
		'duration': 0,
		'active': False,
		'can_cast': True
	}
etc...
```

## get\_mastery()

This function returns a dictionary of the players skill masteries.

#### Usage

`get_mastery()`

Returns

`None` or a dictionary of masteries.

```
{
	257: {
		'name': 'Bicheon',
		'level': 0,
		'sp': -1
	},
	258: {
		'name': 'Heuksal',
		'level': 0,
		'sp': -1
	},
	259: {
		'name': 'Pacheon',
		'level': 100,
		'sp': 13174
	},
	273: {
		'name': 'Cold',
		'level': 0,
		'sp': -1
	},
	274: {
		'name': 'Lightning',
		'level': 91,
		'sp': 4515
	},
	275: {
		'name': 'Fire',
		'level': 100,
		'sp': 13174
	},
	276: {
		'name': 'Force',
		'level': 0,
		'sp': -1
	}
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://plugins.phbot.org/phbot-api/character.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.
