Tutorial if you want to add npc to teleport you somewhere.
Step one: Get an npc Id (15331,big ben)
Go into data\npcs\unpackedspawnslist.java
-At the bottom add
Code:
//Big Ben
15331- XCOORDS YCOORDS 0
Replace the coords with your own. Once done delete the "Packedspawns" folder.
Step two.
-Go into com\rs\game\player\dialogues and make a new java file called "BigBen". Place this inside it.
Code:
package com.rs.game.player.dialogues;
import com.rs.Settings;
import com.rs.cache.loaders.NPCDefinitions;
import com.rs.game.WorldTile;
import com.rs.game.minigames.CastleWars;
import com.rs.game.player.Skills;
import com.rs.game.player.content.Magic;
import com.rs.game.player.controlers.FightCaves;
import com.rs.game.player.controlers.FightKiln;
public class BigBen extends Dialogue {
private int npcId;
@Override
public void start() {
npcId = (Integer) parameters[0];
sendEntityDialogue(SEND_2_TEXT_CHAT, new String[] { NPCDefinitions.getNPCDefinitions(npcId).name, "Hello adventurer, would you like me to teleport you somewhere?" }, IS_NPC, npcId, 9827);
}
@Override
public void run(int interfaceId, int componentId) {
if (stage == -1) {
sendEntityDialogue(SEND_1_TEXT_CHAT, new String[] { player.getDisplayName(), "Yes please. Where can you teleport me to?" }, IS_PLAYER, player.getIndex(), 9827);
stage = 1;
} else if (stage == 1) {
sendOptionsDialogue("Teleports", "Armadyl Chamber", "Bandos Chamber", "Saradomin Chamber", "Zamorak Chamber");
stage = 2;
} else if (stage == 2) {
if (componentId == OPTION_1)
teleportPlayer(2838, 5297, 2);
else if (componentId == OPTION_2)
teleportPlayer(2870, 5363, 2);
else if (componentId == OPTION_3)
teleportPlayer(2901, 5264, 0);
else if (componentId == OPTION_4)
teleportPlayer(2925, 5330, 2);
else if (componentId == OPTION_5) {
}
}
}
}
private void teleportPlayer(int x, int y, int z) {
player.setNextWorldTile(new WorldTile(x, y, z));
player.stopAll();
player.getControlerManager().startControler("GodWars");
}
@Override
public void finish() {
}
}
I made the coords and names color coded, so if you want to change the red coords change the red name aswell.
Step 3
-Go into dialogue and search for
Code:
handledDialogues.put("MakeOverMage", value39);
under that add this
Code:
Class<Dialogue> value43 = (Class<Dialogue>) Class
.forName(BigBen.class.getCanonicalName());
handledDialogues.put("BigBen", value43);