Alright. I've spent a little bit of time working on this morph NPC. Hope you enjoy!
Code:
local npcid = 160015
function On_GossipMenu(unit, event, player)
if (player:IsInCombat() == true) then
unit:SendChatMessage(12, 0, "I'm afraid I can't help you.")
else
unit:GossipCreateMenu(100, player, 0)
unit:GossipMenuAddItem(4,"Morphs", 1, 0)
unit:GossipSendMenu(player)
end
end
function On_GossipSelect(unit, event, player, id, intid, code)
if (intid == 1) then
unit:GossipCreateMenu(100, player, 0)
unit:GossipMenuAddItem(5,"Human", 2, 0)
unit:GossipMenuAddItem(5,"Murloc", 3, 0)
unit:GossipMenuAddItem(5,"Hogger", 4, 0)
unit:GossipMenuAddItem(5,"Robot", 5, 0)
unit:GossipMenuAddItem(5,"Goblin", 6, 0)
unit:GossipMenuAddItem(5,"Wisp", 7, 0)
unit:GossipMenuAddItem(5,"Dragon", 8, 0)
unit:GossipMenuAddItem(5,"Lumberjack", 9, 0)
unit:GossipMenuAddItem(5,"Tauren", 10, 0)
unit:GossipMenuAddItem(5,"Worm", 11, 0)
unit:GossipMenuAddItem(5,"Hydra", 12, 0)
unit:GossipMenuAddItem(4,"[Next]", 997, 0)
unit:GossipMenuAddItem(4,"[Demorph]", 998, 0)
unit:GossipMenuAddItem(4,"[Back to Main Menu]", 999, 0)
unit:GossipSendMenu(player)
end
if (intid == 2) then
player:SetModel(6074)
player:GossipComplete()
end
if (intid == 3) then
player:SetModel(15395)
player:GossipComplete()
end
if (intid == 4) then
player:SetModel(384)
player:GossipComplete()
end
if (intid == 5) then
player:SetModel(6889)
player:GossipComplete()
end
if (intid == 6) then
player:SetModel(18290)
player:GossipComplete()
end
if (intid == 7) then
player:SetModel(17607)
player:GossipComplete()
end
if (intid == 8) then
player:SetModel(308)
player:GossipComplete()
end
if (intid == 9) then
player:SetModel(741)
player:GossipComplete()
end
if (intid == 10) then
player:SetModel(20618)
player:GossipComplete()
end
if (intid == 11) then
player:SetModel(13009)
player:GossipComplete()
end
if (intid == 12) then
player:SetModel(6737)
player:GossipComplete()
end
if (intid == 997) then
unit:GossipCreateMenu(100, player, 0)
unit:GossipMenuAddItem(5,"Defias Bandit", 13, 0)
unit:GossipMenuAddItem(5,"VanCleef", 14, 0)
unit:GossipMenuAddItem(5,"Ooze", 15, 0)
unit:GossipMenuAddItem(5,"Santa!", 16, 0)
unit:GossipMenuAddItem(5,"Santa's Lil'Helper!", 17, 0)
unit:GossipMenuAddItem(5,"Dark Iron", 18, 0)
unit:GossipMenuAddItem(5,"Infernal", 19, 0)
unit:GossipMenuAddItem(5,"Cow", 20, 0)
unit:GossipMenuAddItem(5,"Abomonation", 21, 0)
unit:GossipMenuAddItem(4,"[Demorph]", 998, 0)
unit:GossipMenuAddItem(4,"[Back to Main Menu]", 999, 0)
unit:GossipSendMenu(player)
end
if (intid == 13) then
player:SetModel(116)
player:GossipComplete()
end
if (intid == 14) then
player:SetModel(2029)
player:GossipComplete()
end
if (intid == 15) then
player:SetModel(4393)
player:GossipComplete()
end
if (intid == 16) then
player:SetModel(13369)
player:GossipComplete()
end
if (intid == 17) then
player:SetModel(15698)
player:GossipComplete()
end
if (intid == 18) then
player:SetModel(7797)
player:GossipComplete()
end
if (intid == 19) then
player:SetModel(10905)
player:GossipComplete()
end
if (intid == 20) then
player:SetModel(2442)
player:GossipComplete()
end
if (intid == 21) then
player:SetModel(12818)
player:GossipComplete()
end
if (intid == 998) then
unit:SendChatMessage(12, 0, "I hate to break it to you... but you must relog to demorph!")
player:SetModel(0)
player:GossipComplete()
end
RegisterUnitGossipEvent(55221, 1, "On_GossipMenu")
RegisterUnitGossipEvent(55221, 2, "On_GossipSelect")
SQL
Code:
INSERT INTO `creature_names` VALUES ('60015', 'Shifty', 'Morph NPC', '0', '0', '4', '0', '3', '0', '0', '23162', '23162', '0', '0', '1', '0', '0', '0');
INSERT INTO `creature_proto` VALUES ('60015', '100', '100', '35', '1000000', '1000000', '100000', '1', '4224', '100', '10000', '10000', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '5', '5', '5', '5', '5', '5', '5', '1', '1', '0', '0', '0', '0', '0', '3', '8', '14', '0', '0', '0', '0', '0', '0', '0', '0');
Hope someone can use it