Jump to content
  • 0

Help Whit %olympaidend%


Question

Posted (edited)
Hello, I want to ask why not working on my html this command %OlympaidEnd%, I used this in frozen its works perfect. Here command

(location npchtmlmessage)

protected static int _period;

 

public void replace(String pattern, String value)

{

long milliToEnd;

if(_period == 0)

{

milliToEnd = Olympiad.getMillisToOlympiadEnd();

}

else

{

milliToEnd = Olympiad.getMillisToValidationEnd();

}

 

double numSecs = milliToEnd / 1000 % 60;

double countDown = (milliToEnd / 1000 - numSecs) / 60;

int numMins = (int) Math.floor(countDown % 60);

countDown = (countDown - numMins) / 60;

int numHours = (int) Math.floor(countDown % 24);

int numDays = (int) Math.floor((countDown - numHours) / 24);

 

_html = _html.replaceAll("%OlympaidEnd%", "Olympiad period ends in " + numDays + " days, " + numHours + " hours, " + numMins + " minutes." );

_html = _html.replace("%online1%",  + World.getInstance().getAllPlayers().size()*2 + "");

        _html = _html.replaceAll(pattern, value);

 

}

Not working for me :(

Edited by Mellion

2 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.


×
×
  • 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..