-
Posts
128 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by skoupas
-
Hi All i create with some help of my friend Top PvP Player Status And i want to Help all users of mxc :'D PS: If you feel there to perform the same post deletion! Lets start! :D ============================================= index/net/sf/l2j/gameserver/gameserver.java = ============================================= @657,9 657,7@ _adminCommandHandler.registerAdminCommandHandler(new AdminHero()); _adminCommandHandler.registerAdminCommandHandler(new AdminNoble()); + _adminCommandHandler.registerAdminCommandHandler(new AdminTopPvpPlayer()); =================================================================================== Index/net/sf/l2j/handlers/admincommandHandlers Create File AdminTopPvpPlayer.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. * */ package net.sf.l2j.gameserver.handler.admincommandhandlers; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import net.sf.l2j.L2Config; import net.sf.l2j.L2DatabaseFactory; import net.sf.l2j.gameserver.Announcements; import net.sf.l2j.gameserver.GmListTable; import net.sf.l2j.gameserver.handler.IAdminCommandHandler; import net.sf.l2j.gameserver.model.L2Object; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.network.SystemMessageId; import net.sf.l2j.gameserver.network.serverpackets.SystemMessage; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /** * * Author Tsikos* * */ public class AdminTopPvpPlayer implements IAdminCommandHandler { private static String[] _adminCommands = { "admin_setTopPvpPlayer",}; private final static Log _log = LogFactory.getLog(AdminTopPvpPlayer.class.getName()); private static final int REQUIRED_LEVEL = L2Config.GM_MENU; public boolean useAdminCommand(String command, L2PcInstance activeChar) { if (!L2Config.ALT_PRIVILEGES_ADMIN) { if (!(checkLevel(activeChar.getAccessLevel()) && activeChar.isGM())) { return false; } } if (command.startsWith("admin_setTopPvpPlayer")) { L2Object target = activeChar.getTarget(); L2PcInstance player = null; SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2); if (target instanceof L2PcInstance) { player = (L2PcInstance)target; } else { player = activeChar; } if (player.isTopPvpPlayer()) { player.setTopPvpPlayer(false); sm.addString("You are no longer a server TopPvpPlayer."); GmListTable.broadcastMessageToGMs("GM "+activeChar.getName()+" removed TopPvpPlayer stat of player"+ target.getName()); Connection connection = null; try { connection = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT obj_id FROM characters where char_name=?"); statement.setString(1,target.getName()); ResultSet rset = statement.executeQuery(); int objId = 0; if (rset.next()) { objId = rset.getInt(1); } rset.close(); statement.close(); if (objId == 0) {connection.close(); return false;} statement = connection.prepareStatement("UPDATE characters SET TopPvpPlayer=0 WHERE obj_id=?"); statement.setInt(1, objId); statement.execute(); statement.close(); connection.close(); } catch (Exception e) { _log.warn("could not set TopPvpPlayer stats of char:", e); } finally { try { connection.close(); } catch (Exception e) {} } } else { player.setTopPvpPlayer(true); sm.addString("You are now a server TopPvpPlayer, congratulations!"); GmListTable.broadcastMessageToGMs("GM "+activeChar.getName()+" has given TopPvpPlayer stat for player "+target.getName()+"."); Connection connection = null; try { connection = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT obj_id FROM characters where char_name=?"); statement.setString(1,target.getName()); ResultSet rset = statement.executeQuery(); int objId = 0; if (rset.next()) { objId = rset.getInt(1); } rset.close(); statement.close(); if (objId == 0) {connection.close(); return false;} statement = connection.prepareStatement("UPDATE characters SET TopPvpPlayer=1 WHERE obj_id=?"); statement.setInt(1, objId); statement.execute(); statement.close(); connection.close(); } catch (Exception e) { _log.warn("could not set TopPvpPlayer stats of char:", e); } finally { try { connection.close(); } catch (Exception e) {} } } player.sendPacket(sm); player.broadcastUserInfo(); if(player.isTopPvpPlayer() == true) { Announcements.getInstance().announceToAll(player.getName() + " Has Become a Server TopPvpPlayer!"); } } return false; } public String[] getAdminCommandList() { return _adminCommands; } private boolean checkLevel(int level) { return (level >= REQUIRED_LEVEL); } } ========================================================= index/net/sf/l2j/model/actor/instance/l2pcinstance.java = ========================================================= @225,4 225,4@ - private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=? WHERE obj_id=?"; - private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level FROM characters WHERE obj_id=?"; + private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,pvpkills=?,pkkills=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,in_jail=?,jail_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,TopPvpPlayer WHERE obj_id=?"; + private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,TopPvpPlayer FROM characters WHERE obj_id=?"; @498,1 498,1@ /** True if the L2PcInstance is newbie */ private boolean _newbie; private boolean _noble = false; private boolean _hero = false; private boolean _Customhero = false; + private boolean _TopPvpPlayer = false; @5912,30 5912,30@ player.setNewbie(rset.getInt("newbie")==1); player.setNoble(rset.getInt("nobless")==1); + player.setTopPvpPlayer(rset.getInt("TopPvpPlayer")==1); @6387,39 6387,39@ statement.setLong(41, totalOnlineTime); statement.setInt(42, isInJail() ? 1 : 0); statement.setLong(43, getJailTimer()); statement.setInt(44, isNewbie() ? 1 : 0); statement.setInt(45, isNoble() ? 1 : 0); statement.setLong(46, getPowerGrade()); statement.setInt(47, getPledgeType()); statement.setLong(48,getLastRecomUpdate()); statement.setInt(49,getLvlJoinedAcademy()); statement.setLong(50,getApprentice()); statement.setLong(51,getSponsor()); statement.setInt(52, getAllianceWithVarkaKetra()); statement.setLong(53, getClanJoinExpiryTime()); statement.setLong(54, getClanCreateExpiryTime()); statement.setString(55, getName()); statement.setLong(56, getDeathPenaltyBuffLevel()); + statement.setInt(57, isTopPvpPlayer() ? 1 : 0); @6523,25 6523,25@ + public boolean isTopPvpPlayer() + { + return _TopPvpPlayer; + } + + public void setTopPvpPlayer(boolean TopPvpPlayer) + { + _TopPvpPlayer = TopPvpPlayer; + } =================================================================== index:net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java = =================================================================== @181,38 181,38@ + if (activeChar.isTopPvpPlayer()) + { + activeChar.getAppearance().setNameColor(L2Config.TopPvpPlayer_NAME_COLOR); + activeChar.sendMessage("Welcome TopPvpPlayer "+activeChar.getName()+" !"); + activeChar.sendMessage("Enjoy your Stay Mate!"); + Announcements.getInstance().announceToAll("Top PvP Player" +activeChar.getName()+ " is Now Online!"); + } @236,29 236,29@ if (activeChar.isTopPvpPlayer() || activeChar.getPvpKills() == 5000) { activeChar.sendMessage("[Message]:You rewarded TopPvpPlayer status for your pvp kill's"); } ============================================================= Index:net/sf/l2j/gameserver/network/clientpackets/say2.java = ============================================================= @181,55 181,55@ + if (_text.startsWith("*") && activeChar.isTopPvpPlayer()) + { + for (L2PcInstance player : L2World.getInstance().getAllPlayers()) + player.sendPacket(new CreatureSay(0, 15, activeChar.getName(), _text)); + return; + } ================================ Index:net/sf/l2j/L2Config.java = ================================ @1147,23 1147,23@ public static boolean KEEP_SUBCLASS_SKILLS; + public static boolean TopPvpPlayer_NAME_COLOR_ENABLED; + public static int TopPvpPlayer_NAME_COLOR; @2659,20 2659,20@ KEEP_SUBCLASS_SKILLS = Boolean.parseBoolean(customSettings.getProperty("EnableStuckSubsMode", "False")); + TopPvpPlayer_NAME_COLOR_ENABLED = Boolean.parseBoolean(customSettings.getProperty("TopPvpPlayerNameColorEnabled", "False")); + TopPvpPlayer_NAME_COLOR = Integer.decode("0x" + customSettings.getProperty("TopPvpPlayerColorName", "0099ff")); ===================================== Gameserver/config/custom.properties = ===================================== +#------------------------------------------------# +# Top PvP Player System By Tsikos # +#------------------------------------------------# + +# TopPvpPlayer Color Name +# TopPvpPlayer Name Color Enabled?. +TopPvpPlayerNameColorEnabled = False +# TopPvpPlayer Color Name Selection +TopPvpPlayerColorName = 0099ff ========= =Code Finish= ========= ################## #All Credits Go to Tsikos*# ################## ::DownLoad Link:: [move]http://www.4shared.com/file/igL-m8m8/Top_PvP_Player.html[/move]
-
eipa ego oti einai spoudeo btw apla helpara ligo ayto einai olo mi postarete gia mlkies sto topic....
-
Geia se olous ekatsa mia mera kai epsaxna na vro mia rb gk gia to packet m alla dn vrika pouthena sosti gatekeeper pou na mn m xalaei ta teleport ktlpa tespa na mn ta polylogo ekana share ayti ti gk an nmzei kapoios oti iparxei idia i kati tetoio ass kanei lock to post m ty :D [move]::Photo::[/move] http://img696.imageshack.us/i/shot00076t.png/ ::Link Download:: http://www.4shared.com/file/CVjJ6wON/Custom_RB_Gatekeeper_By_Tsikos.html All Credits Go to Tsikos* Gatekeeper For Interlude Client!
-
[Help]Multisell Error!
skoupas replied to skoupas's question in Request Server Development Help [L2J]
man add me in msn pls :'D zyroby@hotmail.com -
[EN]Hi guys i have one problem with multisell and i want some help from you for Fix It! ------------------------------------------------------------------------------------------------ [GR]Γεια σας παιδια εχω ενα προβλημα με το Multisell μου και θα ιθελα λιγη βοηθεια για να το Fix! Screen Shot http://b.imagehost.org/view/0955/Multisell_error
-
[EN]Hi guys i have one problem with multisell and i want some help from you for Fix It! :D ------------------------------------------------------------------------------------------------ [GR]Γεια σας παιδια εχω ενα προβλημα με το Multisell μου και θα ιθελα λιγη βοηθεια για να το Fix! :D [move]Screen Shot[/move]
-
i want to buy olympiad system for interlude for alla projects full fix Price : 50 Euro Or Adena: 60k
-
pinaepple exeis msn?
-
mporei kapoios na m kanei kati san ayto? http://www.l2gamesites.net/myhome an exei kaneis toso kales dinatotites gia na to ftiaksei XD
-
@mixmaster oraio re c alla poly aplo ...
-
450x80 kata protimisi xD
-
1) ok lathos mou 2) poios s eipe oti dn exo adena se ayto to acc dn exo aplos...
-
Thelo ena Banner gia l2 server ta features einai: L2Fiero Xp: x3.000 Sp: x3.000 Adena: x3.000 Www.l2fiero.com Price Adena: 5.000
-
poly kalo to npc filos alla thelo na s kano mia erotisi pos mporo na vgalo to online players kai na valo =Top Pc Bangs=? :D
-
file ekana delete ola ta npc apo spawnlist.sql alla tpt :/ kano kanonika spawn npc emfanizontai sto spawnlist.sql tample alla dn fenontai sto game ta npc :/
-
geia s olous exo ena prob me to packet m to opoio thelo na mirasto mazi sas kai opoios mporei na m help :D to prob einai oti kano //spawn ta npc alla afotou kano restart ayta trone delete pos to fix ayto? :/
-
[Help] Java error Game-Login Consoles
skoupas replied to skoupas's question in Request Server Development Help [Greek]
FighterBoss kane me add msn an mporeis ;) zyroby@hotmail.com -
[Help] Java error Game-Login Consoles
skoupas posted a question in Request Server Development Help [Greek]
Hi paides loipon kano akoma ena topic dioti vrika <<akoma>> 1 problem giayto kai thelo opoios mporei na me help :D to problem einai to eksis:: eno kano kanonika install java ta game kai login den diavasoun tn java (Exo Windows 7 64bit) epeisis exo kai mia photo pou isos voithisei se esas na mou vrite poio eykola to ti fteei opoios mporesei na to vrei as mou pei me ena post i add me msn.. zyroby@hotmail.com ::Photo:: http://img38.imageshack.us/i/errorjava.png/ -
hi s olous tha ithela ena <<java code>> p dn mporo na vro k exei to eksis command //loadc i akoma kalitera to code me to //fake opoios mporei na m help tha to ektimousa poly :D :D
-
Hi se olous tha mpo kateythian sto thema :D prospathisa na anoikso ena l2j teon kai m evgaze kapoia error kapoies fores k alles oxi kai molis girisa spiti kai piga na anoikso to pack m evgale to eksis sto game server console Photo http://img837.imageshack.us/i/24595108.png/ an mporei na me help kapoios me ayto to error tha to ektimousa poly :D :D
-
xaxaxa kapou edo tha eimai kai ego DaSoNe Bl4ckAngel edo ^_^ ego pisteyo einai tixi alla da3....
-
paides gia to acuracy to thema einai oti einai 1.54534 dn einai 1.54124 opote 1.5 s anevazei giayto k dn eidate ta stats anyway kalo to share an kai m fenete tyxairo ;p
-
thnx Crazy apla dn ta pao kai poly kala me tis photo :p an kai eftiaksa tis photo ;p
-
sosta ksexastika sry.... xD
-
hi guys meta apo toso kairo sto maxcheaters pira polles plirofories kai me help pl ora na sas help kai ligo Loipon 1 eftiaksa mia custom Gatekeeper me farm area kai PvP Area... 2 eftiaksa ena gm Shop me full items gia pvp server... 3 epeisis ena Custom Shop me Apella Armor kai Interlude Weapons epeisis gia pvp server.... edo einai ta links Gia tin GateKeeper Edo----> http://www.4shared.com/file/SCb0TRa2/Custom_GK_By_Tsikos.html Gia to Gm Shop Edo----> http://www.4shared.com/account/file/9uqTC_-X/Custom_GmShop_By_Tsikos.html Gia to Custom Shop edo----> http://www.4shared.com/file/tQX5VhI2/CustomShop_By_Tsikos.html Photos GateKeeper http://img265.imageshack.us/i/shot00022u.jpg/ http://img508.imageshack.us/i/shot00023.jpg/ http://img690.imageshack.us/i/shot00024x.jpg/ http://img695.imageshack.us/i/shot00025uw.jpg/ GM Shop http://img443.imageshack.us/i/shot00026g.jpg/ http://img820.imageshack.us/i/shot00027y.jpg/ http://img228.imageshack.us/i/shot00028p.jpg/ Custom Shop http://img716.imageshack.us/i/shot00016vp.jpg/ http://img256.imageshack.us/i/shot00017yw.jpg/ http://img339.imageshack.us/i/shot00018c.jpg/ http://img256.imageshack.us/i/shot00019xo.jpg/ http://img194.imageshack.us/i/shot00020oc.jpg/ http://img683.imageshack.us/i/shot00021r.jpg/ Ola ta NPC Einai gia Interlude Client