Page 1 of 1

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

Posted: Mon Apr 18, 2011 1:33 pm
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

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

Posted: Mon Apr 18, 2011 2:53 pm
by RusseL
add
if (!caster.npctemplate)
in your reagents checker

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

Posted: Mon Apr 18, 2011 5:39 pm
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

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

Posted: Tue Apr 19, 2011 9:58 am
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.