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:
37
Boss_Bazzalan.lua
Normal file
37
Boss_Bazzalan.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
--[[
|
||||
EmuDevs <http://emudevs.com/forum.php>
|
||||
Eluna Lua Engine <https://github.com/ElunaLuaEngine/Eluna>
|
||||
Eluna Scripts <https://github.com/ElunaLuaEngine/Scripts>
|
||||
Eluna Wiki <http://wiki.emudevs.com/doku.php?id=eluna>
|
||||
|
||||
-= Script Information =-
|
||||
* Script Type: Boss Fight
|
||||
* Npc: Bazzalan <11519>
|
||||
--]]
|
||||
|
||||
local Bazzalan = {};
|
||||
|
||||
function Bazzalan.OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(Bazzalan.Poison, math.random(3000, 5000), 0)
|
||||
creature:RegisterEvent(Bazzalan.Sinister_Strike, 8000, 0)
|
||||
end
|
||||
|
||||
function Bazzalan.Poison(event, delay, pCall, creature)
|
||||
if (math.random(1, 100) <= 75) then
|
||||
creature:CastSpell(creature:GetVictim(), 744)
|
||||
end
|
||||
end
|
||||
|
||||
function Bazzalan.Sinister_Strike(event, delay, pCall, creature)
|
||||
if (math.random(1, 100) <= 85) then
|
||||
creature:CastSpell(creature:GetVictim(), 14873)
|
||||
end
|
||||
end
|
||||
|
||||
function Bazzalan.Reset(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(11519, 1, Bazzalan.OnEnterCombat)
|
||||
RegisterCreatureEvent(11519, 2, Bazzalan.Reset) -- OnLeaveCombat
|
||||
RegisterCreatureEvent(11519, 4, Bazzalan.Reset) -- OnDied
|
||||
38
Boss_Jergosh.lua
Normal file
38
Boss_Jergosh.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
--[[
|
||||
EmuDevs <http://emudevs.com/forum.php>
|
||||
Eluna Lua Engine <https://github.com/ElunaLuaEngine/Eluna>
|
||||
Eluna Scripts <https://github.com/ElunaLuaEngine/Scripts>
|
||||
Eluna Wiki <http://wiki.emudevs.com/doku.php?id=eluna>
|
||||
|
||||
-= Script Information =-
|
||||
* Script Type: Boss Fight
|
||||
* Npc: Jergosh the Invoker <11518>
|
||||
--]]
|
||||
|
||||
local Jergosh = {};
|
||||
|
||||
function Jergosh.OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(Jergosh.Immolate, 12000, 0)
|
||||
creature:RegisterEvent(Jergosh.Curse_of_Weakness, 30000, 0)
|
||||
end
|
||||
|
||||
function Jergosh.Immolate(event, delay, pCall, creature)
|
||||
if (math.random(1, 100) <= 85) then
|
||||
creature:CastSpell(creature:GetVictim(), 20800)
|
||||
end
|
||||
end
|
||||
|
||||
function Jergosh.Curse_of_Weakness(event, delay, pCall, creature)
|
||||
if (math.random(1, 100) <= 75) then
|
||||
local players = creature:GetPlayersInRange()
|
||||
creature:CastSpell(players[math.random(1, #players)], 11980)
|
||||
end
|
||||
end
|
||||
|
||||
function Jergosh.Reset(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(11518, 1, Jergosh.OnEnterCombat)
|
||||
RegisterCreatureEvent(11518, 2, Jergosh.Reset) -- OnLeaveCombat
|
||||
RegisterCreatureEvent(11518, 4, Jergosh.Reset) -- OnDied
|
||||
30
Boss_Oggleflint.lua
Normal file
30
Boss_Oggleflint.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
--[[
|
||||
EmuDevs <http://emudevs.com/forum.php>
|
||||
Eluna Lua Engine <https://github.com/ElunaLuaEngine/Eluna>
|
||||
Eluna Scripts <https://github.com/ElunaLuaEngine/Scripts>
|
||||
Eluna Wiki <http://wiki.emudevs.com/doku.php?id=eluna>
|
||||
|
||||
-= Script Information =-
|
||||
* Script Type: Boss Fight
|
||||
* Npc: Oggleflint <11517>
|
||||
--]]
|
||||
|
||||
local Oggleflint = {};
|
||||
|
||||
function Oggleflint.OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(Oggleflint.Cleave, 8000, 0)
|
||||
end
|
||||
|
||||
function Oggleflint.Cleave(event, delay, pCall, creature)
|
||||
if (math.random(1, 100) <= 70) then
|
||||
creature:CastSpell(creature:GetVictim(), 40505)
|
||||
end
|
||||
end
|
||||
|
||||
function Oggleflint.Reset(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(11517, 1, Oggleflint.OnEnterCombat)
|
||||
RegisterCreatureEvent(11517, 2, Oggleflint.Reset) -- OnLeaveCombat
|
||||
RegisterCreatureEvent(11517, 4, Oggleflint.Reset) -- OnDied
|
||||
37
Boss_Taragaman.lua
Normal file
37
Boss_Taragaman.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
--[[
|
||||
EmuDevs <http://emudevs.com/forum.php>
|
||||
Eluna Lua Engine <https://github.com/ElunaLuaEngine/Eluna>
|
||||
Eluna Scripts <https://github.com/ElunaLuaEngine/Scripts>
|
||||
Eluna Wiki <http://wiki.emudevs.com/doku.php?id=eluna>
|
||||
|
||||
-= Script Information =-
|
||||
* Script Type: Boss Fight
|
||||
* Npc: Taragaman the Hungerer <11520>
|
||||
--]]
|
||||
|
||||
local Taragaman = {};
|
||||
|
||||
function Taragaman.OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(Taragaman.Uppercut, 5000, 0)
|
||||
creature:RegisterEvent(Taragaman.Fire_Nova, 8000, 0)
|
||||
end
|
||||
|
||||
function Taragaman.Uppercut(event, delay, pCall, creature)
|
||||
if (math.random(1, 100) <= 85) then
|
||||
creature:CastSpell(creature:GetVictim(), 18072)
|
||||
end
|
||||
end
|
||||
|
||||
function Taragaman.Fire_Nova(event, delay, pCall, creature)
|
||||
if (math.random(1, 100) <= 75) then
|
||||
creature:CastSpell(creature:GetVictim(), 11970)
|
||||
end
|
||||
end
|
||||
|
||||
function Taragaman.Reset(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(11520, 1, Taragaman.OnEnterCombat)
|
||||
RegisterCreatureEvent(11520, 2, Taragaman.Reset) -- OnLeaveCombat
|
||||
RegisterCreatureEvent(11520, 4, Taragaman.Reset) -- OnDied
|
||||
60
Custom_XP.lua
Normal file
60
Custom_XP.lua
Normal file
@@ -0,0 +1,60 @@
|
||||
local enabled = true
|
||||
local spawnslist = {2260,14281,14221,2244,2261} -- npcid's
|
||||
local hpmultiplier = 0.85 -- Spawned npc hp will be multiplied by players hp.
|
||||
local despawntime = 25 --seconds before npc despawns
|
||||
local rnumb = false --output rolled number for testing purposes
|
||||
|
||||
local function SpawnEnemy(event, player, killed)
|
||||
|
||||
local x = player:GetX()
|
||||
local y = player:GetY()
|
||||
local z = player:GetZ()
|
||||
local o = player:GetO()
|
||||
local map = player:GetMap()
|
||||
local mapID = map:GetMapId()
|
||||
local areaId = map:GetAreaId( x, y, z )
|
||||
local faction = player:GetFaction()
|
||||
local Target = player:GetSelection()
|
||||
local playername = player:GetName()
|
||||
local isDungeon = map:IsDungeon()
|
||||
local playerHP = player:GetMaxHealth()
|
||||
local spawnedCreature
|
||||
|
||||
local Taunts = {
|
||||
"Hey "..playername.." u r so uglaaaay!!!! LMAO",
|
||||
"Hey "..playername.."! It's game over for you!",
|
||||
"Hey "..playername.." What's up now!?",
|
||||
"Hey "..playername.." Ready when you are!",
|
||||
"Hey "..playername.." You'll get no sympathy from me!",
|
||||
"Victory or Death!!!",
|
||||
""..playername.." is about to cry like a baby.",
|
||||
"Run "..playername.." run!",
|
||||
"Hey "..playername.." whats that on ur head? oh yea my weapon.",
|
||||
"Hey "..playername.." why don't apple jacks taste like apples?"
|
||||
}
|
||||
|
||||
local chosen = spawnslist[math.random(1, #spawnslist)]
|
||||
local healammount = playerHP * hpmultiplier
|
||||
local r = math.random(1,100)
|
||||
local level = player:GetLevel()
|
||||
if r <= 50 and not isDungeon then
|
||||
local EnemyNear = player:GetNearestCreature( 80, chosen )
|
||||
if EnemyNear == nil then
|
||||
spawnedCreature = player:SpawnCreature( chosen, x-5, y, z, o, 3, despawntime )
|
||||
spawnedCreature:SetLevel(level)
|
||||
spawnedCreature:SetMaxHealth(playerHP * hpmultiplier)
|
||||
spawnedCreature:DealHeal( spawnedCreature, 39334, healammount )
|
||||
spawnedCreature:SendUnitSay(Taunts[math.random(1, #Taunts)], 0)
|
||||
spawnedCreature:AttackStart(player)
|
||||
end
|
||||
end
|
||||
|
||||
if rnumb then
|
||||
player:SendBroadcastMessage("|cff3399FF (Randomly Attacked script) number: |cff00cc00"..r.."|cff3399FF")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if enabled then
|
||||
RegisterPlayerEvent(7, SpawnEnemy)
|
||||
end
|
||||
245
Enchanter.lua
Normal file
245
Enchanter.lua
Normal file
@@ -0,0 +1,245 @@
|
||||
-- Made by Foereaper
|
||||
-- Fixed by rochet
|
||||
-- edit by Clotic Updated with Ranged bows and added some other enchants
|
||||
|
||||
local npcid = 60011 -- ID for npc
|
||||
|
||||
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", 151},
|
||||
{"Off-Hand Weapons", 16},
|
||||
{"Shields", 161},
|
||||
{"Ranged", 17}
|
||||
|
||||
},
|
||||
[0] = {
|
||||
-- Headpiece
|
||||
{"Arcanum of Burning Mysteries", 3820, false},
|
||||
{"Arcanum of Blissful Mending", 3819, false},
|
||||
{"Arcanum of the Stalward Protector", 3818, false},
|
||||
{"Arcanum of Torment", 3817, false},
|
||||
{"Arcanum of the Savage Gladiator", 3842, false},
|
||||
{"Arcanum of Triumph", 3795, false},
|
||||
{"Arcanum of Dominance", 3797, false}
|
||||
},
|
||||
[2] = {
|
||||
-- Shoulders
|
||||
{"Inscription of Triumph", 3793, false},
|
||||
{"Inscription of Dominance", 3794, false},
|
||||
{"Greater Inscription of the Gladiator", 3852, false},
|
||||
{"Greater Inscription of the Axe", 3808, false},
|
||||
{"Greater Inscription of the Crag", 3809, false},
|
||||
{"Greater Inscription of the Pinnacle", 3811, false},
|
||||
{"Greater Inscription of the Storm", 3810, false},
|
||||
{"Might of the Scourge", 2717, false},
|
||||
{"Power of the Scourge", 2721, false},
|
||||
{"Zandalar Signet of Might", 2606, false}
|
||||
},
|
||||
[4] = {
|
||||
-- Chest
|
||||
{"Enchant Chest - Powerful Stats", 3832, false},
|
||||
{"Enchant Chest - Super Health", 3297, false},
|
||||
{"Enchant Chest - Greater Mana Restoration", 2381, false},
|
||||
{"Enchant Chest - Exceptional Resilience", 3245, false},
|
||||
{"Enchant Chest - Greater Defense", 1953, false}
|
||||
},
|
||||
[6] = {
|
||||
-- Legs
|
||||
{"Earthen Leg Armor", 3853, false},
|
||||
{"Frosthide Leg Armor", 3822, false},
|
||||
{"Icescale Leg Armor", 3823, false},
|
||||
{"Brilliant Spellthread", 3719, false},
|
||||
{"Sapphire Spellthread", 3721, false}
|
||||
},
|
||||
[7] = {
|
||||
-- Boots
|
||||
{"Greater Assault", 1597, false},
|
||||
{"Tuskars Vitality", 3232, false},
|
||||
{"Superior Agility", 983, false},
|
||||
{"Greater Spirit", 1147, false},
|
||||
{"Greater Vitality", 3244, false},
|
||||
{"Icewalker", 3826, false},
|
||||
{"Greater Fortitude", 1075, false}
|
||||
},
|
||||
[8] = {
|
||||
-- Bracers
|
||||
{"Socket bracers test ", 3717, false},
|
||||
{"Major Stamina", 3850, false},
|
||||
{"Superior Spellpower", 2332, false},
|
||||
{"Greater Assault", 3845, false},
|
||||
{"Major Spirit", 1147, false},
|
||||
{"Expertise", 3231, false},
|
||||
{"Greater Stats", 2661, false},
|
||||
{"Exceptional Intellect", 1119, false}
|
||||
|
||||
},
|
||||
[9] = {
|
||||
-- Gloves
|
||||
{"Socket gloves", 3723, false},
|
||||
{"Riding SKill Increase", 930, false},
|
||||
{"Greater Blasting", 3249, false},
|
||||
{"Armsman", 3253, false},
|
||||
{"Crusher", 1603, false},
|
||||
{"Agility", 3222, false},
|
||||
{"Precision", 3234, false},
|
||||
{"Expertise", 3231, false},
|
||||
{"Exceptional Spellpower", 3246, false}
|
||||
|
||||
},
|
||||
[14] = {
|
||||
-- Cloak
|
||||
{"Shadow Armor", 3256, false},
|
||||
{"Wisdom", 3296, false},
|
||||
{"Titan Weave", 1951, false},
|
||||
{"Greater Speed", 3831, false},
|
||||
{"Mighty Armor", 3294, false},
|
||||
{"Major Agility", 1099, false},
|
||||
{"Spell Piercing", 1262, false}
|
||||
},
|
||||
[15] = {
|
||||
-- Main Hand
|
||||
{"Crusader", 1900, false},
|
||||
{"Titan Guard", 3851, false},
|
||||
{"Accuracy", 3788, false},
|
||||
{"Berserking", 3789, false},
|
||||
{"Black Magic", 3790, false},
|
||||
{"Mighty Spellpower", 3834, false},
|
||||
{"Superior Potency", 3833, false},
|
||||
{"Ice Breaker", 3239, false},
|
||||
{"Lifeward", 3241, false},
|
||||
{"Blood Draining", 3870, false},
|
||||
{"Blade Ward", 3869, false},
|
||||
{"Exceptional Agility", 1103, false},
|
||||
{"Exceptional Spirit", 3844, false},
|
||||
{"Executioner", 3225, false},
|
||||
{"Mongoose", 2673, false},
|
||||
-- Two-Handed
|
||||
{"Massacre", 3827, true},
|
||||
{"Scourgebane", 3247, true},
|
||||
{"Giant Slayer", 3251, true},
|
||||
{"Greater Spellpower", 3854, true}
|
||||
|
||||
},
|
||||
[16] = {
|
||||
-- Offhand
|
||||
{"Titan Guard", 3851, false},
|
||||
{"Accuracy", 3788, false},
|
||||
{"Berserking", 3789, false},
|
||||
{"Black Magic", 3790, false},
|
||||
{"Mighty Spellpower", 3834, false},
|
||||
{"Superior Potency", 3833, false},
|
||||
{"Ice Breaker", 3239, false},
|
||||
{"Lifeward", 3241, false},
|
||||
{"Blood Draining", 3870, false},
|
||||
{"Blade Ward", 3869, false},
|
||||
{"Exceptional Agility", 1103, false},
|
||||
{"Exceptional Spirit", 3844, false},
|
||||
{"Executioner", 3225, false},
|
||||
{"Mongoose", 2673, false},
|
||||
-- Shields
|
||||
{"Defense", 1952, true},
|
||||
{"Greater Intellect", 1128, true},
|
||||
{"Shield Block", 2655, true},
|
||||
{"Resilience", 3229, true},
|
||||
{"Major Stamina", 1071, true},
|
||||
{"Tough Shield", 2653, true},
|
||||
|
||||
},
|
||||
[17] = {
|
||||
--Ranged
|
||||
{"Diamond-cut Refractor Scope", 3843, false},
|
||||
{"Sun Scope", 3607, false},
|
||||
{"Heartseeker Scope", 3608, false}
|
||||
-- {"Khorium Scope", 2723, false}
|
||||
|
||||
}
|
||||
}
|
||||
local pVar = {}
|
||||
|
||||
function Enchanter(event, player, unit)
|
||||
pVar[player:GetName()] = nil
|
||||
|
||||
for _, v in ipairs(T["Menu"]) do
|
||||
player:GossipMenuAddItem(3, "|cFFffffff " .. v[1] .. ".|R", 0, v[2])
|
||||
end
|
||||
player:GossipSendMenu(1, unit)
|
||||
end
|
||||
|
||||
function EnchanterSelect(event, player, unit, sender, intid, code)
|
||||
if (intid < 500) then
|
||||
local ID = intid
|
||||
local f
|
||||
if (intid == 161 or intid == 151) then
|
||||
ID = math.floor(intid / 10)
|
||||
f = true
|
||||
end
|
||||
pVar[player:GetName()] = intid
|
||||
if (T[ID]) then
|
||||
for i, v in ipairs(T[ID]) do
|
||||
if ((not f and not v[3]) or (f and v[3])) then
|
||||
player:GossipMenuAddItem(3, "|cFFffffff " .. v[1] .. ".|R", 0, v[2])
|
||||
end
|
||||
end
|
||||
end
|
||||
player:GossipMenuAddItem(3, "[Back]", 0, 500)
|
||||
player:GossipSendMenu(1, unit)
|
||||
elseif (intid == 500) then
|
||||
Enchanter(event, player, unit)
|
||||
elseif (intid >= 900) then
|
||||
local ID = pVar[player:GetName()]
|
||||
if (ID == 161 or ID == 151) then
|
||||
ID = math.floor(ID / 10)
|
||||
end
|
||||
for k, v in pairs(T[ID]) do
|
||||
if v[2] == intid then
|
||||
local item = player:GetEquippedItemBySlot(ID)
|
||||
if item then
|
||||
if v[3] then
|
||||
local WType = item:GetSubClass()
|
||||
if pVar[player:GetName()] == 151 then
|
||||
if (WType == 1 or WType == 5 or WType == 6 or WType == 8 or WType == 10) then
|
||||
item:ClearEnchantment(0, 0)
|
||||
item:SetEnchantment(intid, 0, 0)
|
||||
else
|
||||
player:SendAreaTriggerMessage("You do not have a Two-Handed Weapon equipped!")
|
||||
end
|
||||
elseif pVar[player:GetName()] == 161 then
|
||||
if (WType == 6) then
|
||||
item:ClearEnchantment(0, 0)
|
||||
item:SetEnchantment(intid, 0, 0)
|
||||
else
|
||||
player:SendAreaTriggerMessage("You do not have a Shield equipped!")
|
||||
end
|
||||
elseif pVar[player:GetName()] == 17 then
|
||||
if (WType == 2 or WType == 3 or Wtype == 18) then
|
||||
item:ClearEnchantment(0, 0)
|
||||
item:SetEnchantment(intid, 0, 0)
|
||||
else
|
||||
player:SendAreaTriggerMessage("You do not have a Ranged equipped!")
|
||||
end
|
||||
end
|
||||
else
|
||||
item:ClearEnchantment(0, 0)
|
||||
item:SetEnchantment(intid, 0, 0)
|
||||
player:CastSpell(player, 36937)
|
||||
end
|
||||
else
|
||||
player:SendAreaTriggerMessage("You have no item to enchant in the selected slot!")
|
||||
end
|
||||
end
|
||||
end
|
||||
EnchanterSelect(event, player, unit, sender, pVar[player:GetName()], nil)
|
||||
end
|
||||
end
|
||||
|
||||
RegisterCreatureGossipEvent(npcid, 1, Enchanter)
|
||||
RegisterCreatureGossipEvent(npcid, 2, EnchanterSelect)
|
||||
12
EventAnnounce.lua
Normal file
12
EventAnnounce.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
local eventRegistered = false
|
||||
|
||||
local function SendWorldAnnouncement(eventid)
|
||||
if eventid == 17 then
|
||||
SendWorldMessage("The Lich King has sent forth his forces to attack the people of Azeroth. Quickly adventurers, defend your cities!")
|
||||
end
|
||||
end
|
||||
|
||||
if not eventRegistered then
|
||||
RegisterServerEvent(17, SendWorldAnnouncement)
|
||||
eventRegistered = true
|
||||
end
|
||||
25
FOEREAPER.lua
Normal file
25
FOEREAPER.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
local npcId = 900003
|
||||
|
||||
local function CastTrample(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 5568, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastTrample, 5000, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:SendUnitYell("Haha, you lose!", 0)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
if(killer:GetObjectType() == "Player") then
|
||||
killer:SendBroadcastMessage("You killed " ..creature:GetName().."!")
|
||||
end
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(npcId, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(npcId, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(npcId, 4, OnDied)
|
||||
35
Gender.lua
Normal file
35
Gender.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
local SwitchGender = {}
|
||||
local MSG_GEN = "#gender"
|
||||
|
||||
local Cost = 0 --This is in copper so the value that is now 100g so 1000000c
|
||||
local Gold = 0 -- Gold value for visual on screen to showup. Can probably improve this later
|
||||
|
||||
local function SwitchGender(event, player, msg, Type, lang)
|
||||
if (msg:find(MSG_GEN)) then
|
||||
local gmRank = player:GetGMRank()
|
||||
if (gmRank <= 0) then -- change number (0-3) 0 - to all 1,2,3 GM with rank
|
||||
player:SendAreaTriggerMessage("You Dont have access to this.")
|
||||
return
|
||||
end
|
||||
|
||||
if player:GetCoinage() >= Cost then
|
||||
else
|
||||
player:SendAreaTriggerMessage("You require" .. Gold .. " Gold")
|
||||
return false
|
||||
end
|
||||
|
||||
player:SetCoinage(player:GetCoinage() - Cost)
|
||||
player:SendAreaTriggerMessage(Gold .. " Gold Been taken")
|
||||
|
||||
if player:GetGender() == 0 then
|
||||
player:SetGender(1)
|
||||
return false
|
||||
end
|
||||
|
||||
if player:GetGender() == 1 then
|
||||
player:SetGender(0)
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
RegisterPlayerEvent(18, SwitchGender)
|
||||
52
Patchqwerktest.lua
Normal file
52
Patchqwerktest.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
local npcId = 400012
|
||||
|
||||
local function OnSpawn(event, creature)
|
||||
local function OnSpawn(event, creature)
|
||||
creature:SendUnitYell("Patchqwerk make Lich King proud! You die now!",0)
|
||||
creature:SetMaxHealth(46664000)
|
||||
end
|
||||
end
|
||||
|
||||
local function PoisonBoltVolley(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 40095, true)
|
||||
end
|
||||
|
||||
local function CastHatefulStrike(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 28308, true)
|
||||
end
|
||||
|
||||
local function CastGore(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 48130, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
local yellOptions = { "Patchqwerk huuuuungry!", "Time for a snack!", "You're mine now!", "You look delicious. Patchqwerk eat you now!", "I not eat in days, time to feast!", "Me smash and eat you now!", "Me so hungry, me eat anything... even you!" }
|
||||
local randomIndex = math.random(1, 7)
|
||||
local selectedYell = yellOptions[randomIndex] --script pulls one dialogue option from above upon entering combat.
|
||||
creature:SendUnitYell(selectedYell, 0)
|
||||
creature:RegisterEvent(PoisonBoltVolley, 10000, 0) --The 0 in creature:RegisterEvent(PoisonBoltVolley, 10000, 0) is the number of times the event will be called. In this case, 0 means the event will be called an unlimited number of times until the creature is killed or leaves combat. If you set it to 1, for example, the event will only be called once and then stop.
|
||||
creature:RegisterEvent(CastHatefulStrike, 15000, 0)
|
||||
creature:RegisterEvent(CastGore, 20000, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature) --Stuff the creature will do upon leaving combat, in this case yell
|
||||
local yellOptions = { "You not so tasty afterall...", "I'll be back for seconds!", "No more play? Too bad...", "Maybe next time you'll taste better!","Me still hungry, come back later!","You not enough food, me go find more!" }
|
||||
local randomIndex = math.random(1, 6)
|
||||
local selectedYell = yellOptions[randomIndex]
|
||||
creature:SendUnitYell(selectedYell, 0)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer) --OnDied is a function that is triggered when the creature dies. Creature sends Yell and broadcast message. If the killer is a player, it sends a broadcast message to the player with the text "You killed <creature name>!". The function also removes all registered events.
|
||||
creature:SendUnitYell("Patchqwerk forget to chew...", 0)
|
||||
if(killer:GetObjectType() == "Player") then
|
||||
killer:SendBroadcastMessage("You killed " ..creature:GetName().."!")
|
||||
end
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(npcId, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(npcId, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(npcId, 4, OnDied)
|
||||
RegisterCreatureEvent(npcId, 5, OnSpawn)
|
||||
|
||||
120
Playtime_Reward.lua
Normal file
120
Playtime_Reward.lua
Normal file
@@ -0,0 +1,120 @@
|
||||
local enabled = true
|
||||
local PlayedTimeInterval = 30 --minutes
|
||||
local MoneyReward = 10000 -- COPPER (100 Copper = 1 Silver| 100 Silver = 1 Gold) 10000 Copper = 1 gold
|
||||
local HonorReward = 150 -- Honor points to reward
|
||||
local ArenaReward = 25 -- Arena points to reward
|
||||
local ItemReward = 0 -- Itemid if 0 then no item given
|
||||
local ItemRewardCount = 1 -- How many of the item to reward.
|
||||
|
||||
local playtime
|
||||
local timerPR = PlayedTimeInterval * 60000
|
||||
|
||||
local function OnLoad(event)
|
||||
|
||||
local intervaltime = PlayedTimeInterval
|
||||
local hours = 0
|
||||
local minutes = 0
|
||||
local timestring
|
||||
|
||||
if PlayedTimeInterval >= 60 then
|
||||
hours = intervaltime/60
|
||||
minutes = intervaltime%60
|
||||
timestring = ""..math.floor(hours).."|cff3399FF hour and |cff00cc00"..math.floor(minutes).."|cff3399FF minutes"
|
||||
end
|
||||
|
||||
if PlayedTimeInterval < 60 then
|
||||
minutes = intervaltime%60
|
||||
timestring = ""..math.floor(minutes).." minutes"
|
||||
end
|
||||
|
||||
SendWorldMessage("|cff3399FF Playtime Reward active and interval set to |cff00cc00"..timestring.."|cff3399FF .")
|
||||
|
||||
end
|
||||
|
||||
local function REWARD(eventid, delay, repeats, player)
|
||||
local gold = 0
|
||||
local silver = 0
|
||||
local copper = 0
|
||||
|
||||
if MoneyReward >= 10000 then
|
||||
number = MoneyReward
|
||||
gold = number/10000
|
||||
number = number%10000
|
||||
silver = number/100
|
||||
copper = number%100
|
||||
end
|
||||
|
||||
if MoneyReward > 100 and MoneyReward < 10000 then
|
||||
number = MoneyReward
|
||||
silver = number/100
|
||||
copper = number%100
|
||||
end
|
||||
|
||||
if MoneyReward <= 100 then
|
||||
copper = MoneyReward
|
||||
end
|
||||
|
||||
local rewardstring = ""..math.floor(gold).."|c00FFFF00g|cff3399FF"..math.floor(silver).."|cFFFFFFFFs|cff3399FF"..math.floor(copper).."|cFFcc0000c"
|
||||
|
||||
|
||||
if player:GetTotalPlayedTime() >= (playtime + timerPR/1000) then
|
||||
|
||||
if MoneyReward > 0 then
|
||||
player:ModifyMoney( MoneyReward )
|
||||
player:SendBroadcastMessage("|cff3399FF You received "..rewardstring.."|cff3399FF as a Playtime Reward.")
|
||||
end
|
||||
|
||||
if HonorReward > 0 then
|
||||
player:ModifyHonorPoints( HonorReward )
|
||||
player:SendBroadcastMessage("|cff3399FF You received |cff00cc00"..HonorReward.."|cff3399FF Honor Points as a Playtime Reward.")
|
||||
end
|
||||
|
||||
if ArenaReward > 0 then
|
||||
player:ModifyArenaPoints( ArenaReward )
|
||||
player:SendBroadcastMessage("|cff3399FF You received |cff00cc00"..ArenaReward.."|cff3399FF Arena Points as a Playtime Reward.")
|
||||
end
|
||||
|
||||
if ItemReward > 0 then
|
||||
local Item = player:AddItem( ItemReward, ItemRewardCount )
|
||||
local itemname = Item:GetName()
|
||||
player:SendBroadcastMessage("|cff3399FF You received |c00FFFF00"..ItemRewardCount.."|cff3399FFx |cff00cc00"..itemname.."|cff3399FF as a Playtime Reward.")
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
playtime = player:GetTotalPlayedTime()
|
||||
end
|
||||
|
||||
local function DINKLEDORK (eventid, delay, repeats, player)
|
||||
playtime = player:GetTotalPlayedTime()
|
||||
player:RegisterEvent(REWARD, timerPR, 0, player)
|
||||
player:SendBroadcastMessage("|cff3399FF Playtime Reward active and interval set to |cff00cc00"..PlayedTimeInterval.."|cff3399FF minutes.")
|
||||
|
||||
end
|
||||
|
||||
local firstlogin = true
|
||||
|
||||
|
||||
local function OnFirstLogin(event, player)
|
||||
|
||||
if event == 30 then
|
||||
firstlogin = true
|
||||
player:RegisterEvent(DINKLEDORK, 10000, 1, player)
|
||||
player:SendBroadcastMessage("|cff3399FF Playtime Reward active and interval set to |cff00cc00"..PlayedTimeInterval.."|cff3399FF minutes.")
|
||||
end
|
||||
end
|
||||
|
||||
local function OnLogin(event, player)
|
||||
if not firstlogin then
|
||||
player:RegisterEvent(DINKLEDORK, 10000, 1, player)
|
||||
player:SendBroadcastMessage("|cff3399FF Playtime Reward active and interval set to |cff00cc00"..PlayedTimeInterval.."|cff3399FF minutes.")
|
||||
else
|
||||
firstlogin = true
|
||||
end
|
||||
end
|
||||
|
||||
if enabled then
|
||||
RegisterPlayerEvent(30, OnFirstLogin)
|
||||
RegisterPlayerEvent(3, OnLogin)
|
||||
RegisterServerEvent(33, OnLoad)
|
||||
end
|
||||
56
Random-AttackTest1.lua
Normal file
56
Random-AttackTest1.lua
Normal file
@@ -0,0 +1,56 @@
|
||||
local enabled = true
|
||||
local spawnslist = {2260,14281,14221,2244,2261} -- npcid's
|
||||
local hpmultiplier = 0.85 -- Spawned npc hp will be multiplied by players hp.
|
||||
local despawntime = 25 --seconds before npc despawns
|
||||
local chance = 50 --percent chance to trigger
|
||||
|
||||
local function SpawnEnemy(event, player)
|
||||
|
||||
local x = player:GetX()
|
||||
local y = player:GetY()
|
||||
local z = player:GetZ()
|
||||
local o = player:GetO()
|
||||
local map = player:GetMap()
|
||||
local mapID = map:GetMapId()
|
||||
local areaId = map:GetAreaId( x, y, z )
|
||||
local faction = player:GetFaction()
|
||||
local Target = player:GetSelection()
|
||||
local playername = player:GetName()
|
||||
local isDungeon = map:IsDungeon()
|
||||
local playerHP = player:GetMaxHealth()
|
||||
local spawnedCreature
|
||||
|
||||
local Taunts = {
|
||||
"Hey "..playername.." u r so uglaaaay!!!! LMAO",
|
||||
"Hey "..playername.."! It's game over for you!",
|
||||
"Hey "..playername.." What's up now!?",
|
||||
"Hey "..playername.." Ready when you are!",
|
||||
"Hey "..playername.." You'll get no sympathy from me!",
|
||||
"Victory or Death!!!",
|
||||
""..playername.." is about to cry like a baby.",
|
||||
"Run "..playername.." run!",
|
||||
"Hey "..playername.." whats that on ur head? oh yea my weapon.",
|
||||
"Hey "..playername.." why don't apple jacks taste like apples?"
|
||||
}
|
||||
|
||||
local chosen = spawnslist[math.random(1, #spawnslist)]
|
||||
local healammount = playerHP * hpmultiplier
|
||||
local roll = math.random(1,100)
|
||||
local level = player:GetLevel()
|
||||
if roll <= chance and not isDungeon then
|
||||
local EnemyNear = player:GetNearestCreature( 80, chosen )
|
||||
if EnemyNear == nil then
|
||||
spawnedCreature = player:SpawnCreature( chosen, x-5, y, z, o, 3, despawntime )
|
||||
spawnedCreature:SetLevel(level)
|
||||
spawnedCreature:SetMaxHealth(playerHP * hpmultiplier)
|
||||
spawnedCreature:DealHeal( spawnedCreature, 39334, healammount )
|
||||
spawnedCreature:SendUnitSay(Taunts[math.random(1, #Taunts)], 0)
|
||||
spawnedCreature:AttackStart(player)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if enabled then
|
||||
RegisterPlayerEvent(7, SpawnEnemy)
|
||||
end
|
||||
38
SW-Guard.lua
Normal file
38
SW-Guard.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
local npcId = 400014 --ID from creature_template
|
||||
|
||||
local dialogues = {
|
||||
"Defend our lands with all you've got!",
|
||||
"Victory is ours, if we stand together!",
|
||||
"We are the shield that protects our people!",
|
||||
"Show no mercy to those who would harm us!",
|
||||
"Justice for our fallen!",
|
||||
"Stand firm, for the future of our kingdom!",
|
||||
"Today, we fight for everything we hold dear!",
|
||||
"Let our enemies know that we will not be broken!",
|
||||
"With honor and bravery, we will triumph!",
|
||||
"We will not bow down to tyranny!",
|
||||
"Rise up and defend our way of life!",
|
||||
"In the face of danger, we stand strong!",
|
||||
"For our families, for our friends, we fight!",
|
||||
"Our cause is just, our resolve unbreakable!",
|
||||
"Glory awaits those who face the fray!",
|
||||
"No quarter for the enemy!",
|
||||
"Hold the line, for the sake of all!",
|
||||
"Today, we make history with our bravery!",
|
||||
"The battle is upon us!",
|
||||
"We fight for the defense of our homeland!",
|
||||
"Make them pay for every inch they gain!",
|
||||
"For the Alliance!",
|
||||
"Ready yourselves for battle!",
|
||||
"Prepare yourselves for the oncoming assault!",
|
||||
"Steady yourselves, men. A terrible enemy approaches!",
|
||||
"Don't let the enemy make it to the castle!"
|
||||
}
|
||||
|
||||
local function OnSpawn(event, creature)
|
||||
local randomDialogue = dialogues[math.random(26)]
|
||||
creature:SendUnitYell(randomDialogue,0)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(npcId, 5, OnSpawn)
|
||||
|
||||
21
SW-GuardCleave.lua
Normal file
21
SW-GuardCleave.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
local npcId = 400013
|
||||
|
||||
local function CastCleave(eventId, delay, calls, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 20677, true)
|
||||
end
|
||||
|
||||
local function OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(CastCleave, 5000, 0)
|
||||
end
|
||||
|
||||
local function OnLeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
local function OnDied(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(npcId, 1, OnEnterCombat)
|
||||
RegisterCreatureEvent(npcId, 2, OnLeaveCombat)
|
||||
RegisterCreatureEvent(npcId, 4, OnDied)
|
||||
29
ScourgeBuffs.lua
Normal file
29
ScourgeBuffs.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
local NPC_ID = 35200 -- replace with the NPC's ID
|
||||
local BLESSING_SPELL_ID = 100003 -- replace with the first spell ID
|
||||
local SOULSTONE_SPELL_ID = 20707 -- replace with the second spell ID
|
||||
|
||||
local function OnGossipHello(event, player, creature)
|
||||
player:GossipMenuAddItem(9, "Receive the King's blessing", 0, 1, false, "", 0)
|
||||
player:GossipMenuAddItem(9, "Receive a Soulstone", 0, 2, false, "", 0)
|
||||
player:GossipSendMenu(1, creature)
|
||||
end
|
||||
|
||||
local function OnGossipSelect(event, player, creature, sender, intid, code, menuid)
|
||||
if intid == 1 then
|
||||
player:CastSpell(player, BLESSING_SPELL_ID, true)
|
||||
elseif intid == 2 then
|
||||
player:CastSpell(player, SOULSTONE_SPELL_ID, true)
|
||||
end
|
||||
player:GossipComplete()
|
||||
end
|
||||
|
||||
local function YellDialogue(event, creature)
|
||||
creature:SendUnitYell("Adventurers, do not go unprepared! Come speak with me and I will grant you a blessing!", 0)
|
||||
end
|
||||
|
||||
RegisterCreatureGossipEvent(NPC_ID, 1, OnGossipHello)
|
||||
RegisterCreatureGossipEvent(NPC_ID, 2, OnGossipSelect)
|
||||
|
||||
-- triggers the yell function on spawn
|
||||
RegisterCreatureEvent(NPC_ID, 5, function(event, creature) YellDialogue(event, creature) end)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
-- Table to store NPC IDs for group 1
|
||||
local npcIds1 = {
|
||||
8541,
|
||||
10417,
|
||||
@@ -10,7 +9,10 @@ local npcIds1 = {
|
||||
10487,
|
||||
1788,
|
||||
10414,
|
||||
10407
|
||||
10407,
|
||||
400010,
|
||||
400011,
|
||||
400015
|
||||
}
|
||||
|
||||
-- Table to store NPC IDs for group 2
|
||||
@@ -22,49 +24,8 @@ local npcIds2 = {
|
||||
466,
|
||||
}
|
||||
|
||||
-- Function to be executed when an NPC from group 1 is spawned
|
||||
local function CastSpellOnSpawnGroup1(event, creature)
|
||||
if not creature then
|
||||
print("Error: creature was not set!")
|
||||
return
|
||||
end
|
||||
|
||||
local originalLevel = creature:GetLevel()
|
||||
local randomLevel = math.random(25, 30)
|
||||
local levelDiff = originalLevel - randomLevel
|
||||
|
||||
local spellId = 28234
|
||||
creature:SetLevel(randomLevel)
|
||||
creature:SetMaxHealth(creature:GetMaxHealth() * (1 - levelDiff * 0.015))
|
||||
creature:SetHealth(creature:GetMaxHealth())
|
||||
creature:CastSpell(creature, spellId, true) -- minion visual
|
||||
end
|
||||
|
||||
-- Function to be executed when an NPC from group 2 is spawned
|
||||
local function CastSpellOnSpawnGroup2(event, creature)
|
||||
if not creature then-- Table to store NPC IDs for group 1-- Table to store NPC IDs for group 1
|
||||
local npcIds1 = {
|
||||
8541,
|
||||
10417,
|
||||
4475,
|
||||
11873,
|
||||
8531,
|
||||
11551,
|
||||
10488,
|
||||
10487,
|
||||
1788,
|
||||
10414,
|
||||
10407
|
||||
}
|
||||
|
||||
-- Table to store NPC IDs for group 2
|
||||
local npcIds2 = {
|
||||
400013,
|
||||
400014,
|
||||
68,
|
||||
1976,
|
||||
466,
|
||||
}
|
||||
-- Boolean to enable or disable modifying health and level
|
||||
local modifyHealthAndLevel = false
|
||||
|
||||
-- Function to be executed when an NPC from group 1 is spawned
|
||||
local function CastSpellOnSpawnGroup1(event, creature)
|
||||
@@ -73,6 +34,7 @@ print("Error: creature was not set!")
|
||||
return
|
||||
end
|
||||
|
||||
if modifyHealthAndLevel then
|
||||
local originalLevel = creature:GetLevel()
|
||||
local randomLevel = math.random(25, 30)
|
||||
local levelDiff = originalLevel - randomLevel
|
||||
@@ -80,6 +42,7 @@ local levelDiff = originalLevel - randomLevel
|
||||
creature:SetLevel(randomLevel)
|
||||
creature:SetMaxHealth(creature:GetMaxHealth() * (1 - levelDiff * 0.015))
|
||||
creature:SetHealth(creature:GetMaxHealth())
|
||||
end
|
||||
|
||||
local spellId = 28234
|
||||
creature:CastSpell(creature, spellId, true) -- minion visual
|
||||
@@ -92,6 +55,7 @@ print("Error: creature was not set!")
|
||||
return
|
||||
end
|
||||
|
||||
if modifyHealthAndLevel then
|
||||
local originalLevel = creature:GetLevel()
|
||||
local randomLevel = math.random(25, 30)
|
||||
local levelDiff = originalLevel - randomLevel
|
||||
@@ -99,6 +63,7 @@ local levelDiff = originalLevel - randomLevel
|
||||
creature:SetLevel(randomLevel)
|
||||
creature:SetMaxHealth(creature:GetMaxHealth() * (1 - levelDiff * 0.015))
|
||||
creature:SetHealth(creature:GetMaxHealth())
|
||||
end
|
||||
|
||||
local spellId = 100133
|
||||
creature:CastSpell(creature, spellId, true) -- rez visual
|
||||
@@ -122,108 +87,4 @@ end
|
||||
for _, npcId in ipairs(npcIds2) do
|
||||
RegisterCreatureEvent(npcId, 5, CastSpellOnSpawnGroup2)
|
||||
RegisterCreatureEvent(npcId, 21, CastSpellOnLeaveCombat)
|
||||
end
|
||||
local npcIds1 = {
|
||||
8541,
|
||||
10417,
|
||||
4475,
|
||||
11873,
|
||||
8531,
|
||||
11551,
|
||||
10488,
|
||||
10487,
|
||||
1788,
|
||||
10414,
|
||||
10407
|
||||
}
|
||||
|
||||
-- Table to store NPC IDs for group 2
|
||||
local npcIds2 = {
|
||||
400013,
|
||||
400014,
|
||||
68,
|
||||
1976,
|
||||
466,
|
||||
}
|
||||
|
||||
-- Function to be executed when an NPC from group 1 is spawned
|
||||
local function CastSpellOnSpawnGroup1(event, creature)
|
||||
if not creature then
|
||||
print("Error: creature was not set!")
|
||||
return
|
||||
end
|
||||
|
||||
local originalLevel = creature:GetLevel()
|
||||
local randomLevel = math.random(25, 30)
|
||||
local levelDiff = originalLevel - randomLevel
|
||||
|
||||
creature:SetLevel(randomLevel)
|
||||
creature:SetMaxHealth(creature:GetMaxHealth() * (1 - levelDiff * 0.015))
|
||||
creature:SetHealth(creature:GetMaxHealth())
|
||||
|
||||
local spellId = 28234
|
||||
creature:CastSpell(creature, spellId, true) -- minion visual
|
||||
end
|
||||
|
||||
-- Function to be executed when an NPC from group 2 is spawned
|
||||
local function CastSpellOnSpawnGroup2(event, creature)
|
||||
if not creature then
|
||||
print("Error: creature was not set!")
|
||||
return
|
||||
end
|
||||
|
||||
local originalLevel = creature:GetLevel()
|
||||
local randomLevel = math.random(25, 30)
|
||||
local levelDiff = originalLevel - randomLevel
|
||||
|
||||
creature:SetLevel(randomLevel)
|
||||
creature:SetMaxHealth(creature:GetMaxHealth() * (1 - levelDiff * 0.015))
|
||||
creature:SetHealth(creature:GetMaxHealth())
|
||||
|
||||
local spellId = 100133
|
||||
creature:CastSpell(creature, spellId, true) -- rez visual
|
||||
end
|
||||
|
||||
-- Function to be executed when an NPC from both groups leaves combat
|
||||
local function CastSpellOnLeaveCombat(event, creature)
|
||||
if not creature then
|
||||
print("Error: creature was not set!")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- Register the event for NPCs in group 1
|
||||
for _, npcId in ipairs(npcIds1) do
|
||||
RegisterCreatureEvent(npcId, 5, CastSpellOnSpawnGroup1)
|
||||
RegisterCreatureEvent(npcId, 21, CastSpellOnLeaveCombat)
|
||||
end
|
||||
|
||||
-- Register the event for NPCs in group 2
|
||||
for _, npcId in ipairs(npcIds2) do
|
||||
RegisterCreatureEvent(npcId, 5, CastSpellOnSpawnGroup2)
|
||||
RegisterCreatureEvent(npcId, 21, CastSpellOnLeaveCombat)
|
||||
end
|
||||
print("Error: creature was not set!")
|
||||
return
|
||||
end
|
||||
|
||||
local originalLevel = creature:GetLevel()
|
||||
local randomLevel = math.random(25, 30)
|
||||
local levelDiff = originalLevel - randomLevel
|
||||
|
||||
local spellId = 100133
|
||||
creature:SetLevel(randomLevel)
|
||||
creature:SetMaxHealth(creature:GetMaxHealth() * (1 - levelDiff * 0.015))
|
||||
creature:SetHealth(creature:GetMaxHealth())
|
||||
creature:CastSpell(creature, spellId, true) -- rez visual
|
||||
end
|
||||
|
||||
-- Register the event for NPCs in group 1
|
||||
for _, npcId in ipairs(npcIds1) do
|
||||
RegisterCreatureEvent(npcId, 5, CastSpellOnSpawnGroup1)
|
||||
end
|
||||
|
||||
-- Register the event for NPCs in group 2
|
||||
for _, npcId in ipairs(npcIds2) do
|
||||
RegisterCreatureEvent(npcId, 5, CastSpellOnSpawnGroup2)
|
||||
end
|
||||
end
|
||||
30
Trash_Earthborer.lua
Normal file
30
Trash_Earthborer.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
--[[
|
||||
EmuDevs <http://emudevs.com/forum.php>
|
||||
Eluna Lua Engine <https://github.com/ElunaLuaEngine/Eluna>
|
||||
Eluna Scripts <https://github.com/ElunaLuaEngine/Scripts>
|
||||
Eluna Wiki <http://wiki.emudevs.com/doku.php?id=eluna>
|
||||
|
||||
-= Script Information =-
|
||||
* Script Type: Trash Mob
|
||||
* Npc: Earthborer <11320>
|
||||
--]]
|
||||
|
||||
local Earthborer = {};
|
||||
|
||||
function Earthborer.OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(Earthborer.Earthborer_Acid, 6000, 0)
|
||||
end
|
||||
|
||||
function Earthborer.Earthborer_Acid(event, delay, pCall, creature)
|
||||
if (math.random(1, 100) <= 70) then
|
||||
creature:CastSpell(creature:GetVictim(), 18070)
|
||||
end
|
||||
end
|
||||
|
||||
function Earthborer.Reset(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(11320, 1, Earthborer.OnEnterCombat)
|
||||
RegisterCreatureEvent(11320, 2, Earthborer.Reset) -- OnLeaveCombat
|
||||
RegisterCreatureEvent(11320, 4, Earthborer.Reset) -- OnDied
|
||||
28
Trash_RagefireTrogg.lua
Normal file
28
Trash_RagefireTrogg.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
--[[
|
||||
EmuDevs <http://emudevs.com/forum.php>
|
||||
Eluna Lua Engine <https://github.com/ElunaLuaEngine/Eluna>
|
||||
Eluna Scripts <https://github.com/ElunaLuaEngine/Scripts>
|
||||
Eluna Wiki <http://wiki.emudevs.com/doku.php?id=eluna>
|
||||
|
||||
-= Script Information =-
|
||||
* Script Type: Trash Mob
|
||||
* Npc: Ragefire Trogg <11318>
|
||||
--]]
|
||||
|
||||
local Ragefire_Trogg = {};
|
||||
|
||||
function Ragefire_Trogg.OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(Ragefire_Trogg.Strike, 5000, 0)
|
||||
end
|
||||
|
||||
function Ragefire_Trogg.Strike(event, delay, pCall, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 11976)
|
||||
end
|
||||
|
||||
function Ragefire_Trogg.Reset(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(11318, 1, Ragefire_Trogg.OnEnterCombat)
|
||||
RegisterCreatureEvent(11318, 2, Ragefire_Trogg.Reset) -- OnLeaveCombat
|
||||
RegisterCreatureEvent(11318, 4, Ragefire_Trogg.Reset) -- OnDied
|
||||
31
Trash_SearingBlaceCultist.lua
Normal file
31
Trash_SearingBlaceCultist.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
--[[
|
||||
EmuDevs <http://emudevs.com/forum.php>
|
||||
Eluna Lua Engine <https://github.com/ElunaLuaEngine/Eluna>
|
||||
Eluna Scripts <https://github.com/ElunaLuaEngine/Scripts>
|
||||
Eluna Wiki <http://wiki.emudevs.com/doku.php?id=eluna>
|
||||
|
||||
-= Script Information =-
|
||||
* Script Type: Trash Mob
|
||||
* Npc: Searing Blade Cultist <11322>
|
||||
--]]
|
||||
|
||||
local Searing_Blade_Cultist = {};
|
||||
|
||||
function Searing_Blade_Cultist.OnEnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(Searing_Blade_Cultist.Curse_of_Agony, 12000, 0)
|
||||
end
|
||||
|
||||
function Searing_Blade_Cultist.Curse_of_Agony(event, delay, pCall, creature)
|
||||
if (math.random(1, 100) <= 85) then
|
||||
local players = creature:GetPlayersInRange()
|
||||
creature:CastSpell(players[math.random(1, #players)], 18266)
|
||||
end
|
||||
end
|
||||
|
||||
function Searing_Blade_Cultist.Reset(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(11322, 1, Searing_Blade_Cultist.OnEnterCombat)
|
||||
RegisterCreatureEvent(11322, 2, Searing_Blade_Cultist.Reset) -- OnLeaveCombat
|
||||
RegisterCreatureEvent(11322, 4, Searing_Blade_Cultist.Reset) -- OnDied
|
||||
195
Weapon_Visual_Style.lua
Normal file
195
Weapon_Visual_Style.lua
Normal file
@@ -0,0 +1,195 @@
|
||||
-- Enchant display (Visual) system for weapons:
|
||||
-- First create the database, the SQL is provided below. After that import script, reload eluna. And type in game ''enchant'' to open menu. Enjoy
|
||||
-- Created by: Poszer
|
||||
|
||||
--[[
|
||||
-- SQL:
|
||||
CREATE TABLE `custom_item_enchant_visuals` (
|
||||
`iguid` INT(10) UNSIGNED NOT NULL COMMENT 'item DB guid',
|
||||
`display` INT(10) UNSIGNED NOT NULL COMMENT 'enchantID',
|
||||
PRIMARY KEY (`iguid`)
|
||||
)
|
||||
COMMENT='stores the enchant IDs for the visuals'
|
||||
COLLATE='latin1_swedish_ci'
|
||||
ENGINE=InnoDB;
|
||||
]]
|
||||
|
||||
-- script variables:
|
||||
local EQUIPMENT_SLOT_MAINHAND = 15
|
||||
local EQUIPMENT_SLOT_OFFHAND = 16
|
||||
local PLAYER_VISIBLE_ITEM_1_ENCHANTMENT = 284
|
||||
local PERM_ENCHANTMENT_SLOT = 0
|
||||
local DD = {}
|
||||
|
||||
-- functions
|
||||
local LoadDB, setVisual, applyVisuals, LOGOUT, LOGIN
|
||||
|
||||
function LoadDB()
|
||||
DD = {}
|
||||
CharDBQuery("DELETE FROM custom_item_enchant_visuals WHERE NOT EXISTS(SELECT 1 FROM item_instance WHERE custom_item_enchant_visuals.iguid = item_instance.guid)")
|
||||
local Q = CharDBQuery("SELECT iguid, display FROM custom_item_enchant_visuals")
|
||||
if(Q) then
|
||||
repeat
|
||||
local iguid, display = Q:GetUInt32(0), Q:GetUInt32(1)
|
||||
DD[iguid] = display
|
||||
until not Q:NextRow()
|
||||
end
|
||||
end
|
||||
LoadDB()
|
||||
|
||||
function setVisual(player, item, display)
|
||||
if(not player or not item or not item:IsEquipped()) then return false end
|
||||
local iguid = item:GetGUIDLow()
|
||||
if(not display) then
|
||||
if(not DD[iguid]) then return false end
|
||||
display = DD[iguid]
|
||||
elseif(display ~= 0) then
|
||||
CharDBExecute("REPLACE INTO custom_item_enchant_visuals (iguid, display) VALUES ("..iguid..", "..display..")")
|
||||
DD[iguid] = display
|
||||
end
|
||||
if(display == 0) then
|
||||
display = item:GetEnchantmentId(PERM_ENCHANTMENT_SLOT) or 0
|
||||
if(DD[iguid]) then
|
||||
CharDBExecute("DELETE FROM custom_item_enchant_visuals WHERE iguid = "..iguid)
|
||||
DD[iguid] = nil
|
||||
end
|
||||
end
|
||||
player:SetUInt16Value(PLAYER_VISIBLE_ITEM_1_ENCHANTMENT + (item:GetSlot() * 2), 0, display)
|
||||
return true
|
||||
end
|
||||
|
||||
function applyVisuals(player)
|
||||
if(not player) then return end
|
||||
for i = EQUIPMENT_SLOT_MAINHAND, EQUIPMENT_SLOT_OFFHAND do
|
||||
setVisual(player, player:GetItemByPos(255, i))
|
||||
end
|
||||
end
|
||||
|
||||
function LOGIN(event, player)
|
||||
applyVisuals(player)
|
||||
end
|
||||
|
||||
RegisterPlayerEvent(3, LOGIN)
|
||||
RegisterPlayerEvent(29, function(e,p,i,b,s) setVisual(p, i) end)
|
||||
|
||||
-- Enchant display gossip:
|
||||
|
||||
-- Enchant IDs and their names
|
||||
local E = {
|
||||
{0, "Reset"},
|
||||
{3789, "Berserking"},
|
||||
{3854, "Spell Power"},
|
||||
{3273, "Deathfrost"},
|
||||
{3225, "Executioner"},
|
||||
{3870, "Blood Draining"},
|
||||
{1899, "Unholy Weapon"},
|
||||
{2674, "Spellsurge"},
|
||||
{2675, "Battlemaster"},
|
||||
{2671, "Arcane and Fire Spell Power"},
|
||||
{2672, "Shadow and Frost Spell Power"},
|
||||
{3365, "Rune of Swordshattering"},
|
||||
{2673, "Mongoose"},
|
||||
{2343, "Spell Power"},
|
||||
{425, "Black Temple Dummy"},
|
||||
{3855, "Spell Power"},
|
||||
{1894, "Icy Weapon"},
|
||||
{1103, "Agility"},
|
||||
{1898, "Lifestealing"},
|
||||
{3345, "Earthliving 1"},
|
||||
{1743, "MHTest02"},
|
||||
{3093, "Attack Power vs Undead and Demons"},
|
||||
{1900, "Crusader"},
|
||||
{3846, "Spell Power"},
|
||||
{1606, "Attack Power"},
|
||||
{283, "Windfury 1"},
|
||||
{1, "Rockbiter 3"},
|
||||
{3265, "Blessed Weapon Coating"},
|
||||
{2, "Frostbrand 1"},
|
||||
{3, "Flametongue 3"},
|
||||
{3266, "Righteous Weapon Coating"},
|
||||
{1903, "Spirit"},
|
||||
{13, "Sharpened (+3 Damage)"},
|
||||
{26, "Frost Oil"},
|
||||
{7, "Deadly Poison"},
|
||||
{803, "Fiery Weapon"},
|
||||
{1896, "Weapon Damage"},
|
||||
{2666, "Intellect"},
|
||||
{25, "Shadow Oil"},
|
||||
}
|
||||
|
||||
-- script variables:
|
||||
local chatCommand = "enchant"
|
||||
local maxGossipItems = 14 -- per page
|
||||
local menu_id = 123
|
||||
|
||||
local safeGossipItems = 100 -- main menu: sender = safeGossipItems-1
|
||||
local EQUIPMENT_SLOT_MAINHAND = 15
|
||||
local EQUIPMENT_SLOT_OFFHAND = 16
|
||||
local D = {}
|
||||
|
||||
-- functions:
|
||||
local showItems, HELLO, SELECT, CHAT
|
||||
|
||||
function showItems(player, unit, offset)
|
||||
local temp = (maxGossipItems)*offset+1
|
||||
for i = temp, temp+maxGossipItems-1 do
|
||||
local v = E[i]
|
||||
if(not v) then break end
|
||||
player:GossipMenuAddItem(9, v[2], safeGossipItems+offset, v[1]+1)
|
||||
end
|
||||
if(temp+maxGossipItems-1 < #E) then
|
||||
player:GossipMenuAddItem(7, "Next..", safeGossipItems+offset+1, 0)
|
||||
end
|
||||
player:GossipMenuAddItem(7, "Back..", safeGossipItems+offset-1, 0)
|
||||
player:GossipSendMenu(100, unit, menu_id)
|
||||
end
|
||||
|
||||
function HELLO(event, player, unit)
|
||||
player:GossipMenuAddItem(9, "Main hand", 0, EQUIPMENT_SLOT_MAINHAND)
|
||||
player:GossipMenuAddItem(9, "Off hand", 0, EQUIPMENT_SLOT_OFFHAND)
|
||||
player:GossipSendMenu(100, unit, menu_id)
|
||||
end
|
||||
|
||||
function CHAT(event, player, msg, Type, lang)
|
||||
if(msg == chatCommand) then
|
||||
player:GossipClearMenu()
|
||||
HELLO(1, player, player)
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function SELECT(event, player, unit, sender, action, code)
|
||||
local guid = player:GetGUIDLow()
|
||||
if(not D[guid]) then
|
||||
D[guid] = {}
|
||||
end
|
||||
if(sender == safeGossipItems-1 and action == 0) then
|
||||
HELLO(event, player, unit)
|
||||
elseif(sender >= safeGossipItems) then
|
||||
if(action ~= 0) then
|
||||
D[guid].display = action-1
|
||||
if(D[guid].slot and D[guid].display) then
|
||||
local item = player:GetItemByPos(255, D[guid].slot)
|
||||
if(not item) then
|
||||
player:SendNotification("No item equipped in selected slot")
|
||||
else
|
||||
setVisual(player, item, D[guid].display)
|
||||
end
|
||||
end
|
||||
end
|
||||
showItems(player, unit, sender-safeGossipItems)
|
||||
elseif(sender == 0) then
|
||||
D[guid].slot = action
|
||||
showItems(player, unit, 0)
|
||||
else
|
||||
player:GossipCloseMenu()
|
||||
end
|
||||
end
|
||||
|
||||
function LOGOUT(event, player)
|
||||
D[player:GetGUIDLow()] = nil
|
||||
end
|
||||
|
||||
RegisterPlayerEvent(4, LOGOUT)
|
||||
RegisterPlayerEvent(18, CHAT)
|
||||
RegisterPlayerGossipEvent(menu_id, 2, SELECT)
|
||||
78
boss_kruul.lua
Normal file
78
boss_kruul.lua
Normal file
@@ -0,0 +1,78 @@
|
||||
--[[
|
||||
EmuDevs <http://emudevs.com/forum.php>
|
||||
Eluna Lua Engine <https://github.com/ElunaLuaEngine/Eluna>
|
||||
Eluna Scripts <https://github.com/ElunaLuaEngine/Scripts>
|
||||
Eluna Wiki <http://wiki.emudevs.com/doku.php?id=eluna>
|
||||
|
||||
-= Script Information =-
|
||||
* Script Type: Boss Fight
|
||||
* Npc: Kruul <18338>
|
||||
--]]
|
||||
|
||||
local Kruul = {}
|
||||
|
||||
function Kruul.EnterCombat(event, creature, target)
|
||||
creature:RegisterEvent(Kruul.ShadowVolley, 10000, 0)
|
||||
creature:RegisterEvent(Kruul.Cleave, 14000, 0)
|
||||
creature:RegisterEvent(Kruul.ThunderClap, 20000, 0)
|
||||
creature:RegisterEvent(Kruul.TwistedReflection, 25000, 0)
|
||||
creature:RegisterEvent(Kruul.VoidBolt, 30000, 0)
|
||||
creature:RegisterEvent(Kruul.Rage, 60000, 0)
|
||||
creature:RegisterEvent(Kruul.SpawnHounds, 8000, 1)
|
||||
end
|
||||
|
||||
function Kruul.KilledTarget(event, creature, victim)
|
||||
creature:CastSpell(creature, 21054)
|
||||
end
|
||||
|
||||
function Kruul.LeaveCombat(event, creature)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
function Kruul.Died(event, creature, killer)
|
||||
creature:RemoveEvents()
|
||||
end
|
||||
|
||||
function Kruul.ShadowVolley(event, delay, pCall, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 21341)
|
||||
end
|
||||
|
||||
function Kruul.Cleave(event, delay, pCall, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 20677)
|
||||
end
|
||||
|
||||
function Kruul.ThunderClap(event, delay, pCall, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 23931)
|
||||
end
|
||||
|
||||
function Kruul.TwistedReflection(event, delay, pCall, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 21063)
|
||||
end
|
||||
|
||||
function Kruul.VoidBolt(event, delay, pCall, creature)
|
||||
creature:CastSpell(creature:GetVictim(), 21066)
|
||||
end
|
||||
|
||||
function Kruul.Rage(event, delay, pCall, creature)
|
||||
creature:CastSpell(creature, 21340)
|
||||
end
|
||||
|
||||
function Kruul.SummonHounds(creature, target)
|
||||
local x, y, z = creature:GetRelativePoint(math.random()*9, math.random()*math.pi*2)
|
||||
local hound = creature:SpawnCreature(19207, x, y, z, 0, 2, 300000)
|
||||
if (hound) then
|
||||
hound:AttackStart(target)
|
||||
end
|
||||
end
|
||||
|
||||
function Kruul.SpawnHounds(event, delay, pCall, creature)
|
||||
Kruul.SummonHounds(creature, creature:GetVictim())
|
||||
Kruul.SummonHounds(creature, creature:GetVictim())
|
||||
Kruul.SummonHounds(creature, creature:GetVictim())
|
||||
creature:RegisterEvent(Kruul.SpawnHounds, 45000, 1)
|
||||
end
|
||||
|
||||
RegisterCreatureEvent(18338, 1, Kruul.EnterCombat)
|
||||
RegisterCreatureEvent(18338, 2, Kruul.LeaveCombat)
|
||||
RegisterCreatureEvent(18338, 3, Kruul.KilledTarget)
|
||||
RegisterCreatureEvent(18338, 4, Kruul.Died)
|
||||
18
buff.lua
Normal file
18
buff.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
local cmd = "buff"
|
||||
|
||||
local auras = { 71954 }
|
||||
|
||||
local function OnCommand(event, player, command)
|
||||
if command == cmd then
|
||||
if not player:IsInCombat() then
|
||||
for i = 2, #auras, 1 do
|
||||
player:AddAura(auras[i], player)
|
||||
end
|
||||
player:CastSpell(player, auras[1], true)
|
||||
else
|
||||
player:SendNotification("You're on combat!")
|
||||
end
|
||||
return false
|
||||
end
|
||||
end
|
||||
RegisterPlayerEvent(42, OnCommand)
|
||||
129
teleporter.lua
Normal file
129
teleporter.lua
Normal file
@@ -0,0 +1,129 @@
|
||||
--[==[
|
||||
= How to add new locations =
|
||||
|
||||
Example:
|
||||
|
||||
The first line will be the main menu ID (Here [1],
|
||||
increment this for each main menu option!),
|
||||
the main menu gossip title (Here "Horde Cities"),
|
||||
as well as which faction can use the said menu (Here 1 (Horde)).
|
||||
0 = Alliance, 1 = Horde, 2 = Both
|
||||
|
||||
The second line is the name of the main menu's sub menus,
|
||||
separated by name (Here "Orgrimmar") and teleport coordinates
|
||||
using Map, X, Y, Z, O (Here 1, 1503, -4415.5, 22, 0)
|
||||
|
||||
[1] = { "Horde Cities", 1, -- This will be the main menu title, as well as which faction can use the said menu. 0 = Alliance, 1 = Horde, 2 = Both
|
||||
{"Orgrimmar", 1, 1503, -4415.5, 22, 0},
|
||||
},
|
||||
|
||||
You can copy paste the above into the script and change the values as informed.
|
||||
|
||||
ItemEntry is set to Hearthstone. You may use another entry with a spell cast.
|
||||
]==]
|
||||
|
||||
local ItemEntry = 6948 -- Hearthstone. You can change this item ID to whatever.
|
||||
|
||||
local T = {
|
||||
[1] = { "|TInterface\\icons\\achievement_pvp_h_h:37:37:-23|t|cff610B0BHorde Cities|r", 1,
|
||||
{"Orgrimmar", 1, 1503, -4415.5, 22, 0},
|
||||
{"Undercity", 0, 1831, 238.5, 61.6, 0},
|
||||
{"Thunderbluff", 1, -1278, 122, 132, 0},
|
||||
{"Silvermoon City", 530, 9487.69, -7279.2, 14.2866, 0},
|
||||
{"Shattrath", 530, -1838.16, 5301.79, -12.428, 0},
|
||||
{"Dalaran", 571, 5804.15, 624.771, 647.767, 0},
|
||||
},
|
||||
[2] = {"|TInterface\\icons\\achievement_pvp_a_a:37:37:-23|t|cff0101DFAlliance Cities|r", 0,
|
||||
{"Stormwind", 0, -8905, 560, 94, 0.62},
|
||||
{"Ironforge", 0, -4795, -1117, 499, 0},
|
||||
{"Darnassus", 1, 9952, 2280.5, 1342, 1.6},
|
||||
{"Exodar", 530, -3965.7, -11653.6, -138.844, 0},
|
||||
{"Shattrath", 530, -1838.16, 5301.79, -12.428, 0},
|
||||
{"Dalaran", 571, 5804.15, 624.771, 647.767, 0},
|
||||
},
|
||||
[3] = { "|TInterface\\icons\\achievement_bg_winwsg:37:37:-23|t|cffC41F3BPvP Locations|r", 2,
|
||||
{"Gurubashi Arena", 0, -13229, 226, 33, 1},
|
||||
{"Dire Maul Arena", 1, -3669, 1094, 160, 3},
|
||||
{"Nagrand Arena", 530, -1983, 6562, 12, 2},
|
||||
{"Blade's Edge Arena", 530, 2910, 5976, 2, 4},
|
||||
},
|
||||
[4] = {"|TInterface\\icons\\achievement_zone_elwynnforest:37:37:-23|t|cff0101DFAlliance Starter Areas|r", 0,
|
||||
{"Northshire Valley", 0, -8921.09, -119.13, 82.2, 6},
|
||||
{"Coldridge", 0, -6231.77, 333, 383.17, 0},
|
||||
{"Shadowglen", 1, 10322.26, 831.4, 1326.37, 0},
|
||||
{"Ammen Vale", 530, -3961.64, -13931.2, 100.615, 0},
|
||||
},
|
||||
[5] = { "|TInterface\\icons\\achievement_zone_durotar:37:37:-23|t|cff610B0BHorde Starter Areas|r", 1,
|
||||
{"Valley of Trials", 1, -618.518, -4251.67, 38.718, 0},
|
||||
{"Camp Narache", 1, -2917.58, -257.98, 52.9968, 0},
|
||||
{"Death Knell", 0, 1676.71, 1678.31, 121.67, 0},
|
||||
{"Sunstrider Isle", 530, 10349.6, -6357.29, 33.4026, 0},
|
||||
},
|
||||
[6] = {"|TInterface\\icons\\achievement_boss_ragnaros:37:37:-23|t|cff0101DFRaids|r", 2,
|
||||
{"Molten Core", 230, 1126.64, -459.94, -102.535, 3.46095},
|
||||
{"Onyxia's Lair", 1, -4708.27, -3727.64, 54.5589, 3.72786},
|
||||
{"Blackwing Lair", 469, -7664.76, -1100.87,399.679, 0},
|
||||
{"Zul'Gurub", 309, -11916.9, -1248.36, 92.5334, 4.72417},
|
||||
{"Ahn'Qiraj", 1, -8253.067, 1538.91, -4.797, 3.065894},
|
||||
{"Naxx 40", 0, 3082.924316, -3746.725830, 133.52, 0},
|
||||
{"Karazhan", 0, -11118.9, -2010.33,47.0819, 0.649895},
|
||||
{"Magtheridon's Lair", 530, -312.7, 3087.26, -116.52, 5.19026},
|
||||
{"Gruul's Lair", 530, 3530.06, 5104.08, 3.50861, 5.51117},
|
||||
{"Zul'Aman", 530, 6851.78, -7972.57, 179.242, 4.64691},
|
||||
{"Serpentshrine Caverns", 530, 748.984436, 6870.443359, -68, 6.246},
|
||||
{"Tempest Keep", 530, 3088.49, 1381.57, 184.863, 4.61973},
|
||||
{"Hyjal Summit", 1, -8177.5, -4183, -168, 1},
|
||||
{"Black Temple", 530, -3649.92, 317.469, 35.2827, 2.94285},
|
||||
{"Sunwell Plateau", 530, 12574.1, -6774.81, 15.0904, 3.13788},
|
||||
{"Naxx Wotlk", 571, 3670.268066, -1263.276367, 243.52, 4.61},
|
||||
{"Obsidian Sanctum", 571, 3457.11, 262.394, -113.819, 3.28258},
|
||||
{"Eye of Eternity", 571, 3859.44, 6989.85, 152.041, 5.79635},
|
||||
{"Vault of Archavon", 571, 5453.72, 2840.79, 421.28, 0},
|
||||
{"Ulduar", 571, 9251.101562, -1112.424072, 1216.115479, 6.26},
|
||||
{"Trial of the Crusader", 571, 8515.68, 716.982, 558.248, 1.57315},
|
||||
{"Icecrown Citadel", 571, 5873.82, 2110.98, 636.011, 3.5523},
|
||||
{"Ruby Sanctum", 571, 3600.5, 197.34, -113.76, 5.29905},
|
||||
},
|
||||
}
|
||||
|
||||
-- CODE STUFFS! DO NOT EDIT BELOW
|
||||
-- UNLESS YOU KNOW WHAT YOU'RE DOING!
|
||||
|
||||
local function OnGossipHello(event, player, item)
|
||||
-- Show main menu
|
||||
for i, v in ipairs(T) do
|
||||
if (v[2] == 2 or v[2] == player:GetTeam()) then
|
||||
player:GossipMenuAddItem(0, v[1], i, 0)
|
||||
end
|
||||
end
|
||||
player:GossipSendMenu(1, item)
|
||||
end
|
||||
|
||||
local function OnGossipSelect(event, player, item, sender, intid, code)
|
||||
if (sender == 0) then
|
||||
-- return to main menu
|
||||
OnGossipHello(event, player, item)
|
||||
return
|
||||
end
|
||||
|
||||
if (intid == 0) then
|
||||
-- Show teleport menu
|
||||
for i, v in ipairs(T[sender]) do
|
||||
if (i > 2) then
|
||||
player:GossipMenuAddItem(0, v[1], sender, i)
|
||||
end
|
||||
end
|
||||
player:GossipMenuAddItem(0, "Back", 0, 0)
|
||||
player:GossipSendMenu(1, item)
|
||||
return
|
||||
else
|
||||
-- teleport
|
||||
local name, map, x, y, z, o = table.unpack(T[sender][intid])
|
||||
player:Teleport(map, x, y, z, o)
|
||||
end
|
||||
|
||||
player:GossipComplete()
|
||||
end
|
||||
|
||||
RegisterItemGossipEvent(ItemEntry, 1, OnGossipHello)
|
||||
RegisterItemGossipEvent(ItemEntry, 2, OnGossipSelect)
|
||||
Reference in New Issue
Block a user