Thread: NPC help

Results 1 to 4 of 4
  1. #1 NPC help 
    Banned D Dox's Avatar
    Join Date
    Mar 2011
    Age
    29
    Posts
    359
    Thanks given
    38
    Thanks received
    11
    Rep Power
    0
    I added a dialog and when i click my npc, nothing happens this is my code
    Using PI

    Code:
    case 80:
    		sendNpcChat1("I buy PvP artifacts. You don't have any.", c.talkingNpc, "Sin Seer"); 
    		c.nextChat = 0;
    		if (c.getItems().playerHasItem(14876,1)) {
    		sendNpcChat1("A Ancient Statuette! ill buy that for 25m!", c.talkingNpc, "Sin Seer");
    		c.nextChat = 81;
    		} else if (c.getItems().playerHasItem(14877,1)) {
    		sendNpcChat1("A Seren Statuette! ill buy that for 20m!", c.talkingNpc, "Sin Seer");
    		c.nextChat = 81;
    		} else if (c.getItems().playerHasItem(14878,1)) {
    		sendNpcChat1("A Armadyl Statuette! ill buy that for 15m!", c.talkingNpc, "Sin Seer");
    		c.nextChat = 81;//demise
    		} else if (c.getItems().playerHasItem(14879,1)) {
    		sendNpcChat1("A Zamorak Statuette! ill buy that for 10m!", c.talkingNpc, "Sin Seer");
    		c.nextChat = 81;
    		} else if (c.getItems().playerHasItem(14880,1)) {
    		sendNpcChat1("A Saradomin Statuette! ill buy that for 5m!", c.talkingNpc, "Sin Seer");
    		c.nextChat = 81;
    		} else if (c.getItems().playerHasItem(14881,1)) {
    		sendNpcChat1("A Bandos Statuette! ill buy that for 2.5m!", c.talkingNpc, "Sin Seer");
    		c.nextChat = 81;
    		} 
    		break;
    		
    		case 81:
    		c.sendMessage("The old hag buys your artifact for a nice amount of gold.");
    		if (c.getItems().playerHasItem(14876,1)) {
    		c.getItems().deleteItem(14876,1);
    		c.getItems().addItem(995,25000000);
    		} else if (c.getItems().playerHasItem(14877,1)) {
    		c.getItems().deleteItem(14877,1);
    		c.getItems().addItem(995,20000000);
    		} else if (c.getItems().playerHasItem(14878,1)) {
    		c.getItems().deleteItem(14878,1);
    		c.getItems().addItem(995,15000000);
    		} else if (c.getItems().playerHasItem(14879,1)) {
    		c.getItems().deleteItem(14879,1);
    		c.getItems().addItem(995,10000000);
    		} else if (c.getItems().playerHasItem(14880,1)) {
    		c.getItems().deleteItem(14880,1);
    		c.getItems().addItem(995,5000000);
    		} else if (c.getItems().playerHasItem(14881,1)) {
    		c.getItems().deleteItem(14881,1);
    		c.getItems().addItem(995,2500000);
    		}
    		c.getPA().closeAllWindows();
    		break;
    Reply With Quote  
     

  2. #2  
    Donator

    Arithium's Avatar
    Join Date
    May 2010
    Age
    31
    Posts
    4,721
    Thanks given
    199
    Thanks received
    1,256
    Rep Power
    1114
    where are you putting that?
    Reply With Quote  
     

  3. #3  
    Banned D Dox's Avatar
    Join Date
    Mar 2011
    Age
    29
    Posts
    359
    Thanks given
    38
    Thanks received
    11
    Rep Power
    0
    dialoghandler
    Reply With Quote  
     

  4. #4  
    Registered Member Beanerrr's Avatar
    Join Date
    Feb 2011
    Posts
    598
    Thanks given
    78
    Thanks received
    28
    Rep Power
    6
    Go to your ActionHandler.java to firstNpcClick and add

    Code:
    case ####:
    c.getDH().sendDialogues(80, ####);
    break;
    Quote Originally Posted by Galkon View Post
    The rules clearly state, if you can't help, don't reply.


    Quote Originally Posted by Mod Josh - Question: How do you ask girls out?
    I can't ask them out, I am banned from the kitchen
    Quote Originally Posted by Penor View Post
    How will i know if its PI based?? Omfg this is sooo confusing!!
    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
  •