Code:
--[[ ******************************
* *
* The FrostTeam Project *
* *
******************************
--FrostTeam SVN consists of the latest WotLK
scripts, both Lua and C++. Some will be our own,
some will be others with credits attatched. Our
Svn includes all scripts that you may need
to help make your server a more fun environment.--
---------------------------//--------------------------------------------]]--
function Spawner_OnGossipTalk(pUnit, event, player, pMisc)
pUnit:GossipCreateMenu(100, player, 1)
pUnit:GossipMenuAddItem(0, "I want to challenge you!", 2, 0)
pUnit:GossipSendMenu(player)
end
function Spawner_OnGossipSelect(pUnit, Event, player, id, intid, code, pMisc)
if (intid == 2) then
pUnit:SetCombatCapable(1)
pUnit:RegisterEvent("Spawner_talk1", 500, 0)
pUnit:RegisterEvent("Spawner_talk2", 4000, 0)
pUnit:RegisterEvent("Spawner_talk3", 8000, 0)
pUnit:RegisterEvent("Spawner_talk4", 12345, 0)
pUnit:RegisterEvent("Spawner_Spawn", 20545, 1)
pUnit:RegisterEvent("Spawner_Start", 22450, 1)
pUnit:GossipComplete(player)
end
end
function Spawner_talk1(pUnit, Event)
pUnit:SetCombatCapable(1)
pUnit:SendChatMessage(12, 0 ,"Do you think you are able to kill me %N?")
end
function Spawner_talk2(pUnit, Event)
pUnit:SetCombatCapable(1)
pUnit:SendChatMessage(12, 0 ,"I am the Warlock Master")
end
function Spawner_talk3(pUnit, Event)
pUnit:SetCombatCapable(1)
pUnit:SendChatMessage(12, 0 ,"My minions will destroy you, %N!")
end
function Spawner_talk4(pUnit, Event)
pUnit:SetCombatCapable(1)
pUnit:SendChatMessage(12, 0 ,"Come my minion!")
end
function Spawner_Spawn(pUnit, Event)
pUnit:SetCombatCapable(1)
x=GetX();
y=GetY();
z=GetZ();
o=GetO();
pUnit:SpawnCreature(MINIONID, x, y, z, 0, 20, 0)
end
function Spawner_Start(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SetCombatCapable(1)
pUnit:RegisterEvent("Spawner_Fight", 15000, 0)
end
function Spawner_Fight(pUnit, Event)
pUnit:SetCombatCapable(1)
pUnit:FullCastSpellOnTarget(57464, pUnit:GetRandomPlayer(0))
end
function Spawner_OnLeaveCombat(pUnit, Event)
pUnit:RemoveEvents()
end
function Spawner_OnKilledTarget(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "Ahah %N is dead!")
end
function Spawner_Death(pUnit, Event)
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "Created by FrostTeam")
end
RegisterUnitEvent(SUMMONERID, 1, "Spawner_OnEnterCombat")
RegisterUnitEvent(SUMMONERID, 2, "Spawner_OnLeaveCombat")
RegisterUnitEvent(SUMMONERID, 3, "Spawner_OnKilledTarget")
RegisterUnitEvent(SUMMONERID, 4, "Spawner_Death")
Code:
--[[ ******************************
* *
* The FrostTeam Project *
* *
******************************
--FrostTeam SVN consists of the latest WotLK
scripts, both Lua and C++. Some will be our own,
some will be others with credits attatched. Our
Svn includes all scripts that you may need
to help make your server a more fun environment.--
---------------------------//--------------------------------------------]]--
function NPCNAME_OnEnterCombat(pUnit,Event)
pUnit:SendChatMessage(12, 0, "Oh yes, I may look weak, I may look easy... But I fight for my master and the morale that I have is overpowering!")
pUnit:RegisterEvent("NPCNAME_SpellType", 10000, 0)
punit:RegisterEvent("NPCNAME_Overpower", 1000, 0)
end
--Spell Choice of 3--
function NPCNAME_SpellType(pUnit, Event)
pUnit:RemoveEvents()
Choice=math.random(1, 8)
if Choice==1 then
pUnit:CastSpellOnTarget(38538,pUnit:GetRandomPlayer(0))
pUnit:CastSpellOnTarget(38538,pUnit:GetRandomPlayer(0))
pUnit:CastSpellOnTarget(38538,pUnit:GetRandomPlayer(0))
pUnit:CastSpellOnTarget(38538,pUnit:GetRandomPlayer(0))
pUnit:CastSpellOnTarget(38538,pUnit:GetRandomPlayer(0))
pUnit:CastSpellOnTarget(19471,pUnit:GetMainTank())
end
if Choice==2 then
pUnit:CastSpellOnTarget(36836,pUnit:GetMainTank())
end
if Choice==3 then
pUnit:CastSpell(48078)
pUnit:CastSpell(48078)
pUnit:CastSpell(48078)
end
end
--Overpower--
function NPCNAME_Overpower(pUnit,Event)
if pUnit:GetHealthPct() <= 10 then
pUnit:RemoveEvents()
pUnit:SendChatMessage(12, 0, "Oh, OVERPOWER!")
pUnit:CastSpell(34161)
pUnit:SetScale(2)
end
end
--Rest of Script--
function NPCNAME_OnLeaveCombat(pUnit, event)
pUnit:RemoveEvents()
end
function NPCNAME_OnKilledTarget(pUnit)
pUnit:SendChatMessage(12, 0, "Master look! I took down %N!")
end
function NPCNAME_Death(pUnit)
pUnit:RemoveEvents()
pUnit:SendChatMessage(14, 0, "Sorry master, I have failed you.")
pUnit:SetCombatCapable(1)
x=GetX();
y=GetY();
z=GetZ();
o=GetO();
pUnit:SpawnCreature(BOSSID, x, y, z, 0, 20, 0)
end
RegisterUnitEvent(NPCID, 1, "NPCNAME_OnEnterCombat")
RegisterUnitEvent(NPCID, 2, "NPCNAME_OnLeaveCombat")
RegisterUnitEvent(NPCID, 3, "NPCNAME_OnKilledTarget")
RegisterUnitEvent(NPCID, 4, "NPCNAME_Death")