Here's a release that lets you make someone a donor using a command in game.
Tested and working =)
If you're going to use this.
Give me credits please. Thank you
Credits goes to :
Me ( For making this )
nejevoli ( For giving me the idea and testing )
Add this to MapleCharacter.java
Btw, check the donator column in your MySQL and change donator to yours. Example = donor. In both statementsCode:public void makeDonor() { client.getSession().close(); try { Connection con = DatabaseConnection.getConnection(); PreparedStatement ps = con.prepareStatement("UPDATE characters SET donator = ? WHERE accountid = ?"); ps.setInt(1, 1); ps.setInt(2, accountid); ps.executeUpdate(); ps.close(); } catch (SQLException ex) { log.error("Error while changing status", ex); } } public void unDonor() { client.getSession().close(); try { Connection con = DatabaseConnection.getConnection(); PreparedStatement ps = con.prepareStatement("UPDATE characters SET donator = ? WHERE accountid = ?"); ps.setInt(1, 0); ps.setInt(2, accountid); ps.executeUpdate(); ps.close(); } catch (SQLException ex) { log.error("Error while changing status", ex); } }
Add this to CommandProcessor.java
Use !undonor to make someone a normal playerCode:} else if (splitted[0].equals("!donor")) { MapleCharacter target = cserv.getPlayerStorage().getCharacterByName(splitted[1]); target.makeDonor(); mc.dropMessage("Changed donor status for " + target) ; } else if (splitted[0].equals("!undonor")) { MapleCharacter target = cserv.getPlayerStorage().getCharacterByName(splitted[1]); target.unDonor(); mc.dropMessage("Changed donor status for " + target) ;
!donor to make someone a donor



Reply With Quote

