PDA

View Full Version : Quest NPCs casting wrong spells?


tomvs123
12-27-2004, 04:58 AM
I'm attempting at getting the soulbinders working on my server but it's not working properly



sub EVENT_SAY {
if ($text=~/Hail/i){quest::say("Greetings $name . Blah Blah [bind your soul]."); }
if ($text=~/bind my soul/i){quest::say("Very well. You will return to this spot when you die.");
quest::castspell($userid,2049); }
}



I've tried this, but the NPC casts thunderclap instead. I've checked my spells.txt files and thunderclap is id 471 and 1024. Bind Affinity is 2049 and 35 (I've tried both).

Both Ids of bind affinity work find if a GM casts it, so I'm not sure what's up.

Any help would be greatly appreciated :)

Dave987
12-27-2004, 07:36 AM
Firstly, Bind Soul is a beneficial spell, therefore will not work. Use quest::selfcast() .

As for the whole thunderclasp thing, I'm not too sure what that's about. Try using selfcast() and see if the spell changes at all. Though it is unlikely, it might work.

What do you get when you #findspell the spell's name? That would be the correct Spell ID...

Good luck,
Scary

tomvs123
12-28-2004, 03:11 AM
I failed to notice that beneficial spells do not work yet when npcs cast them. Anywhow, quest::selfcast(2049) works great. Although it's a little weird seeing the character bind himself rather than the binder :)

Dave987
12-28-2004, 03:32 AM
If it's not broken, don't fix it! ;)
I guess you could have the NPC do quest::doanim(____) .
Look for a good animation number which looks like casting, and then it will seem more real that the NPC is casting the spell.

No problem!

Cisyouc
12-28-2004, 04:17 AM
Yeah, Scary pretty much got it. As far as I understand it, the Client does not allow NPC's to cast beneficial spells on PC's, or as far as we yet understand how it works.

Best thing would be to use selfcast(); and if you want, doanim();

RangerDown
12-28-2004, 05:15 AM
This is no restriction in the client. NPC's can and do cast beneficial spells on players in EQlive, and they do so without requiring the PC to self-cast. It's embedded deep in EQEmu's spell system that NPC's casting anything beneficial on PC's is bad, very very bad. What would be required to change that isn't worth it at this point when selfcast is a nice workaround. :P