[v117.2] Three problems on maplecrystal.. Shouldn't be too complex to fix
Hey guys! I've been messing around with multiple sources and finally settled with MapleCrystal 117.2 which is very well done but unfortunately there was a few complications.
After fixing most of the problems I had, I only have a few remaining
1: When i first installed the source, each class spawned on an empty map with a broken portal. Naturally that was really bad so I tried to change the start location per class in the LoginInformationProvider.java and noticed it did not work. It seems to only take the MapleCharacter.java "Save new char to db" (Line 1208) and applies all jobs to this map.
Now every single jobs spawn at the adventurer tutorial which is unfortunate because I would like all classes to spawn to lilth harbor except for adventurers and cygnus knights where they would retain their original location. (Their respective tutorials)
2: My second problem is the chests//boxes for Pio's chair or the Cygnus knight tutorial area only drop mesos. Are boxes an enemy? How are the loot handled? There's not much documentation about this and it's confusing me. I would assume any box related quests are also effected.
3: When leveling over your level before taking the class advancement I end up with WAYYY too many skill points. Does anyone know where this could be? Or why this happens? It seems to retain the amount of points you would have gained and apply them again upon job change
Level 13 Beginner turns to pirate. 1 point from job change, 9 points from beginner 3 levels. And then another 9 points are granted again.. Giving a total of 19 points upon job advance... This can be rather unfair in my opinion.
I managed to fix all my other issues such as shop not working, Quests errors, job advance errors, change exp to below 1x rate into 0.5x (Stupid integers grrr!) and other things like that.. So i'm not completely useless.. Help would be greatly appreciated <3
Re: [v117.2] Three problems on maplecrystal.. Shouldn't be too complex to fix
Im not 100% sure about 1, but i guess you could do a simple check for job.
As for the rest:
2. Boxes are reactors, you can script them and they have their own table of drops in the database.
3. Many sources have this. Simplest solution is to do a calculation of the SP you would have if you job advanced in time, when you job advance, and set the SP to that value.
Hope this help ;)
Re: [v117.2] Three problems on maplecrystal.. Shouldn't be too complex to fix
oh wow you fixed my problem #2 , Ill have to study more about java for 1 and 3.. I'm still at a semi script kiddie semi coder level in java
- - - Updated - - -
@Novak Is there any sort of Pokedex that tells us which script or which WZ file is what? IE monsters or reactors? It's like finding a needle in a haystack. I found the tutorial box because it was the first two id's but not the eerve one
Re: [v117.2] Three problems on maplecrystal.. Shouldn't be too complex to fix
Quote:
Originally Posted by
Kittyjessika
oh wow you fixed my problem
#2 , Ill have to study more about java for 1 and 3.. I'm still at a semi script kiddie semi coder level in java
- - - Updated - - -
@
Novak Is there any sort of Pokedex that tells us which script or which WZ file is what? IE monsters or reactors? It's like finding a needle in a haystack. I found the tutorial box because it was the first two id's but not the eerve one
No idea, i never actually worked on any reactors :p And a quick google didn't give me the answer either xD
Re: [v117.2] Three problems on maplecrystal.. Shouldn't be too complex to fix
1 is easy, like novak said just do a check. if c.getPlayer().getJobId() == id of the job { startermap = blabla}
something like that would probably work.
Re: [v117.2] Three problems on maplecrystal.. Shouldn't be too complex to fix
Yeah, you can prolly do:
Code:
if c.getPlayer().getJobId() == id {ps.setInt(mapID)} else {ps.setInt(mapID)}
And put that over the ps.setInt that handles the startermap now.
Re: [v117.2] Three problems on maplecrystal.. Shouldn't be too complex to fix
Quote:
Originally Posted by
Novak
Yeah, you can prolly do:
Code:
if c.getPlayer().getJobId() == id {ps.setInt(mapID)} else {ps.setInt(mapID)}
And put that over the ps.setInt that handles the startermap now.
since its already in mapelcharacter it might just be getJobId() insead of c.getPlayer().getJobId()
Re: [v117.2] Three problems on maplecrystal.. Shouldn't be too complex to fix
Code:
//this code sets playerspawn //BEGINNER
if (chr.getPlayer().getJobId() == 0) { //first class check
ps.setInt(18, 000000000); //set location
}else{ //try again
//NOBLESSE
if (chr.getPlayer().getJobId() == 1000) { //check for second class
ps.setInt(18, 000000000); //set location
}else{ //try again
//CITIZEN
if (chr.getPlayer().getJobId() == 3000) { //check third class
ps.setInt(18, 000000000); //set location
}else{ //try again
//MIHILE_0
if (chr.getPlayer().getJobId() == 5000) { //check for fourth class
ps.setInt(18, 000000000); //set location
}else{ //try again
ps.setInt(18, 000000000); //ran out of if statements so we default to this location
}
Why doesn't this compile? Apparently it messes up with SQL and give me 100 errors..
I looked in AbstractPlayerInteraction and it seems everything is fine there..
Re: [v117.2] Three problems on maplecrystal.. Shouldn't be too complex to fix
Quote:
Originally Posted by
Kittyjessika
Code:
//this code sets playerspawn //BEGINNER
if (chr.getPlayer().getJobId() == 0) { //first class check
ps.setInt(18, 000000000); //set location
}else{ //try again
//NOBLESSE
if (chr.getPlayer().getJobId() == 1000) { //check for second class
ps.setInt(18, 000000000); //set location
}else{ //try again
//CITIZEN
if (chr.getPlayer().getJobId() == 3000) { //check third class
ps.setInt(18, 000000000); //set location
}else{ //try again
//MIHILE_0
if (chr.getPlayer().getJobId() == 5000) { //check for fourth class
ps.setInt(18, 000000000); //set location
}else{ //try again
ps.setInt(18, 000000000); //ran out of if statements so we default to this location
}
Why doesn't this compile? Apparently it messes up with SQL and give me 100 errors..
I looked in AbstractPlayerInteraction and it seems everything is fine there..
You did:
Code:
}}else{ //try again
//NOBLESSE
if (chr.getPlayer().getJobId() == 1000) { //check for second class
ps.setInt(18, 000000000); //set location
}else{ //try again
//CITIZEN
if (chr.getPlayer().getJobId() == 3000) { //check third class
ps.setInt(18, 000000000);
You should do:
Code:
else if (chr.getPlayer().getJobId() == 1000) { //check for second class
ps.setInt(18, 000000000); //set location
}else if (chr.getPlayer().getJobId() == 3000) { //check third class
ps.setInt(18, 000000000);
You can't just make multiple else statements. Just follow this: 1 x if{: First check, infinite }else if{ (check for a different value) and 1. }else{ at the end (what to do when all other checks return false)
Re: [v117.2] Three problems on maplecrystal.. Shouldn't be too complex to fix
This is ugly and disgusting but it compiled.
if (chr.job == 0) { //check what job
ps.setInt(18,000000000); //since the job id was 0 we use adventurer start
} else { //id wasnt 0 gotta try again
if (chr.job == 1000) { //check what job
ps.setInt(18,130030000); //since the job id was 1000 we use the Cygnus start
} else {
if (chr.job == 3000) { //check what job
ps.setInt(18,931000000); //since the job id was 3000 we use the resistance spawn
} else {
ps.setInt(18,931030000); //default zone is the shitbox since we ran out of jobs
}
}
}
This is what it took to make it work. :)
#1 fixed
#2 minor problems still probably wz files
#3 about to get started on it.
Re: [v117.2] Three problems on maplecrystal.. Shouldn't be too complex to fix
Quote:
Originally Posted by
Kittyjessika
This is ugly and disgusting but it compiled.
if (chr.job == 0) { //check what job
ps.setInt(18,000000000); //since the job id was 0 we use adventurer start
} else { //id wasnt 0 gotta try again
if (chr.job == 1000) { //check what job
ps.setInt(18,130030000); //since the job id was 1000 we use the Cygnus start
} else {
if (chr.job == 3000) { //check what job
ps.setInt(18,931000000); //since the job id was 3000 we use the resistance spawn
} else {
ps.setInt(18,931030000); //default zone is the shitbox since we ran out of jobs
}
}
}
This is what it took to make it work. :)
#1 fixed
#2 minor problems still probably wz files
#3 about to get started on it.
And still you should do what @Novak said, cause this is really bad :p
Might even want to use cases
Code:
Switch(chr.job) {
Case 0:
ps.setInt(blabla);
break;
Case 100:
ps.setInt(whatever u want);
Break;
Default:
Ps.setInt(default map)
Break;
}
Re: [v117.2] Three problems on maplecrystal.. Shouldn't be too complex to fix
So i've been looking into the too many skill points problem.. Something has been confusing me.. is there multiple kind of skill points? It seems some can only be placed on 1st job and so on.. To fix the issue I wanted to apply the logic where you take the level of your character, substract 10 - or 30 or whatever to it depending on which job advance you are at, multiply that value by 3 and add that many "Negative" skill points. Which would fix the issue. Sadly I do not understand at all how the skillpoint system works for each other jobs. Anyone know about this?
Re: [v117.2] Three problems on maplecrystal.. Shouldn't be too complex to fix
I think they are all stored by job. But classes like evan have like 8 jobs, making it really long.
Its generally stored as: 1stjobsp, 2ndjobsp, 3rdjobsp, ... and so on
Re: [v117.2] Three problems on maplecrystal.. Shouldn't be too complex to fix
You guys ever heard about Ternary?
Quote:
ps.SetInt((chr.getPlayer().getJobId() == JOB_ID) ? ifTrueMapID : ifFalseMapID);
[Dont use it for too many checks or it will get very inefficient.]
And you could do like:
Quote:
int jobType = jobID / 1000;
if (jobType == 1) {
//do things
} else if (jobType == 2) {
//do other things
}
to shorten your code. Good luck!
Re: [v117.2] Three problems on maplecrystal.. Shouldn't be too complex to fix
I believe for the boxes/reactors you can add drops in the same way you add in drops for a mob.