Jump to content
  • 0

Premium problem time.


Question

Recommended Posts

  • 0
Posted
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.

 

 

  • 0
Posted

I'm the only one who got the impression that we all have been following the work of this person for a long time and we all know which server sources he uses? Or premium system the same for all l2j forks?

  • 0
Posted

I forget to put source. It is for L2jSunrise. Who make new prem system it is L2-Evanthe, and ofc it is invisible after payment. He don't answer if i report errors. Tell em what i have to post here and i will post. I don;t know from where it is this error. ( i mean from where from java )

  • 0
Posted
4 hours ago, 0flee said:

I forget to put source. It is for L2jSunrise. Who make new prem system it is L2-Evanthe, and ofc it is invisible after payment. He don't answer if i report errors. Tell em what i have to post here and i will post. I don;t know from where it is this error. ( i mean from where from java )

Please don't mention my name. Our work was to create a whole drop system from scratch and a premium for 40e. I only received 17. You said in couple of days i'll get the rest. I never got em. 

 

When you don't have money to buy a code from a person don't lie and tell him/her "i'll pay you the rest in 1-2 days". Simply tell him all i have is 17e. 

Thanks.

  • 0
Posted (edited)

Well, when it is your name in game, you answer?!
+ when you done your job, i will pay you. And i wanted just premium system. New one. And you trick me to change all drop system so? I i post about drop system? Or just for premium?!

I am not scammer. Ask where you want about my payments.
Finish your job, and i'll complete payment!

Edited by 0flee
  • 0
Posted (edited)

Sometimes is permanently lost. For exemple, if i don;t log my char for 4-5 days premium i don;t know how, premium it is lost. It is not a rule to of lost anytime.  And i don;t have how to test this after someone tell me how to fix.

And not after restart. After relog char 4-5 days

Edited by 0flee
  • 0
Posted
22 minutes ago, 0flee said:

Sometimes is permanently lost. For exemple, if i don;t log my char for 4-5 days premium i don;t know how, premium it is lost. It is not a rule to of lost anytime.  And i don;t have how to test this after someone tell me how to fix.

And not after restart. After relog char 4-5 days

Anyways i don't care for the other 20 + e u can keep them and buy a cola. 

Your "problem" is that premium expires. Thats normal. 

 

A system is storing current millisecond. If you log in it check if you're within the time of premium and if you're not it simple don't give you color name and u don't get the stats either. If you're in game it expire in real time cause it use threadpool. 

 

So basically you want to extend the premium. Its normal what is happening.

  • 0
Posted

is not normal Evanthe, player buyed for 1 month, and then he off 4-5 days. When he log again in game, he lost premium :) It is not about expire.

  • 0
Posted
1 hour ago, 0flee said:

is not normal Evanthe, player buyed for 1 month, and then he off 4-5 days. When he log again in game, he lost premium :) It is not about expire.

So the problem from what i understood by your sayings is that, the premium saves data correctly but it doesn't have a choice to save them for a longest time?

  • 0
Posted

yea. If player play everyday, isn;t any problem. But if player take a break and he off for 4-5 days ( in premium time) when he enter on sevrer, he no have anymore premium.

  • 0
Posted
3 minutes ago, 0flee said:

yea. If player play everyday, isn;t any problem. But if player take a break and he off for 4-5 days ( in premium time) when he enter on sevrer, he no have anymore premium.

Ok so premium stays just for five days, you need to add a choice if a player buys a premium with a longer amount to save it in db, so you will need a different set of saved times

  • 0
Posted

I don;t know how to do this.

32 minutes ago, Jobalabido said:

Create different bypasses on the html file, each one will save a different time in db easy

This required java edit or just html?

Guest
This topic is now closed to further replies.
×
×
  • Create New...