Files
sweetgum-server/scripts/npc/1096005.js
ronancpl 1fead59c57 Slot Max & Wind Walk fix + reviewed scripted portals
Fixed slotMax function caching up dirtied player data.
Fixed many portals not supposed to warp players to "random spawnpoints".
Fixed Wind Walk not being cancellable by attacking.
2017-11-03 17:06:48 -02:00

38 lines
1.2 KiB
JavaScript

var status = -1;
function start() {
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 0 && type == 0) {
status--;
} else if (mode == -1) {
cm.dispose();
return;
} else {
status++;
}
if (status == 0) {
cm.sendDirectionInfo(4, 1096005);//else you will crash sending sendNext
cm.sendNext("All right! Let's go!");
} else if (status == 1) {
cm.removeNPC(579711);
cm.removeNPC2(579711);
cm.updateInfo("fire", "0");
cm.playSound("cannonshooter/fire");
cm.sendDirectionInfo("Effect/Direction4.img/effect/cannonshooter/flying/0", 7000, 0, 0, -1, -1);
cm.sendDirectionInfo("Effect/Direction4.img/effect/cannonshooter/flying1/0", 7000, 0, 0, -1, -1);
cm.sendDirectionInfo(1, 800);
} else if (status == 2) {
cm.warp(912060300, 0);
} else if (status == 3) {
cm.sendDirectionInfo("Effect/Direction4.img/effect/cannonshooter/balloon/1", 9000, 0, 0, 0, -1);
cm.sendDirectionInfo(1, 1500);
} else if (status == 4) {
cm.sendDirectionInfo("Effect/Direction4.img/effect/cannonshooter/balloon/2", 9000, 0, 0, 0, -1);
cm.showIntro("Effect/Direction4.img/cannonshooter/face04");
cm.showIntro("Effect/Direction4.img/cannonshooter/out01");
cm.dispose();
}
}