is the update flag being set to true...?
|
As the title says, this is the code i am trying to execute
and the message array is this:Code:Random ran = new Random(); NPCHandler.npcs[npcId].forceChat(messages[ran.nextInt(messages.length)].toString());
Ive testing the npc id and that is correct, but the problem is, the npc isnt saying anything.Code:private String[] messages = { "What do you think you are doing!", "Thief! Thief!", "Don't try and steal my stuff!", "Get your hands outa there!" };
The NpcId is the number of npc in the server (if you have 6 npcs it'll go from 0-5), not the actual NPC (like how kbd is 53), you know that right? and you already said you know that's right, how?
ur probably not applying it in ur NPC updating
im converting the nextInt to a string otherwise the npc would print out a value, anyway, i know that the npcId is the id of the npc, right this is in a new skill im rewritting, thieving. basically i want the npc to say the random message, but the forcechat dosnt seem to work, is there any specific way of getting that specific npc that i click on for example man (id 1) for him only, no other npc with the id 1 to shout?
So the problem is that it's not displaying the message you want or that it wont display ANYTHING? ....cos according to that post the problem is your array (which i've just said above) (if it'll print the value of nextInt then that's your problem..)
yes but every npc with that id would shout..is there any specific way of getting that specific npc that i click on for example man (id 1) for him only, no other npc with the id 1 to shout?
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |