-
Posts
298 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by sQu€€k
-
Windows Media Player burns only audio Cd's.
-
Password Changer Console Error
sQu€€k replied to sQu€€k's question in Request Server Development Help [Greek]
Οχι φίλε δεν είναι κάπως αλλιώς στο navicat .. Τι να πω.. Κανένας δεν μπορεί να με help -
provlhma me to database installer
sQu€€k replied to originalsimos's question in Request Server Development Help [Greek]
Στείλε μου ένα teamviewer να στο φτιάξω. -
Any Subclasses On Any Grand Master
sQu€€k replied to sQu€€k's question in Request Server Development Help [Greek]
Lock. -
[GR][Collection]All Created By Me...!!! [Updated]
sQu€€k replied to Cronia's topic in Server Development Discussion [Greek]
Nice share file!! Ta npc einai polu gamata!! -
Δεν δουλεύει το Attack
sQu€€k replied to FreakbuZz's question in Request Server Development Help [Greek]
Το δοκίμασες;; Αν δεν είναι αυτό τότε ξανακάνε compile τι να σου πω. -
Δεν δουλεύει το Attack
sQu€€k replied to FreakbuZz's question in Request Server Development Help [Greek]
Αυτό πρέπει να φταίει για το attack . Βάλε τα original skills και ξαναπροσπάθα. -
Δεν δουλεύει το Attack
sQu€€k replied to FreakbuZz's question in Request Server Development Help [Greek]
Έχεις αλλάξει χρόνο στα buff με πρόγραμμα; -
Password Changer Console Error
sQu€€k replied to sQu€€k's question in Request Server Development Help [Greek]
/* 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; } } -
Password Changer Console Error
sQu€€k replied to sQu€€k's question in Request Server Development Help [Greek]
Το έκανα update το post και ανέβασα photo . Δες την και πες μου. -
Γειά σας. 'Eχω βάλει ένα κώδικα για passwrod changer in game δουλεύει κανονικά αλλά οταν πατάω να αλλάξω το pass δεν γίνεται τίποτα και βγάζει error στο console και λέει could not update account of. Έχω l2jfrozen.. Photo: http://imageshack.us/photo/my-images/515/kyl.png/ Ο κώδικας /* 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; } }
-
Password Changer In Game
sQu€€k replied to sQu€€k's question in Request Server Development Help [Greek]
Φίλε εγώ απλά ζήτησα κάτι έτοιμο αν ήταν έτσι θα το έκανα μόνος μου.. Προφανώς δεν ξέρω πως γίνεται και δεν έχω τον χρόνο για να ασχοληθώ περισσότερο με κώδικες..Αν έχεις κάτι έτοιμο στείλε μου το. -
Password Changer In Game
sQu€€k replied to sQu€€k's question in Request Server Development Help [Greek]
Φίλε μου βγάζει error στο gameserver console και μου λέει οτι δεν μπορεί να κάνει update τον κωδικό (could not update account of ). -
Password Changer In Game
sQu€€k replied to sQu€€k's question in Request Server Development Help [Greek]
Φίλε μας δουλεύεις;; Σου ζήτησα να μου πεις τι να κάνω;; Αν ήταν έτσι θα το έκανα μόνος μου. Προφάνως θέλω έτοιμο .. -
Γειά σας. Ψάχνω για ένα Npc ή Command π.χ .changepass για l2j frozen Interlude.
-
Any Subclasses On Any Grand Master
sQu€€k replied to sQu€€k's question in Request Server Development Help [Greek]
bump -
Any Subclasses On Any Grand Master
sQu€€k replied to sQu€€k's question in Request Server Development Help [Greek]
bump -
Φίλε επειδή δεν έχω βάλει τίποτα custom στον server μου είπα να βάλω την dynasty που ανέβασες αλλά δεν θα έπρεπε να έχει κάποια syxtextures για να δουλέψει καλά γιατί εμένα μου δίχνει μαύρα τα εικονίδια και λευκή την στολή.. Ξαναλέω ότι δεν έχω βάλει custom και δεν ξέρω πως δουλεύουν αυτά γι'αυτό αν μπορείς εξήγησε μου ...
-
Any Subclasses On Any Grand Master
sQu€€k replied to sQu€€k's question in Request Server Development Help [Greek]
bump -
Any Subclasses On Any Grand Master
sQu€€k posted a question in Request Server Development Help [Greek]
Γειά σας. Ψάχνω έναν κώδικα που να μου επιτρέπει να επιλέγω οτι subclass θέλω απο κάθε Grand Master - High Priest για l2jfrozen Interlude. Έψαξα αρκετά και βρήκα έναν αλλά δεν είναι για frozen. Όποιος μπορεί ας βοηθήσει. Ευχαριστώ εκ των προτέρων. -
Clan Crest on Npc Plizzzzzz
sQu€€k replied to OldTrue14's question in Request Server Development Help [Greek]
Πρέπει να έχεις κάνει κάποιο λάθος εγώ το πέρασα κανονικά και δουλεύει. Ξαναπέρασε το και αν δεν δουλεύει στείλε ένα μήνυμα να μπώ με Teamviewer να στο περάσω εγώ τι να πω.. -
Lock!
-
Φίλε επειδή έψαχνα και εγώ ενα τέτοιο δοκίμασα τον κώδικα να δω αν δουλεύει. Το npc είναι μια χαρά αλλά όταν πατάω να αλλάξει το pass μου βγάζει error στο gameserver console "Could not update the password of account:di8en"
