Reformat and clean up portal scripts

This commit is contained in:
P0nk
2021-09-09 23:35:59 +02:00
parent d893309b4f
commit a78ca88a02
435 changed files with 2712 additions and 2287 deletions

View File

@@ -1,21 +1,21 @@
/**
* @author: Ronan
* @event: Jail
*/
*/
function enter(pi) {
var jailedTime = pi.getJailTimeLeft();
if(jailedTime <= 0) {
pi.playPortalSound(); pi.warp(300000010,"in01");
return true;
}
else {
var seconds = Math.floor(jailedTime / 1000) % 60 ;
var minutes = (Math.floor(jailedTime / (1000*60)) % 60);
var hours = (Math.floor(jailedTime / (1000*60*60)) % 24);
pi.playerMessage(5, "You have been caught in bad behaviour by the Maple POLICE. You've got to stay here for " + hours + " hours " + minutes + " minutes " + seconds + " seconds yet.");
return false;
}
var jailedTime = pi.getJailTimeLeft();
if (jailedTime <= 0) {
pi.playPortalSound();
pi.warp(300000010, "in01");
return true;
} else {
var seconds = Math.floor(jailedTime / 1000) % 60;
var minutes = (Math.floor(jailedTime / (1000 * 60)) % 60);
var hours = (Math.floor(jailedTime / (1000 * 60 * 60)) % 24);
pi.playerMessage(5, "You have been caught in bad behaviour by the Maple POLICE. You've got to stay here for " + hours + " hours " + minutes + " minutes " + seconds + " seconds yet.");
return false;
}
}