Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Errors when compiling
- */
- 3> Flameh.cpp
- 3>..\..\..\..\build\src\server\scripts\Custom\Flameh.cpp(71): warning C4373: 'Flameh::Custom_BossAI::UpdateAI': virtual function overrides 'ScriptedAI::UpdateAI', previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers
- 3> C:/Users/Racoon/Desktop/TrinityCompiled - Copy/Source/build/src/server/game/AI/ScriptedAI\ScriptedCreature.h(93) : see declaration of 'ScriptedAI::UpdateAI'
- 3>..\..\..\..\build\src\server\scripts\Custom\Flameh.cpp(61): error C3861: 'DoScriptText': identifier not found
- 3>..\..\..\..\build\src\server\scripts\Custom\Flameh.cpp(67): error C3861: 'DoScriptText': identifier not found
- 3>..\..\..\..\build\src\server\scripts\Custom\Flameh.cpp(68): error C3861: 'DoScriptText': identifier not found
- 3>..\..\..\..\build\src\server\scripts\Custom\Flameh.cpp(79): error C3861: 'DoScriptText': identifier not found
- 4>------ Build started: Project: worldserver, Configuration: Release Win32 ------
- 4> Creating library C:/Users/Racoon/Desktop/TrinityCompiled - Copy/Source/Trinity/src/server/worldserver/Release/worldserver.lib and object C:/Users/Racoon/Desktop/TrinityCompiled - Copy/Source/Trinity/src/server/worldserver/Release/worldserver.exp
- 4>game.lib(ScriptLoader.obj) : error LNK2019: unresolved external symbol "void __cdecl AddSC_Flameh(void)" (?AddSC_Flameh@@YAXXZ) referenced in function "void __cdecl AddCustomScripts(void)" (?AddCustomScripts@@YAXXZ)
- 4>C:\Users\Racoon\Desktop\TrinityCompiled - Copy\Source\Trinity\bin\Release\worldserver.exe : fatal error LNK1120: 1 unresolved externals
- /*
- The whole script
- */
- #include "ScriptPCH.h"
- enum Yells
- {
- SAY_AGGRO = -1603278,
- SAY_ENRAGE = -1189002,
- SAY_KILL = -1189003
- };
- enum Emotes
- {
- EMOTE_ENRAGE = -1189004
- };
- enum Spells
- {
- SPELL_RUSHINGCHARGE = 8260,
- SPELL_BARKSKIN =22812,
- SPELL_FIREBREATH =74528,
- SPELL_RAKE =1822,
- SPELL_FRENZY = 8269,
- };
- class Flameh : public CreatureScript
- {
- public:
- Flameh() : CreatureScript("Flameh") { }
- CreatureAI* GetAI(Creature* creature) const
- {
- return new Custom_BossAI(creature);
- }
- struct Custom_BossAI : public ScriptedAI
- {
- Custom_BossAI(Creature* creature) : ScriptedAI(creature) {}
- bool Enrage;
- uint32 BARKSKIN_Timer;
- uint32 FIREBREATH_Timer;
- uint32 RAKE_Timer;
- void Reset()
- {
- Enrage = false;
- BARKSKIN_Timer = 25000;
- FIREBREATH_Timer = 3000;
- RAKE_Timer = 6000;
- }
- void EnterCombat(Unit* /*who*/)
- {
- DoScriptText(SAY_AGGRO, me);
- DoCast(me, SPELL_RUSHINGCHARGE);
- }
- void KilledUnit(Unit* /*victim*/)
- {
- DoScriptText(SAY_AGGRO, me);
- DoScriptText(SAY_KILL, me);
- }
- void UpdateAI(const uint32 diff)
- {
- if (!UpdateVictim())
- return;
- //If we are <25% hp goes Enraged
- if (!Enrage && !HealthAbovePct(25) && !me->IsNonMeleeSpellCasted(false))
- {
- DoScriptText(EMOTE_ENRAGE, me);
- DoCast(me, SPELL_FRENZY);
- Enrage = true;
- }
- //BARKSKIN_Timer
- if (BARKSKIN_Timer <= diff)
- {
- DoCast(me->getVictim(), SPELL_BARKSKIN);
- BARKSKIN_Timer = 9000;
- }
- else BARKSKIN_Timer -= diff;
- // FIREBREATH_Timer
- if (FIREBREATH_Timer <= diff)
- {
- DoCast(me->getVictim(), SPELL_FIREBREATH);
- FIREBREATH_Timer = 3000;
- }
- else FIREBREATH_Timer -= diff;
- DoMeleeAttackIfReady();
- // RAKE_Timer
- if (RAKE_Timer <= diff)
- {
- DoCast(me->getVictim(), SPELL_RAKE);
- RAKE_Timer = 4000;
- }
- else RAKE_Timer -= diff;
- DoMeleeAttackIfReady();
- }
- };
- };
- void AddSC_Flameh()
- {
- new Flameh();
- }
Advertisement
Add Comment
Please, Sign In to add comment