NPCs Taxis and Crafters now checks properly
Fixed taxis that wouldn't check for mesos upon travel. Fixed crafters that wouldn't check for inventory slots available before crafting items.
This commit is contained in:
53
9270017.js
53
9270017.js
@@ -1,53 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of the OdinMS Maple Story Server
|
|
||||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
|
||||||
Matthias Butz <matze@odinms.de>
|
|
||||||
Jan Christian Meyer <vimes@odinms.de>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License version 3
|
|
||||||
as published by the Free Software Foundation. You may not use, modify
|
|
||||||
or distribute this program under any other version of the
|
|
||||||
GNU Affero General Public License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
-- Odin JavaScript --------------------------------------------------------------------------------
|
|
||||||
Xinga - Pilot
|
|
||||||
-- By ---------------------------------------------------------------------------------------------
|
|
||||||
Information
|
|
||||||
-- Version Info -----------------------------------------------------------------------------------
|
|
||||||
1.0 - First Version by Information
|
|
||||||
2.0 - Second Version by Jayd
|
|
||||||
---------------------------------------------------------------------------------------------------
|
|
||||||
**/
|
|
||||||
|
|
||||||
var status = 0;
|
|
||||||
|
|
||||||
function start() {
|
|
||||||
cm.sendYesNo("The plane will be taking off soon, will you leave now? You will have to buy the plane ticket again to come in here.");
|
|
||||||
}
|
|
||||||
|
|
||||||
function action(mode, type, selection) {
|
|
||||||
if (mode != 1) {
|
|
||||||
if (mode == 0)
|
|
||||||
cm.sendOk("Please hold on for a sec, and plane will be taking off. Thanks for your patience.");
|
|
||||||
cm.dispose();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
status++;
|
|
||||||
if (status == 1) {
|
|
||||||
cm.sendNext("The ticket is not refundable, hope to see you again!");
|
|
||||||
} else if(status == 2){
|
|
||||||
cm.warp(103000000);
|
|
||||||
cm.dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
86
9270018.js
86
9270018.js
@@ -1,86 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of the OdinMS Maple Story Server
|
|
||||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
|
||||||
Matthias Butz <matze@odinms.de>
|
|
||||||
Jan Christian Meyer <vimes@odinms.de>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License version 3
|
|
||||||
as published by the Free Software Foundation. You may not use, modify
|
|
||||||
or distribute this program under any other version of the
|
|
||||||
GNU Affero General Public License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
-- Odin JavaScript --------------------------------------------------------------------------------
|
|
||||||
Kerny - Pilot
|
|
||||||
-- By ---------------------------------------------------------------------------------------------
|
|
||||||
Information
|
|
||||||
-- Version Info -----------------------------------------------------------------------------------
|
|
||||||
1.0 - First Version by Information
|
|
||||||
2.0 - Second Version by Jayd
|
|
||||||
---------------------------------------------------------------------------------------------------
|
|
||||||
**/
|
|
||||||
var k2s;
|
|
||||||
var airport;
|
|
||||||
var s2k;
|
|
||||||
|
|
||||||
function start() {
|
|
||||||
status = -1;
|
|
||||||
action(1, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
function action(mode, type, selection) {
|
|
||||||
if(mode == -1) {
|
|
||||||
cm.dispose();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(mode == 1) {
|
|
||||||
status++;
|
|
||||||
}
|
|
||||||
if(mode == 0) {
|
|
||||||
if (cm.getMapId() == 540010101) {
|
|
||||||
cm.sendOk("Please hold on for a sec, and we're reaching Singapore! Thanks for your patience.");
|
|
||||||
cm.dispose();
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
cm.sendOk("Please hold on for a sec, and we're reaching Kerning City! Thanks for your patience.");
|
|
||||||
cm.dispose();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(status == 0) {
|
|
||||||
if (cm.getMapId() == 540010001) {
|
|
||||||
cm.sendYesNo("The plane is taking off soon, are you sure you want to leave now? The ticket is not refundable.");
|
|
||||||
airport = 1;
|
|
||||||
} else if (cm.getMapId() == 540010002) {
|
|
||||||
cm.sendYesNo("We're reaching Kerning City in a minute, are you sure you want to leave now? The ticket is not refundable.");
|
|
||||||
s2k = 1;
|
|
||||||
} else if (cm.getMapId() == 540010101) {
|
|
||||||
cm.sendYesNo("We're reaching Singapore in a minute, are you sure you want to leave now? The ticket is not refundable.");
|
|
||||||
k2s = 1;
|
|
||||||
}
|
|
||||||
} else if(status == 1) {
|
|
||||||
if (k2s == 1) {
|
|
||||||
cm.warp(103000000);
|
|
||||||
cm.sendOk("Hope to see you again soon!");
|
|
||||||
cm.dispose();
|
|
||||||
} else if (airport == 1) {
|
|
||||||
cm.warp(540010000);
|
|
||||||
cm.sendOk("Hope to see you again soon!");
|
|
||||||
cm.dispose();
|
|
||||||
} else if (s2k == 1) {
|
|
||||||
cm.warp(540010000);
|
|
||||||
cm.sendOk("Hope to see you again soon!");
|
|
||||||
cm.dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
80
9270038.js
80
9270038.js
@@ -1,80 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of the OdinMS Maple Story Server
|
|
||||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
|
||||||
Matthias Butz <matze@odinms.de>
|
|
||||||
Jan Christian Meyer <vimes@odinms.de>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License version 3
|
|
||||||
as published by the Free Software Foundation. You may not use, modify
|
|
||||||
or distribute this program under any other version of the
|
|
||||||
GNU Affero General Public License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
-- Odin JavaScript --------------------------------------------------------------------------------
|
|
||||||
Shalon - Ticketing Usher
|
|
||||||
-- By ---------------------------------------------------------------------------------------------
|
|
||||||
Whoever written this script
|
|
||||||
-- Version Info -----------------------------------------------------------------------------------
|
|
||||||
1.0 - First Version by whoever written this script
|
|
||||||
2.0 - Second Version by Jayd
|
|
||||||
---------------------------------------------------------------------------------------------------
|
|
||||||
**/
|
|
||||||
|
|
||||||
status = -1;
|
|
||||||
oldSelection = -1;
|
|
||||||
|
|
||||||
function start() {
|
|
||||||
cm.sendSimple("Hello, I am Shalon from Singapore Airport. I can assist you in getting you to Kerning City in no time. Do you want to go to Kerning City?\r\n#b#L0#I would like to buy a plane ticket to Kerning City\r\n#b#L1#Let me go in to the departure point.");
|
|
||||||
}
|
|
||||||
|
|
||||||
function action(mode, type, selection) {
|
|
||||||
status++;
|
|
||||||
if (mode <= 0){
|
|
||||||
oldSelection = -1;
|
|
||||||
cm.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(status == 0){
|
|
||||||
if(selection == 0){
|
|
||||||
cm.sendYesNo("The ticket will cost you 5,000 mesos. Will you purchase the ticket?");
|
|
||||||
}else if(selection == 1){
|
|
||||||
cm.sendYesNo("Would you like to go in now? You will lose your ticket once you go in! Thank you for choosing Wizet Airline.");
|
|
||||||
}
|
|
||||||
oldSelection = selection;
|
|
||||||
}else if(status == 1){
|
|
||||||
if(oldSelection == 0){
|
|
||||||
if (cm.getPlayer().getMeso() > 4999 && cm.getPlayer().haveItem(4031732) == false) {
|
|
||||||
cm.gainMeso(-5000);
|
|
||||||
cm.gainItem(4031732);
|
|
||||||
cm.sendOk("Thank you for choosing Wizet Airline! Enjoy your flight!");
|
|
||||||
cm.dispose();
|
|
||||||
} else if (cm.getPlayer().getMeso() < 4999 || cm.getPlayer().haveItem(4031732)) {
|
|
||||||
cm.sendOk("You do not have enough mesos or you've already purchased a ticket.");
|
|
||||||
cm.dispose();
|
|
||||||
}
|
|
||||||
}else if(oldSelection == 1){
|
|
||||||
if(cm.itemQuantity(4031732) > 0){
|
|
||||||
var em = cm.getEventManager("AirPlane");
|
|
||||||
if(em.getProperty("entry") == "true"){
|
|
||||||
cm.warp(540010001);
|
|
||||||
cm.gainItem(4031732, -1);
|
|
||||||
}else{
|
|
||||||
cm.sendOk("Sorry the plane has taken off, please wait a few minutes.");
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
cm.sendOk("You need a #b#t4031732##k to get on the plane!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cm.dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
80
9270041.js
80
9270041.js
@@ -1,80 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of the OdinMS Maple Story Server
|
|
||||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
|
||||||
Matthias Butz <matze@odinms.de>
|
|
||||||
Jan Christian Meyer <vimes@odinms.de>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License version 3
|
|
||||||
as published by the Free Software Foundation. You may not use, modify
|
|
||||||
or distribute this program under any other version of the
|
|
||||||
GNU Affero General Public License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
-- Odin JavaScript --------------------------------------------------------------------------------
|
|
||||||
Irene - Ticketing Usher
|
|
||||||
-- By ---------------------------------------------------------------------------------------------
|
|
||||||
Whoever written this script
|
|
||||||
-- Version Info -----------------------------------------------------------------------------------
|
|
||||||
1.0 - First Version by whoever written this script
|
|
||||||
2.0 - Second Version by Jayd
|
|
||||||
---------------------------------------------------------------------------------------------------
|
|
||||||
**/
|
|
||||||
|
|
||||||
status = -1;
|
|
||||||
oldSelection = -1;
|
|
||||||
|
|
||||||
function start() {
|
|
||||||
cm.sendSimple("Hello, I am Irene from Singapore Airport. I can assist you in getting you to Singapore in no time. Do you want to go to Singapore?\r\n#b#L0#I would like to buy a plane ticket to Singapore\r\n#b#L1#Let me go in to the departure point.");
|
|
||||||
}
|
|
||||||
|
|
||||||
function action(mode, type, selection) {
|
|
||||||
status++;
|
|
||||||
if (mode <= 0){
|
|
||||||
oldSelection = -1;
|
|
||||||
cm.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(status == 0){
|
|
||||||
if(selection == 0){
|
|
||||||
cm.sendYesNo("The ticket will cost you 5,000 mesos. Will you purchase the ticket?");
|
|
||||||
}else if(selection == 1){
|
|
||||||
cm.sendYesNo("Would you like to go in now? You will lose your ticket once you go in! Thank you for choosing Wizet Airline.");
|
|
||||||
}
|
|
||||||
oldSelection = selection;
|
|
||||||
}else if(status == 1){
|
|
||||||
if(oldSelection == 0){
|
|
||||||
if (cm.getPlayer().getMeso() > 4999 && cm.getPlayer().haveItem(4031731) == false) {
|
|
||||||
cm.gainMeso(-5000);
|
|
||||||
cm.gainItem(4031731);
|
|
||||||
cm.sendOk("Thank you for choosing Wizet Airline! Enjoy your flight!");
|
|
||||||
cm.dispose();
|
|
||||||
} else if (cm.getPlayer().getMeso() < 4999 || cm.getPlayer().haveItem(4031731)) {
|
|
||||||
cm.sendOk("You do not have enough mesos or you've already purchased a ticket.");
|
|
||||||
cm.dispose();
|
|
||||||
}
|
|
||||||
}else if(oldSelection == 1){
|
|
||||||
if(cm.itemQuantity(4031731) > 0){
|
|
||||||
var em = cm.getEventManager("AirPlane");
|
|
||||||
if(em.getProperty("entry") == "true"){
|
|
||||||
cm.warp(540010100);
|
|
||||||
cm.gainItem(4031731, -1);
|
|
||||||
}else{
|
|
||||||
cm.sendOk("Sorry the plane has taken off, please wait a few minutes.");
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
cm.sendOk("You need a #b#t4031731##k to get on the plane!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cm.dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,16 +2,6 @@
|
|||||||
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
||||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
||||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||||
<group>
|
<group/>
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/Ellin.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/2094000.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/BossRushPQ.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/event/EventInstanceManager.java</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/KerningPQ.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/9000037.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/9020000.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/PiratePQ.js</file>
|
|
||||||
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/world0/2133000.js</file>
|
|
||||||
</group>
|
|
||||||
</open-files>
|
</open-files>
|
||||||
</project-private>
|
</project-private>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
if (status == 1) {
|
if (status == 1) {
|
||||||
cm.sendYesNo(cm.getJobId() == 0 ? "We have a special 90% discount for beginners. The Ant Tunnel is located deep inside in the dungeon that's placed at the center of the Victoria Island, where the 24 Hr Mobile Store is. Would you like to go there for #b1,000 mesos#k?" : "The regular fee applies for all non-beginners. The Ant Tunnel is located deep inside in the dungeon that's placed at the center of the Victoria Island, where 24 Hr Mobile Store is. Would you like to go there for #b10,000 mesos#k?");
|
cm.sendYesNo(cm.getJobId() == 0 ? "We have a special 90% discount for beginners. The Ant Tunnel is located deep inside in the dungeon that's placed at the center of the Victoria Island, where the 24 Hr Mobile Store is. Would you like to go there for #b1,000 mesos#k?" : "The regular fee applies for all non-beginners. The Ant Tunnel is located deep inside in the dungeon that's placed at the center of the Victoria Island, where 24 Hr Mobile Store is. Would you like to go there for #b10,000 mesos#k?");
|
||||||
cost *= cm.getJobId() == 0 ? 10 : 1;
|
cost /= ((cm.getJobId() == 0) ? 10 : 1);
|
||||||
} else if (status == 2) {
|
} else if (status == 2) {
|
||||||
if (cm.getMeso() < cost)
|
if (cm.getMeso() < cost)
|
||||||
cm.sendNext("It looks like you don't have enough mesos. Sorry but you won't be able to use this without it.")
|
cm.sendNext("It looks like you don't have enough mesos. Sorry but you won't be able to use this without it.")
|
||||||
|
|||||||
@@ -46,17 +46,19 @@ function action(mode, type, selection) {
|
|||||||
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
|
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
|
||||||
selectedMap = selection;
|
selectedMap = selection;
|
||||||
} else if (status == 3) {
|
} else if (status == 3) {
|
||||||
if (cm.getMeso() < (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection])) {
|
if (cm.getJobId() == 0) {
|
||||||
|
mesos = cost[selectedMap] / 10;
|
||||||
|
} else {
|
||||||
|
mesos = cost[selectedMap];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cm.getMeso() < mesos) {
|
||||||
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
|
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cm.getJobId() == 0) {
|
|
||||||
mesos = -cost[selectedMap] / 10;
|
cm.gainMeso(-mesos);
|
||||||
} else {
|
|
||||||
mesos = -cost[selectedMap];
|
|
||||||
}
|
|
||||||
cm.gainMeso(mesos);
|
|
||||||
cm.warp(maps[selectedMap], 0);
|
cm.warp(maps[selectedMap], 0);
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,17 +36,19 @@ function action(mode, type, selection) {
|
|||||||
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
|
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
|
||||||
selectedMap = selection;
|
selectedMap = selection;
|
||||||
} else if (status == 3) {
|
} else if (status == 3) {
|
||||||
if (cm.getMeso() < (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection])) {
|
if (cm.getJobId() == 0) {
|
||||||
|
mesos = cost[selectedMap] / 10;
|
||||||
|
} else {
|
||||||
|
mesos = cost[selectedMap];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cm.getMeso() < mesos) {
|
||||||
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
|
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cm.getJobId() == 0) {
|
|
||||||
mesos = -cost[selectedMap] / 10;
|
cm.gainMeso(-mesos);
|
||||||
} else {
|
|
||||||
mesos = -cost[selectedMap];
|
|
||||||
}
|
|
||||||
cm.gainMeso(mesos);
|
|
||||||
cm.warp(maps[selectedMap], 0);
|
cm.warp(maps[selectedMap], 0);
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,21 +167,26 @@ function action(mode, type, selection) {
|
|||||||
if (!complete)
|
if (!complete)
|
||||||
cm.sendOk("Surely you, of all people, would understand the value of having quality items? I can't do that without the items I require.");
|
cm.sendOk("Surely you, of all people, would understand the value of having quality items? I can't do that without the items I require.");
|
||||||
else {
|
else {
|
||||||
if (cm.canHold(item)) {
|
var recvItem = item, recvQty;
|
||||||
|
|
||||||
|
if (item >= 2060000 && item <= 2060002) //bow arrows
|
||||||
|
recvQty = 1000 - (item - 2060000) * 100;
|
||||||
|
else if (item >= 2061000 && item <= 2061002) //xbow arrows
|
||||||
|
recvQty = 1000 - (item - 2061000) * 100;
|
||||||
|
else if (item == 4003000)//screws
|
||||||
|
recvQty = 15 * qty;
|
||||||
|
else
|
||||||
|
recvQty = qty;
|
||||||
|
|
||||||
|
if (cm.canHold(recvItem, recvQty)) {
|
||||||
if (mats instanceof Array) {
|
if (mats instanceof Array) {
|
||||||
for (var i = 0; i < mats.length; i++)
|
for (var i = 0; i < mats.length; i++)
|
||||||
cm.gainItem(mats[i], -(matQty[i] * qty));
|
cm.gainItem(mats[i], -(matQty[i] * qty));
|
||||||
}else
|
}else
|
||||||
cm.gainItem(mats, -(matQty * qty));
|
cm.gainItem(mats, -(matQty * qty));
|
||||||
cm.gainMeso(-(cost * qty));
|
cm.gainMeso(-(cost * qty));
|
||||||
if (item >= 2060000 && item <= 2060002) //bow arrows
|
|
||||||
cm.gainItem(item, 1000 - (item - 2060000) * 100);
|
cm.gainItem(recvItem, recvQty);
|
||||||
else if (item >= 2061000 && item <= 2061002) //xbow arrows
|
|
||||||
cm.gainItem(item, 1000 - (item - 2061000) * 100);
|
|
||||||
else if (item == 4003000)//screws
|
|
||||||
cm.gainItem(4003000, 15 * qty);
|
|
||||||
else
|
|
||||||
cm.gainItem(item, qty);
|
|
||||||
cm.sendOk("A perfect item, as usual. Come and see me if you need anything else.");
|
cm.sendOk("A perfect item, as usual. Come and see me if you need anything else.");
|
||||||
}else {
|
}else {
|
||||||
cm.sendOk("Please make sure you have room in your inventory, and talk to me again.");
|
cm.sendOk("Please make sure you have room in your inventory, and talk to me again.");
|
||||||
|
|||||||
@@ -36,17 +36,19 @@ function action(mode, type, selection) {
|
|||||||
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
|
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
|
||||||
selectedMap = selection;
|
selectedMap = selection;
|
||||||
} else if (status == 3) {
|
} else if (status == 3) {
|
||||||
if (cm.getMeso() < (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection])) {
|
if (cm.getJobId() == 0) {
|
||||||
|
mesos = cost[selectedMap] / 10;
|
||||||
|
} else {
|
||||||
|
mesos = cost[selectedMap];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cm.getMeso() < mesos) {
|
||||||
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
|
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cm.getJobId() == 0) {
|
|
||||||
mesos = -cost[selectedMap] / 10;
|
cm.gainMeso(-mesos);
|
||||||
} else {
|
|
||||||
mesos = -cost[selectedMap];
|
|
||||||
}
|
|
||||||
cm.gainMeso(mesos);
|
|
||||||
cm.warp(maps[selectedMap], 0);
|
cm.warp(maps[selectedMap], 0);
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ function action(mode, type, selection) {
|
|||||||
else if (status == 4 && mode == 1) {
|
else if (status == 4 && mode == 1) {
|
||||||
var complete = true;
|
var complete = true;
|
||||||
|
|
||||||
if(!cm.canHold(item)) {
|
if(!cm.canHold(item, qty)) {
|
||||||
cm.sendOk("Check your inventory for a free slot first.");
|
cm.sendOk("Check your inventory for a free slot first.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
@@ -200,26 +200,6 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
else if (!cm.haveItem(mats, matQty))
|
else if (!cm.haveItem(mats, matQty))
|
||||||
complete = false;
|
complete = false;
|
||||||
|
|
||||||
/* if (mats instanceof Array) {
|
|
||||||
for(var i = 0; complete && i < mats.length; i++)
|
|
||||||
{
|
|
||||||
if (matQty[i] * qty == 1) {
|
|
||||||
if (!cm.haveItem(mats[i]))
|
|
||||||
{
|
|
||||||
complete = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (!cm.haveItem(mats[i],matQty[i] * selection)) complete=false;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (!cm.haveItem(mats,matQty * selection)) complete=false;
|
|
||||||
|
|
||||||
} */
|
|
||||||
}
|
}
|
||||||
if (!complete)
|
if (!complete)
|
||||||
cm.sendOk("I'm afraid you're missing something for the item you want. See you another time, yes?");
|
cm.sendOk("I'm afraid you're missing something for the item you want. See you another time, yes?");
|
||||||
|
|||||||
@@ -165,8 +165,14 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
else if (status == 4 && mode == 1) {
|
else if (status == 4 && mode == 1) {
|
||||||
var complete = true;
|
var complete = true;
|
||||||
|
var recvItem = item, recvQty;
|
||||||
|
|
||||||
|
if (item == 4003000)//screws
|
||||||
|
recvQty = 15 * qty;
|
||||||
|
else
|
||||||
|
recvQty = qty;
|
||||||
|
|
||||||
if(!cm.canHold(item)) {
|
if(!cm.canHold(recvItem, recvQty)) {
|
||||||
cm.sendOk("Check your inventory for a free slot first.");
|
cm.sendOk("Check your inventory for a free slot first.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
@@ -186,27 +192,6 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
else if (!cm.haveItem(mats, matQty))
|
else if (!cm.haveItem(mats, matQty))
|
||||||
complete = false;
|
complete = false;
|
||||||
|
|
||||||
/*
|
|
||||||
if (mats instanceof Array) {
|
|
||||||
for(var i = 0; complete && i < mats.length; i++)
|
|
||||||
{
|
|
||||||
if (matQty[i] * qty == 1) {
|
|
||||||
if (!cm.haveItem(mats[i]))
|
|
||||||
{
|
|
||||||
complete = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
if (!cm.haveItem(mats[i],matQty[i]*qty)) complete=false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (!cm.haveItem(mats,matQty)) complete=false;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!complete)
|
if (!complete)
|
||||||
@@ -223,10 +208,7 @@ function action(mode, type, selection) {
|
|||||||
if (cost > 0)
|
if (cost > 0)
|
||||||
cm.gainMeso(-cost * qty);
|
cm.gainMeso(-cost * qty);
|
||||||
|
|
||||||
if (item == 4003000)//screws
|
cm.gainItem(recvItem, recvQty);
|
||||||
cm.gainItem(4003000, 15 * qty);
|
|
||||||
else
|
|
||||||
cm.gainItem(item, qty);
|
|
||||||
cm.sendOk("Did that come out right? Come by me again if you have anything for me to practice on.");
|
cm.sendOk("Did that come out right? Come by me again if you have anything for me to practice on.");
|
||||||
}
|
}
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
|
|||||||
@@ -36,17 +36,19 @@ function action(mode, type, selection) {
|
|||||||
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
|
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
|
||||||
selectedMap = selection;
|
selectedMap = selection;
|
||||||
} else if (status == 3) {
|
} else if (status == 3) {
|
||||||
if (cm.getMeso() < (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection])) {
|
if (cm.getJobId() == 0) {
|
||||||
|
mesos = cost[selectedMap] / 10;
|
||||||
|
} else {
|
||||||
|
mesos = cost[selectedMap];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cm.getMeso() < mesos) {
|
||||||
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
|
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cm.getJobId() == 0) {
|
|
||||||
mesos = -cost[selectedMap] / 10;
|
cm.gainMeso(-mesos);
|
||||||
} else {
|
|
||||||
mesos = -cost[selectedMap];
|
|
||||||
}
|
|
||||||
cm.gainMeso(mesos);
|
|
||||||
cm.warp(maps[selectedMap], 0);
|
cm.warp(maps[selectedMap], 0);
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ function action(mode, type, selection) {
|
|||||||
else if (status == 3 && mode == 1) {
|
else if (status == 3 && mode == 1) {
|
||||||
var complete = true;
|
var complete = true;
|
||||||
|
|
||||||
if(!cm.canHold(item)) {
|
if(!cm.canHold(item, 1)) {
|
||||||
cm.sendOk("Check your inventory for a free slot first.");
|
cm.sendOk("Check your inventory for a free slot first.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
@@ -205,26 +205,6 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
else if (!cm.haveItem(mats, matQty))
|
else if (!cm.haveItem(mats, matQty))
|
||||||
complete = false;
|
complete = false;
|
||||||
|
|
||||||
/*if (mats instanceof Array) {
|
|
||||||
for(var i = 0; complete && i < mats.length; i++)
|
|
||||||
{
|
|
||||||
if (matQty[i] == 1) {
|
|
||||||
if (!cm.haveItem(mats[i]))
|
|
||||||
{
|
|
||||||
complete = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
if (!cm.haveItem(mats[i],matQty[i])) complete=false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
if (!cm.haveItem(mats,matQty)) complete=false;
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!complete)
|
if (!complete)
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
if (status == 1) {
|
if (status == 1) {
|
||||||
cm.sendYesNo(cm.getJobId() == 0 ? "We have a special 90% discount for beginners. The Ant Tunnel is located deep inside in the dungeon that's placed at the center of the Victoria Island, where the 24 Hr Mobile Store is. Would you like to go there for #b1,000 mesos#k?" : "The regular fee applies for all non-beginners. The Ant Tunnel is located deep inside in the dungeon that's placed at the center of the Victoria Island, where 24 Hr Mobile Store is. Would you like to go there for #b10,000 mesos#k?");
|
cm.sendYesNo(cm.getJobId() == 0 ? "We have a special 90% discount for beginners. The Ant Tunnel is located deep inside in the dungeon that's placed at the center of the Victoria Island, where the 24 Hr Mobile Store is. Would you like to go there for #b1,000 mesos#k?" : "The regular fee applies for all non-beginners. The Ant Tunnel is located deep inside in the dungeon that's placed at the center of the Victoria Island, where 24 Hr Mobile Store is. Would you like to go there for #b10,000 mesos#k?");
|
||||||
cost *= cm.getJobId() == 0 ? 10 : 1;
|
cost /= ((cm.getJobId() == 0) ? 10 : 1);
|
||||||
} else if (status == 2) {
|
} else if (status == 2) {
|
||||||
if (cm.getMeso() < cost)
|
if (cm.getMeso() < cost)
|
||||||
cm.sendNext("It looks like you don't have enough mesos. Sorry but you won't be able to use this without it.")
|
cm.sendNext("It looks like you don't have enough mesos. Sorry but you won't be able to use this without it.")
|
||||||
|
|||||||
@@ -205,8 +205,14 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
else if (status == 4 && mode == 1) {
|
else if (status == 4 && mode == 1) {
|
||||||
var complete = true;
|
var complete = true;
|
||||||
|
var recvItem = item, recvQty;
|
||||||
|
|
||||||
if(!cm.canHold(item)) {
|
if (item == 4003000)//screws
|
||||||
|
recvQty = 15 * qty;
|
||||||
|
else
|
||||||
|
recvQty = qty;
|
||||||
|
|
||||||
|
if(!cm.canHold(recvItem, recvQty)) {
|
||||||
cm.sendOk("Check your inventory for a free slot first.");
|
cm.sendOk("Check your inventory for a free slot first.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
@@ -226,20 +232,6 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
else if (!cm.haveItem(mats, matQty))
|
else if (!cm.haveItem(mats, matQty))
|
||||||
complete = false;
|
complete = false;
|
||||||
/*
|
|
||||||
if (mats instanceof Array) {
|
|
||||||
for(var i = 0; complete && i < mats.length; i++)
|
|
||||||
{
|
|
||||||
if (matQty[i] * qty == 1)
|
|
||||||
if (!cm.haveItem(mats[i]))
|
|
||||||
complete = false;
|
|
||||||
else
|
|
||||||
if (!cm.haveItem(mats[i],matQty[i])) complete=false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (!cm.haveItem(mats,matQty)) complete=false;
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!complete)
|
if (!complete)
|
||||||
@@ -254,10 +246,8 @@ function action(mode, type, selection) {
|
|||||||
cm.gainItem(mats, -matQty * qty);
|
cm.gainItem(mats, -matQty * qty);
|
||||||
if (cost > 0)
|
if (cost > 0)
|
||||||
cm.gainMeso(-cost * qty);
|
cm.gainMeso(-cost * qty);
|
||||||
if (item == 4003000)//screws
|
|
||||||
cm.gainItem(4003000, 15 * qty);
|
cm.gainItem(recvItem, recvQty);
|
||||||
else
|
|
||||||
cm.gainItem(item, qty);
|
|
||||||
cm.sendOk("All done. If you need anything else... Well, I'm not going anywhere.");
|
cm.sendOk("All done. If you need anything else... Well, I'm not going anywhere.");
|
||||||
}
|
}
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ function action(mode, type, selection) {
|
|||||||
} else if (status == 4) {
|
} else if (status == 4) {
|
||||||
var complete = true;
|
var complete = true;
|
||||||
|
|
||||||
if(!cm.canHold(item)) {
|
if(!cm.canHold(item, qty)) {
|
||||||
cm.sendOk("Check your inventory for a free slot first.");
|
cm.sendOk("Check your inventory for a free slot first.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
@@ -178,18 +178,6 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
else if (!cm.haveItem(mats, matQty))
|
else if (!cm.haveItem(mats, matQty))
|
||||||
complete = false;
|
complete = false;
|
||||||
|
|
||||||
/*if (mats instanceof Array) {
|
|
||||||
for (var i = 0; complete && i < mats.length; i++) {
|
|
||||||
if (matQty[i] * qty == 1) {
|
|
||||||
complete = cm.haveItem(mats[i]);
|
|
||||||
} else {
|
|
||||||
complete = cm.haveItem(mats[i], matQty[i] * qty);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
complete = cm.haveItem(mats, matQty * qty);
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!complete)
|
if (!complete)
|
||||||
|
|||||||
@@ -36,17 +36,19 @@ function action(mode, type, selection) {
|
|||||||
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
|
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
|
||||||
selectedMap = selection;
|
selectedMap = selection;
|
||||||
} else if (status == 3) {
|
} else if (status == 3) {
|
||||||
if (cm.getMeso() < (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection])) {
|
if (cm.getJobId() == 0) {
|
||||||
|
mesos = cost[selectedMap] / 10;
|
||||||
|
} else {
|
||||||
|
mesos = cost[selectedMap];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cm.getMeso() < mesos) {
|
||||||
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
|
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cm.getJobId() == 0) {
|
|
||||||
mesos = -cost[selectedMap] / 10;
|
cm.gainMeso(-mesos);
|
||||||
} else {
|
|
||||||
mesos = -cost[selectedMap];
|
|
||||||
}
|
|
||||||
cm.gainMeso(mesos);
|
|
||||||
cm.warp(maps[selectedMap], 0);
|
cm.warp(maps[selectedMap], 0);
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ function action(mode, type, selection) {
|
|||||||
else if (status == 3 && mode == 1) {
|
else if (status == 3 && mode == 1) {
|
||||||
var complete = true;
|
var complete = true;
|
||||||
|
|
||||||
if(!cm.canHold(item)) {
|
if(!cm.canHold(item, 1)) {
|
||||||
cm.sendOk("Check your inventory for a free slot first.");
|
cm.sendOk("Check your inventory for a free slot first.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
@@ -184,24 +184,6 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
else if (!cm.haveItem(mats, matQty))
|
else if (!cm.haveItem(mats, matQty))
|
||||||
complete = false;
|
complete = false;
|
||||||
|
|
||||||
/*
|
|
||||||
if (mats instanceof Array) {
|
|
||||||
for(var i = 0; complete && i < mats.length; i++) {
|
|
||||||
if (matQty[i] == 1) {
|
|
||||||
if (!cm.haveItem(mats[i]))
|
|
||||||
complete = false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (!cm.haveItem(mats[i],matQty[i] * selection)) complete=false;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (!cm.haveItem(mats,matQty * selection)) complete=false;
|
|
||||||
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
if (!complete)
|
if (!complete)
|
||||||
cm.sendOk("Sorry, but I have to have those items to get this exactly right. Perhaps next time.");
|
cm.sendOk("Sorry, but I have to have those items to get this exactly right. Perhaps next time.");
|
||||||
|
|||||||
@@ -35,17 +35,19 @@ function action(mode, type, selection) {
|
|||||||
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
|
cm.sendYesNo("You don't have anything else to do here, huh? Do you really want to go to #b#m" + maps[selection] + "##k? It'll cost you #b"+ (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection]) + " mesos#k.");
|
||||||
selectedMap = selection;
|
selectedMap = selection;
|
||||||
} else if (status == 3) {
|
} else if (status == 3) {
|
||||||
if (cm.getMeso() < (cm.getJobId() == 0 ? cost[selection] / 10 : cost[selection])) {
|
if (cm.getJobId() == 0) {
|
||||||
|
mesos = cost[selectedMap] / 10;
|
||||||
|
} else {
|
||||||
|
mesos = cost[selectedMap];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cm.getMeso() < mesos) {
|
||||||
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
|
cm.sendNext("You don't have enough mesos. Sorry to say this, but without them, you won't be able to ride the cab.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cm.getJobId() == 0) {
|
|
||||||
mesos = -cost[selectedMap] / 10;
|
cm.gainMeso(-mesos);
|
||||||
} else {
|
|
||||||
mesos = -cost[selectedMap];
|
|
||||||
}
|
|
||||||
cm.gainMeso(mesos);
|
|
||||||
cm.warp(maps[selectedMap], 0);
|
cm.warp(maps[selectedMap], 0);
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ function action(mode, type, selection) {
|
|||||||
else if (status == 3 && mode == 1) {
|
else if (status == 3 && mode == 1) {
|
||||||
var complete = true;
|
var complete = true;
|
||||||
|
|
||||||
if(!cm.canHold(item)) {
|
if(!cm.canHold(item, 1)) {
|
||||||
cm.sendOk("Check your inventory for a free slot first.");
|
cm.sendOk("Check your inventory for a free slot first.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
@@ -177,24 +177,6 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
else if (!cm.haveItem(mats, matQty))
|
else if (!cm.haveItem(mats, matQty))
|
||||||
complete = false;
|
complete = false;
|
||||||
/*
|
|
||||||
if (mats instanceof Array) {
|
|
||||||
for(var i = 0; complete && i < mats.length; i++)
|
|
||||||
{
|
|
||||||
if (matQty[i] == 1) {
|
|
||||||
if (!cm.haveItem(mats[i]))
|
|
||||||
{
|
|
||||||
complete = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (!cm.haveItem(mats[i],matQty[i])) complete=false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (!cm.haveItem(mats,matQty)) complete=false;
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!complete)
|
if (!complete)
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ function action(mode, type, selection) {
|
|||||||
for (var i = 0; i < items.length; i++){
|
for (var i = 0; i < items.length; i++){
|
||||||
selStr += "\r\n#L" + i + "# " + items[i] + "#l";
|
selStr += "\r\n#L" + i + "# " + items[i] + "#l";
|
||||||
}
|
}
|
||||||
|
equip = false;
|
||||||
cm.sendSimple(selStr);
|
cm.sendSimple(selStr);
|
||||||
}
|
}
|
||||||
else if (selectedType == 3){ //crystal refine
|
else if (selectedType == 3){ //crystal refine
|
||||||
@@ -176,8 +177,7 @@ function action(mode, type, selection) {
|
|||||||
cm.sendGetNumber(prompt,1,1,100)
|
cm.sendGetNumber(prompt,1,1,100)
|
||||||
}
|
}
|
||||||
else if (status == 3 && mode == 1) {
|
else if (status == 3 && mode == 1) {
|
||||||
if (equip)
|
if (equip) {
|
||||||
{
|
|
||||||
selectedItem = selection;
|
selectedItem = selection;
|
||||||
qty = 1;
|
qty = 1;
|
||||||
}
|
}
|
||||||
@@ -187,7 +187,7 @@ function action(mode, type, selection) {
|
|||||||
if (selectedType == 5){ //arrow refine
|
if (selectedType == 5){ //arrow refine
|
||||||
var itemSet = new Array(2060000,2061000,2060001,2061001,2060002,2061002);
|
var itemSet = new Array(2060000,2061000,2060001,2061001,2060002,2061002);
|
||||||
var matSet = new Array(new Array (4003001,4003004),new Array (4003001,4003004),new Array (4011000,4003001,4003004),new Array (4011000,4003001,4003004),
|
var matSet = new Array(new Array (4003001,4003004),new Array (4003001,4003004),new Array (4011000,4003001,4003004),new Array (4011000,4003001,4003004),
|
||||||
new Array (4011001,4003001,4003005),new Array (4011001,4003001,4003005));
|
new Array (4011001,4003001,4003005),new Array (4011001,4003001,4003005));
|
||||||
var matQtySet = new Array (new Array (1,1),new Array (1,1),new Array (1,3,10),new Array (1,3,10),new Array (1,5,15),new Array (1,5,15));
|
var matQtySet = new Array (new Array (1,1),new Array (1,1),new Array (1,3,10),new Array (1,3,10),new Array (1,5,15),new Array (1,5,15));
|
||||||
var costSet = new Array (0,0,0,0,0,0);
|
var costSet = new Array (0,0,0,0,0,0);
|
||||||
item = itemSet[selectedItem];
|
item = itemSet[selectedItem];
|
||||||
@@ -219,59 +219,58 @@ function action(mode, type, selection) {
|
|||||||
cm.sendYesNo(prompt);
|
cm.sendYesNo(prompt);
|
||||||
}
|
}
|
||||||
else if (status == 4 && mode == 1) {
|
else if (status == 4 && mode == 1) {
|
||||||
var complete = true;
|
var recvItem = item, recvQty;
|
||||||
|
|
||||||
if (cm.getMeso() < cost * qty)
|
if (item >= 2060000 && item <= 2060002) {//bow arrows
|
||||||
{
|
recvQty = 1000 - (item - 2060000) * 100;
|
||||||
cm.sendOk("I'm afraid you cannot afford my services.")
|
}
|
||||||
|
else if (item >= 2061000 && item <= 2061002) {//xbow arrows
|
||||||
|
recvQty = 1000 - (item - 2061000) * 100;
|
||||||
|
}
|
||||||
|
else if (item == 4003000) {//screws
|
||||||
|
recvQty = 15 * qty;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
recvQty = qty;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (mats instanceof Array) {
|
|
||||||
for(var i = 0; complete && i < mats.length; i++)
|
|
||||||
{
|
|
||||||
if (matQty[i] * qty == 1) {
|
|
||||||
if (!cm.haveItem(mats[i]))
|
|
||||||
{
|
|
||||||
complete = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (cm.haveItem(matQty[i]*qty))complete=false;
|
|
||||||
|
|
||||||
}
|
if(!cm.canHold(recvItem, recvQty)) {
|
||||||
|
cm.sendOk("I'm afraid you don't have a slot available for the item in your inventory.");
|
||||||
|
} else if (cm.getMeso() < cost * qty) {
|
||||||
|
cm.sendOk("I'm afraid you cannot afford my services.");
|
||||||
|
} else {
|
||||||
|
var complete = true;
|
||||||
|
|
||||||
|
if (mats instanceof Array) {
|
||||||
|
for(var i = 0; complete && i < mats.length; i++) {
|
||||||
|
if (!cm.haveItem(mats[i], matQty[i] * qty))
|
||||||
|
complete = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (cm.haveItem(matQty*qty))complete=false;
|
if (!cm.haveItem(mats, matQty * qty))
|
||||||
|
complete = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
if (!complete)
|
||||||
if (!complete)
|
cm.sendOk("I can't refine anything for you without the proper items.");
|
||||||
cm.sendOk("I can't refine anything for you without the proper items.");
|
else {
|
||||||
else {
|
if (mats instanceof Array) {
|
||||||
if (mats instanceof Array) {
|
for (var i = 0; i < mats.length; i++){
|
||||||
for (var i = 0; i < mats.length; i++){
|
cm.gainItem(mats[i], -matQty[i] * qty);
|
||||||
cm.gainItem(mats[i], -matQty[i] * qty);
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
cm.gainItem(mats, -matQty * qty);
|
||||||
|
|
||||||
|
if (cost > 0)
|
||||||
|
cm.gainMeso(-cost * qty);
|
||||||
|
|
||||||
|
cm.gainItem(recvItem, recvQty);
|
||||||
|
cm.sendOk("All done. If you need anything else, just ask.");
|
||||||
}
|
}
|
||||||
else
|
|
||||||
cm.gainItem(mats, -matQty * qty);
|
|
||||||
|
|
||||||
if (cost > 0)
|
|
||||||
cm.gainMeso(-cost * qty);
|
|
||||||
|
|
||||||
if (item >= 2060000 && item <= 2060002) //bow arrows
|
|
||||||
cm.gainItem(item, 1000 - (item - 2060000) * 100);
|
|
||||||
else if (item >= 2061000 && item <= 2061002) //xbow arrows
|
|
||||||
cm.gainItem(item, 1000 - (item - 2061000) * 100);
|
|
||||||
else if (item == 4003000)//screws
|
|
||||||
cm.gainItem(4003000, 15 * qty);
|
|
||||||
else
|
|
||||||
cm.gainItem(item, qty);
|
|
||||||
cm.sendOk("All done. If you need anything else, just ask.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -158,7 +158,7 @@ function action(mode, type, selection) {
|
|||||||
else if (status == 3 && mode == 1) {
|
else if (status == 3 && mode == 1) {
|
||||||
var complete = true;
|
var complete = true;
|
||||||
|
|
||||||
if(!cm.canHold(item)) {
|
if(!cm.canHold(item, 1)) {
|
||||||
cm.sendOk("Check your inventory for a free slot first.");
|
cm.sendOk("Check your inventory for a free slot first.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
@@ -176,21 +176,6 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
else if (!cm.haveItem(mats, matQty))
|
else if (!cm.haveItem(mats, matQty))
|
||||||
complete = false;
|
complete = false;
|
||||||
|
|
||||||
/*if (mats instanceof Array) {
|
|
||||||
for(var i = 0; complete && i < mats.length; i++){
|
|
||||||
if (matQty[i] == 1){
|
|
||||||
if (!cm.haveItem(mats[i]))
|
|
||||||
complete = false;
|
|
||||||
}
|
|
||||||
else if (!cm.haveItem(mats[i],matQty[i]))
|
|
||||||
complete=false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (!cm.haveItem(mats,matQty))
|
|
||||||
complete=false;
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
if (!complete)
|
if (!complete)
|
||||||
cm.sendOk("I only make quality goods, which I cannot do without the proper materials.");
|
cm.sendOk("I only make quality goods, which I cannot do without the proper materials.");
|
||||||
|
|||||||
@@ -47,12 +47,18 @@ function action(mode, type, selection) {
|
|||||||
cm.sendGetNumber("Okay, so how many do you want me to make?", 1, 1, 100);
|
cm.sendGetNumber("Okay, so how many do you want me to make?", 1, 1, 100);
|
||||||
else if (status == 2) {
|
else if (status == 2) {
|
||||||
var complete = true;
|
var complete = true;
|
||||||
|
|
||||||
if (cm.getMeso() < 500000 * selection){
|
if (cm.getMeso() < 500000 * selection){
|
||||||
cm.sendOk("I'm sorry, but I am NOT doing this for free.");
|
cm.sendOk("I'm sorry, but I am NOT doing this for free.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
} else if (!cm.haveItem(4004004, 10 * selection))
|
} else if (!cm.haveItem(4004004, 10 * selection)) {
|
||||||
complete = false;
|
complete = false;
|
||||||
|
} else if(!cm.canHold(4005004, selection)) {
|
||||||
|
cm.sendOk("Are you having trouble with no empty slots on your inventory? Sort that out first!");
|
||||||
|
cm.dispose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!complete)
|
if (!complete)
|
||||||
cm.sendOk("I need that ore to refine the Crystal. No exceptions..");
|
cm.sendOk("I need that ore to refine the Crystal. No exceptions..");
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -222,10 +222,23 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
else if (status == 4 && mode == 1) {
|
else if (status == 4 && mode == 1) {
|
||||||
var complete = true;
|
var complete = true;
|
||||||
|
var recvItem = item, recvQty;
|
||||||
if (cm.getMeso() < cost * qty)
|
|
||||||
|
if (item >= 2060000 && item <= 2060002) //bow arrows
|
||||||
|
recvQty = 1000 - (item - 2060000) * 100;
|
||||||
|
else if (item >= 2061000 && item <= 2061002) //xbow arrows
|
||||||
|
recvQty = 1000 - (item - 2061000) * 100;
|
||||||
|
else if (item == 4003000)//screws
|
||||||
|
recvQty = 15 * qty;
|
||||||
|
else
|
||||||
|
recvQty = qty;
|
||||||
|
|
||||||
|
if(!cm.canHold(recvItem, recvQty)) {
|
||||||
|
cm.sendOk("I'm afraid you have no slots available for this transaction.");
|
||||||
|
}
|
||||||
|
else if (cm.getMeso() < cost * qty)
|
||||||
{
|
{
|
||||||
cm.sendOk("I'm afraid you cannot afford my services.")
|
cm.sendOk("I'm afraid you cannot afford my services.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -262,14 +275,7 @@ function action(mode, type, selection) {
|
|||||||
if (cost > 0)
|
if (cost > 0)
|
||||||
cm.gainMeso(-cost * qty);
|
cm.gainMeso(-cost * qty);
|
||||||
|
|
||||||
if (item >= 2060000 && item <= 2060002) //bow arrows
|
cm.gainItem(recvItem, recvQty);
|
||||||
cm.gainItem(item, 1000 - (item - 2060000) * 100);
|
|
||||||
else if (item >= 2061000 && item <= 2061002) //xbow arrows
|
|
||||||
cm.gainItem(item, 1000 - (item - 2061000) * 100);
|
|
||||||
else if (item == 4003000)//screws
|
|
||||||
cm.gainItem(4003000, 15 * qty);
|
|
||||||
else
|
|
||||||
cm.gainItem(item, qty);
|
|
||||||
cm.sendOk("All done. If you need anything else, you know where to find me.");
|
cm.sendOk("All done. If you need anything else, you know where to find me.");
|
||||||
}
|
}
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ function action(mode, type, selection) {
|
|||||||
} else if (status == 3) {
|
} else if (status == 3) {
|
||||||
var complete = true;
|
var complete = true;
|
||||||
|
|
||||||
if(!cm.canHold(item)) {
|
if(!cm.canHold(item, 1)) {
|
||||||
cm.sendOk("Check your inventory for a free slot first.");
|
cm.sendOk("Check your inventory for a free slot first.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
@@ -238,23 +238,6 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
else if (!cm.haveItem(mats, matQty))
|
else if (!cm.haveItem(mats, matQty))
|
||||||
complete = false;
|
complete = false;
|
||||||
|
|
||||||
/*
|
|
||||||
if (mats instanceof Array) {
|
|
||||||
for(var i = 0; complete && i < mats.length; i++) {
|
|
||||||
if (matQty[i] == 1) {
|
|
||||||
if (!cm.haveItem(mats[i])) {
|
|
||||||
complete = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!cm.haveItem(mats[i],matQty[i] * selection))
|
|
||||||
complete=false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!cm.haveItem(mats,matQty * selection))
|
|
||||||
complete=false;
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
if (stimulator){ //check for stimulator
|
if (stimulator){ //check for stimulator
|
||||||
if (!cm.haveItem(stimID)) {
|
if (!cm.haveItem(stimID)) {
|
||||||
|
|||||||
@@ -159,12 +159,12 @@ function action(mode, type, selection) {
|
|||||||
} else if (status == 3) {
|
} else if (status == 3) {
|
||||||
var complete = true;
|
var complete = true;
|
||||||
|
|
||||||
if(!cm.canHold(item)) {
|
if(!cm.canHold(item, 1)) {
|
||||||
cm.sendOk("Check your inventory for a free slot first.");
|
cm.sendOk("Check your inventory for a free slot first.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (cm.getMeso() < (cost)){
|
else if (cm.getMeso() < cost){
|
||||||
cm.sendOk("Sorry, we only accept meso.");
|
cm.sendOk("Sorry, we only accept meso.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
@@ -177,22 +177,6 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
else if (!cm.haveItem(mats, matQty))
|
else if (!cm.haveItem(mats, matQty))
|
||||||
complete = false;
|
complete = false;
|
||||||
|
|
||||||
/*
|
|
||||||
if (mats instanceof Array) {
|
|
||||||
for (var i = 0; complete && i < mats.length; i++) {
|
|
||||||
if (matQty[i] == 1){
|
|
||||||
if (!cm.haveItem(mats[i]))
|
|
||||||
complete = false;
|
|
||||||
} else {
|
|
||||||
if (!cm.haveItem(mats[i],matQty[i]))
|
|
||||||
complete=false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!cm.haveItem(mats,matQty))
|
|
||||||
complete=false;
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
if (stimulator){ //check for stimulator
|
if (stimulator){ //check for stimulator
|
||||||
if (!cm.haveItem(stimID)) {
|
if (!cm.haveItem(stimID)) {
|
||||||
@@ -213,7 +197,7 @@ function action(mode, type, selection) {
|
|||||||
cm.gainItem(stimID, -1);
|
cm.gainItem(stimID, -1);
|
||||||
var deleted = Math.floor(Math.random() * 10);
|
var deleted = Math.floor(Math.random() * 10);
|
||||||
if (deleted != 0) {
|
if (deleted != 0) {
|
||||||
addRandomItem(item);
|
cm.gainItem(item, 1, true, true);
|
||||||
cm.sendOk("There, the shoes are ready. Be careful, they're still hot.");
|
cm.sendOk("There, the shoes are ready. Be careful, they're still hot.");
|
||||||
} else {
|
} else {
|
||||||
cm.sendOk("Eek! I think I accidently added too much stimulator and, well, the whole thing is unusable now... Sorry, but I can't offer a refund.");
|
cm.sendOk("Eek! I think I accidently added too much stimulator and, well, the whole thing is unusable now... Sorry, but I can't offer a refund.");
|
||||||
|
|||||||
@@ -197,10 +197,13 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
else if (status == 3 && mode == 1) {
|
else if (status == 3 && mode == 1) {
|
||||||
var complete = true;
|
var complete = true;
|
||||||
|
|
||||||
if (cm.getMeso() < cost)
|
if(!cm.canHold(item, 1)) {
|
||||||
|
cm.sendOk("Verify for a slot in your inventory first.");
|
||||||
|
}
|
||||||
|
else if (cm.getMeso() < cost)
|
||||||
{
|
{
|
||||||
cm.sendOk("I'm afraid my fees are non-negotiable.")
|
cm.sendOk("I'm afraid my fees are non-negotiable.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -247,7 +250,7 @@ function action(mode, type, selection) {
|
|||||||
var deleted = Math.floor(Math.random() * 10);
|
var deleted = Math.floor(Math.random() * 10);
|
||||||
if (deleted != 0)
|
if (deleted != 0)
|
||||||
{
|
{
|
||||||
addRandomItem(item);
|
cm.gainItem(item, 1, true, true);
|
||||||
cm.sendOk("Heeere you go! What do you think? Marvellous, isn't it?");
|
cm.sendOk("Heeere you go! What do you think? Marvellous, isn't it?");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ function action(mode, type, selection) {
|
|||||||
} else if (status == 3) {
|
} else if (status == 3) {
|
||||||
var complete = true;
|
var complete = true;
|
||||||
|
|
||||||
if(!cm.canHold(item)) {
|
if(!cm.canHold(item, 1)) {
|
||||||
cm.sendOk("Check your inventory for a free slot first.");
|
cm.sendOk("Check your inventory for a free slot first.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
return;
|
return;
|
||||||
@@ -199,23 +199,6 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
else if (!cm.haveItem(mats, matQty))
|
else if (!cm.haveItem(mats, matQty))
|
||||||
complete = false;
|
complete = false;
|
||||||
|
|
||||||
/* if (mats instanceof Array) {
|
|
||||||
for(var i = 0; complete && i < mats.length; i++) {
|
|
||||||
if (matQty[i] == 1) {
|
|
||||||
if (!cm.haveItem(mats[i])) {
|
|
||||||
complete = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!cm.haveItem(mats[i], matQty[i]))
|
|
||||||
complete=false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!cm.haveItem(mats,matQty))
|
|
||||||
complete=false;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
if (stimulator){ //check for stimulator
|
if (stimulator){ //check for stimulator
|
||||||
if (!cm.haveItem(stimID)) {
|
if (!cm.haveItem(stimID)) {
|
||||||
|
|||||||
@@ -210,41 +210,17 @@ function action(mode, type, selection) {
|
|||||||
for(var i = 0; i < mats.length; i++) {
|
for(var i = 0; i < mats.length; i++) {
|
||||||
if(!cm.haveItem(mats[i], matQty[i]))
|
if(!cm.haveItem(mats[i], matQty[i]))
|
||||||
complete = false;
|
complete = false;
|
||||||
|
|
||||||
/* if (matQty[i] == 1) {
|
|
||||||
if (!cm.haveItem(mats[i])) {
|
|
||||||
complete = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
var count = 0;
|
|
||||||
var iter = cm.getInventory(4).listById(mats[i]).iterator();
|
|
||||||
while (iter.hasNext()) {
|
|
||||||
count += iter.next().getQuantity();
|
|
||||||
}
|
|
||||||
if (count < matQty[i])
|
|
||||||
complete = false;
|
|
||||||
} */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(!cm.haveItem(mats, matQty))
|
if(!cm.haveItem(mats, matQty))
|
||||||
complete = false;
|
complete = false;
|
||||||
|
|
||||||
/* var count = 0;
|
|
||||||
var iter = cm.getInventory(4).listById(mats).iterator();
|
|
||||||
while (iter.hasNext()) {
|
|
||||||
count += iter.next().getQuantity();
|
|
||||||
}
|
|
||||||
if (count < matQty)
|
|
||||||
complete = false;
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(java.lang.Math.random() >= 0.9) //A lucky find! Scroll 60%
|
if(java.lang.Math.random() >= 0.9) //A lucky find! Scroll 60%
|
||||||
item += 1;
|
item += 1;
|
||||||
|
|
||||||
if (!complete || !cm.canHold(item))
|
if (!complete || !cm.canHold(item, 1))
|
||||||
cm.sendOk("Please make sure you are neither lacking ingredients or lacking space in your use inventory.");
|
cm.sendOk("Please make sure you are neither lacking ingredients or lacking space in your use inventory.");
|
||||||
else {
|
else {
|
||||||
if (mats instanceof Array) {
|
if (mats instanceof Array) {
|
||||||
@@ -255,7 +231,7 @@ function action(mode, type, selection) {
|
|||||||
else
|
else
|
||||||
cm.gainItem(mats, -matQty);
|
cm.gainItem(mats, -matQty);
|
||||||
|
|
||||||
cm.gainItem(item);
|
cm.gainItem(item, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
@@ -265,16 +241,7 @@ function action(mode, type, selection) {
|
|||||||
|
|
||||||
if(!cm.haveItem(item, 100))
|
if(!cm.haveItem(item, 100))
|
||||||
complete = false;
|
complete = false;
|
||||||
|
|
||||||
/* var count = 0;
|
|
||||||
var iter = cm.getInventory(4).listById(item).iterator();
|
|
||||||
while (iter.hasNext()) {
|
|
||||||
count += iter.next().getQuantity();
|
|
||||||
}
|
|
||||||
if (count < 100)
|
|
||||||
complete = false;
|
|
||||||
*/
|
|
||||||
|
|
||||||
if(!complete) {
|
if(!complete) {
|
||||||
cm.sendOk("Please make sure you are neither lacking ingredients or lacking space in your etc inventory.");
|
cm.sendOk("Please make sure you are neither lacking ingredients or lacking space in your etc inventory.");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
|
|||||||
@@ -146,10 +146,23 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
else if (status == 5 && mode == 1) {
|
else if (status == 5 && mode == 1) {
|
||||||
var complete = true;
|
var complete = true;
|
||||||
|
var recvItem = item, recvQty;
|
||||||
|
|
||||||
|
if (item >= 2060000 && item <= 2060002) //bow arrows
|
||||||
|
recvQty = 1000 - (item - 2060000) * 100;
|
||||||
|
else if (item >= 2061000 && item <= 2061002) //xbow arrows
|
||||||
|
recvQty = 1000 - (item - 2061000) * 100;
|
||||||
|
else if (item == 4003000)//screws
|
||||||
|
recvQty = 15 * qty;
|
||||||
|
else
|
||||||
|
recvQty = qty;
|
||||||
|
|
||||||
if (cm.getMeso() < cost * qty)
|
if(!cm.canHold(recvItem, recvQty)) {
|
||||||
|
cm.sendOk("I'm afraid you are short in inventory slots for this.");
|
||||||
|
}
|
||||||
|
else if (cm.getMeso() < cost * qty)
|
||||||
{
|
{
|
||||||
cm.sendOk("I'm afraid you cannot afford my services.")
|
cm.sendOk("I'm afraid you cannot afford my services.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -188,14 +201,7 @@ function action(mode, type, selection) {
|
|||||||
if (cost > 0)
|
if (cost > 0)
|
||||||
cm.gainMeso(-cost * qty);
|
cm.gainMeso(-cost * qty);
|
||||||
|
|
||||||
if (item >= 2060000 && item <= 2060002) //bow arrows
|
cm.gainItem(recvItem, recvQty);
|
||||||
cm.gainItem(item, 1000 - (item - 2060000) * 100);
|
|
||||||
else if (item >= 2061000 && item <= 2061002) //xbow arrows
|
|
||||||
cm.gainItem(item, 1000 - (item - 2061000) * 100);
|
|
||||||
else if (item == 4003000)//screws
|
|
||||||
cm.gainItem(4003000, 15 * qty);
|
|
||||||
else
|
|
||||||
cm.gainItem(item, qty);
|
|
||||||
cm.sendOk("There, finished. What do you think, a piece of art, isn't it? Well, if you need anything else, you know where to find me.");
|
cm.sendOk("There, finished. What do you think, a piece of art, isn't it? Well, if you need anything else, you know where to find me.");
|
||||||
}
|
}
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ function action(mode, type, selection) {
|
|||||||
if (mode == 1) {
|
if (mode == 1) {
|
||||||
if (cm.getMeso() < 1500) {
|
if (cm.getMeso() < 1500) {
|
||||||
cm.sendNext("I am sorry, but I think you are short on mesos. I am afraid I can't let you ride this if you do not have enough money to do so. Please come back when you have enough money to use this.");
|
cm.sendNext("I am sorry, but I think you are short on mesos. I am afraid I can't let you ride this if you do not have enough money to do so. Please come back when you have enough money to use this.");
|
||||||
|
cm.dispose();
|
||||||
} else {
|
} else {
|
||||||
cm.warp(cm.getPlayer().getMapId() == 260020000 ? 261000000 : 260000000, 0);
|
cm.warp(cm.getPlayer().getMapId() == 260020000 ? 261000000 : 260000000, 0);
|
||||||
cm.gainMeso(-1500);
|
cm.gainMeso(-1500);
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ function action(mode, type, selection) {
|
|||||||
if (cm.getMeso() < cost * qty) {
|
if (cm.getMeso() < cost * qty) {
|
||||||
cm.sendOk("Come on! We're not here doing you a favor! We all need money to live properly, so bring the cash so we make deal and start the synthesis.");
|
cm.sendOk("Come on! We're not here doing you a favor! We all need money to live properly, so bring the cash so we make deal and start the synthesis.");
|
||||||
}
|
}
|
||||||
else if(!cm.canHold(item)) {
|
else if(!cm.canHold(item, qty)) {
|
||||||
cm.sendOk("You didn't check if you got a slot to spare on your inventory before our business, no?");
|
cm.sendOk("You didn't check if you got a slot to spare on your inventory before our business, no?");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -177,11 +177,11 @@ function action(mode, type, selection) {
|
|||||||
if (!complete)
|
if (!complete)
|
||||||
cm.sendOk("Are you sure you got all the items required? Double check it!");
|
cm.sendOk("Are you sure you got all the items required? Double check it!");
|
||||||
else {
|
else {
|
||||||
if (cm.canHold(item)) {
|
if (cm.canHold(item, qty)) {
|
||||||
if (mats instanceof Array) {
|
if (mats instanceof Array) {
|
||||||
for (var i = 0; i < mats.length; i++)
|
for (var i = 0; i < mats.length; i++)
|
||||||
cm.gainItem(mats[i], -(matQty[i] * qty));
|
cm.gainItem(mats[i], -(matQty[i] * qty));
|
||||||
}else
|
} else
|
||||||
cm.gainItem(mats, -(matQty * qty));
|
cm.gainItem(mats, -(matQty * qty));
|
||||||
cm.gainMeso(-(cost * qty));
|
cm.gainMeso(-(cost * qty));
|
||||||
|
|
||||||
|
|||||||
@@ -26,13 +26,14 @@
|
|||||||
Information
|
Information
|
||||||
-- Version Info -----------------------------------------------------------------------------------
|
-- Version Info -----------------------------------------------------------------------------------
|
||||||
1.0 - First Version by Information
|
1.0 - First Version by Information
|
||||||
|
2.0 - Second Version by Jayd
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
**/
|
**/
|
||||||
|
|
||||||
var status = 0;
|
var status = 0;
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
cm.sendYesNo("The plane will be taking off soon, Will you leave now? You will have buy the plane ticket again to come in here.");
|
cm.sendYesNo("The plane will be taking off soon, will you leave now? You will have to buy the plane ticket again to come in here.");
|
||||||
}
|
}
|
||||||
|
|
||||||
function action(mode, type, selection) {
|
function action(mode, type, selection) {
|
||||||
@@ -44,9 +45,9 @@ function action(mode, type, selection) {
|
|||||||
}
|
}
|
||||||
status++;
|
status++;
|
||||||
if (status == 1) {
|
if (status == 1) {
|
||||||
cm.sendNext("I have already told you the ticket is not refunable~ hope to see you again~");
|
cm.sendNext("The ticket is not refundable, hope to see you again!");
|
||||||
} else if(status == 2){
|
} else if(status == 2){
|
||||||
cm.warp(103000000);
|
cm.warp(103000000);
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -26,8 +26,12 @@
|
|||||||
Information
|
Information
|
||||||
-- Version Info -----------------------------------------------------------------------------------
|
-- Version Info -----------------------------------------------------------------------------------
|
||||||
1.0 - First Version by Information
|
1.0 - First Version by Information
|
||||||
|
2.0 - Second Version by Jayd
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
**/
|
**/
|
||||||
|
var k2s;
|
||||||
|
var airport;
|
||||||
|
var s2k;
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
status = -1;
|
status = -1;
|
||||||
@@ -43,16 +47,40 @@ function action(mode, type, selection) {
|
|||||||
status++;
|
status++;
|
||||||
}
|
}
|
||||||
if(mode == 0) {
|
if(mode == 0) {
|
||||||
cm.sendOk("Please hold on for a sec, and plane will be taking off. Thanks for your patience.");
|
if (cm.getMapId() == 540010101) {
|
||||||
cm.dispose();
|
cm.sendOk("Please hold on for a sec, and we're reaching Singapore! Thanks for your patience.");
|
||||||
return;
|
cm.dispose();
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
cm.sendOk("Please hold on for a sec, and we're reaching Kerning City! Thanks for your patience.");
|
||||||
|
cm.dispose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(status == 0) {
|
if(status == 0) {
|
||||||
cm.sendYesNo("The plane will be taking off soon, Will you leave now? You will have buy the plane ticket again to come in here.");
|
if (cm.getMapId() == 540010001) {
|
||||||
|
cm.sendYesNo("The plane is taking off soon, are you sure you want to leave now? The ticket is not refundable.");
|
||||||
|
airport = 1;
|
||||||
|
} else if (cm.getMapId() == 540010002) {
|
||||||
|
cm.sendYesNo("We're reaching Kerning City in a minute, are you sure you want to leave now? The ticket is not refundable.");
|
||||||
|
s2k = 1;
|
||||||
|
} else if (cm.getMapId() == 540010101) {
|
||||||
|
cm.sendYesNo("We're reaching Singapore in a minute, are you sure you want to leave now? The ticket is not refundable.");
|
||||||
|
k2s = 1;
|
||||||
|
}
|
||||||
} else if(status == 1) {
|
} else if(status == 1) {
|
||||||
cm.sendNext("I have already told you the ticket is not refunable~ hope to see you again~");
|
if (k2s == 1) {
|
||||||
} else if(status == 2) {
|
cm.warp(103000000);
|
||||||
cm.warp(540010000);
|
cm.sendOk("Hope to see you again soon!");
|
||||||
cm.dispose();
|
cm.dispose();
|
||||||
|
} else if (airport == 1) {
|
||||||
|
cm.warp(540010000);
|
||||||
|
cm.sendOk("Hope to see you again soon!");
|
||||||
|
cm.dispose();
|
||||||
|
} else if (s2k == 1) {
|
||||||
|
cm.warp(540010000);
|
||||||
|
cm.sendOk("Hope to see you again soon!");
|
||||||
|
cm.dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,40 @@
|
|||||||
|
/*
|
||||||
|
This file is part of the OdinMS Maple Story Server
|
||||||
|
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||||
|
Matthias Butz <matze@odinms.de>
|
||||||
|
Jan Christian Meyer <vimes@odinms.de>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License version 3
|
||||||
|
as published by the Free Software Foundation. You may not use, modify
|
||||||
|
or distribute this program under any other version of the
|
||||||
|
GNU Affero General Public License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
-- Odin JavaScript --------------------------------------------------------------------------------
|
||||||
|
Shalon - Ticketing Usher
|
||||||
|
-- By ---------------------------------------------------------------------------------------------
|
||||||
|
Whoever written this script
|
||||||
|
-- Version Info -----------------------------------------------------------------------------------
|
||||||
|
1.0 - First Version by whoever written this script
|
||||||
|
2.0 - Second Version by Jayd
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
**/
|
||||||
|
|
||||||
status = -1;
|
status = -1;
|
||||||
oldSelection = -1;
|
oldSelection = -1;
|
||||||
|
|
||||||
function start() {
|
function start() {
|
||||||
cm.sendSimple("Hello, I am Shalon from Singapore Airport. I can assist you in getting you to Singapore in no time. Do you want to go to Singapore?\r\n#b#L0#I would like to buy a plane ticket to Kerning City\r\n#b#L1#Let me go in to the departure point.");
|
cm.sendSimple("Hello, I am Shalon from Singapore Airport. I can assist you in getting you to Kerning City in no time. Do you want to go to Kerning City?\r\n#b#L0#I would like to buy a plane ticket to Kerning City\r\n#b#L1#Let me go in to the departure point.");
|
||||||
}
|
}
|
||||||
|
|
||||||
function action(mode, type, selection) {
|
function action(mode, type, selection) {
|
||||||
@@ -21,8 +53,15 @@ function action(mode, type, selection) {
|
|||||||
oldSelection = selection;
|
oldSelection = selection;
|
||||||
}else if(status == 1){
|
}else if(status == 1){
|
||||||
if(oldSelection == 0){
|
if(oldSelection == 0){
|
||||||
cm.gainMeso(-5000);
|
if (cm.getPlayer().getMeso() > 4999 && cm.getPlayer().haveItem(4031732) == false) {
|
||||||
cm.gainItem(4031732);
|
cm.gainMeso(-5000);
|
||||||
|
cm.gainItem(4031732);
|
||||||
|
cm.sendOk("Thank you for choosing Wizet Airline! Enjoy your flight!");
|
||||||
|
cm.dispose();
|
||||||
|
} else {
|
||||||
|
cm.sendOk("You do not have enough mesos or you've already purchased a ticket.");
|
||||||
|
cm.dispose();
|
||||||
|
}
|
||||||
}else if(oldSelection == 1){
|
}else if(oldSelection == 1){
|
||||||
if(cm.itemQuantity(4031732) > 0){
|
if(cm.itemQuantity(4031732) > 0){
|
||||||
var em = cm.getEventManager("AirPlane");
|
var em = cm.getEventManager("AirPlane");
|
||||||
|
|||||||
@@ -1,3 +1,35 @@
|
|||||||
|
/*
|
||||||
|
This file is part of the OdinMS Maple Story Server
|
||||||
|
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||||
|
Matthias Butz <matze@odinms.de>
|
||||||
|
Jan Christian Meyer <vimes@odinms.de>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License version 3
|
||||||
|
as published by the Free Software Foundation. You may not use, modify
|
||||||
|
or distribute this program under any other version of the
|
||||||
|
GNU Affero General Public License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
-- Odin JavaScript --------------------------------------------------------------------------------
|
||||||
|
Irene - Ticketing Usher
|
||||||
|
-- By ---------------------------------------------------------------------------------------------
|
||||||
|
Whoever written this script
|
||||||
|
-- Version Info -----------------------------------------------------------------------------------
|
||||||
|
1.0 - First Version by whoever written this script
|
||||||
|
2.0 - Second Version by Jayd
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
**/
|
||||||
|
|
||||||
status = -1;
|
status = -1;
|
||||||
oldSelection = -1;
|
oldSelection = -1;
|
||||||
|
|
||||||
@@ -21,8 +53,15 @@ function action(mode, type, selection) {
|
|||||||
oldSelection = selection;
|
oldSelection = selection;
|
||||||
}else if(status == 1){
|
}else if(status == 1){
|
||||||
if(oldSelection == 0){
|
if(oldSelection == 0){
|
||||||
cm.gainMeso(-5000);
|
if (cm.getPlayer().getMeso() > 4999 && cm.getPlayer().haveItem(4031731) == false) {
|
||||||
cm.gainItem(4031731);
|
cm.gainMeso(-5000);
|
||||||
|
cm.gainItem(4031731);
|
||||||
|
cm.sendOk("Thank you for choosing Wizet Airline! Enjoy your flight!");
|
||||||
|
cm.dispose();
|
||||||
|
} else {
|
||||||
|
cm.sendOk("You do not have enough mesos or you've already purchased a ticket.");
|
||||||
|
cm.dispose();
|
||||||
|
}
|
||||||
}else if(oldSelection == 1){
|
}else if(oldSelection == 1){
|
||||||
if(cm.itemQuantity(4031731) > 0){
|
if(cm.itemQuantity(4031731) > 0){
|
||||||
var em = cm.getEventManager("AirPlane");
|
var em = cm.getEventManager("AirPlane");
|
||||||
|
|||||||
@@ -1,41 +1,41 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of the OdinMS Maple Story Server
|
This file is part of the OdinMS Maple Story Server
|
||||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||||
Matthias Butz <matze@odinms.de>
|
Matthias Butz <matze@odinms.de>
|
||||||
Jan Christian Meyer <vimes@odinms.de>
|
Jan Christian Meyer <vimes@odinms.de>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU Affero General Public License version 3
|
it under the terms of the GNU Affero General Public License version 3
|
||||||
as published by the Free Software Foundation. You may not use, modify
|
as published by the Free Software Foundation. You may not use, modify
|
||||||
or distribute this program under any other version of the
|
or distribute this program under any other version of the
|
||||||
GNU Affero General Public License.
|
GNU Affero General Public License.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU Affero General Public License for more details.
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
-- Odin JavaScript --------------------------------------------------------------------------------
|
-- Odin JavaScript --------------------------------------------------------------------------------
|
||||||
Portal - To get into Ariant Castle
|
Portal - To get into Ariant Castle
|
||||||
-- By ---------------------------------------------------------------------------------------------
|
-- By ---------------------------------------------------------------------------------------------
|
||||||
Jayd
|
Jayd
|
||||||
-- Version Info -----------------------------------------------------------------------------------
|
-- Version Info -----------------------------------------------------------------------------------
|
||||||
1.0 - First Version by Jayd
|
1.0 - First Version by Jayd
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
**/
|
**/
|
||||||
|
|
||||||
function enter(pi) {
|
function enter(pi) {
|
||||||
if (pi.getPlayer().haveItem(4031582) == true) {
|
if (pi.getPlayer().haveItem(4031582) == true) {
|
||||||
pi.playPortalSound();
|
pi.playPortalSound();
|
||||||
pi.warp(260000301);
|
pi.warp(260000301);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
pi.playerMessage(5, "You can enter only if you have a Entry Pass to the Palace.");
|
pi.playerMessage(5, "You can enter only if you have a Entry Pass to the Palace.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user