Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function edgemaster (event, player, item, bag, slot)
- player:SaveToDB()
- local playerguid = player:GetGUIDLow()
- if (item:IsEquipped()) and (item:GetEntry()==9623) then
- player:LearnSpell(196, player) --1H AXE
- player:LearnSpell(197, player) --2H AXE
- player:LearnSpell(198, player) --1H MACE
- player:LearnSpell(199, player) --2H MACE
- player:LearnSpell(200, player) --POLEARMS
- player:LearnSpell(201, player) --1H SWORD
- player:LearnSpell(202, player) --2H SWORD
- player:LearnSpell(227, player) --STAVES
- player:LearnSpell(15590, player) --FIST
- player:LearnSpell(1180, player) --DAGGER
- end
- end
- local function unequip (event, player, enemy)
- if (player:GetEquippedItemBySlot(4)==nil) or ((player:GetEquippedItemBySlot(4)):GetEntry()~=9623) then
- if ((player:GetClass())==2) then --CRUSADER
- if (player:GetEquippedItemBySlot(15)) then
- local mainhand = player:GetEquippedItemBySlot(15)
- local mainhand_entry = mainhand:GetEntry()
- if (mainhand:GetSubClass()<4) or (mainhand:GetSubClass()>8) then
- player:RemoveItem(mainhand, 1)
- player:AddItem(mainhand_entry, 1)
- player:RemoveSpell(1180, player) --DAGGERS
- player:RemoveSpell(227, player) --STAVES
- player:RemoveSpell(15590, player) --FIST
- player:RemoveSpell(196, player) --1H AXE
- player:RemoveSpell(197, player) --2H AXE
- end
- end
- end
- if ((player:GetClass())==3) then --RANGER
- if (player:GetEquippedItemBySlot(15)) then
- local mainhand = player:GetEquippedItemBySlot(15)
- local mainhand_entry = mainhand:GetEntry()
- if (mainhand:GetSubClass()==4) or (mainhand:GetSubClass()==5) or (mainhand:GetSubClass()==13) then
- player:RemoveItem(mainhand, 1)
- player:AddItem(mainhand_entry, 1)
- player:RemoveSpell(198, player) --1H MACE
- player:RemoveSpell(199, player) --2H MACE
- player:RemoveSpell(15590, player) --FIST
- end
- end
- end
- if ((player:GetClass())==4) then --THIEF
- if (player:GetEquippedItemBySlot(15)) then
- local mainhand = player:GetEquippedItemBySlot(15)
- local mainhand_entry = mainhand:GetEntry()
- if (mainhand:GetSubClass()==0) or (mainhand:GetSubClass()==1) or (mainhand:GetSubClass()==5) or (mainhand:GetSubClass()==8) or (mainhand:GetSubClass()==10) or (mainhand:GetSubClass()==6) then
- player:RemoveItem(mainhand, 1)
- player:AddItem(mainhand_entry, 1)
- player:RemoveSpell(196, player) --1H AXE
- player:RemoveSpell(197, player) --2H AXE
- player:RemoveSpell(199, player) --2H MACE
- player:RemoveSpell(200, player) --POLEARMS
- player:RemoveSpell(202, player) --2H SWORD
- player:RemoveSpell(227, player) --STAVES
- end
- end
- end
- if ((player:GetClass())==5) then --PRELATE
- if (player:GetEquippedItemBySlot(15)) then
- local mainhand = player:GetEquippedItemBySlot(15)
- local mainhand_entry = mainhand:GetEntry()
- if (mainhand:GetSubClass()~=4) or (mainhand:GetSubClass()~=10) or (mainhand:GetSubClass()~=15) then
- player:RemoveItem(mainhand, 1)
- player:AddItem(mainhand_entry, 1)
- player:RemoveSpell(196, player) --1H AXE
- player:RemoveSpell(197, player) --2H AXE
- player:RemoveSpell(199, player) --2H MACE
- player:RemoveSpell(200, player) --POLEARMS
- player:RemoveSpell(201, player) --1H SWORD
- player:RemoveSpell(202, player) --2H SWORD
- player:RemoveSpell(15590, player) --FIST
- player:LearnSpell(1180, player) --DAGGER
- end
- end
- end
- if ((player:GetClass())==6) then --NECROMANCER
- if (player:GetEquippedItemBySlot(15)) then
- local mainhand = player:GetEquippedItemBySlot(15)
- local mainhand_entry = mainhand:GetEntry()
- if (mainhand:GetSubClass()~=4) or (mainhand:GetSubClass()~=10) or (mainhand:GetSubClass()~=15) then
- player:RemoveItem(mainhand, 1)
- player:AddItem(mainhand_entry, 1)
- player:RemoveSpell(196, player) --1H AXE
- player:RemoveSpell(197, player) --2H AXE
- player:RemoveSpell(199, player) --2H MACE
- player:RemoveSpell(200, player) --POLEARMS
- player:RemoveSpell(201, player) --1H SWORD
- player:RemoveSpell(202, player) --2H SWORD
- player:RemoveSpell(15590, player) --FIST
- end
- end
- end
- if ((player:GetClass())==7) then --SHAMAN
- if (player:GetEquippedItemBySlot(15)) then
- local mainhand = player:GetEquippedItemBySlot(15)
- local mainhand_entry = mainhand:GetEntry()
- if (mainhand:GetSubClass()==7) or (mainhand:GetSubClass()==8) then
- player:RemoveItem(mainhand, 1)
- player:AddItem(mainhand_entry, 1)
- player:RemoveSpell(201, player) --1H SWORD
- player:RemoveSpell(202, player) --2H SWORD
- end
- end
- end
- if ((player:GetClass())==8) then --SORCERER
- if (player:GetEquippedItemBySlot(15)) then
- local mainhand = player:GetEquippedItemBySlot(15)
- local mainhand_entry = mainhand:GetEntry()
- if (mainhand:GetSubClass()~=7) or (mainhand:GetSubClass()~=10) or (mainhand:GetSubClass()~=15) then
- player:RemoveItem(mainhand, 1)
- player:AddItem(mainhand_entry, 1)
- player:RemoveSpell(196, player) --1H AXE
- player:RemoveSpell(197, player) --2H AXE
- player:RemoveSpell(198, player) --1H MACE
- player:RemoveSpell(199, player) --2H MACE
- player:RemoveSpell(200, player) --POLEARMS
- player:RemoveSpell(202, player) --2H SWORD
- player:RemoveSpell(15590, player) --FIST
- end
- end
- end
- if ((player:GetClass())==9) then --DIABLOIST
- if (player:GetEquippedItemBySlot(15)) then
- local mainhand = player:GetEquippedItemBySlot(15)
- local mainhand_entry = mainhand:GetEntry()
- if (mainhand:GetSubClass()~=7) or (mainhand:GetSubClass()~=10) or (mainhand:GetSubClass()~=15) then
- player:RemoveItem(mainhand, 1)
- player:AddItem(mainhand_entry, 1)
- player:RemoveSpell(196, player) --1H AXE
- player:RemoveSpell(197, player) --2H AXE
- player:RemoveSpell(198, player) --1H MACE
- player:RemoveSpell(199, player) --2H MACE
- player:RemoveSpell(200, player) --POLEARMS
- player:RemoveSpell(202, player) --2H SWORD
- player:RemoveSpell(15590, player) --FIST
- end
- end
- end
- if ((player:GetClass())==11) then --DRUID
- if (player:GetEquippedItemBySlot(15)) then
- local mainhand = player:GetEquippedItemBySlot(15)
- local mainhand_entry = mainhand:GetEntry()
- if (mainhand:GetSubClass()~=4) or (mainhand:GetSubClass()~=10) or (mainhand:GetSubClass()~=5) or (mainhand:GetSubClass()~=15) then
- player:RemoveItem(mainhand, 1)
- player:AddItem(mainhand_entry, 1)
- player:RemoveSpell(196, player) --1H AXE
- player:RemoveSpell(197, player) --2H AXE
- player:RemoveSpell(200, player) --POLEARMS
- player:RemoveSpell(201, player) --1H SWORD
- player:RemoveSpell(202, player) --2H SWORD
- player:RemoveSpell(15590, player) --FIST
- end
- end
- end
- if ((player:GetClass())==12) then --SPELLBREAKER
- if (player:GetEquippedItemBySlot(15)) then
- local mainhand = player:GetEquippedItemBySlot(15)
- local mainhand_entry = mainhand:GetEntry()
- if (mainhand:GetSubClass()<4) or (mainhand:GetSubClass()>8) then
- player:RemoveItem(mainhand, 1)
- player:AddItem(mainhand_entry, 1)
- player:RemoveSpell(1180, player) --DAGGERS
- player:RemoveSpell(227, player) --STAVES
- player:RemoveSpell(15590, player) --FIST
- player:RemoveSpell(196, player) --1H AXE
- player:RemoveSpell(197, player) --2H AXE
- end
- end
- end
- end
- end
- RegisterPlayerEvent(29, edgemaster)
- RegisterPlayerEvent(33, unequip)
Advertisement
Add Comment
Please, Sign In to add comment