Custom Starting Cinematic menu

User Tag List

Results 1 to 14 of 14
  1. #1
    Appled's Avatar Contributor
    Reputation
    105
    Join Date
    Apr 2007
    Posts
    568
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Custom Starting Cinematic

    Hello there.
    I've been working on my new funserver, and I am trying to make custom starting cinematic. You know the one for each race plus for DKs when you create new character. I want to change the cinematic to 'Fall of the Lich King' clip (It's found from your wow cinematics folder).
    '16' is the ID for the movie. If you want to check out the movie ingame, type !debug play movie 16.
    Anyways the code in characterhandler.cpp looks like this:
    Code:
        //Show cinematic at the first time that player login
        if (!pCurrChar->getCinematic())
        {
            pCurrChar->setCinematic(1);
    
      if (ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(pCurrChar->getClass()))
            {
                if (cEntry->CinematicSequence)
                    pCurrChar->SendCinematicStart(cEntry->CinematicSequence);
                else if (ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(pCurrChar->getRace()))
                    pCurrChar->SendCinematicStart(rEntry->CinematicSequence);
    
                  // send new char string if not empty
                if (!sWorld->GetNewCharString().empty())
                    chH.PSendSysMessage("%s", sWorld->GetNewCharString().c_str());
            }
        }

    I've tried to change it to this.

    Code:
        //Show cinematic at the first time that player login
        if (!pCurrChar->getCinematic())
        {
            pCurrChar->setCinematic(1);
            pCurrChar->SendMovieStart(16);
        }

    But that didn't work at all. Then I made this one:

    Code:
        //Show cinematic at the first time that player login
        if (!pCurrChar->getCinematic())
        {
            pCurrChar->setCinematic(1);
            data.Initialize(SMSG_TRIGGER_MOVIE, 4);
            data << uint32(16);
            SendPacket(&data);
        }

    When I have that code, my cursor disappears and I can get it back only if I relog.
    Any ideas how could I make it work? I have already edited DBC files and removed cinematic ids from chrclasses.dbc and chrraces.dbc.

    The best regards,

    Appled of MMOwned.
    Last edited by Appled; 01-30-2011 at 08:07 AM. Reason: Fixing stuff

    Custom Starting Cinematic
  2. #2
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Change the text colour. It's HORRIBLE.

    Anyway, on topic I had the same issue and made a question about it around patch 3.1.

    Basically the issue is that your trying to play a cinematic before the character has finished loading up, to fix this I actually changed where the packet is sent to play the cinematic, in ArcEmu. Hooking on first login etc didn't work.

    Within Trinity however, I have no idea.

    edit: After struggling to read your post I realised your sending the CINEMATIC packet and not the MOVIE packet. There's a big difference.

    Just went and grabbed the packet from one of my old Lua scripts:

    Code:
    	local PlayersAllAround = pUnit:GetInRangePlayers()
    	for a, players in pairs(PlayersAllAround) do
    	--SMSG_TRIGGER_MOVIE = 0x464
    	local packet = LuaPacket:CreatePacket(0x464, 4)
    	packet:WriteULong(16) -- Id 16
    	players:SendPacketToPlayer(packet) -- Send to players
    	end
    It's basically the same structure.

    edit2: After rereading your post yet again it seems you are using the right packet.

    I will stick with my initial response.
    Last edited by stoneharry; 01-30-2011 at 08:10 AM.

  3. #3
    Appled's Avatar Contributor
    Reputation
    105
    Join Date
    Apr 2007
    Posts
    568
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You mean I should change the movie packet to cinematic packet instead?
    And I think the color is fine now.

    EDIT: Would be nice, if you pm your msn Harry. If you use msn anymore...
    Last edited by Appled; 01-30-2011 at 08:29 AM.

  4. #4
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    No it's fine as a movie packet, I misread it.

    I can't red the dark red at all on the dark backgrounds of these forums.

    The issue is because the movie is played before the character has finished loading. I remember now, blimey this was a long time ago I did this.

    You have to make another script that plays the movie on first login (use the hook). Using it here in the character handler just flashes the screen as it hasn't finished loading the char.

    Also I haven't used msn in ages, [email protected] or PM me here.

  5. #5
    Appled's Avatar Contributor
    Reputation
    105
    Join Date
    Apr 2007
    Posts
    568
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is it what it looks like right now. Nothing still happens. I removed the part of code from characterhandler.cpp and made a new script, and inserted that to source. Script says:
    Code:
    #include "ScriptPCH.h"
    #include "ScriptMgr.h"
    
    class FirstLogin : public PlayerScript
    {
    public:
    
        FirstLogin()
            : PlayerScript("FirstLogin")
        {
        }
    
        void OnPlayerLogin(Player* player)
        {
        if(player->HasFlag(AT_LOGIN_FIRST, true))
            player->SendMovieStart(16);
        }
    };
    void AddSC_FirstLogin()
    {
        new FirstLogin();
    }
    Nothing happens: /
    Any ideas?

  6. #6
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Try making it happen a second after logging in then see if it works.

  7. #7
    Appled's Avatar Contributor
    Reputation
    105
    Join Date
    Apr 2007
    Posts
    568
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Still nothing. Script looks like this at the moment:
    Code:
    #include "ScriptPCH.h"
    #include "ScriptMgr.h"
    
    class FirstLogin : public PlayerScript
    {
    public:
    
        FirstLogin()
            : PlayerScript("FirstLogin")
        {
        }
    
        uint32 MovieTimer;
    
        void OnPlayerLogin(Player* player, const uint32 diff)
        {
        MovieTimer = 1000;
        if(player->HasFlag(AT_LOGIN_FIRST, true))
        {
            if(MovieTimer <= diff)
            {
                player->SendMovieStart(16);
            }
            else
            {
                MovieTimer -= diff;
            }
        }
        }
    };
    void AddSC_FirstLogin()
    {
        new FirstLogin();
    }

  8. #8
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Mmmm... Have you checked to see if the packet is actually working? (Make it trigger on a chat message / through a gossip menu or something to test it).

  9. #9
    Appled's Avatar Contributor
    Reputation
    105
    Join Date
    Apr 2007
    Posts
    568
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, if '!debug play movie' command works, the packet should work aswell.
    Code:
        static bool HandleDebugPlayMovieCommand(ChatHandler* handler, const char* args)
        {
            // USAGE: .debug play movie #movieid
            // #movieid - ID decimal number from Movie.dbc (1st column)
            if (!*args)
            {
                handler->SendSysMessage(LANG_BAD_VALUE);
                handler->SetSentErrorMessage(true);
                return false;
            }
    
            uint32 dwId = atoi((char*)args);
    
            if (!sMovieStore.LookupEntry(dwId))
            {
                handler->PSendSysMessage(LANG_MOVIE_NOT_EXIST, dwId);
                handler->SetSentErrorMessage(true);
                return false;
            }
    
            handler->GetSession()->GetPlayer()->SendMovieStart(dwId);
            return true;
        }
    EDIT: Should I edit characterhandler.cpp?
    Last edited by Appled; 01-30-2011 at 03:23 PM.

  10. #10
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Well aye, that works.

    However I still don't understand why it's not working on your script. From previous experience all I had to do was to hook it to happen after the characterhandler.cpp stuff had finished loading (so the character was fully in game) then sending the packet. This worked using a on first login hook, and should also have worked doing it a second after login.

    You shouldn't have it in the characterhandler at all (at least not where the cinematics are normally sent) since all you will get is a black screen flash from where it begins to play and then is interrupted.

  11. #11
    Appled's Avatar Contributor
    Reputation
    105
    Join Date
    Apr 2007
    Posts
    568
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah I took
    Code:
     //Show cinematic at the first time that player login
        if (!pCurrChar->getCinematic())
        {
            pCurrChar->setCinematic(1);
    
      if (ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(pCurrChar->getClass()))
            {
                if (cEntry->CinematicSequence)
                    pCurrChar->SendCinematicStart(cEntry->CinematicSequence);
                else if (ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(pCurrChar->getRace()))
                    pCurrChar->SendCinematicStart(rEntry->CinematicSequence);
    
                  // send new char string if not empty
                if (!sWorld->GetNewCharString().empty())
                    chH.PSendSysMessage("%s", sWorld->GetNewCharString().c_str());
            }
        }
    totally away.

  12. #12
    Appled's Avatar Contributor
    Reputation
    105
    Join Date
    Apr 2007
    Posts
    568
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I fixed this.

  13. #13
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Appled View Post
    I fixed this.
    What did you do in the end?

  14. #14
    Appled's Avatar Contributor
    Reputation
    105
    Join Date
    Apr 2007
    Posts
    568
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Uhh I think I sent you a private message...But here's the message if somebody wants this to work.

    First of all I deleted cinematic.cpp with the hook first login and stuff, then unlinked cinematic.cpp from project and took it also away from scriptloader.cpp.
    Then I edited characterhandler.cpp
    I changed this:
    Code:
    //Show cinematic at the first time that player login
        if (!pCurrChar->getCinematic())
        {
            pCurrChar->setCinematic(1);
    
            if (ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(pCurrChar->getClass()))
            {
                if (cEntry->CinematicSequence)
                    pCurrChar->SendCinematicStart(cEntry->CinematicSequence);
                else if (ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(pCurrChar->getRace()))
                    pCurrChar->SendCinematicStart(rEntry->CinematicSequence);
    
                // send new char string if not empty
                if (!sWorld->GetNewCharString().empty())
                    chH.PSendSysMessage("%s", sWorld->GetNewCharString().c_str());
            }
    to
    Code:
        //Show cinematic at the first time that player login
        if (!pCurrChar->getCinematic())
                pCurrChar->setCinematic(1);
    so the client and database knows that we have already seen the cinematic and don't need to show it again.
    Then I went a bit lower and found this:
    Code:
        if (pCurrChar->HasAtLoginFlag(AT_LOGIN_FIRST))
            pCurrChar->RemoveAtLoginFlag(AT_LOGIN_FIRST);
    I changed that to:
    Code:
        if (pCurrChar->HasAtLoginFlag(AT_LOGIN_FIRST))
        {
            pCurrChar->SendMovieStart(16);
            pCurrChar->RemoveAtLoginFlag(AT_LOGIN_FIRST);
        }
    and it works perfectly!
    I knew that I have to edit characterhandler.cpp
    But thanks for your help anyways Harry.

    The best regards,
    Appled of MMOwned

Similar Threads

  1. Quest Help/Leveling Help (Custom Start Zone)
    By guitargod218 in forum World of Warcraft Emulator Servers
    Replies: 8
    Last Post: 05-27-2008, 07:42 PM
  2. [Help Needed]How to make Custom Start Location?
    By Joonas in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 05-10-2008, 04:07 AM
  3. [Request] Custom Starting Location
    By sirkhan in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 02-22-2008, 08:10 PM
  4. Custom Starting Zones
    By freeride474 in forum WoW EMU Guides & Tutorials
    Replies: 6
    Last Post: 02-20-2008, 03:25 PM
  5. [Release] New Custom Starting Zone
    By freeride474 in forum World of Warcraft Emulator Servers
    Replies: 21
    Last Post: 02-09-2008, 01:08 AM
All times are GMT -5. The time now is 03:57 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search