Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local npcid = 60
- local T = {
- ["Menu"] = {
- {"Headpiece", 0},
- {"Shoulders", 2},
- {"Chest", 4},
- {"Legs", 6},
- {"Boots", 7},
- {"Bracers", 8},
- {"Gloves", 9},
- {"Cloak", 14},
- {"Main-Hand Weapons", 15},
- {"Two-Handed Weapons", 150},
- {"Off-Hand Weapons", 16},
- {"Shields", 160},
- },
- [0] = {
- -- Headpiece
- {"+10 intellect, +10 stamina, +24 healing", 2591},
- {"+10 stamina, +1% hit rating, +24 ranged attack power", 2586},
- {"+1% spell hit rating, +18 spell damage and healing", 2588},
- {"+10 stamina, +7 defense rating, +24 healing", 2584},
- {"+10 stamina, +24 healing, +4 mana/5 sec", 2590},
- {"+1% dodge rating, +28 attack power", 2585},
- {"+15 intellect, +13 spell damage and healing", 2587},
- {"+10 stamina, +18 spell damage and healing", 2589},
- {"+10 stamina, +7 defense rating, +15 shield block value", 2583},
- {"+8 agility", 1508},
- {"+8 intellect", 1509},
- {"+8 spirit", 1510},
- {"+8 stamina", 1507},
- {"+8 strength", 1506},
- },
- [2] = {
- -- Shoulders
- {"+26 attack power, +1% critical strike rating", 2717},
- {"+15 spell damage and healing, +1% spell critical strike rating", 2721},
- {"+31 healing, +11 spell damage, +5mana/5sec", 2715},
- {"+16 stamina, +100 armor", 2716},
- {"+30 attack power", 2606},
- {"+33 healing", 2604},
- {"+18 spell damage and healing", 2605},
- },
- [4] = {
- -- Chest
- {"+3 defense rating", 2503},
- {"5% chance to absorb 25 damage", 63},
- {"+100 health", 1892},
- {"+100 mana", 1893},
- {"+4 all stats", 1891},
- },
- [6] = {
- -- Legs
- {"+10 intellect, +10 stamina, +24 healing", 2591},
- {"+10 stamina, +10 hit rating, +24 ranged attack power", 2586},
- {"+1% spell hit rating, +18 spell damage and healing", 2588},
- {"+10 stamina, +7 defense rating, +24 healing", 2584},
- {"+10 stamina, +24 healing, +4 mana/5 sec", 2590},
- {"+1% dodge rating, +28 attack power", 2585},
- {"+15 intellect, +13 spell damage and healing", 2587},
- {"+10 stamina, +18 spell damage and healing", 2589},
- {"+10 stamina, +7 defense rating, +15 shield block value", 2583},
- {"+8 agility", 1508},
- {"+8 intellect", 1509},
- {"+8 spirit", 1510},
- {"+8 stamina", 1507},
- {"+8 strength", 1506},
- },
- [7] = {
- -- Boots
- {"+8% run speed", 911},
- {"+3 defense rating", 2503},
- {"+7 agilty", 1887},
- {"+5 Spirit", 851},
- {"+7 stamina", 852},
- },
- [8] = {
- -- Bracers
- {"+24 healing", 2566},
- {"+4 mana/5 sec", 36},
- {"+3 defense rating", 923},
- {"+7 intellect", 1883},
- {"+9 spirit", 1884},
- {"+9 stamina", 1886},
- {"+9 strength", 1885},
- },
- [9] = {
- -- Gloves
- {"+55 healing", 2617},
- {"+20 fire spell damage", 2616},
- {"+20 frost spell damage", 2615},
- {"+20 shadow spell damage", 2614},
- {"+3 defense rating", 2503},
- {"+15 agility", 2564},
- {"+7 strength", 927},
- {"+40 armor", 1843},
- },
- [14] = {
- -- Cloak
- {"+70 armor", 1889},
- {"+1% dodge rating", 2622},
- {"+5 stealth rating", 910},
- {"+5 all resistances", 1888},
- {"+15 fire resistance", 2619},
- {"+15 nature resistance", 2620},
- },
- [15] = {
- -- Main Hand
- {"+5 damage", 1897},
- {"Often heals for 75-125 and adds +100 strength for 15 sec", 1900},
- {"Often steals 30 health from the target", 1898},
- {"+55 healing", 2505},
- {"+30 spell damage and healing", 2504},
- {"Cannot be disarmed", 37},
- {"+15 agility", 2564},
- {"+22 intellect", 2568},
- {"+20 spirit", 2567},
- {"+15 strength", 2563},
- {"Often causes the target's movement speed to be slowed by 30% and the time between its attacks to be increased by 25% for 5 sec", 1894},
- {"Often curses the target, causing its damage to be reduced by 15 for 12 sec", 1899},
- },
- [150] = {
- -- Two-Handed
- {"+9 damage", 1896},
- {"+25 agility", 2646},
- {"+9 intellect", 1904},
- {"+9 spirit", 1903},
- },
- [16] = {
- -- Offhand
- {"+5 damage", 1897},
- {"Often heals for 75-125 and adds +100 strength for 15 sec", 1900},
- {"Often steals 30 health from the target", 1898},
- {"+55 healing", 2505},
- {"+30 spell damage and healing", 2504},
- {"Cannot be disarmed", 37},
- {"+15 agility", 2564},
- {"+22 intellect", 2568},
- {"+20 spirit", 2567},
- {"+15 strength", 2563},
- {"Often causes the target's movement speed to be slowed by 30% and the time between its attacks to be increased by 25% for 5 sec", 1894},
- {"Often curses the target, causing its damage to be reduced by 15 for 12 sec", 1899},
- },
- [160] = {
- -- Shields
- {"+30 armor", 848},
- {"+2% block rating", 863},
- {"+20-30 block damage", 1704},
- {"+8 frost resistance", 926},
- {"+9 spirit", 1890},
- {"+7 stamina", 929},
- },
- }
- function Enchanter(event, plr, unit)
- for _, v in ipairs(T["Menu"]) do
- plr:GossipMenuAddItem(3, "Enchant "..v[1]..".", v[2], 0)
- end
- plr:GossipSendMenu(1, unit)
- end
- function EnchanterSelect(event, plr, unit, slot, enchant, code)
- if T[slot] then
- for i, v in ipairs(T[slot]) do
- plr:GossipMenuAddItem(3, "Enchant "..v[1].."", slot, v[2])
- end
- plr:GossipMenuAddItem(3, "[Back]", 99999999, 0) -- some nonexistant slot
- plr:GossipSendMenu(1, unit)
- else
- Enchanter(event, plr, unit)
- end
- if T[slot] and enchant ~= 0 then
- local realslot = slot >= 100 and slot/10 or slot
- local item = plr:GetEquippedItemBySlot(realslot)
- if item then
- local WType = item:GetSubClass()
- if slot == 150 then
- if not (WType == 1 or WType == 5 or WType == 6 or WType == 8 or WType == 10) then
- plr:SendAreaTriggerMessage("You don't have a Two-Handed Weapon equipped!")
- return
- end
- elseif slot == 160 then
- if not (WType == 6) then
- plr:SendAreaTriggerMessage("You don't have a Shield equipped!")
- return
- end
- end
- item:ClearEnchantment(0,0)
- item:SetEnchantment(enchant, 0, 0)
- plr:PlayDirectSound(3337)
- else
- plr:SendAreaTriggerMessage("You have no item to enchant in the selected slot!")
- return
- end
- end
- end
- RegisterCreatureGossipEvent(npcid, 1, Enchanter)
- RegisterCreatureGossipEvent(npcid, 2, EnchanterSelect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement