[Npc] Dialogues [Npc]

Discussion in 'RuneScape Miscellaneous' started by xxavixx, Aug 20, 2008.

Thread Status:
Not open for further replies.
[Npc] Dialogues [Npc]
  1. Unread #1 - Aug 20, 2008 at 9:36 PM
  2. xxavixx
    Joined:
    Jan 15, 2008
    Posts:
    681
    Referrals:
    1
    Sythe Gold:
    0

    xxavixx Apprentice

    [Npc] Dialogues [Npc]

    Description: Add working Npc dialogues with options

    Difficulty: 1/10

    Assumed Knowledge: Basic java.
    Tested Server: Czar :p

    Files/Classes Modified: Client.java

    Procedure
    Step 1: Go into your client.java and look for:
    Code:
    public void UpdateNPCChat() {
    Step 2: Now add this: (change the case number to an unused one)

    Code:
            case #:
                sendFrame200(4883, 591);
                sendFrame126(GetNpcName(NpcTalkTo), 4884);
                sendFrame126("What you want npc to say", 4885);
                sendFrame75(NpcTalkTo, 4883);
                sendFrame164(4882);
                NpcDialogueSend = true;
                break;
    Step 3: For selection an option you add: (change the case number to an unused one).

    Code:
            case #:
                sendFrame171(1, 2465);
                sendFrame171(0, 2468);
                sendFrame126("Select an Option", 2460);
                sendFrame126("OPTION 1", 2461);
                sendFrame126("OPTION 2.", 2462);
                sendFrame164(2459);
                NpcDialogueSend = true;
                break
    Step 4: For making dialogue continue, search for:
    Code:
    case 40:
    Then you will see something like this:
    Code:
    if (NpcDialogue == 1 || NpcDialogue == 3)
    NpcDialogue += 1;//this is saying that if npc dialogue is 1, go to 2.
    NpcDialogueSend = false;
    Copy this and change the # for the case number of the first dialogue.
    Code:
    || NpcDialogue == #
    Now scroll down a little and you will see something similar to what you saw before but like this:
    Code:
    if (NpcDialogue == # || NpcDialogue == #)
    NpcDialogue = 0;//this mean the dialogue is
    NpcDialogueSend = false;//discontinued
    RemoveAllWindows();
    Add The option dialogue case number.

    Step 5: Making Options work:
    For this part, we will be working with case 9157 and 9158.
    Case 9157 = OPTION 1 (most of the time the "yes" option)
    Case 9158 = OPTION 2 (most of the time the "no" option)

    Search for:
    Code:
     case 9157
    This is the basic OPTION 1:
    Code:
    else if (NpcDialogue == #) {
    NpcDialogue = #;// this tells it to send a new dialogue.
    NpcDialogueSend = false;
    }
    You can add a lot of stuff here for example:
    Code:
    RemoveAllWindows();
    customCommand("a command");
    sendFrame126("What you want to say", 4885);
    sendMessage("What u want to say");
    teleportToX = ####;
    teleportToY = ####;
    openUpBank();
    openUpShop(shop number);
    The thing above can be used for case 9158, but mostly it is the "no" option, so you can add something like this:
    Code:
     else if (NpcDialogue == 41) {
     NpcDialogue = 0;
     NpcDialogueSend = false;
     RemoveAllWindows();
     }//this those nothing and closes the dialogue.


    Credits: xxavixx
     
  3. Unread #2 - Aug 20, 2008 at 9:54 PM
  4. locked1337
    Joined:
    Jul 12, 2008
    Posts:
    210
    Referrals:
    0
    Sythe Gold:
    0

    locked1337 Active Member

    [Npc] Dialogues [Npc]

    ok nvm i got ur pm...i hope i can get on silab soon though...

    i bet it was jagex who attacked it? dunno.
     
  5. Unread #3 - Aug 20, 2008 at 10:27 PM
  6. xxavixx
    Joined:
    Jan 15, 2008
    Posts:
    681
    Referrals:
    1
    Sythe Gold:
    0

    xxavixx Apprentice

    [Npc] Dialogues [Npc]

    ye i was thinking that, all p server-related sites attacked at the same time.
     
< need a coder | er...sialb not loading??? :( >

Users viewing this thread
1 guest
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site