I made this private mvp room script, which using almost the same system as your script
weird, I remembered I made a snippet script before inside eathena script support section ...
but right now I couldn't find back that topic
( wahahahah I got 6.6k post count there, I also can't find my own post myself xD )
anyway I just write this again from scratch
prontera,155,187,5 script sdfjhsdfkj 100,{
// script check for empty room
for ( .@i = 1; .@i <= 8; .@i++ )
if ( getmapusers( "06guild_0"+ .@i ) == 0 )
.password$[.@i] = "";
mes "select a room";
mes " ";
for ( .@i = 1; .@i <= 8; .@i++ )
if ( .password$[.@i] != "" )
mes "^000000Room no."+ .@i +" = ^0000FF"+ .creater_name$[.@i];
next;
for ( .@i = 1; .@i <= 8; .@i++ )
if ( .password$[.@i] == "" )
.@menu$ = .@menu$ +"^000000Room no."+ .@i +" = ^FF0000<Free>:";
else
.@menu$ = .@menu$ +"^000000Room no."+ .@i +" = ^0000FF"+ .creater_name$[.@i] +":";
.@room = select( .@menu$ );
if ( .password$[ .@room ] == "" ) {
if ( zeny < 50000 ) {
mes "you need 50,000 zeny to rent a room";
close;
}
mes "this room is available";
mes "please input a password";
mes "string length : min 4, max 30";
next;
if ( input( .@pass$, 4, 30 ) ) {
mes "invalid string length";
close;
}
if ( .@pass$ == " " ) close;
mes "password set to this ?";
mes "^FF0000"+ .@pass$;
next;
if ( select ( "Yes", "No" ) == 2 ) close;
// double check is there anyone rent faster than you
if ( .password$[ .@room ] != "" ) {
mes "I'm sorry but somebody rent this room faster than you";
close;
}
// again double check the zeny requirement because of Ragnarok stupid mail system (send mail using friend list) <.< always make a habit to counter check item and zeny requirement
if ( zeny < 50000 ) {
mes "don't cheat me";
close;
}
zeny -= 50000; // OOOOPPSS !!
.password$[ .@room ] = .@pass$;
.creater_name$[ .@room ] = strcharinfo(0);
warp "06guild_0"+ .@room, 49, 49;
end;
}
mes "input the password";
// always have some recovery system for GMs to recover password
if ( getgmlevel() == 99 ) {
mes " ";
mes "^FF0000 Admin ONLY";
mes "^0000FF"+ .password$[ .@room ];
}
next;
input .@pass$;
if ( .@pass$ != .password$[ .@room ] ) {
mes "wrong password input";
close;
}
warp "06guild_0"+ .@room, 49, 49;
end;
}
06guild_01 mapflag nowarpto
06guild_02 mapflag nowarpto
06guild_03 mapflag nowarpto
06guild_04 mapflag nowarpto
06guild_05 mapflag nowarpto
06guild_06 mapflag nowarpto
06guild_07 mapflag nowarpto
06guild_08 mapflag nowarpto