New mechanic: Jail + fixed mob book cover issues
Added new mechanic: jail. Fixed missing card info reference about dropper mobs on the sql, reflecting into erros on the monster book.
This commit is contained in:
9
scripts/portal/jail_in.js
Normal file
9
scripts/portal/jail_in.js
Normal file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* @author: Ronan
|
||||
* @event: Jail - visit to jail :3
|
||||
*/
|
||||
|
||||
function enter(pi) {
|
||||
pi.warp(300000012,0);
|
||||
return(true);
|
||||
}
|
||||
21
scripts/portal/jail_out.js
Normal file
21
scripts/portal/jail_out.js
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @author: Ronan
|
||||
* @event: Jail
|
||||
*/
|
||||
|
||||
function enter(pi) {
|
||||
var jailedTime = pi.getJailTimeLeft();
|
||||
|
||||
if(jailedTime <= 0) {
|
||||
pi.warp(300000010,0);
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user