Thread: NPC Dialogue

Results 1 to 10 of 10
  1. #1 NPC Dialogue 
    Registered Member King Vexille's Avatar
    Join Date
    Nov 2008
    Age
    28
    Posts
    479
    Thanks given
    6
    Thanks received
    0
    Rep Power
    22
    I added the Skillcape npc dialogue tutorial by Tony...but when ever I speak to the master, the interface shows "Name and Line1" not (ex: Cap'n Izzy No-beard and Congratz on 99 agility)

    I can post a picture if you want me too.
    Quote Originally Posted by ViporZian View Post
    i no hef mudkipz.java?
    Sitting in this room, playing Russian Roulette. Finger on the trigger to My Dear Juliet....

    Reply With Quote  
     

  2. #2  
    Member

    Join Date
    Dec 2007
    Posts
    1,094
    Thanks given
    8
    Thanks received
    8
    Rep Power
    0
    You have to use the setString method, how many lines are you using?
    Reply With Quote  
     

  3. #3  
    Registered Member King Vexille's Avatar
    Join Date
    Nov 2008
    Age
    28
    Posts
    479
    Thanks given
    6
    Thanks received
    0
    Rep Power
    22
    I have 2 setString Methods. one for the name, and one for the message.

    And I took this out of the original code, since I kept getting errors from it.

    p.NpcDialogue = 0;
    p.NpcDialogueSend = true;


    Do I need that to have the dialogue pop up?
    Quote Originally Posted by ViporZian View Post
    i no hef mudkipz.java?
    Sitting in this room, playing Russian Roulette. Finger on the trigger to My Dear Juliet....

    Reply With Quote  
     

  4. #4  
    Member

    Join Date
    Dec 2007
    Posts
    1,094
    Thanks given
    8
    Thanks received
    8
    Rep Power
    0
    Here is an example of a one line dialogue.
    Code:
    	public static void getOneLine(Player p, int intNpcId, String strNpcName, String strMessage) {
    		p.frames.showChatboxInterface(p, 241);
    		p.frames.animateInterfaceId(p, 9827, 241, 2);
    		p.frames.setNPCId(p, intNpcId, 241, 2);
    		p.frames.setString(p, strNpcName, 241, 3);
    		p.frames.setString(p, strMessage, 241, 4);
    	}
    Just call getOneLine(p, id, name, message);

    under which npcs you want talking.

    also changed the id, name, and message to the appropriate things.

    here is a man

    Code:
    getOneLine(p, 1, "Man", "Hello there!");
    Reply With Quote  
     

  5. #5  
    Registered Member King Vexille's Avatar
    Join Date
    Nov 2008
    Age
    28
    Posts
    479
    Thanks given
    6
    Thanks received
    0
    Rep Power
    22
    Wait, so I don't get it. (New to this)

    Do i declare the void in a file or something?

    And, the getOneLine, does that have anything to do with my p.NpcDialogue?


    Like, here's the code I'm using:

    Code:
    case 270: /* Agility Master */
       			p.frames.showChatboxInterface(p, 241);
                    	p.frames.animateInterfaceId(p, 9847, 241, 2);
                    	p.frames.setNPCId(p, 437, 241, 2);
                    	p.frames.setString(p, "Cap'n Izzy No-Beard", 241, 3);
    			if (p.skillLvl[16] < 99) {
                    	p.frames.setString(p, "You do not have 99 Agility.", 241, 4);
    			} else {
    			if (p.skillLvl[16] >= 99) {
                    	p.frames.setString(p, "Congratulations, take this worthy cape.", 241, 4);
                            Engine.playerItems.addItem(p, 9771, 1);
    			Engine.playerItems.addItem(p, 9772, 1);
    			Engine.playerItems.addItem(p, 9773, 1);
    			p.NpcDialogue = 0;
    			p.NpcDialogueSend = true;
    			break;
    			}
    Quote Originally Posted by ViporZian View Post
    i no hef mudkipz.java?
    Sitting in this room, playing Russian Roulette. Finger on the trigger to My Dear Juliet....

    Reply With Quote  
     

  6. #6  
    Codex
    Rowan's Avatar
    Join Date
    Sep 2008
    Age
    28
    Posts
    1,593
    Thanks given
    0
    Thanks received
    20
    Rep Power
    1092
    Where did you declare that method.
    Reply With Quote  
     

  7. #7  
    Registered Member King Vexille's Avatar
    Join Date
    Nov 2008
    Age
    28
    Posts
    479
    Thanks given
    6
    Thanks received
    0
    Rep Power
    22
    the p.NpcDialogue I don't remember declaring.

    But I declared everything else in the frames class.
    Quote Originally Posted by ViporZian View Post
    i no hef mudkipz.java?
    Sitting in this room, playing Russian Roulette. Finger on the trigger to My Dear Juliet....

    Reply With Quote  
     

  8. #8  
    Registered Member King Vexille's Avatar
    Join Date
    Nov 2008
    Age
    28
    Posts
    479
    Thanks given
    6
    Thanks received
    0
    Rep Power
    22
    bump.

    sorry, i just need this fixed quickly.
    Quote Originally Posted by ViporZian View Post
    i no hef mudkipz.java?
    Sitting in this room, playing Russian Roulette. Finger on the trigger to My Dear Juliet....

    Reply With Quote  
     

  9. #9  
    Registered Member
    thing1's Avatar
    Join Date
    Aug 2008
    Posts
    2,111
    Thanks given
    131
    Thanks received
    1,099
    Rep Power
    2402
    what source is this? palidino76s right?
    Reply With Quote  
     

  10. #10  
    Registered Member King Vexille's Avatar
    Join Date
    Nov 2008
    Age
    28
    Posts
    479
    Thanks given
    6
    Thanks received
    0
    Rep Power
    22
    Yes, but nevermind. Problem was fixed by Dennis.
    Quote Originally Posted by ViporZian View Post
    i no hef mudkipz.java?
    Sitting in this room, playing Russian Roulette. Finger on the trigger to My Dear Juliet....

    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •