Spell ID's

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Aeros
Journeyman Poster
Posts: 69
Joined: Mon Apr 24, 2006 10:56 am

Spell ID's

Post by Aeros »

Hi again,

Quick question - what are "valid" spellid ranges? Reason I'm asking, is, i've created and configured the necromancer spellbook, as follows:

Code: Select all

Spellbook 0xF9FB
{
    Name                necrospellbook
    desc                Book of Necromancy
    Graphic          		0x2253   
    SpellType						Necro
    Gump                0xFFFF
    MinX                40
    MaxX                60
    MinY                20
    MaxY                80
    Newbie              1
    BlocksCastingIfInHand 0
    RequiresAttention   0
    VendorSellsFor      22
    VendorBuysFor       11
    weight              1    
}
With scroll configurations:

Code: Select all

Item 0x2260
{
    Name           necroanimatedeadscroll
    Desc           Animate Dead scroll
    Script         necroscroll
    CProp Spellid  i501
    VendorBuysFor  6
    VendorSellsFor 12
    Weight         1/10
}
etc..
With spellid configurations, in spells.cfg:

Code: Select all

Spell 501
{
    SpellId     501
    Name        Animate Dead
    Script      animatedead
    PowerWords  Uus Corp
    mana        23
    difficulty  40
    pointvalue  50
    delay				1
    Reagent			0x0F92
    Reagent			0x0F93
}
etc...
The scrolls use the objtypes as stated in the comment in core-changes.txt.

As you can see, they use the 501- range. Yet, when I try to cast one of these spells, I get the message "Only a mage can cast these spells". This message comes from spellRestrictions.inc, in the maincast function.

Nowhere in my necro scripts am I calling that function - so why is it being called? I can only assume the core is doing this - but why?

NOTE: When I do StartSpellEffect(who,501);, it calls the correct spell. But when done via the necro spellbook, it doesn't.

Can anyone advise?
Aeros
Journeyman Poster
Posts: 69
Joined: Mon Apr 24, 2006 10:56 am

Post by Aeros »

I've put some prints in the spellRestrictions file to see what the spellid is, and:

When I cast the animate dead spell (spellid 501 as configured, see above post), the core thinks its spellid 1. Therefore, its treated as a normal spell.

Anyone know why?
Aeros
Journeyman Poster
Posts: 69
Joined: Mon Apr 24, 2006 10:56 am

Post by Aeros »

Bleh, disregard this thread.

I mixed up the spellid ranges. Necro spellid's start from 101, not 501.

Sorry.
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

Just to fill in the whole picture (from irc channel info)
Spellids:

Necromancy 101 - 116 (note there are only 16 spells and scrolls (see core changes.txt)
http://uo.stratics.com/content/guides/necromancy1.shtml
Aeros was thinking that exorcism in this list is not really there - stratics thinks there are 17 necro spells)

Paladin 201-210
http://uo.stratics.com/content/guides/p ... ties.shtml
Post Reply