What's new

Event Scripts

Titesusy

Veteran Member
134
2016
4
Location
France
[MENTION=1]ExO[/MENTION]: Thanks you! Yes please, do! Add it. And, as you talked to me.... I have a small request too for you. If you could add the V6 scripts "For Frenchies" in official database, it would be very usefull (at least for the French community) Thanks you per advance :)
 

ExO

Admin
5,119
2014
1,639
@ExO: Thanks you! Yes please, do! Add it. And, as you talked to me.... I have a small request too for you. If you could add the V6 scripts "For Frenchies" in official database, it would be very usefull (at least for the French community) Thanks you per advance :)
Good point. I will do that, but it will be for v6.3 mate, as that's the newest database :)
 

ExO

Admin
5,119
2014
1,639
Introduction to the
"Database Cleaning"




I share with you sql scripts to clean some Emucoach worldserver warnings while loading...
Code:
-- Date of the version : 12/11/ 2016

-- Remove warnings in worldserver.exe console like : 
-- Creature (GUID: 178647) does not exist but has a record in 'creature_addon'
-- If the guid creature doesn't exist, we can remove it from creature_addon

DELETE FROM
creature_addon
WHERE
creature_addon.guid NOT IN (SELECT creature.guid
FROM
creature);


-- Remove warnings in worldserver.exe console like : 
-- 'pool_creature' has a non existing creature spawn (GUID: 193186) defined for pool id (1500), skipped.
-- Same as previously, "pool_creature" know a guid (creature already ingame, not only in theory) which is not existing... So we can remove it from the pool_creature table.

DELETE FROM
pool_creature
WHERE
pool_creature.guid NOT IN (SELECT creature.guid
FROM
creature);


-- Remove warnings in worldserver.exe console like : 
-- Table 'creature_questrelation' has creature entry (2952) for quest 14452, but npcflag does not include UNIT_NPC_FLAG_QUESTGIVER
-- The flag for a quest giver should be at least equal 2, but there aren't, so let's do it!

UPDATE `creature_template` SET `npcflag`='2'
WHERE creature_template.npcflag = 0 AND creature_template.entry IN
(SELECT creature_questrelation.id
FROM creature_questrelation );

The poll and quest one are now executed into the official database. Didn't recall your creature guid/creature_addon one before I also came up with some. Either way, nice to see we used the same logic :D
 
Top