EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Database/World Building (https://www.eqemulator.org/forums/forumdisplay.php?f=625)
-   -   Seiitng NPC spells/procs/attacks (https://www.eqemulator.org/forums/showthread.php?t=3698)

quester 11-01-2002 11:57 AM

Seiitng NPC spells/procs/attacks
 
Can someone clue me in on how you would set NPCs to cast certian spells, and to have special attacks (such as kick, bash, etc) and procs (Like GhoulRoot)?

Let me clarify... Yes I know edit the database. Not a problem. But i'm not sure the format of the data that I need to use.

For example, lets say I was making a Froglock Warrior. He should bash, and kick, and should have a GhoulRoot proc. How would I enter that data into the DB? I found fields for "usedspells" and "npcspecialattacks", but i'm just not clear on how to enter the data in there. I'm pretty sure I do'nt enter "this dued procs ghoulroot!" lol. I'm guessing its the ID values of the Effects as given in spells_en? Would it be a standard text field with CSV, os space seperated values? Some form of bit flag?

Any help please. I'm goign through the code and beefing up the pet support in the emu, and in order to do that I need to be able to give pets thier proper special attacks, spells, procs, etc.

Xarslik 11-01-2002 02:02 PM

NPC Special Attacks involves flags A-N, which specify whether or not they flurry, rampage, summon, and enrage. Some of them will crash the emu atm so be careful using them.

"Procs" havn't really been implemented yet, however you can make them cast spells by placing spell IDs separated by spaces in the usedspells column.

quester 11-01-2002 02:12 PM

Thanks for the info. Does the spell casting check for valid class?

Maybe i'll start this out by adding in NPC procs first. Thats really something that should be there.

Lurker_005 11-02-2002 04:32 AM

quester,
if you provide a list of race,class,level, spell list
and race,class,level,special attack
for named mobs just lest the name,spelllist,special attack
I'll add it to the DB Addon for the whole DB

There is no class or even level check on the spells, limit it to 8 spells per npc. The emu can handle more, but requires a change somewhere. Not sure but the order of the spells might matter, I can't remember.

Drawde's DB has spells and special attack in it if you want a referance.

quester 11-02-2002 04:35 AM

What i'm working on right now is the code for NPC Procs.. Pretty much finished it last night, but got a few things to iron out today.

It requires a new field in the DB though. I posted the propsed DB change in the dev forum, havent' seen a response yet.

Trumpcard 11-02-2002 04:47 AM

I dont think that'd be a problem.. changing the table would be easy, even for an existing database. Just make the code robust enough to recognize a null value field so all npc's dont need to be assigned a zero if they dont have a proc attatched.

Optionally, you could modify spells used field, and identify the proc differently, with a <spellid>.<procnumber> id, that way it wouldnt require a database change, but the code where spells are read in would need to be modified minorly to ignore the procs.
Since usedspells is a varchar(70), you shouldnt have anyproblems. Still just be easier though to create the new column though.

quester 11-02-2002 04:55 AM

I've already written the code to work off the new caolumn, so I dont think I would go back and use the spells one now. It is a pretty simple change though, just:

ALTER TABLE npc_types ADD npcproc int(7);

The code simply ignores the proc if it is null, 0, or 65535

quester 11-02-2002 06:40 AM

See the dev forum if you are interested.. I've posted the changes required to add mob melee procs into the emulator:
http://forums.eqemu.net/showthread.p...;threadid=3982

Now that that is finished, tonight I will start on beefing up the ole pet support.


All times are GMT -4. The time now is 03:06 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.