Jump to content
  • 0

[Help] PC Bang Points Event


Question

Posted

# Min Player Level.
# Default: 20
PcBangPointMinLevel = 1

# Min Count.
# Default: 20
PcBangPointMinCount = 1

# Max Count.
# Default: 1000000
PcBangPointMaxCount = 1

# Chance of get Double points.
# Default: 20
PcBangPointDualChance = 0

# Event Time Stamp.
# Default: 900
PcBangPointTimeStamp = 6000

 

PcBangPointTimeStamp = 6000 this means every 1 hour? or not?

because i need every 1 hour people gain 1 pc bang point

Recommended Posts

  • 0
Posted

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?

  • 0
Posted

u will need to show more than just getValidationTime(), coz it just returns time, nothing more :)

  • 0
Posted
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;
}
}

Guest
This topic is now closed to further replies.


  • Posts

    • Hello it seems you can't receive PMs, it won't let me, do you use discord?
    • Hello after returning to lineage 2, I was wanting to start some local server development for a few friends and me to play around with but for some reason I'm having trouble after so many years to find a stable high five client. The clients I have found either have crash issue, many errors in the client log files or freeze after only a day or two of playing (autofarming for a day for example, you'll go to teleport after a farm session and the client freezes).   I've played a few High Five servers and it seems a lot of them have been able to optimize it to avoid these problems.  We are running multiple clients per PC so this does sound essential.   I've heard one major feature that is helping client stability is the ability to clear cache/memory without restarting the game or something along those lines.   So I'm wondering if anyone can point me in the direction of obtaining a High Five client that is clean, optimized and decrypted to be able to add customs items etc. for a fair price.  
    • Sometimes you can understand his intentions from the words he uses and the way he says it to you.  
    • Price List tgsession+js and tdata Premium Countries  • +7 🇷🇺 Russia: $0.80  • +55 🇧🇷 Brazil: $0.80  • +31 🇳🇱 Netherlands: $0.80  • +34 🇪🇸 Spain: $0.80  • +39 🇮🇹 Italy: $0.80  • +49 🇩🇪 Germany: $0.80 Standard Countries  • +33 🇫🇷 France: $0.70  • +351 🇵🇹 Portugal: $0.70  • +380 🇺🇦 Ukraine: $0.75 Economy Countries  • +52 🇲🇽 Mexico: $0.65  • +358 🇫🇮 Finland: $0.65  • +965 🇰🇼 Kuwait: $0.60 Popular Choices (Only $0.55 each):  • +48 🇵🇱 Poland  • +91 🇮🇳 India  • +385 🇭🇷 Croatia  • +964 🇮🇶 Iraq  • +43 🇦🇹 Austria  • +972 🇮🇱 Israel  • +44 🇬🇧 UK  • +46 🇸🇪 Sweden  • +90 🇹🇷 Turkey  • +502 🇬🇹 Guatemala Special Prices  • +371 🇱🇻 Latvia: $0.45  • +60 🇲🇾 Malaysia: $0.50  • +54 🇦🇷 Argentina: $0.50  • +505 🇭🇳 Nicaragua: $0.50  • +992 🇹🇯 Tajikistan: $0.50  • +998 🇺🇿 Uzbekistan: $0.50  • +58 🇻🇪 Venezuela: $0.50  • +1441 🇧🇲 Bermuda: $0.45  • +20 🇪🇬 Egypt: $0.45 Most Affordable  • +51 🇵🇪 Peru: $0.50  • +263 🇿🇼 Zimbabwe: $0.50  • +57 🇨🇴 Colombia: $0.50  • +880 🇧🇩 Bangladesh: $0.30  • +95 🇲🇲 Myanmar: $0.30  • +62 🇮🇩 Indonesia / +63 🇵🇭 Philippines: $0.3   TG: providerwstg
  • 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..