Improved item & drop-point checking + Dojo fixes + Duey revamp
Fixed some issues with items being dropped sometimes out-of-reach and in a weird way. Improved item checking function, now looking up one-of-a-kind items properly. Fixed some issues with dojo skills and possible exploits in dojo progression. Improved Duey, now displaying better info to players.
This commit is contained in:
@@ -32,15 +32,31 @@ function enter(pi) {
|
||||
if(gate != null) {
|
||||
if (gate.getState() == 1 || pi.getMap().countMonsters() == 0) {
|
||||
if (Math.floor(pi.getPlayer().getMapId() / 100) % 100 < 38) {
|
||||
pi.getPlayer().message("You received " + pi.getPlayer().addDojoPointsByMap() + " training points. Your total training points score is now " + pi.getPlayer().getDojoPoints() + ".");
|
||||
|
||||
if(((Math.floor((pi.getPlayer().getMap().getId() + 100) / 100)) % 100) % 6 == 0) {
|
||||
if(Math.floor(pi.getPlayer().getMapId() / 10000) == 92503) {
|
||||
pi.warpParty(pi.getPlayer().getMap().getId() + 100, 925030100, 925033804);
|
||||
var restMapId = pi.getPlayer().getMap().getId() + 100;
|
||||
var mapId = pi.getPlayer().getMap().getId();
|
||||
|
||||
for(var i = 0; i < 5; i++) {
|
||||
var chrlist = pi.getMap(mapId - 100 * i).getAllPlayers();
|
||||
|
||||
var pIter = chrlist.iterator();
|
||||
while (pIter.hasNext()) {
|
||||
var chr = pIter.next();
|
||||
|
||||
for(var j = i; j >= 0; j--) {
|
||||
chr.message("You received " + chr.addDojoPointsByMap(mapId - 100 * j) + " training points. Your total training points score is now " + chr.getDojoPoints() + ".");
|
||||
}
|
||||
|
||||
chr.changeMap(restMapId, 0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pi.getPlayer().message("You received " + pi.getPlayer().addDojoPointsByMap(pi.getMapId()) + " training points. Your total training points score is now " + pi.getPlayer().getDojoPoints() + ".");
|
||||
pi.warp(pi.getPlayer().getMap().getId() + 100, 0);
|
||||
}
|
||||
} else {
|
||||
pi.getPlayer().message("You received " + pi.getPlayer().addDojoPointsByMap(pi.getMapId()) + " training points. Your total training points score is now " + pi.getPlayer().getDojoPoints() + ".");
|
||||
pi.warp(pi.getPlayer().getMap().getId() + 100, 0);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -26,6 +26,12 @@
|
||||
function enter(pi) {
|
||||
var maps = [108000600, 108000601, 108000602];
|
||||
if(pi.isQuestStarted(20201) || pi.isQuestStarted(20202) || pi.isQuestStarted(20203) || pi.isQuestStarted(20204) || pi.isQuestStarted(20205)) {
|
||||
pi.removeAll(4032096);
|
||||
pi.removeAll(4032097);
|
||||
pi.removeAll(4032098);
|
||||
pi.removeAll(4032099);
|
||||
pi.removeAll(4032100);
|
||||
|
||||
var rand = Math.floor(Math.random() * maps.length);
|
||||
pi.warp(maps[rand], 0);
|
||||
return true;
|
||||
|
||||
@@ -2,15 +2,32 @@ function enter(pi) {
|
||||
if(pi.getPlayer().getMapId() == 130030001){
|
||||
if(pi.isQuestStarted(20010)){
|
||||
pi.warp(130030002, 0);
|
||||
return true;
|
||||
} else {
|
||||
pi.message("Please click on the NPC first to receive a quest.");
|
||||
}
|
||||
} else if(pi.getPlayer().getMapId() == 130030002){
|
||||
pi.warp(130030003, 0);
|
||||
if(pi.isQuestCompleted(20011)){
|
||||
pi.warp(130030003, 0);
|
||||
return true;
|
||||
} else {
|
||||
pi.message("Please complete the required quest before proceeding.");
|
||||
}
|
||||
} else if(pi.getPlayer().getMapId() == 130030003){
|
||||
pi.warp(130030004, 0);
|
||||
if(pi.isQuestCompleted(20012)){
|
||||
pi.warp(130030004, 0);
|
||||
return true;
|
||||
} else {
|
||||
pi.message("Please complete the required quest before proceeding.");
|
||||
}
|
||||
} else if(pi.getPlayer().getMapId() == 130030004){
|
||||
pi.warp(130030005, 0);
|
||||
if(pi.isQuestCompleted(20013)){
|
||||
pi.warp(130030005, 0);
|
||||
return true;
|
||||
} else {
|
||||
pi.message("Please complete the required quest before proceeding.");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user