
NumL0ck
Banned-
Posts
296 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by NumL0ck
-
(HELP) All good people come here, please...
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
omg i do it my self:D all working, i set player.setPvpLord(false); in 23:59 and after that in 00:00 i maked L2PcInstance nPvpLord = L2World.getInstance().getPlayer(newPvpLord); if (nPvpLord == null || nPvpLord.isOnline() == 0) etc... big thanks to you and all who help me:D can lock this! -
(HELP) All good people come here, please...
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
and one problem:) if player with more todaypvps not online no one is pvp lord... and then player which is pvp lord is online and have 1 todaypvps but is player who have 100 but this player is offline set pvp lord player who is pvp lord... my english is bad, please say to me you understand me:D -
(HELP) All good people come here, please...
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
omg man its working big thanks to ^Wyatt and to you vampir you help me every time:D to not create new topic one question its simple:D i have max_poly and i need my npc to dance in max_poly is abnormalEffect i now is danceStun but which id or something like that i need put in abnormalEffect? because if i put danceStun i have error:D column row = 1 etc. -
(HELP) All good people come here, please...
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
okey, thanks:) -
(HELP) All good people come here, please...
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
omg man its working but its only clean pvp lord:( -
(HELP) All good people come here, please...
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
state = con.prepareStatement("UPDATE characters SET todaypvps=0,todaypks=0,todaydeaths=0 WHERE obj_Id=?"); state.setInt(1, masterId); state.execute(); state.close(); p.setTodayPvps(0); p.setTodayPks(0); p.setTodayDeaths(0); } Announcements.getInstance().announceToAll("PvP Lord is : "+p.getName()); Announcements.getInstance().announceToAll("Today PvPs: "+topTodayPvps); } } yes? -
(HELP) All good people come here, please...
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
http://maxcheaters.com/forum/index.php?topic=237353.0 if you help to me, you will be best:D -
(HELP) All good people come here, please...
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
its like pvpkills and pkkills -
(HELP) All good people come here, please...
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
^Wyatt, For the problem of server restart... create a boolean alreadycleaned = false, set it to true when the pvplord comes, and then in the task that save the values when restarting the server, if that boolean is true don't save. i don't understand this, because i'm newbie on coding, i use eclipse only one week, so please explain better, thanks. -
(HELP) All good people come here, please...
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
and pvplord fields are not cleaned, yes should be cleaned of all ppl. because as i say in my server is command .getstats which show todaypvps,etc. and every day 24h then olympiad ends its cleaning, but code not working.:( -
(HELP) All good people come here, please...
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
i maked then olympiad end to open this code, and search player with most todaypvps, this is working code make me pvp lord but don't clear todaypvps,todaypks,todaydeaths... -
(HELP) All good people come here, please...
NumL0ck posted a question in Request Server Development Help [L2J]
Hello all! It's a mission help to me:D How can i make only todaypvps,todaypks,todaydeaths clear to 0? because this code is not working correctly. It's only make in navicat everywhere 0 but! after server restart points are back:( package com.l2jfrozen.gameserver.model.entity; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.Calendar; import java.sql.SQLException; import com.l2jfrozen.util.database.L2DatabaseFactory; import com.l2jfrozen.gameserver.model.entity.Announcements; import com.l2jfrozen.gameserver.thread.ThreadPoolManager; import com.l2jfrozen.gameserver.model.L2World; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; public class PvpLordTask { public static void newPvpLord(){ int masterId = 0; int topTodayPvps = 0; Connection con = null; PreparedStatement state = null; ResultSet rset = null; try{ con = L2DatabaseFactory.getInstance().getConnection(); state = con.prepareStatement("SELECT obj_Id,todaypvps FROM characters ORDER BY todaypvps DESC LIMIT 1;"); rset = state.executeQuery(); if(rset.next()) masterId = rset.getInt(1); if(masterId == 0) return; topTodayPvps = rset.getInt("todaypvps"); state.close(); rset.close(); for(L2PcInstance p : L2World.getInstance().getAllPlayers()){ if(p.getObjectId() == masterId) { p.sendMessage("You are the PvP Lord!"); p.setPvpLord(true); p.broadcastUserInfo(); state = con.prepareStatement("UPDATE characters SET pvplord=1 WHERE obj_Id=?"); state.setInt(1, masterId); state.execute(); state.close(); state = con.prepareStatement("UPDATE characters SET todaypvps=0,todaypks=0,todaydeaths=0 WHERE obj_Id=?"); state.setInt(1, masterId); state.execute(); state.close(); } Announcements.getInstance().announceToAll("PvP Lord is : "+p.getName()); Announcements.getInstance().announceToAll("Today PvPs: "+topTodayPvps); } } catch(Exception e){ e.printStackTrace(); } finally{ try { con.close(); } catch (SQLException e) { e.printStackTrace(); } } } } -
[help] pvp lord engine
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
lock it, i create new topic with more explain. -
[help] pvp lord engine
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
now i use this code, and made after olympiad end is new pvp lord, but then made new pvp lord i need todaypvps,todaypks,todaydeaths clear, then is new pvp lord in navicat set todaypvps,todaypks,todaydeaths 0 but in game i have command getstats, then i wrote it, it show to me real todaypvps,todaypks,todaydeaths and after server restart in navicat back real points, how make that after new pvp lord todaypvps,todaypks,todaydeaths set to 0 and then made new pvp lord, old pvp lord in navicat set pvplord 0 package com.l2jfrozen.gameserver.model.entity; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.Calendar; import java.sql.SQLException; import com.l2jfrozen.util.database.L2DatabaseFactory; import com.l2jfrozen.gameserver.model.entity.Announcements; import com.l2jfrozen.gameserver.thread.ThreadPoolManager; import com.l2jfrozen.gameserver.model.L2World; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; public class PvpLordTask { public static void newPvpLord(){ int masterId = 0; int topTodayPvps = 0; Connection con = null; PreparedStatement state = null; ResultSet rset = null; try{ con = L2DatabaseFactory.getInstance().getConnection(); state = con.prepareStatement("SELECT obj_Id,todaypvps FROM characters ORDER BY todaypvps DESC LIMIT 1;"); rset = state.executeQuery(); if(rset.next()) masterId = rset.getInt(1); if(masterId == 0) return; topTodayPvps = rset.getInt("todaypvps"); state.close(); rset.close(); for(L2PcInstance p : L2World.getInstance().getAllPlayers()){ if(p.getObjectId() == masterId) { p.sendMessage("You are the PvP Lord!"); p.setPvpLord(true); p.broadcastUserInfo(); state = con.prepareStatement("UPDATE characters SET pvplord=1 WHERE obj_Id=?"); state.setInt(1, masterId); state.execute(); state.close(); state = con.prepareStatement("UPDATE characters SET todaypvps=0,todaypks=0,todaydeaths=0 WHERE obj_Id!=?"); state.setInt(1, masterId); state.execute(); state.close(); } Announcements.getInstance().announceToAll("PvP Lord is : "+p.getName()); Announcements.getInstance().announceToAll("Today PvPs: "+topTodayPvps); } } catch(Exception e){ e.printStackTrace(); } finally{ try { con.close(); } catch (SQLException e) { e.printStackTrace(); } } } } -
[help] pvp lord engine
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
vampir, i'm to newbie, after 1 week i use eclipse, but with your help i understand this more and more, so please help to me. in gameserver.java i maked PvpLordTask.getInstance(); _log.info("!!!PvpLordTask: loaded!!!"); this is working, then loading gameserver i see it -
[help] pvp lord engine
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
all working, but i don't understand why in my set time don't set pvp lord and clean todaypvps, todaypks, todaydeaths as i say i wait 10 minutes, but nothing, i change time, but nothing, no errors, so vampir please help to me, because in this situation i'm 0, if i have money i pay to you, i swear, if you help to me i share this to all, PLEASE!!! -
[help] pvp lord engine
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
but if i now what i check, i'm to newbie, please vampir help me, last time... -
[help] pvp lord engine
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
sorry... where put this System.out.println("write something in console") everywhere? -
[Help] PC Bang Points Event
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
pc bang point event fixed, thanks, you can lock it, and i create new topic to pvp lord engine. -
i prefet to be pvp lord in 16:17 but nothing i wait 10 minutes BUT NOTHING... :(( this is code... package com.l2jfrozen.gameserver.model.entity; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.Calendar; import com.l2jfrozen.util.database.L2DatabaseFactory; import com.l2jfrozen.gameserver.model.entity.Announcements; import com.l2jfrozen.gameserver.thread.ThreadPoolManager; import com.l2jfrozen.gameserver.model.L2World; import com.l2jfrozen.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=?,todaypks=?,todaydeaths=?"); stm.setInt(1, 0); stm.execute(); stm.close(); Announcements.getInstance().announceToAll("New PvP Lord: "+newPvpLord); Announcements.getInstance().announceToAll(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, 16); cld.set(Calendar.MINUTE, 17); long time = cld.getTimeInMillis(); if (System.currentTimeMillis()-time <= 0) { return time; } return 0; } }
-
[Help] PC Bang Points Event
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
package com.l2jfrozen.gameserver.model.entity; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.Calendar; import com.l2jfrozen.util.database.L2DatabaseFactory; import com.l2jfrozen.gameserver.model.entity.Announcements; import com.l2jfrozen.gameserver.thread.ThreadPoolManager; import com.l2jfrozen.gameserver.model.L2World; import com.l2jfrozen.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=?,todaypks=?,todaydeaths=?"); stm.setInt(1, 0); stm.execute(); stm.close(); Announcements.getInstance().announceToAll("New PvP Lord: "+newPvpLord); Announcements.getInstance().announceToAll(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, 16); cld.set(Calendar.MINUTE, 17); long time = cld.getTimeInMillis(); if (System.currentTimeMillis()-time <= 0) { return time; } return 0; } } -
[Help] PC Bang Points Event
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
i prefet to be pvp lord in 16:17 but nothing i wait 10 minutes BUT NOTHING... :(( -
[Help] PC Bang Points Event
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
to not create new topic, vampir i need your help, i made on this http://maxcheaters.com/forum/index.php?topic=238056.msg2145283#msg2145283 - pvp lord engine private static long getValidationTime() { Calendar cld = Calendar.getInstance(); cld.set(Calendar.HOUR_OF_DAY, 16); cld.set(Calendar.MINUTE, 17); long time = cld.getTimeInMillis(); if (System.currentTimeMillis()-time <= 0) { return time; } return 0; } } but don't working in 16:17 I had become pvp lord but didn't become, why? -
[Help] daily pvp status voicedcommand
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
i fixed it my self, but thanks for helping, lock it:) -
[Help] PC Bang Points Event
NumL0ck replied to NumL0ck's question in Request Server Development Help [L2J]
# Event Time Stamp. # Default: 900 PcBangPointTimeStamp = 6000 so if i make 3600 pc bang points every 1 hour will be add?