Thread: [Pi] NPC Dialogue Help

Results 1 to 6 of 6
  1. #1 [Pi] NPC Dialogue Help 
    Registered Member Mayday Parade's Avatar
    Join Date
    Apr 2009
    Age
    27
    Posts
    495
    Thanks given
    20
    Thanks received
    17
    Rep Power
    8
    Hello, I am using a Project Insanity based server. I am just now coding in some new dialogue for my npc's. I have gotten 21 out of my 23 to work so far. the last 2 dont seem to work. (For this you have to go into the DialogueHandler.java) I have it set up like it should be... i think.

    Here are those 2 codes:
    Code:
                    case 22:
                            sendNpcChat4("You have already gotten a Partyhat!", c.talkingNpc, "King Lathas");
                            c.nextChat = 0;
                    break;
                    case 23:
                            sendNpcChat4("Sorry, the Skillcape Shop is down for now...", c.talkingNpc, "Wise Old Man");
                            c.nextChat = 0;
                    break;Now, 0 makes the chat go back to the normal public chatbox.
    When i try to compile it comes up with errors for those 2. It says that they could not be applied... but when i set them up like this:
    Code:
                    case 22:
                            sendStatement("You have already gotten a Partyhat!");
                            c.nextChat = 0;
                    break;
                    case 23:
                            sendStatement("Sorry, the Skillcape Shop is down for now...");
                            c.nextChat = 0;
                    break;
    They work great, but the Npc's head doesn't show. That is why I do not like using sendStatement.

    Thanks for the help!
    -- King Gauge

    (and yes, i just copied and pasted from my Mopar post... but mopar sucks, thats why I came here with it )

    Spoiler for LoL:
    Quote Originally Posted by Imbued View Post
    Quote Originally Posted by pasta186 View Post
    That tutorial doesnt walk.
    That's because it got no legs..
    Best report I've sent? "Mass spam? Also in wrong sexual"
    LOL
    Reply With Quote  
     

  2. #2  
    Registered Member Mayday Parade's Avatar
    Join Date
    Apr 2009
    Age
    27
    Posts
    495
    Thanks given
    20
    Thanks received
    17
    Rep Power
    8
    Bump, I still need SOME help, atleast!

    Spoiler for LoL:
    Quote Originally Posted by Imbued View Post
    Quote Originally Posted by pasta186 View Post
    That tutorial doesnt walk.
    That's because it got no legs..
    Best report I've sent? "Mass spam? Also in wrong sexual"
    LOL
    Reply With Quote  
     

  3. #3  
    Registered Member Mayday Parade's Avatar
    Join Date
    Apr 2009
    Age
    27
    Posts
    495
    Thanks given
    20
    Thanks received
    17
    Rep Power
    8
    bump... Seriously, no one knows? C'mon!
    Code:
    src\server\model\players\DialogueHandler.java:111: sendNpcChat4(java.lang.String
    ,java.lang.String,java.lang.String,java.lang.String,int,java.lang.String) in ser
    ver.model.players.DialogueHandler cannot be applied to (java.lang.String,java.la
    ng.String,int,java.lang.String)
                            sendNpcChat4("I know you! I gave you", "a PHat just a fe
    w seconds ago!", c.talkingNpc, "King Lathas");
                            ^
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    1 error
    Press any key to continue . . .
    That's the error i get.

    Spoiler for LoL:
    Quote Originally Posted by Imbued View Post
    Quote Originally Posted by pasta186 View Post
    That tutorial doesnt walk.
    That's because it got no legs..
    Best report I've sent? "Mass spam? Also in wrong sexual"
    LOL
    Reply With Quote  
     

  4. #4  
    Registered Member Stranger's Avatar
    Join Date
    Aug 2011
    Posts
    33
    Thanks given
    17
    Thanks received
    19
    Rep Power
    11
    EDIT: Didn't notice it was already solved, I had your answer. But when you fixed it, did his head appear in the dialogue box ingame? Cause thats the problem I'm having. If so, please post below and I'll only ask your time to find three different codes for me. ;D
    Reply With Quote  
     

  5. #5  
    ~! Legit ~!

    Join Date
    Nov 2010
    Posts
    1,973
    Thanks given
    183
    Thanks received
    211
    Rep Power
    237
    change those to
    Code:
    sendNpcChat1
    you only have ONE line of dialogue, example for
    Code:
    sendNpcChat4
    sendNpcChat4("One line of dialogue", "Second line of dialogue", "third line of dialogue", "fourth line of dialogue", c.talkingNpc, "NPC NAME"[/code]

    if you hade 2 lines of dialogue u use
    Code:
    sendNpcChat2
    three lines of dialogue
    Code:
    sendNpcChat3
    if you dont have the methods for those
    Code:
    sendNpcChat
    here they are:
    Code:
    public void sendNpcChat1(String s, int ChatNpc, String name) {
    		c.getPA().sendFrame200(4883, 591);
    		c.getPA().sendFrame126(name, 4884);
    		c.getPA().sendFrame126(s, 4885);
    		c.getPA().sendFrame75(ChatNpc, 4883);
    		c.getPA().sendFrame164(4882);
    	}
    	private void sendNpcChat2(String s, String s1, int ChatNpc, String name) {
    		c.getPA().sendFrame200(4888, 591);
    		c.getPA().sendFrame126(name, 4889);
    		c.getPA().sendFrame126(s, 4890);
    		c.getPA().sendFrame126(s1, 4891);
    		c.getPA().sendFrame75(ChatNpc, 4888);
    		c.getPA().sendFrame164(4887);
    	}
    	private void sendNpcChat3(String s, String s1, String s2, int ChatNpc, String name) {
    		c.getPA().sendFrame200(4894, 591);
    		c.getPA().sendFrame126(name, 4895);
    		c.getPA().sendFrame126(s, 4896);
    		c.getPA().sendFrame126(s1, 4897);
    		c.getPA().sendFrame126(s2, 4898);
    		c.getPA().sendFrame75(ChatNpc, 4894);
    		c.getPA().sendFrame164(4893);
    	}
    	private void sendNpcChat4(String s, String s1, String s2, String s3, int ChatNpc, String name) {
    		c.getPA().sendFrame200(4901, 591);
    		c.getPA().sendFrame126(name, 4902);
    		c.getPA().sendFrame126(s, 4903);
    		c.getPA().sendFrame126(s1, 4904);
    		c.getPA().sendFrame126(s2, 4905);
    		c.getPA().sendFrame126(s3, 4906);
    		c.getPA().sendFrame75(ChatNpc, 4901);
    		c.getPA().sendFrame164(4900);
    	}
    the same things apply for
    Code:
    sendPlayerChat
    and
    Code:
    sendOption
    here are those also if you need it

    player chat back methods:
    Code:
    	private void sendPlayerChat1(String s) {
    		c.getPA().sendFrame200(969, 591);
    		c.getPA().sendFrame126(c.playerName, 970);
    		c.getPA().sendFrame126(s, 971);
    		c.getPA().sendFrame185(969);
    		c.getPA().sendFrame164(968);
    	}
    	
    	private void sendPlayerChat2(String s, String s1) {
    		c.getPA().sendFrame200(974, 591);
    		c.getPA().sendFrame126(c.playerName, 975);
    		c.getPA().sendFrame126(s, 976);
    		c.getPA().sendFrame126(s1, 977);
    		c.getPA().sendFrame185(974);
    		c.getPA().sendFrame164(973);
    	}
    	
    	private void sendPlayerChat3(String s, String s1, String s2) {
    		c.getPA().sendFrame200(980, 591);
    		c.getPA().sendFrame126(c.playerName, 981);
    		c.getPA().sendFrame126(s, 982);
    		c.getPA().sendFrame126(s1, 983);
    		c.getPA().sendFrame126(s2, 984);
    		c.getPA().sendFrame185(980);
    		c.getPA().sendFrame164(979);
    	}
    	
    	private void sendPlayerChat4(String s, String s1, String s2, String s3) {
    		c.getPA().sendFrame200(987, 591);
    		c.getPA().sendFrame126(c.playerName, 988);
    		c.getPA().sendFrame126(s, 989);
    		c.getPA().sendFrame126(s1, 990);
    		c.getPA().sendFrame126(s2, 991);
    		c.getPA().sendFrame126(s3, 992);
    		c.getPA().sendFrame185(987);
    		c.getPA().sendFrame164(986);
    	}
    }
    option methods:
    Code:
    	private void sendOption(String s, String s1) {
    		c.getPA().sendFrame126("Select an Option", 2470);
    	 	c.getPA().sendFrame126(s, 2471);
    		c.getPA().sendFrame126(s1, 2472);
    		c.getPA().sendFrame126("Click here to continue", 2473);
    		c.getPA().sendFrame164(13758);
    	}	
    	
    	private void sendOption2(String s, String s1) {
    		c.getPA().sendFrame126("Select an Option", 2460);
    		c.getPA().sendFrame126(s, 2461);
    		c.getPA().sendFrame126(s1, 2462);
    		c.getPA().sendFrame164(2459);
    	}
    	
    	private void sendOption3(String s, String s1, String s2) {
    		c.getPA().sendFrame126("Select an Option", 2460);
    		c.getPA().sendFrame126(s, 2461);
    		c.getPA().sendFrame126(s1, 2462);
    		c.getPA().sendFrame126(s2, 2462);
    		c.getPA().sendFrame164(2459);
    	}
    	
    	public void sendOption4(String s, String s1, String s2, String s3) {
    		c.getPA().sendFrame126("Select an Option", 2481);
    		c.getPA().sendFrame126(s, 2482);
    		c.getPA().sendFrame126(s1, 2483);
    		c.getPA().sendFrame126(s2, 2484);
    		c.getPA().sendFrame126(s3, 2485);
    		c.getPA().sendFrame164(2480);
    	}
    	
    	public void sendOption5(String s, String s1, String s2, String s3, String s4) {
    		c.getPA().sendFrame126("Select an Option", 2493);
    		c.getPA().sendFrame126(s, 2494);
    		c.getPA().sendFrame126(s1, 2495);
    		c.getPA().sendFrame126(s2, 2496);
    		c.getPA().sendFrame126(s3, 2497);
    		c.getPA().sendFrame126(s4, 2498);
    		c.getPA().sendFrame164(2492);
    	}
    you can have up to 5 options

    you can have up to 4 player chat backs
    and only four NPC chat backs.
    [email protected]
    Spoiler for My Vouches:
    Quote Originally Posted by mattsforeal View Post
    I paid $5 went first, he fixed my problem and it worked. 100% legit would do it again.
    Quote Originally Posted by Mythic View Post
    Vouch for him, very smooth and fast trade, purchased his last 4m. Have fun with your new membership
    Quote Originally Posted by Harlan View Post
    Vouch, trustworthy guy.
    Quote Originally Posted by iPhisher™ View Post
    Vouch for Super-Man, he is a very legit and trustable guy.
    Reply With Quote  
     

  6. #6  
    Registered Member Incipio's Avatar
    Join Date
    Jul 2011
    Posts
    182
    Thanks given
    20
    Thanks received
    34
    Rep Power
    3
    sendNpcChat4 is used like this: ("line1", "line2", "line3", "line4", c.talkingNpc, "npcname")
    sendNpcChat1 is used like this: ("line1", c.talkingNpc, "npcname")

    You're using 4 for a 1 line message.

    Edit:
    Not trying to be mean, but how did you get through 23 NPC dialogues without knowing this and only get 2 errors o_O? You mostly used 4-line messages?


    Feel free to rep/thank if I help!


    ~Huge RSPS Guide (incomplete)~
    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
  •