Jump to content

dixo1

Members
  • Posts

    9
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by dixo1

  1. ye the title says it all ;)

    Anyone got some code that do so when you ress you will start with 100% health and mana, and if you are rouge you get 100% energy? That would be awosme.

    I tryed once to script it my self but my skillz in c++ is getting worse and worse so it would be cool if a guy out there (or a her) would support me with this thing ^_^

  2. Awesome work, finally a nice version :)

    Still im a bit scared currently cause since 3.X.X they seem to log also the realmlist that was a reason why several Servers (I don't say any names) got closed already.

    Can we use this new branch without being feared that Blizzard make trouble?

    No they closed becuse they go letters from them, but after the servers were closed it got up that the letters should be fake becuse there was spelling mistakes and gramma mistakes inside the letter.

    And Blizzard would not send a letter out with gramma and spelling mistakes out to the biggest servers out there?

    There for i just sugged people to stay carm about it ^_^

    And by the way blizzard dont have a change to close privat servers that are hosted from home, but servers that got a server box from a hosting firma is easy to host ;)

    But unto now blizzard have bin tryed seral times but they faild, i just think thouse letters is from some supid kids trying to care other servers to close so they can get more players on there servers ;)

  3. Oka i edited a script and now i get compling errors :( Can anyone help me ?

    Error

    1>------ Build started: Project: ScriptDev2, Configuration: Release Win32 ------
    1>Extracting Revision
    1>d:\\mangos\\src\\bindings\\ScriptDev2\\VC90>cd "D:\\mangos\\src\\bindings\\ScriptDev2\\" 
    1>D:\\mangos\\src\\bindings\\ScriptDev2>"..\\..\\..\\win\\VC90\\genrevision__Win32_Release\\genrevision.exe"
    1>D:\\mangos\\src\\bindings\\ScriptDev2>if errorlevel 1 goto VCReportError 
    1>D:\\mangos\\src\\bindings\\ScriptDev2>goto VCEnd 
    1>Compiling...
    1>custom_example.cpp
    1>..\\scripts\\custom\\custom_example.cpp(149) : error C2059: syntax error : 'if'
    1>..\\scripts\\custom\\custom_example.cpp(150) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
    1>..\\scripts\\custom\\custom_example.cpp(154) : error C2059: syntax error : 'else'
    1>..\\scripts\\custom\\custom_example.cpp(154) : error C2238: unexpected token(s) preceding ';'
    1>..\\scripts\\custom\\custom_example.cpp(156) : error C2059: syntax error : 'if'
    1>..\\scripts\\custom\\custom_example.cpp(158) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
    1>..\\scripts\\custom\\custom_example.cpp(164) : error C2059: syntax error : 'else'
    1>..\\scripts\\custom\\custom_example.cpp(164) : error C2238: unexpected token(s) preceding ';'
    1>..\\scripts\\custom\\custom_example.cpp(166) : error C2059: syntax error : 'if'
    1>..\\scripts\\custom\\custom_example.cpp(168) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
    1>..\\scripts\\custom\\custom_example.cpp(172) : error C2059: syntax error : 'else'
    1>..\\scripts\\custom\\custom_example.cpp(172) : error C2238: unexpected token(s) preceding ';'
    1>..\\scripts\\custom\\custom_example.cpp(174) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>..\\scripts\\custom\\custom_example.cpp(174) : warning C4183: 'DoMeleeAttackIfReady': missing return type; assumed to be a member function returning 'int'
    1>..\\scripts\\custom\\custom_example.cpp(176) : error C2143: syntax error : missing ';' before '}'
    1>..\\scripts\\custom\\custom_example.cpp(176) : error C2059: syntax error : '}'
    1>..\\scripts\\custom\\custom_example.cpp(176) : error C2143: syntax error : missing ';' before '}'
    1>..\\scripts\\custom\\custom_example.cpp(176) : error C2059: syntax error : '}'
    1>Build log was saved at "file://d:\\mangos\\src\\bindings\\ScriptDev2\\VC90\\ScriptDev2__Win32_Release\\BuildLog.htm"
    1>ScriptDev2 - 17 error(s), 1 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    
    

    custom_example.cpp

    #include "precompiled.h"
    
    #define SPELL_BUFF      25661
    #define SPELL_ONE       27079
    #define SPELL_ONE_ALT   27079
    #define SPELL_TWO       27228
    #define SPELL_THREE     27243
    #define SPELL_FOUR     1020
    #define SPELL_FIVE     27154
    #define SPELL_SIX   30546
    #define SPELL_ENRAGE    23537
    #define SPELL_BESERK    32309
    
    #define SAY_AGGRO       "Let the games begin."
    #define SAY_RANDOM_0    "I see endless suffering. I see torment. I see rage. I see everything."
    #define SAY_RANDOM_1    "Muahahahaha"
    #define SAY_RANDOM_2    "These mortal infedels my lord, they have invaded your sanctum and seek to steal your secrets."
    #define SAY_RANDOM_3    "You are already dead."
    #define SAY_RANDOM_4    "Where to go? What to do? So many choices that all end in pain, end in death."
    #define SAY_BESERK      "$N, I sentance you to death!"
    #define SAY_PHASE       "The suffering has just begun!"
    
    #define GOSSIP_ITEM     "I'm looking for a fight"
    #define SAY_DANCE       "I always thought I was a good dancer"
    #define SAY_SALUTE      "Move out Soldier!"
    
    struct MANGOS_DLL_DECL custom_exampleAI : public ScriptedAI
    {
       custom_exampleAI(Creature *c) : ScriptedAI(c) {Reset();}
    
       uint32 Say_Timer;
       uint32 Rebuff_Timer;
       uint32 Spell_1_Timer;
       uint32 Spell_2_Timer;
       uint32 Spell_3_Timer;
       uint32 Spell_4_Timer;
       uint32 Spell_5_Timer;
       uint32 Spell_6_Timer;
       uint32 Beserk_Timer;
       uint32 Phase;
       uint32 Phase_Timer;
    
       void Reset()
       {
           Phase = 1;
           Phase_Timer = 60000;
           Spell_1_Timer = 10000;
           Spell_2_Timer = 29000;
           Spell_3_Timer = 50000;
           Spell_4_Timer = 300000;
           Spell_5_Timer = 302000;
           Spell_6_Timer = 31000;
           Beserk_Timer = 320000;
       }
    
       void Aggro(Unit *who)
       {
           DoSay(SAY_AGGRO,LANG_UNIVERSAL,NULL);
           DoPlaySoundToSet(m_creature,8280);
       }
    
       void UpdateAI(const uint32 diff)
       {
           if (!m_creature->getVictim())
           {
               if (Say_Timer < diff)
               {
                   switch (rand()%5)
                   {
                       case 0:
                           DoYell(SAY_RANDOM_0,LANG_UNIVERSAL,NULL);
                           DoPlaySoundToSet(m_creature,8831);  //8831 is the index of the sound we are playing. You find these numbers in SoundEntries.dbc
                           break;
    
                       case 1:
                           DoYell(SAY_RANDOM_1,LANG_UNIVERSAL,NULL);
                           DoPlaySoundToSet(m_creature,8818);
                           break;
    
                       case 2:
                           DoYell(SAY_RANDOM_2,LANG_UNIVERSAL,NULL);
                           DoPlaySoundToSet(m_creature,8041);
                           break;
    
                       case 3:
                           DoYell(SAY_RANDOM_3,LANG_UNIVERSAL,NULL);
                           DoPlaySoundToSet(m_creature,8581);
                           break;
    
                       case 4:
                           DoYell(SAY_RANDOM_4,LANG_UNIVERSAL,NULL);
                           DoPlaySoundToSet(m_creature,8791);
                           break;
                   }
    
                   Say_Timer = 45000;                          //Say something agian in 45 seconds
               }else Say_Timer -= diff;
    
               if (Rebuff_Timer < diff)
               {
                   DoCast(m_creature,SPELL_BUFF);
                   Rebuff_Timer = 900000;                      //Rebuff agian in 15 minutes
               }else Rebuff_Timer -= diff;
           }
    
           if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
               return;
    
           if (Spell_1_Timer < diff)
           {
               if (rand()%50 > 10)
                   DoCast(m_creature->getVictim(),SPELL_ONE_ALT);
               else if (m_creature->GetDistance(m_creature->getVictim()) < 25)
                   DoCast(m_creature->getVictim(),SPELL_ONE);
    
               Spell_1_Timer = 10000;
           }else Spell_1_Timer -= diff;
    
           if (Spell_2_Timer < diff)
           {
               DoCast(m_creature->getVictim(),SPELL_TWO);
    
               Spell_2_Timer = 29000;
           }else Spell_2_Timer -= diff;
    
           if (Phase > 1)
               if (Spell_3_Timer < diff)
           {
               DoCast(m_creature->getVictim(),SPELL_THREE);
    
               Spell_3_Timer = 50000;
           }else Spell_3_Timer -= diff;
    
           if (Phase > 1)
               if (Spell_4_Timer < diff)
           {
               DoCast(m_creature->getVictim(),SPELL_FOUR);
    
               Spell_4_Timer = 300000;
           }else Spell_4_Timer -= diff;
    
               if (Spell_5_Timer < diff)
               {
                   DoCast(m_creature,SPELL_FIVE);
                   Spell_5_Timer = 302000;
               }else Spell_5_Timer -= diff;
           }
                //cast spell
               if (Spell_6_Timer < diff)
           {
               DoCast(m_creature->getVictim(),SPELL_SIX);
    
               Spell_6_Timer = 31000;
           }else Spell_6_Timer -= diff;
    
           if (Phase > 1)
               if (Beserk_Timer < diff)
           {
               DoPlaySoundToSet(m_creature,8588);
               DoYell(SAY_BESERK,LANG_UNIVERSAL,m_creature->getVictim());
               DoCast(m_creature->getVictim(),SPELL_BESERK);
    
               Beserk_Timer = 320000;
           }else Beserk_Timer -= diff;
    
           if (Phase == 1)
               if (Phase_Timer < diff)
           {
               Phase++;
               DoYell(SAY_PHASE,LANG_UNIVERSAL,NULL);
               DoCast(m_creature,SPELL_ENRAGE);
           }else Phase_Timer -= diff;
    
           DoMeleeAttackIfReady();
       }
    };
    
    CreatureAI* GetAI_custom_example(Creature *_Creature)
    {
       return new custom_exampleAI (_Creature);
    }
    
    void SendDefaultMenu_custom_example(Player *player, Creature *_Creature, uint32 action)
    {
       if (action == GOSSIP_ACTION_INFO_DEF + 1)
       {
           _Creature->setFaction(24);
           _Creature->Attack(player, true);
           player->PlayerTalkClass->CloseGossip();
       }
    }
    
    bool GossipSelect_custom_example(Player *player, Creature *_Creature, uint32 sender, uint32 action )
    {
       if (sender == GOSSIP_SENDER_MAIN)
           SendDefaultMenu_custom_example(player, _Creature, action);
    
       return true;
    }
    
    bool GossipHello_custom_example(Player *player, Creature *_Creature)
    {
       player->ADD_GOSSIP_ITEM( 0, GOSSIP_ITEM        , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
       player->PlayerTalkClass->SendGossipMenu(907,_Creature->GetGUID());
    
       return true;
    }
    
    bool ReceiveEmote_custom_example(Player *player, Creature *_Creature, uint32 emote)
    {
       _Creature->HandleEmoteCommand(emote);
    
       if (emote == TEXTEMOTE_DANCE)
           ((custom_exampleAI*)_Creature->AI())->DoSay(SAY_DANCE,LANG_UNIVERSAL,NULL);
    
       if (emote == TEXTEMOTE_SALUTE)
           ((custom_exampleAI*)_Creature->AI())->DoSay(SAY_SALUTE,LANG_UNIVERSAL,NULL);
    
       return true;
    }
    
    void AddSC_custom_example()
    {
       Script *newscript;
    
       newscript = new Script;
       newscript->Name = "custom_example";
       newscript->GetAI = &GetAI_custom_example;
       newscript->pGossipHello = &GossipHello_custom_example;
       newscript->pGossipSelect = &GossipSelect_custom_example;
       newscript->pReceiveEmote = &ReceiveEmote_custom_example;
       newscript->RegisterSelf();
    }
    
    

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use