Korn Posted January 12, 2015 Share Posted January 12, 2015 To get the current level of each skill and put in variables. int aglt; public int getAglt() { return aglt= skills.getDynamic(Skill.AGILITY); } public int setAglt(int aglt) { return this.aglt= skills.getDynamic(Skill.AGILITY); } Work that way? Link to comment Share on other sites More sharing options...
BotRS123 Posted January 12, 2015 Share Posted January 12, 2015 Best way to find out is to test it. Out of curiosity, why are you passing in a parameter in setAglt when you aren't using it? Also, why are you setting the variable each time you call getAglt? Link to comment Share on other sites More sharing options...
Korn Posted January 12, 2015 Author Share Posted January 12, 2015 Best way to find out is to test it. Out of curiosity, why are you passing in a parameter in setAglt when you aren't using it? Also, why are you setting the variable each time you call getAglt? That's what I was thinking of crazy things, I'm a little confused, but I want to get the current value of skill, so I want to understand how the getDynamic, how could get the current level or xp rest to evolve, something like that. Link to comment Share on other sites More sharing options...
Novak Posted January 12, 2015 Share Posted January 12, 2015 the lack of java knowledge is strong in this thread. getDynamic returns the dynamic level of the skill you want ex: if your attack is 75/70 from a potion it will return 75 1 Link to comment Share on other sites More sharing options...
Korn Posted January 12, 2015 Author Share Posted January 12, 2015 the lack of java knowledge is strong in this thread. getDynamic returns the dynamic level of the skill you want ex: if your attack is 75/70 from a potion it will return 75 How do I get the current level of skill? Link to comment Share on other sites More sharing options...
Czar Posted January 12, 2015 Share Posted January 12, 2015 getDynamic for 1st level, getStatic for 2nd level e.g. 75/99 hp 75 = getDynamic() 99 = getStatic() Link to comment Share on other sites More sharing options...
Korn Posted January 12, 2015 Author Share Posted January 12, 2015 (edited) getDynamic for 1st level, getStatic for 2nd level e.g. 75/99 hp 75 = getDynamic() 99 = getStatic() Thanks perfect =D And now how get (type)? if (!str_said.contains(player)) { str_said.add(player); speak = getSpeak("strength"); speak_finally = getSpeak("finally"); if (speak != null && speak_finally!= null) { type(speak + skills.getStatic(Skill.STRENGTH) + speak_finally); } } Chatbox.MessageType is contains? Or message.contains ??? Edited January 12, 2015 by Korn Link to comment Share on other sites More sharing options...
Czar Posted January 12, 2015 Share Posted January 12, 2015 (edited) Message m; To get the message, you do m.getMessage() String msg = m.getMessage(); To get the message type, you do m.getType() message.getType() == MessageType.GAME for normal message (e.g. you catch some shrimp) or message.getType() == MessageType.PLAYER for player messages (e.g. player says hello) Edited January 12, 2015 by Czar Link to comment Share on other sites More sharing options...
Korn Posted January 12, 2015 Author Share Posted January 12, 2015 if (!str_said.contains(player)) { str_said.add(player); speak= getSpeak("strength"); speak_finally = getSpeak("finally"); if (speak != null && speak_finally != null) { message.contains(speak+ skills.getStatic(Skill.STRENGTH) + speak_finally); } } corret? Link to comment Share on other sites More sharing options...
Czar Posted January 12, 2015 Share Posted January 12, 2015 Explain what you're trying to do and I will code it and post here Link to comment Share on other sites More sharing options...
Joseph Posted January 12, 2015 Share Posted January 12, 2015 Explain what you're trying to do and I will code it and post hereno spoon feedING. To get the current level of each skill and put in variables. int aglt; public int getAglt() { return aglt= skills.getDynamic(Skill.AGILITY); } public int setAglt(int aglt) { return this.aglt= skills.getDynamic(Skill.AGILITY); } Work that way?the set method should be a void method so it set the variable and not return the value Message m; To get the message, you do m.getMessage() String msg = m.getMessage(); To get the message type, you do m.getType() message.getType() == MessageType.GAME for normal message (e.g. you catch some shrimp) or message.getType() == MessageType.PLAYER for player messages (e.g. player says hello) use .eequal(object) and not == Link to comment Share on other sites More sharing options...
Novak Posted January 12, 2015 Share Posted January 12, 2015 dude not to be rude, but your java naming and overall knowledge(being judged by your lack of knowledge in this thread) is horrible. you should look at some java resources and not expect to be spoonfed Link to comment Share on other sites More sharing options...