From d9c9df38d7cddab36daa68b25607b279dac6c308 Mon Sep 17 00:00:00 2001 From: Rovx Date: Wed, 11 Mar 2026 14:55:54 +1030 Subject: [PATCH 1/2] Add Kappa world update and use Nubmage teleport spells --- README.md | 18 +++- .../db-world/updates/2026_03_11_00_kappa.sql | 83 +++++++++++++++++++ src/npc_nubmage.cpp | 15 ++-- 3 files changed, 104 insertions(+), 12 deletions(-) create mode 100644 data/sql/db-world/updates/2026_03_11_00_kappa.sql diff --git a/README.md b/README.md index bce9b1e..ac48196 100644 --- a/README.md +++ b/README.md @@ -34,14 +34,20 @@ git clone https://github.com//mod-customNPCs.git 3. Copy `conf/mod_customnpcs.conf.dist` next to your `worldserver.conf` and rename to `mod_customnpcs.conf`. -4. Apply the SQL files to your **world** database: +4. For a fresh install, apply the SQL files in `data/sql/db-world/base/` to your + **world** database: ```bash mysql -u -p acore_world < data/sql/db-world/base/nubmage.sql mysql -u -p acore_world < data/sql/db-world/base/daish.sql +mysql -u -p acore_world < data/sql/db-world/base/kappa.sql ``` -5. Restart the worldserver. +5. Rebuild and restart the worldserver. + +For an existing world database, incremental changes should go in +`data/sql/db-world/updates/`. AzerothCore's DB updater will apply those +automatically on startup when the module is present in the source tree. ## Configuration @@ -60,8 +66,11 @@ mod-customNPCs/ │ └── mod_customnpcs.conf.dist ├── data/sql/db-world/base/ │ ├── nubmage.sql ← Nubmage template, spawn, gossip, texts, SmartAI -│ └── daish.sql ← Daish + healers: templates, spawns, formations, +│ ├── daish.sql ← Daish + healers: templates, spawns, formations, │ waypoints, texts, SmartAI combat +│ └── kappa.sql ← Kappa template, spawn, display, gossip text +├── data/sql/db-world/updates/ +│ └── 2026_03_11_00_kappa.sql ← Auto-applied world update for Kappa ├── src/ │ ├── mod_customnpcs_pch.h │ ├── mod_customnpcs_loader.cpp ← Script registration @@ -75,7 +84,8 @@ mod-customNPCs/ 1. Create a new `.cpp` in `src/` with your `CreatureScript`. 2. Add a registration function (e.g. `void AddMyNpcScripts();`) and call it from `mod_customnpcs_loader.cpp`. -3. Add matching SQL in `data/sql/db-world/base/`. +3. Add matching SQL in `data/sql/db-world/base/` for fresh installs. +4. Add a timestamped SQL update in `data/sql/db-world/updates/` for existing databases. ## License diff --git a/data/sql/db-world/updates/2026_03_11_00_kappa.sql b/data/sql/db-world/updates/2026_03_11_00_kappa.sql new file mode 100644 index 0000000..eedc591 --- /dev/null +++ b/data/sql/db-world/updates/2026_03_11_00_kappa.sql @@ -0,0 +1,83 @@ +-- ========================================================================= +-- mod-customNPCs: Kappa — Guild Leader of Maxiboomers +-- Auto-applied world update for existing acore_world databases. +-- Safe to re-run: every section starts with cleanup DELETEs. +-- ========================================================================= + +-- -------------------------------------------------------------------- +-- IDs +-- -------------------------------------------------------------------- +SET @ENTRY_KAPPA := 4000004; +SET @GOSSIP_MENU_KAPPA := 4000004; +SET @NPC_TEXT_KAPPA := 4000004; + +-- Display / faction +SET @DISPLAY_ORC_FEMALE := 30752; -- Kor'kron General / Kor'kron Reaver +SET @FACTION_HORDE_CITY := 1759; + +-- Weapons +SET @ITEM_THUNDERFURY := 19019; +SET @ITEM_WARGLAIVE_OFFHAND := 32838; + +-- ==================================================================== +-- Cleanup +-- ==================================================================== +DELETE FROM creature_addon WHERE guid IN (SELECT guid FROM creature WHERE id1 = @ENTRY_KAPPA); +DELETE FROM creature_equip_template WHERE CreatureID = @ENTRY_KAPPA; +DELETE FROM creature WHERE id1 = @ENTRY_KAPPA; +DELETE FROM creature_template_model WHERE CreatureID = @ENTRY_KAPPA; +DELETE FROM gossip_menu WHERE MenuID = @GOSSIP_MENU_KAPPA; +DELETE FROM npc_text WHERE ID = @NPC_TEXT_KAPPA; +DELETE FROM creature_template WHERE entry = @ENTRY_KAPPA; + +-- ==================================================================== +-- Template +-- ==================================================================== +INSERT INTO creature_template + (entry, name, subname, gossip_menu_id, minlevel, maxlevel, exp, faction, + npcflag, speed_walk, speed_run, scale, `rank`, dmgschool, unit_class, + unit_flags, unit_flags2, dynamicflags, type, type_flags, + AIName, ScriptName, MovementType, HoverHeight, + HealthModifier, ManaModifier, ArmorModifier, ExperienceModifier, + RacialLeader, RegenHealth, mechanic_immune_mask, + spell_school_immune_mask, flags_extra) +VALUES + (@ENTRY_KAPPA, 'Kappa', 'of the single glave', @GOSSIP_MENU_KAPPA, + 80, 80, 2, @FACTION_HORDE_CITY, + 1 /* gossip */, 1, 1.14286, 1, 0, 0, 1 /* warrior */, + 0, 0, 0, 7 /* humanoid */, 0, + 'NullCreatureAI', '', 1 /* random */, 1, + 1, 1, 1, 1, + 0, 1, 0, 0, 0); + +INSERT INTO creature_template_model (CreatureID, Idx, CreatureDisplayID, DisplayScale, Probability) +VALUES (@ENTRY_KAPPA, 0, @DISPLAY_ORC_FEMALE, 1, 1); + +INSERT INTO npc_text (ID, text0_0, BroadcastTextID0, lang0, Probability0) +VALUES (@NPC_TEXT_KAPPA, + 'Quick glave run? In and out, 10 min, easy.', + 0, 0, 1); + +INSERT INTO gossip_menu (MenuID, TextID) +VALUES (@GOSSIP_MENU_KAPPA, @NPC_TEXT_KAPPA); + +-- ==================================================================== +-- Equipment +-- ==================================================================== +INSERT INTO creature_equip_template (CreatureID, ID, ItemID1, ItemID2, ItemID3) +VALUES (@ENTRY_KAPPA, 1, @ITEM_THUNDERFURY, @ITEM_WARGLAIVE_OFFHAND, 0); + +-- ==================================================================== +-- Spawn +-- ==================================================================== +SET @GUID_KAPPA := (SELECT IFNULL(MAX(guid), 0) + 1 FROM creature); + +INSERT INTO creature + (guid, id1, map, zoneId, areaId, spawnMask, phaseMask, equipment_id, + position_x, position_y, position_z, orientation, + spawntimesecs, wander_distance, currentwaypoint, + curhealth, curmana, MovementType) +VALUES + (@GUID_KAPPA, @ENTRY_KAPPA, 1, 1637, 1637, 1, 1, 1, + 1606.2500, -4380.7500, 10.5200, 3.6800, + 300, 18, 0, 0, 0, 1 /* random */); diff --git a/src/npc_nubmage.cpp b/src/npc_nubmage.cpp index c19dbe1..26b903f 100644 --- a/src/npc_nubmage.cpp +++ b/src/npc_nubmage.cpp @@ -26,20 +26,18 @@ struct NubmagePortalDest { uint32 optionId; // gossip_menu_option.OptionID - uint32 mapId; - float x, y, z, o; + uint32 spellId; const char* label; // for logging only }; static const NubmagePortalDest portalDests[] = { - // Coordinates sourced from AzerothCore spell_target_position table. // OptionID 1 — Thunder Bluff (spell 3566 — Teleport: Thunder Bluff) - { 1, 1, -962.97f, 282.91f, 111.68f, 4.02f, "Thunder Bluff" }, + { 1, 3566, "Thunder Bluff" }, // OptionID 2 — Undercity (spell 3563 — Teleport: Undercity) - { 2, 0, 1773.43f, 61.31f, -46.32f, 2.43f, "Undercity" }, + { 2, 3563, "Undercity" }, // OptionID 3 — Silvermoon (spell 32272 — Teleport: Silvermoon) - { 3, 530, 10021.26f, -7014.27f, 49.72f, 4.01f, "Silvermoon" }, + { 3, 32272, "Silvermoon" }, }; static constexpr uint32 PORTAL_DEST_COUNT = sizeof(portalDests) / sizeof(portalDests[0]); @@ -100,9 +98,10 @@ class npc_nubmage : public CreatureScript // Gold was already deducted by the core via BoxMoney before we get // here, so if we arrive in OnGossipSelect the player already paid. - // Yell success and teleport. + // Use the real teleport spells so AzerothCore resolves the landing + // point through spell_target_position instead of duplicating coords. creature->AI()->Talk(TEXT_GROUP_SUCCESS, player); - player->TeleportTo(dest.mapId, dest.x, dest.y, dest.z, dest.o); + player->CastSpell(player, dest.spellId, true); CloseGossipMenuFor(player); return true; From 19be7f4c58bb7868da05185061f1b174fd3eef9d Mon Sep 17 00:00:00 2001 From: Rovx Date: Wed, 11 Mar 2026 15:03:14 +1030 Subject: [PATCH 2/2] Reapply Nubmage and Daish via world updates --- .../updates/2026_03_11_01_nubmage_reapply.sql | 188 ++++++++++++++++ .../updates/2026_03_11_02_daish_reapply.sql | 206 ++++++++++++++++++ 2 files changed, 394 insertions(+) create mode 100644 data/sql/db-world/updates/2026_03_11_01_nubmage_reapply.sql create mode 100644 data/sql/db-world/updates/2026_03_11_02_daish_reapply.sql diff --git a/data/sql/db-world/updates/2026_03_11_01_nubmage_reapply.sql b/data/sql/db-world/updates/2026_03_11_01_nubmage_reapply.sql new file mode 100644 index 0000000..80b5a78 --- /dev/null +++ b/data/sql/db-world/updates/2026_03_11_01_nubmage_reapply.sql @@ -0,0 +1,188 @@ +-- ========================================================================= +-- mod-customNPCs: Nubmage — full cleanup + reapply +-- For existing acore_world databases that still have older/manual Nubmage rows. +-- Safe to re-run: children are deleted before parents, then recreated. +-- ========================================================================= + +-- -------------------------------------------------------------------- +-- IDs +-- -------------------------------------------------------------------- +SET @ENTRY_NUBMAGE := 4000000; +SET @GOSSIP_MENU_NUBMAGE := @ENTRY_NUBMAGE; +SET @NPC_TEXT_NUBMAGE := 4000000; + +-- Display / faction +SET @DISPLAY_UNDERCITY_MAGE := 18454; +SET @FACTION_HORDE_CITY := 1759; + +-- ==================================================================== +-- Cleanup (order matters — children before parents) +-- ==================================================================== +DELETE FROM smart_scripts WHERE entryorguid = @ENTRY_NUBMAGE AND source_type = 0; +DELETE FROM creature_text WHERE CreatureID = @ENTRY_NUBMAGE; +DELETE FROM creature_equip_template WHERE CreatureID = @ENTRY_NUBMAGE; +DELETE FROM conditions WHERE SourceTypeOrReferenceId = 15 AND SourceGroup = @GOSSIP_MENU_NUBMAGE; +DELETE FROM gossip_menu_option WHERE MenuID = @GOSSIP_MENU_NUBMAGE; +DELETE FROM gossip_menu WHERE MenuID = @GOSSIP_MENU_NUBMAGE; +DELETE FROM npc_text WHERE ID = @NPC_TEXT_NUBMAGE; +DELETE FROM creature WHERE id1 = @ENTRY_NUBMAGE; +DELETE FROM creature_template_model WHERE CreatureID = @ENTRY_NUBMAGE; +DELETE FROM creature_template WHERE entry = @ENTRY_NUBMAGE; + +-- ==================================================================== +-- Template +-- ==================================================================== +INSERT INTO creature_template + (entry, name, subname, gossip_menu_id, minlevel, maxlevel, exp, faction, + npcflag, speed_walk, speed_run, scale, `rank`, dmgschool, unit_class, + unit_flags, unit_flags2, dynamicflags, type, type_flags, + AIName, ScriptName, MovementType, HoverHeight, + HealthModifier, ManaModifier, ArmorModifier, ExperienceModifier, + RacialLeader, RegenHealth, mechanic_immune_mask, + spell_school_immune_mask, flags_extra) +VALUES + (@ENTRY_NUBMAGE, 'Nubmage', 'Portal Service', @GOSSIP_MENU_NUBMAGE, + 80, 80, 2, @FACTION_HORDE_CITY, + 1 /* gossip */, 1, 1.14286, 1, 0, 0, 8 /* mage */, + 0, 0, 0, 7 /* humanoid */, 0, + 'SmartAI', 'npc_nubmage', 0, 1, + 1, 1, 1, 1, + 0, 1, 0, 0, 0); + +INSERT INTO creature_template_model (CreatureID, Idx, CreatureDisplayID, DisplayScale, Probability) +VALUES (@ENTRY_NUBMAGE, 0, @DISPLAY_UNDERCITY_MAGE, 1, 1); + +-- ==================================================================== +-- Equipment +-- ==================================================================== +INSERT INTO creature_equip_template (CreatureID, ID, ItemID1, ItemID2, ItemID3) +VALUES (@ENTRY_NUBMAGE, 1, 22799, 0, 0); + +-- ==================================================================== +-- Spawn +-- ==================================================================== +SET @GUID_NUBMAGE := (SELECT IFNULL(MAX(guid), 0) + 1 FROM creature); + +INSERT INTO creature + (guid, id1, map, zoneId, areaId, spawnMask, phaseMask, equipment_id, + position_x, position_y, position_z, orientation, + spawntimesecs, wander_distance, currentwaypoint, + curhealth, curmana, MovementType) +VALUES + (@GUID_NUBMAGE, @ENTRY_NUBMAGE, 1, 1637, 1637, 1, 1, 1, + 1611.2494, -4388.4680, 10.524337, 3.6819048, + 300, 0, 0, 0, 0, 0); + +-- ==================================================================== +-- Gossip menu + options +-- Gossip selection is handled in C++; the player is teleported by spell cast. +-- ==================================================================== +INSERT INTO npc_text (ID, text0_0, BroadcastTextID0, lang0, Probability0) +VALUES (@NPC_TEXT_NUBMAGE, + 'Yes what is it? Nubmage has many portals to make and very little time!', + 0, 0, 1); + +INSERT INTO gossip_menu (MenuID, TextID) +VALUES (@GOSSIP_MENU_NUBMAGE, @NPC_TEXT_NUBMAGE); + +INSERT INTO gossip_menu_option + (MenuID, OptionID, OptionIcon, OptionText, OptionBroadcastTextID, + OptionType, OptionNpcFlag, ActionMenuID, ActionPoiID, + BoxCoded, BoxMoney, BoxText) +VALUES + (@GOSSIP_MENU_NUBMAGE, 1, 6, + 'Portal to Thunder Bluff [10g]', 0, 1, 1, 0, 0, 0, 100000, + 'No 10 gold, no portal. Nubmage laughs at your poverty.'), + (@GOSSIP_MENU_NUBMAGE, 2, 6, + 'Portal to Undercity [10g]', 0, 1, 1, 0, 0, 0, 100000, + 'No 10 gold, no portal. Nubmage laughs at your poverty.'), + (@GOSSIP_MENU_NUBMAGE, 3, 6, + 'Portal to Silvermoon [10g]', 0, 1, 1, 0, 0, 0, 100000, + 'No 10 gold, no portal. Nubmage laughs at your poverty.'); + +-- ==================================================================== +-- creature_text +-- ==================================================================== +INSERT INTO creature_text + (CreatureID, GroupID, ID, Text, Type, Language, Probability, + Emote, Duration, Sound, BroadcastTextId, TextRange, comment) +VALUES + (@ENTRY_NUBMAGE, 0, 0, + 'Nubmage portal service! Best portal service for you!', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage ad'), + (@ENTRY_NUBMAGE, 0, 1, + 'Nubmage portal service! Step right up! Ten gold only!', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage ad'), + (@ENTRY_NUBMAGE, 0, 2, + 'Nubmage takes you anywhere! Thunder Bluff! Undercity! Silvermoon!', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage ad'), + + (@ENTRY_NUBMAGE, 1, 0, + 'Nubmage sees you. Nubmage is not impressed.', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage trash'), + (@ENTRY_NUBMAGE, 1, 1, + 'Nubmage offers portals, and you offer... nothing.', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage trash'), + (@ENTRY_NUBMAGE, 1, 2, + 'Nubmage waits. Nubmage grows bored. Nubmage judges you.', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage trash'), + (@ENTRY_NUBMAGE, 1, 3, + 'Nubmage could port you far away. Nubmage chooses not to.', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage trash'), + (@ENTRY_NUBMAGE, 1, 4, + 'Nubmage hears your footsteps. Nubmage hears your indecision.', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage trash'), + (@ENTRY_NUBMAGE, 1, 5, + 'Nubmage is a master of space and time. You are a master of wasting it.', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage trash'), + (@ENTRY_NUBMAGE, 1, 6, + 'Nubmage has many portals. You have many excuses.', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage trash'), + + (@ENTRY_NUBMAGE, 2, 0, + 'Nubmage does not accept poverty as payment!', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage no gold'), + (@ENTRY_NUBMAGE, 2, 1, + 'Nubmage laughs at your empty pockets! Come back with gold!', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage no gold'), + (@ENTRY_NUBMAGE, 2, 2, + 'You want portal? Nubmage wants GOLD! Ten gold! You have... nothing!', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage no gold'), + (@ENTRY_NUBMAGE, 2, 3, + 'Nubmage is not a charity! Go farm some gold, peasant!', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage no gold'), + (@ENTRY_NUBMAGE, 2, 4, + 'Nubmage smells broke. Is that you? Yes, that is you.', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage no gold'), + + (@ENTRY_NUBMAGE, 3, 0, + 'Another satisfied customer! Nubmage is the best!', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage success'), + (@ENTRY_NUBMAGE, 3, 1, + 'Nubmage thanks you for your gold! Safe travels!', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage success'), + (@ENTRY_NUBMAGE, 3, 2, + 'Whoooosh! Nubmage sends you away! Bye bye!', + 14, 0, 100, 0, 0, 0, 0, 0, 'Nubmage success'); + +-- ==================================================================== +-- SmartAI — OOC ambient yells only +-- ==================================================================== +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, event_param5, event_param6, + action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6, + target_type, target_param1, target_param2, target_param3, target_param4, + target_x, target_y, target_z, target_o, comment) +VALUES + (@ENTRY_NUBMAGE, 0, 0, 0, 1, 0, 100, 0, + 15000, 30000, 60000, 120000, 0, 0, + 1, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, + 'Nubmage - OOC - Yell ad lines (group 0)'), + (@ENTRY_NUBMAGE, 0, 1, 0, 1, 0, 100, 0, + 60000, 90000, 180000, 360000, 0, 0, + 1, 1, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, + 'Nubmage - OOC - Yell trash lines (group 1)'); diff --git a/data/sql/db-world/updates/2026_03_11_02_daish_reapply.sql b/data/sql/db-world/updates/2026_03_11_02_daish_reapply.sql new file mode 100644 index 0000000..8136460 --- /dev/null +++ b/data/sql/db-world/updates/2026_03_11_02_daish_reapply.sql @@ -0,0 +1,206 @@ +-- ========================================================================= +-- mod-customNPCs: Daish — full cleanup + reapply +-- For existing acore_world databases that may still have older/manual Daish rows. +-- Safe to re-run: children are deleted before parents, then recreated. +-- ========================================================================= + +-- -------------------------------------------------------------------- +-- IDs +-- -------------------------------------------------------------------- +SET @ENTRY_DAISH := 4000001; +SET @ENTRY_HEALER1 := 4000002; +SET @ENTRY_HEALER2 := 4000003; + +SET @GUID_DAISH := 5300513; +SET @GUID_HEALER1 := 5300514; +SET @GUID_HEALER2 := 5300515; + +SET @PATH_DAISH := @GUID_DAISH; + +-- Display / faction +SET @DISPLAY_HUMAN_PALADIN := 19431; +SET @DISPLAY_HUMAN_PRIEST := 15219; +SET @FACTION_BLACKROCK_HOSTILE := 14; + +-- ==================================================================== +-- Cleanup +-- ==================================================================== +DELETE FROM smart_scripts WHERE entryorguid IN (@ENTRY_DAISH, @ENTRY_HEALER1, @ENTRY_HEALER2) AND source_type = 0; +DELETE FROM creature_text WHERE CreatureID IN (@ENTRY_DAISH, @ENTRY_HEALER1, @ENTRY_HEALER2); +DELETE FROM creature_formations WHERE leaderGUID IN (@GUID_DAISH, @GUID_HEALER1, @GUID_HEALER2) + OR memberGUID IN (@GUID_DAISH, @GUID_HEALER1, @GUID_HEALER2); +DELETE FROM creature_addon WHERE guid IN (@GUID_DAISH, @GUID_HEALER1, @GUID_HEALER2); +DELETE FROM waypoint_data WHERE id = @PATH_DAISH; +DELETE FROM creature_equip_template WHERE CreatureID IN (@ENTRY_DAISH, @ENTRY_HEALER1, @ENTRY_HEALER2); +DELETE FROM creature WHERE id1 IN (@ENTRY_DAISH, @ENTRY_HEALER1, @ENTRY_HEALER2); +DELETE FROM creature_template_model WHERE CreatureID IN (@ENTRY_DAISH, @ENTRY_HEALER1, @ENTRY_HEALER2); +DELETE FROM creature_template WHERE entry IN (@ENTRY_DAISH, @ENTRY_HEALER1, @ENTRY_HEALER2); + +-- ==================================================================== +-- Templates +-- ==================================================================== +INSERT INTO creature_template + (entry, name, subname, gossip_menu_id, minlevel, maxlevel, exp, faction, + npcflag, speed_walk, speed_run, scale, `rank`, dmgschool, unit_class, + unit_flags, unit_flags2, dynamicflags, type, type_flags, + AIName, ScriptName, MovementType, HoverHeight, + HealthModifier, ManaModifier, ArmorModifier, ExperienceModifier, + RacialLeader, RegenHealth, mechanic_immune_mask, + spell_school_immune_mask, flags_extra) +VALUES + (@ENTRY_DAISH, 'Daish', 'Wintergrasp Champion', 0, + 83, 83, 2, @FACTION_BLACKROCK_HOSTILE, + 0, 1, 1.14286, 1, 1, 0, 2 /* paladin */, + 0, 0, 0, 7 /* humanoid */, 0, + 'SmartAI', '', 2 /* waypoint */, 1, + 8, 5, 4, 1, + 0, 1, 0, 0, 0), + (@ENTRY_HEALER1, 'Daish''s Healer', NULL, 0, + 82, 82, 2, @FACTION_BLACKROCK_HOSTILE, + 0, 1, 1.14286, 1, 0, 0, 2 /* paladin */, + 0, 0, 0, 7 /* humanoid */, 0, + 'SmartAI', '', 0, 1, + 2, 8, 2, 1, + 0, 1, 0, 0, 0), + (@ENTRY_HEALER2, 'Daish''s Healer', NULL, 0, + 82, 82, 2, @FACTION_BLACKROCK_HOSTILE, + 0, 1, 1.14286, 1, 0, 0, 2 /* paladin */, + 0, 0, 0, 7 /* humanoid */, 0, + 'SmartAI', '', 0, 1, + 2, 8, 2, 1, + 0, 1, 0, 0, 0); + +INSERT INTO creature_template_model (CreatureID, Idx, CreatureDisplayID, DisplayScale, Probability) +VALUES + (@ENTRY_DAISH, 0, @DISPLAY_HUMAN_PALADIN, 1, 1), + (@ENTRY_HEALER1, 0, @DISPLAY_HUMAN_PRIEST, 1, 1), + (@ENTRY_HEALER2, 0, @DISPLAY_HUMAN_PRIEST, 1, 1); + +-- ==================================================================== +-- Equipment +-- ==================================================================== +INSERT INTO creature_equip_template (CreatureID, ID, ItemID1, ItemID2, ItemID3) +VALUES (@ENTRY_DAISH, 1, 19334, 0, 0); + +-- ==================================================================== +-- Spawns +-- ==================================================================== +INSERT INTO creature + (guid, id1, map, zoneId, areaId, spawnMask, phaseMask, equipment_id, + position_x, position_y, position_z, orientation, + spawntimesecs, wander_distance, currentwaypoint, + curhealth, curmana, MovementType) +VALUES + (@GUID_DAISH, @ENTRY_DAISH, 0, 25, 25, 1, 1, 1, + -7692.57, -1087.04, 217.714, 1.19093, + 300, 0, 0, 0, 0, 2), + (@GUID_HEALER1, @ENTRY_HEALER1, 0, 25, 25, 1, 1, 0, + -7692.57, -1087.04, 217.714, 1.19093, + 300, 0, 0, 0, 0, 0), + (@GUID_HEALER2, @ENTRY_HEALER2, 0, 25, 25, 1, 1, 0, + -7692.57, -1087.04, 217.714, 1.19093, + 300, 0, 0, 0, 0, 0); + +-- ==================================================================== +-- Waypoints / addon / formation +-- ==================================================================== +INSERT INTO waypoint_data + (id, point, position_x, position_y, position_z, orientation, delay, move_type, action, action_chance, wpguid) +VALUES + (@PATH_DAISH, 1, -7692.57, -1087.04, 217.714, NULL, 0, 0, 0, 100, 0), + (@PATH_DAISH, 2, -7662.74, -1041.40, 225.620, NULL, 0, 0, 0, 100, 0), + (@PATH_DAISH, 3, -7609.16, -1017.90, 240.538, NULL, 0, 0, 0, 100, 0), + (@PATH_DAISH, 4, -7546.75, -1027.62, 255.448, NULL, 0, 0, 0, 100, 0), + (@PATH_DAISH, 5, -7498.72, -1081.65, 264.926, NULL, 0, 0, 0, 100, 0), + (@PATH_DAISH, 6, -7490.68, -1143.76, 264.803, NULL, 0, 0, 0, 100, 0), + (@PATH_DAISH, 7, -7521.42, -1186.59, 256.979, NULL, 0, 0, 0, 100, 0), + (@PATH_DAISH, 8, -7568.83, -1217.53, 244.408, NULL, 0, 0, 0, 100, 0), + (@PATH_DAISH, 9, -7617.33, -1217.76, 232.177, NULL, 0, 0, 0, 100, 0), + (@PATH_DAISH, 10, -7668.89, -1183.12, 218.799, NULL, 0, 0, 0, 100, 0), + (@PATH_DAISH, 11, -7696.60, -1128.01, 215.458, NULL, 0, 0, 0, 100, 0), + (@PATH_DAISH, 12, -7693.81, -1090.00, 217.533, NULL, 0, 0, 0, 100, 0); + +INSERT INTO creature_addon + (guid, path_id, mount, bytes1, bytes2, emote, visibilityDistanceType, auras) +VALUES + (@GUID_DAISH, @PATH_DAISH, 0, 0, 0, 0, 0, ''); + +INSERT INTO creature_formations + (leaderGUID, memberGUID, dist, angle, groupAI, point_1, point_2) +VALUES + (@GUID_DAISH, @GUID_DAISH, 0, 0.0, 3, 0, 0), + (@GUID_DAISH, @GUID_HEALER1, 3, 2.2, 3, 0, 0), + (@GUID_DAISH, @GUID_HEALER2, 3, 4.1, 3, 0, 0); + +-- ==================================================================== +-- creature_text +-- ==================================================================== +INSERT INTO creature_text + (CreatureID, GroupID, ID, Text, Type, Language, Probability, + Emote, Duration, Sound, BroadcastTextId, TextRange, comment) +VALUES + (@ENTRY_DAISH, 0, 0, 'Daish! Daish! Daish!', + 14, 0, 100, 0, 0, 0, 0, 0, 'Daish loop yell'); + +-- ==================================================================== +-- SmartAI +-- ==================================================================== +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, event_param5, event_param6, + action_type, action_param1, action_param2, action_param3, action_param4, action_param5, action_param6, + target_type, target_param1, target_param2, target_param3, target_param4, + target_x, target_y, target_z, target_o, comment) +VALUES + (@ENTRY_DAISH, 0, 0, 0, 1, 0, 100, 0, + 10000, 20000, 45000, 75000, 0, 0, + 1, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, + 'Daish - OOC - Yell line 0'), + (@ENTRY_DAISH, 0, 1, 0, 4, 0, 100, 0, + 0, 0, 0, 0, 0, 0, + 11, 20375, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, + 'Daish - On Aggro - Cast Seal of Command'), + (@ENTRY_DAISH, 0, 2, 0, 0, 0, 100, 0, + 5000, 7000, 8000, 12000, 0, 0, + 11, 20271, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0, 0, + 'Daish - IC - Cast Judgement'), + (@ENTRY_DAISH, 0, 3, 0, 0, 0, 100, 0, + 8000, 12000, 12000, 16000, 0, 0, + 11, 48819, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0, 0, + 'Daish - IC - Cast Consecration'), + (@ENTRY_DAISH, 0, 4, 0, 0, 0, 100, 0, + 12000, 18000, 15000, 22000, 0, 0, + 11, 10308, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0, 0, + 'Daish - IC - Cast Hammer of Justice'), + (@ENTRY_DAISH, 0, 5, 0, 2, 0, 100, 1, + 0, 20, 0, 0, 0, 0, + 11, 642, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, + 'Daish - HP 20% - Cast Divine Shield (once)'), + + (@ENTRY_HEALER1, 0, 0, 0, 74, 0, 100, 0, + 0, 0, 5000, 9000, 0, 0, + 11, 48066, 0, 0, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 0, 0, 0, + 'Daish Healer 1 - Friendly Missing Aura - Cast PW:S'), + (@ENTRY_HEALER2, 0, 0, 0, 74, 0, 100, 0, + 0, 0, 5000, 9000, 0, 0, + 11, 48066, 0, 0, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 0, 0, 0, + 'Daish Healer 2 - Friendly Missing Aura - Cast PW:S'), + (@ENTRY_HEALER1, 0, 1, 0, 2, 0, 100, 0, + 0, 60, 4000, 7000, 0, 0, + 11, 48071, 0, 0, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 0, 0, 0, + 'Daish Healer 1 - Friendly Missing HP - Cast Flash Heal'), + (@ENTRY_HEALER2, 0, 1, 0, 2, 0, 100, 0, + 0, 60, 4000, 7000, 0, 0, + 11, 48071, 0, 0, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 0, 0, 0, + 'Daish Healer 2 - Friendly Missing HP - Cast Flash Heal');