Skip to content

Premium problem time.

Featured Replies

Solved by Kara

10 minutes ago, 0flee said:

I don;t know how to do this.

This required java edit or just html?

both

  • Author

Then i don;t know how to do.

1 minute ago, 0flee said:

Then i don;t know how to do.

why don't you just pay someone to do it then, or maybe pay the 20 rest euros to the guy who started it

  • Author

He don;t answer on Discord.

How much you want to fix for me this? Can't be expensive

36 minutes ago, Jobalabido said:

why don't you just pay someone to do it then, or maybe pay the 20 rest euros to the guy who started it

I won't take the 70% of the money he own me after 2 months. I'm not starving. I have some pride. 

Even tho all he want is the premium to stop when player log out and re-start when he log-in cause right now it expire cause it use system current millisecond.

 

He actualy need to add a scheduled future and get the remaining in millisecond and store.

  • Author

So when a player buys premium for a month. For example, starting today. And he goes out for 4-5 days. he just doesn't come in because he can't. And after 4-5 days when he enters, he has no premium. (Buying premium 4-5 days ago for a month)

Edited by 0flee

  • Author

Ty

Edited by 0flee

  • 2 months later...
  • Author

Can someone help me with this error please?

On 9/27/2020 at 7:37 PM, 0flee said:

So when a player buys premium for a month. For example, starting today. And he goes out for 4-5 days. he just doesn't come in because he can't. And after 4-5 days when he enters, he has no premium. (Buying premium 4-5 days ago for a month)

This doesn't make sense at all. Are you sure that this player bought vip for a month and not for a couple of days?

  • Author

I use admin command to do that

so the command it is like that  //premium user 30 

So,  //premium it is command, user it is player name and 30 it is days of premium. But soometimes, i repeatly 50 times, it is expire. Idk how it is possible...maybe who make this system for me ( L2-Evanthe) it is nab

I request a repeat this, but the price it is too high. And yes, this can be fixed. But someone from this forum ask me if i have 20 euro. Really? So again, someone can help me to fix this? or i can do against cost?

  • 2 months later...
  • Author

I find problem. When player create a new character on same account with premium character, the premium is removed. Can someone help?

Edited by 0flee

5 minutes ago, 0flee said:

I find problem. When player create a new character on same account with premium character, the premium is removed. Can someone help?

You should attach vip status on characters and not accounts 😛

  • Solution
7 hours ago, 0flee said:

I find problem. When player create a new character on same account with premium character, the premium is removed. Can someone help?

 

Either you learn to code your self or request help for fix something. What you do here is requesting a mod to avoid pay, do not complain.

 

Regardless about your request you need to do a database check upon login in EnterWorld.java or in method located in Player.java called onPlayerEnter()

 

Your code should look like this:

 

try (Connection con = L2DatabaseFactory.getInstance().getConnection();
	PreparedStatement ps = con.prepareStatement("SELECT premium_time FROM accounts WHERE login=?"))
{
	ps.setString(1, name);

	try (final ResultSet rset = ps.executeQuery())
	{
		if (rset.next())
		{
			final long premiumTime = rset.getLong(1);
		}
	}
}
catch (final Exception ex)
{
	Logger.getLogger().log(Level.WARNING, "Failed to retrieve premium info for player: " + this, ex);
}

 

After you retrieve the premiumTime which gonna be a long type value that include System.currentMillisecond + the duration of the premium, you can do your check.

 

Also you need to move the premiumTime from Characters table to the Accounts and remove any relative code that read it from Characters table.

 

 

  • Vision locked this topic
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.