Hello guys. Here's a rundown of what I'm trying to do and what I'm having a problem with.

Goal: MX3 Customized Introduction without the CX NPC or Forcetalk stuff. I simply want the Intro cutscene to play (The RS3 one about warriors and the fancy pictures and epic old man voice) and the dialogue to start.

Progress: I've completed the dialogue, altered it to fit what I envision, and I have it working up to the end of the cutscene where it hangs. Pressing Escape or clicking the 'skip' button does nothing. I commented out the cutscene and combat mode selection to simply check if the dialogue would start, and it didn't. The only thing that happened was a dialogue message was displayed about new player protection and the starter was given, which is at the very bottom of the NewPlayerController.java

Source: I'm using Arrow RS3 Updated and pulling the intro information from the MX3 release by Cjay.

I personally like having some sort of introduction to give immersion a little boost to get people started.


Spoiler for Disclaimer:
I do not intend to leech this source. I do not intend to be spoonfed information. I do not claim any work currently existing in either source to be my own. I am a beginner with basic knowledge and some experience with general source editing and I am willing and eager to learn as much as I can about the RS3 revision and coding in general.


I've had a few projects in the past but never stayed motivated due to lack of knowledge. It was a 1 step forward 2 steps back kind of thing where I created more problems than I solved and it became very overwhelming. I've matured enough since then to remain steadfast in my endeavor despite the daunting abyss of the unknown I face with jumping into coding an RS3 server.


Thanks for reading and if theres any information you need me to provide I will gladly do so.

-Edit-

I was unable to check the MX3 source to even see if it was working properly there due to not being able to decipher the right settings combination to log in locally.

I suppose I should have added this, lol.

Controler:

Code:
package com.rs.game.player.controllers;

import java.util.ArrayList;

import com.rs.Settings;
import com.rs.game.Entity;
import com.rs.game.World;
import com.rs.game.WorldObject;
import com.rs.game.WorldTile;
import com.rs.game.item.Item;
import com.rs.game.npc.NPC;
import com.rs.game.player.content.EconomyManager;
import com.rs.game.player.content.FriendsChat;
import com.rs.game.player.dialogues.Dialogue;
import com.rs.utils.Utils;

public class NewPlayerController extends Controller {
    private static ArrayList<String> ips = new ArrayList<String>();

    private NPC target;
    private int stage = 0;
    private int startSceneDelay;

    @Override
    public void start() {
	stage = 0;
	player.setNextWorldTile(Settings.START_PLAYER_LOCATION);
	player.getMusicsManager().forcePlayMusic(89);
	player.getInterfaceManager().setRootInterface(1507, false);
    }

    public boolean processButtonClick(int interfaceId, int componentId, int slotId, int slotId2, int packetId) {
	if (interfaceId == 1507) {
	    if (componentId == 8 || componentId == 5) {
		if (player.isLegacyMode() != (componentId == 8))
		    player.switchLegacyMode();
		player.getInterfaceManager().setRootInterface(548, false);
	    }
	    return false;
	} else if (interfaceId == 548 && componentId == 4)
	    startSceneDelay = 60;
	return true;
    }

    private Dialogue getStartDialogue() {
	return new Dialogue() {
	    @Override
	    public void start() {
		sendDialogue("*Muffled voice*", "Sounds like an old man...");
	    }

	    @Override
	    public void run(int interfaceId, int componentId) {
		end();
	    }

	    @Override
	    public void finish() {
	    }

	};
    }

    private Dialogue getEndDialogue() {
	return new Dialogue() {
	    int stage = 0;

	    @Override
	    public void start() {
		target.faceEntity(player);
		sendEntityDialogue(Dialogue.IS_NPC, target != null ? target.getName() : "",
			target != null ? target.getId() : 0, 9760, "Snap out of it!", "Can ye hear me? Who are ye?");
	    }

	    @Override
	    public void run(int interfaceId, int componentId) {
		if (stage == 0) {
		    sendEntityDialogue(Dialogue.IS_PLAYER, -1, 9760, "...Huh? What's going on... Where am I?");
		    stage = 1;
		} else if (stage == 1) {
		    sendEntityDialogue(Dialogue.IS_NPC, target != null ? target.getName() : "",
			    target != null ? target.getId() : 0, 9760,
			    "Take it easy, now. Ye washed up ashore and I brought ye here immediately.");
		    stage = 2;
		} else if (stage == 2) {
		    sendEntityDialogue(Dialogue.IS_PLAYER, -1, 9760, "I... I what? I don't remember a thing!");
		    stage = 3;
		} else if (stage == 3) {
		    sendEntityDialogue(Dialogue.IS_PLAYER, -1, 9760,
			    "Thank you for rescuing me... do you know what happened?");
		    stage = 4;
		} else if (stage == 4) {
		    sendEntityDialogue(Dialogue.IS_NPC, target != null ? target.getName() : "",
			    target != null ? target.getId() : 0, 9760,
			    "Well I got word that a ship was attacked by a dragon and to be on",
			    "the lookout for escape boats and survivors.");
		    stage = 5;
		} else if (stage == 5) {
		    sendEntityDialogue(Dialogue.IS_NPC, target != null ? target.getName() : "",
			    target != null ? target.getId() : 0, 9760,
			    "I was warning the doctors here in Taverly when I passed by the water and saw ye afloat near the shore!");
		    stage = 6;
		} else if (stage == 6) {
		    sendEntityDialogue(Dialogue.IS_NPC, target != null ? target.getName() : "",
			    target != null ? target.getId() : 0, 9760,
			    "I drug ye in here, dried ye off and had a nurse tend to yer wounds.");
		    stage = 7;
		} else if (stage == 7) {
		    sendEntityDialogue(Dialogue.IS_PLAYER, -1, 9760, "Thank you so much..", "but what about my memory? I don't know who I am..");
		    stage = 8;
		} else if (stage == 8) {
		    sendEntityDialogue(Dialogue.IS_NPC, target != null ? target.getName() : "",
			    target != null ? target.getId() : 0, 9760,
			    "Well... I can't get your memory back. However...");
		    stage = 9;
		} else if (stage == 9) {
		    sendEntityDialogue(Dialogue.IS_PLAYER, -1, 9760, "What is it?");
		    stage = 11;
		} else if (stage == 11) {
		    sendEntityDialogue(Dialogue.IS_NPC, target != null ? target.getName() : "",
			    target != null ? target.getId() : 0, 9760,
			    "I can get ye started on a new journey! a new life!",
			    "I train <u><col=FF0000>LEGENDARY</col></u> adventurers, and ye seem like a prime candidate.");
		    stage = 12;
		}

		else if (stage == 12) {
		    sendOptionsDialogue("What would you like to say?", "I don't want to be an adventurer..",
			    "A legendary adventurer?!?", "How do you train adventurers with one arm?",
			    "I always wanted to be an adventurer! I think...");
		    stage = 25;
		} else if (stage == 25) {
		    if (componentId == OPTION_1) {
			sendEntityDialogue(Dialogue.IS_NPC, target != null ? target.getName() : "",
				target != null ? target.getId() : 0, 9760,
				"Well... that's all I have to offer. I don't know",
				"where you're from or what you did before... this is your only shot at finding where you belong.");
			stage = 26;
		    } else if (componentId == OPTION_2) {
			sendEntityDialogue(Dialogue.IS_NPC, target != null ? target.getName() : "",
				target != null ? target.getId() : 0, 9760, "Aye! I've trained mighty dragon slayers!",
				"Expert herbalists! Cunning thieves and master crafters! Adventurers of all sorts.");
			stage = 27;
		    } else if (componentId == OPTION_3) {
			sendEntityDialogue(Dialogue.IS_NPC, target != null ? target.getName() : "",
				target != null ? target.getId() : 0, 9760,
				"Oi, don't discredit my abilities based on my DISABILITY!",
				"I could take ye on with me one arm and me eyes tucked tightly behind a strip of cloth!");
			stage = 28;
		    } else if (componentId == OPTION_4) {
			stage = 29;
		    }
		} else if (stage == 26) {
		    sendEntityDialogue(Dialogue.IS_PLAYER, -1, 9760,
			    "It seems you're right... Ok! Please sir, train me to be a great adventurer!");
		    stage = 29;
		} else if (stage == 27) {
		    sendEntityDialogue(Dialogue.IS_PLAYER, -1, 9760,
			    "It seems you're the real deal... ok then, I agree to be your student!");
		    stage = 29;
		} else if (stage == 28) {
		    sendEntityDialogue(Dialogue.IS_PLAYER, -1, 9760,
			    "Please no! I don't even know how to properly wield a sword. Ok, you can train me.");
		    stage = 29;
		}

		else if (stage == 29) {
		    sendEntityDialogue(Dialogue.IS_NPC, target != null ? target.getName() : "",
			    target != null ? target.getId() : 0, 9760, "Excellent! Now I just need to know one thing.",
			    "I have 3 seperate training programs.");
		    stage = 30;
		} else if (stage == 30) {
		    sendOptionsDialogue("Choose a Program:", "Normal Training", "Iron Man Training",
			    "Hard-core Iron Man Training(1 Life)");
		    stage = 13;
		}

		else if (stage == 13) {
		    if (componentId == OPTION_1)
			player.setXpRateMode(1);
		    else if (componentId == OPTION_2)
			player.setXpRateMode(2);
		    else if (componentId == OPTION_3)
			player.setXpRateMode(3);
		    sendEntityDialogue(Dialogue.IS_NPC, target != null ? target.getName() : "",
			    target != null ? target.getId() : 0, 9760, "You're prepared to begin yer training now! ",
			    "speak to me after exploring Taverly a bit.");
		    stage = 14;
		} else if (stage == 14) {
		    sendEntityDialogue(Dialogue.IS_PLAYER, -1, 9760, "Thanks!");
		    stage = 15;
		} else if (stage == 15) {
		    sendDialogue("As you finish talking with Dudrik, he hands over an assortment of tools and goods to begin your journey.");
		    stage = 16;
		} else if (stage == 16) {
		    sendDialogue("I should speak to some of the people around here...", "Maybe I can learn something.");
		}
		
		else {
		    end();
		}
	    }

	    @Override
	    public void finish() {
	    }

	};
    }

    @Override
    public void process() {
	if (stage == 0) {
	    NPC closest = null;
	    double dist = 999999;
	    for (NPC npc : World.getNPCs()) {
		if (npc == null || !EconomyManager.isEconomyManagerNpc(npc.getId()))
		    continue;
		int xDelta = player.getX() - npc.getX();
		int yDelta = player.getY() - npc.getY();
		double d = Math.sqrt(xDelta * xDelta + yDelta * yDelta);
		if (closest == null || d < dist) {
		    closest = npc;
		    dist = d;
		}
	    }

	    if (closest != null) {
		target = closest;
		player.getHintIconsManager().addHintIcon(closest, 0, -1, false);
		stage = 1;
	    }
	} else if (player.getInterfaceManager().getWindowsPane() == 548) {
	    startSceneDelay++;
	    if (startSceneDelay >= 60) {
		player.getInterfaceManager().setDefaultRootInterface();
		stage = 2;
	    }
	} else if (stage == 2) {
	    // if (Settings.HOSTED)
	    player.stopAll();
	    stage = 3;
	} else if (stage == 3 && !player.getCutscenesManager().hasCutscene()) {
	    player.getDialogueManager().startDialogue(getStartDialogue());
	    stage = 4;
	} else if (stage == 5 && player.getDialogueManager().getLast() == null) {
	    player.getDialogueManager().startDialogue(getEndDialogue());
	    stage = 6;
	} else if (stage == 6 && player.getDialogueManager().getLast() == null) {
	    if (player.getXpRateMode() == 0) {
		player.getDialogueManager().startDialogue(getEndDialogue());
		stage = 4;
	    } else {
		player.getControlerManager().forceStop();
	    }
	}
    }

    @Override
    public boolean processObjectClick1(WorldObject object) {
	return false;
    }

    @Override
    public boolean processObjectClick2(WorldObject object) {
	return false;
    }

    @Override
    public boolean processObjectClick3(WorldObject object) {
	return false;
    }

    @Override
    public boolean processNPCClick1(NPC npc) {
	if (stage == 4 && npc == target) {
	    stage = 5;
	}
	return false;
    }

    /*
     * return remove controler
     */
    @Override
    public boolean login() {
	start();
	return false;
    }

    /*
     * return remove controler
     */
    @Override
    public boolean logout() {
	return false;
    }

    @Override
    public boolean processMagicTeleport(WorldTile toTile) {
	return false;
    }

    @Override
    public boolean keepCombating(Entity target) {
	return false;
    }

    @Override
    public boolean canAttack(Entity target) {
	return false;
    }

    @Override
    public boolean canHit(Entity target) {
	return false;
    }

    @Override
    public boolean processItemTeleport(WorldTile toTile) {
	return false;
    }

    @Override
    public boolean processObjectTeleport(WorldTile toTile) {
	return false;
    }

    @Override
    public void forceClose() {
	player.getHintIconsManager().removeUnsavedHintIcon();
	player.getMusicsManager().reset();
	if (Settings.HOSTED)
	    FriendsChat.requestJoin(player, Utils.formatPlayerNameForDisplay("help"));
	String ip = player.getSession() != null ? player.getSession().getIP() : null;
	if (ip != null && !ips.contains(ip)) {
	    ips.add(ip);
	    player.getInventory().addItem(new Item(995, 3001337));
	    player.getInventory().addItem(new Item(386, 100));
	} else {
	    player.getPackets().sendGameMessage("You have already received starting items on another account.");
	    player.getSquealOfFortune().setDailySpins(0);
	}
	player.getDialogueManager()
		.startDialogue(
			"SimpleNPCMessage",
			13930,
			"You are currently under new player protection, this will last for 1 hour. As a result, you have been blessed with Double EXP rates, but you will be unable to interact with other players until the protection has run out.");
	player.getInventory().addItem(new Item(1333, 1));
	player.getInventory().addItem(new Item(1323, 1));
	player.getInventory().addItem(new Item(1153, 1));
	player.getInventory().addItem(new Item(1115, 1));
	player.getInventory().addItem(new Item(1067, 1));
	player.getInventory().addItem(new Item(1540, 1));
	player.getInventory().addItem(new Item(1712, 1));
	player.getInventory().addItem(new Item(2552, 1));
	player.getInventory().addItem(new Item(3853, 1));
	player.getInventory().addItem(new Item(15707, 1));
	player.getInventory().addItem(new Item(1856, 1));
    }
}
Being called in Settings.java:

Code:
 public static final String START_CONTROLLER = "NewPlayerController";
It starts, as I mentioned above. However since I don't get debug information in the Eclipse console (e.x. Interface and component ID's) I can't troubleshoot.
I'm just trying to figure out how to get the controller to run fully and not stop at the end of what i'll call the "New Hero Cutscene".