RECENT NEWS
📢 𝟑𝟎% Discount for all ads only this month ❄️

[876] [Immersion] Talk to Everyone

Venom
power_settings_new
Seen 2 months ago
Rune Warrior (33/40)
Rune Warrior
0
0
0
33 Posts
Posts
0
Warning level
0
Likes
0
Dislikes
Joined: 2022-04-24

This simple line of code will make it so that if any of the NPC's in your world don't have a predetermined conversation pathway, they're able to use the responses listed in "Dialogues.RANDOM_RESPONSES". I'm using Nocturne SRC for testing, but I'm sure with a little brain power you can apply this to your own revision!

Find NPCHandler.java and look for:

Code:
default:
					// player.getPackets().sendGameMessage("Nothing
					// interesting happens.");

add after.

Code:
player.getDialogueManager().startDialogue("SimpleNPCMessage", npc.getId(), Dialogue.RANDOM_RESPONSES[(int)(System.currentTimeMillis() % Dialogue.RANDOM_RESPONSES.length)]);

Annnnd, here's an example of my Random_Responses array:

Code:
public static final String[] RANDOM_RESPONSES = { "Good day to you, adventurer.", "Well met, adventurer.",
			"Well, hello there." , "Get away from me" , "*nods head*", "*shakes hand*", "*stares*", "My mother always told me not to talk to strangers", 
			"What's that!? *points*", "Hi", "Goodbye", "I used to be an adventure too", "You remind me of great uncle Auntie", "I'm gonna need a drink first", 
			"I knew an ogre once... oh wait, THAT was Grandma!", "That tree talks to you if you eat enough of these.", "Did you pass a bag of green herbs on the road?", "Did you happen to find my flowers?",
			"I fucked a fairy once... *sips beer*", "Add me on Xbox", "I'm looking for the Muffin Man..", "Have you seen the Muffin Man?"};
00
  • Like
Reactions:

Sponsored

Discord

Sponsored