I was bored last night, so decided to make an Achievement thing for fame. Every 10 fames someone gets, a notice will come up congratulating and he/she will get NX.
The NX the person gets is 500 * their fame. So if they get 100 fame, they will get 50,000 NX. This is EASILY customizable though. Well here it is:

In GiveFameHandler.java add the following to the top:
Code:
import java.rmi.RemoteException;
import net.sf.odinms.net.MaplePacket;
Now below:
Code:
target.getClient().getSession().write(MaplePacketCreator.receiveFame(mode, c.getPlayer().getName()));
add:
Code:
if (target.getFame() % 10 == 0 && target.getFame() > 0) {
//Fame Achievement by Howei
MaplePacket mp = MaplePacketCreator.serverNotice(6, "[Achievement] " + target.getName() + " has gained the " + target.getFame() + " fame achievement! +" + formatNumber(500 * target.getFame()) + " NX Cash");
target.modifyCSPoints(2,500 * target.getFame());
try {
target.getClient().getChannelServer().getWorldInterface().broadcastMessage(null, mp.getBytes());
} catch (RemoteException e) {
target.getClient().getChannelServer().reconnectWorld();
}
}
Now below the second to last
add:
Code:
private String formatNumber(int x) {
//Format Number by Howei...took me awhile with my limited Java knowledge :( (I wrote in C++ first then translated)
String before = Integer.toString(x);
String result = "";
int n = 0;
for (int i = 0; i < before.length(); i++) {
result = before.charAt((before.length() - 1) - i) + result;
if (n == 2 && (i + 1) != before.length()) {
result = "," + result;
n = -1;
}
n++;
}
return result;
}
What the last code does is add commas to the amount of NX awarded so it looks better in the notice. The last code was the longest to make...
-Howei
EDIT: There's just one exploit to this...if PlayerA has 20 fame, he could pay PlayerB to defame him then pay PlayerC to fame him and get the NX over again.