This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - bizzlesnaff

Pages: 1 [2]
16
Serverside Modding / [Solved][C++] c++ NPC-Script problem
« on: March 16, 2015, 04:49:35 pm »
Hey folks,

in the last two days I worked more with c++ and now I'm a little bit confused. I saw many tutorials on youtube and other websites and everytime, when the npc should say something they use the code:
Quote
 
me->MonsterYell("TEXT", LANG_UNIVERSAL, NULL);
or
me->MonsterSay("TEXT2", LANG_UNIVERSAL, NULL);

But if i use it for my server i get an error while i'm compiling

Quote
 
error C2039: 'MonsterYell': Is not an element of 'creature'
 or
error C2039: 'getVictim': Is not an element of 'creature'


I have no idea how to fix it, or which code i can use.
Maybe if it help, my whole npc script. Not written by me, just copied.
Quote
     
#include "ScriptPCH.h"
#pragma warning(disable:4373)
enum Spells
{
    // List of spells.
    // Not required to define them in this way, but will make it easier to maintain in case spellId change

    SPELL_SHADOWBOLT = 70281,
    SPELL_DOOM = 64157,
    SPELL_SUMMON = 71031,
    //Transform to Bonelord
    SPELL_TRANSFORM = 72498,
    //Melee Form Abilities
    SPELL_SOULSTRIKE = 70211,
    SPELL_NECROTICSTRIKE = 70659,
    SPELL_ICYTOUCH = 66021,
    SPELL_FRENZY = 47774,
    //Global Abilities
    SPELL_MIGHT = 74507


};




//List of gossip item texts. Items will appear in the gossip window.


class Boss_Forgotten_AmirThezad : public CreatureScript
{
    public:


        Boss_Forgotten_AmirThezad()
            : CreatureScript("Boss_Forgotten_AmirThezad")
        {
        }


        struct Boss_Forgotten_AmirThezadAI : public ScriptedAI
        {
            // *** HANDLED FUNCTION ***
            //This is the constructor, called only once when the Creature is first created
            Boss_Forgotten_AmirThezadAI(Creature* creature) : ScriptedAI(creature) {}


            // *** CUSTOM VARIABLES ****
            //These variables are for use only by this individual script.
            //Nothing else will ever call them but us.
            uint32 Shadowbolt_Timer;
            uint32 Doom_Timer;
            uint32 Summon_Timer;
            uint32 Transform_Timer;
            uint32 Soulstrike_Timer;
            uint32 Necroticstrike_Timer;
            uint32 Icytouch_Timer;
            uint32 Frenzy_Timer;
            uint32 Phase;


            // *** HANDLED FUNCTION ***
            //This is called after spawn and whenever the core decides we need to evade
            void Reset()
            {
                 Phase = 1;
                Shadowbolt_Timer = 5000;
                Doom_Timer = 16000;
                Summon_Timer = 45000;
                Soulstrike_Timer = 8000;
                Necroticstrike_Timer = 4000;
                Icytouch_Timer = 13000;
                Transform_Timer = 0;
                Frenzy_Timer = 9000;
            }




            // *** HANDLED FUNCTION ***
            // Enter Combat called once per combat
            void EnterCombat(Unit* who)
            {
                //Say some stuff
                me->MonsterYell("Ich werde euch vernichten!", LANG_UNIVERSAL, NULL);
            }


            // *** HANDLED FUNCTION ***
            // Attack Start is called when victim change (including at start of combat)
            // By default, attack who and start movement toward the victim.
            //void AttackStart(Unit* who)
            //{
            //    ScriptedAI::AttackStart(who);
            //}


            // *** HANDLED FUNCTION ***
            // Called when going out of combat. Reset is called just after.
            void EnterEvadeMode()
            {

            }


            // *** HANDLED FUNCTION ***
            //Our Receive emote function


            // *** HANDLED FUNCTION ***
            //Update AI is called Every single map update (roughly once every 50ms if a player is within the grid)
            void UpdateAI(const uint32 uiDiff)
            {
                //Out of combat timers
                if (!me->getVictim())
                {




                }


                //Return since we have no target
                if (!UpdateVictim())
                    return;
                if (((me->GetHealth()*100 / me->GetMaxHealth()) < 50) && (Phase == 1))
                    {
                        me->MonsterYell("Raaaargh....ich...verändere...mich..", LANG_UNIVERSAL, NULL);
                        Phase = 2;
                    }
                if (((me->GetHealth()*100 / me->GetMaxHealth()) < 47) && (Phase == 2))
                {
                    Phase = 3;
                }
                if (((me->GetHealth()*100 / me->GetMaxHealth()) < 1) && (Phase == 3))
                {
                    Phase = 4;
                    me->MonsterYell("Ich...bin...verloren...Ich habe euch...enttäuscht, mein Meister!", LANG_UNIVERSAL, NULL);
                }
                        if (Phase == 1)
                        {
                            if (Shadowbolt_Timer <= uiDiff)
                            {
                                if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
                                DoCast(target, SPELL_SHADOWBOLT);
                                Shadowbolt_Timer = 5000;
                            }
                            else
                                Shadowbolt_Timer -= uiDiff;




                            if (Doom_Timer <= uiDiff)
                            {


                            if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
                            DoCast(target, SPELL_DOOM);

                            Doom_Timer = 16000;
                            }
                            else Doom_Timer -= uiDiff;



                            if (Summon_Timer <= uiDiff)
                            {
                                DoCast(me->getVictim(), SPELL_SUMMON);
                                Summon_Timer = 45000;
                            }
                            else
                                Summon_Timer -= uiDiff;
                        }


                        if(Phase == 2)
                        {
                            if (Transform_Timer <= uiDiff)
                            {
                            DoCast(me->getVictim(), SPELL_TRANSFORM);
                            Transform_Timer = 45000;
                            }
                            else Transform_Timer -= uiDiff;
                        }
                        if(Phase == 3)
                        {
                            if (Frenzy_Timer <= uiDiff)
                            {
                                DoCast(me, SPELL_FRENZY);
                                Frenzy_Timer = 9000;
                            }
                            else Frenzy_Timer -= uiDiff;
                            if (Soulstrike_Timer <= uiDiff)
                            {
                            DoCast(me->getVictim(), SPELL_SOULSTRIKE);
                            Soulstrike_Timer = 8000;
                            }
                                        else
                                            Soulstrike_Timer -= uiDiff;
                            if (Necroticstrike_Timer <= uiDiff)
                            {
                            DoCast(me->getVictim(), SPELL_NECROTICSTRIKE);
                            Necroticstrike_Timer = 4000;
                            }
                                        else
                                            Necroticstrike_Timer -= uiDiff;
                        if (Icytouch_Timer <= uiDiff)
                            {


                            if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
                            DoCast(target, SPELL_ICYTOUCH);

                            Icytouch_Timer = 13000;
                            }
                            else Icytouch_Timer -= uiDiff;
                        }





                DoMeleeAttackIfReady();
            }
        };


        CreatureAI* GetAI(Creature* creature) const
        {
            return new Boss_Forgotten_AmirThezadAI(creature);
        }




};


//This is the actual function called only once durring InitScripts()
//It must define all handled functions that are to be run in this script
void AddSC_Boss_Forgotten_AmirThezad()
{
    new Boss_Forgotten_AmirThezad();
}


No spoiler function here?

17
Level Design / Noggit Painting problem
« on: March 15, 2015, 02:42:53 pm »

I don't know what happend there. In noggit it's the same color.
I tried to clear the texture, but it doesn't work for me.
Any Idea?

18
Level Design / [QUESTION] Use continent adts as instance
« on: January 17, 2015, 06:36:00 pm »
Hey folks,
I have created my own continent, and now, i'm trying to create an instance with parts of the continent.
So, like "escape from durnholde". The Map already existe in the "normal" world.
Need a little hint. just rename the files to the instance name, doesn't work ;)
Thank you for your help :)

19
Serverside Modding / [QUESTION] CMake Error
« on: January 08, 2015, 08:53:48 pm »
Hey folks,

i've got a problem while i try to set up and compile my first server.
I try to set up an Trinity Server (maybe it's important).
Everytime i start "CMake-Gui", set up my Source and Build directory, click on "configure" i got an error.
If I ignore them and continue with clicking on "genrate" a window pop up:
"Error in configuration process, project Files my be invalid"
I've tried everything, install new compiler, other version of compiler, tried every single compiler from the list.
If someone know any solution, please tell me ;)
greetings Bizzle


20
Level Design / [Problem] WoW Error - Custom Patch
« on: December 23, 2014, 08:29:15 pm »
Hallo ;)
I've got a Problem with my custom Patch. I've followed the Tutorial and finished my work with noggit. Then i tried to go ingame and an error occurred.

This application has encountered a critical error:

ERROR #134 (0x85100086) Fatal Condition
Program:   C:WoWModdingClient335aTestWorld of Warcraftwow.exe

CMap::LoadWdt() failed WorldMapscustomcustom.wdt

I've checked the dbc in the patch and the server. Everything looks right.
Thanks for all help i get ;)
Bizzlesnaff

Ich packe die Beschreibung auch nochmal in Deutsch dazu, falls mein Englisch zu schlecht ist ;)
Also, ich habe nach dem Tutorial hier von der Seite versucht und alle Schritte mehrfach überprüft. Ich bin mir also (sehr) sicher, keinen Fehler gemacht zu haben. (Wobei dann kein Error auftreten würde)
Naja, auf jedenfall bei meinem ersten InGame Test habe ich folgenden WoW Error bekommen.

This application has encountered a critical error:

ERROR #134 (0x85100086) Fatal Condition
Program:   C:WoWModdingClient335aTestWorld of Warcraftwow.exe

CMap::LoadWdt() failed WorldMapscustomcustom.wdt

Ich hoffe mir kann jemand helfen. Könnte es daran liegen, dass ich zuviele ADTs dazugepackt habe? Die Map ist 62*62 Felder groß.
Vielen dank im Vorraus schonmal ;)
Bizzlesnaff

21
Noggit / problem with Noggit
« on: October 12, 2012, 01:22:07 am »
Hi :)
i have a little problem with noggit.

i have no idea what the hell the shadow make there.
Anyone knows how i can disable or remove that?

sorry for bad english :D

Pages: 1 [2]