Jump to content

Featured Replies

Posted
comment_25435

i know this can be written better feel free todo so, i noticed theres no way to delay how long before the next dialogue popped up, useful if your creating quest, kinda needed anyways here how to add it, again its not perfect it can be better

 

 

Open Dialogue.java and add this to there

 

public int DialogueDelay() {
		return -1;
	}

 

close and save that then Open DialogueManager.java

 

In the Load void add

final int delay = reader.has("delay") ? reader.get("delay").getAsInt() : -1;

 

and add this below that

 

public int DialogueDelay() {
						return delay;
					}

 

then add

int delay = next.DialogueDelay();
		if(delay > 0) {
			player.getPacketSender().sendInterfaceRemoval();
			try { 
					Thread.sleep(delay * 1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}

 

Above 

Quote

start(player, next);

inside the NEXT Void

 

Again this can be done better i just needed something quick for quest im making, feel free to edit and reshare what you changed :) - Brandon

Edited by sob freddie

  • 1 month later...
  • 3 months later...
  • 10 months later...
  • 1 year later...

Create an account or sign in to comment