Character Reference¶
- class artifacts.Character(name, http, *, auto_wait=True)[source]¶
Bases:
objectController for a single character.
Created via
client.character("name"). Actions are organized into game-oriented sub-objects:char = client.character("MyChar") # Direct actions (combat & movement) await char.move(x=0, y=1) await char.fight() await char.rest() # Domain sub-objects await char.skills.craft(code="iron_sword") await char.bank.deposit_gold(quantity=100) await char.equipment.equip(code="iron_sword", slot=ItemSlot.WEAPON) await char.inventory.use(code="cooked_chicken") await char.tasks.new() await char.ge.sell(code="iron_ore", quantity=10, price=5) await char.trading.npc_buy(code="healing_potion")
By default, the SDK automatically waits for cooldowns before each action so that results are returned immediately. Override per-call with
wait=False:result = await char.fight(wait=False) # returns immediately
- async get()[source]¶
Fetch full character info (GET /characters/{name}).
- Return type:
CharacterSchema
- async move(*, x=None, y=None, map_id=None)[source]¶
Move the character.
Provide either
map_idorx+ycoordinates.
- async transition()[source]¶
Execute a layer transition (go underground, enter building, etc.).
- Return type:
CharacterTransitionDataSchema
- async fight(*, participants=None)[source]¶
Fight a monster on the current map tile.
For bosses, pass up to 2 additional character names in
participants.