NPC's can't cast spells (MOBs that is)

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 098.

Moderator: POL Developer

Post Reply
rainmaker24
New User
Posts: 12
Joined: Sun Feb 27, 2011 11:24 am

NPC's can't cast spells (MOBs that is)

Post by rainmaker24 »

So i'm running POL098 with the Asgard/Ackadia scripts and i've put the ConsumeRegs function in each spell individually. However now NPC spellcasters aren't casting spells. I assume it's because the spells require regs individually now. I can think of 2 ways to get around this but not sure how to make them work.

1) Equip NPC's (MOBs) with regeants - not sure how I should put this into their NPC template

2) make them cast as if it's a scroll since they require no regs.



any help would be appreciated
RusseL
Forum Regular
Posts: 375
Joined: Fri Feb 20, 2009 8:30 pm

Re: NPC's can't cast spells (MOBs that is)

Post by RusseL »

add
if (!caster.npctemplate)
in your reagents checker
rainmaker24
New User
Posts: 12
Joined: Sun Feb 27, 2011 11:24 am

Re: NPC's can't cast spells (MOBs that is)

Post by rainmaker24 »

great, looks like i got it working for one spell at least, now to change the rest of them (yay me). at least i only need to change the ones that are being used by the MOBs anyway

While we're on the topic, it looks as though spells are using 2 of each reagent. I just noticed and i don't think it was happening before. Has it always been this way? is there a way i can adjust this? I can't find the actual function for ConsumeReagants to modifiy it
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Re: NPC's can't cast spells (MOBs that is)

Post by Austin »

http://docs.polserver.com/pol098/single ... e=uoem.xml

It will consume the amounts its told to in spells.cfg
If it is consuming twice - it would mean that the script(s) are calling the function more than once.
Post Reply