setProfile(number, "melee" | "ranged" | "magic", number, number) | () | Simulate NPCs of type npcId: style is "melee", "ranged" or "magic" (any other raises an error); range the attack range in tiles (igno… |
|---|
setFlags(number, boolean, boolean) | () | Collision flags for npcId: blocksEntities false for NPCs that neither block nor are blocked (Jal-Nib); fullBlock true for NPCs that b… |
|---|
setAttackAnims(number, {number}) | () | The animation ids that mark an attack by npcId, for attack timing. Like setFlags, they apply on top of the type's profile: its `setProf… |
|---|
clearProfiles() | () | Forgets every setProfile, setFlags and setAttackAnims, and the latest rollout. |
|---|
useCacheProfiles(boolean) | () | Simulate every NPC type the client has loaded that can fight (combat level above 0), not only those given a setProfile: attack speed and… |
|---|
rollout(number, {WorldPoint}?) | boolean | Simulates ticks ticks from now (at most 200) and keeps the result for the queries below. The player follows path when given, else its o… |
|---|
tileAt(NPC, number) | WorldPoint? | Where npc stands at tick (its south-west tile); nil when lost, not simulated, or past the latest rollout. The first of several when the… |
|---|
tilesAt(NPC, number) | {WorldPoint} | Every tile npc may stand on at tick; empty where tileAt is nil. |
|---|
attacksAt(number) | {NPC} | The NPCs that attack you (certainly or possibly) on tick. An attack on another NPC does not count, here or in isCertain and `firstAttac… |
|---|
isCertain(NPC, number) | boolean | Whether npc's attack on you on tick is certain (false when none or only possible). |
|---|
firstAttack(NPC) | number? | The first tick npc may attack you in the latest rollout; nil when it does not. |
|---|
canAttack(NPC, WorldPoint) | boolean | Whether npc, from where it stands now, could attack a player on tile. False for an NPC without a profile. |
|---|
isSafespot(WorldPoint) | boolean | Whether standing on tile (walking there first) is safe from every simulated NPC: within 32 ticks you arrive, none can attack you there an… |
|---|
safespots(number, number?) | {WorldPoint} | Safe tiles within radius (at most 30) of the player, nearest first. With attackRange, only tiles the player can hit a stalled NPC from:… |
|---|