Henesys PQ

Implemented Henesys PQ.
This commit is contained in:
ronancpl
2017-05-17 00:36:30 -03:00
parent 42e9d260e7
commit 3fc338467b
26 changed files with 529 additions and 533 deletions

View File

@@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @author BubblesDev
* @author BubblesDev, Ronan
* @npc Tommy (HPQ)
*/
var status = 0;
@@ -30,37 +30,45 @@ function start() {
}
function action(mode, type, selection) {
if (mode < 1) {
cm.dispose();
} else {
status++;
if (cm.getPlayer().getMap().getId() == 910010100) { //Clear map
if (status == 0) {
cm.sendNext("Hello, there! I'm Tommy. There's a Pig Town nearby where we're standing. The pigs there are rowdy and uncontrollable to the point where they have stolen numerous weapons from travelers. They were kicked out from their towns, and are currently hiding out at the Pig Town.");
} else if (status == 1) {
cm.sendYesNo("What do you think about making your way there with your party members and teach those rowdy pigs a lesson?");
} else if (status == 2) {
cm.warp(910010200);
cm.dispose();
return;
}
} else if (cm.getPlayer().getMap().getId() == 910010200) { //Bonus map
if (status == 0) {
cm.sendYesNo("Would you like to exit the bonus now?");
} else {
cm.warp(910010400);
cm.dispose();
return;
}
} else if (cm.getPlayer().getMap().getId() == 910010300) { //Exit map
if (status == 0) {
cm.sendOk("You will now be warped out, thank you for helping us!");
} else {
cm.warp(100000200);
cm.dispose();
return;
}
}
if (mode < 1) {
cm.dispose();
} else {
status++;
if (cm.getPlayer().getMap().getId() == 910010100) { //Clear map
if (status == 0) {
cm.sendNext("Hello, there! I'm Tommy. There's a Pig Town nearby where we're standing. The pigs there are rowdy and uncontrollable to the point where they have stolen numerous weapons from travelers. They were kicked out from their towns, and are currently hiding out at the Pig Town.");
} else if (status == 1) {
if(cm.isLeader()) {
cm.sendYesNo("What do you think about making your way there with your party members and teach those rowdy pigs a lesson?");
}
else {
cm.sendOk("Interessed? Tell your party leader to talk to me to head there!");
cm.dispose();
return;
}
} else if (status == 2) {
cm.getEventInstance().startEventTimer(5 * 60000);
cm.getEventInstance().warpEventTeam(910010200);
cm.dispose();
return;
}
} else if (cm.getPlayer().getMap().getId() == 910010200) { //Bonus map
if (status == 0) {
cm.sendYesNo("Would you like to exit the bonus now?");
} else {
cm.warp(910010400);
cm.dispose();
return;
}
} else if (cm.getPlayer().getMap().getId() == 910010300) { //Exit map
if (status == 0) {
cm.sendOk("You will now be warped out, thank you for helping us!");
} else {
cm.warp(100000200);
cm.dispose();
return;
}
}
}
}