How To Make A Npc Use Energy As A Resource?

The topic title is preety clear

How to make a NPC use energy as a resource?

I’ve messed around the DB, a bit unsuccessfully unfortunatly, to make a creature use energy as a resource

Tryed searching on this forum a bit aswell, fond nothing, so i thought, why not just ask

I’ll guess it can only be done via c++ scripts? Or is there any way related to DB?

Apolagies for my nubishness ^^ and thanks in advance for any answer

(If anyones wondering, i’m atempting to find a method to proprely script Army of the Dead NPCs, this is probably the first step)

Edit: I hope this is the right section for this doubt

Setting unit_class column in creature_template. Apparently it didn’t work last time I tried, but it should work that way =/

Ooo i remenber trying that

And yeah, it did not worked :confused:

Than you go and search for NPCs that already have energy as their power source and check the differences. /emoticons/default_smile.png I’m logging off now, good luck.

in C++ you can use this:

me->SetPowerType(POWER_ENERGY);

in the creature script

What unit_class did you use?

Edit: try this

– Template updates for creature 24207 (Army of the Dead Ghoul)

UPDATE creature_template SET faction_A=35,faction_H=35,baseattacktime=1739,unit_flags=0,unit_class=4 WHERE entry=24207; – Army of the Dead Ghoul

UPDATE creature_model_info SET bounding_radius=0.45305,combat_reach=1.275,gender=2 WHERE modelid=26079; – Army of the Dead Ghoul

DELETE FROM creature_template_addon WHERE entry=24207;

INSERT INTO creature_template_addon (entry,mount,bytes1,bytes2,emote,auras) VALUES

(24207,0,0,257,0, NULL); – Army of the Dead Ghoul

Nayd, what’s up with sql tags? /emoticons/default_tongue.png

It’s called “ninja sql tags”. Anything wrong with that?