Jump to content

maximilion2

Members
  • Posts

    1,019
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by maximilion2

  1. /locked afou leitourgei to code :D
  2. thn 936 rev exw.. to protecionIP.java to evala ston folder t com.l2jfrozen.gameserver.model.entity; to import to ekana akrivws etsi katw apo to util import com.l2jfrozen.gameserver.util.Util; import com.l2jfrozen.gameserver.model.entity.ProtectionIP; RegionBBSManager.getInstance().changeCommunityBoard(); ProtectionIP.onEnterWorld(activeChar); CustomWorldHandler.getInstance().enterWorld(activeChar); kai telos auto: statement = con.prepareStatement("UPDATE accounts SET lastactive=? WHERE login=?"); statement.setLong(1, System.currentTimeMillis()); statement.setString(2, user);
  3. egw 8elw na to kanw px kai na mhn s klepsei kapios otan mpeneis na s vgazei Your current IP: 127.0.0.1, your last IP: 127.0.0.1 kai h idia ip na einai na s vgazei to mhnyma..
  4. Klhspera :) Vrhka auto: Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java =================================================================== --- head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (revision 869) +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (working copy) @@ -98,6 +98,7 @@ import com.l2jfrozen.gameserver.thread.TaskPriority; import com.l2jfrozen.gameserver.thread.ThreadPoolManager; import com.l2jfrozen.gameserver.util.Util; +import com.l2jfrozen.gameserver.model.entity.ProtectionIP; /** * Enter World Packet Handler @@ -443,6 +444,7 @@ } RegionBBSManager.getInstance().changeCommunityBoard(); + ProtectionIP.onEnterWorld(activeChar); CustomWorldHandler.getInstance().enterWorld(activeChar); if(TvT._savePlayers.contains(activeChar.getName())) Index: head-src/com/l2jfrozen/loginserver/LoginController.java =================================================================== --- head-src/com/l2jfrozen/loginserver/LoginController.java (revision 869) +++ head-src/com/l2jfrozen/loginserver/LoginController.java (working copy) @@ -750,10 +750,9 @@ { client.setAccessLevel(access); client.setLastServer(lastServer); - statement = con.prepareStatement("UPDATE accounts SET lastactive=?, lastIP=? WHERE login=?"); + statement = con.prepareStatement("UPDATE accounts SET lastactive=? WHERE login=?"); statement.setLong(1, System.currentTimeMillis()); - statement.setString(2, address.getHostAddress()); - statement.setString(3, user); + statement.setString(2, user); statement.execute(); statement.close(); statement = null; and ProtectionIP.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 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.entity; import java.sql.PreparedStatement; import java.sql.ResultSet; import com.l2jfrozen.util.database.L2DatabaseFactory; import com.l2jfrozen.gameserver.network.clientpackets.Say2; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.network.serverpackets.CreatureSay; /** * * @author xAddytzu */ public class ProtectionIP { public static void onEnterWorld(L2PcInstance player) { String last = ""; String curr = ""; try { last = LastIP(player); curr = player.getClient().getConnection().getInetAddress().getHostAddress(); } catch (Exception e) { } if (!last.equals(curr)) player.sendPacket(new CreatureSay(1, Say2.PARTY, "SYSTEM", "Your last ip was: "+last+" and current: "+curr)); UpdateLastIP(player, player.getAccountName()); } public static String LastIP(L2PcInstance player) { String lastIp = ""; java.sql.Connection con = null; try { ResultSet rset; con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("SELECT * FROM `accounts` WHERE login = ?"); statement.setString(1, player.getAccountName()); rset = statement.executeQuery(); while(rset.next()) { lastIp = rset.getString("lastIP"); } } catch(Exception e) { e.printStackTrace(); } finally { try { con.close(); } catch(Exception e) { e.printStackTrace(); } } return lastIp; } public static void UpdateLastIP(L2PcInstance player ,String user) { String address = player.getClient().getConnection().getInetAddress().getHostAddress(); java.sql.Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("UPDATE accounts SET lastIP=? WHERE login=?"); statement.setString(1, address); statement.setString(2, user); statement.execute(); statement.close(); } catch(Exception e) { e.printStackTrace(); } finally { try { con.close(); } catch(Exception e) { e.printStackTrace(); } } } } kai to evala sto pack alla otan kaneis login den s vgazei tpt .. prepei na mpeis apo ena pc kai meta apo ena allo gia na s vgalei to mynhma..ginete na tou kanoume akwma kai an einai h idia ip na to dixnei?
  5. leitourghse mia xara ty :)
  6. don't work for me :(
  7. egw lew na s dwsw 50 mazi me to mpourmpouar
  8. to ekana compile alla sto game vgazei test succesfully enchanted his weapon to+16 o kwdikas einai autos: Announcements.getInstance().announceToAll("Player" + activeChar.getName() + " succesfully enchanted his weapon to " + Config.WEAPON_MAX); ginete na ton kanoume opws etsi: ? Congratulations, test successful enchanted (itemid) +16
  9. hehe fixed locked :P soz gia thn talepwria alla eimai sxetika newbie ka8ws prospa8w na ma8w mesw guide etc..
  10. to evala kai m vgazei: Announcements cannot be resolved..
  11. public static int ENCHANT_WEAPON_MAX; public static int ENCHANT_ARMOR_MAX; public static int ENCHANT_JEWELRY_MAX etsi einai... Announcements.getInstance().announceToAll("Player" + activeChar.getName() + " succesfully enchanted his weapon to " + config.ENCHANT.WEAPON_MAX); ?
  12. sxetika me auto public static int ENCHANT_WEAPON_MAX; 8a to kanw etsi: config.ENCHANT_WEAPON_MAX; kai ton kwdika etsi: Announcements.getInstance().announceToAll("Player" + activeChar.getName() + " succesfully enchanted his weapon to " +config.ENCHANT_WEAPON_MAX);
  13. mporeis mhpws na m peis se pia line 8a to valw auto? ;o
  14. ye akrivws auto epsaxna thanxs sasuki :D /locked :)
  15. public static int ENCHANT_WEAPON_MAX; public static int ENCHANT_ARMOR_MAX; public static int ENCHANT_JEWELRY_MAX; na to kanw etsi public static config.ENCHANT_WEAPON_MAX; public static config.ENCHANT_ARMOR_MAX; public static config.ENCHANT_JEWELRY_MAX;
  16. lol hmouna sigouros pws yphrxe kai java side.. afou einai etsi locked :(
  17. Kalhspera kai pali... mporei kapios na m dwsei kwdika gia announce px to max enchant ston srv m einai+16 otan kapios kanei kapia armor h jewl h weapon +16 na emfanizete: px Congratulations,player successful enchanted Draconic Boots+16.
  18. se ka8e item na exei to Sell: px se ka8e item kato apo to Weight na exei Sell Price:29192 Adena. ennow ka8e item na grafei thn timh pou pouliete sto shop....
  19. Kalhspera :) Yparxei kapios kwdikas opou se ka8e item px leei Sell price: .....
  20. Hi all.. i enable this Show the lvl and type of aggro mobs =true alla to title tous einai 8alassi... an 8elw na allaksw xrwma mporei kapios na m pei pia line prepei na allaksw? aniksa to arxeio npcinfo.java kai exei: /* /** * This class ... * * @version $Revision: 1.7.2.4.2.9 $ $Date: 2005/04/11 10:05:54 $ */ public class NpcInfo extends L2GameServerPacket { // ddddddddddddddddddffffdddcccccSSddd dddddc // ddddddddddddddddddffffdddcccccSSddd dddddccffd /** The Constant _S__22_NPCINFO. */ private static final String _S__22_NPCINFO = "[s] 16 NpcInfo"; /** The _active char. */ private L2Character _activeChar; /** The _heading. */ private int _x, _y, _z, _heading; /** The _id template. */ private int _idTemplate; /** The _is summoned. */ private boolean _isAttackable, _isSummoned; /** The _p atk spd. */ private int _mAtkSpd, _pAtkSpd; /** The _fly walk spd. */ private int _runSpd, _walkSpd, _swimRunSpd, _swimWalkSpd, _flRunSpd, _flWalkSpd, _flyRunSpd, _flyWalkSpd; /** The _lhand. */ private int _rhand, _lhand; /** The _collision radius. */ private int _collisionHeight, _collisionRadius; /** The _name. */ private String _name = ""; /** The _title. */ private String _title = ""; int _clanCrest = 0; int _allyCrest = 0; int _allyId = 0; int _clanId = 0; /** * Instantiates a new npc info. * * @param cha the cha * @param attacker the attacker */ public NpcInfo(L2NpcInstance cha, L2Character attacker) { /* if(cha.getMxcPoly() != null) { attacker.sendPacket(new MxCPolyInfo(cha)); return; } */ if(cha.getCustomNpcInstance() != null) { attacker.sendPacket(new CustomNpcInfo(cha)); attacker.broadcastPacket(new FinishRotation(cha)); return; } _activeChar = cha; _idTemplate = cha.getTemplate().idTemplate; _isAttackable = cha.isAutoAttackable(attacker); _rhand = cha.getRightHandItem(); _lhand = cha.getLeftHandItem(); _isSummoned = false; _collisionHeight = cha.getCollisionHeight(); _collisionRadius = cha.getCollisionRadius(); if(cha.getTemplate().serverSideName) { _name = cha.getTemplate().name; } if(Config.L2JMOD_CHAMPION_ENABLE && cha.isChampion()) { _title = Config.L2JMOD_CHAMP_TITLE; } else if(cha.getTemplate().serverSideTitle) { _title = cha.getTemplate().title; } else { _title = cha.getTitle(); } if(Config.SHOW_NPC_LVL && _activeChar instanceof L2MonsterInstance) { String t = "Lv " + cha.getLevel() + (cha.getAggroRange() > 0 ? "*" : ""); if(_title != null) { t += " " + _title; } _title = t; } if(Config.SHOW_NPC_CREST) { if(cha instanceof L2NpcInstance && cha.isInsideZone(L2Character.ZONE_PEACE) && cha.getCastle().getOwnerId() != 0) { int _x,_y,_z; _x = cha.getX(); _y = cha.getY(); _z = cha.getZ(); L2TownZone Town; Town = TownManager.getInstance().getTown(_x, _y, _z); if(Town != null) { int townId = Town.getTownId(); if(townId != 33 && townId != 22) { L2Clan clan; clan = ClanTable.getInstance().getClan(cha.getCastle().getOwnerId()); _clanCrest = clan.getCrestId(); _clanId = clan.getClanId(); _allyCrest = clan.getAllyCrestId(); _allyId = clan.getAllyId(); } } } } _x = _activeChar.getX(); _y = _activeChar.getY(); _z = _activeChar.getZ(); _heading = _activeChar.getHeading(); _mAtkSpd = _activeChar.getMAtkSpd(); _pAtkSpd = _activeChar.getPAtkSpd(); _runSpd = _activeChar.getRunSpeed(); _walkSpd = _activeChar.getWalkSpeed(); _swimRunSpd = _flRunSpd = _flyRunSpd = _runSpd; _swimWalkSpd = _flWalkSpd = _flyWalkSpd = _walkSpd; } /** * Instantiates a new npc info. * * @param cha the cha * @param attacker the attacker */ public NpcInfo(L2Summon cha, L2Character attacker) { _activeChar = cha; _idTemplate = cha.getTemplate().idTemplate; _isAttackable = cha.isAutoAttackable(attacker); //(cha.getKarma() > 0); _rhand = 0; _lhand = 0; _isSummoned = cha.isShowSummonAnimation(); _collisionHeight = _activeChar.getTemplate().collisionHeight; _collisionRadius = _activeChar.getTemplate().collisionRadius; if(cha.getTemplate().serverSideName || cha instanceof L2PetInstance || cha instanceof L2SummonInstance) { _name = _activeChar.getName(); _title = cha.getTitle(); } _x = _activeChar.getX(); _y = _activeChar.getY(); _z = _activeChar.getZ(); _heading = _activeChar.getHeading(); _mAtkSpd = _activeChar.getMAtkSpd(); _pAtkSpd = _activeChar.getPAtkSpd(); _runSpd = _activeChar.getRunSpeed(); _walkSpd = _activeChar.getWalkSpeed(); _swimRunSpd = _flRunSpd = _flyRunSpd = _runSpd; _swimWalkSpd = _flWalkSpd = _flyWalkSpd = _walkSpd; } /* (non-Javadoc) * @see com.l2jfrozen.gameserver.network.serverpackets.L2GameServerPacket#writeImpl() */ @Override protected final void writeImpl() { if(_activeChar == null) return; if(_activeChar instanceof L2Summon) if(((L2Summon) _activeChar).getOwner() != null && ((L2Summon) _activeChar).getOwner().getAppearance().getInvisible()) return; writeC(0x16); writeD(_activeChar.getObjectId()); writeD(_idTemplate + 1000000); // npctype id writeD(_isAttackable ? 1 : 0); writeD(_x); writeD(_y); writeD(_z); writeD(_heading); writeD(0x00); writeD(_mAtkSpd); writeD(_pAtkSpd); writeD(_runSpd); writeD(_walkSpd); writeD(_swimRunSpd/*0x32*/); // swimspeed writeD(_swimWalkSpd/*0x32*/); // swimspeed writeD(_flRunSpd); writeD(_flWalkSpd); writeD(_flyRunSpd); writeD(_flyWalkSpd); writeF(1.1/*_activeChar.getProperMultiplier()*/); //writeF(1/*_activeChar.getAttackSpeedMultiplier()*/); writeF(_pAtkSpd / 277.478340719); writeF(_collisionRadius); writeF(_collisionHeight); writeD(_rhand); // right hand weapon writeD(0); writeD(_lhand); // left hand weapon writeC(1); // name above char 1=true ... ?? writeC(_activeChar.isRunning() ? 1 : 0); writeC(_activeChar.isInCombat() ? 1 : 0); writeC(_activeChar.isAlikeDead() ? 1 : 0); writeC(_isSummoned ? 2 : 0); // invisible ?? 0=false 1=true 2=summoned (only works if model has a summon animation) writeS(_name); writeS(_title); if(_activeChar instanceof L2Summon){ writeD(0x01);// Title color 0=client default writeD(((L2Summon)_activeChar).getPvpFlag()); writeD(((L2Summon)_activeChar).getKarma()); }else{ writeD(0); writeD(0); writeD(0); } writeD(_activeChar.getAbnormalEffect()); // C2 if(Config.SHOW_NPC_CREST) { writeD(_clanId); writeD(_clanCrest); writeD(_allyId); writeD(_allyCrest); } else { writeD(0000); writeD(0000); writeD(0000); writeD(0000); writeC(0000); } writeC(0x00); // C3 team circle 1-blue, 2-red writeF(_collisionRadius); writeF(_collisionHeight); writeD(0x00); // C4 writeD(0x00); // C6 } /* (non-Javadoc) * @see com.l2jfrozen.gameserver.serverpackets.ServerBasePacket#getType() */ @Override public String getType() { return _S__22_NPCINFO; } }
  21. kalhspera.. 8a h8ela an ginete enan code gia px otan kapios kanei enchant to max p einai+16 ston srv m se armor/jewl/weapon na to vgazei px: Congratulations,admin successful enchanted Arcana Mace+16.
  22. no lol i can login in donate or even i try log with new account but as i see login and gameserver is offline omg admin closed login for normal players wtf
×
×
  • Create New...