This is a brief guide on how to set up monsters for using magic.

Settings:-

In order for your monsters to use spells you must include the SPATTACK and
SPADELAY settings under the Monsters section in the npc.scp/uox3.scp file.  The value
SPATTACK is set to is a combination of bits represented decimally, and the
value SPADELAY is the delay between each time the monster uses a spell. There is
an example below if you are confused. The first 13 bits represents spells
and the last 3 Fireballs.

Spell Table:-

Bit	dec	Spell
1	1	MagicArrow
2	2	Harm
3	4	Clumsy
4	8	FeebleMind
5	16	Weaken
6	32	Fireball
7	64	Curse
8	128	Lighting
9	256	Paralyze
10	512	MindBlast
11	1024	Engerybolt
12	2048	Explosion
13	4096	FlameStrike
14	8192	Dragon Breath - 20 % of source health
15	16384	Dragon Breath - 40 % of source health
16	32768	Dragon Breath - 60 % of source health

A monster using lighting, fireball and explosion.
SPATTACK = 2198
The value is calculated as so:-
2198 = 128(lighting) + 32 (fireball) + 2048 (Explosion)



The damage your monster will do with a spell cast is set using the MAGERY 
SKILL setting, again in the monsters section of the ncp.scp/uox3.scp.  The
level of magery will effect the damage in the same way fit does for player
characters.  The exception to the rule is damage the last 3 Fireballs which
is set by the level of hits points of the monsters.

Setting the magery level.
SKILL 25 700
SKILL is the setting name
25 is the magery id in the skill table
700 is 70 magery (level/10)



Example Monsters
SECTION NPC 24
{
NAME a lich
ID 0018
SKIN 0000
DIRECTION N
BACKPACK
GOLD 120 230
PACKITEM 104
ATT 80
DEF 70
STR 200
INT 150
DEX 35
NPCWANDER 4
FX1 -1
FX2 20
FY1 -1
FZ1 -1
FAME 4000
KARMA -5000
NPCAI 2
LOOT 10
SPATTACK 8191	All spells
SPADELAY 30
SKILL 25 700	70 magery
}


SECTION NPC 93
{
NAME an ancient wyrm
ID 003b
SKIN 07de
DIRECTION N
BACKPACK
ATT 350
DEF 150
STR 1500
DEX 50
INT 600
NPCAI 0
LOOT 1
GOLD 800 2000
NPCWANDER 4
FX1 -1
FY1 -1
FZ1 -1
FX2 20
FAME 10000
KARMA 500
LOOT 10
SPATTACK 32768		60 % hit dammage fireball only
SPADELAY 80
}

