Jump to content
  • 0

[-Rates-]*CB


Question

Posted

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

2 answers to this question

Recommended Posts

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

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