Added pet flags recognition, such as the "pet speed same as owner" mechanic. Fixed repeatable quest "Remnants of HT..." not rewarding Dragon Stones. Refactored character object's check slots method, now using the same algorithm from the API class. Fixed a vunerability from before reviving/respawning players to towns, on where players would get their HP restored in area map before sending them back to safety. Fixed some NPC gates in Mushking Empire, allowing players to access bosses free of quest requirements. Improved dialog of NPCs for "permission to attempt Zakum expeds". Implemented (or rather improved) item scripts, now using NPC conversation methods as it was intended originally. Rehauled mob-skill "summon mobs" limit, now using the placeholders found in the wz to determine limit of concurrent underlings spawned, and "limit" now refers to total of underlings spawned from a mob. Revised IoSession closing mechanics in several login classes. Implemented automated loggedin account shutdown if another player has gained a pass from the DB to login. Improved the server-side check for teleport rocks. Fixed removeAfter from mobs being procced after they were disposed. Reviewed EIM start references on several scripts, minding the latest EIM setup implementations. Fixed equipments that were reused Scissors of Karma not not being able to sell on pshops/merchants. Fixed a bug where entering alliances would lead a player to see information from other guilds of past alliances until an update takes place. Padronized a few skillbook names. Reviewed player puppets not gaining priority properly on the recent aggro system. Improved "item sold" message of merchants, now displaying also quantity left of an item on store. Fixed a bug with itemid limits of weapons on server.
102 lines
4.7 KiB
JavaScript
102 lines
4.7 KiB
JavaScript
/**
|
|
-- Odin JavaScript --------------------------------------------------------------------------------
|
|
Hak - Cabin <To Mu Lung>(200000141) / Mu Lung Temple(250000100) / Herb Town(251000000)
|
|
-- By ---------------------------------------------------------------------------------------------
|
|
Information
|
|
-- Version Info -----------------------------------------------------------------------------------
|
|
1.1 - Text and statement fix [Information]
|
|
1.0 - First Version by Information
|
|
---------------------------------------------------------------------------------------------------
|
|
**/
|
|
|
|
var menu = new Array("Mu Lung","Orbis","Herb Town","Mu Lung");
|
|
var cost = new Array(1500,1500,500,1500);
|
|
var hak;
|
|
var slct;
|
|
var display = "";
|
|
var btwmsg;
|
|
var method;
|
|
|
|
|
|
function start() {
|
|
status = -1;
|
|
hak = cm.getEventManager("Hak");
|
|
action(1, 0, 0);
|
|
}
|
|
|
|
function action(mode, type, selection) {
|
|
if(mode == -1) {
|
|
cm.dispose();
|
|
return;
|
|
} else {
|
|
if(mode == 0 && status == 0) {
|
|
cm.dispose();
|
|
return;
|
|
} else if(mode == 0) {
|
|
cm.sendNext("OK. If you ever change your mind, please let me know.");
|
|
cm.dispose();
|
|
return;
|
|
}
|
|
status++;
|
|
if (status == 0) {
|
|
for(var i=0; i < menu.length; i++) {
|
|
if(cm.getPlayer().getMapId() == 200000141 && i < 1) {
|
|
display += "\r\n#L"+i+"##b"+menu[i]+"("+cost[i]+" mesos)#k";
|
|
} else if(cm.getPlayer().getMapId() == 250000100 && i > 0 && i < 3) {
|
|
display += "\r\n#L"+i+"##b"+menu[i]+"("+cost[i]+" mesos)#k";
|
|
}
|
|
}
|
|
if(cm.getPlayer().getMapId() == 200000141 || cm.getPlayer().getMapId() == 251000000) {
|
|
btwmsg = "#bOrbis#k to #bMu Lung#k";
|
|
} else if(cm.getPlayer().getMapId() == 250000100) {
|
|
btwmsg = "#bMu Lung#k to #bOrbis#k";
|
|
}
|
|
if(cm.getPlayer().getMapId() == 251000000) {
|
|
cm.sendYesNo("Hello there. How's the traveling so far? I've been transporting other travelers like you to #b"+menu[3]+"#k in no time, and... are you interested? It's not as stable as the ship, so you'll have to hold on tight, but i can get there much faster than the ship. I'll take you there as long as you pay #b"+cost[2]+" mesos#k.");
|
|
status++;
|
|
} else if(cm.getPlayer().getMapId() == 250000100) {
|
|
cm.sendSimple("Hello there. How's the traveling so far? I understand that walking on two legs is much harder to cover ground compared to someone like me that can navigate the skies. I've been transporting other travelers like you to other regions in no time, and... are you interested? If so, then select the town you'd like yo head to.\r\n"+display);
|
|
} else {
|
|
cm.sendSimple("Hello there. How's the traveling so far? I've been transporting other travelers like you to other regions in no time, and... are you interested? If so, then select the town you'd like to head to.\r\n"+display);
|
|
}
|
|
} else if(status == 1) {
|
|
slct = selection;
|
|
cm.sendYesNo("Will you move to #b"+menu[selection]+"#k now? If you have #b"+cost[selection]+" mesos#k, I'll take you there right now.");
|
|
|
|
} else if(status == 2) {
|
|
if(slct == 2) {
|
|
if(cm.getMeso() < cost[2]) {
|
|
cm.sendNext("Are you sure you have enough mesos?");
|
|
cm.dispose();
|
|
} else {
|
|
cm.gainMeso(-cost[2]);
|
|
cm.warp(251000000, 0);
|
|
cm.dispose();
|
|
}
|
|
}
|
|
|
|
else {
|
|
if(cm.getMeso() < cost[slct]) {
|
|
cm.sendNext("Are you sure you have enough mesos?");
|
|
cm.dispose();
|
|
} else {
|
|
if(cm.getPlayer().getMapId() == 251000000) {
|
|
cm.gainMeso(-cost[2]);
|
|
cm.warp(250000100, 0);
|
|
cm.dispose();
|
|
} else {
|
|
var em = cm.getEventManager("Hak");
|
|
if (!em.startInstance(cm.getPlayer())) {
|
|
cm.sendOk("Uh... We are currently taking requests from too many maplers right now... Please try again in a bit.");
|
|
cm.dispose();
|
|
return;
|
|
}
|
|
|
|
cm.gainMeso(-cost[slct]);
|
|
cm.dispose();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|