yuno,209,310,6 script Tapestry 111,{
mes "[Tapestry]";
mes "Please select a private Riot room.";
if ( getvariableofnpc(.rentitemid, "MVP Summoner") && getvariableofnpc(.rentitemamount, "MVP Summoner") )
mes "The cost to rent a room for "+ getvariableofnpc(.timeout, "MVP Summoner") +" minutes is "+ getvariableofnpc(.rentitemamount, "MVP Summoner") +" "+ getitemname( getvariableofnpc(.rentitemid, "MVP Summoner") ) +".";
else if ( getvariableofnpc(.rentcost, "MVP Summoner") )
mes "The cost to rent a room for "+ getvariableofnpc(.timeout, "MVP Summoner") +" minutes is "+ callfunc("int__", getvariableofnpc(.rentcost, "MVP Summoner") ) +" zeny.";
else
mes "You can only use the room for only "+ getvariableofnpc(.timeout, "MVP Summoner") +" minutes.";
mes " ";
for ( set .@i, 1; .@i <= 8; set .@i, .@i +1 ) {
if ( getvariableofnpc(.remaintime[.@i],"MVP Summoner") ) {
switch ( .type[.@i] ) {
case 1: set .@color$, "^EE8800"; break;
case 2: set .@color$, "^70CC11"; break;
case 3: set .@color$, "^0000FF"; break;
default: set .@color$, "^000000";
}
mes "Room #"+ .@i +" = "+ .@color$ + .whoinuse$[.@i] +"^000000";
}
}
next;
set .@room, select("Tier 1 ["+ getmapusers("06guild_01") +"]",
"Tier 2 ["+ getmapusers("06guild_02") +"]",
"Tier 3 ["+ getmapusers("06guild_03") +"]",
"Tier 4 ["+ getmapusers("06guild_04") +"]");
if ( getvariableofnpc(.remaintime[.@room],"MVP Summoner") ) {
if ( .inuseid[.@room] == getcharid(.type[.@room]) ) {
if ( getvariableofnpc(.killmonster,"MVP Summoner") && getmapusers("06guild_0"+ .@room) == 0 )
killmonsterall "06guild_0"+ .@room;
warp "06guild_0"+ .@room, 0,0;
end;
} else {
mes "[Special Quest]";
switch ( .type[.@room] ) {
case 1: set .@color$, "^EE8800Party "; break;
case 2: set .@color$, "^70CC11Guild "; break;
case 3: set .@color$, "^0000FFPlayer ";
}
mes "This room is reserved for ";
mes .@color$ + .whoinuse$[.@room] +"^000000 .";
if ( getgmlevel() < getvariableofnpc(.gmlvlkick,"MVP Summoner") ) {
mes "Please select another.";
close;
}
mes " ";
mes "Currently there are "+ getmapusers("06guild_0"+ .@room) +" players";
mes "in that room.";
set .@remaintime, getvariableofnpc(.remaintime[.@room],"MVP Summoner");
mes "It still has "+( .@remaintime /10 )+"mn "+( .@remaintime %10 )+"s left.";
set .@nobodycounter, getvariableofnpc(.nobodycounter[.@room],"MVP Summoner");
if ( .@nobodycounter )
mes "And have left empty for "+( .@nobodycounter /10 )+"mn "+( .@nobodycounter %10 )+"s.";
mes "Kick them ?";
next;
if ( select ( "No:Yes" ) == 1 ) close;
set getvariableofnpc(.remaintime[.@room],"MVP Summoner"), -1;
mes "[Private MVP Room]";
mes "Room#"+ .@room +" is empty now.";
close;
}
}
mes "[Tapestry]";
if ( getvariableofnpc(.rentitemid, "MVP Summoner") && getvariableofnpc(.rentitemamount, "MVP Summoner") ) {
if ( countitem(getvariableofnpc(.rentitemid, "MVP Summoner")) < getvariableofnpc(.rentitemamount, "MVP Summoner") ) {
mes "You don't have enough "+ getitemname( getvariableofnpc(.rentitemid, "MVP Summoner") ) +" to rent a room.";
close;
}
}
else if ( getvariableofnpc(.rentcost, "MVP Summoner") ) {
if ( zeny < getvariableofnpc(.rentcost, "MVP Summoner") ) {
mes "You don't have enough zeny to rent a room.";
close;
}
}
mes "You reserve this room for ...";
next;
set .@type, select("For my party members" );
if ( getcharid(.@type) == 0 ) {
mes "[Private MVP Room]";
mes "You do not own a "+( (.@type == 1)?"Party":"Guild" )+".";
close;
}
else if ( getvariableofnpc(.rentitemid, "MVP Summoner") && getvariableofnpc(.rentitemamount, "MVP Summoner") ) {
if ( countitem(getvariableofnpc(.rentitemid, "MVP Summoner")) < getvariableofnpc(.rentitemamount, "MVP Summoner") ) {
mes "You don't have enough "+ getitemname( getvariableofnpc(.rentitemid, "MVP Summoner") ) +" to rent a room.";
close;
}
}
else if ( getvariableofnpc(.remaintime[.@room],"MVP Summoner") ) {
mes "[Private MVP Room]";
mes "I'm sorry, somebody else has already register this room faster than you.";
close;
}
for ( set .@i, 1; .@i <= 8; set .@i, .@i +1 ) {
if ( getvariableofnpc(.remaintime[.@i],"MVP Summoner") && .@type == .type[.@i] && getcharid(.@type) == .inuseid[.@i] ) {
mes "[Private MVP Room]";
mes "You already rented Room#"+ .@i +". Use that room instead.";
close;
}
}
set .type[.@room], .@type;
set .inuseid[.@room], getcharid(.@type);
set .whoinuse$[.@room], strcharinfo( (.@type == 3)?0:.@type );
if ( getvariableofnpc(.rentitemid, "MVP Summoner") && getvariableofnpc(.rentitemamount, "MVP Summoner") ) {
if ( countitem(getvariableofnpc(.rentitemid, "MVP Summoner")) < getvariableofnpc(.rentitemamount, "MVP Summoner") ) end;
delitem getvariableofnpc(.rentitemid, "MVP Summoner"), getvariableofnpc(.rentitemamount, "MVP Summoner");
}
else if ( getvariableofnpc(.rentcost, "MVP Summoner") ) {
if ( zeny < getvariableofnpc(.rentcost, "MVP Summoner") ) end;
set zeny, zeny - getvariableofnpc(.rentcost, "MVP Summoner");
}
warp "06guild_0"+ .@room, 0,0;
killmonsterall "06guild_0"+ .@room;
donpcevent "MVP Summoner#"+ .@room +"::OnEnterMap";
end;
}
06guild_01,45,54,6 duplicate(MVP Summoner) MVP Summoner#1 116
06guild_02,45,54,6 duplicate(MVP Summoner) MVP Summoner#2 116
06guild_03,45,54,6 duplicate(MVP Summoner) MVP Summoner#3 116
06guild_04,45,54,6 duplicate(MVP Summoner) MVP Summoner#4 116
this script is working fine and have no error BUT, when im changing the "06guild_0" to other map like for sample novice its having errors T_T it need atleast 4 map in this script..what should i do??
Question
chromus28
this script is working fine and have no error BUT, when im changing the "06guild_0" to other map like for sample novice its having errors T_T it need atleast 4 map in this script..what should i do??
Edited by chromus280 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.