EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Database/World Building (https://www.eqemulator.org/forums/forumdisplay.php?f=596)
-   -   Changing special attacks quickly (https://www.eqemulator.org/forums/showthread.php?t=22922)

Sprig 06-06-2007 01:04 PM

Changing special attacks quickly
 
Could anyone here help me out with the proper syntax for use in the query browser for turning on and off individual special attacks for the entire database?

I would like to disable summoning and fleeing and make nothing immune to snare or charm. so I need to turn off/remove S C and I and turn on/insert f.

I am looking to do this to all of the npc's in my database but wouldn't mind learning a few ways to do things like this on a conditional basis IE for creatures of a certain level range of faction.

thanks in advance

-sprig

Secrets 06-06-2007 01:57 PM

Think this would be it...

Code:

UPDATE `npc_types` SET `npcspecialattks`='F' WHERE `level` > 35 AND level < 65
Would set the flag 'F' in the field `npcspecialattks` where the level is 36-64.

Sprig 06-06-2007 02:24 PM

I did some testing with that syntax, it replaces the entire string which isnt exactly what I was looking for but still saved me a ton of time since with some minor changes It allowed me to at least make all npcs with no special attacks immune to fleeing. turning off the for summon charm and snare wont be nearly as bad to do manually as turning on the one to prevent fleeing for the thousands of fields that are in that table.

-thanks

GeorgeS 06-07-2007 03:46 AM

I don't have a one line solution either. There's a way with PLSQL i'm told, but the way I do this is with vb code. If you want I can write something fast to do this later in VB


GeorgeS


Sprig 06-07-2007 04:24 AM

That would be great. I have my special attacks set the way i want them for now but will likely be needing to do similar changes in the future in other areas.

-sprig

sfisque 06-07-2007 10:58 AM

Quote:

Originally Posted by Secrets
Think this would be it...

Code:

UPDATE `npc_types` SET `npcspecialattks`='F' WHERE `level` > 35 AND level < 65
Would set the flag 'F' in the field `npcspecialattks` where the level is 36-64.

mysql supports a concat function, you might be able to use something like:

Code:

UPDATE `npc_types`
        SET `npcspecialattks`= concat( `npcspecialattks`, 'F' )
        WHERE `level` > 35 AND level < 65
        AND `npcspecialattks` not like '%F%'


GeorgeS 06-07-2007 02:12 PM

Ok here's a zip of the program that does this

http://66.159.225.58/eqemu/special_attacks_mod.zip


GeorgeS

Sprig 06-08-2007 11:58 AM

thank you for the tool =)
-sprig


All times are GMT -4. The time now is 11:37 PM.

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