// Thomas Swift [Heneseys] / [Amoria]
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 1) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
if (cm.getPlayer().getMapId() == 100000000){
cm.sendYesNo("Hi there, would you like to goto Amoria?");
} else if (status == 1){
cm.sendSimple("Alright then, enjoy your stay there. Come back to me from there if you want to ever head back.");
cm.warp(680000000, 0);
cm.dispose();
} else {
cm.sendOk("Ok then. Come back when you are interested.");
cm.dispose();
}
if (cm.getPlayer().getMapId() == 680000000){
cm.sendYesNo("Hey, would you like to go back to Henesys?");
} else if (status == 2){
cm.sendSimple("Alright then, I will take you back.");
cm.warp(100000000, 0);
cm.dispose();
} else {
cm.sendOk("Ok, come back whenever you want to leave.");
cm.dispose();
}
}
}
}