PDA

View Full Version : NPC don't use spells


shamanistik
04-17-2011, 06:02 PM
Hi there, me again..

Got a problem with NPC casting spells now. They just don't cast, even the regular mobs already in the DB.

I use NPC editor, I see they have a spell_ID number. in my tables, I have npc_spells and npc_spells_entry which are not empty, and seems ok, same for Spells_new.
But Spell_globals is totally empty

I checked forum trying to find, and noticed some people talk about quests for npc castings. do I need to do a script for each mob I want a caster?
The spells for players seems to work fine, as far as I tested..
Anyone have a clue please?

Thanks in advance

EDIT : I use untouched Droga zone to check the NPC casters.

Tyrant1984
04-18-2011, 04:14 AM
I have the same issue on my server! Secrets tested my SQL on his server and it worked fine.



create new spellset 'sk_pet_test' ID 1015
INSERT INTO `npc_spells` (`id`, `name`, `parent_list`, `attack_proc`, `proc_chance`) VALUES
(1015, 'sk_pet_test', 0, -1, 3);

add level 58 SK pet to spellset ID 1015
INSERT INTO `npc_spells_entries` (`id`, `npc_spells_id`, `spellid`, `type`, `minlevel`, `maxlevel`, `manacost`, `recast_delay`, `priority`) VALUES
(8071, 1015, 495, 32, 1, 255, 0, -1, 20);

Create NPCID 999160 a lvl60 SK assigned with NPC_SPELLS_ID 1015
INSERT INTO `npc_types` (`id`,`name`,`lastname`,`level`,`race`,`class`,`bo dytype`,`hp`,`gender`,`texture`,`helmtexture`,`siz e`,`hp_regen_rate`,`mana_regen_rate`,`loottable_id `,`merchant_id`,`npc_spells_id`,`npc_faction_id`,` adventure_template_id`,`trap_template`,`mindmg`,`m axdmg`,`npcspecialattks`,`aggroradius`,`face`,`luc lin_hairstyle`,`luclin_haircolor`,`luclin_eyecolor `,`luclin_eyecolor2`,`luclin_beardcolor`,`luclin_b eard`,`drakkin_heritage`,`drakkin_tattoo`,`drakkin _details`,`armortint_id`,`armortint_red`,`armortin t_green`,`armortint_blue`,`d_meele_texture1`,`d_me ele_texture2`,`prim_melee_type`,`sec_melee_type`,` runspeed`,`MR`,`CR`,`DR`,`FR`,`PR`,`Corrup`,`see_i nvis`,`see_invis_undead`,`qglobal`,`AC`,`npc_aggro `,`spawn_limit`,`attack_speed`,`findable`,`STR`,`S TA`,`DEX`,`AGI`,`_INT`,`WIS`,`CHA`,`see_hide`,`see _improved_hide`,`trackable`,`isbot`,`exclude`,`ATK `,`Accuracy`,`slow_mitigation`,`version`,`maxlevel `,`scalerate`,`private_corpse`,`unique_spawn_by_na me`) VALUES ('999160','Madame_Serena','','60','71','5','1','20 0','1','0','0','6','0','0','0','0','1015','202','0 ','0','1','20','','55','0','0','0','0','1','0','0' ,'0','0','0','0','0','0','0','0','0','28','28','1. 3','6','6','6','6','6','6','1','1','0','84','0','0 ','0','0','94','94','94','94','94','94','94','0',' 0','1','0','1','0','0','0','0','0','100','0','0');

#dbspawn 999160 and she just sits there, does not work for me but for Secrets. Have maps files, restarted server, everything.


Also, my wizard froggies in sebilis and raid mobs don't cast at all either. The whole thing is like bugged. Code/DB is p. stock, haven't messed with spells tbh.

help QQ

Tyrant1984
04-18-2011, 05:52 PM
RESOLVED AT LAST!

After some careful studying of the code I realized that there was a missing field in the database. The current PEQ db for download is from Revision1751, which is missing sql_updates/1793_resist_adjust.sql

The following fixed spells for me:

ALTER TABLE `npc_spells_entries` ADD `resist_adjust` INT NULL AFTER `priority`;


Now if only my mobs didn't chain buff their pets. . .

shamanistik
04-18-2011, 06:58 PM
It didn't change anything for me ; (

Tyrant1984
04-18-2011, 07:08 PM
damn bru :(



I did change the SQL a little bit for my DB tho, made it default to 0 instead of NULL. Dunno if it will make a difference but you can try.

ALTER TABLE `npc_spells_entries` ADD `resist_adjust` INT NULL DEFAULT 0 AFTER `priority`;

shamanistik
04-18-2011, 07:10 PM
I think it's my npc_spells or npc_spells_entries that is messed up.

I use GeorgesS npc_editor, everytimes I click an id or name in the spell list editor, it gives me an error :
run-time error '3265' Impossible to find the object.
There was an empty list that I could open and the editor was working. after saving to database, I can't open it again, with same error message.

Anyone help please? after a full week on this server.. unable to use npc spells is kinda weird ;(

shamanistik
04-18-2011, 07:16 PM
Wow thanks a lot bro.. the editor can open spell lists now.. trying the server I let you know ! THANKS

shamanistik
04-18-2011, 07:19 PM
Man I love you, really..
If you need anything.. shout a pm.. there will be np !

Tyrant1984
04-18-2011, 07:44 PM
sweet glad its working for you too ! drove me nuts for a couple days as well

shamanistik
04-18-2011, 09:30 PM
Doh.. now I can't cast any spells.. every characters, in every zones, get "you can't cast out of combat" and "you can't cast in combat" ; (