new_1-1,58,112,3 script My House2 4_F_KHELLISIA,{
for (.@i = 0; .@i < 2; .@i++){
mes "Creating Instance";
.@instance = instance_create("MY Instance", getcharid(3) , IOT_CHAR);
if( .@instance == -1 ) {
mes "[^999900My House^000000]";
mes "There is already a House registered for your group.";
close;
}
else if( .@instance < 0 ) {
mes "[^999900My House^000000]";
mes "House creation failed: " + .@instance;
mes "Please report this to a Game Master.";
close;
}
if( instance_attachmap("prontera", .@instance, 1, "via") == "" ) {
instance_destroy(.@instance);
mes "[^999900My House^000000]";
mes "House creation failed. No more free maps.";
mes "Please report this to a Game Master.";
close;
}
instance_attach(.@instance);
instance_set_timeout 14400, 14400,.@instance;
instance_init(.@instance);
sleep2 2000;
instance_destroy(.@instance);
}
close;
}