Reformat and clean up item scripts
This commit is contained in:
@@ -19,10 +19,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
var status;
|
var status;
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
status = -1;
|
status = -1;
|
||||||
action(1, 0, 0);
|
action(1, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
function action(mode, type, selection) {
|
function action(mode, type, selection) {
|
||||||
@@ -33,22 +33,25 @@ function action(mode, type, selection) {
|
|||||||
im.dispose();
|
im.dispose();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mode == 1)
|
if (mode == 1) {
|
||||||
status++;
|
status++;
|
||||||
else
|
} else {
|
||||||
status--;
|
status--;
|
||||||
|
}
|
||||||
|
|
||||||
if(status == 0) {
|
if (status == 0) {
|
||||||
if (im.getMapId() == 106020300) {
|
if (im.getMapId() == 106020300) {
|
||||||
var portal = im.getMap().getPortal("obstacle");
|
var portal = im.getMap().getPortal("obstacle");
|
||||||
if (portal != null && portal.getPosition().distance(im.getPlayer().getPosition()) < 210) {
|
if (portal != null && portal.getPosition().distance(im.getPlayer().getPosition()) < 210) {
|
||||||
if(!(im.isQuestStarted(100202) || im.isQuestCompleted(100202))) im.startQuest(100202);
|
if (!(im.isQuestStarted(100202) || im.isQuestCompleted(100202))) {
|
||||||
|
im.startQuest(100202);
|
||||||
|
}
|
||||||
im.removeAll(2430014);
|
im.removeAll(2430014);
|
||||||
|
|
||||||
im.message("You have used the Killer Mushroom Spore to open the way.");
|
im.message("You have used the Killer Mushroom Spore to open the way.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
im.dispose();
|
im.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,10 +19,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
var status;
|
var status;
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
status = -1;
|
status = -1;
|
||||||
action(1, 0, 0);
|
action(1, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
function action(mode, type, selection) {
|
function action(mode, type, selection) {
|
||||||
@@ -33,15 +33,16 @@ function action(mode, type, selection) {
|
|||||||
im.dispose();
|
im.dispose();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mode == 1)
|
if (mode == 1) {
|
||||||
status++;
|
status++;
|
||||||
else
|
} else {
|
||||||
status--;
|
status--;
|
||||||
|
}
|
||||||
|
|
||||||
if(status == 0) {
|
if (status == 0) {
|
||||||
if (im.getMapId() == 106020400 && im.isQuestActive(2324)) {
|
if (im.getMapId() == 106020400 && im.isQuestActive(2324)) {
|
||||||
var player = im.getPlayer();
|
var player = im.getPlayer();
|
||||||
|
|
||||||
var portal = im.getMap().getPortal("right00");
|
var portal = im.getMap().getPortal("right00");
|
||||||
if (portal != null && portal.getPosition().distance(player.getPosition()) < 210) {
|
if (portal != null && portal.getPosition().distance(player.getPosition()) < 210) {
|
||||||
player.gainExp(3300 * player.getExpRate());
|
player.gainExp(3300 * player.getExpRate());
|
||||||
@@ -51,7 +52,7 @@ function action(mode, type, selection) {
|
|||||||
im.playerMessage(5, "You have used the Thorn Remover to clear the path.");
|
im.playerMessage(5, "You have used the Thorn Remover to clear the path.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
im.dispose();
|
im.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user