Skip to content

Instantly share code, notes, and snippets.

@FALL1N1
FALL1N1 / Lab Work - Quest Fix
Created September 10, 2012 02:31
SQL - TC2 Fix
-- Lab Work Quest Replace Gobjects with Items
UPDATE `quest_template` SET `RequiredNpcOrGo1`=0, `RequiredNpcOrGo2`=0, `RequiredNpcOrGo3`=0, `RequiredNpcOrGo4`=0, `RequiredNpcOrGoCount1`=0, `RequiredNpcOrGoCount2`=0, `RequiredNpcOrGoCount3`=0, `RequiredNpcOrGoCount4`=0, `RequiredItemId1`=38386, `RequiredItemId2`=38339, `RequiredItemId3`=38340, `RequiredItemId4`=38346, `RequiredItemCount1`=1, `RequiredItemCount2`=1, `RequiredItemCount3`=1, `RequiredItemCount4`=1 WHERE `Id`=12557 LIMIT 1;
-- Missing gameobject
UPDATE `gameobject` SET `id`=190459 WHERE `guid`=55202 LIMIT 1;
@FALL1N1
FALL1N1 / gist:3691301
Created September 10, 2012 14:53
13383 quest fix
-- NPC SPAWN FOR QUEST FINISH /missing npc fix/
INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES (1108886, 32444, 571, 1, 1, 0, 0, 7622.77, 2029.56, 502.238, 0.951118, 300, 0, 0, 12600, 3994, 0, 0, 0, 0);
-- Prev quest set to 0 since this is the first quest from chain.
UPDATE `quest_template` SET `PrevQuestId`=0 WHERE `Id`=11888;
@FALL1N1
FALL1N1 / gist:3722170
Created September 14, 2012 14:17
SP Stack enchants, items, foods
DELETE FROM `spell_bonus_data` WHERE `entry` IN(13907, 64442, 44578, 44525, 28005, 46579, 20004, 20007, 20006, 13897, 64569, 6297, 7712, 7714, 10577, 16614, 17484, 18798, 21992, 27655, 28788, 38395, 55756, 40972, 60526, 67760, 67714, 28715, 43731, 43733, 38616);
INSERT INTO `spell_bonus_data` (`entry`, `direct_bonus`, `dot_bonus`, `ap_bonus`, `ap_dot_bonus`, `comments`) VALUES
(7714, 0, 0, -1, -1, 'Fiery Plate Gauntlets'),
(21992, 0, 0, -1, -1, 'Thunderfury legendary weapon lightning'),
(28715, 0, 0, -1, -1, 'Flamecap (Flamecap op damage)'),
(43731, 0, 0, -1, -1, 'Stormchops (Lightning fix)'),
(43733, 0, 0, -1, -1, 'Stormchops 2 (Lightning fix)'),
(38616, 0, 0, -1, -1, 'Bloodboil Poison'),
(7712, 0, 0, -1, -1, 'Blazefury Medallion & Fiery Retributor'),
(10577, 0, 0, -1, -1, 'Gauntlets of the Sea'),
@FALL1N1
FALL1N1 / gist:3761818
Created September 21, 2012 14:35
C++ Beastmaster
/*
QUERY
INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeade
@FALL1N1
FALL1N1 / gist:3761820
Created September 21, 2012 14:35
C++ Beastmaster
/*
QUERY
INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeade
@FALL1N1
FALL1N1 / gist:3762563
Created September 21, 2012 16:45
beastmaster food
INSERT INTO `npc_vendor` (`entry`, `slot`, `item`, `maxcount`, `incrtime`, `ExtendedCost`) VALUES
(700021, 0, 729, 0, 0, 0),
(700021, 0, 769, 0, 0, 0),
(700021, 0, 1015, 0, 0, 0),
(700021, 0, 2672, 0, 0, 0),
(700021, 0, 2673, 0, 0, 0),
(700021, 0, 2674, 0, 0, 0),
(700021, 0, 2677, 0, 0, 0),
(700021, 0, 2886, 0, 0, 0),
(700021, 0, 2924, 0, 0, 0),
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=25814;
DELETE FROM `creature_text` WHERE `entry`=25814;
INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
(25814,1,1, 'We are Mechagnome...resistance is futile.',12,0,0,0,0,0, ''),
(25814,1,2, 'The flesh is weak. We will make you better, stronger...faster.',12,0,0,0,0,0, ''),
(25814,1,3, 'We can decurse you, we have the technology.',12,0,0,0,0,0, '');
DELETE FROM `smart_scripts` WHERE `entryorguid`=25814 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`,
@FALL1N1
FALL1N1 / gist:3766320
Created September 22, 2012 14:27
blabla
-- Fix [Q]{A/H} Conjurer Luminrath ID: 10306
SET @Luminrath := 19580; -- The required npc to be summoned to thank the player, give credit and despawn /without cape/
SET @Capeless := 19544; -- The combat version
-- SET @Mantle := 34142; -- The required spell that triggers the event below to summon the npc to give credit, just for info
SET @Credit := 19548;
SET @Event := 12609;
-- Remove the required spell since it is supposed to send a event and cannot be casted on target, this is the reason it bugged all everything /core issue/, I remove it and in order to obtain the credit this spell needs to be cast anyway, so it is a proper* hack fix, if you think about it.
UPDATE `quest_template` SET `RequiredSpellCast1`=0 WHERE `Id`=10306;
-- Makes the specific spell that already have the call event defined summon Luminrath
DELETE FROM `event_scripts` WHERE `id`=@Event;
SET @Luminrath := 19580;
SET @Capeless := 19544;
SET @Credit := 19548;
SET @Event := 12609;
UPDATE `quest_template` SET `RequiredSpellCast1`=0 WHERE `Id`=10306;
DELETE FROM `event_scripts` WHERE `id`=@Event;
INSERT INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`x`,`y`,`z`,`o`) VALUES
(@Event,0,10,@Luminrath,25000,2192.744873,2340.836182,90.353905,4.682819);
UPDATE `creature_template` SET `maxlevel`=68,`minlevel`=68,`unit_class`=2,`AIName`= 'SmartAI' WHERE `entry`= @Luminrath;
DELETE FROM `creature_ai_scripts` WHERE creature_id = @Luminrath;