Working occupation constants
Because deagan didn't bother to test before releasing his shit, I fixed it up...
Quote:
Originally Posted by
deagan
Just a small release, but of a great worth (opinion) when you speak about custom features like occupations, special characters and donators, you decide.
This is the way you can define different exp rates for the above mentioned characters or anything you would like to edit the exp rate for.
And no, not every source has serverconstants, but I bet there is a similar way to get the exp rate, I don't think they edit every class that uses exp everytime they wanna change it, look for it.
As in all my releases, special colours mean something :mellow:
Purpleish = customizable.
ServerConstants.java
Add :
Code:
import client.MapleClient;
Under :
Replace :
Code:
public static int EXP_RATE = *;
public static int MESO_RATE = *;
public static final byte DROP_RATE = *;
With :
Code:
public static int getExpRate(MapleClient c) {
if (c.getPlayer().isGM()) {
return *;
} else {
return *;
}
}
public static int getMesoRate(MapleClient c) {
if (c.getPlayer().isGM()) {
return *;
} else {
return *;
}
}
public static byte getDropRate(MapleClient c) {
if (c.getPlayer().isGM()) {
return *;
} else {
return *;
}
}
I don't know in whatever places you have EXP_RATE, MESO_RATE and DROP_RATE but just replace them all with getExpRate(client), getMesoRate(client) and getDropRate(client)! Where-as client is the parameter.
Re: Working occupation constants
getExpRate(client)? client isn't defined in most classes I tell them to edit it in.
I think c is though.
Thanks.
Re: Working occupation constants
c / client is just the name you give to an instantiated MapleClient class...
Re: Working occupation constants
Yet, using getExpRate(client) gives errors.
Re: Working occupation constants
This is really basic java, client is just the name I give to a MapleClient class. Why don't you just change client into c if that suits your needs? Damn...
Re: Working occupation constants
You feel annoyed? and will do.
Re: Working occupation constants
Quote:
Originally Posted by
deagan
You feel annoyed?
Got that right...
Re: Working occupation constants
I don't understand why though, i'm trying to pick up stuff out of things you put out here but yet all you seem to be caring about is how good you are.
Re: Working occupation constants
Quote:
Originally Posted by
deagan
I don't understand why though, i'm trying to pick up stuff out of things you put out here but yet all you seem to be caring about is how good you are.
It's the fact that your arrogancy got you to release untested stuff. It was coded sloppy and with errors, which you couldn't even manage to fix or understand.
This is annoying me, the mentality of people nowadays (referring to you, yes)
Re: Working occupation constants
Quote:
Originally Posted by
leakerX
It's the fact that your arrogancy got you to release untested stuff. It was coded sloppy and with errors, which you couldn't even manage to fix or understand.
This is annoying me, the mentality of people nowadays (referring to you, yes)
What does my mentality have to do with releasing this, I didn't test it yet because I have a server with players running, which I don't just randomly restart. so I decided to release it, not knowing if it would work or not, also, i'm sorry I didn't know what you were talking about, when it comes to vocabulary and java, the combination overflows me.
should've just pointed mapleclient out to me, and it not working the way I did it.
If a mentality which intends improving on knowledge and sharing it is a bad one to you, sure.:thumbdown:
but hell, let's prevent an unending argue about who is right and leave it at here, thanks for fixing my release up for me.
Re: Working occupation constants
who cares this release sucks i could've done this bullshit blindfolded
Re: Working occupation constants
and? I didn't really ask for your opinion.
Re: Working occupation constants
Damn, Soo many critics here.
If you don't like the release, too bad don't use it. Doesn't mean you have to flame.
Alot of people were actually asking how to do this.
- Never been released before
- Helpful to the community
Its a good release
Re: Working occupation constants
Quote:
Originally Posted by
xMike1x
Damn, Soo many critics here.
If you don't like the release, too bad don't use it. Doesn't mean you have to flame.
Alot of people were actually asking how to do this.
- Never been released before
- Helpful to the community
Its a good release
You're right except there's only 2 critics here.
Re: Working occupation constants
If you define 'here' as this thread, yes. otherwise.. well, yeah.. way more.
Re: Working occupation constants
Quote:
Originally Posted by
deagan
and? I didn't really ask for your opinion.
i asked for my opinion, did i ask me?
Re: Working occupation constants
Quote:
Originally Posted by
deagan
If you define 'here' as this thread, yes. otherwise.. well, yeah.. way more.
Yes i was talking about this thread
Quote:
Originally Posted by
waijoobenmi
i asked for my opinion, did i ask me?
No one cares, Lets see you release anything better? If not don't criticize other peoples work.
As long as this thread helps people and hasn't been released before its good.
Just because its something you can code, doesn't mean it can't be released. Not everything released has to be something you can't code.
Re: Working occupation constants
Re: Working occupation constants
i need a npc script for occu :(
cant find it
can anyone help