Jump to content

Get Skills (getDynamic)


Korn

Recommended Posts

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

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 by Korn
Link to comment
Share on other sites

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 by Czar
Link to comment
Share on other sites

Explain what you're trying to do and I will code it and post here

no 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

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...