chatbox
package com.rs.game.player.dialogues;
import com.rs.cache.loaders.NPCDefinitions;
public class SirTiffy extends Dialogue {
int npcId;
@Override
public void start() {
npcId = (Integer) parameters[0];
sendEntityDialogue(SEND_2_TEXT_CHAT,
new String[] { NPCDefinitions.getNPCDefinitions(npcId).name,
"You look brave could I get you to do me",
"a favor?"}, IS_NPC, npcId, 14328);
}
@Override
public void run(int interfaceId, int componentId) {
if (stage == -1) {
sendEntityDialogue(SEND_1_TEXT_CHAT,
new String[] { player.getDisplayName(), "Of course, what is it?"},
IS_PLAYER, player.getIndex(), 9834);
stage = 1;
} else if (stage == 1) {
sendEntityDialogue(SEND_4_TEXT_CHAT,
new String[] {
NPCDefinitions.getNPCDefinitions(npcId).name,
"I need you to defeat the mighty dragon...",
"His name shalt be Elvarg,",
"If you can handle this quest for me you shall",
"be rewarded greatly."}, IS_NPC, npcId, 14328);
stage = 2;
} else if (stage == 2) {
sendEntityDialogue(SEND_1_TEXT_CHAT,
new String[] { player.getDisplayName(), "Where would I start, do I need any requirements?"},
IS_PLAYER, player.getIndex(), 9834);
stage = 3;
} else if (stage == 3) {
sendEntityDialogue(SEND_3_TEXT_CHAT,
new String[] {
NPCDefinitions.getNPCDefinitions(npcId).name,
"You shall need to get a Anti-dragon shield,",
"and prefrebly a Silverlight.",
"I do however have a spare silverlight."}, IS_NPC, npcId, 14328);
stage = 4;
} else if (stage == 4) {
sendEntityDialogue(SEND_2_TEXT_CHAT, new String[] { "",
"You recieve the empowered silverlight",
"for your journey." },
IS_ITEM, 2402, SEND_NO_EMOTE);
player.getInventory().addItem(2402, 1);
stage = 5;
} else if (stage == 5) {
sendEntityDialogue(SEND_2_TEXT_CHAT,
new String[] { player.getDisplayName(), "Thank you kindly...",
"where would I go about finding this anti-dragon shield?"},
IS_PLAYER, player.getIndex(), 9834);
stage = 6;
} else if (stage == 6) {
sendEntityDialogue(SEND_3_TEXT_CHAT,
new String[] {
NPCDefinitions.getNPCDefinitions(npcId).name,
"The anti dragon-shield can be bought",
"by the exchange clerk in varrock,",
"You will need to pay around 1000gp for it."}, IS_NPC, npcId, 14328);
stage = 7;
} else if (stage == 7) {
sendEntityDialogue(SEND_1_TEXT_CHAT,
new String[] { player.getDisplayName(), "Thank you anything else i need?"},
IS_PLAYER, player.getIndex(), 9834);
stage = 8;
} else if (stage == 8) {
sendEntityDialogue(SEND_3_TEXT_CHAT,
new String[] {
NPCDefinitions.getNPCDefinitions(npcId).name,
"Talk to king roald in varrock,",
"he will tell you",
"what else you need to do"}, IS_NPC, npcId, 14328);
stage = 9;
} else if (stage == 9) {
sendEntityDialogue(SEND_2_TEXT_CHAT,
new String[] { player.getDisplayName(), "Thank you very much for this information,",
"I will find my way into varrock."},
IS_PLAYER, player.getIndex(), 9834);
stage = 10;
} else if (stage == 10) {
sendEntityDialogue(SEND_4_TEXT_CHAT,
new String[] {
NPCDefinitions.getNPCDefinitions(npcId).name,
"Good luck, may the spirits of the gods be with you",
"while you venture upon this journey",
"Goodluck young adventurer.",
"be sure to tell King Roald i sent you."}, IS_NPC, npcId, 14328);
stage = 11;
} else if (stage == 15) {
switch (componentId) {
case 1:
break;
}
} else {
end();
}
}
public void finish() {
}
}
Maak jouw eigen website met JouwWeb