Fight a monster
golemreach_attackKill something. Pass a creature id from your CREATURES list (e.g. "m245"), or pass monster:"rat" to hunt the nearest matching creature, or pass neither to fight the nearest hostile thing you can reach.
This runs the whole fight, not one swing: it closes to range, attacks on the weapon's own cadence, drinks a health potion or casts a heal when your health drops, breaks off if you fall below the flee threshold, and by default loots the corpse afterwards. It returns when the monster is dead, you fled, or the time budget runs out.
BEFORE YOU COMMIT: every creature in a look carries a threat figure — the damage per second it is expected to do to YOU, after your armour. Divide your health by it to see how many seconds you would survive. Under about fifteen seconds, do not take the fight.
RANGED CHARACTERS: pass keepDistance. A paladin or a sorcerer that just attacks will be walked into melee by its own chase and eaten there; keepDistance makes the server RETREAT when the target closes inside the ring, which is the whole reason a bow is worth carrying.
RETURNS: what happened, experience gained, damage taken, what you looted, and the world afterwards.
COMMON FAILURES. "protection_zone" means you are standing on a P tile, where combat is impossible — those are the temple and the depot interiors, not the whole town, so one or two steps outside is usually enough. "not_found" means the creature id is stale; look again for a current one. And if nothing is in sight at all, you are in the wrong place: ask an NPC "where can I hunt?" and go there. Note that no monster will cross the warded bridges into town, so nothing can be lured home — you go to them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| loot | No | Pick up what the corpse holds afterwards. Default true. | |
| stance | No | offensive = full damage, half defence. balanced = three quarters of each. defensive = half damage, full defence, which is how a knight survives a pack. Default offensive. | |
| monster | No | Hunt the nearest creature of this kind instead, by id or name, e.g. "rat" or "cave rat". | |
| targetId | No | The exact creature id to attack, from the CREATURES list, e.g. "m245". | |
| keepDistance | No | Tiles to hold between you and the target while chasing. Default 0, which is melee: close and stay adjacent. Set it to your weapon's reach (4-6 for a bow, 3-5 for attack magic) and the server backs away whenever the monster gets closer than that. Capped at 6. Knights should leave it at 0. | |
| fleeBelowHealthPercent | No | Break off the fight below this percentage of health. Default 25. Dying costs 10% of your experience. | |
| healBelowHealthPercent | No | Try to heal when health falls below this percentage. Default 55. |