Files
sweetgum-server/scripts/npc/world0/1094002.js
ronancpl 972517e7b2 source
Source for my MapleSolaxiaV2 (v83 MapleStory).
2015-11-02 23:17:21 -02:00

51 lines
1.8 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
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/>.
*/
/*
Author: XxOsirisxX BubblesDev 0.75)
NPC: Bush - Abel Glasses Quest
*/
var rolled = 0;
function start(mode, type, selection){
//cm.sendGetText("Do you want to obtain a glasses?");
if(!cm.isQuestStarted(2186)) {
cm.sendOk("Just a pile of boxes, nothing special...");
cm.dispose();
return;
}
cm.sendNext("Do you want to obtain a glasses?");
}
function action(mode, type, selection) {
if(!(cm.haveItem(4031853) || cm.haveItem(4031854) || cm.haveItem(4031855))) {
rolled = Math.floor(Math.random() * 3);
if(rolled == 0) cm.gainItem(4031853, 1);
else if(rolled == 1) cm.gainItem(4031854, 1);
else cm.gainItem(4031855, 1);
}
else cm.sendOk("You #balready have#k the glasses that was here!");
//cm.saveSquadMembers(cm.getText());
cm.dispose();
}