Jump to content

Recommended Posts

Posted

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.

Posted

It's better to do it every week ...

you can do edit as you want...that's just an engine which can be edit as you imagine/like.

special code for pvp servers amazing xD..

 

thanks.
Posted

http://maxcheaters.com/forum/index.php?topic=237353.0

 

I did something like this , but anyway can you test it please? ( I would , but i formatted my pc before some minutes) .

If it works it will help many people(and me), not only to have this code, but to know how to make seeral things happen an hour they want.

Posted

to know how to make seeral things happen an hour they want.

Just check how olympiad works. It checks the time, and schedules a task to start it. For example, it's 5 o'clock and it starts at 6. It gets what will System.currentTimeMillis() method will return at 6 o'clock and removes from this what does System.currentTimeMillis() returns at 5 o'clock(current time). So what is left from the subtraction is put here:

ThreadPoolManager.getInstance().scheduleGeneral(YOUR_TASK(new object of a class that implements Runnable), HERE);

 

So it schedules the task you want in one hour(at 6 o'clock).

 

P.S. Fanky, there is a mistake in the code(which i made :@), i will tell you later.

Posted

Just check how olympiad works. It checks the time, and schedules a task to start it. For example, it's 5 o'clock and it starts at 6. It gets what will System.currentTimeMillis() method will return at 6 o'clock and removes from this what does System.currentTimeMillis() returns at 5 o'clock(current time). So what is left from the subtraction is put here:

ThreadPoolManager.getInstance().scheduleGeneral(YOUR_TASK(new object of a class that implements Runnable), HERE);

 

So it schedules the task you want in one hour(at 6 o'clock).

 

P.S. Fanky, there is a mistake in the code(which i made :@), i will tell you later.

Making a thread executing every 1 hour and when hour is 22:00 for example then do what you want is a bad way?

Posted

Making a thread executing every 1 hour and when hour is 22:00 for example then do what you want is a bad way?

Yes, because if gameserver.bat begins at 10:20 this task would run every x:20. Also it's not good for server's performance too. But it could work, just not accurately on the hour you want.

 

Try what i told you, it's much better. If you don't understand something i can help you.

Posted

http://maxcheaters.com/forum/index.php?topic=237353.0

 

I did something like this , but anyway can you test it please? ( I would , but i formatted my pc before some minutes) .

If it works it will help many people(and me), not only to have this code, but to know how to make seeral things happen an hour they want.

Ah,damn it.I didnt saw it because you shared it there while it should be here but anyway ;p.

P.S. Fanky, there is a mistake in the code(which i made :@), i will tell you later.

np.
Posted

Well i looked deeper here.

 

 

scheduleGeneral() executes the run() method only 1 time , to make it to happen every day(without server restart) make something for it.

I made this:

 

A different method to read the time needs from when run() executes to the other day.

private static long getT(){
	Calendar c = Calendar.getInstance();

	if(c.get(Calendar.DAY_OF_WEEK) == 7)
		c.set(Calendar.DAY_OF_WEEK, 1);
		else
	    c.set(Calendar.DAY_OF_WEEK, c.get(Calendar.DAY_OF_WEEK) + 1);

	c.set(Calendar.HOUR_OF_DAY, 19);
	c.set(Calendar.MINUTE, 25);

	long ms = c.getTimeInMillis();
	long left = ms - System.currentTimeMillis();

	return left;

}

 

And at the run() method , i add

ThreadPoolManager.getInstance().scheduleGeneral(new Task(), getT());

 

 

Task() is one class for test.

 

So that's create something like loop to happen again and again.

 

Here is the code i made to test it:

package net.sf.l2j.gameserver.model;

import java.util.Calendar;

import net.sf.l2j.gameserver.Announcements;
import net.sf.l2j.gameserver.ThreadPoolManager;

public class Iratus{

private static Iratus _instance;

class Task implements Runnable{
	public void run(){
		Announcements.getInstance().announceToAll("Time:&");
		ThreadPoolManager.getInstance().scheduleGeneral(new Task(), getT());
	}
}

public static Iratus getInstance()
{
	if(_instance == null)
		_instance = new Iratus();

	return _instance;
}


private Iratus(){
	ThreadPoolManager.getInstance().scheduleGeneral(new Task(), getTime());
}


private static long getT(){
	Calendar c = Calendar.getInstance();

	if(c.get(Calendar.DAY_OF_WEEK) == 7)
		c.set(Calendar.DAY_OF_WEEK, 1);
		else
	    c.set(Calendar.DAY_OF_WEEK, c.get(Calendar.DAY_OF_WEEK) + 1);

	c.set(Calendar.HOUR_OF_DAY, 19);
	c.set(Calendar.MINUTE, 25);

	long ms = c.getTimeInMillis();
	long left = ms - System.currentTimeMillis();

	return left;

}
private static long getTime(){

	Calendar c = Calendar.getInstance();
	c.set(Calendar.HOUR_OF_DAY, 19);
	c.set(Calendar.MINUTE, 25);

	long ms = c.getTimeInMillis();
	long timeLeft = ms - System.currentTimeMillis();

	return timeLeft;

}
}

 

 

See it and tell me if i am correct.

Posted

+					PreparedStatement stm = con.prepareStatement("SELECT char_name FROM characters WHERE pvplord=? AND accesslevel=?");
+					stm.setInt(1, 1);
+					stm.setInt(2, 1);

i think in 2nd setInt should be (2,0)

 

also none of "cont" booleans are needed

 

Iracundus i think its ok but things that u are not sure, u can even check on eclipse, just delete ThreadPoolManager and announcement :)

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Introducing: Containers to Roll   Players now have the ability to win containers/cases via the Roll System. Additionally I also added a global leaderboard displaying the users with the most roll games. This can be disabled/enabled via Admin Management Panel. Also improved the winning display with a volumetric Godrays effect.  
    • I search job: posting your advertisement(sale,service) on various forums. Contacts for communication. You can find link for download messenger using Google search.   Telegram https://t.me/negotiato_r @negotiato_r   Element(based in United Kingdom) You can find me using this name. @negotiato-r:matrix.org   Session(based in Switzerland) You can find me using this name. 05770c2eda571fc8d10ec0e79e258ec0d9189def2a3e1f2ace1cd29a2174d40723   Delta Chat(based in Germany) You can find me using the link below. https://i.delta.chat/#1ABEBFFCBC1AEE629111387073FFDA1835BB423E&i=6WtJxcgJGcFD3vIpglQfhe5J&s=f2EkRsqxAeFYep9g9s1y1aIf&a=xuozjaudg%40nine.testrun.org&n=negotiator   I ask administrator or moderator not to consider this link an advertisement for messenger.  This is only link that people can use to contact me.  There is also QR code option,but you have to use mobile phone to access QR code.  This means you have to install VPN app on your mobile phone,then sync your account from your mobile phone to your laptop or computer.  This is a very cumbersome process.  It's much easier to use pre-made link for laptop or computer. Hello. I intermediary. I search job: posting your advertisement(sale,service) on various forums.  My service is free: posting your advertisement(sale,service) on various forums. I know these forum addresses,i can post your ad(for sale,service) on various forums. Dear sellers and those who provide any services. I offer you cooperation. My commission is not taken from your amount,my commission is added to your amount. From money received from guarantor,you pay me my commission.  Payment is made on Tether USDT TRC20 or on Tron TRX. Commission for sending from your wallet to my wallet paid by buyer. When communicating via messenger,please tell me what your commission is for sending on Tether USDT TRC20 or on Tron TRX.  Amount(fees) you'll pay as shipping fee to my wallet will be added to total amount. Payment will be made by guarantor to your payment details. Buyer deposits total amount with my percentage. Send me in messenger your ad copy with price(s). Independently from that through which messenger will be communication,buyer suggests using forum guarantor,gives forum address(http address) and send link(http address) to me,link i will pass on to you(seller) for consideration. If you as seller are not satisfied garant service on proposed forum,i say buyer goodbye and he goes to look for his product(service) from someone else,as result i will wait new buyer.   If sale amount is less than $1000,i receive 20 percent above your total amount. If sale amount is more than $1000,i receive 10 percent above your total amount. I do not deal with either buyers or sellers from Ukraine(i do not cooperate with this country). I will not accept any advertising related to Ukraine,as i do not cooperate with this country. For buyers from other countries guarantor's services are entirely at buyer's expense. You can offer me any other area cooperation that does not violate law.  I do not give 100% guarantee that i will accept your offer,which is not initially related to my advertising area.  It is 50/50 that i will either refuse you or accept your offer.  Everything will depend on whether this offer does not violate law.  I will read information about your product(service) in Google search engine that you offer me for advertising and make decision,which i will inform you in messenger for communication.  I will need some time to familiarize myself with information from Google search engine. I'm currently interested in 4 areas: 1)promotional offers with discounts only(coupons or promo codes):food,shoes,clothing,furniture,cosmetics,household appliances,consumer electronics,taxis,bus tickets,train tickets,plane tickets,hotel tickets,gas coupons or promo codes for car owners I do not advertise Ukraine,do not cooperate with it and have no dealings with it. I will not advertise anything related to carding.  Buyer deposits amount for product(service) plus my commission(20 percent based on amount for product or service) into guarantor and then receives their product(service) in forum transaction.  I would be grateful if it were possible for buyer to receive their goods somehow after depositing money with guarantor,without return address or contact information for future purchases. It's not in my best interests for buyer to communicate directly with you after first purchase. If this isn't possible,then you will simply agree with buyer to receive money with my percentage higher than your initial payment each time. If same customer purchases from you second time,customer pay you together with my percentage and i receive this percentage from you,this will provide additional incentive to advertise,i will promoting you on other forums.     2)selling real estate(houses or apartments) I'm not interested renting. I'm willing to advertise all countries except Russia and Ukraine.  I won't advertise these two countries. I don't advertise Ukraine,don't cooperate with it and have no dealings with it. I'm not interested house or apartment listings that appear on Google search pages,as buyer can find information there themselves without my help and buy house or apartment in desired country. I'm interested house or apartment that aren't listed on Google search. How i see this ad:buyer sees my listing for desired country and if they're interested,they deposit 10 percent listed price for house or apartment in Garant Service. Buyer sets  deadline in forum transaction,during which i either receive my money or don't.  Then buyer receive an address,day and time to meet with seller. Buyer takes lawyer and notary with them and flies(or is driving car) to  given address. If purchase transaction falls through,buyer collects their percentage from guarantor. I don't think buyer willing to buy  house or apartment worth more than 12545$ is willing to cheat me out  that 10 percent by making up  fake story about  failed deal.       3)selling telegram premium status Buyer has two options: 1) transaction through guarantor 2) transaction without guarantor   If transaction is through guarantor. I(intermediary) conduct transaction with guarantor. Buyer specifies following terms in terms transaction: 1) i authorize the disclosure of the transaction name to third parties(that is to you) 2) i authorize the disclosure of the seller's payment details(your payment details) to third parties(that is to you) 3) i authorize the disclosure of the total transaction amount to third parties(that is to you) 4) i do not authorize the disclosure of my profile link on this forum to third parties 5) i do not authorize the disclosure of my contact information(if i have any in my profile on this forum) to third parties   If activating premium status requires logging into buyer's account,i will do this.  You will provide me with instructions on how to activate premium status for buyer's account. If you want to contact me about selling premium status on telegram, but my telegram account is unavailable(account is frozen or telegram system has deleted it),you can contact me using my other contact information. To activate premium status by logging into buyer's account,i will download portable version telegram from official website and launch it on my laptop.  I will enter mobile phone number buyer provides me in messenger they originally contacted me through and send login code to this number.  Buyer will then send me login code. Once transaction is finalized and buyer has deposited funds into guarantor's account I'll notify you via messenger. You register on  forum suggested by buyer.  Message guarantor privately on forum,asking them to share all points I've outlined above.  Buyer will provide  link to guarantor's forum profile in advance or you can find guarantor's forum profile on forum yourself,it's up to you to decide. After verifying that your payment details are included and that transaction amount matches amount agreed upon in messenger, you upgrade buyer to premium status. Your payment details are specified in application,in formquestionnaire for forum transaction,but you won't receive money from guarantor until buyer will not receive service(product),as soon as buyer receives service from you,guarantor will pay you. If buyer has received premium status,you receive funds from guarantor and then pay me my commission using my payment details. The fee for sending from your wallet to my wallet is covered by buyer,not you. When communicating via messenger please tell me your fee for sending to Tether USDT TRC20 or Tron TRX. Buyer deposits funds into guarantor with total amount already including my percentage plus buyer's fee for sending,which you will spend by paying me my percentage when transferring from Tether USDT TRC20 or Tron TRX. If transaction is without guarantor. Buyer pays money to your payment details received from me via messenger and waits for service to be rendered. I will inform buyer total amount when communicating via messenger. You upgrade buyer to premium status through me and then you pay me my percentage to my payment details.  If activating premium status requires logging into buyer's account. I will do so.  You will provide me with instructions on how to activate premium status for buyer's account. Fee for sending from your wallet to my wallet is covered by buyer,not you.  When communicating via messenger please tell me your fee for sending to Tether(USDT TRC20) or Tron(TRX). Buyer pays you total amount,including my percentage plus buyer's fee for sending,which you will spend by paying me my percentage when transferring from Tether USDT TRC20 or Tron TRX.       4)i offer cooperation to specialists who provide services for collecting and submitting documents to consulate for citizenship,residence permits,visas and schengen visas I will advertise service collecting and sending documents to consulate only for following countries:Commonwealth of Independent States,Europe,Mexico,United states america,Canada,United Kingdom,Asia,Africa. Russia and Ukraine:these two countries i will not advertise. Buyer pays guarantor(amount from seller) for service for collecting and sending documents to consulate plus my commission(10 or 20 percent based on service fee). Buyer sets deadline in forum transaction within which they must receive service. Then in forum transaction buyer wait provision service. If after specified period(which will be specified in transaction),consulate refuses client's service,you as specialist have right to charge exact amount for your work through guarantor,since you spent your time on it(this clause will be specified in transaction). What will be amount you will decide,send solution through me.I'll let the buyer know. Client does not pay my percentage if consulate refuses client's service(this clause will be specified in transaction).  In case refusal to buyer from consulate you will need to confirm this refusal through website. Whenever you collect and submit documents on country's website,request is created through their website.  You will provide access to this request to guarantor.  This is necessary to ensure that buyer doesn't pay for nothing,meaning amount you will be required to receive through  guarantor for service provided if  consulate's request is unsuccessful.
    • Hey MaxCheaters! 👋 Introducing L2Soon.com — a free international platform for Lineage 2 server announcements.   Why L2Soon? No more searching through dozens of forums and Discord servers. All new L2 server openings are in one place — updated daily, with real player online counts so you always know where people actually play.   Features: 🔔 Telegram Bot (@l2Soon_bot) — alerts 24h & 1h before server launch 📅 Accurate launch times — in your local timezone ⚔️ All chronicles — Interlude, High Five, GoD, Classic, Essence, Grand Crusade and more 🎯 Filters — by chronicle, rates (x1–x1000+) and server type (PvP, RvR, GvE, Craft, Low Rate...) ⭐ VIP servers — verified projects pinned at the top 🌍 Multi-language — EN, UK, RU, PT   Listing is completely FREE. 🔗 https://l2soon.com/en Feedback welcome — drop a comment or contact us via Telegram @l2Soon_bot
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..