Custom Code (NPC / Boss Script)

#include “ScriptPCH.h”

enum Spells
{
SPELL_SCHILD = 75381,
SPELL_KETTE = 75362,
SPELL_STRAMPELN = 64639,
SPELL_NATURBOMBE = 64650
};

class boss_meiner : public CreatureScript
{
public:
boss_meiner() : CreatureScript(“boss_meiner”) { }

CreatureAI* GetAI(Creature* pCreature) const
{
    return new boss_meinerAI (pCreature);
}

struct boss_meinerAI : public ScriptedAI
{
    boss_meinerAI (Creature *c) : ScriptedAI(c)
    { }

	uint64 t_schild;
	uint64 t_kette;       
	uint64 t_explosion;
	uint64 t_stomp;
	
    void Reset()
    {
		t_schild = 8000;
		t_kette = 10000;
        t_explosion = 20000;
		t_stomp = 25000;
    }

    void EnterCombat(Unit* /*who*/)
    {
       me->MonsterYell("Ihr wagt es mich zu stören.", 0, 0);
       me->MonsterYell("So spuert meinen Zorn", 0, 0);
    }

    void JustDied(Unit* /*killer*/)
    {
      me->MonsterSay("Ich habe versagt...",0,0);
    }
  
    void KilledUnit(Unit *)
    {
         switch (urand(1,3))
         {
               case 1:
                    me->MonsterYell("Das war zu einfach!", 0, 0);
               break;
               case 2:
                   me->MonsterYell("Ihr seid einfach zu schwach!", 0, 0);
               break;
               case 3:
                   me->MonsterYell("Schon müde geworden ???", 0, 0);
              break;
         }
    }
    
    void UpdateAI(const uint64 diff)
    {
        if (!UpdateVictim())
            return;
			
		if (t_schild <= diff) //Kettenblitzschlagschild
		{
			DoCast(me->getVictim(), SPELL_SCHILD);
			t_schild = 8000;
		} else t_schild -= diff;
			
		if (t_kette <= diff) //Erster Spell
		{
			DoCast(me->getVictim(), SPELL_KETTE);
			t_kette = 10000;
		} else t_kette -= diff;
			
		if (t_explosion <= diff) //Zweiter Spell
        {
            DoCast(me->getVictim(), SPELL_NATURBOMBE);
            t_explosion = 20000;
        } else t_explosion -= diff;
		
        if (t_stomp <= diff) //Dritter Spell
        {
            DoCast(me->getVictim(), SPELL_STRAMPELN);
            t_stomp = 25000;
        } else t_stomp -= diff;

        DoMeleeAttackIfReady();
    }
};

};

void AddSC_boss_meiner()
{
new boss_meiner();
}

The Boss don’t cast any spells, what is incorrect ? can anyone Help me ?

void UpdateAI(const uint64 diff)
void UpdateAI(uint32 uiDiff)
The hooks need to be exactly like in the core.
Check the example scripts or scriptmgr.h for the right ones.

https://github.com/TrinityCore/TrinityCore/blob/master/src/server/scripts/Examples/example_creature.cpp#L168

enum Yells
{
//List of text id’s. The text is stored in database, also in a localized version
//(if translation not exist for the textId, default english text will be used)
//Not required to define in this way, but simplify if changes are needed.
//These texts must be added to the creature texts of the npc for which the script is assigned.
SAY_AGGRO = 0, (“Let the games begin.”),
SAY_RANDOM = 1, (“I see endless suffering. I see torment. I see rage. I see everything.”,
(“Muahahahaha”),
(“These mortal infedels my lord, they have invaded your sanctum and seek to steal your secrets.”),
(“You are already dead.”),
(“Where to go? What to do? So many choices that all end in pain, end in death.”);
SAY_BERSERK = 2, (“$N, I sentance you to death!”);
SAY_PHASE = 3, (“The suffering has just begun!”);
SAY_DANCE = 4, (“I always thought I was a good dancer.”);
SAY_SALUTE = 5, (“Move out Soldier!”);
SAY_EVADE = 6 (“Help $N! I’m under attack!”);
};

It doesn’t work

Try changing void UpdateAI(const uint64 diff) to void UpdateAI(uint32 uiDiff)

What doesnt work?

The code you posted in this quoted reply?

You need to comment out the additional text… (blah)