Jump to content

maximilion2

Members
  • Posts

    1,019
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by maximilion2

  1. still searching for a c6 donate pvp server and still have 200 euro in my pocket -.-
  2. oxi den kaneis kati la8os etsi fenete to 80.. to 2106 p einai to login kai to 7777 p einai to gameserver prp na einai anoixta.. kai telos to 9014...
  3. [CORE] Added new commands for chars monitoring - Added command "admin_start_monitor_char" - Added command "admin_stop_monitor_char" - Added command "admin_block_char_packet" - Added command "admin_restore_char_packet" Read forum for more information www.l2jfrozen.com
  4. success chance from+20 is 50 now :D
  5. what? i don't want spent for mxc noob i want spent for l2
  6. no thanx no home made servers only dedicated
  7. oxi... ennow otan allazw to psw m kanei automata exit.. egw 8elw na kanei log out kai meta na ksanampenw me to neo psw.. logout oxi exit
  8. Kalhspera.. Exw ena password changer alla afou alaksw to psw me kanei exit... egw 8elw na to kanw afou alazei to psw na me kanei log out kai na ksanampenei...oxi exit kserete ti prepei na alaksw? /* This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package com.l2jfrozen.gameserver.model.actor.instance; import com.l2jfrozen.crypt.Base64; import com.l2jfrozen.gameserver.ai.CtrlIntention; import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed; import com.l2jfrozen.gameserver.network.serverpackets.LeaveWorld; import com.l2jfrozen.gameserver.network.serverpackets.MyTargetSelected; import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jfrozen.gameserver.network.serverpackets.ValidateLocation; import com.l2jfrozen.gameserver.templates.L2NpcTemplate; import com.l2jfrozen.util.database.L2DatabaseFactory; import java.security.MessageDigest; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.StringTokenizer; import javolution.text.TextBuilder; public class L2PasswordChangerInstance extends L2FolkInstance { public L2PasswordChangerInstance(int objectId, L2NpcTemplate template) { super(objectId, template); } public void onBypassFeedback(L2PcInstance player, String command) { if (command.startsWith("change_password")) { StringTokenizer st = new StringTokenizer(command); st.nextToken(); String currPass = null; String newPass = null; String repeatNewPass = null; try { if (st.hasMoreTokens()) { currPass = st.nextToken(); newPass = st.nextToken(); repeatNewPass = st.nextToken(); } else { player.sendMessage("Please fill in all the blanks before requesting for a password change."); return; } changePassword(currPass, newPass, repeatNewPass, player); } catch (StringIndexOutOfBoundsException e) { } } } public void onAction(L2PcInstance player) { if (!canTarget(player)) { return; } if (this != player.getTarget()) { player.setTarget(this); player.sendPacket(new MyTargetSelected(getObjectId(), 0)); player.sendPacket(new ValidateLocation(this)); } else if (!canInteract(player)) { player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this); } else { showHtmlWindow(player); } player.sendPacket(new ActionFailed()); } private void showHtmlWindow(L2PcInstance activeChar) { NpcHtmlMessage nhm = new NpcHtmlMessage(5); TextBuilder replyMSG = new TextBuilder(""); replyMSG.append("<html><title>L2 InStadia Account Manager</title>"); replyMSG.append("<body><center>"); replyMSG.append("To change your password:<br1> First fill in your current password and then your new!</font><br>"); replyMSG.append("Current Password: <edit var=\"cur\" width=100 height=15><br>"); replyMSG.append("New Password: <edit var=\"new\" width=100 height=15><br>"); replyMSG.append("Repeat New Password: <edit var=\"repeatnew\" width=100 height=15><br><br>"); replyMSG.append("<button value=\"Change Password\" action=\"bypass -h npc_" + getObjectId() + "_change_password $cur $new $repeatnew\" width=204 height=20 back=\"sek.cbui75\" fore=\"sek.cbui75\">"); replyMSG.append("</center></body></html>"); nhm.setHtml(replyMSG.toString()); activeChar.sendPacket(nhm); activeChar.sendPacket(new ActionFailed()); } public static boolean changePassword(String currPass, String newPass, String repeatNewPass, L2PcInstance activeChar) { if (newPass.length() < 5) { activeChar.sendMessage("The new password is too short!"); return false; } if (newPass.length() > 20) { activeChar.sendMessage("The new password is too long!"); return false; } if (!newPass.equals(repeatNewPass)) { activeChar.sendMessage("Repeated password doesn't match the new password."); return false; } Connection con = null; String password = null; try { MessageDigest md = MessageDigest.getInstance("SHA"); byte[] raw = currPass.getBytes("UTF-8"); raw = md.digest(raw); String currPassEncoded = Base64.encodeBytes(raw); con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("SELECT password FROM accounts WHERE login=?"); statement.setString(1, activeChar.getAccountName()); ResultSet rset = statement.executeQuery(); while (rset.next()) { password = rset.getString("password"); } rset.close(); statement.close(); byte[] password2 = null; if (currPassEncoded.equals(password)) { password2 = newPass.getBytes("UTF-8"); password2 = md.digest(password2); PreparedStatement statement2 = con.prepareStatement("UPDATE accounts SET password=? WHERE login=?"); statement2.setString(1, Base64.encodeBytes(password2)); statement2.setString(2, activeChar.getAccountName()); statement2.executeUpdate(); statement2.close(); activeChar.sendMessage("Congratulations! Your password has been changed succesfully. You will now be disconnected for security reasons. Please login again!"); try { Thread.sleep(3000L); } catch (Exception e) { } activeChar.deleteMe(); activeChar.sendPacket(new LeaveWorld()); } else { activeChar.sendMessage("The current password you've inserted is incorrect! Please try again!"); return password2 != null; } } catch (Exception e) { _log.warning("could not update the password of account: " + activeChar.getAccountName()); } finally { try { if (con != null) con.close(); } catch (SQLException e) { _log.warning("Failed to close database connection!"); } } return true; } }
  9. okz thanx problem solved opwte topic locked ;)
  10. kai vrhka kai sto optios file auto einai? # Show the lvl and type of agro mobs? ShowNpcLevel = False
  11. # Alternative mob behavior in peace zones # Default = True; Set to False to prevent mobs from auto-agro against players in peace zones AltMobAgroInPeaceZone = True
  12. sto frozen epsaksa mesa ston folder t functions kai den to vrhka pou8ena... mhpws einai sto head?
  13. exw epishs l2jbrasil kai l2jdario :P
  14. ti pack xrhsimopoieis?? egw epsaxa sto sigmo,acis,equal kai pou8ena omg
  15. einai to last rev ths frozen... sto forum lene pws leitourgei mia xara lol
  16. mporeis na m peis px ti leei? show mob level?
  17. i have full off files but is c4 :(
  18. plaka kaneis???? pws 8es na anikseis server efwswn den ksereis to pio aplo pragma p yparxei sto developing? :oooooooooooo
  19. mporeis na katevasis apo edw to last rev: http://www.4shared.com/folder/Qcpk867R/L2jFrozenCompiled_Version_933.html
  20. jajajaja LOOOOOOOOOOL can't stop laughing xD :P BTW if someone wants to dosS you then nothing can save you from the anger of a powerful hacker ;o
  21. Kalhspera.. 8a mporouse na m pei kapios an yparxei kapio sql arxeio p na to vazw sthn navicat kai na vazei ola ta level twn mob? ennow sto game px na fenete panw apo ta mob to level tous px: Gremlin kai title Lv 1*
×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock