// ....... if your server has { Overwriting user function [int__] } don't blame me ..........function script int__ {set .@num, atoi(getarg(0));if( .@num ==0 || .@num >=2147483647)returngetarg(0);set .@l, getstrlen(.@num);for(set .@i,0; .@i < .@l; set .@i, .@i +1){set .@num$, .@num %pow(10,.@i+1)/pow(10,.@i)+ .@num$;if((.@i+1)%3==0&& .@i+1!= .@l )set .@num$, ","+ .@num$;}return .@num$;}//===== eAthena Script ======================================//= Private MVP/Branch Room//===== By: ===============================================//= by ~AnnieRuru~//===== Current Version: ======================================//= 1.3//===== Compatible With: ===================================== //= eAthena 11650 Trunk above or 11863 Stable above//===== Description: ========================================= //= Player can rent MVP room for the player him/herself, for party or for guilds//===== Topic =================================================//= http://www.eathena.ws/board/index.php?showtopic=187654//===== Additional Comments: ================================== //= 1.0 //= ---- break the tradition which a script only for a player, or only for a party.//= now 1 room can be use for party and another room can use for guilds.//= ---- timeout feature to prevent player owns the room indefinitely,//= by create a new account and sit/@at'ing inside overnight.//= ---- can disable mvp/boss summon via configuration and becomes a branch room script.//= ---- a double check to prevent players rent all the rooms for himself.//= 1.0a//= ---- fix a critial bug that the time count too fast -_-"//= 1.1//= ---- added item cost to rent or to summon//= ---- added a config to limit summoning per session//= ---- added flood control option//= 1.2//= ---- rewrite the waitingroom counter//= ---- optimize the script in a way can add custom summon group//= ---- add config to kill the monsters if the room just being left empty//= ---- add GM can kick room in use//= ---- add able to spawn in numbers//= ---- add limitspawn can configure to negative to limit spawn in that group instead of individual one//= 1.3//= ---- fix chatroom countdown issue due to rev13269//= ---- fix a bug if 2 people rent a room at same time, the later 1 will get the room//= ---- add a feature so the GM can know how long the room has rented or abandoned//= 1.4//= ---- update with new mvp and mini bosses//= ---- fix an exploit if server allow to use @mail, player can send item/zeny away to prevent item/zeny deletion when registering the room//= ---- players die inside mvp room shouldn't lose exp//========================================================// This is the shop for this Branch room IF you already enable it. Can sell whatever things you want.- shop MVP room#branch -1,604:100000,12103:1000000- script MVP Summoner -1,{goto L_Start;OnInit:getmapxy .@map$, .@x, .@y, 1;if( .@map$ ==""){// Config ---------------------------------------------------------------------------------------// Time for rent a room IN MINUTES. When time out, players inside the room will kick out. Do Not set this as 0set .timeout, 60;// if the room left empty for # minutes, will be treated as give up the room. Do Not set this as 0set .nobodygiveup, 5;// NOTE : The script only search item OR zeny. if you specify item amount, then it will ask for the item. If item amount is 0, then it will ask for zeny.// the cost to rent a roomset .rentitemid, 674; // item id use for rent a room - 674 - mithil coinset .rentitemamount, 0; // amount of items to rent a roomset .rentcost, 1000000; // otherwise, zeny cost to rent a room// limit each room can only summon 1 monster at a time. (only the Summoning option)// Turn it off (0) means the player can summon a lot of monsters as long as the player has enough zeny/item. High rate server players love the room with a lot MVPs// Turn it on (1) means the player have to kill existing monster before can summon a new one. Low rate server player prefer to take out MVP 1 by 1set .floodcontrol, 0;// if .floodcontrol is turn off, your players might experience lag if they summoned too many MVPs// so what is the maximum input to limit your players summon too many ?set .inputlimit, 30;// If the room has left over monsters while nobody in the room and the room not give up yet, shall we kill monsters in empty room ?set .killmonster, 1; // Default is yes// Options menu setting for MVP Summoner NPC.set .@menu[0], 1; // Turn Heal option On/Offset .@menu[1], 1; // Turn Group 1 summons On/Off -> MVPset .@menu[2], 1; // Turn Group 2 summons On/Off -> mini bossset .@menu[3], 0; // Turn Group 3 summons On/Offset .@menu[4], 0; // Turn Group 4 summons On/Offset .@menu[5], 0; // Turn Group 5 summons On/Offset .@menu[6], 0; // Turn Group 6 summons On/Offset .@menu[7], 0; // Turn Group 7 summons On/Offset .@menu[8], 0; // Turn Group 8 summons On/Offset .@menu[9], 0; // Turn Group 9 summons On/Offset .@menu[10], 0; // Sell shop items options On/Off ( shop npc above )// set respawn point when they leave the room. Obviously warp to the Private MVP Room Warper npcset .respawnmap$, "prontera"; // Note : "SavePoint" does NOT workset .respawnx, 150;set .respawny, 174;// The minimum GM level can kick a room in useset .gmlvlkick, 80;// .limitspawn in previous revision changed to .grouplimit .// it is for limit each monster spawn per session, prevent them only killing same monster again and again// Now you can configure one group has limited summon, and another group has unlimited summon// Tips: if you server has an insane custom MVP, you can put your custom mob to Group 3~9 with insane item cost, and limit only 1 summon per session// .grouplimit use amount, means if group1limit set to 10, then each session can only summon up to 10 amount of that kind of monster. 0 is unlimited// ---------// Group 1 -> MVP // ---------set .group1name$, "MVP"; // Group 1 nameset .group1itemid, 674; // item id use for summon any Group 1 monster - 674 - mithil coinset .group1itemamount, 0; // amount of items to summon a Group 1 monsterset .group1cost, 100000; // if no item is specify, zeny cost to summon a Group 1 monsterset .group1limit, 0; // limit of summon of Group 1 monster per session, prevent them only killing same monster again and againsetarray .group1id,1511,// Amon Ra1647,// Assassin Cross Eremes1785,// Atroce1630,// Bacsojin1039,// Baphomet1874,// Beelzebub1272,// Dark Lord1719,// Datale1046,// Doppelgangger1389,// Dracula1112,// Drake1115,// Eddga1418,// Evil Snake Lord1871,// Fallen Bishop1252,// Garm1768,// Gloom Under Night1086,// Golden Thief Bug1885,// Gopinich1649,// High Priest Magaleta1651,// High Wizard Katrinn1832,// Ifrit1492,// Incantation Samurai1734,// Kiel D-011251,// Knight of Windstorm1779,// Ktullanux// 1980,// Kubkin ( I think this mvp is still new )1688,// Lady Tanee1646,// Lord Knight Seyren1373,// Lord of Death1147,// Maya1059,// Mistress1150,// Moonlight Flower1087,// Orc Hero1190,// Orc Lord1038,// Osiris1157,// Pharaoh1159,// Phreeoni1623,// RSX 08061650,// Sniper Shecil1583,// Tao Gunka1708,// Thanatos1312,// Turtle General1751,// Valkyrie Randgris1685,// Vesper1648,// Whitesmith Harword1917,// Wounded Morroc1658;// Ygnizem// ---------// Group 2 -> mini boss// ---------set .group2name$, "mini boss"; // Group 2 nameset .group2itemid, 674; // item id use for summon any Group 2 monster - 674 - mithil coinset .group2itemamount, 0; // amount of items to summon a Group 2 monsterset .group2cost, 10000; // if no item is specify, zeny cost to summon a Group 2 monsterset .group2limit, 0; // limit of summon of Group 2 monster per session, prevent them only killing same monster again and againsetarray .group2id,1096,// Angeling1388,// Archangeling1795,// Bloody Knight1830,// Bow Guardian1839,// Byorgue1309,// Cat O' Nine Tail1283,// Chimera1302,// Dark Illusion1198,// Dark Priest1582,// Deviling1091,// Dragon Fly1093,// Eclipse1205,// Executioner1783,// Galion1592,// Gangster1120,// Ghostring1259,// Gryphon1720,// Hydro1090,// Mastering1289,// Maya Purple1262,// Mutant Dragon1203,// Mysteltainn1870,// Necromancer1295,// Owl Baron1829,// Sword Guardian1204,// Tirfing1089,// Toad1092,// Vagabond Wolf1765;// Valkyrie// ---------// Group 3// ---------set .group3name$, "Poring-Family"; // Group 3 nameset .group3itemid, 12109; // item id use for summon any Group 3 monster - 12109 - Poring boxset .group3itemamount, 1; // amount of items to summon a Group 3 monsterset .group3cost, 0; // if no item is specify, zeny cost to summon a Group 3 monsterset .group3limit, -5; // limit of summon of Group 3 monster per session, prevent them only killing same monster again and againsetarray .group3id,1002,// Poring1113,// Drops1031,// Poporing1242,// Marin1062,// Santa Poring1613,// Metaling1784,// Stapo1090,// Mastering1096,// Angeling1120,// Ghostring1582,// Deviling1388,// Arc Angeling1502;// Pori Pori// ---------// Group 4// ---------set .group4name$, ""; // Group 4 nameset .group4itemid, 0; // item id use for summon any Group 4 monsterset .group4itemamount, 0; // amount of items to summon a Group 4 monsterset .group4cost, 0; // if no item is specify, zeny cost to summon a Group 4 monsterset .group4limit, 0; // limit of summon of Group 4 monster per session, prevent them only killing same monster again and againsetarray .group4id,1001,1002;// ---------// Group 5// ---------set .group5name$, ""; // Group 5 nameset .group5itemid, 0; // item id use for summon any Group 5 monsterset .group5itemamount, 0; // amount of items to summon a Group 5 monsterset .group5cost, 0; // if no item is specify, zeny cost to summon a Group 5 monsterset .group5limit, 0; // limit of summon of Group 5 monster per session, prevent them only killing same monster again and againsetarray .group5id,1001,1002;// ---------// Group 6// ---------set .group6name$, ""; // Group 6 nameset .group6itemid, 0; // item id use for summon any Group 6 monsterset .group6itemamount, 0; // amount of items to summon a Group 6 monsterset .group6cost, 0; // if no item is specify, zeny cost to summon a Group 6 monsterset .group6limit, 0; // limit of summon of Group 6 monster per session, prevent them only killing same monster again and againsetarray .group6id,1001,1002;// ---------// Group 7// ---------set .group7name$, ""; // Group 7 nameset .group7itemid, 0; // item id use for summon any Group 7 monsterset .group7itemamount, 0; // amount of items to summon a Group 7 monsterset .group7cost, 0; // if no item is specify, zeny cost to summon a Group 7 monsterset .group7limit, 0; // limit of summon of Group 7 monster per session, prevent them only killing same monster again and againsetarray .group7id,1001,1002;// ---------// Group 8// ---------set .group8name$, ""; // Group 8 nameset .group8itemid, 0; // item id use for summon any Group 8 monsterset .group8itemamount, 0; // amount of items to summon a Group 8 monsterset .group8cost, 0; // if no item is specify, zeny cost to summon a Group 8 monsterset .group8limit, 0; // limit of summon of Group 8 monster per session, prevent them only killing same monster again and againsetarray .group8id,1001,1002;// ---------// Group 9// ---------set .group9name$, ""; // Group 9 nameset .group9itemid, 0; // item id use for summon any Group 9 monsterset .group9itemamount, 0; // amount of items to summon a Group 9 monsterset .group9cost, 0; // if no item is specify, zeny cost to summon a Group 9 monsterset .group9limit, 0; // limit of summon of Group 9 monster per session, prevent them only killing same monster again and againsetarray .group9id,1001,1002;// Config Ends ------------------------------------------------------------------------if( .timeout==0)set .timeout, 60;if( .nobodygiveup==0)set .nobodygiveup, 5;if( .inputlimit < 1)set .inputlimit, 1;if( .rentitemid&& .rentitemamount){if(getitemname(.rentitemid)=="null"){debugmes"Private MVP Room: Rent a room is using invalid item id.";}}set .@i, 1;while( .@i <=9){if( .@menu[.@i]&&getd(".group"+ .@i +"itemid")&&getd(".group"+ .@i +"itemamount")){if(getitemname(getd(".group"+ .@i +"itemid"))=="null"){debugmes"Private MVP Room: Group no. "+ .@i +" is using invalid item id.";}}set .@i, .@i +1 ;}set .menu$, ((.@menu[0])?"Heal":"")+":"+((.@menu[1])?"Summon "+ .group1name$:"")+":"+((.@menu[2])?"Summon "+ .group2name$:"")+":"+((.@menu[3])?"Summon "+ .group3name$:"")+":"+((.@menu[4])?"Summon "+ .group4name$:"")+":"+((.@menu[5])?"Summon "+ .group5name$:"")+":"+((.@menu[6])?"Summon "+ .group6name$:"")+":"+((.@menu[7])?"Summon "+ .group7name$:"")+":"+((.@menu[8])?"Summon "+ .group8name$:"")+":"+((.@menu[9])?"Summon "+ .group9name$:"")+":"+((.@menu[10])?"Buy branches":"")+":Leave this room:Give up this room";set .@i, 1;while( .@i <=9){setd".group"+ .@i +"idsize", getarraysize(getd(".group"+ .@i +"id"));if( .@menu[.@i]&&getd(".group"+ .@i +"limit") <=0){set .@j, 0;while( .@j < getd(".group"+ .@i +"idsize")){setd".group"+ .@i +"menu$", getd(".group"+ .@i +"menu$")+getmonsterinfo(getd(".group"+ .@i +"id["+ .@j +"]"), 0)+":";set .@j, .@j +1 ;}}set .@i, .@i +1 ;}}else{sleep1;mapannounce .@map$, "Admin has refresh the server, please register the room again.", 1;mapwarp .@map$, .respawnmap$, .respawnx, .respawny;}end;L_Start:// I hate gotos ... but ...set .@dif, strnpcinfo(2);if( .remind[.@dif]==0){set .remind[.@dif], 1;initnpctimer;}mes"[MVP Summoner]";mes"Hi, what can I do for you ?";next;switch(select(.menu$)){case1:mes"[MVP Summoner]";if( getmapmobs("this") > 0){mes"I cannot offer heal service when there are monsters around.";close;}sc_end sc_stone;sc_end sc_slowdown;sc_end sc_freeze;sc_end sc_sleep;sc_end sc_curse;sc_end sc_silence;sc_end sc_confusion;sc_end sc_blind;sc_end sc_bleeding;sc_end sc_decreaseagi;sc_end sc_poison;sc_end sc_hallucination;sc_end sc_stripweapon;sc_end sc_striparmor;sc_end sc_striphelm;sc_end sc_stripshield;sc_end sc_changeundead;sc_end sc_orcish;sc_end sc_berserk;sc_end sc_ske;sc_end sc_swoo;sc_end sc_ska;percentheal100,100;specialeffect27;mes"You have completely healed.";close;default:set .@group, @menu-1;if( .floodcontrol&& getmapmobs("this") > 0){mes"[MVP Summoner]";mes"I cannot summon another monster when there are monsters around.";close;}elseif(getd(".group"+ .@group +"itemid")&&getd(".group"+ .@group +"itemamount")){mes"[MVP Summoner]";mes"The cost to summon a "+getd(".group"+ .@group +"name$")+" is "+getd(".group"+ .@group +"itemamount")+" "+getitemname(getd(".group"+ .@group +"itemid"))+".";if(getd(".group"+ .@group +"limit") < 0)mes"("+(( ~getd(".group"+ .@group +"limit")+1-getd(".group"+ .@group +"limit"+ .@dif) <=0)?0:( ~getd(".group"+ .@group +"limit")+1-getd(".group"+ .@group +"limit"+ .@dif)))+") more summons for this group.";next;}elseif(getd(".group"+ .@group +"cost")){mes"[MVP Summoner]";mes"The cost to summon a "+getd(".group"+ .@group +"name$")+" is "+callfunc("int__", getd(".group"+ .@group +"cost"))+" zeny.";if(getd(".group"+ .@group +"limit") < 0)mes"("+(( ~getd(".group"+ .@group +"limit")+1-getd(".group"+ .@group +"limit"+ .@dif) <=0)?0:( ~getd(".group"+ .@group +"limit")+1-getd(".group"+ .@group +"limit"+ .@dif)))+") more summons for this group.";next;}elseif(getd(".group"+ .@group +"limit") < 0){mes"[MVP Summoner]";mes"("+(( ~getd(".group"+ .@group +"limit")+1-getd(".group"+ .@group +"limit"+ .@dif) <=0)?0:( ~getd(".group"+ .@group +"limit")+1-getd(".group"+ .@group +"limit"+ .@dif)))+") more summons for this group.";next;}if(getd(".group"+ .@group +"limit") < 0&&getd(".group"+ .@group +"limit"+ .@dif) >= ~getd(".group"+ .@group +"limit")+1){mes"[MVP Summoner]";mes"I'm sorry, but you can't summon any more monster for this group.";close;}elseif(getd(".group"+ .@group +"limit") > 0){for(set .@i, 0; .@i < getd(".group"+ .@group +"idsize"); set .@i, .@i +1)set .@menu$, .@menu$ +((getd(".group"+ .@group +"limit"+ .@dif +"["+ .@i +"]") >=getd(".group"+ .@group +"limit"))?"^999999":"^000000")+getmonsterinfo(getd(".group"+ .@group +"id["+ .@i +"]"), 0)+" ("+((getd(".group"+ .@group +"limit")-getd(".group"+ .@group +"limit"+ .@dif +"["+ .@i +"]") <=0)?0:(getd(".group"+ .@group +"limit")-getd(".group"+ .@group +"limit"+ .@dif +"["+ .@i +"]")))+")"+":";set .@menu, select(.@menu$)-1;}elseset .@menu, select(getd(".group"+ .@group +"menu$"))-1;mes"[MVP Summoner]";if( .floodcontrol==0&& .inputlimit > 1){mes"Input an amount of monsters to summon.";next;input .@amount;if( .@amount ==0)close;elseif( .@amount > .inputlimit)set .@amount, .inputlimit;mes"[MVP Summoner]";}elseset .@amount, 1;if(getd(".group"+ .@group +"itemid")&&getd(".group"+ .@group +"itemamount")){if(countitem(getd(".group"+ .@group +"itemid")) < getd(".group"+ .@group +"itemamount")* .@amount ){mes"You don't have enough "+getitemname(getd(".group"+ .@group +"itemid"))+" to summon a "+getd(".group"+ .@group +"name$")+".";close;}}elseif(getd(".group"+ .@group +"cost")){if( zeny < getd(".group"+ .@group +"cost")* .@amount ){mes"You don't have enough zeny to summon a "+getd(".group"+ .@group +"name$")+".";close;}}if( .floodcontrol&& getmapmobs("this") > 0){mes"I cannot summon another monster when there are monsters around.";close;}elseif(getd(".group"+ .@group +"limit") > 0){if(getd(".group"+ .@group +"limit"+ .@dif +"["+ .@menu+"]") >=getd(".group"+ .@group +"limit")){mes"I'm sorry, but you already summoned that monster too much. Try summon another.";close;}elseif(getd(".group"+ .@group +"limit"+ .@dif +"["+ .@menu+"]")+ .@amount > getd(".group"+ .@group +"limit")){mes"The amount you input is more than the limit you can summon. Try reduce the amount.";close;}}elseif(getd(".group"+ .@group +"limit") < 0){if(getd(".group"+ .@group +"limit"+ .@dif) >= ~getd(".group"+ .@group +"limit")+1){mes"I'm sorry, but you can't summon any more monster for this group.";close;}elseif(getd(".group"+ .@group +"limit"+ .@dif)+ .@amount > ~getd(".group"+ .@group +"limit")+1){mes"The amount you input is more than the limit you can summon. Try reduce the amount.";close;}}mes"Summoning "+ .@amount +" "+getmonsterinfo(getd(".group"+ .@group +"id["+ .@menu+"]"), 0)+".";mes"Ok, get ready ?";close2;if( .floodcontrol&& getmapmobs("this") > 0)end;if(getd(".group"+ .@group +"itemid")&&getd(".group"+ .@group +"itemamount")){if(countitem(getd(".group"+ .@group +"itemid")) < getd(".group"+ .@group +"itemamount")* .@amount )end;delitemgetd(".group"+ .@group +"itemid"), getd(".group"+ .@group +"itemamount")* .@amount;}elseif(getd(".group"+ .@group +"cost")){if( zeny < getd(".group"+ .@group +"cost")* .@amount )end;set zeny, zeny -getd(".group"+ .@group +"cost")* .@amount;}if(getd(".group"+ .@group +"limit") > 0){if(getd(".group"+ .@group +"limit"+ .@dif +"["+ .@menu+"]")+ .@amount > getd(".group"+ .@group +"limit"))end;setd".group"+ .@group +"limit"+ .@dif +"["+ .@menu+"]", getd(".group"+ .@group +"limit"+ .@dif +"["+ .@menu+"]")+ .@amount;}elseif(getd(".group"+ .@group +"limit") < 0){if(getd(".group"+ .@group +"limit"+ .@dif)+ .@amount > ~getd(".group"+ .@group +"limit")+1)end;setd".group"+ .@group +"limit"+ .@dif, getd(".group"+ .@group +"limit"+ .@dif)+ .@amount;}monster"this", 0, 0, "--ja--", getd(".group"+ .@group +"id["+ .@menu+"]"), .@amount;end;case11:if( getmapmobs("this") > 0){mes"[MVP Summoner]";mes"I cannot offer this service when there are monsters around.";close;}close2;callshop"MVP room#branch", 0;end;case12:mes"[MVP Summoner]";mes"Are you sure you want to leave this room ?";mes"If this room left empty for more than "+ .nobodygiveup+" minutes, you lost ownership for this room.";if(select("Yes:No")==2)close;warp .respawnmap$, .respawnx, .respawny;end;case13:mes"[MVP Summoner]";getmapxy .@map$, .@x, .@y, 0;if(getmapusers(.@map$) > 1){mes"There are still some players in this room. Make sure you are the last member in this room to use this option.";close;}mes"Are you sure you want to give up this room ?";if( .rentcost)mes"You will need to pay again to enter this room.";next;if(select("Yes:No")==2)close;warp .respawnmap$, .respawnx, .respawny;set .remaintime[.@dif], -1;end;}close;OnEnterMap:set .@dif, strnpcinfo(2);set .remind[.@dif], 0;for(set .@i, 1; .@i <=9; set .@i, .@i +1)deletearraygetd(".group"+ .@i +"limit"+ .@dif), getd(".group"+ .@i +"idsize");set .nobodycounter[.@dif], 0;getmapxy .@map$, .@x, .@y ,1;set .starttime[.@dif], gettimetick(2);do{set .remaintime[.@dif], .timeout*60+ .starttime[.@dif]-gettimetick(2);set .@hour[.@dif], .remainTime[.@dif]/3600 ;set .@min[.@dif], .remainTime[.@dif]%3600/60 ;set .@sec[.@dif], .remainTime[.@dif]%3600%60 ;delwaitingroomstrnpcinfo(0);waitingroom"Time Left = "+(( .@hour[.@dif])?( .@hour[.@dif]+":"):"")+(( .@min[.@dif] < 10)?"0"+ .@min[.@dif]: .@min[.@dif])+":"+(( .@sec[.@dif] < 10)?"0"+ .@sec[.@dif]: .@sec[.@dif]), 0;if(getmapusers(.@map$))set .nobodycounter[.@dif], 0;else{set .nobodycounter[.@dif], .nobodycounter[.@dif]+1 ;if( .nobodycounter[.@dif] > .nobodygiveup*60)break;}sleep995;}while( .remaintime[.@dif] > 1);set .remaintime[.@dif], 0;delwaitingroom"MVP Summoner#"+ .@dif;mapwarp .@map$, .respawnmap$, .respawnx, .respawny;end;OnTimer100:stopnpctimer;npctalk"Hi ~ the bubble above my head is the countdown for using this room.";sleep2000;npctalk"Sometimes, I can skip for about 1 second in the countdown.";sleep3000;npctalk"That is because the server is experiencing minor lag problem.";sleep3000;npctalk"So, don't complain about me cheated for the countdown ~ ^.^";sleep3000;npctalk"Have a nice day ~";end;}prontera,148,174,5 script Private MVP Room 100,{mes"[Private MVP Room]";mes"Please select a private MVP 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"))+".";elseif(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.";elsemes"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]){case1:set .@color$, "^EE8800"; break;case2:set .@color$, "^70CC11"; break;case3:set .@color$, "^0000FF"; break;default:set .@color$, "^000000";}mes"Room #"+ .@i +" = "+ .@color$ + .whoinuse$[.@i]+"^000000";}}next;set .@room, select("MVP Room 1 ["+getmapusers("06guild_01")+"]","MVP Room 2 ["+getmapusers("06guild_02")+"]","MVP Room 3 ["+getmapusers("06guild_03")+"]","MVP Room 4 ["+getmapusers("06guild_04")+"]","MVP Room 5 ["+getmapusers("06guild_05")+"]","MVP Room 6 ["+getmapusers("06guild_06")+"]","MVP Room 7 ["+getmapusers("06guild_07")+"]","MVP Room 8 ["+getmapusers("06guild_08")+"]");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"[Private MVP Room]";switch( .type[.@room]){case1:set .@color$, "^EE8800Party "; break;case2:set .@color$, "^70CC11Guild "; break;case3: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 /60)+"mn "+( .@remaintime %60 )+"s left.";set .@nobodycounter, getvariableofnpc(.nobodycounter[.@room],"MVP Summoner");if( .@nobodycounter )mes"And have left empty for "+( .@nobodycounter /60)+"mn "+( .@nobodycounter %60 )+"s.";mes"Kick them ?";next;if(select("No:Yes")==1)close;setgetvariableofnpc(.remaintime[.@room],"MVP Summoner"), -1;mes"[Private MVP Room]";mes"Room#"+ .@room +" is empty now.";close;}}mes"[Private MVP Room]";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;}}elseif(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", "For my guild members", "For personal account use");if(getcharid(.@type)==0){mes"[Private MVP Room]";mes"You do not own a "+((.@type ==1)?"Party":"Guild")+".";close;}elseif(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;}}elseif(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;delitemgetvariableofnpc(.rentitemid, "MVP Summoner"), getvariableofnpc(.rentitemamount, "MVP Summoner");}elseif(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,49,49,4 duplicate(MVP Summoner) MVP Summoner#111606guild_02,49,49,4 duplicate(MVP Summoner) MVP Summoner#211606guild_03,49,49,4 duplicate(MVP Summoner) MVP Summoner#311606guild_04,49,49,4 duplicate(MVP Summoner) MVP Summoner#411606guild_05,49,49,4 duplicate(MVP Summoner) MVP Summoner#511606guild_06,49,49,4 duplicate(MVP Summoner) MVP Summoner#611606guild_07,49,49,4 duplicate(MVP Summoner) MVP Summoner#711606guild_08,49,49,4 duplicate(MVP Summoner) MVP Summoner#811606guild_01 mapflag nowarpto06guild_02 mapflag nowarpto06guild_03 mapflag nowarpto06guild_04 mapflag nowarpto06guild_05 mapflag nowarpto06guild_06 mapflag nowarpto06guild_07 mapflag nowarpto06guild_08 mapflag nowarpto06guild_01 mapflag nomemo06guild_02 mapflag nomemo06guild_03 mapflag nomemo06guild_04 mapflag nomemo06guild_05 mapflag nomemo06guild_06 mapflag nomemo06guild_07 mapflag nomemo06guild_08 mapflag nomemo06guild_01 mapflag noteleport06guild_02 mapflag noteleport06guild_03 mapflag noteleport06guild_04 mapflag noteleport06guild_05 mapflag noteleport06guild_06 mapflag noteleport06guild_07 mapflag noteleport06guild_08 mapflag noteleport06guild_01 mapflag nosave SavePoint06guild_02 mapflag nosave SavePoint06guild_03 mapflag nosave SavePoint06guild_04 mapflag nosave SavePoint06guild_05 mapflag nosave SavePoint06guild_06 mapflag nosave SavePoint06guild_07 mapflag nosave SavePoint06guild_08 mapflag nosave SavePoint06guild_01 mapflag nopenalty06guild_02 mapflag nopenalty06guild_03 mapflag nopenalty06guild_04 mapflag nopenalty06guild_05 mapflag nopenalty06guild_06 mapflag nopenalty06guild_07 mapflag nopenalty06guild_08 mapflag nopenalty