Code:
function AngelSmithGossipOnTalk(Unit, Event, player)
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "Who are you?", 1, 0)
Unit:GossipMenuAddItem(0, "Can you help me forge a powerful weapon?", 2, 0)
Unit:GossipMenuAddItem(0, "Can you help me forge powerful armor?", 10, 0)
Unit:GossipMenuAddItem(0, "Never mind.", 3, 0)
Unit:GossipSendMenu(player)
end
function AngelSmithGossipOnSelect(Unit, Event, player, id, intid, code, pMisc)
if (intid == 2) then
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "Help me craft a Sword", 4, 0)
Unit:GossipMenuAddItem(0, "Help me to craft a Staff", 5, 0)
Unit:GossipMenuAddItem(0, "Help me craft a Dagger", 21, 0)
Unit:GossipMenuAddItem(0, "Help me to craft a Bow", 22, 0)
Unit:GossipMenuAddItem(0, "Never mind", 3, 0)
Unit:GossipSendMenu(player)
end
if (intid == 10) then
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "Help me craft a Helmet", 11, 0)
Unit:GossipMenuAddItem(0, "Help me to craft Gloves", 12, 0)
Unit:GossipMenuAddItem(0, "Help me craft Boots", 13, 0)
Unit:GossipMenuAddItem(0, "Help me to craft a Belt", 14, 0)
Unit:GossipMenuAddItem(0, "Help me craft Bracers", 15, 0)
Unit:GossipMenuAddItem(0, "Help me to craft Shoulders", 16, 0)
Unit:GossipMenuAddItem(0, "Help me craft Legs", 17, 0)
Unit:GossipMenuAddItem(0, "Help me to craft a Chestpiece", 18, 0)
Unit:GossipMenuAddItem(0, "Never mind", 3, 0)
Unit:GossipSendMenu(player)
end
if (intid == 1) then
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "I am a Weaponsmith, I left my home in Ironforge a long time ago in order to aid the new heroes of our lands. If you are able to recover an ancient angelic relic i will be able to craft you a weapon of great power.", 99, 0)
Unit:GossipMenuAddItem(0, "Okay", 3, 0)
Unit:GossipSendMenu(player)
end
--CRAFT ITEM
if (intid == 11) then
player:GossipComplete()
if player:HasItem(191501) then
player:RemoveItem(191501)
player:AddItem(191510)
Unit:SendChatMessage(12, 0, "Congratulations! Your Headguard is Complete!") --Insert Relic removal and weapon gaining here when weapons are made
else
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "You require an Angelic Artifact before i can help you", 99, 0)
Unit:GossipMenuAddItem(0, "Never mind", 3, 0)
end
end
if (intid == 12) then
player:GossipComplete()
if player:HasItem(191501) then
player:RemoveItem(191501)
player:AddItem(191511)
Unit:SendChatMessage(12, 0, "Congratulations! Your Handguards is Complete!") --Insert Relic removal and weapon gaining here when weapons are made
else
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "You require an Angelic Artifact before i can help you", 99, 0)
Unit:GossipMenuAddItem(0, "Never mind", 3, 0)
end
end
if (intid == 13) then
player:GossipComplete()
if player:HasItem(191501) then
player:RemoveItem(191501)
player:AddItem(191507)
Unit:SendChatMessage(12, 0, "Congratulations! Your Boots are Complete!") --Insert Relic removal and weapon gaining here when weapons are made
else
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "You require an Angelic Artifact before i can help you", 99, 0)
Unit:GossipMenuAddItem(0, "Never mind", 3, 0)
end
end
if (intid == 14) then
player:GossipComplete()
if player:HasItem(191501) then
player:RemoveItem(191501)
player:AddItem(191506)
Unit:SendChatMessage(12, 0, "Congratulations! Your Waistguard is Complete!") --Insert Relic removal and weapon gaining here when weapons are made
else
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "You require an Angelic Artifact before i can help you", 99, 0)
Unit:GossipMenuAddItem(0, "Never mind", 3, 0)
end
end
if (intid == 15) then
player:GossipComplete()
if player:HasItem(191501) then
player:RemoveItem(191501)
player:AddItem(191505)
Unit:SendChatMessage(12, 0, "Congratulations! Your Bracers are Complete!") --Insert Relic removal and weapon gaining here when weapons are made
else
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "You require an Angelic Artifact before i can help you", 99, 0)
Unit:GossipMenuAddItem(0, "Never mind", 3, 0)
end
end
if (intid == 16) then
player:GossipComplete()
if player:HasItem(191501) then
player:RemoveItem(191501)
player:AddItem(191504)
Unit:SendChatMessage(12, 0, "Congratulations! Your Shoulders are Complete!") --Insert Relic removal and weapon gaining here when weapons are made
else
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "You require an Angelic Artifact before i can help you", 99, 0)
Unit:GossipMenuAddItem(0, "Never mind", 3, 0)
end
end
if (intid == 17) then
player:GossipComplete()
if player:HasItem(191501) then
player:RemoveItem(191501)
player:AddItem(191503)
Unit:SendChatMessage(12, 0, "Congratulations! Your Legguards are Complete!") --Insert Relic removal and weapon gaining here when weapons are made
else
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "You require an Angelic Artifact before i can help you", 99, 0)
Unit:GossipMenuAddItem(0, "Never mind", 3, 0)
end
end
if (intid == 18) then
player:GossipComplete()
if player:HasItem(191501) then
player:RemoveItem(191501)
player:AddItem(191502)
Unit:SendChatMessage(12, 0, "Congratulations! Your Chestpiece is Complete!") --Insert Relic removal and weapon gaining here when weapons are made
else
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "You require an Angelic Artifact before i can help you", 99, 0)
Unit:GossipMenuAddItem(0, "Never mind", 3, 0)
end
end
-- CRAFT WEAPONS
if (intid == 4) then
if (player:HasItem(191501)) then
player:GossipComplete()
player:RemoveItem(191501)
player:AddItem(191525)
Unit:SendChatMessage(12, 0, "Congratulations! Your Sword is Complete!") --Insert Relic removal and weapon gaining here when weapons are made
else
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "You require an Angelic Artifact before i can help you", 99, 0)
Unit:GossipMenuAddItem(0, "Never mind", 3, 0)
end
end
if (intid == 5) then
player:GossipComplete()
if player:HasItem(191501) then
player:RemoveItem(191501)
player:AddItem(191524)
Unit:SendChatMessage(12, 0, "Congratulations! Your Staff is Complete!") --Insert Relic removal and weapon gaining here when weapons are made
else
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "You require an Angelic Artifact before i can help you", 99, 0)
Unit:GossipMenuAddItem(0, "Never mind", 3, 0)
end
end
if (intid == 21) then
player:GossipComplete()
if player:HasItem(191501) then
player:RemoveItem(191501)
player:AddItem(191527)
Unit:SendChatMessage(12, 0, "Congratulations! Your Dagger is Complete!") --Insert Relic removal and weapon gaining here when weapons are made
else
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "You require an Angelic Artifact before i can help you", 99, 0)
Unit:GossipMenuAddItem(0, "Never mind", 3, 0)
end
end
if (intid == 22) then
player:GossipComplete()
if player:HasItem(191501) then
player:RemoveItem(191501)
player:AddItem(191526)
Unit:SendChatMessage(12, 0, "Congratulations! Your Bow is Complete!") --Insert Relic removal and weapon gaining here when weapons are made
else
Unit:GossipCreateMenu(100, player, 0)
Unit:GossipMenuAddItem(0, "You require an Angelic Artifact before i can help you", 99, 0)
Unit:GossipMenuAddItem(0, "Never mind", 3, 0)
end
end
if (intid == 3) then
player:GossipComplete()
end
end
function AngelSmith_OnSpawn(Unit, Event)
Unit:CastSpell(46565)
Unit:CastSpellOnTarget(46565, Unit)
end
-- RegisterUnitEvents
RegisterUnitGossipEvent(291505, 1, "AngelSmithGossipOnTalk")
RegisterUnitGossipEvent(291505, 2, "AngelSmithGossipOnSelect")
RegisterUnitEvent(291505, 18, "AngelSmith_OnSpawn")