mirror of
https://github.com/araxiaonline/RandomScriptsforAzerothCore.git
synced 2026-06-13 02:22:19 -04:00
Add files via upload
This commit is contained in:
41
ArchBishopBen.lua
Normal file
41
ArchBishopBen.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
local ABishop = {}
|
||||
|
||||
local function CastHolyB(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 59700, true)
|
||||
end
|
||||
|
||||
local function CastHolyFire(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 48134, true)
|
||||
end
|
||||
|
||||
local function CastSWP(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 27605, true)
|
||||
end
|
||||
|
||||
local function CastHV(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 37959, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastHolyB, 6600, 0)
|
||||
creature:RegisterEvent(CastHolyFire, 2500, 0)
|
||||
creature:RegisterEvent(CastSWP, 15000, 0)
|
||||
creature:RegisterEvent(CastHV, 25000, 0)
|
||||
|
||||
local yellOptions = { "I am the Light's instrument of justice!", "I shall smite the unholy!", "The Light will purify you!", "For the glory of the holy Light!", "In the name of the Light, I will crush you!", "The Light shall guide my every strike!", "You stand no chance against the holy power within me!", "I am the Light's chosen champion!" }
|
||||
local randomIndex = math.random(1, 8)
|
||||
local selectedYell = yellOptions[randomIndex]
|
||||
creature:SendUnitYell(selectedYell, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(1284, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(1284, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(1284, 4, OnDied)
|
||||
@@ -1,4 +1,5 @@
|
||||
--Custom Content Auto-loader. If you don't see custom content in Azeroth or unscripted creatures, it's because it's December 31st. Just .event stop 91 and .event start 91 again.
|
||||
--DO NOT TOUCH! THIS IS TO FIX AN EXTREMELY ANNOYING BUG!
|
||||
|
||||
local eventId = 91
|
||||
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
local Bolvar = {}
|
||||
|
||||
local function CastHolyShield(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature, 20928, true)
|
||||
end
|
||||
|
||||
local function CastAS(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 32699, true)
|
||||
end
|
||||
@@ -25,7 +21,6 @@ creature:CastSpell(creature, 20217, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastHolyShield, 8000, 0)
|
||||
creature:RegisterEvent(CastAS, 12600, 0)
|
||||
creature:RegisterEvent(CastHOR, 5000, 0)
|
||||
creature:RegisterEvent(CastJOL, 10000, 0)
|
||||
|
||||
185
GemVendor.lua
Normal file
185
GemVendor.lua
Normal file
@@ -0,0 +1,185 @@
|
||||
local npcid = 190016
|
||||
local lavacore = 17011
|
||||
local Red = {28458, 228459, 228461, 228462}
|
||||
local Blue = {228464, 229465, 229466}
|
||||
local Yellow = {228467, 228468, 229470}
|
||||
|
||||
local function PurchaseRedGem(event, player, creature, sender, intid, code, menu_id)
|
||||
if (intid == 1) then
|
||||
if (player:GetItemCount(lavacore) >= 3) then
|
||||
player:RemoveItem(lavacore, 3)
|
||||
player:AddItem(Red[1], 1)
|
||||
creature:SendUnitSay("Your +4 Strength Gem has been added to your inventory.", 0)
|
||||
else
|
||||
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
|
||||
end
|
||||
end
|
||||
if (intid == 2) then
|
||||
if (player:GetItemCount(lavacore) >= 3) then
|
||||
player:RemoveItem(lavacore, 3)
|
||||
player:AddItem(Red[2], 1)
|
||||
creature:SendUnitSay("Your +4 Agility Gem has been added to your inventory.", 0)
|
||||
else
|
||||
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
|
||||
end
|
||||
end
|
||||
if (intid == 3) then
|
||||
if (player:GetItemCount(lavacore) >= 3) then
|
||||
player:RemoveItem(lavacore, 3)
|
||||
player:AddItem(Red[3], 1)
|
||||
creature:SendUnitSay("Your +5 Spell Power Gem has been added to your inventory.", 0)
|
||||
else
|
||||
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
|
||||
end
|
||||
end
|
||||
if (intid == 4) then
|
||||
if (player:GetItemCount(lavacore) >= 3) then
|
||||
player:RemoveItem(lavacore, 3)
|
||||
player:AddItem(Red[4], 1)
|
||||
creature:SendUnitSay("Your +8 Attack Power Gem has been added to your inventory.", 0)
|
||||
else
|
||||
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function PurchaseBlueGem(event, player, creature, sender, intid, code, menu_id)
|
||||
if (intid == 1) then
|
||||
if (player:GetItemCount(lavacore) >= 3) then
|
||||
player:RemoveItem(lavacore, 3)
|
||||
player:AddItem(Blue[1], 1)
|
||||
creature:SendUnitSay("Your +6 Stamina Gem has been added to your inventory.", 0)
|
||||
else
|
||||
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
|
||||
end
|
||||
end
|
||||
if (intid == 2) then
|
||||
if (player:GetItemCount(lavacore) >= 3) then
|
||||
player:RemoveItem(lavacore, 3)
|
||||
player:AddItem(Blue[2], 1)
|
||||
creature:SendUnitSay("Your +4 Spirit Gem has been added to your inventory.", 0)
|
||||
else
|
||||
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
|
||||
end
|
||||
end
|
||||
if (intid == 3) then
|
||||
if (player:GetItemCount(lavacore) >= 3) then
|
||||
player:RemoveItem(lavacore, 3)
|
||||
player:AddItem(Blue[3], 1)
|
||||
creature:SendUnitSay("Your +2 Mp5 Gem has been added to your inventory.", 0)
|
||||
else
|
||||
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function PurchaseYellowGem(event, player, creature, sender, intid, code, menu_id)
|
||||
if (intid == 1) then
|
||||
if (player:GetItemCount(lavacore) >= 3) then
|
||||
player:RemoveItem(lavacore, 3)
|
||||
player:AddItem(Yellow[1], 1)
|
||||
creature:SendUnitSay("Your +4 Intellect Gem has been added to your inventory.", 0)
|
||||
else
|
||||
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
|
||||
end
|
||||
end
|
||||
if (intid == 2) then
|
||||
if (player:GetItemCount(lavacore) >= 3) then
|
||||
player:RemoveItem(lavacore, 3)
|
||||
player:AddItem(Yellow[2], 1)
|
||||
creature:SendUnitSay("Your +4 Crit Rating Gem has been added to your inventory.", 0)
|
||||
else
|
||||
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
|
||||
end
|
||||
end
|
||||
if (intid == 3) then
|
||||
if (player:GetItemCount(lavacore) >= 3) then
|
||||
player:RemoveItem(lavacore, 3)
|
||||
player:AddItem(Yellow[3], 1)
|
||||
creature:SendUnitSay("Your +4 Hit Rating Gem has been added to your inventory.", 0)
|
||||
else
|
||||
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
|
||||
end
|
||||
end
|
||||
if (intid == 4) then
|
||||
if (player:GetItemCount(lavacore) >= 3) then
|
||||
player:RemoveItem(lavacore, 3)
|
||||
player:AddItem(Yellow[4], 1)
|
||||
creature:SendUnitSay("Your +4 Defense Rating Gem has been added to your inventory.", 0)
|
||||
else
|
||||
creature:SendUnitSay("You do not have enough Lava Cores.", 0)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
local function OnGossipHello(event, player, creature)
|
||||
creature:SendUnitSay("Greetings " .. player:GetName() .. ", For 3 Lava Cores you can have any gem of your choosing.", 0)
|
||||
player:GossipMenuAddItem(1, "|TInterface\\Icons\\inv_misc_gem_ruby_03:50:50:-43:0|tPurchase Red Gems", 0, 1)
|
||||
player:GossipMenuAddItem(1, "|TInterface\\Icons\\inv_misc_gem_crystal_03:50:50:-43:0|tPurchase Blue Gems", 0, 2)
|
||||
player:GossipMenuAddItem(1, "|TInterface\\Icons\\inv_misc_gem_topaz_03:50:50:-43:0|tPurchase Yellow Gems", 0, 3)
|
||||
player:GossipSendMenu(1, creature)
|
||||
end
|
||||
|
||||
function OnGossipSelect(event, player, creature, sender, intid, code, menu_id)
|
||||
if (intid == 1) then
|
||||
player:GossipMenuAddItem(0, "+4 Strength Gem", 0, 11)
|
||||
player:GossipMenuAddItem(0, "+4 Agility Gem", 0, 12)
|
||||
player:GossipMenuAddItem(0, "+5 Spell Power Gem", 0, 13)
|
||||
player:GossipMenuAddItem(0, "+8 Attack Power Gem", 0, 14)
|
||||
player:GossipSendMenu(1, creature)
|
||||
end
|
||||
if (intid == 2) then
|
||||
player:GossipMenuAddItem(0, "+6 Stamina Gem", 0, 21)
|
||||
player:GossipMenuAddItem(0, "+4 Spirit Gem", 0, 22)
|
||||
player:GossipMenuAddItem(0, "+2 Mp5 Gem", 0, 23)
|
||||
player:GossipSendMenu(1, creature)
|
||||
end
|
||||
if (intid == 3) then
|
||||
player:GossipMenuAddItem(0, "+4 Intellect Gem", 0, 31)
|
||||
player:GossipMenuAddItem(0, "+4 Crit Rating Gem", 0, 32)
|
||||
player:GossipMenuAddItem(0, "+4 Hit Rating Gem", 0, 33)
|
||||
player:GossipMenuAddItem(0, "+4 Defense Rating Gem", 0, 34)
|
||||
player:GossipSendMenu(1, creature)
|
||||
end
|
||||
if (intid == 11) then
|
||||
PurchaseRedGem(event, player, creature, sender, 1, code, menu_id)
|
||||
end
|
||||
if (intid == 12) then
|
||||
PurchaseRedGem(event, player, creature, sender, 2, code, menu_id)
|
||||
end
|
||||
if (intid == 13) then
|
||||
PurchaseRedGem(event, player, creature, sender, 3, code, menu_id)
|
||||
end
|
||||
if (intid == 14) then
|
||||
PurchaseRedGem(event, player, creature, sender, 4, code, menu_id)
|
||||
end
|
||||
if (intid == 21) then
|
||||
PurchaseBlueGem(event, player, creature, sender, 1, code, menu_id)
|
||||
end
|
||||
if (intid == 22) then
|
||||
PurchaseBlueGem(event, player, creature, sender, 2, code, menu_id)
|
||||
end
|
||||
if (intid == 23) then
|
||||
PurchaseBlueGem(event, player, creature, sender, 3, code, menu_id)
|
||||
end
|
||||
if (intid == 31) then
|
||||
PurchaseYellowGem(event, player, creature, sender, 1, code, menu_id)
|
||||
end
|
||||
if (intid == 32) then
|
||||
PurchaseYellowGem(event, player, creature, sender, 2, code, menu_id)
|
||||
end
|
||||
if (intid == 33) then
|
||||
PurchaseYellowGem(event, player, creature, sender, 3, code, menu_id)
|
||||
end
|
||||
if (intid == 34) then
|
||||
PurchaseYellowGem(event, player, creature, sender, 4, code, menu_id)
|
||||
end
|
||||
end
|
||||
|
||||
RegisterCreatureGossipEvent(npcid, 1, OnGossipHello)
|
||||
RegisterCreatureGossipEvent(npcid, 2, OnGossipSelect)
|
||||
39
SocketeerV1 .lua
Normal file
39
SocketeerV1 .lua
Normal file
@@ -0,0 +1,39 @@
|
||||
local SocketEnchant = 37430 -- Socket Enchant Item ID
|
||||
local RequiredItem = 17010 -- Fiery Cores ID. Can set this to whatever Item ID.
|
||||
local RequiredAmount = 10 -- Example required Item amount
|
||||
local ExchangeCount = 0 -- Keep track of the number of successful exchanges
|
||||
|
||||
local function OnGossipHello(event, player, creature)
|
||||
player:GossipMenuAddItem(0, "|TInterface\\Icons\\inv_misc_gem_variety_01:50:50:-43:0|tPurchase gem sockets for your gear?", 0, 1) --can change "Fiery Cores" to whatever if you change requireditemid. Same with the dialogue below.
|
||||
player:GossipSendMenu(1, creature)
|
||||
end
|
||||
|
||||
local function OnGossipSelect(event, player, creature, sender, intid, code, menuid)
|
||||
if (intid == 1) then
|
||||
local requiredAmount = RequiredAmount
|
||||
creature:SendUnitSay("Exchanging " .. requiredAmount .. " Fiery Cores for a socket enchant. Are you sure, " .. player:GetName() .. "?", 0)
|
||||
player:GossipMenuAddItem(0, "Yes", 0, 2)
|
||||
player:GossipMenuAddItem(0, "No", 0, 3)
|
||||
player:GossipSendMenu(1, creature)
|
||||
elseif (intid == 2) then
|
||||
if (player:GetItemCount(RequiredItem) >= RequiredAmount) then
|
||||
player:RemoveItem(RequiredItem, RequiredAmount)
|
||||
player:AddItem(SocketEnchant, 1)
|
||||
creature:SendUnitSay("The socket enchant has been added to your inventory.", 0)
|
||||
ExchangeCount = ExchangeCount + 1 -- Increase the number of successful exchanges
|
||||
if (ExchangeCount >= 3) then -- If the number of successful exchanges is 3 or more
|
||||
creature:SendUnitSay("Thanks a bunch! See you next week!", 0)
|
||||
creature:DespawnOrUnsummon(1000) -- Despawn the creature with a 2 second delay
|
||||
end
|
||||
player:GossipComplete()
|
||||
else
|
||||
creature:SendUnitSay("You do not have enough Fiery Cores.", 0)
|
||||
player:GossipComplete()
|
||||
end
|
||||
elseif (intid == 3) then
|
||||
player:GossipComplete()
|
||||
end
|
||||
end
|
||||
|
||||
RegisterCreatureGossipEvent(190015, 1, OnGossipHello)
|
||||
RegisterCreatureGossipEvent(190015, 2, OnGossipSelect)
|
||||
Reference in New Issue
Block a user