Adding new dialogues doesn't work

Results 1 to 2 of 2
  1. #1
    Enthusiast ElMaqui is offline
    MemberRank
    May 2020 Join Date
    FranceLocation
    38Posts

    Adding new dialogues doesn't work

    Hi ! I created a new NPC and added dialogs to him, but they doesn't work except the Speak() function.
    NpcScript.cpp
    Code:
    void CNpcScript::mafl_latmayor_0()
    {
        Speak(NpcId(), 1548);
        SetScriptTimer(15);
    }
    
    void CNpcScript::mafl_latmayor_1()
    {
    
    }
    
    void CNpcScript::mafl_latmayor_2()
    {
        AddKey(9);
        AddKey(10);
    }
    
    void CNpcScript::mafl_latmayor_3()
    {
        Say(1550);
    }
    
    void CNpcScript::mafl_latmayor_4()
    {
        Say(1551);
    }
    
    void CNpcScript::mafl_latmayor_5()
    {
    
    }
    
    void CNpcScript::mafl_latmayor_6()
    {
    
    }
    
    void CNpcScript::mafl_latmayor_7()
    {
    
    }
    
    void CNpcScript::mafl_latmayor_8()
    {
    
    }
    
    void CNpcScript::mafl_latmayor_9()
    {
        Say(1549);
    }
    
    void CNpcScript::mafl_latmayor_10()
    {
        Speak(NpcId(), 1552);
        Exit();
    }
    NpcScript.h
    Code:
    void mafl_latmayor_0();
        void mafl_latmayor_1();
        void mafl_latmayor_2();
        void mafl_latmayor_3();
        void mafl_latmayor_4();
        void mafl_latmayor_5();
        void mafl_latmayor_6();
        void mafl_latmayor_7();
        void mafl_latmayor_8();
        void mafl_latmayor_9();
        void mafl_latmayor_10();
    NpcScriptHelper.cpp
    Code:
    { "mafl_latmayor_0", &CNpcScript::mafl_latmayor_0 },
        { "mafl_latmayor_1", &CNpcScript::mafl_latmayor_1 },
        { "mafl_latmayor_2", &CNpcScript::mafl_latmayor_2 },
        { "mafl_latmayor_3", &CNpcScript::mafl_latmayor_3 },
        { "mafl_latmayor_4", &CNpcScript::mafl_latmayor_4 },
        { "mafl_latmayor_5", &CNpcScript::mafl_latmayor_5 },
        { "mafl_latmayor_6", &CNpcScript::mafl_latmayor_6 },
        { "mafl_latmayor_7", &CNpcScript::mafl_latmayor_7 },
        { "mafl_latmayor_8", &CNpcScript::mafl_latmayor_8 },
        { "mafl_latmayor_9", &CNpcScript::mafl_latmayor_9 },
        { "mafl_latmayor_10", &CNpcScript::mafl_latmayor_10 }
    character.inc
    Code:
    MaFl_LatMayor
    {
        setting
        {
            AddMenu( MMI_DIALOG );
            AddMenu( MMI_SECRET_TAXRATES_CHECK );
    
    
            SetImage
            (
            IDS_CHARACTER_INC_000489
            );
            m_szDialog= "MaFl_LatMayor.txt";
        }
    
        SetName
        (
        IDS_CHARACTER_INC_001221
        );
    }
    WorldDialog.txt
    Started at line 1549
    Code:
    Test1
    Test2
    Test3
    Test4
    Test5
    I compiled WorldDialog and replace WorldDialog.dll in my resource folder, "Test1" is working, I can see the text bubble.
    I don't get it why it doesn't work, if someone could help me, thanks !


  2. #2
    Enthusiast ElMaqui is offline
    MemberRank
    May 2020 Join Date
    FranceLocation
    38Posts

    Re: Adding new dialogues doesn't work

    I finally found the error, the function mafl_latmayor_1() must contain "LaunchQuest();", stupid error, mb.



Advertisement