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:
@@ -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;
|
||||
oldSelection = -1;
|
||||
|
||||
@@ -21,8 +53,15 @@ function action(mode, type, selection) {
|
||||
oldSelection = selection;
|
||||
}else if(status == 1){
|
||||
if(oldSelection == 0){
|
||||
cm.gainMeso(-5000);
|
||||
cm.gainItem(4031731);
|
||||
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 {
|
||||
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");
|
||||
|
||||
Reference in New Issue
Block a user