
Originally Posted by
The Sharingan
I'm not really sure, but maybe this would work.
PHP Code:
var d = new Date();
var n = d.getHours();
if(n >= 15 && n <= 20) {
warp.
} else {
closed
}
You might need an importPackage.
This way?
PHP Code:
/* vars */
var status = 0;
var date = new Date();
var hour = date.getHours();
function start(){
cm.sendNext("You want to start the quest?");
}
function action(mode, type, selection) {
var em = cm.getEventManager("CashPQ");
if(hour >= 15 && hour <= 20) {
em.startInstance(cm.getChar().getMap());
cm.dispose();
} else {
cm.sendOk("NPC closed.");
cm.dispose();
}