- Joined
- Jul 25, 2008
- Messages
- 29
- Reaction score
- 0
Just another one of the NPCs I made a while ago. This one is a soft fix to people hogging zakum.
I will post the more hardcore fix to hogging a little later on
But if you choose to use this now just paste this in your 2030013.js.
Code:
/*Adobis with quest ~ Ebilme(Lahos)*/
importPackage(net.sf.odinms.tools);
importPackage(net.sf.odinms.client);
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendSimple("Welcome to the Entrance to Zakum's Altar ! Would you like to go inside and fight #bZakum#k ? If you want to fight him you\n\
need #b50 #t4000274##ks,#b 1 #t4000243##k,and #b100,000,000 Mesos#bk to prove to me you are strong enough.\r\n \n\
#L1#I have the required items! I am ready to fight!#l\r\n\#L2#No thanks, I'm just lost#l");
} else if (status == 1) {
if (selection == 1) {
if ((cm.haveItem(4000274, 50)) && (cm.haveItem(4000243)) && (cm.getMeso() >= 100000000)) {
cm.gainMeso(-10000000);
cm.gainItem(4001017, 1);
cm.sendOk("Goodluck!");
cm.warp(280030000, 0);
}
else if (!cm.haveItem(4000274, 50)) {
cm.sendOk("You dont have the required items.");
cm.dispose();
}
else if (!cm.haveItem(4000243)) {
cm.sendOk("You dont have the required items.");
cm.dispose();
}
else if (!cm.getMeso() <= 100000000) {
cm.sendOk("You dont have the required items.");
cm.dispose();
}
} else if (status == 2) {
} else if (selection == 2) {
cm.getLevel() >= 0
cm.sendOk("Oh, here I'll send you back to El Nath. Come back if you ever get strong enough!");
cm.warp(211000000, 0);
cm.dispose();
}
else{
cm.sendOk("You are not in the right levels to get inside (Level 50+) !");
}
}
}
}
I will post the more hardcore fix to hogging a little later on
