Autopot & Steal patch + Friendly mob drops + Portal update fix
Adjusted pet autopot to use temporary variables instead of the current player's HP, MP. This seems to have solved a race condition issue where the pet would instantly use up all the pots of the assigned itemid the player had on the inventory. Steal now uses the effective chance it is supposed to use. Reworked Steal so that it determines which item to drop accordingly with the drop rates of each available item. It won't drop Quest nor Party Quest items. Reworked friendly mob drops to act on the same way common mobs drops items. Fixed issues with scripted portals introduced on the Portal Soundeffect update patch. There is expected to have no more syntax errors on the portal scripts. Improved quality of the strings used on the Expedition scripts. New command: reach. Warps the caller to the area where the targeted player is.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
F/*
|
||||
/*
|
||||
This file is part of the OdinMS Maple Story Server
|
||||
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
|
||||
Matthias Butz <matze@odinms.de>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
function enter(pi) {
|
||||
if (pi.isQuestStarted(2300) || pi.isQuestCompleted(2300)
|
||||
|| pi.isQuestStarted(2301) || pi.isQuestCompleted(2301)
|
||||
|| pi.isQuestStarted(2302) || pi.isQuestCompleted(2302)
|
||||
|| pi.isQuestStarted(2303) || pi.isQuestCompleted(2303)
|
||||
|| pi.isQuestStarted(2304) || pi.isQuestCompleted(2304)
|
||||
|| pi.isQuestStarted(2305) || pi.isQuestCompleted(2305)
|
||||
|| pi.isQuestStarted(2306) || pi.isQuestCompleted(2306)
|
||||
|| pi.isQuestStarted(2307) || pi.isQuestCompleted(2307)
|
||||
|| pi.isQuestStarted(2308) || pi.isQuestCompleted(2308)
|
||||
|| pi.isQuestStarted(2309) || pi.isQuestCompleted(2309)
|
||||
|| pi.isQuestStarted(2310) || pi.isQuestCompleted(2310)) {
|
||||
if (pi.isQuestStarted(2300) || pi.isQuestCompleted(2300) ||
|
||||
pi.isQuestStarted(2301) || pi.isQuestCompleted(2301) ||
|
||||
pi.isQuestStarted(2302) || pi.isQuestCompleted(2302) ||
|
||||
pi.isQuestStarted(2303) || pi.isQuestCompleted(2303) ||
|
||||
pi.isQuestStarted(2304) || pi.isQuestCompleted(2304) ||
|
||||
pi.isQuestStarted(2305) || pi.isQuestCompleted(2305) ||
|
||||
pi.isQuestStarted(2306) || pi.isQuestCompleted(2306) ||
|
||||
pi.isQuestStarted(2307) || pi.isQuestCompleted(2307) ||
|
||||
pi.isQuestStarted(2308) || pi.isQuestCompleted(2308) ||
|
||||
pi.isQuestStarted(2309) || pi.isQuestCompleted(2309) ||
|
||||
pi.isQuestStarted(2310) || pi.isQuestCompleted(2310)) {
|
||||
pi.playPortalSound();
|
||||
pi.warp(106020000, 0);
|
||||
return true;
|
||||
|
||||
@@ -30,7 +30,7 @@ function enter(pi) {
|
||||
}
|
||||
|
||||
if (!pi.isQuestCompleted(100201)) {
|
||||
pi.getPlayer().dropMessage(5,"You do not have completed all the trials yet. You may not attempt the boss right now.");
|
||||
pi.getPlayer().dropMessage(5,"You haven't completed all the trials yet. You may not attempt the boss right now.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
function enter(pi) {
|
||||
if (pi.isQuestStarted(1041))
|
||||
pi.warp(1010100, 4);
|
||||
else if (pi.isQuestStarted(1042))
|
||||
pi.warp(1010200, 4);
|
||||
else if (pi.isQuestStarted(1043))
|
||||
pi.warp(1010300, 4);
|
||||
else if (pi.isQuestStarted(1044))
|
||||
if (pi.isQuestStarted(1041)) {
|
||||
pi.playPortalSound(); pi.warp(1010100, 4);
|
||||
} else if (pi.isQuestStarted(1042)) {
|
||||
pi.playPortalSound(); pi.warp(1010200, 4);
|
||||
} else if (pi.isQuestStarted(1043)) {
|
||||
pi.playPortalSound(); pi.warp(1010300, 4);
|
||||
} else if (pi.isQuestStarted(1044)) {
|
||||
pi.playPortalSound(); pi.warp(1010400, 4);
|
||||
else {
|
||||
} else {
|
||||
pi.message("Only the adventurers that have been trained by Mai may enter.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -23,13 +23,19 @@
|
||||
* @author Jvlaple
|
||||
*/
|
||||
function enter(pi) {
|
||||
var nextMap;
|
||||
var eim;
|
||||
var target;
|
||||
var targetPortal;
|
||||
var avail;
|
||||
|
||||
if (pi.getPlayer().getMapId() == 240050101) {
|
||||
var nextMap = 240050102;
|
||||
var eim = pi.getPlayer().getEventInstance()
|
||||
var target = eim.getMapInstance(nextMap);
|
||||
var targetPortal = target.getPortal("sp");
|
||||
nextMap = 240050102;
|
||||
eim = pi.getPlayer().getEventInstance();
|
||||
target = eim.getMapInstance(nextMap);
|
||||
targetPortal = target.getPortal("sp");
|
||||
// only let people through if the eim is ready
|
||||
var avail = eim.getProperty("1stageclear");
|
||||
avail = eim.getProperty("1stageclear");
|
||||
if (avail == null) {
|
||||
// do nothing; send message to player
|
||||
pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
|
||||
@@ -40,12 +46,12 @@ function enter(pi) {
|
||||
}
|
||||
}
|
||||
else if (pi.getPlayer().getMapId() == 240050102) {
|
||||
var nextMap = 240050103;
|
||||
var eim = pi.getPlayer().getEventInstance()
|
||||
var target = eim.getMapInstance(nextMap);
|
||||
var targetPortal = target.getPortal("sp");
|
||||
nextMap = 240050103;
|
||||
eim = pi.getPlayer().getEventInstance();
|
||||
target = eim.getMapInstance(nextMap);
|
||||
targetPortal = target.getPortal("sp");
|
||||
// only let people through if the eim is ready
|
||||
var avail = eim.getProperty("2stageclear");
|
||||
avail = eim.getProperty("2stageclear");
|
||||
if (avail == null) {
|
||||
// do nothing; send message to player
|
||||
pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
|
||||
@@ -56,12 +62,12 @@ function enter(pi) {
|
||||
}
|
||||
}
|
||||
else if (pi.getPlayer().getMapId() == 240050103) {
|
||||
var nextMap = 240050104;
|
||||
var eim = pi.getPlayer().getEventInstance()
|
||||
var target = eim.getMapInstance(nextMap);
|
||||
var targetPortal = target.getPortal("sp");
|
||||
nextMap = 240050104;
|
||||
eim = pi.getPlayer().getEventInstance();
|
||||
target = eim.getMapInstance(nextMap);
|
||||
targetPortal = target.getPortal("sp");
|
||||
// only let people through if the eim is ready
|
||||
var avail = eim.getProperty("3stageclear");
|
||||
avail = eim.getProperty("3stageclear");
|
||||
if (avail == null) {
|
||||
// do nothing; send message to player
|
||||
pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
|
||||
@@ -72,12 +78,12 @@ function enter(pi) {
|
||||
}
|
||||
}
|
||||
else if (pi.getPlayer().getMapId() == 240050104) {
|
||||
var nextMap = 240050105;
|
||||
var eim = pi.getPlayer().getEventInstance()
|
||||
var target = eim.getMapInstance(nextMap);
|
||||
var targetPortal = target.getPortal("sp");
|
||||
nextMap = 240050105;
|
||||
eim = pi.getPlayer().getEventInstance();
|
||||
target = eim.getMapInstance(nextMap);
|
||||
targetPortal = target.getPortal("sp");
|
||||
// only let people through if the eim is ready
|
||||
var avail = eim.getProperty("4stageclear");
|
||||
avail = eim.getProperty("4stageclear");
|
||||
if (avail == null) {
|
||||
// do nothing; send message to player
|
||||
pi.getPlayer().dropMessage(6, "Horntail\'s Seal is Blocking this Door.");
|
||||
@@ -88,15 +94,15 @@ function enter(pi) {
|
||||
}
|
||||
}
|
||||
else if (pi.getPlayer().getMapId() == 240050105) {
|
||||
var nextMap = 240050100;
|
||||
var eim = pi.getPlayer().getEventInstance()
|
||||
var target = eim.getMapInstance(nextMap);
|
||||
var targetPortal = target.getPortal("st00");
|
||||
nextMap = 240050100;
|
||||
eim = pi.getPlayer().getEventInstance();
|
||||
target = eim.getMapInstance(nextMap);
|
||||
targetPortal = target.getPortal("st00");
|
||||
|
||||
var avail = eim.getProperty("5stageclear");
|
||||
avail = eim.getProperty("5stageclear");
|
||||
if (avail == null) {
|
||||
if (pi.haveItem(4001092) && pi.isEventLeader()) {
|
||||
pi.getEventInstance().showClearEffect();
|
||||
eim.showClearEffect();
|
||||
pi.getPlayer().dropMessage(6, "The leader's key break the seal for a flash...");
|
||||
pi.getPlayer().changeMap(target, targetPortal);
|
||||
eim.setIntProperty("5stageclear", 1);
|
||||
|
||||
@@ -26,7 +26,7 @@ LudiPQ - 1 - 2 Portal
|
||||
|
||||
function enter(pi) {
|
||||
var nextMap = 922010700;
|
||||
var eim = pi.getPlayer().getEventInstance()
|
||||
var eim = pi.getPlayer().getEventInstance();
|
||||
var target = eim.getMapInstance(nextMap);
|
||||
var targetPortal = target.getPortal("st00");
|
||||
// only let people through if the eim is ready
|
||||
|
||||
@@ -8,7 +8,7 @@ function enter(pi) {
|
||||
var questProgress = pi.getQuestProgress(2330, 3300005) + pi.getQuestProgress(2330, 3300006) + pi.getQuestProgress(2330, 3300007); //3 Yetis
|
||||
if(questProgress == 3 && !pi.hasItem(4032388)) {
|
||||
if(pi.canHold(4032388)){
|
||||
pi.getPlayer().message("You have aquired a key to the Wedding Hall. King Pepe must have dropped it.")
|
||||
pi.getPlayer().message("You have aquired a key to the Wedding Hall. King Pepe must have dropped it.");
|
||||
pi.gainItem(4032388, 1);
|
||||
|
||||
pi.playPortalSound();
|
||||
|
||||
Reference in New Issue
Block a user