Advertisement
existence_dev92

MvP Room Instanced - rAthena

Mar 12th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.91 KB | None | 0 0
  1. // Before running this script, add the entry below to
  2. // 'db/import/instance_db.txt':
  3. // 100,MvP Room,3600,300,06guild_01,46,46
  4.  
  5. // Instance Creation
  6. //============================================================
  7. prontera,165,237,3 script MvP Room 101,{
  8. if (instance_id(IM_CHAR))
  9. .@instance_id = instance_id(IM_CHAR);
  10. else if (instance_id(IM_PARTY))
  11. .@instance_id = instance_id(IM_PARTY);
  12. else if (instance_id(IM_GUILD))
  13. .@instance_id = instance_id(IM_GUILD);
  14.  
  15. mes "[MvP Room]";
  16. if (.@instance_id) // If has instance just display to enter.
  17. {
  18. mes "Do you want to enter?";
  19. select("Yes");
  20. callsub S_Enter, .@instance_id;
  21. end;
  22. }
  23. mes "What type mvp room would you like to rent?";
  24. next;
  25. setarray .@mode, IM_CHAR, IM_PARTY, IM_GUILD;
  26. setarray .@type2$[1], "Party", "Guild";
  27. .@type = select("> Personal:> Party:> Guild")-1;
  28. mes "[MvP Room]";
  29. if (!getcharid(.@type)) {
  30. mes "You didn't have a "+.@type2$[.@type];
  31. close;
  32. }
  33. .@instance_id = instance_create(.instance$, .@mode[.@type], getcharid(.@type));
  34. if (.@instance_id < 0) {
  35. mes "[MvP Room]";
  36. switch (.@create) {
  37. case -1: mes "ERROR: Invalid type."; break;
  38. case -2: mes "ERROR: "+.@type2$[.@type]+" not found."; break;
  39. case -3: mes "ERROR: reservation already exists."; break;
  40. case -4: mes "ERROR: No free room."; break;
  41. }
  42. mes " ";
  43. mes "MvP Room reservation ^FF0000failed^000000.";
  44. emotion ET_HUK;
  45. close;
  46. }
  47. callsub S_Enter, .@instance_id;
  48. end;
  49.  
  50. S_Enter:
  51. .@enter = instance_enter(.instance$, 46, 46, getcharid(0), getarg(0));
  52. if (.@enter != 0) {
  53. mes "[MvP Room]";
  54. switch (.@enter) {
  55. case 1: mes "ERROR: "+.@type2$[.@type]+" not found."; break;
  56. case 2: mes "ERROR: "+.@type2$[.@type]+" does not have reservation."; break;
  57. case 3: mes "ERROR: Unknown error."; break;
  58. }
  59. mes " ";
  60. mes "MvP Room entry ^FF0000failed^000000.";
  61. emotion ET_HUK;
  62. close;
  63. }
  64. return;
  65.  
  66. OnInit:
  67. // Instance name in db
  68. .instance$ = "MvP Room";
  69.  
  70. // the cost to rent a room
  71. set .rentitemid, 674; // item id use for rent a room - 674 - mithil coin
  72. set .rentitemamount, 0; // amount of items to rent a room
  73. set .rentcost, 30000000; // otherwise, Zeny cost to rent a room
  74.  
  75. // DO NOT TOUCH !!
  76. if ( .rentitemid && .rentitemamount ) {
  77. if ( getitemname(.rentitemid) == "null" ) {
  78. debugmes "Private MVP Room: Rent a room is using invalid item id.";
  79. }
  80. }
  81. end;
  82. }
  83.  
  84.  
  85.  
  86. // Instance Scripts
  87. //============================================================
  88. 06guild_01,49,49,4 script MVP Summoner#ins 116,{
  89. mes "[MVP Summoner]";
  90. mes "Hi, what can I do for you ?";
  91. next;
  92. .@selected = select(.menu$);
  93. switch ( .@selected ) {
  94. case 1:
  95. mes "[MVP Summoner]";
  96. if ( mobcount("this","") > 0 ) {
  97. mes "I cannot offer heal service when there are monsters around.";
  98. close;
  99. }
  100. sc_end SC_STRIPWEAPON;
  101. sc_end SC_STRIPSHIELD;
  102. sc_end SC_STRIPARMOR;
  103. sc_end SC_STRIPHELM;
  104. sc_end SC_STONE;
  105. sc_end SC_SLOWDOWN;
  106. sc_end SC_FREEZE;
  107. sc_end SC_SLEEP;
  108. sc_end SC_CURSE;
  109. sc_end SC_SILENCE;
  110. sc_end SC_CONFUSION;
  111. sc_end SC_BLIND;
  112. sc_end SC_BLEEDING;
  113. sc_end SC_DECREASEAGI;
  114. sc_end SC_POISON;
  115. sc_end SC_HALLUCINATION;
  116. specialeffect2 SC_INCREASEAGI; sc_start SC_INCREASEAGI,600000,10;
  117. specialeffect2 EF_BLESSING; sc_start SC_BLESSING,600000,10;
  118. specialeffect2 EF_ASSUMPTIO2; specialeffect2 EF_ASSUMPTIO; sc_start SC_ASSUMPTIO,600000,10;
  119. repairall;
  120. specialeffect2 EF_HEAL2; percentheal 100,100;
  121. mes "You have completely buffed & healed.";
  122. close;
  123. default:
  124. set .@group, .@selected -1;
  125. if ( .floodcontrol && mobcount("this","") > 0 ) {
  126. mes "[MVP Summoner]";
  127. mes "I cannot summon another monster when there are monsters around.";
  128. close;
  129. }
  130. else if ( getd(".group"+ .@group +"itemid") && getd(".group"+ .@group +"itemamount") ) {
  131. mes "[MVP Summoner]";
  132. mes "The cost to summon a "+ getd(".group"+ .@group +"name$") +" is "+ getd(".group"+ .@group +"itemamount") +" "+ getitemname( getd(".group"+ .@group +"itemid") ) +".";
  133. if ( getd(".group"+ .@group +"limit") < 0 )
  134. 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.";
  135. next;
  136. }
  137. else if ( getd(".group"+ .@group +"cost") ) {
  138. mes "[MVP Summoner]";
  139. mes "The cost to summon a "+ getd(".group"+ .@group +"name$") +" is "+ callfunc("int__", getd(".group"+ .@group +"cost") ) +" Zeny.";
  140. if ( getd(".group"+ .@group +"limit") < 0 )
  141. 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.";
  142. next;
  143. }
  144. else if ( getd(".group"+ .@group +"limit") < 0 ) {
  145. mes "[MVP Summoner]";
  146. 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.";
  147. next;
  148. }
  149. if ( getd(".group"+ .@group +"limit") < 0 && getd("'group"+ .@group +"limit") >= ~getd(".group"+ .@group +"limit")+1 ) {
  150. mes "[MVP Summoner]";
  151. mes "I'm sorry, but you can't summon any more monster for this group.";
  152. close;
  153. }
  154. else if ( getd(".group"+ .@group +"limit") > 0 ) {
  155. for ( set .@i, 0; .@i < getd(".group"+ .@group +"idsize"); set .@i, .@i +1 )
  156. 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 +"]") ) ) +")"+":";
  157. set .@menu, select(.@menu$) -1;
  158. }
  159. else
  160. set .@menu, select( getd(".group"+ .@group +"menu$") ) -1;
  161.  
  162. mes "[MVP Summoner]";
  163. if ( getd(".group"+ .@group +"limit") > 0 ) {
  164. if ( getd("'group"+ .@group +"limit" +"["+ .@menu +"]") >= getd(".group"+ .@group +"limit") ) {
  165. mes "I'm sorry, but you already summoned that monster too much. Try summon another.";
  166. close;
  167. }
  168. }
  169. if ( .floodcontrol == 0 && .inputlimit > 1 ) {
  170. mes "Input an amount of monsters to summon.";
  171. next;
  172. input .@amount;
  173. if ( .@amount == 0 ) close;
  174. else if ( .@amount > .inputlimit )
  175. set .@amount, .inputlimit;
  176. mes "[MVP Summoner]";
  177. }
  178. else
  179. set .@amount, 1;
  180. if ( getd(".group"+ .@group +"itemid") && getd(".group"+ .@group +"itemamount") ) {
  181. if ( countitem( getd(".group"+ .@group +"itemid") ) < getd(".group"+ .@group +"itemamount") * .@amount ) {
  182. mes "You don't have enough "+ getitemname( getd(".group"+ .@group +"itemid") ) +" to summon a "+ getd(".group"+ .@group +"name$") +".";
  183. close;
  184. }
  185. }
  186. else if ( getd(".group"+ .@group +"cost") ) {
  187. if ( Zeny < getd(".group"+ .@group +"cost") * .@amount ) {
  188. mes "You don't have enough Zeny to summon a "+ getd(".group"+ .@group +"name$") +".";
  189. close;
  190. }
  191. }
  192. if ( .floodcontrol && mobcount("this","") > 0 ) {
  193. mes "I cannot summon another monster when there are monsters around.";
  194. close;
  195. }
  196. else if ( getd(".group"+ .@group +"limit") > 0 ) {
  197. if ( getd("'group"+ .@group +"limit" +"["+ .@menu +"]") >= getd(".group"+ .@group +"limit") ) {
  198. mes "I'm sorry, but you already summoned that monster too much. Try summon another.";
  199. close;
  200. }
  201. else if ( getd("'group"+ .@group +"limit" +"["+ .@menu +"]") + .@amount > getd(".group"+ .@group +"limit") ) {
  202. mes "The amount you input is more than the limit you can summon. Try reduce the amount.";
  203. close;
  204. }
  205. }
  206. else if ( getd(".group"+ .@group +"limit") < 0 ) {
  207. if ( getd("'group"+ .@group +"limit") >= ~getd(".group"+ .@group +"limit")+1 ) {
  208. mes "I'm sorry, but you can't summon any more monster for this group.";
  209. close;
  210. }
  211. else if ( getd("'group"+ .@group +"limit") + .@amount > ~getd(".group"+ .@group +"limit")+1 ) {
  212. mes "The amount you input is more than the limit you can summon. Try reduce the amount.";
  213. close;
  214. }
  215. }
  216. mes "Summoning "+ .@amount +" "+ getmonsterinfo( getd(".group"+ .@group +"id["+ .@menu +"]"), 0) +".";
  217. mes "Ok, get ready ?";
  218. close2;
  219. if ( .floodcontrol && mobcount("this","") > 0 ) end;
  220. if ( getd(".group"+ .@group +"itemid") && getd(".group"+ .@group +"itemamount") ) {
  221. if ( countitem( getd(".group"+ .@group +"itemid") ) < getd(".group"+ .@group +"itemamount") * .@amount ) end;
  222. delitem getd(".group"+ .@group +"itemid"), getd(".group"+ .@group +"itemamount") * .@amount;
  223. }
  224. else if ( getd(".group"+ .@group +"cost") ) {
  225. if ( Zeny < getd(".group"+ .@group +"cost") * .@amount ) end;
  226. set Zeny, Zeny - getd(".group"+ .@group +"cost") * .@amount;
  227. }
  228. if ( getd(".group"+ .@group +"limit") > 0 ) {
  229. if ( getd("'group"+ .@group +"limit" +"["+ .@menu +"]") + .@amount > getd(".group"+ .@group +"limit") ) end;
  230. setd "'group"+ .@group +"limit" +"["+ .@menu +"]", getd("'group"+ .@group +"limit" +"["+ .@menu +"]") + .@amount;
  231. }
  232. else if ( getd(".group"+ .@group +"limit") < 0 ) {
  233. if ( getd("'group"+ .@group +"limit") + .@amount > ~getd(".group"+ .@group +"limit")+1 ) end;
  234. setd "'group"+ .@group +"limit", getd("'group"+ .@group +"limit") + .@amount;
  235. }
  236. monster "this", 0, 0, "--ja--", getd(".group"+ .@group +"id["+ .@menu +"]"), .@amount;
  237. end;
  238. case 11:
  239. if ( mobcount("this","") > 0 ) {
  240. mes "[MVP Summoner]";
  241. mes "I cannot offer this service when there are monsters around.";
  242. close;
  243. }
  244. close2;
  245. callshop "MVP room#branch", 0;
  246. end;
  247. case 12:
  248. mes "[MVP Summoner]";
  249. mes "Are you sure you want to leave this room ?";
  250. mes "If this room left empty for more than "+ .nobodygiveup +" minutes, you lost ownership for this room.";
  251. if ( select( "Yes:No") == 2 ) close;
  252. warp .respawnmap$, .respawnx, .respawny;
  253. end;
  254. case 13:
  255. mes "[MVP Summoner]";
  256. if ( getmapusers(instance_mapname(strcharinfo(3))) > 1 ) {
  257. mes "There are still some players in this room. Make sure you are the last member in this room to use this option.";
  258. close;
  259. }
  260. mes "Are you sure you want to give up this room ?";
  261. if ( .rentcost )
  262. mes "You will need to pay again to enter this room.";
  263. next;
  264. if ( select( "Yes:No" ) == 2 ) close;
  265. instance_destroy;
  266. end;
  267. }
  268. close;
  269.  
  270. OnInit: // hide the NPC on the normal map
  271. disablenpc strnpcinfo(0);
  272.  
  273. .respawnmap$ = "prontera";
  274. .respawnx = 150;
  275. .respawny = 150;
  276.  
  277. // limit each room can only summon 1 monster at a time. (only the Summoning option)
  278. // 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
  279. // 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
  280. set .floodcontrol, 0;
  281.  
  282. // if .floodcontrol is turn off, your players might experience lag if they summoned too many MVPs
  283. // so what is the maximum input to limit your players summon too many ?
  284. set .inputlimit, 30;
  285.  
  286.  
  287. // Options menu setting for MVP Summoner NPC.
  288. set .@menu[0], 1; // Turn Heal option On/Off
  289. set .@menu[1], 1; // Turn Group 1 summons On/Off -> MVP
  290. set .@menu[2], 1; // Turn Group 2 summons On/Off -> mini boss
  291. set .@menu[3], 1; // Turn Group 3 summons On/Off
  292. set .@menu[4], 1; // Turn Group 4 summons On/Off
  293. set .@menu[5], 0; // Turn Group 5 summons On/Off
  294. set .@menu[6], 0; // Turn Group 6 summons On/Off
  295. set .@menu[7], 0; // Turn Group 7 summons On/Off
  296. set .@menu[8], 0; // Turn Group 8 summons On/Off
  297. set .@menu[9], 0; // Turn Group 9 summons On/Off
  298. set .@menu[10], 0; // Sell shop items options On/Off ( shop npc above )
  299.  
  300. // .limitspawn in previous revision changed to .grouplimit .
  301. // it is for limit each monster spawn per session, prevent them only killing same monster again and again
  302. // Now you can configure one group has limited summon, and another group has unlimited summon
  303. // 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
  304. // .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
  305.  
  306. // ---------
  307. // Group 1 -> MVP
  308. // ---------
  309. set .group1name$, "MVP"; // Group 1 name
  310. set .group1itemid, 0; // item id use for summon any Group 1 monster - 674 - mithil coin
  311. set .group1itemamount, 0; // amount of items to summon a Group 1 monster
  312. set .group1cost, 1; // if no item is specify, Zeny cost to summon a Group 1 monster
  313. set .group1limit, 10; // limit of summon of Group 1 monster per session, prevent them only killing same monster again and again
  314. setarray .group1id,
  315. 1511,// Amon Ra
  316. 1785,// Atroce
  317. 1630,// Bacsojin
  318. 1039,// Baphomet
  319. 1874,// Beelzebub
  320. 1272,// Dark Lord
  321. 1719,// Datale
  322. 1046,// Doppelgangger
  323. 1389,// Dracula
  324. 1112,// Drake
  325. 1115,// Eddga
  326. 1418,// Evil Snake Lord
  327. 1871,// Fallen Bishop
  328. 1252,// Garm
  329. 1768,// Gloom Under Night
  330. 1086,// Golden Thief Bug
  331. 1885,// Gopinich
  332. 1832,// Ifrit
  333. 1492,// Incantation Samurai
  334. 1734,// Kiel D-01
  335. 1251,// Knight of Windstorm
  336. 1779,// Ktullanux
  337. // 1980,// Kubkin ( I think this mvp is still new )
  338. 1688,// Lady Tanee
  339. 1373,// Lord of Death
  340. 1147,// Maya
  341. 1059,// Mistress
  342. 1150,// Moonlight Flower
  343. 1087,// Orc Hero
  344. 1190,// Orc Lord
  345. 1038,// Osiris
  346. 1157,// Pharaoh
  347. 1159,// Phreeoni
  348. 1623,// RSX 0806
  349. 1583,// Tao Gunka
  350. 1708,// Thanatos
  351. 1312,// Turtle General
  352. 1751,// Valkyrie Randgris
  353. 1685,// Vesper
  354. 1658;// Ygnizem
  355.  
  356. // ---------
  357. // Group 2 -> mini boss
  358. // ---------
  359. set .group2name$, "Mini Boss"; // Group 2 name
  360. set .group2itemid, 0; // item id use for summon any Group 2 monster - 674 - mithil coin
  361. set .group2itemamount, 0; // amount of items to summon a Group 2 monster
  362. set .group2cost, 10000000; // if no item is specify, Zeny cost to summon a Group 2 monster
  363. set .group2limit, 50; // limit of summon of Group 2 monster per session, prevent them only killing same monster again and again
  364. setarray .group2id,
  365. 1096,// Angeling
  366. 1388,// Archangeling
  367. 1795,// Bloody Knight
  368. 1830,// Bow Guardian
  369. 1839,// Byorgue
  370. 1309,// Cat O' Nine Tail
  371. 1283,// Chimera
  372. 1302,// Dark Illusion
  373. 1198,// Dark Priest
  374. 1582,// Deviling
  375. 1091,// Dragon Fly
  376. 1093,// Eclipse
  377. 1205,// Executioner
  378. 1783,// Galion
  379. 1592,// Gangster
  380. 1120,// Ghostring
  381. 1259,// Gryphon
  382. 1720,// Hydro
  383. 1090,// Mastering
  384. 1289,// Maya Purple
  385. 1262,// Mutant Dragon
  386. 1203,// Mysteltainn
  387. 1870,// Necromancer
  388. 1295,// Owl Baron
  389. 1829,// Sword Guardian
  390. 1204,// Tirfing
  391. 1089,// Toad
  392. 1092,// Vagabond Wolf
  393. 1765;// Valkyrie
  394.  
  395. // ---------
  396. // Group 3
  397. // ---------
  398. set .group3name$, "Super Boss"; // Group 3 name
  399. set .group3itemid, 0; // item id use for summon any Group 3 monster - 12109 - Poring box
  400. set .group3itemamount, 0; // amount of items to summon a Group 3 monster
  401. set .group3cost, 500000000; // if no item is specify, Zeny cost to summon a Group 3 monster
  402. set .group3limit, 1; // limit of summon of Group 3 monster per session, prevent them only killing same monster again and again
  403. setarray .group3id,
  404. 1917,// Wounded Morroc
  405. 2022,// Nidhog
  406. 1956,// Naght Sieger
  407. 1502;// Pori Pori
  408.  
  409. // ---------
  410. // Group 4
  411. // ---------
  412. set .group4name$, "Lighthalzen MvP"; // Group 4 name
  413. set .group4itemid, 0; // item id use for summon any Group 4 monster
  414. set .group4itemamount, 0; // amount of items to summon a Group 4 monster
  415. set .group4cost, 80000000; // if no item is specify, Zeny cost to summon a Group 4 monster
  416. set .group4limit, 5; // limit of summon of Group 4 monster per session, prevent them only killing same monster again and again
  417. setarray .group4id,
  418. 1646,// Lord Knight Seyren
  419. 1647,// Assassin Cross Eremes
  420. 1648,// Whitesmith Harword
  421. 1650,// Sniper Shecil
  422. 1649,// High Priest Magaleta
  423. 1651;// High Wizard Katrinn
  424.  
  425.  
  426. // ---------
  427. // Group 5
  428. // ---------
  429. set .group5name$, ""; // Group 5 name
  430. set .group5itemid, 0; // item id use for summon any Group 5 monster
  431. set .group5itemamount, 0; // amount of items to summon a Group 5 monster
  432. set .group5cost, 0; // if no item is specify, Zeny cost to summon a Group 5 monster
  433. set .group5limit, 0; // limit of summon of Group 5 monster per session, prevent them only killing same monster again and again
  434. setarray .group5id,
  435. 1001,
  436. 1002;
  437.  
  438. // ---------
  439. // Group 6
  440. // ---------
  441. set .group6name$, ""; // Group 6 name
  442. set .group6itemid, 0; // item id use for summon any Group 6 monster
  443. set .group6itemamount, 0; // amount of items to summon a Group 6 monster
  444. set .group6cost, 0; // if no item is specify, Zeny cost to summon a Group 6 monster
  445. set .group6limit, 0; // limit of summon of Group 6 monster per session, prevent them only killing same monster again and again
  446. setarray .group6id,
  447. 1001,
  448. 1002;
  449.  
  450. // ---------
  451. // Group 7
  452. // ---------
  453. set .group7name$, ""; // Group 7 name
  454. set .group7itemid, 0; // item id use for summon any Group 7 monster
  455. set .group7itemamount, 0; // amount of items to summon a Group 7 monster
  456. set .group7cost, 0; // if no item is specify, Zeny cost to summon a Group 7 monster
  457. set .group7limit, 0; // limit of summon of Group 7 monster per session, prevent them only killing same monster again and again
  458. setarray .group7id,
  459. 1001,
  460. 1002;
  461.  
  462. // ---------
  463. // Group 8
  464. // ---------
  465. set .group8name$, ""; // Group 8 name
  466. set .group8itemid, 0; // item id use for summon any Group 8 monster
  467. set .group8itemamount, 0; // amount of items to summon a Group 8 monster
  468. set .group8cost, 0; // if no item is specify, Zeny cost to summon a Group 8 monster
  469. set .group8limit, 0; // limit of summon of Group 8 monster per session, prevent them only killing same monster again and again
  470. setarray .group8id,
  471. 1001,
  472. 1002;
  473.  
  474. // ---------
  475. // Group 9
  476. // ---------
  477. set .group9name$, ""; // Group 9 name
  478. set .group9itemid, 0; // item id use for summon any Group 9 monster
  479. set .group9itemamount, 0; // amount of items to summon a Group 9 monster
  480. set .group9cost, 0; // if no item is specify, Zeny cost to summon a Group 9 monster
  481. set .group9limit, 0; // limit of summon of Group 9 monster per session, prevent them only killing same monster again and again
  482. setarray .group9id,
  483. 1001,
  484. 1002;
  485.  
  486. if ( .inputlimit < 1 ) set .inputlimit, 1;
  487. set .@i, 1;
  488. while ( .@i <= 9 ) {
  489. if ( .@menu[.@i] && getd(".group"+ .@i +"itemid") && getd(".group"+ .@i +"itemamount") ) {
  490. if ( getitemname( getd(".group"+ .@i +"itemid") ) == "null" ) {
  491. debugmes "Private MVP Room: Group no. "+ .@i +" is using invalid item id.";
  492. }
  493. }
  494. set .@i, .@i +1 ;
  495. }
  496. 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";
  497.  
  498. // Set menu for unlimited Spawn
  499. set .@i, 1;
  500. while ( .@i <= 9 ) {
  501. setd ".group"+ .@i +"idsize", getarraysize( getd(".group"+ .@i +"id") );
  502. if ( .@menu[.@i] && getd(".group"+ .@i +"limit") <= 0 ) {
  503. set .@j, 0;
  504. while ( .@j < getd(".group"+ .@i +"idsize") ) {
  505. setd ".group"+ .@i +"menu$", getd(".group"+ .@i +"menu$") + getmonsterinfo( getd(".group"+ .@i +"id["+ .@j +"]"), 0) +":";
  506. set .@j, .@j +1 ;
  507. }
  508. }
  509. set .@i, .@i +1 ;
  510. }
  511.  
  512. end;
  513.  
  514. OnInstanceInit:
  515. setmapflag strnpcinfo(4), mf_nowarpto;
  516. setmapflag strnpcinfo(4), mf_noteleport;
  517. setmapflag strnpcinfo(4), mf_nomemo;
  518. setmapflag strnpcinfo(4), mf_nosave;
  519. setmapflag strnpcinfo(4), mf_nopenalty;
  520. setmapflag strnpcinfo(4), mf_nowarp;
  521. setmapflag strnpcinfo(4), mf_noreturn;
  522. setmapflag strnpcinfo(4), mf_monster_noteleport;
  523. setmapflag strnpcinfo(4), mf_noicewall;
  524. setmapflag strnpcinfo(4), mf_nobaseexp;
  525. setmapflag strnpcinfo(4), mf_nojobexp;
  526. setmapflag strnpcinfo(4), mf_novending;
  527. end;
  528.  
  529. OnInstanceDestroy:
  530. killmonsterall strnpcinfo(4);
  531. mapwarp strnpcinfo(4), "prontera", 153, 153;
  532. sleep 1000;
  533. end;
  534. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement