CREDITS: andyw for the boss limit script
Me for posting this.
ok this fixes the glitcch whereby when u use andyw's boss limit, people can bypass it in boss maps. they can relog in the boss maps: EG: Horntail Cave and the reactor will respawn, and they can kill it again. thus bypassing the limit. Tested in seanpack and works.
TO FIX THIS. NOTE: ONLY FOR PEOPLE WITH JAVA CODING KNOWLEDGE.
First make a backup in case anythign happens. then in src/net/sf/odinms/server/maps open Sbossmapmonitor and Bossmapmonitor.
find this line:
Code:
map.resetReactors();
and comment it (adding a // in front) in both files NOTE: do not comment this line:
Code:
pMap.resetReactors();
they look the same but this one resets the doors (opens zak/papu door)
then go to src/net/sf/odinms/scripting/npc/npccpnversation.java and add these in:
Code:
public void resetReactors() {
getPlayer().getMap().resetReactors();
}
and
Code:
public int getCharsOnMap() {
return getPlayer().getMap().getCharacters().size();
}
and then you compile your source.
then change your boss exit warper npc script EG:Amon for Zak/Crystal of Roots for Horntail/Machine Apparatus for PApu.
NOTE: this is amon's npc in zakum script. the others should look like this. change :
Code:
importPackage(net.sf.odinms.client);
var wui = 0;
function start() {
cm.sendYesNo("Do you wish to go out from here ?");
}
function action(mode, type, selection) {
if (mode == 0 || wui == 1) {
cm.dispose();
} else {
wui = 1;
cm.sendOk ("Bye bye");
cm.warp(211042300,"sp");
}
}
to
Code:
importPackage(net.sf.odinms.client);
var wui = 0;
function start() {
cm.sendYesNo("Do you wish to go out from here ?");
}
function action(mode, type, selection) {
if (mode == 0 || wui == 1) {
cm.dispose();
} else {
wui = 1;
if (cm.getCharsOnMap() < 2) {
cm.resetReactors();
}
cm.sendOk ("Bye bye");
cm.warp(211042300,"sp");
}
}
and thats it. now people have to click the npc and get out so that the reactor will respawn. hope this helps for you :)