- Joined
- Jul 18, 2008
- Messages
- 81
- Reaction score
- 1
A lot of servers have the "starter pack" which gives you both a male and female sauna robe, which I thought was pretty stupid...
Method 1: Using MapleCharacter only in the source.
Add this function in NPCConversationManager.java (net/sf/odinms/scripting/npc):
getPlayer() is an inherited function from AbstractPlayerInteraction.java, if you're wondering.
In your scripts do:
Method 2: Using MapleCharacter in Scripts
Or, if you don't mind using getPlayer() in scripts you can do:
without having to copy the first function.
Method 1: Using MapleCharacter only in the source.
Add this function in NPCConversationManager.java (net/sf/odinms/scripting/npc):
Code:
public int getGender() {
// gender (0 = male, 1 = female)
return getPlayer().getGender();
}
getPlayer() is an inherited function from AbstractPlayerInteraction.java, if you're wondering.
In your scripts do:
Code:
if (cm.getGender() == 0) {
// Receive male clothing
} else {
// Receive female clothing
}
Method 2: Using MapleCharacter in Scripts
Or, if you don't mind using getPlayer() in scripts you can do:
Code:
if (cm.getPlayer().getGender() == 0) {
// Receive male clothing
} else {
// Receive female clothing
}
without having to copy the first function.