Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Constants and Enums

Reference page for all constants, enumerations, and flag types used in the Script API.

In Pascal, constants and enums are available directly. In Python, enums are importable from py_astealth.stealth_enums.

Справочная страница всех констант, перечислений и типов флагов, используемых в Script API.

В Pascal константы и перечисления доступны напрямую. В Python enum’ы импортируются из py_astealth.stealth_enums.


Directions

Movement directions used by Step, StepQ, CalcDir, GetDirection.

Pascal

const
  dirNorth     = 0;
  dirNorthEast = 1;
  dirEast      = 2;
  dirSouthEast = 3;
  dirSouth     = 4;
  dirSouthWest = 5;
  dirWest      = 6;
  dirNorthWest = 7;

Python

from py_astealth.stealth_enums import Direction

Direction.North      # 0
Direction.NorthEast  # 1
Direction.East       # 2
Direction.SouthEast  # 3
Direction.South      # 4
Direction.SouthWest  # 5
Direction.West       # 6
Direction.NorthWest  # 7
Value Direction
0 North
1 NorthEast
2 East
3 SouthEast
4 South
5 SouthWest
6 West
7 NorthWest

Spell

Spell identifiers used by Cast, CastToObject.

Pascal

In Pascal, spells are identified by name (string), e.g. 'Greater Heal', 'Lightning'.

Python

from py_astealth.stealth_enums import Spell

Magery (1st–8th circle)

Enum Value Circle
Spell.Clumsy 1 1st
Spell.CreateFood 2 1st
Spell.FeebleMind 3 1st
Spell.Heal 4 1st
Spell.MagicArrow 5 1st
Spell.NightSight 6 1st
Spell.ReactiveArmor 7 1st
Spell.Weaken 8 1st
Spell.Agility 9 2nd
Spell.Cunning 10 2nd
Spell.Cure 11 2nd
Spell.Harm 12 2nd
Spell.MagicTrap 13 2nd
Spell.MagicUntrap 14 2nd
Spell.Protection 15 2nd
Spell.Strength 16 2nd
Spell.Bless 17 3rd
Spell.Fireball 18 3rd
Spell.MagicLock 19 3rd
Spell.Poison 20 3rd
Spell.Telekinesis 21 3rd
Spell.Teleport 22 3rd
Spell.Unlock 23 3rd
Spell.wallOfStone 24 3rd
Spell.ArchCure 25 4th
Spell.ArchProtection 26 4th
Spell.Curse 27 4th
Spell.FireField 28 4th
Spell.GreaterHeal 29 4th
Spell.Lightning 30 4th
Spell.ManaDrain 31 4th
Spell.Recall 32 4th
Spell.BladeSpirit 33 5th
Spell.DispelField 34 5th
Spell.Incognito 35 5th
Spell.MagicReflection 36 5th
Spell.MindBlast 37 5th
Spell.Paralyze 38 5th
Spell.PoisonField 39 5th
Spell.SummonCreature 40 5th
Spell.Dispel 41 6th
Spell.EnergyBolt 42 6th
Spell.Explosion 43 6th
Spell.Invisibility 44 6th
Spell.Mark 45 6th
Spell.MassCurse 46 6th
Spell.ParalyzeField 47 6th
Spell.Reveal 48 6th
Spell.ChainLightning 49 7th
Spell.EnergyField 50 7th
Spell.FlameStrike 51 7th
Spell.GateTravel 52 7th
Spell.ManaVampire 53 7th
Spell.MassDispel 54 7th
Spell.MeteorSwarm 55 7th
Spell.Polymorph 56 7th
Spell.Earthquake 57 8th
Spell.EnergyVortex 58 8th
Spell.Resurrection 59 8th
Spell.SummonAirElemental 60 8th
Spell.SummonDaemon 61 8th
Spell.SummonEarthElemental 62 8th
Spell.SummonFireElemental 63 8th
Spell.SummonWaterElemental 64 8th

Necromancy (101–117)

Enum Value
Spell.AanimateDead 101
Spell.BloodOath 102
Spell.CorpseSkin 103
Spell.CurseWeapon 104
Spell.EvilOmen 105
Spell.HorrificBeast 106
Spell.LichForm 107
Spell.MindRot 108
Spell.PainSpike 109
Spell.PoisonStrike 110
Spell.Strangle 111
Spell.SummonFamiliar 112
Spell.VampiricEmbrace 113
Spell.VengefulSpirit 114
Spell.Wwither 115
Spell.WraithForm 116
Spell.Exorcism 117

Paladin / Chivalry (201–210)

Enum Value
Spell.CleanseByFire 201
Spell.CloseWounds 202
Spell.ConsecrateWeapon 203
Spell.DispelEvil 204
Spell.DivineFury 205
Spell.EnemyOfOne 206
Spell.HolyLight 207
Spell.NobleSacrifice 208
Spell.RemoveCurse 209
Spell.SacredJourney 210

Bushido (401–406)

Enum Value
Spell.HonorableExecution 401
Spell.Confidence 402
Spell.Evasion 403
Spell.CounterAttack 404
Spell.LightningStrike 405
Spell.MomentumStrike 406

Ninjitsu (501–508)

Enum Value
Spell.FocusAttack 501
Spell.DeathStrike 502
Spell.AnimalForm 503
Spell.KiAttack 504
Spell.SurpriseAttack 505
Spell.Backstab 506
Spell.ShadowJump 507
Spell.MirrorImage 508

Spellweaving (601–616)

Enum Value
Spell.ArcaneCircle 601
Spell.GiftOfRenewal 602
Spell.ImmolatingWeapon 603
Spell.Attunement 604
Spell.Thunderstorm 605
Spell.NatureRury 606
Spell.SummonFey 607
Spell.SummonFiend 608
Spell.ReaperForm 609
Spell.Wildfire 610
Spell.EssenceOfWind 611
Spell.DryadAllure 612
Spell.EtherealVoyage 613
Spell.WwordOfDeath 614
Spell.GiftOfLife 615
Spell.AarcaneEmpowerment 616

Mysticism (678–693)

Enum Value
Spell.NetherBolt 678
Spell.HealingStone 679
Spell.PureMagic 680
Spell.Enchant 681
Spell.Sleep 682
Spell.EeagleStrike 683
Spell.AnimatedWeapon 684
Spell.StoneForm 685
Spell.SpellTrigger 686
Spell.MassSleep 687
Spell.CleansingWinds 688
Spell.Bombard 689
Spell.SpellPlague 690
Spell.HailStorm 691
Spell.NetherCyclone 692
Spell.RisingColossus 693

Masteries (701–745)

Enum Value Skill
Spell.Inspire 701 Provocation
Spell.Invigorate 702 Provocation
Spell.Resilience 703 Peacemaking
Spell.Perseverance 704 Peacemaking
Spell.Tribulation 705 Discordance
Spell.Despair 706 Discordance
Spell.DeathRay 707 Magery
Spell.EetherealBlast 708 Magery
Spell.NetherBlast 709 Mysticism
Spell.MysticWeapon 710 Mysticism
Spell.CommandUndead 711 Necromancy
Spell.Conduit 712 Necromancy
Spell.ManaShield 713 Spellweaving
Spell.Summonreaper 714 Spellweaving
Spell.EnchantedSummoning 715 Shared
Spell.AnticipateHit 716 Bushido
Spell.WarCry 717 Bushido
Spell.Intuition 718 Shared
Spell.Rejuvenate 719 Chivalry
Spell.HolyFist 720 Chivalry
Spell.Shadow 721 Ninjitsu
Spell.WhiteTigerForm 722 Ninjitsu
Spell.FlamingShot 723 Archery
Spell.PlayingTheOdds 724 Archery
Spell.Thrust 725 Fencing
Spell.Pierce 726 Fencing
Spell.Stagger 727 Mace Fighting
Spell.Toughness 728 Mace Fighting
Spell.Onslaught 729 Swordsmanship
Spell.FocusedEye 730 Swordsmanship
Spell.ElementalFury 731 Throwing
Spell.CalledShot 732 Throwing
Spell.WarriorsGifts 733 Shared
Spell.ShieldBash 734 Parrying
Spell.Bodyguard 735 Parrying
Spell.HeightenSenses 736 Parrying
Spell.Tolerance 737 Poisoning
Spell.InjectedStrike 738 Poisoning
Spell.Potency 739 Poisoning
Spell.Rampage 740 Wrestling
Spell.FistsOfFury 741 Wrestling
Spell.Knockout 742 Wrestling
Spell.Whispering 743 Animal Taming
Spell.CombatTraining 744 Animal Taming
Spell.Boarding 745 Animal Taming

Stats

Stat constants used by SetStatLockState and related methods.

Pascal

const
  statSTR  = 0;
  statDEX  = 1;
  statINT  = 2;

  statUP   = 0;
  statDOWN = 1;
  statLOCK = 2;

Python

from py_astealth.stealth_enums import StatType, StatState

StatType.Str   # 0
StatType.Dex   # 1
StatType.Int   # 2

StatState.Up   # 0
StatState.Down # 1
StatState.Lock # 2

LOS Types and Flags

Line of sight constants used by CheckLOS and the LOSOptions variable.

Pascal

const
  losTypeSphere           = 1;
  losTypeSphereAdv        = 2;
  losTypeRunUO            = 3;
  losTypePOL              = 4;

  losSphereCheckCorners   = $100;  // 256
  losPolUseNoShoot        = $200;  // 512
  losPolLOSThroughWindow  = $400;  // 1024

Usage: combine type and flags with OR: LOSOptions := losTypePOL or losPolUseNoShoot;

Python

from py_astealth.stealth_enums import LOSCheckType, LOSCheckOption

LOSCheckType.Sphere        # 1
LOSCheckType.SphereAdv     # 2
LOSCheckType.Pol           # 3
LOSCheckType.RunUO         # 4

LOSCheckOption.SphereCheckCorners   # 0x100
LOSCheckOption.PolUseNoShoot        # 0x200
LOSCheckOption.PolLosThroughWindow  # 0x400

Virtue

Virtue identifiers used by UseVirtue.

Python

from py_astealth.stealth_enums import Virtue

Virtue.Compassion     # 0x69
Virtue.Honesty        # 0x6A
Virtue.Honor          # 0x6B
Virtue.Humility       # 0x6C
Virtue.Justice        # 0x6D
Virtue.Sacrifice      # 0x6E
Virtue.Spirituality   # 0x6F
Virtue.Valor          # 0x70

FigureKind and FigureCoord

Figure types used by AddFigure.

Pascal

TFigureKind = (fkLine, fkEllipse, fkRectangle, fkDirection, fkText);
TFigureCoord = (fcWorld, fcScreen);

Python

from py_astealth.stealth_enums import FigureKind, FigureCoord

FigureKind.fkLine        # 0
FigureKind.fkEllipse     # 1
FigureKind.fkRectangle   # 2
FigureKind.fkDirection   # 3
FigureKind.fkText        # 4

FigureCoord.fcWorld      # 0
FigureCoord.fcScreen     # 1

BrushStyle

Brush fill styles used in TMapFigure.

Pascal

TBrushStyle = (bsSolid, bsClear, bsHorizontal, bsVertical,
  bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross);

Python

from py_astealth.stealth_enums import BrushStyle

BrushStyle.bsSolid       # 0
BrushStyle.bsClear       # 1
BrushStyle.bsHorizontal  # 2
BrushStyle.bsVertical    # 3
BrushStyle.bsFDiagonal   # 4
BrushStyle.bsBDiagonal   # 5
BrushStyle.bsCross       # 6
BrushStyle.bsDiagCross   # 7

UIWindowType

Window types used by CloseClientUIWindow.

Pascal

TUIWindowType = (wtPaperdoll, wtStatus, wtCharProfile, wtContainer);

Python

from py_astealth.stealth_enums import UIWindowType

UIWindowType.Paperdoll    # 0
UIWindowType.Status       # 1
UIWindowType.CharProfile  # 2
UIWindowType.Container    # 3

Layer

Equipment layer constants.

Python

from py_astealth.stealth_enums import Layer

Layer.RhandLayer    # 0x01
Layer.LhandLayer    # 0x02
Layer.ShoesLayer    # 0x03
Layer.PantsLayer    # 0x04
Layer.ShirtLayer    # 0x05
Layer.HatLayer      # 0x06
Layer.GlovesLayer   # 0x07
Layer.RingLayer     # 0x08
Layer.TalismanLayer # 0x09
Layer.NeckLayer     # 0x0A
Layer.HairLayer     # 0x0B
Layer.WaistLayer    # 0x0C
Layer.TorsoLayer    # 0x0D
Layer.BraceLayer    # 0x0E
Layer.BeardLayer    # 0x10
Layer.TorsoHLayer   # 0x11
Layer.EarLayer      # 0x12
Layer.ArmsLayer     # 0x13
Layer.CloakLayer    # 0x14
Layer.BpackLayer    # 0x15
Layer.RobeLayer     # 0x16
Layer.EggsLayer     # 0x17
Layer.LegsLayer     # 0x18
Layer.HorseLayer    # 0x19
Layer.RstkLayer     # 0x1A
Layer.NRstkLayer    # 0x1B
Layer.SellLayer     # 0x1C
Layer.BankLayer     # 0x1D

Related helper methods are documented on a separate page: Layers:ArmsLayer()WaistLayer().

На отдельной странице Layers описаны связанные helper-методы:ArmsLayer()WaistLayer().


Reagent

Reagent item type constants.

Python

from py_astealth.stealth_enums import Reagent

Reagent.BlackPearl    # 0x0F7A
Reagent.BloodMoss     # 0x0F7B
Reagent.Garlic        # 0x0F84
Reagent.Ginseng       # 0x0F85
Reagent.MandrakeRoot  # 0x0F86
Reagent.Nightshade    # 0x0F88
Reagent.SulfurousAsh  # 0x0F8C
Reagent.SpidersSilk   # 0x0F8D

Related helper methods are documented on a separate page: Reagents: BP()SS(),BPCount()SSCount().

На отдельной странице Reagents описаны связанные helper-методы: BP()SS(),BPCount()SSCount().


Messenger

Messenger types for notification events.

Python

from py_astealth.stealth_enums import Messenger

Messenger.Telegram  # 1
Messenger.Viber     # 2
Messenger.Discord   # 3

Global

Global variable storage regions.

Python

from py_astealth.stealth_enums import Global

Global.Stealth  # 0
Global.Char     # 1

TileGroup

Tile group types for GetTileFlags, ConvertIntegerToFlags.

Python

from py_astealth.stealth_enums import TileGroup

TileGroup.Land    # 0
TileGroup.Static  # 1

MobileFlags / ItemFlags

Bitwise flag types for mobile and item state.

Python

from py_astealth.stealth_enums import MobileFlags, ItemFlags

# MobileFlags (bitwise Flag)
MobileFlags.Poisoned    # 0x04
MobileFlags.YellowHits  # 0x08
MobileFlags.Paralyzed   # 0x20
MobileFlags.WarMode     # 0x40
MobileFlags.Hidden      # 0x80

# ItemFlags (bitwise Flag)
ItemFlags.Movable  # 0x20
ItemFlags.Hidden   # 0x80