Jump to content
  • Announcements

    • Xmat

      Pravidlo pro postování v TTT

      Do sekce Tipy, triky, tutoriály nepatří žádné dotazy.   Postujte sem vaše návody, tipy a různé další věci jež uznáte za vhodné sdělit zdejšímu osazenstvu, ale veškeré dotazy směřujte do sekce Všeobecná diskuse.
    • Replik

      Seznam návodů a důležitých témat v této sekci

      Pro lepší přehlednost jsem vytvořil tento seznam, který vás, méně zkušené, lépe provede touto sekcí. Věřím, že zde najdete, co hledáte. Vypsané jsou návody, které jsou oficiálně uznané jako návody. Běžné diskuze, které neposkytují postupy a rady zvěřejněny nejsou.   Instalace vlastního MaNGOS Serveru Díky těmto návodům budete (měli by jste být) schopni vytvořit a následně spustit váš vlastní server. Nastavení je pro verze s i bez datadisku.   Instalace MaNGOS Serveru (bez datadisku TBC) - Autor Benny Instalace MaNGOS Serveru (s datadiskem TBC) - Autor Malfik Instalace MaNGOS Serveru v prostředí Linux - Autor charlie Instalace MaNGOS Serveru v prostředí Linux - Autor kupkoid   Chyby a jejich řešení při přihlašování k serveru - Autor Cybe   Zálohování uživatelských dat   Dávkový soubor (BAT soubor) pro vytvoření SQL záloh - Autor Replik   Kompilování - tvoření vlastních release (revizí)   Tvorba kompilací pro Win32 (MangoScript) - Autor bLuma   Ostatní - těžko zařaditelné, ale neznamená to, že nejsou dobré   VIP Systém - Autor charlie Tvorba Webových stránek pro MaNGOS - Autor zahuba Tvorba teleportačních NPC (MangoScript) - Autor Replik Registrační web (původně předělaná SPORA) Funkční pro Antrix i MaNGOS - Autor Replik Nastavení a spuštění Minimanager pro MaNGOS - Autor BlackMartin Nastavení MaNGOS Website - Autor Artorius   Samozřejmě jsou zde i jiné návody, ale tyto jsou nejvíce používané, proto věřím, že vám budou nápomocné. Tuto sekci budeme upravovat podle potřeby. Pokud by jste něco nenašli nebo si nevěděli rady, hledejte na fóru a teprve potom založte vlastní topik. Pokud nějaký autor vytvoří kvalitní návod a chtěl by ho zveřejnit i v tomto seznamu, doporučuji, aby mi napsal zprávu skrze PM.   Díky a přeji hezký den na WoWResource   Replik
    • Aristo

      Příspěvky tam, kde nemají co dělat

      Dodržujte zákaz přispívání do topiků s repaky pokud si to zakladatelé nepřejí!! Opakované psaní příspěvků bude trestáno warnem.
    • Aristo

      Používání spoilerů

      Poslední dobou má většina uživatelů fora zvláštní nutkání postovat extrémně dlouhé texty nebo kódy, které zabírají v nejedenom případu i 80% obsahu celé stránky a hodně tak zvedají nepřehlednost v topiku. Chtěl bych všechny uživatele požádat, aby při postování citací, jakýchkoliv kódů, errorů, atp... delších než 30 řádků používali funkci spoileru.   Funkci vyvoláte příkazem [spoiler] text [/spoiler]   Ukázka:  
Sign in to follow this  
Zachy

[Lua / Script] L70ETC

Recommended Posts

LUA script, pro L70ETC od Moon++

 

--[[ Unit - Global L70ETC.lua

********************************
*                                                            *
* The Moon++ Scripting Project        *
*                                                            *
********************************

This software is provided as free and open source by the
staff of The Moon++ Scripting Project, in accordance with
the GPL license. This means we provide the software we have
created freely and it has been thoroughly tested to work for
the developers, but NO GUARANTEE is made it will work for you
as well. Please give credit where credit is due, if modifying,
redistributing and/or using this software. Thank you.

Staff of The Moon++ Scripting Project, December 2007
~~End of License Agreement

All credits for the files in this folder that are GameMonkey scripts
go to the GMScripts project, for all their hard work for the Ascent
community.

-- Moon++ Project, February 2008 ]]


function spellflare(unit)
unit:CastSpell(42505) 
end

function Banddespawn(unit, Event)
unit:Delete()
end



function despawnband(unit, Event)
unit:RegisterEvent(500, spellflare, 1)
unit:RemoveEvents() 
unit:Despawn(1000,2000000)  
end

function despawnband2(unit, Event)
unit:RegisterEvent(500, spellflare, 2)
unit:RemoveEvents() 
unit:Despawn(1000,2000000)
end


function spellfire(unit)
unit:CastSpell(42501)
end

function UDemotes(unit)
unit:RegisterEvent(500, spellflare, 2)
unit:RegisterEvent(280000, despawnband, 0)
unit:RegisterEvent(10000, EmoteSpinGuiUD, 1)
unit:RegisterEvent(30000, EmoteStrumGuiUD, 1)
unit:RegisterEvent(34000, EmoteStrumGuiUD, 1)
unit:RegisterEvent(38000, EmoteSpinGuiUD, 1)
unit:RegisterEvent(45000, Normalstate, 1)
unit:RegisterEvent(104000, EmoteJumpGuiUD, 1)
unit:RegisterEvent(70000, EmoteStepGuiUD, 1)
unit:RegisterEvent(85000, Normalstate, 1)
unit:RegisterEvent(123000, EmoteJumpGuiUD, 1)
unit:RegisterEvent(140000, Spotlight, 1)
unit:RegisterEvent(145000, EmoteSpinGuiUD, 1) 
unit:RegisterEvent(168000, EmoteJumpGuiUD, 1)
unit:RegisterEvent(200000, Normalstate, 1)
unit:RegisterEvent(229000, EmoteStepGuiUD, 1)
unit:RegisterEvent(203000, Normalstate, 1)
end

function EmoteStrumGuiUD(unit)
unit:Emote(405)
end

function EmoteStepGuiUD(unit)
unit:Emote(403)
end

function EmoteSpinGuiUD(unit)
unit:Emote(404)
end
function EmoteJumpGuiUD(unit)
unit:Emote(402)
end

function Drumemotes(unit)
unit:RegisterEvent(500, spellflare, 2)
unit:RegisterEvent(280000, despawnband, 0)
unit:SetCombatCapable(0)
unit:RegisterEvent(30000, Emotetwodrum, 1)
unit:RegisterEvent(34000, Emotetwodrum, 1)
unit:RegisterEvent(38000, Emotetwodrum, 1)
unit:RegisterEvent(45000, Normalstate, 1)
unit:RegisterEvent(58000, Emotetwodrum, 1)
unit:RegisterEvent(68000, Emotejumpdrum, 1)
unit:RegisterEvent(88000, Emoterolldrum, 1)
unit:RegisterEvent(100000, Emotejumpdrum, 1)
unit:RegisterEvent(138000, Emotetwodrum, 1)
unit:RegisterEvent(210000, Emoterolldrum, 1)
unit:RegisterEvent(203000, Normalstate, 1)
end


function Emotejumpdrum(unit)
unit:Emote(405)
end

function Emoterolldrum(unit)
unit:Emote(402)
end

function Emotetwodrum(unit)
unit:Emote(403)
end

function Emotespindrum(unit)
unit:Emote(404)
end

function Orcemotes(unit)
unit:RegisterEvent(500, spellflare, 2)
unit:RegisterEvent(280000, despawnband, 0)
unit:SetCombatCapable(0)
unit:RegisterEvent(0500, EmoteRight, 1)
unit:RegisterEvent(19000, EmoteGrabclose, 1)
unit:RegisterEvent(30000, Emoteleft, 1)
unit:RegisterEvent(45000, Normalstate, 1)
unit:RegisterEvent(65000, EmoteGrab, 1)
unit:RegisterEvent(70000, Emoteleft, 1)
unit:RegisterEvent(84000, EmoteScream, 1)
unit:RegisterEvent(87000, Normalstate, 1)
unit:RegisterEvent(115000, OrcLight, 1)
unit:RegisterEvent(123042, Emoteleft, 1)
unit:RegisterEvent(137000, EmoteScream, 1)
unit:RegisterEvent(142000, Emotestop, 1)
unit:RegisterEvent(180000, Emotestop, 1)
unit:RegisterEvent(229000, EmoteRight, 1)
unit:RegisterEvent(239000, EmoteGrab, 1)
unit:RegisterEvent(259000, EmoteScream, 1)
end

function EmoteRight(unit)
unit:Emote(403)
end

function Emoteleft(unit)
unit:Emote(404)
end

function EmoteScream(unit)
unit:Emote(407)
end

function EmoteGrab(unit)
unit:Emote(405)
end

function Emotestop(unit)
unit:Emote(402)
end

function EmoteGrabclose(unit)
unit:Emote(406)
end

function OrcLight(unit)
unit:CastSpell(42510)
end

function Trollemotes(unit)
unit:RegisterEvent(500, spellflare, 2)
unit:SetCombatCapable(0)
unit:RegisterEvent(10000, EmoteStrumbass, 1)
unit:RegisterEvent(30000, EmoteStrumbass, 1)
unit:RegisterEvent(45000, Normalstate, 1)
unit:RegisterEvent(70350, EmoteStepbass, 1)
unit:RegisterEvent(85000, Normalstate, 1)
unit:RegisterEvent(95000, EmoteJumpbass, 1)
unit:RegisterEvent(102000, EmoteStrumbass, 1) 
unit:RegisterEvent(115000, EmoteStepbass, 1)
unit:RegisterEvent(123500, EmoteStepbass, 1)
unit:RegisterEvent(165000, EmoteStepbass, 1)
unit:RegisterEvent(192300, EmoteJumpbass, 1)
unit:RegisterEvent(203000, Normalstate, 1)
unit:RegisterEvent(229550, EmoteStepbass, 1)
unit:RegisterEvent(280000, despawnband, 1)
end


function EmoteStrumbass(unit)
unit:Emote(404)
end

function EmoteJumpbass(unit)
unit:Emote(403)
end

function EmoteStepbass(unit)
unit:Emote(402)
end

function BEmotes(unit)
unit:RegisterEvent(500, spellflare, 2)
unit:RegisterEvent(280000, despawnband, 0)
unit:RegisterEvent(10000, EmoteStrumGui, 1)
unit:RegisterEvent(30000, EmoteStrumGui, 1)
unit:RegisterEvent(34000, EmoteStrumGui, 1)
unit:RegisterEvent(38000, EmoteStrumGui, 1)
unit:RegisterEvent(45000, Normalstate, 1)
unit:RegisterEvent(70061, EmoteStrumGui, 1)
unit:RegisterEvent(85000, Normalstate, 1)
unit:RegisterEvent(104000, EmotekickGui, 1)
unit:RegisterEvent(123042, EmoteStrumGui, 1)
unit:RegisterEvent(140000, EmoteStrumGui, 1)
unit:RegisterEvent(166000, EmotekickGui, 1)
unit:RegisterEvent(168000, EmotepluckGui, 1)
unit:RegisterEvent(180000, EmotepluckGui, 1)
unit:RegisterEvent(193000, EmoteSpinGui, 1)
unit:RegisterEvent(203000, Normalstate, 1)
unit:RegisterEvent(229240, EmoteStrumGui, 1)
unit:RegisterEvent(257000, Normalstate, 1)
unit:RegisterEvent(259000, EmoteSpinGui, 1)
end


function EmoteStrumGui(unit)
unit:Emote(402)
end

function EmotepluckGui(unit)
unit:Emote(404)
end

function EmotekickGui(unit)
unit:Emote(403)
end

function EmoteSpinGui(unit)
unit:Emote(405)
end

function Normalstate(unit)
unit:Emote(401)
end

function Spotlight(unit)
unit:CastSpell(39312)
end




function spellearth(unit)
unit:CastSpell(42499)
unit:RegisterEvent(2000, spellfire, 1)
end

function spelllightning(unit)

unit:CastSpell(42510)
unit:CastSpell(42507)
end

function spellstorm(unit)
unit:CastSpell(42500)
unit:RegisterEvent(1000, spelllightning, 1)
unit:RegisterEvent(4000, spellearth, 1)
end

function Onspawnband4(unit)
unit:PlaySoundToSet(11803) 
unit:SetCombatCapable(0)
unit:RegisterEvent(1000, spellstorm, 1)  
unit:RegisterEvent(70000, spellstorm, 1)  
unit:RegisterEvent(123000, spellstorm, 1) 
unit:RegisterEvent(230000, spellstorm, 1)  
unit:RegisterEvent(243000, spellstorm, 1) 
unit:RegisterEvent(280000, despawnband, 0)  
end


RegisterUnitEvent(23624, 6, "Trollemotes") 
RegisterUnitEvent(23619, 6, "UDemotes")  
RegisterUnitEvent(23626, 6, "BEmotes")
RegisterUnitEvent(23625, 6, "Orcemotes")
RegisterUnitEvent(23623, 6, "Drumemotes")
RegisterUnitEvent(49000, 6, "Onspawnband4")

 

Jak ho zprovoznit najdete ZDE !

Share this post


Link to post
Share on other sites

C++ script, pro L70ETC

 

////////////////////////////////////////////////////////////
/* L70etc.cpp Script Original written by Scarface//Odin //
* //
* This script can be easily edited to be //
* used for your server. Throughout the script //
* are comments on what each thing does so that //
* you can edit this. You can create custom //
* teleporting locations and menus. //
* //
* Originally written for use with Moon++ //
*/ //
/////////////////////////////////////////////////

// REDONE BY ROFLWAFFLES (zerohero)
#include "StdAfx.h"
#include "Setup.h"


// --- L70etc band members ---
#define SAMURO 23625
#define BERGRISST 23619
#define MAIKYL 23624
#define SIGNICIOUS 23626
#define THUNDERSKINS 23623
#define TARGETGROUND 48000
#define TARGETAIR 48001
#define UNDEAD 48002
#define UNDEAD2 48003
#define UNDEAD3 48004
#define TRIGGER 48005

/*
* EMOTE_ONESHOT_CUSTOMSPELL01 = 402,
* EMOTE_ONESHOT_CUSTOMSPELL02 = 403,
* EMOTE_ONESHOT_CUSTOMSPELL03 = 404,
* EMOTE_ONESHOT_CUSTOMSPELL04 = 405,
* EMOTE_ONESHOT_CUSTOMSPELL05 = 406,
* EMOTE_ONESHOT_CUSTOMSPELL06 = 407,
*/


// Spells
#define SPELLFLARE 42505
#define SPELLFIRE 42501
#define SPOTLIGHT 39312
#define SPELLEARTH 42499
#define SPELLLLIGHTNING 42510
#define SPELLLLIGHTNING2 42507
#define SPELLSTORM 42500
#define CONSECRATION 26573
//Consecration
#define SINGERSLIGHT 42510

class SamAI : public CreatureAIScript{
public:
ADD_CREATURE_FACTORY_FUNCTION(SamAI);
SamAI(Creature* pCreature) : CreatureAIScript(pCreature){
_unit->GetAIInterface()->SetAllowedToEnterCombat(false);
_unit->GetAIInterface()->m_canMove = false;
_unit->GetAIInterface()->disable_melee = true;
_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true);
timer = 0;
RegisterAIUpdateEvent(1000);
}
void OnCombatStart(Unit* mTarget){ RegisterAIUpdateEvent(1000); }
void OnCombatStop(Unit *mTarget){
_unit->GetAIInterface()->setCurrentAgent(AGENT_NULL);
_unit->GetAIInterface()->SetAIState(STATE_IDLE);
RemoveAIUpdateEvent();
}
void OnDied(Unit * mKiller){ RemoveAIUpdateEvent(); }
void OnSpawn(){_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true);}
void OnDespawn(){ RemoveAIUpdateEvent(); }
void AIUpdate(){
switch (timer){
case 1: _unit->PlaySoundToSet(11803); break;
case 2: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); break;
case 19: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL05); break;
case 30: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL03); break;
case 65: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 70: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL03); break;
case 84: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL06); break;
case 112: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SINGERSLIGHT), true); break;
case 123: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL03); break;
case 137: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL06); break;
case 142: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL01); break;
case 180: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL01); break;
case 229: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL02); break;
case 239: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL06); break;
case 259: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL06); break;
case 279: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); break;
case 280: _unit->Despawn(1000,300000); break;
}
timer++;
}
protected:
uint32 timer;
};

class BerAI : public CreatureAIScript{
public:
ADD_CREATURE_FACTORY_FUNCTION(BerAI);
BerAI(Creature* pCreature) : CreatureAIScript(pCreature){
_unit->GetAIInterface()->SetAllowedToEnterCombat(false);
_unit->GetAIInterface()->m_canMove = false;
_unit->GetAIInterface()->disable_melee = true;
_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true);
timer = 0;
RegisterAIUpdateEvent(1000);
}
void OnCombatStart(Unit* mTarget){ RegisterAIUpdateEvent(1000); }
void OnCombatStop(Unit *mTarget){
_unit->GetAIInterface()->setCurrentAgent(AGENT_NULL);
_unit->GetAIInterface()->SetAIState(STATE_IDLE);
RemoveAIUpdateEvent();
}
void OnDied(Unit * mKiller){ RemoveAIUpdateEvent(); }
void OnSpawn(){ _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); }
void OnDespawn(){ RemoveAIUpdateEvent(); }
void AIUpdate(){
switch (timer){
case 0: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); break;
case 10: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL03); break;
case 30: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 34: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 38: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL03); break;
case 104: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL01); break;
case 123: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL01); break;
case 140: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPOTLIGHT), true); break;
case 145: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL03); break;
case 168: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL01); break;
case 229: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL02); break;
case 230: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL06); break;
case 279: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); break;
case 280: _unit->Despawn(1000,300050); break;
}
timer++;
}
protected:
uint32 timer;
};

class SigAI : public CreatureAIScript{
public:
ADD_CREATURE_FACTORY_FUNCTION(SigAI);
SigAI(Creature* pCreature) : CreatureAIScript(pCreature){
_unit->GetAIInterface()->SetAllowedToEnterCombat(false);
_unit->GetAIInterface()->m_canMove = false;
_unit->GetAIInterface()->disable_melee = true;
_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
timer = 0;
RegisterAIUpdateEvent(1000);
}
void OnCombatStart(Unit* mTarget){ RegisterAIUpdateEvent(1000); }
void OnCombatStop(Unit *mTarget){
_unit->GetAIInterface()->setCurrentAgent(AGENT_NULL);
_unit->GetAIInterface()->SetAIState(STATE_IDLE);
RemoveAIUpdateEvent();
}
void OnDied(Unit * mKiller){ RemoveAIUpdateEvent(); }
void OnSpawn(){ _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); }
void OnDespawn(){ RemoveAIUpdateEvent(); }
void AIUpdate(){
switch (timer){
case 0: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); break;
case 10: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL03); break;
case 30: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 34: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 38: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL03); break;
case 70: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL01); break;
case 85: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL01); break;
case 123: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL01); break;
case 140: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL01); break;
case 165: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPOTLIGHT), true); break;
case 166: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL02); break;
case 168: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL03); break;
case 180: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL03); break;
case 193: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 229: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL06); break;
case 259: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 279: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); break;
case 280: _unit->Despawn(1000,300050); break;
}
timer++;
}
protected:
uint32 timer;
};

class MaiAI : public CreatureAIScript{
public:
ADD_CREATURE_FACTORY_FUNCTION(MaiAI);
MaiAI(Creature* pCreature) : CreatureAIScript(pCreature){
_unit->GetAIInterface()->SetAllowedToEnterCombat(false);
_unit->GetAIInterface()->m_canMove = false;
_unit->GetAIInterface()->disable_melee = true;
_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
timer = 0;
RegisterAIUpdateEvent(1000);
}
void OnCombatStart(Unit* mTarget){ RegisterAIUpdateEvent(1000); }
void OnCombatStop(Unit *mTarget){
_unit->GetAIInterface()->setCurrentAgent(AGENT_NULL);
_unit->GetAIInterface()->SetAIState(STATE_IDLE);
RemoveAIUpdateEvent();
}
void OnDied(Unit * mKiller){ RemoveAIUpdateEvent(); }
void OnSpawn(){ _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); }
void OnDespawn(){ RemoveAIUpdateEvent(); }
void AIUpdate(){
switch (timer){
case 0: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); break;
case 10: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL03); break;
case 30: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL03); break;
case 45: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 70: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL03); break;
case 85: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL01); break;
case 95: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL01); break;
case 102: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL01); break;
case 115: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL01); break;
case 123: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL02); break;
case 165: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPOTLIGHT), true); break;
case 192: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL03); break;
case 203: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL03); break;
case 229: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 279: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); break;
case 280: _unit->Despawn(1000,300050); break;
}
timer++;
}
protected:
uint32 timer;
};


class ThuAI : public CreatureAIScript{
public:
ADD_CREATURE_FACTORY_FUNCTION(ThuAI);
ThuAI(Creature* pCreature) : CreatureAIScript(pCreature){
_unit->GetAIInterface()->SetAllowedToEnterCombat(false);
_unit->GetAIInterface()->m_canMove = false;
_unit->GetAIInterface()->disable_melee = true;
_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
timer = 0;
RegisterAIUpdateEvent(1000);
}
void OnCombatStart(Unit* mTarget){ RegisterAIUpdateEvent(1000); }
void OnCombatStop(Unit *mTarget){
_unit->GetAIInterface()->setCurrentAgent(AGENT_NULL);
_unit->GetAIInterface()->SetAIState(STATE_IDLE);
RemoveAIUpdateEvent();
}
void OnDied(Unit * mKiller){ RemoveAIUpdateEvent(); }
void OnSpawn(){ _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); }
void OnDespawn(){
RemoveAIUpdateEvent();
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true);
}
void AIUpdate(){
switch (timer){
case 2: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); break;
case 3: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 14: _unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "ARE YOU READY TO ROCK?!?!");
case 17: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 42: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 55: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL03); break;
case 62: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 63: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 64: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 75: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 76: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 77: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 88: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 99: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 110: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 137: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL02); break;
case 140: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 142: _unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "WERE GANA ROCK YOU CRAAAAAAZY!!!");
case 313: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 194: _unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL04); break;
case 200:{
_unit->Emote(EMOTE_ONESHOT_CUSTOMSPELL01);
_unit->SetUInt32Value(UNIT_NPC_EMOTESTATE, 401);
break;
}
case 279: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); break;
case 281: _unit->Despawn(1000,301000); break;
}
timer++;
}
protected:
uint32 timer;
};



class UndeadAI : public CreatureAIScript{
public:
ADD_CREATURE_FACTORY_FUNCTION(UndeadAI);
UndeadAI(Creature* pCreature) : CreatureAIScript(pCreature){
_unit->GetAIInterface()->SetAllowedToEnterCombat(false);
_unit->GetAIInterface()->m_canMove = false;
_unit->GetAIInterface()->disable_melee = true;
_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
timer = 0;
RegisterAIUpdateEvent(1000);
}
void OnCombatStart(Unit* mTarget){ RegisterAIUpdateEvent(1000); }
void OnCombatStop(Unit *mTarget){
_unit->GetAIInterface()->setCurrentAgent(AGENT_NULL);
_unit->GetAIInterface()->SetAIState(STATE_IDLE);
RemoveAIUpdateEvent();
}
void OnDied(Unit * mKiller){ RemoveAIUpdateEvent(); }
void OnSpawn(){ _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); }
void OnDespawn(){
RemoveAIUpdateEvent();
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true);
}
void AIUpdate(){
switch (timer){
case 2: _unit->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DANCE); break;
case 280: _unit->Emote(EMOTE_ONESHOT_APPLAUD); break;
case 281: _unit->Despawn(1000,301000); break;
}
timer++;
}
protected:
uint32 timer;
};


class Undead2AI : public CreatureAIScript{
public:
ADD_CREATURE_FACTORY_FUNCTION(Undead2AI);
Undead2AI(Creature* pCreature) : CreatureAIScript(pCreature){
_unit->GetAIInterface()->SetAllowedToEnterCombat(false);
_unit->GetAIInterface()->m_canMove = false;
_unit->GetAIInterface()->disable_melee = true;
_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
timer = 0;
RegisterAIUpdateEvent(1000);
}
void OnCombatStart(Unit* mTarget){ RegisterAIUpdateEvent(1000); }
void OnCombatStop(Unit *mTarget){
_unit->GetAIInterface()->setCurrentAgent(AGENT_NULL);
_unit->GetAIInterface()->SetAIState(STATE_IDLE);
RemoveAIUpdateEvent();
}
void OnDied(Unit * mKiller){ RemoveAIUpdateEvent(); }
void OnSpawn(){ _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); }
void OnDespawn(){
_unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "THAT WAS GREAT!");
RemoveAIUpdateEvent();
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true);
}
void AIUpdate(){
switch (timer){
case 2: _unit->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DANCE); break;
case 280: _unit->Emote(EMOTE_ONESHOT_CHEER); break;
case 281: _unit->Despawn(1000,301000); break;
}
timer++;
}
protected:
uint32 timer;
};


class Undead3AI : public CreatureAIScript{
public:
ADD_CREATURE_FACTORY_FUNCTION(Undead3AI);
Undead3AI(Creature* pCreature) : CreatureAIScript(pCreature){
_unit->GetAIInterface()->SetAllowedToEnterCombat(false);
_unit->GetAIInterface()->m_canMove = false;
_unit->GetAIInterface()->disable_melee = true;
_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
timer = 0;
RegisterAIUpdateEvent(1000);
}
void OnCombatStart(Unit* mTarget){ RegisterAIUpdateEvent(1000); }
void OnCombatStop(Unit *mTarget){
_unit->GetAIInterface()->setCurrentAgent(AGENT_NULL);
_unit->GetAIInterface()->SetAIState(STATE_IDLE);
RemoveAIUpdateEvent();
}
void OnDied(Unit * mKiller){ RemoveAIUpdateEvent(); }
void OnSpawn(){ _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); }
void OnDespawn(){
_unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "THAT WAS GREAT!");
RemoveAIUpdateEvent();
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true);
}
void AIUpdate(){
switch (timer){
case 2: _unit->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DANCE); break;
case 279: _unit->Emote(EMOTE_ONESHOT_CHEER); break;
case 280: _unit->Despawn(1000,301000); break;
}
timer++;
}
protected:
uint32 timer;
};


class TriggerAI : public CreatureAIScript{
public:
ADD_CREATURE_FACTORY_FUNCTION(TriggerAI);
TriggerAI(Creature* pCreature) : CreatureAIScript(pCreature){
_unit->GetAIInterface()->SetAllowedToEnterCombat(false);
_unit->GetAIInterface()->m_canMove = false;
_unit->GetAIInterface()->disable_melee = true;
_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
timer = 0;
RegisterAIUpdateEvent(1000);
}
void OnCombatStart(Unit* mTarget){ RegisterAIUpdateEvent(1000); }
void OnCombatStop(Unit *mTarget){
_unit->GetAIInterface()->setCurrentAgent(AGENT_NULL);
_unit->GetAIInterface()->SetAIState(STATE_IDLE);
RemoveAIUpdateEvent();
}
void OnDied(Unit * mKiller){ RemoveAIUpdateEvent(); }
void OnSpawn(){ _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); }
void OnDespawn(){
_unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "THAT WAS GREAT!");
RemoveAIUpdateEvent();
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true);
}
void AIUpdate(){
switch (timer){
case 1: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 8: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 15: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 21: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 28: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 35: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 41: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 48: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 55: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 62: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 69: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 76: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 81: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 89: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 96: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 101: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 108: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 115: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 121: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 128: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 135: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 141: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 148: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 155: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 162: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 169: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 176: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 181: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 189: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 196: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 201: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 208: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 215: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 221: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 228: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 235: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 241: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 248: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 255: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 262: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 269: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 276: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 281: _unit->Despawn(1000,301000); break;
}
timer++;
}
protected:
uint32 timer;
};

class Trigger2AI : public CreatureAIScript{
public:
ADD_CREATURE_FACTORY_FUNCTION(Trigger2AI);
Trigger2AI(Creature* pCreature) : CreatureAIScript(pCreature){
_unit->GetAIInterface()->SetAllowedToEnterCombat(false);
_unit->GetAIInterface()->m_canMove = false;
_unit->GetAIInterface()->disable_melee = true;
_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
timer = 0;
RegisterAIUpdateEvent(1000);
}
void OnCombatStart(Unit* mTarget){ RegisterAIUpdateEvent(1000); }
void OnCombatStop(Unit *mTarget){
_unit->GetAIInterface()->setCurrentAgent(AGENT_NULL);
_unit->GetAIInterface()->SetAIState(STATE_IDLE);
RemoveAIUpdateEvent();
}
void OnDied(Unit * mKiller){ RemoveAIUpdateEvent(); }
void OnSpawn(){ _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); }
void OnDespawn(){
_unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "THAT WAS GREAT!");
RemoveAIUpdateEvent();
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true);
}
void AIUpdate(){
switch (timer){
case 3: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 10: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 18: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 24: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 22: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 38: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 44: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 52: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 58: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 68: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 69: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 76: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 85: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 90: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 96: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 107: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 109: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 125: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 127: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 129: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 132: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 144: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 149: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 159: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 166: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 169: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 176: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 183: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 186: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 194: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 204: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 209: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 218: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 223: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 228: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 235: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 241: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 248: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 252: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 263: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 266: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 274: _unit->CastSpell(_unit, dbcSpell.LookupEntry(CONSECRATION), true); break;
case 281: _unit->Despawn(1000,301000); break;
}
timer++;
}
protected:
uint32 timer;
};
class Effectsground : public CreatureAIScript{
public:
ADD_CREATURE_FACTORY_FUNCTION(Effectsground);
Effectsground(Creature* pCreature) : CreatureAIScript(pCreature){
_unit->GetAIInterface()->SetAllowedToEnterCombat(false);
_unit->GetAIInterface()->m_canMove = false;
_unit->GetAIInterface()->disable_melee = true;
_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
timer = 0;
RegisterAIUpdateEvent(1000);
}
void OnCombatStart(Unit* mTarget){ RegisterAIUpdateEvent(1000); }
void OnCombatStop(Unit *mTarget){
_unit->GetAIInterface()->setCurrentAgent(AGENT_NULL);
_unit->GetAIInterface()->SetAIState(STATE_IDLE);
RemoveAIUpdateEvent();
}
void OnDied(Unit * mKiller){ RemoveAIUpdateEvent(); }
void OnSpawn(){
_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
timer = 0;
}
void OnDespawn(){ RemoveAIUpdateEvent(); }
void AIUpdate(){
switch (timer){
case 2:{
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLLLIGHTNING), true);
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLLLIGHTNING2), true);
break;
}
case 6: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLEARTH), true); break;
case 8: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFIRE), true); break;
case 72:{
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLLLIGHTNING), true);
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLLLIGHTNING2), true);
break;
}
case 76: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLEARTH), true); break;
case 78: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFIRE), true); break;
case 125:{
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLLLIGHTNING), true);
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLLLIGHTNING2), true);
break;
}
case 128: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLEARTH), true); break;
case 132: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFIRE), true); break;
case 232:{
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLLLIGHTNING), true);
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLLLIGHTNING2), true);
break;
}
case 236: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLEARTH), true); break;
case 238: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFIRE), true); break;
case 245:{
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLLLIGHTNING), true);
_unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLLLIGHTNING2), true);
break;
}
case 249: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLEARTH), true); break;
case 251: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFIRE), true); break;
case 279: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLFLARE), true); break;
case 280: _unit->Despawn(1000,300000); break;
}
timer++;
}
protected:
uint32 timer;
};

class Effectsair : public CreatureAIScript{
public:
ADD_CREATURE_FACTORY_FUNCTION(Effectsair);
Effectsair(Creature* pCreature) : CreatureAIScript(pCreature){
_unit->GetAIInterface()->SetAllowedToEnterCombat(false);
_unit->GetAIInterface()->m_canMove = false;
_unit->GetAIInterface()->disable_melee = true;
_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
timer = 0;
RegisterAIUpdateEvent(1000);
}
void OnCombatStart(Unit* mTarget){ RegisterAIUpdateEvent(1000); }
void OnCombatStop(Unit *mTarget){
_unit->GetAIInterface()->setCurrentAgent(AGENT_NULL);
_unit->GetAIInterface()->SetAIState(STATE_IDLE);
RemoveAIUpdateEvent();
}
void OnDied(Unit * mKiller){ RemoveAIUpdateEvent(); }
void OnSpawn(){
timer = 0;
_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
void OnDespawn(){ RemoveAIUpdateEvent(); }
void AIUpdate(){
switch(timer){
case 1: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLSTORM), true); break;
case 70: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLSTORM), true); break;
case 123: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLSTORM), true); break;
case 230: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLSTORM), true); break;
case 243: _unit->CastSpell(_unit, dbcSpell.LookupEntry(SPELLSTORM), true); break;
case 280: _unit->Despawn(1000,300000); break;
}
timer++;
}
protected:
uint32 timer;
};

void SetupL70etc(ScriptMgr * mgr){
mgr->register_creature_script(SAMURO, &SamAI::Create);
mgr->register_creature_script(BERGRISST, &BerAI::Create);
mgr->register_creature_script(MAIKYL, &MaiAI::Create);
mgr->register_creature_script(SIGNICIOUS, &SigAI::Create);
mgr->register_creature_script(THUNDERSKINS, &ThuAI::Create);
mgr->register_creature_script(TARGETGROUND, Effectsground::Create);
mgr->register_creature_script(TARGETAIR, Effectsair::Create);
mgr->register_creature_script(UNDEAD, &UndeadAI::Create);
mgr->register_creature_script(UNDEAD2, &Undead2AI::Create);
mgr->register_creature_script(UNDEAD3, &Undead3AI::Create);
mgr->register_creature_script(TRIGGER, &TriggerAI::Create);
}

 

Share this post


Link to post
Share on other sites

SQL, pro L70ETC

 

/***********************************************************************/
/* Author: BWKClan */
/* Date: August 30, 2007 Updated October 13, 2007. */
/* Files: Blizzcon.sql and Blizzcon_Band.gm */
/* This SQL updates the database with new spawns, spells, and updates. */
/* Thanks to Tudi for bleachers, torches, banners, and emote 402 from */
/* darkmoon_fairie.sql. Added need 2 spawns for spells for lightning. */
/* Modified by nICKE */
/***********************************************************************/
/*SQL update to spawn the band and guards during blizzcon.*/
delete from `creature_spawns` WHERE entry in (23619, 23623, 23624, 23625, 23626, 23721, 48000, 48001, 49000);
insert into `creature_spawns` (`entry`, `Map`, `position_x`, `position_y`, `position_z`, `orientation`, `movetype`, `displayid`, `faction`, `flags`, `bytes`, `bytes2`, `emote_state`, `npc_respawn_link`) values('23619','530','-2223.0','5122.0','-16.5','0.1','0','21659','1741','0','0','0','402','0');
insert into `creature_spawns` (`entry`, `Map`, `position_x`, `position_y`, `position_z`, `orientation`, `movetype`, `displayid`, `faction`, `flags`, `bytes`, `bytes2`, `emote_state`, `npc_respawn_link`) values('23623','530','-2227.5','5128.0','-12.98','0.1','0','21661','1741','0','0','0','402','0');
insert into `creature_spawns` (`entry`, `Map`, `position_x`, `position_y`, `position_z`, `orientation`, `movetype`, `displayid`, `faction`, `flags`, `bytes`, `bytes2`, `emote_state`, `npc_respawn_link`) values('23624','530','-2222.0','5132.0','-16.5','0.1','0','21662','1741','0','0','0','402','0');
insert into `creature_spawns` (`entry`, `Map`, `position_x`, `position_y`, `position_z`, `orientation`, `movetype`, `displayid`, `faction`, `flags`, `bytes`, `bytes2`, `emote_state`, `npc_respawn_link`) values('23625','530','-2220.0','5125.0','-16.5','0.1','0','21665','1741','0','0','0','402','0');
insert into `creature_spawns` (`entry`, `Map`, `position_x`, `position_y`, `position_z`, `orientation`, `movetype`, `displayid`, `faction`, `flags`, `bytes`, `bytes2`, `emote_state`, `npc_respawn_link`) values('23626','530','-2221.0','5129.0','-16.5','0.1','0','21666','1741','0','0','0','402','0');
insert into `creature_spawns` (`entry`, `Map`, `position_x`, `position_y`, `position_z`, `orientation`, `movetype`, `displayid`, `faction`, `flags`, `bytes`, `bytes2`, `emote_state`, `npc_respawn_link`) values('23721','530','-2210.0','5133.0','-20.1','0.1','0','19926','1555','0','0','0','0','0');
insert into `creature_spawns` (`entry`, `Map`, `position_x`, `position_y`, `position_z`, `orientation`, `movetype`, `displayid`, `faction`, `flags`, `bytes`, `bytes2`, `emote_state`, `npc_respawn_link`) values('23721','530','-2214.0','5118.0','-20.1','0.6','0','19926','1555','0','0','0','0','0');
insert into `creature_spawns` (`entry`, `Map`, `position_x`, `position_y`, `position_z`, `orientation`, `movetype`, `displayid`, `faction`, `flags`, `bytes`, `bytes2`, `emote_state`, `npc_respawn_link`) values('23721','530','-2196.5','5130.7','-20.5','3.5','0','19926','1555','0','0','0','0','0');
insert into `creature_spawns` (`entry`, `Map`, `position_x`, `position_y`, `position_z`, `orientation`, `movetype`, `displayid`, `faction`, `flags`, `bytes`, `bytes2`, `emote_state`, `npc_respawn_link`) values('23721','530','-2199.9','5114.5','-20.2','2.0','0','19926','1555','0','0','0','0','0');
UPDATE creature_proto SET respawntime = '3180000' WHERE entry in (23619, 23623, 23624, 23625, 23626, 23721);
UPDATE creature_proto SET attacktime = '1750' WHERE entry in (23619, 23623, 23624, 23625, 23626, 23721);
UPDATE creature_proto SET mindamage = '450' WHERE entry in (23619, 23623, 23624, 23625, 23626, 23721);
UPDATE creature_proto SET maxdamage = '550' WHERE entry in (23619, 23623, 23624, 23625, 23626, 23721);
UPDATE creature_proto SET faction = '1741' WHERE entry in (23619, 23623, 23624, 23625, 23626);

/* ADD's a dummy spawn for a spell target so the spells are cast between the stage and benches like retail with a zero displayid so its not seen.*/
insert into `creature_spawns` (`entry`, `Map`, `position_x`, `position_y`, `position_z`, `orientation`, `movetype`, `displayid`, `faction`, `flags`, `bytes`, `bytes2`, `emote_state`, `npc_respawn_link`) values('48000','530','-2214','5118','-20.1','0.1','0','18691','1741','0','0','0','0','0');
insert into `creature_spawns` (`entry`, `Map`, `position_x`, `position_y`, `position_z`, `orientation`, `movetype`, `displayid`, `faction`, `flags`, `bytes`, `bytes2`, `emote_state`, `npc_respawn_link`) values('48001','530','-2214','5118','-20.1','0.1','2','0','1741','0','0','0','0','0');
delete from `creature_names` WHERE entry in (48000, 48001, 49000);
INSERT INTO `creature_names` (`entry`, `name`, `Subname`, `Flags1`, `type`, `Family`, `Rank`, `unk4`, `SpellDataID`, `male_displayid`, `female_displayid`, `unknown_float1`, `unknown_float2`, `Civilian`, `Leader`, `info_str`) VALUES ('48000',' ',' ','0','7','0','1','0',NULL,'0','0','1','1',0,NULL,'');
INSERT INTO `creature_names` (`entry`, `name`, `Subname`, `Flags1`, `type`, `Family`, `Rank`, `unk4`, `SpellDataID`, `male_displayid`, `female_displayid`, `unknown_float1`, `unknown_float2`, `Civilian`, `Leader`, `info_str`) VALUES ('48001',' ',' ','0','8','0','1','0',NULL,'0','0','1','1',0,NULL,'');
delete from `creature_proto` WHERE entry in (48000, 48001, 49000);
INSERT INTO `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `mindamage`, `maxdamage`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `mountdisplayid`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`) VALUES (48000,50,50,1741,8391,8391,0,'1.3',0,1750,'450','550',0,'0','0',0,3180000,0,0,0,0,0,0,0,'1','1','0','0',0,0,0,2.5,8.0);
INSERT INTO `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `mindamage`, `maxdamage`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `mountdisplayid`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`) VALUES (48001,50,50,1741,8391,8391,0,'0.01',0,1750,'450','550',0,'0','0',0,3180000,0,0,0,0,0,0,0,'1','1','0','0',0,0,0,2.5,8.0);

/* Adding the bleachers, torches, and banners to blizzcon band. */
delete from `gameobject_spawns` where `entry`= 186393 and `Map`= 530 and `position_x`>= -1391 and `position_x`<= -1390 and `position_y`>= -1105 and `position_y`<= -1104;
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (186393, 530, "-2201.85", "5119.5", "-20.228", "2.95", 0, 0, "0.995396", "0.0958458", 1, 32, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (186393, 530, "-2200.26", "5126.68", "-20.24", "2.9", 0, 0, "0.992546", "0.121869", 1, 32, 0, 1, 0);
delete from `gameobject_spawns` where `entry`= 179965 and `Map`= 530 and `position_x`>= -2250 and `position_x`<= -2140 and `position_y`>= 5100 and `position_y`<= 5160;
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (179965, 530, "-2217.04", "5115.9", "-20.0", "-0.93", 0, 0, "0.446198", "0.894934", 1, 32, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (179965, 530, "-2195.37", "5131.33", "-20.8", "0.45", 0, 0, "0.224951", "0.97437", 1, 32, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (179965, 530, "-2199.12", "5113.51", "-20.21", "-0.84", 0, 0, "0.406737", "-0.913545", 1, 32, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (179965, 530, "-2203.71", "5134.19", "-20.51", "1.34", 0, 0, "0.622515", "0.782608", 1, 32, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (179965, 530, "-2208.4", "5153.38", "-19.6", "-1.13", 0, 0, "0.5373", "-0.843391", 1, 32, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (179965, 530, "-2213.49", "5135.49", "-20.187", "0.7", 0, 0, "0.34202", "-0.939693", 1, 32, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (179965, 530, "-2223.9", "5153.18", "-19.11", "-1.4", 0, 0, "0.649448", "-0.760406", 1, 32, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (179965, 530, "-2207.81", "5135.23", "-20.26", "1.6", 0, 0, "0.71934", "0.694658", 1, 32, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (179965, 530, "-2199.12", "5113.51", "-20.21", "-0.84", 0, 0, "0.406737", "-0.913545", 1, 32, 0, 1, 0);
delete from `gameobject_spawns` where `entry`= 180043 and `Map`= 530 and `position_x`>= -2250 and `position_x`<= -2140 and `position_y`>= 5100 and `position_y`<= 5160;
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (180043, 530, "-2196.24", "5127.53", "-20.229", "-0.07", 0, 0, "0.0348995", "-0.999391", 1, 0, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (180043, 530, "-2198.01", "5118.34", "-20.177", "2.78", 0, 0, "0.991445", "0.130526", 1, 0, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (180043, 530, "-2199.91", "5133.01", "-20.697", "2.43", 0, 0, "0.936672", "0.350207", 1, 0, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (180043, 530, "-2212.67", "5161.79", "-17.6", "2.72", 0, 0, "0.978148", "0.207912", 1, 0, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (180043, 530, "-2204.71", "5114.18", "-20.372", "0.3", 0, 0, "0.147809", "0.989016", 1, 0, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (180043, 530, "-2225.82", "5160.0", "-17.28", "-1.27", 0, 0, "0.594823", "-0.803857", 1, 0, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (180043, 530, "-2210.78", "5135.26", "-20.12", "1.15", 0, 0, "0.544639", "0.838671", 1, 0, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (180043, 530, "-2213.5", "5115.61", "-20.117", "2.4", 0, 0, "0.930418", "0.366501", 1, 0, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (180043, 530, "-2196.93", "5122.91", "-20.214", "0.45", 0, 0, "0.224951", "0.97437", 1, 0, 0, 1, 0);
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (180043, 530, "-2208.86", "5114.8", "-20.19", "0.68", 0, 0, "0.333807", "0.942641", 1, 0, 0, 1, 0);

/* Adds the stage to fix the script spawning added stages each time the band plays. Thanks to Egari for point out this problem.*/
delete from `gameobject_spawns` where `entry`= 186300 and `Map`= 530;
INSERT INTO gameobject_spawns (Entry, Map, position_x, position_y, position_z, Facing, orientation1, orientation2, orientation3, orientation4, State, Flags, Faction, Scale, stateNpcLink) VALUES (186300, 530, "-2224.98", "5127.45", "-19.76", "-0.174533", 0, 0, "0.0871559", "-0.996195", 1, 32, 0, 1, 0);

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×