public void end(MapleClient c, short questid, int npc) { MapleQuest quest = MapleQuest.getInstance(questid); if (!c.getPlayer().getQuest(quest).getStatus().equals(MapleQuestStatus.Status.STARTED) || !c.getPlayer().getMap().containsNPC(npc)) { dispose(c); return; } try { QuestActionManager qm = new QuestActionManager(c, questid, npc, false); if (qms.containsKey(c)) { return; } if (c.canClickNPC()) { qms.put(c, qm); Invocable iv = getInvocable("quest/" + questid + ".js", c); if (iv == null) { qm.dispose(); return; } engine.put("qm", qm); scripts.put(c, iv); c.setClickedNPC(); iv.invokeFunction("end", (byte) 1, (byte) 0, 0); } } catch (final UndeclaredThrowableException ute) { FilePrinter.printError(FilePrinter.QUEST + questid + ".txt", ute); dispose(c); } catch (final Throwable t) { FilePrinter.printError(FilePrinter.QUEST + getQM(c).getQuest() + ".txt", t); dispose(c); } }
@Override public int execute(MapleClient c, String[] splitted) { StringBuilder sb = new StringBuilder(); sb.append("\r\n@str, @dex, @int, @luk, @hp, @mp <amount to add or subtract>"); sb.append("\r\n@mob < Information on the closest monster >"); sb.append( "\r\n@check < Displays various information; also use if you are stuck or unable to talk to NPC >"); // sb.append("\r\n@npc < Universal NPC >"); sb.append("\r\n@callgm < Send a message to all online GameMasters."); sb.append("\r\n@home < Warp to Acernis base >"); sb.append("\r\n@fm < Warp to the FreeMarket instantly. >"); sb.append("\r\n@job < Job advancements! >"); sb.append("\r\n@save < Fixes your experience and saves your character >"); /*sb.append("\r\n@joinevent < Join ongoing event >"); sb.append("\r\n@crescent < Universal Town Warp / Event NPC>"); sb.append("\r\n@dcash < Universal Cash Item Dropper >"); sb.append("\r\n@tsmega < Toggle super megaphone on/off >"); sb.append("\r\n@ea < If you are unable to attack or talk to NPC >"); sb.append("\r\n@clearslot < Cleanup that trash in your inventory >"); sb.append("\r\n@ranking < Use @ranking for more details >"); sb.append("\r\n@checkdrop < Use @checkdrop for more details >"); sb.append("\r\n@style < Styler >"); sb.append("\r\n@advance < Job Advancer >"); sb.append("\r\n@bosswarp < Boss Warper >"); sb.append("\r\n@fly < Makes you fly if you're in the Free Market >");*/ if (c.canClickNPC()) { NPCPacket.getNPCTalk(9010000, (byte) 0, sb.toString(), "00 00", (byte) 0); } for (String command : sb.toString().split("\r\n")) { c.getPlayer().dropMessage(5, command); } return 1; }
@Override public int execute(MapleClient c, String[] splitted) { StringBuilder sb = new StringBuilder(); // sb.append("\r\n@丢掉现金物品 < 可以将身上的现金物品丢到地上 >"); // sb.append("\r\n@参加活动 < 如果活动正在进行你可以使用这个命令参加活动 >"); // sb.append("\r\n@召唤炸弹 < 炸弹活动中使用的命令,可以召唤出炸弹 >"); sb.append("\r\n@呼叫管理员 < 发送消息给所有在线的管理员 >"); sb.append("\r\n@怪物 < 距离最近的怪物的信息 >"); sb.append("\r\n@解卡 < 显如果你卡死或者无法打开NPC可以使用这个命令 >"); // sb.append("\r\n@活动 < 打开活动NPC >"); sb.append("\r\n@卡图 < 只有卡图无法出来时才能使用 >"); sb.append("\r\n@获取猫头鹰 < 获得一个可以搜索怪物爆物的猫头鹰 >"); // sb.append("\r\n@获取经验卡 (倍数,默认2) < 获得一个经验值卡,每周有次数限制 >"); if (c.canClickNPC()) { NPCPacket.sendNPCSay(9010000, sb.toString()); } for (String command : sb.toString().split("\r\n")) { c.getPlayer().dropMessage(5, command); } return 1; }