Here is code (DIFFs) to add mob melee procs
I've added in code to allow mobs to have melee procs...I'm sure it could be improved.. mainly the chance formula probably sucks, so i'm open to improvements.
The big problem I see here, is that currently in the emu it appears every mob always has a DEX of 75. IMHO, the npc_types DB should be expanded to allow stats to be set. The following info should give you everythign needed to add this change.. You need to recompile both the shared dll and the zone server. You also need to make a small DB addition. To add this code: 1) You will need to modify your npc_types table to add a new column: "mysql.exe" "use eq;" "ALTER TABLE npc_types ADD npcproc int(7);" 2) DIFFs for changed files: zone/attack.cpp Code:
779d778 Code:
2257c2257 Code:
115a116 Code:
88a89,90 Code:
89a90 "mysql" "use eq;" "UPDATE npc_types SET npcproc=901 WHERE id=5509;" The abopve example, would give the proc 901 (GhoulRoot) to the npc_type identified by ID 5509, which is "a_ghoul" If anyone has suggestions on improving the proc formula, once again i'd be glad to hear it. I know it can be improved. Hopefully I haven't left anythign out here that you need, but if I did let me know and I will edit the message. This is tested on my server and it does work. Although since every mob right now has a DEX of 75, the chance of proc is low.. 25% I think it comes out too... In a (short) fight with a ghoul, I got rooted once. |
Damn good addition...
I can tell you've coded professionally, you actually commented your code.. LOL... |
Nice addition. :)
Suggest you make myDEX bigger than int8 though, dex is a int16 value. |
Quote:
That code SHOULD be commented more, but I plan to do some revamping so I wastn' too worried aout it. Thanks for the "comments" though :p |
Quote:
The issue of the NPC stats needs to be looked at though. Currently they are all hardcoded to 75, and no way to change them. Ideally, the stats, and AC, should be added as new columns in the npc_types database. Thats how they are in the real EQ database IIRC. (Not positive, because to be honest 99% of the time we would just copy a record from a similiar mob and alter it as needed.. I do'nt think I ever once set stats on a mob while I worked there lol). |
Do weapons proc at the moment, for either PC or NPC?
If not, I think I will pull this out into its own function, and put tie ins so that PC and PC used weapons will also proc. |
PC weapons proc, npcs should too
|
Ok great.. then I won't worry about that part.
|
Can NPC's even equip weapons?
|
yes.
NPCs drop weapons, and 90% of the time they are wielding it. Example: In Highpass Hold there is a gnoll that drops an axe that has a buff proc, while fighting him there is a chance that he will proc it. But a lot of NPCs have weapons that are in their model.. like some of the PoP gods. |
It appears I can't give a weapon to an NPC though and have them equip it.
I just sumoned up a pet and gave it a weapon.. it never equipped it. I'm diggig through the code now trying to find the trade stuff to see if I can iron it out. |
I meant in EQemu. i haven't seen any code for NPC inventories.
|
Curious, considering pets arent NPCs in the database, how does your code manage their procs?
|
Cool :D
|
Quote:
|
All times are GMT -4. The time now is 01:22 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.