Junior Spellweaver
- Joined
- Oct 15, 2008
- Messages
- 188
- Reaction score
- 0
Whats up RageZone. Haven't been here in a long time. My java's gone slightly cocky too. Here's something small that I thought would be cool.
In MapleCharacter.java :
Search :
Right under, add :
Add import :
Place this into any npc you want :
Enjoy. The item is some useless item that is unstackable so players cant possess too much of it (it is also untradable).
In MapleCharacter.java :
Search :
Code:
private void playerDead() {
Code:
if (getItemQuantity(3995000, false) >= 1) {
NPCScriptManager.getInstance().start(getClient(), [B][U]YOURNPCIDHERE[/U][/B]);
Code:
import net.sf.odinms.scripting.npc.NPCScriptManager;
Place this into any npc you want :
Code:
/**
*@author - AceEvolution
*/
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 (status >= 2 && mode == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendYesNo("You have just died, but since you possess the reviving item, you will be given a choice to be revived. Would you like to be revived?");
}
else if (status == 1) {
cm.gainItem(3995000, -1);
cm.getChar().setHp(cm.getChar().getMaxHp());
cm.dispose();
}
else {
cm.dispose();
}
}
}
Enjoy. The item is some useless item that is unstackable so players cant possess too much of it (it is also untradable).