[Release] Doofus - Negative exp fixer (SIMPLE)

Lols this does't check if exp negative and din't help level up..
Here mine.
Code:
/*
	Negative EXP Fix
	Written by Emokids a.k.a Evilsinxd
*/

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) {

			if(cm.getChar().getLevel() >= [COLOR="red"]200[/COLOR]) {
			cm.sendOk("I can only help players below Level [COLOR="red"]200[/COLOR]");
			cm.dispose();
				
			}else if(cm.c.getPlayer().getExp() > -1){
				cm.sendOk("Sorry, I can only help out people with negative exp.");
				cm.dispose();
			} else {
			cm.sendYesNo("Would you like me to repair your negative exp?");
			}
		} else if (status == 1) {
				cm.getChar().levelUp();
				cm.c.getPlayer().gainExp(-cm.c.getPlayer().getExp(), false, false);
				
				cm.sendOk("Okay, your negative exp has been brought back up to 0.");
				cm.dispose();
		}
	}
}
Change the red colour Number to your server MAX LEVEL number
tell me weather work or don't

Thanx, worked for me :thumbup:
 
Sigh... why is there a script for this when there's a source-based fix for negative EXP? TeamCanada, nice effort but this is obsolete because there's something already made that automatically fixes negative EXP when it is received.
 
Good =)
But there's already a command for it ._.

Not everyone's on a repack/pre-made source.
Not everyone has player commands.

Sigh... why is there a script for this when there's a source-based fix for negative EXP? TeamCanada, nice effort but this is obsolete because there's something already made that automatically fixes negative EXP when it is received.

If you mean automatically fix neg exp on logout. my server has that, I just didn't want to release it.
 
Back