BotGiver

nicolaw 1st September 2024 at 1:53pm
WotLKNPCBots

https://truewow.org/forum/viewtopic.php?t=37081

https://www.ownedcore.com/forums/world-of-warcraft/world-of-warcraft-emulator-servers/wow-emu-guides-tutorials/79034-guide-how-make-custom-class-trainers-npc.html

https://github.com/NotCoffee418/TrinityCreator/releases


-- https://www.ownedcore.com/forums/world-of-warcraft/world-of-warcraft-emulator-servers/wow-emu-general-releases/904235-trinitycore-npcbots-repack-update-25-06-2020-a-5.html#post4281480
CREATE TEMPORARY TABLE IF NOT EXISTS npc_bot_givers AS ( SELECT * FROM creature_template WHERE entry = 70000 and ScriptName = "script_bot_giver" );
UPDATE npc_bot_givers SET entry = 80000, name = "General Kresh", subname = "Mercenary", modelid1 = 29512 where entry = 70000;
REPLACE INTO creature_template ( SELECT * FROM npc_bot_givers );

-- https://truewow.org/forum/viewtopic.php?t=37081

-- .npc add 80000
-- ...or...
-- INSERT INTO creature (id, map, ...)

-- https://trinitycore.info/database/335/world/creature
SELECT * FROM creature WHERE id = 80000;
-- https://trinitycore.info/database/335/world/creature_template
UPDATE creature_template SET speed_walk = 0.9 WHERE name = 'General Kresh' AND entry = 80000;

-- .npc info
-- 214015 (guid column from creature)

-- SET @GUID := NPCGUID;
SET @GUID := 214015;
SET @PATH := @GUID * 10;
-- https://trinitycore.info/database/335/world/creature
UPDATE `creature` SET `MovementType`=2 WHERE `guid`=@GUID;
-- https://trinitycore.info/en/database/335/world/creature_addon
DELETE FROM `creature_addon` WHERE `guid`=@GUID;
INSERT INTO `creature_addon` (`guid`,`path_id`) VALUES (@GUID,@PATH);
-- https://trinitycore.info/en/database/335/world/waypoint_data
DELETE FROM `waypoint_data` WHERE `id`=@PATH;
INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES
(@PATH, 1, -4875.328613, -957.167236, 505.075470, 1.73619, 100000, 0, 0, 100, 0),
(@PATH, 2, -4881.988281, -961.460510, 505.075470, 3.717583, 100, 0, 0, 100, 0),
(@PATH, 3, -4874.334961, -977.699036, 505.075470, 5.586816, 100, 0, 0, 100, 0),
(@PATH, 4, -4868.409180, -974.969910, 508.128906, 0.426746, 100, 0, 0, 100, 0),
(@PATH, 5, -4871.213379, -967.801147, 511.739685, 2.048596, 100, 0, 0, 100, 0),
(@PATH, 6,  -4872.971680, -961.479919, 511.739685, 1.997543, 100, 0, 0, 100, 0),
(@PATH, 7, -4872.971680, -961.479919, 511.739685, 5.174482, 50000, 0, 0, 100, 0),
(@PATH, 8, -4871.213379, -967.801147, 511.739685, 5.174482, 100, 0, 0, 100, 0),
(@PATH, 9, -4868.409180, -974.969910, 508.128906, 5.174482, 100, 0, 0, 100, 0),
(@PATH, 10, -4874.351074, -977.856934, 505.073883, 3.595844, 100, 0, 0, 100, 0),
(@PATH, 11, -4882.677734, -961.199341, 505.073883, 1.864040, 100, 0, 0, 100, 0),
(@PATH, 12, -4876.519043, -959.479675, 505.073883, 0.277535, 100, 0, 0, 100, 0);