Try testing it :]
This actually does work in-game. The first chat doesn't go away until the player had made a selection of either yes (reset exp to 0) or no (closes chat).
@evilsinxd
Once again, make your own thread then.
I'm lazy to test lols =x .
But by looking at it it doesnt seem to be working.
I may be wrong .. Sorry if its so :]
I just dunwan SPAM ragezone =D so merge the thread should better.
If you don't wanna test it, feel free to go onto my server (info on my sig).
Go to Doofus NPC @ Henesys Marketplace. &Click him yourself :]
Maybe later :] I'm downloading something.
If I had a working recording software, I could probably just make a video about it xD
Just to prove that it does work..
Good effort.
Nice Job
nice job ^_^
Thanks for this.
Nice, quick and simple.
Everyone who said thanks for this is a leecher. :/
So true..Everyone who said thanks for this is a leecher. :/
public int getExp() {
return getPlayer().getExp();
}
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) {
cm.sendOk("OK then, see you next time!");
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendYesNo("Hey there, if you have negative exp, i will fix it for you\r\nShall i?");
} else {
if (cm.getExp() < 0) {
cm.setExp(0);
cm.sendOk("Ok, i fixed it, have fun!");
cm.dispose();
} else {
cm.sendOk("You don't have negative exp!");
cm.dispose();
}
}
}
}
won't the players complain about a loss of exp ? why not convert it to positive. or issue a level up if needed.one with exp check is always better lol
use my getExp function if you havent got it yet (check my releases, its in the exp seller thread)
Code: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) { cm.sendOk("OK then, see you next time!"); cm.dispose(); return; } if (mode == 1) status++; else status--; if (status == 0) { cm.sendYesNo("Hey there, if you have negative exp, i will fix it for you\r\nShall i?"); } else { if (cm.getExp() < 0) { cm.setExp(0); cm.sendOk("Ok, i fixed it, have fun!"); cm.dispose(); } else { cm.sendOk("You don't have negative exp!"); cm.dispose(); } } } }
if (cm.getExp() < 0) {
cm.setExp(-(cm.getExp()));
cm.sendOk("Ok, i fixed it, have fun!");
cm.dispose();
}
yeah. guess this one's simply too simple.thats also possible
then you would get something like
Code:if (cm.getExp() < 0) { cm.setExp(-(cm.getExp())); cm.sendOk("Ok, i fixed it, have fun!"); cm.dispose(); }