Jump to content

LioNa

Members
  • Posts

    22
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by LioNa

  1. You can also put without adding it to the table but then when you restart it puts the normal inventory sete
  2. Sure but it may have to change some parts of the code
  3. Hi all here you have a command to increase the inventory of Site = Slot if your PJ has 100 slot in your inventory and put the commands you have increases 20 slot for more items in the inventory. Imagen : Codigo : ### Eclipse Workspace Patch 1.0 #P L2J_Server Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 5708) +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy) @ -286,9 +295,9 @@ private static final String DELETE_SKILL_SAVE = "DELETE FROM character_skills_save WHERE charId=? AND class_index=?"; // Character Character SQL String Definitions: - private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,fame,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,title_color,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,newbie,nobless,power_grade,createTime) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; - private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,language=? WHERE charId=?"; - private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, title_color, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createTime,language FROM characters WHERE charId=?"; + private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,fame,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,title_color,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,newbie,nobless,power_grade,createTime,moreslot) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; + private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,language=?,moreslot=? WHERE charId=?"; + private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, title_color, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createTime,language,moreslot FROM characters WHERE charId=?"; // Character Teleport Bookmark: private static final String INSERT_TP_BOOKMARK = "INSERT INTO character_tpbookmark (charId,Id,x,y,z,icon,tag,name) values (?,?,?,?,?,?,?,?)"; @@ -538,6 +580,7 @@ private boolean _recoTwoHoursGiven = false; private final PcInventory _inventory = new PcInventory(this); + private int _moreslot = 0; private PcWarehouse _warehouse; private PcRefund _refund; @@ -7026,6 +7122,10 @@ statement.setInt(35, isNoble() ? 1 :0); statement.setLong(36, 0); statement.setLong(37,getCreateTime()); + statement.setInt(38, 0); statement.executeUpdate(); statement.close(); @@ -7224,6 +7324,16 @@ // Language player.setLang(rset.getString("language")); + player.setMoreSlot(rset.getInt("moreslot")); + // Retrieve the name and ID of the other characters assigned to this account. PreparedStatement stmt = con.prepareStatement("SELECT charId, char_name FROM characters WHERE account_name=? AND charId<>?"); stmt.setString(1, player._accountName); @@ -7665,7 +7775,11 @@ statement.setInt(50, getBookMarkSlot()); statement.setInt(51, getVitalityPoints()); statement.setString(52, getLang()); - statement.setInt(53, getObjectId()); + statement.setInt(53, getMoreSlot()); + statement.setInt(54, getObjectId()); statement.execute(); statement.close(); @@ -12206,56 +12342,98 @@ { int ivlim; if (isGM()) - ivlim = Config.INVENTORY_MAXIMUM_GM; + ivlim = Config.INVENTORY_MAXIMUM_GM + _moreslot; else if (getRace() == Race.Dwarf) - ivlim = Config.INVENTORY_MAXIMUM_DWARF; + ivlim = Config.INVENTORY_MAXIMUM_DWARF + _moreslot; else - ivlim = Config.INVENTORY_MAXIMUM_NO_DWARF; + ivlim = Config.INVENTORY_MAXIMUM_NO_DWARF + _moreslot; ivlim += (int)getStat().calcStat(Stats.INV_LIM, 0, null, null); return ivlim; } + public void setMoreSlot(int quantity) + { + _moreslot += quantity; + } + + public int getMoreSlot() + { + return _moreslot; + } + Let data\scripts\handlers\voicedcommandhandlers -> and create a file called slotinventario.java and paste this code /* * 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */ package handlers.voicedcommandhandlers; import com.l2jserver.gameserver.handler.IVoicedCommandHandler; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.network.clientpackets.Say2; import com.l2jserver.gameserver.network.serverpackets.CreatureSay; import com.l2jserver.gameserver.network.serverpackets.ExPrivateStoreSetWholeMsg; import com.l2jserver.gameserver.network.serverpackets.ExStorageMaxCount; import com.l2jserver.gameserver.network.serverpackets.SocialAction; /** * @author Lobillo */ public class slotinventario implements IVoicedCommandHandler { private static final String[] _voicedCommands = { "buyslot" }; /** * * @see com.l2jserver.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(java.lang.String, com.l2jserver.gameserver.model.actor.instance.L2PcInstance, java.lang.String) */ public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params) { if (command.equalsIgnoreCase("buyslot")) { if (activeChar.getLevel() < 40) { CreatureSay e = new CreatureSay(activeChar.getObjectId(), Say2.PARTY, "NAME", "Tienes que ser LvL 40 o mas!"); activeChar.sendPacket( e ); return true; } else if(activeChar.getInventory().getItemByItemId(3470) != null && activeChar.getInventory().getItemByItemId(3470).getCount() >= 100) { activeChar.getInventory().destroyItemByItemId("buyslot", 3470, 100, activeChar, activeChar.getTarget()); activeChar.setMoreSlot(20); activeChar.sendPacket(new ExStorageMaxCount(activeChar)); activeChar.sendPacket(new ExPrivateStoreSetWholeMsg(activeChar)); activeChar.broadcastPacket(new SocialAction(activeChar,2122)); CreatureSay i = new CreatureSay(activeChar.getObjectId(), Say2.BATTLEFIELD, "NAME", "Tienes +20 Slots en el Inventario!"); activeChar.broadcastUserInfo(); activeChar.sendPacket( i ); } else { CreatureSay o = new CreatureSay(activeChar.getObjectId(), Say2.TELL, "NAME", "Tienes que tener 100 Event-Apiga!"); activeChar.sendPacket( o ); return true; } } return true; } /** * * @see com.l2jserver.gameserver.handler.IVoicedCommandHandler#getVoicedCommandList() */ public String[] getVoicedCommandList() { return _voicedCommands; } } Let data\scripts\handlers -> and edit the file -> MasterHandler.java import handlers.voicedcommandhandlers.stats; +import handlers.voicedcommandhandlers.slotinventario; + VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new slotinventario()); VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new stats()); SQL Create a SQL file and get this and add it to navicat ALTER TABLE characters ADD moreslot int(10) NOT NULL DEFAULT 0 and finally you have to put .buyslot Creaditos -> Lobillo
  4. I and implemented in the Community Board :D
  5. Hi all Well I leave to give an item that gives you double clip and other +15 +30 Buff Is Item is BiggBoss but I have one little and edited and removed some things. http://www.mediafire.com/?n4f47wb4cc6h62w
  6. Well I bring the drop of mobs panel for darule player is the one I e areglao little credits are sullos but as people get erroes wing and lacks things fit and finish and aregarlo etc. Imagenes : game\data\scripts\handlers -> MasterHandler import handlers.bypasshandlers.VoiceCommand; import handlers.bypasshandlers.Wear; +import handlers.bypasshandlers.DropInfo; %%%%%%%%%%%%%%%%%%%%%%% BypassHandler.getInstance().registerBypassHandler(new VoiceCommand()); BypassHandler.getInstance().registerBypassHandler(new Wear()); + BypassHandler.getInstance().registerBypassHandler(new DropInfo()); L2jserver Freya http://www.mediafire.com/?yte7gd4cqml778l L2jserver H5 http://www.mediafire.com/?8hldd6v5csbke4d :) :)
  7. Well I bring the drop of mobs panel for darule player is the one I e areglao little credits are sullos but as people get erroes wing and lacks things fit and finish and aregarlo etc. Imagenes : game\data\scripts\handlers -> MasterHandler import handlers.bypasshandlers.VoiceCommand; import handlers.bypasshandlers.Wear; +import handlers.bypasshandlers.DropInfo; %%%%%%%%%%%%%%%%%%%%%%% BypassHandler.getInstance().registerBypassHandler(new VoiceCommand()); BypassHandler.getInstance().registerBypassHandler(new Wear()); + BypassHandler.getInstance().registerBypassHandler(new DropInfo()); http://www.mediafire.com/?yte7gd4cqml778l
  8. next version: Contains the window to sell items to sell buff. Areglado error when you wake sete change the name and title color as you had before selling buff. etc sorry for my English
  9. Well this is a PJ that sells its buff - and adapted it for Freya l2jserver ######################################### ######### Algunas Cosillas Mejoradas ######### ######################################### 1ª | Command Buff to Sell .SellBuffs 2ª | New Command to Rise .CancelSellBuffs 3ª | You can change the title from l2jmods.properties 4ª | When you see Buff and no need to remove the Target and give again and give him only with k leaves you to buff new tab. 5ª | Fixed error Adena http://img22.imageshack.us/img22/9148/shot00007lj.jpg http://img4.imageshack.us/img4/7599/shot00008os.jpg Esto va en Eclipse =================================================================== --- head-src/com/l2jserver/Config.java +++ head-src/com/l2jserver/Config.java public static boolean L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE; + public static String ADD_TITULO_PJ_SELLBUFS; =================================================================== L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingPrivate", "False")); + ADD_TITULO_PJ_SELLBUFS = L2JModSettings.getProperty("TituloPjSellBuffs", "BUFF"); =================================================================== --- head-src/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java +++ head-src/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java @@ -31,6 +31,7 @@ import java.util.concurrent.locks.ReentrantLock; import java.util.logging.Level; +import javolution.text.TextBuilder; import javolution.util.FastList; import javolution.util.FastMap; import com.l2jserver.Config; @@ -451,6 +452,8 @@ private boolean _noble = false; private boolean _hero = false; + private boolean _sellbuff = false; + private int _buffprize = 0; + private String _oldtitle = ""; + private int _oldnamecolor = 0; + /** The L2FolkInstance corresponding to the last Folk wich one the player talked. */ private L2FolkInstance _lastFolkNpc = null; @@ -2375,6 +2378,9 @@ */ public void standUp() { + if(isSellBuff()) + return; + if (L2Event.active && eventSitForced) { sendMessage("A dark force beyond your mortal understanding makes your knees to shake when you try to stand up ..."); @@ -3945,6 +3951,42 @@ // Target the new L2Object (add the target to the L2PcInstance _target, _knownObject and L2PcInstance to _KnownObject of the L2Object) super.setTarget(newTarget); + + L2PcInstance t = null; + if(newTarget instanceof L2PcInstance) + t = (L2PcInstance) newTarget; + + if(t != null){ + if(t.isSellBuff() && t != this){ + TextBuilder tb = new TextBuilder(); + NpcHtmlMessage n = new NpcHtmlMessage(0); + + tb.append("<html><body>"); + tb.append("<br><br>"); + tb.append("<center>Hola <font color=LEVEL>Campesin@</font> Quieres Buff!</center>"); + tb.append("<br><center>Mis Buff Cuestan: <font color=LEVEL>"+t.getBuffPrize()+"</font> Adenas cada uno!</center><br><center><table><tr>"); + + L2Skill[] skills = t.getAllSkills(); + FastList<L2Skill> ba = new FastList<L2Skill>(); + + for(L2Skill s : skills){ + if(s == null) + continue; + + + if(s.getSkillType() == L2SkillType.BUFF && s.isActive() && s.getId() != 970 && s.getId() != 357 && s.getId() != 1323 && s.getId() != 327 && s.getId() != 1325 && s.getId() != 1326 && s.getId() != 1327) + ba.add(s); + } + + for(L2Skill p : ba){ + tb.append("<td><button action=\"bypass -h buff "+p.getId()+"\" width=32 height=32 back=\"Icon.skill"+p.getId()+"\" fore=\"Icon.skill"+p.getId()+"\"></td>"); + tb.append("<td><button value=\""+p.getName()+"\" action=\"bypass -h buff "+p.getId()+"\" width=200 height=32 back=\"L2UI_CT1.Windows_DF_Drawer_Bg_Darker\" fore=\"L2UI_CT1.Windows_DF_Drawer_Bg_Darker\"></td>"); + tb.append("<td><button action=\"bypass -h buff "+p.getId()+"\" width=32 height=32 back=\"Icon.skill"+p.getId()+"\" fore=\"Icon.skill"+p.getId()+"\"></td></tr><tr>"); + } + + tb.append("</tr></table></center></body></html>"); + + n.setHtml(tb.toString()); + sendPacket(n); + } + } } /** @@ -8214,7 +8256,23 @@ } return true; } + public boolean isSellBuff(){ + return _sellbuff; + } + + public void setSellBuff(boolean j){ + _sellbuff = j; + } + + public int getBuffPrize(){ + return _buffprize; + } + + public void setBuffPrize(int x){ + _buffprize = x; + } + + public String getOldTitle() + { + return _oldtitle; + } + + public int getOldNameColor() + { + return _oldnamecolor; + } + + public void setOldTitle(String title) + { + _oldtitle = title; + } + + public void setOldNameColor(int color) + { + _oldnamecolor = color; + } + public boolean isNoble() { return _noble; =================================================================== --- head-src/com/l2jserver/gameserver/clientpackets/RequestBypassToServer.java +++ head-src/com/l2jserver/gameserver/clientpackets/RequestBypassToServer.java @@ -18,16 +18,20 @@ */ package com.l2jserver.gameserver.network.clientpackets; import java.util.StringTokenizer; import java.util.logging.Level; import java.util.logging.Logger; import com.l2jserver.Config; import com.l2jserver.gameserver.ai.CtrlIntention; import com.l2jserver.gameserver.communitybbs.CommunityBoard; import com.l2jserver.gameserver.datatables.AdminCommandAccessRights; +import com.l2jserver.gameserver.datatables.SkillTable; import com.l2jserver.gameserver.handler.AdminCommandHandler; import com.l2jserver.gameserver.handler.BypassHandler; import com.l2jserver.gameserver.handler.IAdminCommandHandler; import com.l2jserver.gameserver.handler.IBypassHandler; import com.l2jserver.gameserver.model.L2CharPosition; import com.l2jserver.gameserver.model.L2Object; +import com.l2jserver.gameserver.model.L2Skill; import com.l2jserver.gameserver.model.L2World; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.instance.L2MerchantSummonInstance; @@ -85,6 +89,57 @@ { comeHere(activeChar); } + else if(_command.startsWith("buff")){ + String[] val = _command.split(" "); + String x = val[1]; + int id = Integer.parseInt(x); + L2PcInstance target = null; + + if(activeChar.getTarget() instanceof L2PcInstance) + target = (L2PcInstance) activeChar.getTarget(); + + if(target == null) + return; + + if(activeChar.getInventory().getItemByItemId(57) == null || activeChar.getInventory().getItemByItemId(57).getCount() < ((L2PcInstance) activeChar.getTarget()).getBuffPrize()){ + activeChar.sendMessage("* No tienes adena!"); + return; + } + + + try{ + L2Skill s = SkillTable.getInstance().getInfo(id, 3); + s.getEffects(activeChar, activeChar); + activeChar.sendMessage("* Has Comprado: "+s.getName()); + activeChar.getInventory().destroyItemByItemId("", 57, target.getBuffPrize(), activeChar, null); + target.getInventory().addItem("", 57, target.getBuffPrize(), target, null); + TextBuilder tb = new TextBuilder(); + NpcHtmlMessage n = new NpcHtmlMessage(0); + + tb.append("<html><body>"); + tb.append("<br><br>"); + tb.append("<center>Hola <font color=LEVEL>Campesin@</font> Quieres Buff!</center>"); + tb.append("<br><center>Mis Buff Cuestan: <font color=LEVEL>"+target.getBuffPrize()+"</font> Adenas cada uno!</center><br><center><table><tr>"); + + + L2Skill[] skills = target.getAllSkills(); + FastList<L2Skill> ba = new FastList<L2Skill>(); + + for(L2Skill skill : skills){ + if(skill == null) + continue; + + + if(skill.getSkillType() == L2SkillType.BUFF && skill.isActive() && skill.getId() != 970 && skill.getId() != 357 && skill.getId() != 1323 && skill.getId() != 327 && skill.getId() != 1325 && skill.getId() != 1326 && skill.getId() != 1327) + ba.add(skill); + } + + for(L2Skill p : ba){ + tb.append("<td><button action=\"bypass -h buff "+p.getId()+"\" width=32 height=32 back=\"Icon.skill"+p.getId()+"\" fore=\"Icon.skill"+p.getId()+"\"></td>"); + tb.append("<td><button value=\""+p.getName()+"\" action=\"bypass -h buff "+p.getId()+"\" width=200 height=32 back=\"L2UI_CT1.Windows_DF_Drawer_Bg_Darker\" fore=\"L2UI_CT1.Windows_DF_Drawer_Bg_Darker\"></td>"); + tb.append("<td><button action=\"bypass -h buff "+p.getId()+"\" width=32 height=32 back=\"Icon.skill"+p.getId()+"\" fore=\"Icon.skill"+p.getId()+"\"></td></tr><tr>"); + } + + tb.append("</tr></table></center></body></html>"); + + n.setHtml(tb.toString()); + activeChar.sendPacket(n); + } + catch(Exception e){ + e.printStackTrace(); + } + } + else if(_command.startsWith("actr")){ + String l = _command.substring(5); + + int p = 0; + + p = Integer.parseInt(l); + + + if(p == 0) + return; + + if(p > 2000000000){ + activeChar.sendMessage("* Te has colado el limite de Adena!"); + return; + } + + activeChar.setBuffPrize(p); + activeChar.sitDown(); + activeChar.setTeam(1); + activeChar.setSellBuff(true); + activeChar.setOldTitle(activeChar.getTitle()); + activeChar.setOldNameColor(activeChar.getAppearance().getNameColor()); + /*activeChar.getAppearance().setNameColor(0x55155);*/ + activeChar.getAppearance().setNameColor(99, 22, 11); + activeChar.setTitle(Config.ADD_TITULO_PJ_SELLBUFS); + activeChar.broadcastUserInfo(); + activeChar.broadcastTitleInfo(); + } else if (_command.startsWith("player_help ")) { playerHelp(activeChar, _command.substring(12)); Cuando pongamos este codigo guardams y copilamos. Luego bamos a Ruta --> game\data\scripts\handlers y abrimos el MasterHandler y añadimos y guardamos y luego bamos a ruta --> game\data\scripts\handlers\voicedcommandhandlers y creamos un archivo llamado --> sellbuff y le añadimos el codigo Luego bamos a ruta -> game\config y abrimas el archivo l2jmods.properties y le agregamos EnableWarehouseSortingPrivate = False + +########################### +#### TITULO SELLBUFFS ##### +########################### +# TITULO PARA VENDER BUFF +TituloPjSellBuffs = * VENDO BUFF * Creditos : Lobillo , LioNa and Save and you're all set if it works do not forget to give the + sorry with my English
  10. game\data\scripts\handlers\voicedcommandhandlers -> Create ChangePassword.java /* * 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */ package handlers.voicedcommandhandlers; import java.security.MessageDigest; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.StringTokenizer; import java.util.logging.Level; import com.l2jserver.Base64; import com.l2jserver.L2DatabaseFactory; import com.l2jserver.gameserver.handler.IVoicedCommandHandler; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; public class ChangePassword implements IVoicedCommandHandler { private static final String[] _voicedCommands = { "changepassword" }; private static final int MIN = 6; // minimum character lengths private static final int MAX = 30; // miaximum character lengths @Override public boolean useVoicedCommand(final String command, final L2PcInstance activeChar, final String target) { if (command.equalsIgnoreCase("changepassword") && target != null) { final StringTokenizer st = new StringTokenizer(target); try { String curpass = null, newpass = null, repeatnewpass = null; if (st.hasMoreTokens()) curpass = st.nextToken(); if (st.hasMoreTokens()) newpass = st.nextToken(); if (st.hasMoreTokens()) repeatnewpass = st.nextToken(); if (!(curpass == null || newpass == null || repeatnewpass == null)) { if (!newpass.equals(repeatnewpass)) { activeChar.sendMessage("Your repeated password must be the same as new password!"); return false; } if (newpass.length() < MIN) { activeChar.sendMessage("Your password must have min: " + MIN + " chars!"); return false; } if (newpass.length() > MAX) { activeChar.sendMessage("Your password can't have more than " + MAX + " chars!"); return false; } final MessageDigest md = MessageDigest.getInstance("SHA"); byte[] raw = curpass.getBytes("UTF-8"); raw = md.digest(raw); final String curpassEnc = Base64.encodeBytes(raw); String pass = null; int passUpdated = 0; Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); final PreparedStatement statement = con.prepareStatement("SELECT password FROM accounts WHERE login=?"); statement.setString(1, activeChar.getAccountName()); final ResultSet rset = statement.executeQuery(); if (rset.next()) pass = rset.getString("password"); rset.close(); statement.close(); if (curpassEnc.equals(pass)) { byte[] password = newpass.getBytes("UTF-8"); password = md.digest(password); final PreparedStatement ps = con.prepareStatement("UPDATE accounts SET password=? WHERE login=?"); ps.setString(1, Base64.encodeBytes(password)); ps.setString(2, activeChar.getAccountName()); passUpdated = ps.executeUpdate(); ps.close(); _log.info("Character " + activeChar.getName() + " has changed his password from " + curpassEnc + " to " + Base64.encodeBytes(password)); if (passUpdated > 0) activeChar.sendMessage("Your password was updated successfully!"); else activeChar.sendMessage("Your password wasn't changed due troubles!"); } else { L2DatabaseFactory.close(con); activeChar.sendMessage("Passess not matches."); return false; } } catch (final Exception e) { } finally { L2DatabaseFactory.close(con); } } else { activeChar.sendMessage("Wrong command structure! Use: .changepassword currendPassword newPassword retypePassword"); return false; } } catch (final Exception e) { activeChar.sendMessage("A problem occured while changing password!"); _log.log(Level.WARNING, "", e); } } else { activeChar.sendMessage("Wrong command structure! Use: .changepassword currendPassword newPassword retypePassword"); return false; } return true; } @Override public String[] getVoicedCommandList() { return _voicedCommands; } }
  11. ami I go and I have Freya tells me something went wrong
  12. messages because you do them without people like me will not see
  13. Wenas this effect is to put the players who are selling or buying or Offline Crafteando. Effects that can be placed -> #-1 BLEEDING #-2 POISON #-3 REDCIRCLE #-4 ICE #-5 WIND #-6 FEAR #-7 STUN #-8 SLEEP #-9 MUTED #-10 ROOT #-11 HOLD_1 #-12 HOLD_2 #-13 BIG_HEAD #-14 FLAME #-15 GROW #-16 FLOATING_ROOT #-17 DANCE_STUNNED #-18 FIREROOT_STUN #-19 STEALTH #-20 IMPRISIONING_1 #-21 IMPRISIONING_2 #-22 MAGIC_CIRCLE #-23 ICE2 #-24 VITALITY #-25 REAL_TARGET #-26 DEATH_MARK #-27 SKULL_FEAR #-28 S_INVINCIBLE #-29 S_AIR_STUN #-30 S_AIR_ROOT #-31 S_BAGUETTE_SWORD #-32 S_YELLOW_AFFRO #-33 S_PINK_AFFRO #-34 S_BLACK_AFFRO #-35 S_STIGMA_SHILIEN #-36 S_STAKATOROOT #-37 S_FREEZING #-38 S_VESPER #-39 E_AFRO_1 #-40 E_AFRO_2 #-41 E_AFRO_3 #-42 E_EVASWRATH #-43 E_HEADPHONE #-44 E_VESPER_1 #-45 E_VESPER_2 #-46 E_VESPER_3 Ruta del archivo --> \game\config\l2jmods.properties # ----------------------------------------- # Offline Effecto - # ----------------------------------------- # Add effect when entering offline mode. # Default: False OfflineTradeEffecto = True #-1 BLEEDING |#-16 FLOATING_ROOT |#-31 S_BAGUETTE_SWORD |#-46 E_VESPER_3 #-2 POISON |#-17 DANCE_STUNNED |#-32 S_YELLOW_AFFRO #-3 REDCIRCLE |#-18 FIREROOT_STUN |#-33 S_PINK_AFFRO #-4 ICE |#-19 STEALTH |#-34 S_BLACK_AFFRO #-5 WIND |#-20 IMPRISIONING_1 |#-35 S_STIGMA_SHILIEN #-6 FEAR |#-21 IMPRISIONING_2 |#-36 S_STAKATOROOT #-7 STUN |#-22 MAGIC_CIRCLE |#-37 S_FREEZING #-8 SLEEP |#-23 ICE2 |#-38 S_VESPER #-9 MUTED |#-24 VITALITY |#-39 E_AFRO_1 #-10 ROOT |#-25 REAL_TARGET |#-40 E_AFRO_2 #-11 HOLD_1 |#-26 DEATH_MARK |#-41 E_AFRO_3 #-12 HOLD_2 |#-27 SKULL_FEAR |#-42 E_EVASWRATH #-13 BIG_HEAD |#-28 S_INVINCIBLE |#-43 E_HEADPHONE #-14 FLAME |#-29 S_AIR_STUN |#-44 E_VESPER_1 #-15 GROW |#-30 S_AIR_ROOT |#-45 E_VESPER_2 OfflineEffectoId = 24 Ruta --> java/com/l2jserver/Config.java public static boolean L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE; + public static boolean OFFLINE_TRADE_EFFECTO; + public static int OFFLINE_EFFECTO_ID; L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE = Boolean.valueOf(L2JModSettings.getProperty("EnableWarehouseSortingPrivate", "False")); + OFFLINE_TRADE_EFFECTO = Boolean.parseBoolean(smartCB.getProperty("OfflineTradeEffecto", "False")); + OFFLINE_EFFECTO_ID = Integer.parseInt(smartCB.getProperty("OfflineEffectoId", "1")); Ruta --> java/com/l2jserver/gameserver/datatables/OfflineTradeTable.java player.setOfflineStartTime(time); + if (Config.OFFLINE_TRADE_EFFECTO) + { + switch(Config.OFFLINE_EFFECTO_ID) + { + case 1: + player.startAbnormalEffect(AbnormalEffect.BLEEDING); + break; + case 2: + player.startAbnormalEffect(AbnormalEffect.POISON); + break; + case 3: + player.startAbnormalEffect(AbnormalEffect.REDCIRCLE); + break; + case 4: + player.startAbnormalEffect(AbnormalEffect.ICE); + break; + case 5: + player.startAbnormalEffect(AbnormalEffect.WIND); + break; + case 6: + player.startAbnormalEffect(AbnormalEffect.FEAR); + break; + case 7: + player.startAbnormalEffect(AbnormalEffect.STUN); + break; + case 8: + player.startAbnormalEffect(AbnormalEffect.SLEEP); + break; + case 9: + player.startAbnormalEffect(AbnormalEffect.MUTED); + break; + case 10: + player.startAbnormalEffect(AbnormalEffect.ROOT); + break; + case 11: + player.startAbnormalEffect(AbnormalEffect.HOLD_1); + break; + case 12: + player.startAbnormalEffect(AbnormalEffect.HOLD_2); + break; + case 13: + player.startAbnormalEffect(AbnormalEffect.BIG_HEAD); + break; + case 14: + player.startAbnormalEffect(AbnormalEffect.FLAME); + break; + case 15: + player.startAbnormalEffect(AbnormalEffect.GROW); + break; + case 16: + player.startAbnormalEffect(AbnormalEffect.FLOATING_ROOT); + break; + case 17: + player.startAbnormalEffect(AbnormalEffect.DANCE_STUNNED); + break; + case 18: + player.startAbnormalEffect(AbnormalEffect.FIREROOT_STUN); + break; + case 19: + player.startAbnormalEffect(AbnormalEffect.STEALTH); + break; + case 20: + player.startAbnormalEffect(AbnormalEffect.IMPRISIONING_1); + break; + case 21: + player.startAbnormalEffect(AbnormalEffect.IMPRISIONING_2); + break; + case 22: + player.startAbnormalEffect(AbnormalEffect.MAGIC_CIRCLE); + break; + case 23: + player.startAbnormalEffect(AbnormalEffect.ICE2); + break; + case 24: + player.startAbnormalEffect(AbnormalEffect.VITALITY); + break; + case 25: + player.startAbnormalEffect(AbnormalEffect.REAL_TARGET); + break; + case 26: + player.startAbnormalEffect(AbnormalEffect.DEATH_MARK); + break; + case 27: + player.startAbnormalEffect(AbnormalEffect.SKULL_FEAR); + break; + case 28: + player.startAbnormalEffect(AbnormalEffect.S_INVINCIBLE); + break; + case 29: + player.startAbnormalEffect(AbnormalEffect.S_AIR_STUN); + break; + case 30: + player.startAbnormalEffect(AbnormalEffect.S_AIR_ROOT); + break; + case 31: + player.startAbnormalEffect(AbnormalEffect.S_BAGUETTE_SWORD); + break; + case 32: + player.startAbnormalEffect(AbnormalEffect.S_YELLOW_AFFRO); + break; + case 33: + player.startAbnormalEffect(AbnormalEffect.S_PINK_AFFRO); + break; + case 34: + player.startAbnormalEffect(AbnormalEffect.S_BLACK_AFFRO); + break; + case 35: + player.startAbnormalEffect(AbnormalEffect.S_STIGMA_SHILIEN); + break; + case 36: + player.startAbnormalEffect(AbnormalEffect.S_STAKATOROOT); + break; + case 37: + player.startAbnormalEffect(AbnormalEffect.S_FREEZING); + break; + case 38: + player.startAbnormalEffect(AbnormalEffect.S_VESPER); + break; + case 39: + player.startAbnormalEffect(AbnormalEffect.E_AFRO_1); + break; + case 40: + player.startAbnormalEffect(AbnormalEffect.E_AFRO_2); + break; + case 41: + player.startAbnormalEffect(AbnormalEffect.E_AFRO_3); + break; + case 42: + player.startAbnormalEffect(AbnormalEffect.E_EVASWRATH); + break; + case 43: + player.startAbnormalEffect(AbnormalEffect.E_HEADPHONE); + break; + case 44: + player.startAbnormalEffect(AbnormalEffect.E_VESPER_1); + break; + case 45: + player.startAbnormalEffect(AbnormalEffect.E_VESPER_2); + break; + case 46: + player.startAbnormalEffect(AbnormalEffect.E_VESPER_3); + break; + + } + } Ruta --> java/com/l2jserver/gameserver/network/L2GameClient.java player.getAppearance().setNameColor(Config.OFFLINE_NAME_COLOR); player.broadcastUserInfo(); } + if (Config.OFFLINE_TRADE_EFFECTO) + { + switch(Config.OFFLINE_EFFECTO_ID) + { + case 1: + player.startAbnormalEffect(AbnormalEffect.BLEEDING); + break; + case 2: + player.startAbnormalEffect(AbnormalEffect.POISON); + break; + case 3: + player.startAbnormalEffect(AbnormalEffect.REDCIRCLE); + break; + case 4: + player.startAbnormalEffect(AbnormalEffect.ICE); + break; + case 5: + player.startAbnormalEffect(AbnormalEffect.WIND); + break; + case 6: + player.startAbnormalEffect(AbnormalEffect.FEAR); + break; + case 7: + player.startAbnormalEffect(AbnormalEffect.STUN); + break; + case 8: + player.startAbnormalEffect(AbnormalEffect.SLEEP); + break; + case 9: + player.startAbnormalEffect(AbnormalEffect.MUTED); + break; + case 10: + player.startAbnormalEffect(AbnormalEffect.ROOT); + break; + case 11: + player.startAbnormalEffect(AbnormalEffect.HOLD_1); + break; + case 12: + player.startAbnormalEffect(AbnormalEffect.HOLD_2); + break; + case 13: + player.startAbnormalEffect(AbnormalEffect.BIG_HEAD); + break; + case 14: + player.startAbnormalEffect(AbnormalEffect.FLAME); + break; + case 15: + player.startAbnormalEffect(AbnormalEffect.GROW); + break; + case 16: + player.startAbnormalEffect(AbnormalEffect.FLOATING_ROOT); + break; + case 17: + player.startAbnormalEffect(AbnormalEffect.DANCE_STUNNED); + break; + case 18: + player.startAbnormalEffect(AbnormalEffect.FIREROOT_STUN); + break; + case 19: + player.startAbnormalEffect(AbnormalEffect.STEALTH); + break; + case 20: + player.startAbnormalEffect(AbnormalEffect.IMPRISIONING_1); + break; + case 21: + player.startAbnormalEffect(AbnormalEffect.IMPRISIONING_2); + break; + case 22: + player.startAbnormalEffect(AbnormalEffect.MAGIC_CIRCLE); + break; + case 23: + player.startAbnormalEffect(AbnormalEffect.ICE2); + break; + case 24: + player.startAbnormalEffect(AbnormalEffect.VITALITY); + break; + case 25: + player.startAbnormalEffect(AbnormalEffect.REAL_TARGET); + break; + case 26: + player.startAbnormalEffect(AbnormalEffect.DEATH_MARK); + break; + case 27: + player.startAbnormalEffect(AbnormalEffect.SKULL_FEAR); + break; + case 28: + player.startAbnormalEffect(AbnormalEffect.S_INVINCIBLE); + break; + case 29: + player.startAbnormalEffect(AbnormalEffect.S_AIR_STUN); + break; + case 30: + player.startAbnormalEffect(AbnormalEffect.S_AIR_ROOT); + break; + case 31: + player.startAbnormalEffect(AbnormalEffect.S_BAGUETTE_SWORD); + break; + case 32: + player.startAbnormalEffect(AbnormalEffect.S_YELLOW_AFFRO); + break; + case 33: + player.startAbnormalEffect(AbnormalEffect.S_PINK_AFFRO); + break; + case 34: + player.startAbnormalEffect(AbnormalEffect.S_BLACK_AFFRO); + break; + case 35: + player.startAbnormalEffect(AbnormalEffect.S_STIGMA_SHILIEN); + break; + case 36: + player.startAbnormalEffect(AbnormalEffect.S_STAKATOROOT); + break; + case 37: + player.startAbnormalEffect(AbnormalEffect.S_FREEZING); + break; + case 38: + player.startAbnormalEffect(AbnormalEffect.S_VESPER); + break; + case 39: + player.startAbnormalEffect(AbnormalEffect.E_AFRO_1); + break; + case 40: + player.startAbnormalEffect(AbnormalEffect.E_AFRO_2); + break; + case 41: + player.startAbnormalEffect(AbnormalEffect.E_AFRO_3); + break; + case 42: + player.startAbnormalEffect(AbnormalEffect.E_EVASWRATH); + break; + case 43: + player.startAbnormalEffect(AbnormalEffect.E_HEADPHONE); + break; + case 44: + player.startAbnormalEffect(AbnormalEffect.E_VESPER_1); + break; + case 45: + player.startAbnormalEffect(AbnormalEffect.E_VESPER_2); + break; + case 46: + player.startAbnormalEffect(AbnormalEffect.E_VESPER_3); + break; + + } + } I've adapted to Freya and add more effects and Nothing but the credits for RedHot.
  14. Información Del server: - Rates Exp x1000 Party x1000 Adena x1000 - Echanter Safe:+10 Max:+40 Donater:+50 - Zonas Zona LvL Zona Farming No Pvp/Pk Zonas Farming Pvp/Pk Zonas Events - Npcs Npc Augmenter Npc Atribute Npc Enchanter Npc Shop Npc Shop Custom Npc Evento Npc Buffer Npc Buffer VIP Npc Clan Reputation Npc Noblesse Npc GrandBosses - Extras Color System Pvp/Pk Skills Custom Items Custom Vitaly System Wedding System System Color Zoom Infinito Staff: -LioNa -Strife -Zorved(yo) -Alberich -Stark -Ritsuka -Nunnally Web: www.l2waroftitans.es http://www.l2waroftitans.es/foro/
  15. Lineage Azteca - Faction Server CVN Server Chronicle: Gracia Final Rates: * RATE_XP 1. * RATE_SP 1. * RATE_ADENA 1. * RATE_DROP_ITEM 1. NPC's: * Faction *NPC ===================== *NPC - Chophis. *NPC - Reputancion. *NPC - 50 PvP y te aces nbole Noble. *NPC - GK Noob y Cool. *NPC - ITEM *****ETC***** Otras Stuff: * You can trade event items. * Item Buffer. ******ETC****** Staff y Web: * =ADM=Liona * =ADM=emotion * =ADM=PanchioVanDyk * =GMS=Kapessia * =GME=CarpeDiem * Web: http://www.l2azteca.com.mx/ DnSwMTnrU10
  16. Wenas a Todos me podriais pasar los pogramas para editar los animations las texturas UKX esk e buskado x todos lasdos y no e encontrado nada aver si tu critical error me pasas los pogramas pliss XFF--> enga tio cuidate aver si luego te conectas al MSN y ablamos jeje dewww SALUDOS By-LioNa
×
×
  • Create New...