Server source now uses Java ThreadPool, recycling used thread resources for next uses. Added Grenade visual effect for other players. Implemented an attempt towards unsynced mob behavior, where reportedly players were able to pin same mob in different sections of the map. Solved several deadlock issues, mostly regarding character synchronized methods, event instance scripts and player/item vision-unvision. Solved an issue where mobs would not cast some skills of it's skillset. Frequent behavior on low-leveled mobs. Fixed a bug on 2nd Maker quest where players could complete it by merely disassembling an equipment. New custom mechanic: equipment merge. Similarly to the Bazaar NPC, every equipment after the selected one is used up, and a fraction of their stat amounts are used as stat gains on the currently equipped items. If restrictions are enabled, players must be high-leveled and Maker lv3 to use it. Skill Storm Break no longer uses up arrows. Added a server flag to allow access for all Aran job skills from the beginning. Implemented Battleship and Super Transformation questline scripts. Fixed a desynchronization within pet position and cash inventory position, that could potentially lead to some inventory issues until relogin. Improved timestamp handling in some handler classes. Spam detection is entirely a server-side matter, hence removed usage of client-sided timestamp content. Refactored some pet response packets, improving some of their behaviors. Fixed some quest issues: Maker lv1 and Omega Sector meteorite one.
68 lines
2.7 KiB
JavaScript
68 lines
2.7 KiB
JavaScript
var status = 0;
|
|
var maps = [104000000, 102000000, 100000000, 103000000, 120000000];
|
|
var cost = [1000, 1000, 1000, 1000, 800];
|
|
var selectedMap = -1;
|
|
var mesos;
|
|
var hasCoupon = false;
|
|
|
|
function start() {
|
|
cm.sendNext("Hello, I drive the Regular Cab. If you want to go from town to town safely and fast, then ride our cab. We'll glady take you to your destination with an affordable price.");
|
|
}
|
|
|
|
function action(mode, type, selection) {
|
|
if (mode == -1) {
|
|
cm.dispose();
|
|
} else {
|
|
if (status == 1 && mode == 0) {
|
|
cm.dispose();
|
|
return;
|
|
} else if (status >= 2 && mode == 0) {
|
|
cm.sendNext("There's a lot to see in this town, too. Come back and find us when you need to go to a different town.");
|
|
cm.dispose();
|
|
return;
|
|
}
|
|
if (mode == 1)
|
|
status++;
|
|
else
|
|
status--;
|
|
if (status == 1) {
|
|
var selStr = "";
|
|
if (cm.getJobId() == 0)
|
|
selStr += "We have a special 90% discount for beginners.";
|
|
selStr += "Choose your destination, for fees will change from place to place.#b";
|
|
for (var i = 0; i < maps.length; i++)
|
|
selStr += "\r\n#L" + i + "##m" + maps[i] + "# (" + (cm.getJobId() == 0 ? cost[i] / 10 : cost[i]) + " mesos)#l";
|
|
cm.sendSimple(selStr);
|
|
} else if (status == 2) {
|
|
if (maps[selection] == 100000000 && cm.getMapId() == 101000000 && cm.haveItem(4032288)) {
|
|
cm.sendYesNo("Hmm, I see you have been recommended by Neinheart to come to Victoria Island to improve your knightly skills. Well, just this time the ride will be free of charges. Will you take the ride?");
|
|
hasCoupon = true;
|
|
} else {
|
|
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;
|
|
} else if (status == 3) {
|
|
if (!hasCoupon) {
|
|
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.dispose();
|
|
return;
|
|
}
|
|
|
|
cm.gainMeso(-mesos);
|
|
} else {
|
|
cm.gainItem(4032288, -1);
|
|
}
|
|
|
|
cm.warp(maps[selectedMap], 0);
|
|
cm.dispose();
|
|
}
|
|
}
|
|
} |