Resting & Using Items
Resting allows you to fully recover your hit points. The cooldown is 1 second per 1% of missing HP (rounded up), with a minimum of 3 seconds.
For example, if your character has lost 50% of their HP, the cooldown will be 50 seconds.
You can rest by using this request:
Endpoint: POST /my/{name}/action/rest
curl --request POST \--url https://api.artifactsmmo.com/my/{name}/action/rest \--header 'Accept: application/json' \--header 'Authorization: Bearer YOUR_TOKEN' \--header 'Content-Type: application/json' \const url = 'https://api.artifactsmmo.com/my/{name}/action/rest';const options = {method: 'POST',headers: { 'Content-Type': 'application/json', Accept: 'application/json', Authorization: 'Bearer YOUR_TOKEN'}
};
try {const response = await fetch(url, options);const data = await response.json();console.log(data);} catch (error) {console.error(error);}import requests
url = "https://api.artifactsmmo.com/my/{name}/action/rest"headers = { "Accept": "application/json", "Content-Type": "application/json", "Authorization": "Bearer YOUR_TOKEN"}
response = requests.post(url, headers=headers)print(response.json())Using items
Section titled “Using items”You can use all items categorized as consumable.
There are several types of consumables:
| Keyword | Condition |
|---|---|
| Heal | Restores x health points to your character. |
| Gold | Adds x gold to your character’s inventory. |
| Teleport | Teleport to Map ID: x |
Conditions
Section titled “Conditions”To use an item, your character must meet all the item’s conditions. Conditions use the ConditionSchema logic, which can reference any character stat (e.g., level, mining_level, hp, etc.) using various operators:
| Operator | Meaning |
|---|---|
eq | Equal to |
ne | Not equal to |
gt | Greater than |
lt | Less than |
Here are some examples of consumables:
Loading items...
Use Action
Section titled “Use Action”You can use an item by using this request.
Endpoint: POST /my/{name}/action/use
curl --request POST \--url https://api.artifactsmmo.com/my/{name}/action/use \--header 'Accept: application/json' \--header 'Authorization: Bearer YOUR_TOKEN' \--header 'Content-Type: application/json' \--data '{"code": "string","quantity": 1}'const url = 'https://api.artifactsmmo.com/my/{name}/action/use';const options = {method: 'POST',headers: { 'Content-Type': 'application/json', Accept: 'application/json', Authorization: 'Bearer YOUR_TOKEN'}, body: '{"code":"string","quantity":1}'
};
try {const response = await fetch(url, options);const data = await response.json();console.log(data);} catch (error) {console.error(error);}import requests
url = "https://api.artifactsmmo.com/my/{name}/action/use"headers = { "Accept": "application/json", "Content-Type": "application/json", "Authorization": "Bearer YOUR_TOKEN"}data = {"code": "string", "quantity": 1}
response = requests.post(url, json=data, headers=headers)print(response.json())| Field | Description |
|---|---|
code | The consumable item code to use. |
quantity | Number of items to use. |