Code:public int getPrestigePoints() { // TODO Auto-generated method stub return 4; } public void setPrestigePoints(int i) { // TODO Auto-generated method stub }
I don't think you need me here to tell you what's wrong with these pieces of code.
|
trying to make pengs give prestige points when the NPC 131 (penguine) is dead
Class Npcdeathtask
if(npc.getId() == 131) {
killer.setPrestigePoints(killer.getPrestigePoints( ) + 2);
killer.sendMessage("<img=0>You now have @red@" + killer.getPrestigePoints() + " Prestige Points!");
}
Class Player
public int getPrestigePoints() {
// TODO Auto-generated method stub
return 4;
}
public void setPrestigePoints(int i) {
// TODO Auto-generated method stub
}
}
so Far all that happens in game say that it display in red saying I have 4 Prestige points but when i do check my prestige points its not actually working correctly no prestige points have been added please somebody fix or guide me to the way I want it to be not just display it red text I want to be able to get the prestige points
THANKS will be!
Code:public int getPrestigePoints() { // TODO Auto-generated method stub return 4; } public void setPrestigePoints(int i) { // TODO Auto-generated method stub }
I don't think you need me here to tell you what's wrong with these pieces of code.
Hope this is helpfulCode:private int prestigePoints; public int getPrestigePoints() { return prestigePoints; } public void setPrestigePoints(int prestigePoints) { this.prestigePoints = prestigePoints; }
Please explain I have been trying all night long every way i can possibly think of still does not do what Its suppose to do
I have tried this before It wont work even though on eclipse its not showing any errors but when i load the server and kill NPC 131 (peng) it does not give any prestige points WHY?
If you apply what thing1 provided you and use this code from your OP
It's guaranteed to work, as long as that message is being sent on the kill. (If not, this piece of code is never being reached which is the problem to begin with.Code:if(npc.getId() == 131) { killer.setPrestigePoints(killer.getPrestigePoints( ) + 2); killer.sendMessage("<img=0>You now have @red@" + killer.getPrestigePoints() + " Prestige Points!"); }
Okay I did that, no errors it does display that I have 2 prestige points but when I check still on the same points from before So I'm assuming something is still missing although when I prestige a skill it works but that's not what we are after.
I have already tried that before still no good! please help!
Please help I have added this and Kris is codes still dont seem to be getting the prestige points?
Still need help with this as the code is not showing errors but it is displaying when i kill the npc it shows 2 Prestige points, but when i check my player panel it does not give prestige points
Does it reset the points upon logout or is it not adding at all while online?
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |