Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Before running this script, add the entry below to
- // 'db/import/instance_db.txt':
- // 100,MvP Room,3600,300,06guild_01,46,46
- // Instance Creation
- //============================================================
- prontera,165,237,3 script MvP Room 101,{
- if (instance_id(IM_CHAR))
- .@instance_id = instance_id(IM_CHAR);
- else if (instance_id(IM_PARTY))
- .@instance_id = instance_id(IM_PARTY);
- else if (instance_id(IM_GUILD))
- .@instance_id = instance_id(IM_GUILD);
- mes "[MvP Room]";
- if (.@instance_id) // If has instance just display to enter.
- {
- mes "Do you want to enter?";
- select("Yes");
- callsub S_Enter, .@instance_id;
- end;
- }
- mes "What type mvp room would you like to rent?";
- next;
- setarray .@mode, IM_CHAR, IM_PARTY, IM_GUILD;
- setarray .@type2$[1], "Party", "Guild";
- .@type = select("> Personal:> Party:> Guild")-1;
- mes "[MvP Room]";
- if (!getcharid(.@type)) {
- mes "You didn't have a "+.@type2$[.@type];
- close;
- }
- .@instance_id = instance_create(.instance$, .@mode[.@type], getcharid(.@type));
- if (.@instance_id < 0) {
- mes "[MvP Room]";
- switch (.@create) {
- case -1: mes "ERROR: Invalid type."; break;
- case -2: mes "ERROR: "+.@type2$[.@type]+" not found."; break;
- case -3: mes "ERROR: reservation already exists."; break;
- case -4: mes "ERROR: No free room."; break;
- }
- mes " ";
- mes "MvP Room reservation ^FF0000failed^000000.";
- emotion ET_HUK;
- close;
- }
- callsub S_Enter, .@instance_id;
- end;
- S_Enter:
- .@enter = instance_enter(.instance$, 46, 46, getcharid(0), getarg(0));
- if (.@enter != 0) {
- mes "[MvP Room]";
- switch (.@enter) {
- case 1: mes "ERROR: "+.@type2$[.@type]+" not found."; break;
- case 2: mes "ERROR: "+.@type2$[.@type]+" does not have reservation."; break;
- case 3: mes "ERROR: Unknown error."; break;
- }
- mes " ";
- mes "MvP Room entry ^FF0000failed^000000.";
- emotion ET_HUK;
- close;
- }
- return;
- OnInit:
- // Instance name in db
- .instance$ = "MvP Room";
- // the cost to rent a room
- set .rentitemid, 674; // item id use for rent a room - 674 - mithil coin
- set .rentitemamount, 0; // amount of items to rent a room
- set .rentcost, 30000000; // otherwise, Zeny cost to rent a room
- // DO NOT TOUCH !!
- if ( .rentitemid && .rentitemamount ) {
- if ( getitemname(.rentitemid) == "null" ) {
- debugmes "Private MVP Room: Rent a room is using invalid item id.";
- }
- }
- end;
- }
- // Instance Scripts
- //============================================================
- 06guild_01,49,49,4 script MVP Summoner#ins 116,{
- mes "[MVP Summoner]";
- mes "Hi, what can I do for you ?";
- next;
- .@selected = select(.menu$);
- switch ( .@selected ) {
- case 1:
- mes "[MVP Summoner]";
- if ( mobcount("this","") > 0 ) {
- mes "I cannot offer heal service when there are monsters around.";
- close;
- }
- sc_end SC_STRIPWEAPON;
- sc_end SC_STRIPSHIELD;
- sc_end SC_STRIPARMOR;
- sc_end SC_STRIPHELM;
- 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;
- specialeffect2 SC_INCREASEAGI; sc_start SC_INCREASEAGI,600000,10;
- specialeffect2 EF_BLESSING; sc_start SC_BLESSING,600000,10;
- specialeffect2 EF_ASSUMPTIO2; specialeffect2 EF_ASSUMPTIO; sc_start SC_ASSUMPTIO,600000,10;
- repairall;
- specialeffect2 EF_HEAL2; percentheal 100,100;
- mes "You have completely buffed & healed.";
- close;
- default:
- set .@group, .@selected -1;
- if ( .floodcontrol && mobcount("this","") > 0 ) {
- mes "[MVP Summoner]";
- mes "I cannot summon another monster when there are monsters around.";
- close;
- }
- else if ( 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") <= 0 )?0:( ~getd(".group"+ .@group +"limit")+1 - getd("'group"+ .@group +"limit") ) )+") more summons for this group.";
- next;
- }
- else if ( 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") <= 0 )?0:( ~getd(".group"+ .@group +"limit")+1 - getd("'group"+ .@group +"limit") ) )+") more summons for this group.";
- next;
- }
- else if ( getd(".group"+ .@group +"limit") < 0 ) {
- mes "[MVP Summoner]";
- mes "("+( ( ~getd(".group"+ .@group +"limit")+1 - getd("'group"+ .@group +"limit") <= 0 )?0:( ~getd(".group"+ .@group +"limit")+1 - getd("'group"+ .@group +"limit") ) )+") more summons for this group.";
- next;
- }
- if ( getd(".group"+ .@group +"limit") < 0 && getd("'group"+ .@group +"limit") >= ~getd(".group"+ .@group +"limit")+1 ) {
- mes "[MVP Summoner]";
- mes "I'm sorry, but you can't summon any more monster for this group.";
- close;
- }
- else if ( 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" +"["+ .@i +"]") >= getd(".group"+ .@group +"limit") )?"^999999":"^000000" )+ getmonsterinfo( getd(".group"+ .@group +"id["+ .@i +"]"), 0) +" ("+ ( ( getd(".group"+ .@group +"limit") - getd("'group"+ .@group +"limit" +"["+ .@i +"]") <= 0 )?0:( getd(".group"+ .@group +"limit") - getd("'group"+ .@group +"limit" +"["+ .@i +"]") ) ) +")"+":";
- set .@menu, select(.@menu$) -1;
- }
- else
- set .@menu, select( getd(".group"+ .@group +"menu$") ) -1;
- mes "[MVP Summoner]";
- if ( getd(".group"+ .@group +"limit") > 0 ) {
- if ( getd("'group"+ .@group +"limit" +"["+ .@menu +"]") >= getd(".group"+ .@group +"limit") ) {
- mes "I'm sorry, but you already summoned that monster too much. Try summon another.";
- close;
- }
- }
- if ( .floodcontrol == 0 && .inputlimit > 1 ) {
- mes "Input an amount of monsters to summon.";
- next;
- input .@amount;
- if ( .@amount == 0 ) close;
- else if ( .@amount > .inputlimit )
- set .@amount, .inputlimit;
- mes "[MVP Summoner]";
- }
- else
- set .@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;
- }
- }
- else if ( 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 && mobcount("this","") > 0 ) {
- mes "I cannot summon another monster when there are monsters around.";
- close;
- }
- else if ( getd(".group"+ .@group +"limit") > 0 ) {
- if ( getd("'group"+ .@group +"limit" +"["+ .@menu +"]") >= getd(".group"+ .@group +"limit") ) {
- mes "I'm sorry, but you already summoned that monster too much. Try summon another.";
- close;
- }
- else if ( getd("'group"+ .@group +"limit" +"["+ .@menu +"]") + .@amount > getd(".group"+ .@group +"limit") ) {
- mes "The amount you input is more than the limit you can summon. Try reduce the amount.";
- close;
- }
- }
- else if ( getd(".group"+ .@group +"limit") < 0 ) {
- if ( getd("'group"+ .@group +"limit") >= ~getd(".group"+ .@group +"limit")+1 ) {
- mes "I'm sorry, but you can't summon any more monster for this group.";
- close;
- }
- else if ( getd("'group"+ .@group +"limit") + .@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 && mobcount("this","") > 0 ) end;
- if ( getd(".group"+ .@group +"itemid") && getd(".group"+ .@group +"itemamount") ) {
- if ( countitem( getd(".group"+ .@group +"itemid") ) < getd(".group"+ .@group +"itemamount") * .@amount ) end;
- delitem getd(".group"+ .@group +"itemid"), getd(".group"+ .@group +"itemamount") * .@amount;
- }
- else if ( 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" +"["+ .@menu +"]") + .@amount > getd(".group"+ .@group +"limit") ) end;
- setd "'group"+ .@group +"limit" +"["+ .@menu +"]", getd("'group"+ .@group +"limit" +"["+ .@menu +"]") + .@amount;
- }
- else if ( getd(".group"+ .@group +"limit") < 0 ) {
- if ( getd("'group"+ .@group +"limit") + .@amount > ~getd(".group"+ .@group +"limit")+1 ) end;
- setd "'group"+ .@group +"limit", getd("'group"+ .@group +"limit") + .@amount;
- }
- monster "this", 0, 0, "--ja--", getd(".group"+ .@group +"id["+ .@menu +"]"), .@amount;
- end;
- case 11:
- if ( mobcount("this","") > 0 ) {
- mes "[MVP Summoner]";
- mes "I cannot offer this service when there are monsters around.";
- close;
- }
- close2;
- callshop "MVP room#branch", 0;
- end;
- case 12:
- 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;
- case 13:
- mes "[MVP Summoner]";
- if ( getmapusers(instance_mapname(strcharinfo(3))) > 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;
- instance_destroy;
- end;
- }
- close;
- OnInit: // hide the NPC on the normal map
- disablenpc strnpcinfo(0);
- .respawnmap$ = "prontera";
- .respawnx = 150;
- .respawny = 150;
- // 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 1
- set .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;
- // Options menu setting for MVP Summoner NPC.
- set .@menu[0], 1; // Turn Heal option On/Off
- set .@menu[1], 1; // Turn Group 1 summons On/Off -> MVP
- set .@menu[2], 1; // Turn Group 2 summons On/Off -> mini boss
- set .@menu[3], 1; // Turn Group 3 summons On/Off
- set .@menu[4], 1; // Turn Group 4 summons On/Off
- set .@menu[5], 0; // Turn Group 5 summons On/Off
- set .@menu[6], 0; // Turn Group 6 summons On/Off
- set .@menu[7], 0; // Turn Group 7 summons On/Off
- set .@menu[8], 0; // Turn Group 8 summons On/Off
- set .@menu[9], 0; // Turn Group 9 summons On/Off
- set .@menu[10], 0; // Sell shop items options On/Off ( shop npc above )
- // .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 name
- set .group1itemid, 0; // item id use for summon any Group 1 monster - 674 - mithil coin
- set .group1itemamount, 0; // amount of items to summon a Group 1 monster
- set .group1cost, 1; // if no item is specify, Zeny cost to summon a Group 1 monster
- set .group1limit, 10; // limit of summon of Group 1 monster per session, prevent them only killing same monster again and again
- setarray .group1id,
- 1511,// Amon Ra
- 1785,// Atroce
- 1630,// Bacsojin
- 1039,// Baphomet
- 1874,// Beelzebub
- 1272,// Dark Lord
- 1719,// Datale
- 1046,// Doppelgangger
- 1389,// Dracula
- 1112,// Drake
- 1115,// Eddga
- 1418,// Evil Snake Lord
- 1871,// Fallen Bishop
- 1252,// Garm
- 1768,// Gloom Under Night
- 1086,// Golden Thief Bug
- 1885,// Gopinich
- 1832,// Ifrit
- 1492,// Incantation Samurai
- 1734,// Kiel D-01
- 1251,// Knight of Windstorm
- 1779,// Ktullanux
- // 1980,// Kubkin ( I think this mvp is still new )
- 1688,// Lady Tanee
- 1373,// Lord of Death
- 1147,// Maya
- 1059,// Mistress
- 1150,// Moonlight Flower
- 1087,// Orc Hero
- 1190,// Orc Lord
- 1038,// Osiris
- 1157,// Pharaoh
- 1159,// Phreeoni
- 1623,// RSX 0806
- 1583,// Tao Gunka
- 1708,// Thanatos
- 1312,// Turtle General
- 1751,// Valkyrie Randgris
- 1685,// Vesper
- 1658;// Ygnizem
- // ---------
- // Group 2 -> mini boss
- // ---------
- set .group2name$, "Mini Boss"; // Group 2 name
- set .group2itemid, 0; // item id use for summon any Group 2 monster - 674 - mithil coin
- set .group2itemamount, 0; // amount of items to summon a Group 2 monster
- set .group2cost, 10000000; // if no item is specify, Zeny cost to summon a Group 2 monster
- set .group2limit, 50; // limit of summon of Group 2 monster per session, prevent them only killing same monster again and again
- setarray .group2id,
- 1096,// Angeling
- 1388,// Archangeling
- 1795,// Bloody Knight
- 1830,// Bow Guardian
- 1839,// Byorgue
- 1309,// Cat O' Nine Tail
- 1283,// Chimera
- 1302,// Dark Illusion
- 1198,// Dark Priest
- 1582,// Deviling
- 1091,// Dragon Fly
- 1093,// Eclipse
- 1205,// Executioner
- 1783,// Galion
- 1592,// Gangster
- 1120,// Ghostring
- 1259,// Gryphon
- 1720,// Hydro
- 1090,// Mastering
- 1289,// Maya Purple
- 1262,// Mutant Dragon
- 1203,// Mysteltainn
- 1870,// Necromancer
- 1295,// Owl Baron
- 1829,// Sword Guardian
- 1204,// Tirfing
- 1089,// Toad
- 1092,// Vagabond Wolf
- 1765;// Valkyrie
- // ---------
- // Group 3
- // ---------
- set .group3name$, "Super Boss"; // Group 3 name
- set .group3itemid, 0; // item id use for summon any Group 3 monster - 12109 - Poring box
- set .group3itemamount, 0; // amount of items to summon a Group 3 monster
- set .group3cost, 500000000; // if no item is specify, Zeny cost to summon a Group 3 monster
- set .group3limit, 1; // limit of summon of Group 3 monster per session, prevent them only killing same monster again and again
- setarray .group3id,
- 1917,// Wounded Morroc
- 2022,// Nidhog
- 1956,// Naght Sieger
- 1502;// Pori Pori
- // ---------
- // Group 4
- // ---------
- set .group4name$, "Lighthalzen MvP"; // Group 4 name
- set .group4itemid, 0; // item id use for summon any Group 4 monster
- set .group4itemamount, 0; // amount of items to summon a Group 4 monster
- set .group4cost, 80000000; // if no item is specify, Zeny cost to summon a Group 4 monster
- set .group4limit, 5; // limit of summon of Group 4 monster per session, prevent them only killing same monster again and again
- setarray .group4id,
- 1646,// Lord Knight Seyren
- 1647,// Assassin Cross Eremes
- 1648,// Whitesmith Harword
- 1650,// Sniper Shecil
- 1649,// High Priest Magaleta
- 1651;// High Wizard Katrinn
- // ---------
- // Group 5
- // ---------
- set .group5name$, ""; // Group 5 name
- set .group5itemid, 0; // item id use for summon any Group 5 monster
- set .group5itemamount, 0; // amount of items to summon a Group 5 monster
- set .group5cost, 0; // if no item is specify, Zeny cost to summon a Group 5 monster
- set .group5limit, 0; // limit of summon of Group 5 monster per session, prevent them only killing same monster again and again
- setarray .group5id,
- 1001,
- 1002;
- // ---------
- // Group 6
- // ---------
- set .group6name$, ""; // Group 6 name
- set .group6itemid, 0; // item id use for summon any Group 6 monster
- set .group6itemamount, 0; // amount of items to summon a Group 6 monster
- set .group6cost, 0; // if no item is specify, Zeny cost to summon a Group 6 monster
- set .group6limit, 0; // limit of summon of Group 6 monster per session, prevent them only killing same monster again and again
- setarray .group6id,
- 1001,
- 1002;
- // ---------
- // Group 7
- // ---------
- set .group7name$, ""; // Group 7 name
- set .group7itemid, 0; // item id use for summon any Group 7 monster
- set .group7itemamount, 0; // amount of items to summon a Group 7 monster
- set .group7cost, 0; // if no item is specify, Zeny cost to summon a Group 7 monster
- set .group7limit, 0; // limit of summon of Group 7 monster per session, prevent them only killing same monster again and again
- setarray .group7id,
- 1001,
- 1002;
- // ---------
- // Group 8
- // ---------
- set .group8name$, ""; // Group 8 name
- set .group8itemid, 0; // item id use for summon any Group 8 monster
- set .group8itemamount, 0; // amount of items to summon a Group 8 monster
- set .group8cost, 0; // if no item is specify, Zeny cost to summon a Group 8 monster
- set .group8limit, 0; // limit of summon of Group 8 monster per session, prevent them only killing same monster again and again
- setarray .group8id,
- 1001,
- 1002;
- // ---------
- // Group 9
- // ---------
- set .group9name$, ""; // Group 9 name
- set .group9itemid, 0; // item id use for summon any Group 9 monster
- set .group9itemamount, 0; // amount of items to summon a Group 9 monster
- set .group9cost, 0; // if no item is specify, Zeny cost to summon a Group 9 monster
- set .group9limit, 0; // limit of summon of Group 9 monster per session, prevent them only killing same monster again and again
- setarray .group9id,
- 1001,
- 1002;
- if ( .inputlimit < 1 ) set .inputlimit, 1;
- 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 menu for unlimited Spawn
- 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 ;
- }
- end;
- OnInstanceInit:
- setmapflag strnpcinfo(4), mf_nowarpto;
- setmapflag strnpcinfo(4), mf_noteleport;
- setmapflag strnpcinfo(4), mf_nomemo;
- setmapflag strnpcinfo(4), mf_nosave;
- setmapflag strnpcinfo(4), mf_nopenalty;
- setmapflag strnpcinfo(4), mf_nowarp;
- setmapflag strnpcinfo(4), mf_noreturn;
- setmapflag strnpcinfo(4), mf_monster_noteleport;
- setmapflag strnpcinfo(4), mf_noicewall;
- setmapflag strnpcinfo(4), mf_nobaseexp;
- setmapflag strnpcinfo(4), mf_nojobexp;
- setmapflag strnpcinfo(4), mf_novending;
- end;
- OnInstanceDestroy:
- killmonsterall strnpcinfo(4);
- mapwarp strnpcinfo(4), "prontera", 153, 153;
- sleep 1000;
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement