Re: Simple @advance command
Doing auto job advance is better than @advance in my opinion.
Re: Simple @advance command
Quote:
Originally Posted by
Alienx3
Doing auto job advance is better than @advance in my opinion.
Indeed it is. I was learning commands and decided to add this to my server.
Re: Simple @advance command
Instead of having level and job checks on both you should just make the autoJob a boolean and have it return false if the character can't change job yet and then in the command you can just have something like...
Code:
if (autoJob) {
player.dropMessage("You have advanced.");
} else {
player.dropMessage("You can't advance yet because I said so...");
}
No need to check job and levels twice.
Re: Simple @advance command
Quote:
Originally Posted by
XiuzSu
Instead of having level and job checks on both you should just make the autoJob a boolean and have it return false if the character can't change job yet and then in the command you can just have something like...
Code:
if (autoJob) {
player.dropMessage("You have advanced.");
} else {
player.dropMessage("You can't advance yet because I said so...");
}
No need to check job and levels twice.
I didn't code the autojob. Not that good yet haha, it was already in my source. (XEONMS v97)
Re: Simple @advance command
Quote:
Originally Posted by
lordpeter
I didn't code the autojob. Not that good yet haha, it was already in my source. (XEONMS v97)
I know but I just said that because in your command your using that function, so assuming you at least looked at it you should know that there are checks in it there fore not being needed in your command, so instead you could have that command coded in 4 lines (like I showed you as an example) with a couple of small modifications to autoJob.
Also, this is another way to improve your command without changing autoJob.
Code:
int oldJob = player.getJobId();
player.autoJob();
if (oldJob != player.getJobId()) {
player.dropMessage("You have advanced.");
} else {
player.dropMessage("You can't advance yet because I said so...");
}
Note: I am just giving you constructive criticism in order to help you improve so please don't take it the wrong way.
Re: Simple @advance command
Quote:
Originally Posted by
XiuzSu
I know but I just said that because in your command your using that function, so assuming you at least looked at it you should know that there are checks in it there fore not being needed in your command, so instead you could have that command coded in 4 lines (like I showed you as an example) with a couple of small modifications to autoJob.
Also, this is another way to improve your command without changing autoJob.
Code:
int oldJob = player.getJobId();
player.autoJob();
if (oldJob != player.getJobId()) {
player.dropMessage("You have advanced.");
} else {
player.dropMessage("You can't advance yet because I said so...");
}
Note: I am just giving you constructive criticism in order to help you improve so please don't take it the wrong way.
Yes, I thank you for that.
I NOW RELEASED A v111 OF THIS COMMAND
Re: Simple @advance command
For v111 I have included for all jobs to auto advanced except for Adventurer which they have to choose 2nd job. Where i created a NPC at FM for them to advanced and choose the job after that you will be advanced automatically.
Re: Simple @advance command
Quote:
Originally Posted by
mervyn3366
For v111 I have included for all jobs to auto advanced except for Adventurer which they have to choose 2nd job. Where i created a NPC at FM for them to advanced and choose the job after that you will be advanced automatically.
I just fixed the original job npc people to give 2nd job also.
Re: Simple @advance command
I tried the v111 command, It only works for me as a beginner it tells me
"[Notice] You are not a high enough level or It is not your job's time to advance"
But when i am level 30, 70, and 120, No job advancement nor any notices,
Idk if it is the way i put it in my MapleCharacter.java
Using isDemon and what not
Re: Simple @advance command
Quote:
Originally Posted by
xloserxj
I tried the v111 command, It only works for me as a beginner it tells me
"[Notice] You are not a high enough level or It is not your job's time to advance"
But when i am level 30, 70, and 120, No job advancement nor any notices,
Idk if it is the way i put it in my MapleCharacter.java
Using isDemon and what not
I checked for adventurers, it worked...
Maybe it's the isDemon
Try this:
PHP Code:
public boolean isDemon() {
if (getJob().getId() / 100 == 31 || getJob().getId() == 3001) {
return true;
}
return false;
}
and
PHP Code:
public boolean isMercedes() {
if (containsAreaInfo(7784, "sw=")) {
return containsAreaInfo(7784, GameConstants.isMercedes(getJob().getId()) ? "sw=0" : "sw=1");
}
return GameConstants.isMercedes(getJob().getId());
}
Re: Simple @advance command
Quote:
Originally Posted by
lordpeter
I checked for adventurers, it worked...
Maybe it's the isDemon
Try this:
PHP Code:
public boolean isDemon() {
if (getJob().getId() / 100 == 31 || getJob().getId() == 3001) {
return true;
}
return false;
}
and
PHP Code:
public boolean isMercedes() {
if (containsAreaInfo(7784, "sw=")) {
return containsAreaInfo(7784, GameConstants.isMercedes(getJob().getId()) ? "sw=0" : "sw=1");
}
return GameConstants.isMercedes(getJob().getId());
}
Heaps of thanks. It works perfect at the moment no Errors in the time being. Will check for more
Re: Simple @advance command
Quote:
Originally Posted by
mervyn3366
Heaps of thanks. It works perfect at the moment no Errors in the time being. Will check for more
I added a isCannon function in the original post if you need it too.
Re: Simple @advance command
LF> Lithium v111 @advance update ;3
Re: Simple @advance command
Quote:
Originally Posted by
iPuke
LF> Lithium v111 @advance update ;3
This one doesn't work?
Re: Simple @advance command
Quote:
Originally Posted by
iPuke
LF> Lithium v111 @advance update ;3
LF>No leechers
Why don't you try to make one yourself?