ListUnspawnedAllianceNPCBots

nicolaw 1st September 2024 at 1:24pm
MySQL SQL WotLKNPCBots

https://raw.githubusercontent.com/trickerer/Trinity-Bots/master/NPCBots.patch

Refer to sp__generate_npcbot_equips stored procedure for race and class mappings.

SELECT 
    ct.entry, 
    ct.name, 
    ct.ScriptName, 
    CASE cm.Gender
        WHEN 0 THEN 'Male'
        WHEN 1 THEN 'Female'
        WHEN 2 THEN 'None'
        ELSE 'Unknown'
    END AS Gender,
    CASE cte.class
        WHEN 1 THEN 'Warrior'
        WHEN 2 THEN 'Paladin'
        WHEN 3 THEN 'Hunter'
        WHEN 4 THEN 'Rogue'
        WHEN 5 THEN 'Priest'
        WHEN 6 THEN 'Death Knight'
        WHEN 7 THEN 'Shaman'
        WHEN 8 THEN 'Mage'
        WHEN 9 THEN 'Warlock'
        WHEN 11 THEN 'Druid'
        WHEN 12 THEN 'Blademaster'
        WHEN 13 THEN 'Sphynx'
        WHEN 14 THEN 'Archmage'
        WHEN 15 THEN 'Dreadlord'
        WHEN 16 THEN 'Spell Breaker'
        WHEN 17 THEN 'Dark Ranger'
        ELSE 'Unknown Class'
    END AS Class,
    CASE cte.race
        WHEN 1 THEN 'Human'
        WHEN 2 THEN 'Orc'
        WHEN 3 THEN 'Dwarf'
        WHEN 4 THEN 'Night Elf'
        WHEN 5 THEN 'Undead'
        WHEN 6 THEN 'Tauren'
        WHEN 7 THEN 'Gnome'
        WHEN 8 THEN 'Troll'
        WHEN 10 THEN 'Blood Elf'
        WHEN 11 THEN 'Draenei'
        ELSE 'Unknown Race'
    END AS Race
FROM creature_template AS ct
LEFT JOIN creature AS c ON ct.entry = c.id
LEFT JOIN creature_model_info AS cm ON ct.modelid1 = cm.DisplayID
LEFT JOIN creature_template_npcbot_extras AS cte ON cte.entry = ct.entry
WHERE ct.ScriptName IN ('warrior_bot', 'paladin_bot', 'hunter_bot', 'rogue_bot', 'priest_bot', 'shaman_bot', 'mage_bot', 'warlock_bot', 'druid_bot', 'deathknight_bot')
AND cte.race IN (1,3,4,7,11)
AND ct.entry >= 70000
AND c.id IS NULL;