It's my private script... I will share more of it with you though.
mes "What would you like to do?";
switch(select("Start Instance:Re-enter Instance:Quit")) {
Case 1:
if(CT_Lasttime + $CT_Cooldown > gettimetick(2) && CT_Lasttime < gettimetick(2)) {
set .@last,CT_Lasttime + $CT_Cooldown - gettimetick(2);
set .@hours,.@last / 60 / 60;
set .@minutes,.@last / 60 % 60;
set .@seconds,.@last % 60;
mes "Due to the cooldown limit,";
mes "you cannot start the instance right";
mes "now, "+.@hours+"hours "+.@minutes+"minutes "+.@seconds+"seconds";
mes "left to start the next instance.";
close;
}
getpartymember(getcharid(1));
if(!getcharid(1) || $@partymembercount < $CT_Minparty){
mes "Make or join a party with more than "+$CT_Minparty+" member!";
close;
}
if(instance_id(1)){
if(has_instance("1@cash") == ""){
mes "Your group is already registered at another instance.";
close;
}
mes "Your group is already registered.";
mes "Select ^0000FFRe-Enter Instance^000000 in the main menu to enter.";
close;
}
set .@instance, instance_create("Instance Test", getcharid(1));
instance_attachmap "1@cashl", .@instance;
instance_set_timeout(7200,300,.@instance);
instance_init .@instance;
set .@a$, has_instance("1@cash");
warp has_instance("1@cash"),0,0;
set CT_Lasttime,gettimetick(2) + $CT_Timelimit;
end;
Case 2:
if(!instance_id(1) || has_instance("1@val") == ""){
mes "The Instance does not exist.";
mes "Please confirm with your party leader whether the Instance";
mes "has been destroyed or if the time given for entering has expired.";
close;
}
instance_attach instance_id(1);
warp has_instance("1@cash"),100,8;
set CT_Lasttime,gettimetick(2) + $CT_Timelimit;
end;
Case 3:
close;
}