-
Posts
7,281 -
Joined
-
Last visited
-
Days Won
2 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by Fanky
-
τα 32βιτ κρατάνε μέχρι και 2-3 ραμ. για πιο πάνω θες χ64
-
woha. i kinda like the features,i'll be there tomorrow.
-
in need developement
Fanky replied to falcone2's question in Request Server Development Help [Greek]
what?! -
error se npc top pvp/pk gia interlude
Fanky replied to thepsolartek's question in Request Server Development Help [Greek]
είσαι σίγουρος ότι τα imports του είναι σωστά (σύμφωνα εμε το proj σου;); -
lock it.. http://maxcheaters.com/forum/index.php?topic=238060.0 solved http://maxcheaters.com/forum/index.php?topic=238089.0 solved http://maxcheaters.com/forum/index.php?topic=238061.0 solved http://maxcheaters.com/forum/index.php?topic=238049.msg2145290#new
-
Ah,damn it.I didnt saw it because you shared it there while it should be here but anyway ;p. np.
-
[Request]Npc Help
Fanky replied to LegendaryBeast's question in Request Server Development Help [Greek]
όχι σε java,σε python.όπως οι περισσότεροι buffers. -
you can do edit as you want...that's just an engine which can be edit as you imagine/like. thanks.
-
τι εννοείς δεν μπαίνει φίλε μου; έχει κάποιο error; δώσε μας πληροφορίες για να σε βοηθήσουμε.
-
Hi, its been a while since I shared something here so here I'm.Just for the record,I had to touch any source for 7-8 months now that's why I asked help from ma friend an4rchy in some things. Description: Everyday @ 22:00 the guy with the most pvp will become pvplord.Now if you want pvplord to be something special with other color tittle or name,just edit as you like. if (activeChar.isPvpLord()) { //code } . It includes dp & core side,coded on clean source @l2j interlude. core side: ### Eclipse Workspace Patch 1.0 #P L2_GameServer_It Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 5311) +++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -204,6 +204,32 @@ */ public final class L2PcInstance extends L2PlayableInstance { + + //top pvp of day system + + private int todaypvps = 0; + private boolean pvplord = false; + + public int getTodayPvps() + { + return todaypvps; + } + + public void setTodayPvps(int todaypvps) + { + this.todaypvps = todaypvps; + } + + public boolean isPvpLord() + { + return pvplord; + } + + public void setPvpLord(boolean val) + { + pvplord = val; + } + private static final String RESTORE_SKILLS_FOR_CHAR = "SELECT skill_id,skill_level FROM character_skills WHERE char_obj_id=? AND class_index=?"; private static final String ADD_NEW_SKILL = "INSERT INTO character_skills (char_obj_id,skill_id,skill_level,skill_name,class_index) VALUES (?,?,?,?,?)"; private static final String UPDATE_CHARACTER_SKILL_LEVEL = "UPDATE character_skills SET skill_level=? WHERE skill_id=? AND char_obj_id=? AND class_index=?"; @@ -214,8 +240,8 @@ private static final String RESTORE_SKILL_SAVE = "SELECT skill_id,skill_level,effect_count,effect_cur_time, reuse_delay FROM character_skills_save WHERE char_obj_id=? AND class_index=? AND restore_type=? ORDER BY buff_index ASC"; private static final String DELETE_SKILL_SAVE = "DELETE FROM character_skills_save WHERE char_obj_id=? AND class_index=?"; - 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=?,todaypvps=?,pvplord=? 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,todaypvps,pvplord FROM characters WHERE obj_id=?"; private static final String RESTORE_CHAR_SUBCLASSES = "SELECT class_id,exp,sp,level,class_index FROM character_subclasses WHERE char_obj_id=? ORDER BY class_index ASC"; private static final String ADD_CHAR_SUBCLASS = "INSERT INTO character_subclasses (char_obj_id,class_id,exp,sp,level,class_index) VALUES (?,?,?,?,?,?)"; private static final String UPDATE_CHAR_SUBCLASS = "UPDATE character_subclasses SET exp=?,sp=?,level=?,class_id=? WHERE char_obj_id=? AND class_index =?"; @@ -4448,6 +4474,8 @@ { // Add karma to attacker and increase its PK counter setPvpKills(getPvpKills() + 1); + + setTodayPvps(getTodayPvps()+1); // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter sendPacket(new UserInfo(this)); @@ -5595,6 +5623,9 @@ player.setOnlineTime(rset.getLong("onlinetime")); player.setNewbie(rset.getInt("newbie")==1); player.setNoble(rset.getInt("nobless")==1); + + player.setTodayPvps(rset.getInt("todaypvps")); + player.setPvpLord(rset.getInt("pvplord")==1); player.setClanJoinExpiryTime(rset.getLong("clan_join_expiry_time")); if (player.getClanJoinExpiryTime() < System.currentTimeMillis()) @@ -6059,7 +6090,9 @@ statement.setLong(54, getClanCreateExpiryTime()); statement.setString(55, getName()); statement.setLong(56, getDeathPenaltyBuffLevel()); - statement.setInt(57, getObjectId()); + statement.setInt(57, getTodayPvps()); + statement.setInt(58, isPvpLord() ? 1 : 0); + statement.setInt(59, getObjectId()); statement.execute(); statement.close(); Index: java/net/sf/l2j/gameserver/GameServer.java =================================================================== --- java/net/sf/l2j/gameserver/GameServer.java (revision 5311) +++ java/net/sf/l2j/gameserver/GameServer.java (working copy) @@ -222,6 +222,7 @@ import net.sf.l2j.gameserver.model.L2PetDataTable; import net.sf.l2j.gameserver.model.L2World; import net.sf.l2j.gameserver.model.entity.Hero; +import net.sf.l2j.gameserver.model.entity.PvpLordTask; import net.sf.l2j.gameserver.model.entity.TvTManager; import net.sf.l2j.gameserver.network.L2GameClient; import net.sf.l2j.gameserver.network.L2GamePacketHandler; @@ -604,6 +605,7 @@ CoupleManager.getInstance(); TaskManager.getInstance(); + PvpLordTask.getInstance(); GmListTable.getInstance(); Index: java/net/sf/l2j/gameserver/model/entity/PvpLordTask.java =================================================================== --- java/net/sf/l2j/gameserver/model/entity/PvpLordTask.java (revision 0) +++ java/net/sf/l2j/gameserver/model/entity/PvpLordTask.java (revision 0) @@ -0,0 +1,161 @@ +/* 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 net.sf.l2j.gameserver.model.entity; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.Calendar; + +import net.sf.l2j.L2DatabaseFactory; +import net.sf.l2j.gameserver.Announcements; +import net.sf.l2j.gameserver.ThreadPoolManager; +import net.sf.l2j.gameserver.model.L2World; +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; + +/** + * + * @author Fanky + */ +public class PvpLordTask +{ + public static void getInstance() + { + ThreadPoolManager.getInstance().scheduleGeneral(new Runnable() + { + public void run() + { + String currentPvpLord = null, + newPvpLord = null; + int topTodayPvps = 0; + Connection con = null; + try + { + con = L2DatabaseFactory.getInstance().getConnection(); + PreparedStatement stm = con.prepareStatement("SELECT char_name FROM characters WHERE pvplord=? AND accesslevel=?"); + stm.setInt(1, 1); + stm.setInt(2, 1); + ResultSet rSet = stm.executeQuery(); + + if (rSet.next()) + { + currentPvpLord = rSet.getString("char_name"); + } + + rSet.close(); + stm.close(); + + if (currentPvpLord != null) + { + boolean cont = false; + L2PcInstance cPvpLord = L2World.getInstance().getPlayer(currentPvpLord); + if (cPvpLord == null || cPvpLord.isOnline() == 0) + { + cont = true; + } + else + { + cPvpLord.setPvpLord(false); + cPvpLord.broadcastUserInfo(); + } + + if (cont) + { + stm = con.prepareStatement("UPDATE characters SET pvplord=? WHERE char_name=?"); + stm.setInt(1, 0); + stm.setString(2, currentPvpLord); + + stm.execute(); + stm.close(); + } + } + + stm = con.prepareStatement("SELECT todaypvps,char_name FROM characters WHERE accesslevel=? ORDER BY todaypvps DESC LIMIT 1"); + stm.setInt(1, 0); + rSet = stm.executeQuery(); + + if (rSet.next()) + { + newPvpLord = rSet.getString("char_name"); + topTodayPvps = rSet.getInt("todaypvps"); + } + + rSet.close(); + stm.close(); + + boolean cont = false; + L2PcInstance nPvpLord = L2World.getInstance().getPlayer(newPvpLord); + if (nPvpLord == null || nPvpLord.isOnline() == 0) + { + cont = true; + } + else + { + nPvpLord.setPvpLord(true); + nPvpLord.broadcastUserInfo(); + } + + if (cont) + { + stm = con.prepareStatement("UPDATE characters SET pvplord=? WHERE char_name=?"); + stm.setInt(1, 1); + stm.setString(2, newPvpLord); + + stm.execute(); + stm.close(); + } + + stm = con.prepareStatement("UPDATE characters SET todaypvps=?"); + stm.setInt(1, 0); + + stm.execute(); + stm.close(); + + Announcements.getInstance().announceToAll("New pvp lord: "+newPvpLord+" Today pvps: "+topTodayPvps); + } + catch (Exception e) + { } + finally + { + try + { + con.close(); + } + catch (Exception e) + { } + } + } + } + , getValidationTime()); + } + + private static long getValidationTime() + { + Calendar cld = Calendar.getInstance(); + cld.set(Calendar.HOUR_OF_DAY, 22); + cld.set(Calendar.MINUTE, 1); + + long time = cld.getTimeInMillis(); + if (System.currentTimeMillis()-time <= 0) + { + return time; + } + + return 0; + } +} Index: java/net/sf/l2j/gameserver/serverpackets/UserInfo.java =================================================================== --- java/net/sf/l2j/gameserver/serverpackets/UserInfo.java (revision 5311) +++ java/net/sf/l2j/gameserver/serverpackets/UserInfo.java (working copy) @@ -294,7 +294,7 @@ writeD(_activeChar.getClanCrestLargeId()); writeC(_activeChar.isNoble() ? 1 : 0); //0x01: symbol on char menu ctrl+I - writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_mxc)) ? 1 : 0); //0x01: Hero mxc + writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_mxc) || _activeChar.isPvpLord()) ? 1 : 0); //0x01: Hero mxc writeC(_activeChar.isFishing() ? 1 : 0); //Fishing Mode writeD(_activeChar.GetFishx()); //fishing x Index: java/net/sf/l2j/gameserver/serverpackets/CharInfo.java =================================================================== --- java/net/sf/l2j/gameserver/serverpackets/CharInfo.java (revision 5311) +++ java/net/sf/l2j/gameserver/serverpackets/CharInfo.java (working copy) @@ -325,7 +325,7 @@ writeD(_activeChar.getClanCrestLargeId()); writeC(_activeChar.isNoble() ? 1 : 0); // Symbol on char menu ctrl+I - writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_mxc)) ? 1 : 0); // Hero mxc + writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_mxc) || _activeChar.isPvpLord()) ? 1 : 0); // Hero mxc writeC(_activeChar.isFishing() ? 1 : 0); //0x01: Fishing Mode (Cant be undone by setting back to 0) writeD(_activeChar.GetFishx()); datapack side: -- --------------------------- -- Table structure for characters -- --------------------------- CREATE TABLE IF NOT EXISTS characters ( account_name varchar(45) default NULL, obj_Id decimal(11,0) NOT NULL default '0', char_name varchar(35) NOT NULL, `level` decimal(11,0) default NULL, maxHp decimal(11,0) default NULL, curHp decimal(18,0) default NULL, maxCp decimal(11,0) default NULL, curCp decimal(18,0) default NULL, maxMp decimal(11,0) default NULL, curMp decimal(18,0) default NULL, acc decimal(11,0) default NULL, crit decimal(10,0) default NULL, evasion decimal(11,0) default NULL, mAtk decimal(11,0) default NULL, mDef decimal(11,0) default NULL, mSpd decimal(11,0) default NULL, pAtk decimal(11,0) default NULL, pDef decimal(11,0) default NULL, pSpd decimal(11,0) default NULL, runSpd decimal(11,0) default NULL, walkSpd decimal(11,0) default NULL, str decimal(11,0) default NULL, con decimal(11,0) default NULL, dex decimal(11,0) default NULL, _int decimal(11,0) default NULL, men decimal(11,0) default NULL, wit decimal(11,0) default NULL, face decimal(11,0) default NULL, hairStyle decimal(11,0) default NULL, hairColor decimal(11,0) default NULL, sex decimal(11,0) default NULL, heading decimal(11,0) default NULL, x decimal(11,0) default NULL, y decimal(11,0) default NULL, z decimal(11,0) default NULL, movement_multiplier decimal(9,8) default NULL, attack_speed_multiplier decimal(10,9) default NULL, colRad decimal(10,3) default NULL, colHeight decimal(10,3) default NULL, exp decimal(20,0) default NULL, expBeforeDeath decimal(20,0) default 0, sp decimal(11,0) default NULL, karma decimal(11,0) default NULL, pvpkills decimal(11,0) default NULL, pkkills decimal(11,0) default NULL, clanid decimal(11,0) default NULL, maxload decimal(11,0) default NULL, race decimal(11,0) default NULL, classid decimal(11,0) default NULL, base_class int(2) NOT NULL default '0', deletetime decimal(20,0) default NULL, cancraft decimal(11,0) default NULL, title varchar(16) default NULL, rec_have int(3) NOT NULL default '0', rec_left int(3) NOT NULL default '0', accesslevel decimal(4,0) default NULL, online decimal(1,0) default NULL, onlinetime decimal(20,0) default NULL, char_slot decimal(1) default NULL, newbie decimal(1,0) default '1', lastAccess decimal(20,0) default NULL, clan_privs INT DEFAULT 0, wantspeace decimal(1,0) DEFAULT 0, isin7sdungeon decimal(1,0) NOT NULL default 0, in_jail decimal(1,0) DEFAULT 0, jail_timer decimal(20,0) DEFAULT 0, power_grade decimal(11,0) DEFAULT NULL, nobless decimal(1,0) NOT NULL DEFAULT 0, subpledge int(1) NOT NULL DEFAULT 0, last_recom_date decimal(20,0) NOT NULL DEFAULT 0, lvl_joined_academy int(1) NOT NULL DEFAULT 0, apprentice int(1) NOT NULL DEFAULT 0, sponsor int(1) NOT NULL DEFAULT 0, varka_ketra_ally int(1) NOT NULL DEFAULT 0, clan_join_expiry_time DECIMAL(20,0) NOT NULL DEFAULT 0, clan_create_expiry_time DECIMAL(20,0) NOT NULL DEFAULT 0, death_penalty_level int(2) NOT NULL DEFAULT 0, pvplord varchar(35) default NULL, todaypvps decimal(11,0) default NULL, PRIMARY KEY (obj_Id), KEY `clanid` (`clanid`) ) ; its not tested,but seems that its gonna work properly. I would appreciate if someone could feedback. cheers.
-
Discussion League Of Legends Random Topic!
Fanky replied to GeneralKenody's topic in General Discussion [English]
cool nerf on wota. -
you should try to advertise it via facebook/twitter etc. good luck.
-
god prefix http://maxcheaters.com/forum/index.php?topic=237898.0 req dev help gr l2j http://maxcheaters.com/forum/index.php?topic=238039.0 off topics http://maxcheaters.com/forum/index.php?topic=238038.msg2145132;topicseen#msg2145132 junk or req dev help eng + lock http://maxcheaters.com/forum/index.php?topic=237900.0 junk http://maxcheaters.com/forum/index.php?topic=238039.msg2145256;topicseen#msg2145256 req dev help eng l2j http://maxcheaters.com/forum/index.php?topic=238073.0 req dev help gr l2j http://maxcheaters.com/forum/index.php?topic=238085.msg2145772;topicseen#msg2145772 prefix http://maxcheaters.com/forum/index.php?topic=237974.0 req dev help gr l2j http://maxcheaters.com/forum/index.php?topic=238103.0 req dev help gr l2j http://maxcheaters.com/forum/index.php?topic=238105.msg2146059;boardseen#new
-
Announce Hero,Noble,GM,Donator,New Char In Login
Fanky replied to Ta®oS™'s topic in Server Shares & Files [L2J]
there's no such method.. there's one,getLevel() > x -
siege manager gia ola ta castle?
Fanky replied to maximilion2's question in Request Server Development Help [Greek]
το έχουνε φτιάξει πολύ μετά τον krash,λολ. -
χαχαχαχα http://www.redplanet.gr/podosfairo/marinakhs-tote-na-zhthsw-50-ek-eyrw-gia-ton-miralas.1759703.html ++++
-
siege manager gia ola ta castle?
Fanky replied to maximilion2's question in Request Server Development Help [Greek]
ήτανε..ένα φόρουμ. -
[Discussion]Κάντε request java mods
Fanky replied to Rizlaaa's topic in Server Development Discussion [Greek]
http://maxcheaters.com/forum/index.php?topic=122994.0 -
Announce Hero,Noble,GM,Donator,New Char In Login
Fanky replied to Ta®oS™'s topic in Server Shares & Files [L2J]
Not hard to put one.. that's code is rly bad for mid rate servers,if i remember well newbie is someone when he is < 54 lvl.So everytime which someone will log the announcement will take place,personally I dont like it at all. -
req dev help gr l2j http://maxcheaters.com/forum/index.php?topic=238022.0 prefixes,[share] http://maxcheaters.com/forum/index.php?topic=238024.0 http://maxcheaters.com/forum/index.php?topic=238029.0
-
[GUIDE][GR]Πώς Να περνάτε Java Codes!!!!!
Fanky replied to Papaditsa's topic in Server Development Discussion [Greek]
στο client τίποτα,τουλάχιστον για τα περισσότερα codes. είναι πολύ λίγα αυτά θέλουνε client edit. -
Mastery Exploit: 622 Players Banned
Fanky replied to GeneralKenody's topic in General Discussion [English]
at least the fixed it..btw I never saw in game something like that. -
preview server section http://maxcheaters.com/forum/index.php?topic=237974.0
-
lock this (or even junk it) since exist this.
-
req dev help gr l2j http://maxcheaters.com/forum/index.php?topic=237977.0

