[tut] Npc Dialogue (Clean!)

Results 1 to 11 of 11
  1. #1
    Apprentice Roger is offline
    MemberRank
    Apr 2008 Join Date
    16Posts

    [tut] Npc Dialogue (Clean!)

    Npc Dialogue
    Created by: Roger
    Hardness: 3/10

    (Roger from Havenworld)

    First of all, you got to declare this method..
    At the end of your client java add this..

    Code:
    public void npt() {
      sendFrame200(4883, 591);
      sendFrame126(GetNpcName(NpcTalkTo), 4884);
      sendFrame75(NpcTalkTo, 4883);
      sendFrame164(4882);
      NpcDialogueSend = true;
      }
    It's a bit diffrent from other npc dialogue tuts, but this will clean it up in the long run.
    Basicilly it tells it when you use the npt(); void to do all this, which sends frame, gets the npc name etc.

    In Client.java serach:
    Code:
    public void UpdateNPCChat() {
    Add this...

    Code:
    case 11:
      npt();
      sendFrame126("What you want to say here?"4885);
      break;
    You see that npt();?
    That's the void we called on, it does what the void does, just in a shorter form..
    It'll save up room when you have to do many dialogues.

    The sendFrame126("What you want to say here?"4885); is what the npc will say and the interface ID.
    Break; , well you must know what that means.

    =============================================


    Now, to make it work..
    In your Client.java search for..
    Code:
    First click
    Now.. add this
    Code:
    }
    else if (NPCID == ###) {
      skillX = server.npcHandler.npcs[NPCSlot].absX;
      skillY = server.npcHandler.npcs[NPCSlot].absY;
      NpcWanneTalk = %%%;
      }
    ### = NPC ID
    %%% = Case ID



    **NOTE**
    You must not have the same case or it will not work. For longer converstions read on..
    =============================================

    Extended NPC DIALOGUE

    Let's say we wanted to make more npc dialogue?
    Well, we would make some more cases.

    After case 11, add case 12, 13, etc.
    Well, to do that we must link it.

    In Client.java search:
    Code:
    case 40:
    You will perhaps see some things like this..
    Code:
    if (NpcDialogue == 16 || NpcDialogue == 17 || NpcDialogue == 18) {
      NpcDialogue += 1;
      NpcDialogueSend = false;
        } else if
          ((NpcDialogue == 19)) {
          NpcDialogue = 0;
          NpcDialogueSend = false;
          RemoveAllWindows();
            } else {
            closeInterface();
            }
    What it means is, if DIALOGUE CASE = 16 or 17 or 18, go up by ONE case.
    But if DIALOGUE case = 19, dont send anything and remove all windows.

    You'll get it.. after that bracket you can add what you have learned.


  2. #2
    Account Upgraded | Title Enabled! lord-retro is offline
    MemberRank
    May 2007 Join Date
    In your kitchen cupboard; eating your cookies =) Go Check. Bet you can't find me =PLocation
    502Posts

    Re: Npc Dialogue (Clean!)

    Nice, cleanly set out, easy to read, great for new people to use!

  3. #3
    Super Mexican Joser is offline
    MemberRank
    Jun 2008 Join Date
    Your mom's roomLocation
    1,656Posts

    Re: Npc Dialogue (Clean!)

    Hardness: 3/10
    OMG lol this is really funny to me !

  4. #4
    change my name already! I Rule MU is offline
    MemberRank
    Apr 2007 Join Date
    JerseyLocation
    4,220Posts

    Re: Npc Dialogue (Clean!)

    You forgot the [Tut] tags mate :P

    But pretty cool guide!

  5. #5
    Account Upgraded | Title Enabled! lord-retro is offline
    MemberRank
    May 2007 Join Date
    In your kitchen cupboard; eating your cookies =) Go Check. Bet you can't find me =PLocation
    502Posts

    Re: [tut] Npc Dialogue (Clean!)

    is this for what they NPC say above there heads, or what they say when you talk to them?

  6. #6
    Canadian Mike is offline
    MemberRank
    Dec 2007 Join Date
    Toronto, ONLocation
    2,747Posts

    Re: [tut] Npc Dialogue (Clean!)

    Quote Originally Posted by lord-retro View Post
    is this for what they NPC say above there heads, or what they say when you talk to them?
    Dialogue would be what they say to you. To change what's over their heads, as I recall, you go into NPCHandler.java or something of the sort.

  7. #7
    Account Upgraded | Title Enabled! lord-retro is offline
    MemberRank
    May 2007 Join Date
    In your kitchen cupboard; eating your cookies =) Go Check. Bet you can't find me =PLocation
    502Posts

    Re: [tut] Npc Dialogue (Clean!)

    yeah i got it now, Figured it out for myself!

  8. #8
    Apprentice mmm232 is offline
    MemberRank
    Apr 2008 Join Date
    8Posts

    Re: [tut] Npc Dialogue (Clean!)

    Bad tut you dont even tell us how to stick the NPC in a certain place like I know you enter coords but were? Thanks anyway I just find a better more easier tut

  9. #9
    Account Upgraded | Title Enabled! lord-retro is offline
    MemberRank
    May 2007 Join Date
    In your kitchen cupboard; eating your cookies =) Go Check. Bet you can't find me =PLocation
    502Posts

    Re: [tut] Npc Dialogue (Clean!)

    no this is good, he is assuming you know it.

    There are many tuts on how to make NPC's.

    I didnt see How to add npc in title? hes talking about dialogue -.-

  10. #10
    Apprentice mmm232 is offline
    MemberRank
    Apr 2008 Join Date
    8Posts

    Re: [tut] Npc Dialogue (Clean!)

    Yea but problem is doesnt really work for me I didnt even think bout using my autospawn 0.0 dont know why sorry bout that earlier but yet still doesnt work for me I done it all in client.java gives me 100 errors when compiling

  11. #11
    Enthusiast littlesten is offline
    MemberRank
    Feb 2009 Join Date
    EnglandLocation
    25Posts

    Re: [tut] Npc Dialogue (Clean!)

    Quote Originally Posted by mmm232 View Post
    Bad tut you dont even tell us how to stick the NPC in a certain place like I know you enter coords but were? Thanks anyway I just find a better more easier tut
    The title actualy says '[tut] Npc Dialogue (Clean!)' which basically means a tut for NPC Dialogue and not a tut for how to create an NPC. Anyway this is a nice tut thanks



Advertisement