Jump to content
  • 0

Help Whit %olympaidend%


Mellion

Question

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
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.


×
×
  • Create New...