Jump to content
  • 0

[-Rates-]*CB


criss22

Question

Hi all, how i can set Rates from community board for premium? I need help syntax in Java.

I have this:

 

content = content.replace("%ratexp%", String.valueOf(Math.round(Config.RATE_XP)));
content = content.replace("%ratesp%", String.valueOf(Math.round(Config.RATE_SP)));
content = content.replace("%ratedrop%", String.valueOf(Math.round(Config.RATE_DROP_ITEMS)));

And looks like 

 

http://YUms3SP.png

I want when player get Premium, to increase +1 for all rates. 

 

Thanks

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
28 minutes ago, criss22 said:

Hi all, how i can set Rates from community board for premium? I need help syntax in Java.

I have this:

 


content = content.replace("%ratexp%", String.valueOf(Math.round(Config.RATE_XP)));
content = content.replace("%ratesp%", String.valueOf(Math.round(Config.RATE_SP)));
content = content.replace("%ratedrop%", String.valueOf(Math.round(Config.RATE_DROP_ITEMS)));

And looks like 

 

http://YUms3SP.png

I want when player get Premium, to increase +1 for all rates. 

 

Thanks

is simple way

 

int _add = 0;

if(activechar.hasPremiumAccount())

      _add = 1;

 

content = content.replace("%ratexp%", String.valueOf(Math.round(Config.RATE_XP + _add))); content = content.replace("%ratesp%", String.valueOf(Math.round(Config.RATE_SP + _add))); content = content.replace("%ratedrop%", String.valueOf(Math.round(Config.RATE_DROP_ITEMS + _add)));

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...