Thread: In desperate need of help.

Results 1 to 3 of 3
  1. #1 In desperate need of help. 
    Registered Member
    Join Date
    Aug 2012
    Posts
    7
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Ok.. I'm very new, and I finally got an NPC to say something above it's head!

    The problem is, I really want to make it say more than one thing, and on a timer, cause right now, it chats and the text never disappears or changes. This is what I have in NPCHandler.java (P.I):

    if (npcs[i].npcType == 81) { //NPC ID here.
    npcs[i].forceChat("Moo.");
    }

    Once again I'm very new to coding, so please be nice. If you could write me out how to make the messages timed and how to add more than one message it'd be greatly appreciated! Thanks!
    Reply With Quote  
     

  2. #2  
    Extreme Donator


    Join Date
    Nov 2009
    Posts
    1,421
    Thanks given
    559
    Thanks received
    266
    Rep Power
    236
    I don't think that PI's forced chat for npcs works properly, I had to redo mine.
    Reply With Quote  
     

  3. #3  
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,092
    Thanks given
    2,402
    Thanks received
    2,823
    Rep Power
    4550
    Code:
    	if (npcs[i].npcType == 81) { //NPC ID here.
    		int cowChat = Misc.random(3);
    			switch(cowChat) {
    			case 1: npcs[i].forceChat("Moo."); break;
    			case 2: npcs[i].forceChat("I wish I was a dog"); break;
    			case 3: npcs[i].forceChat("Wait I speak english and understand thought process?"); break;
    			default: npcs[i].forceChat("Come at be bro!"); break;
    		}
    	}
    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

Similar Threads

  1. [DESPERATE] Changing NPC Names [DESPERATE]
    By david1001011010 in forum Help
    Replies: 2
    Last Post: 10-13-2012, 10:42 AM
  2. Desperate.
    By Slawth Baws in forum Help
    Replies: 6
    Last Post: 11-07-2011, 04:37 PM
  3. In desperate need of help.......
    By current in forum Help
    Replies: 0
    Last Post: 11-04-2011, 12:11 AM
  4. Replies: 19
    Last Post: 12-31-2010, 12:11 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •