Advertisement
Guest User

Simple Warper

a guest
Oct 26th, 2012
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.60 KB | None | 0 0
  1. //============================================================
  2. //= 10/27/2012
  3. //= Valiente - New script! Warps players anywhere they want
  4. //= by just typing the map name!
  5. //= DigmaanRO - Permitted servers: www.woon-ro.com
  6. //============================================================
  7.  
  8. prontera.gat,151,181,3 script Warper2::Warper2 874,{
  9. cutin "ep13_ahat_f",2;
  10. mes "[Warper]";
  11. mes "Would you like to be warped somewhere?";
  12. next;
  13. mes "[Warper]";
  14. mes "Where would you like to be warp?";
  15. next;
  16. menu "Last Warp",lastmap,"Type Map Name",type;
  17.  
  18. lastmap:
  19. if(lastmap$=="") { mes "You have not warped anywhere yet!"; cutin "",255; close; }
  20. if(lastmap$=="arug_dun01" || lastmap$=="schg_dun01" || lastmap$=="gld_dun02" || lastmap$=="gld_dun04") {
  21. mes "Warping here costs ^FF0000" + BaseLevel*5000 + "^000000 Zeny.";
  22. next;
  23. switch(select("Proceed:Nevermind")) {
  24. case 1:
  25. if(BaseLevel*5000 > Zeny) {
  26. mes "[Warper]";
  27. mes "You don't have enough zeny.";
  28. cutin "",255;
  29. close;
  30. }
  31. else
  32. {
  33. warp lastmap$,lastx,lasty;
  34. set Zeny,Zeny-(BaseLevel*5000);
  35. }
  36. case 2:
  37. mes "[Warp Agent]";
  38. mes "Have a nice day.";
  39. cutin "",255;
  40. close;
  41. }
  42. }
  43. warp lastmap$,lastx,lasty; end;
  44.  
  45. type:
  46. setarray .@towns$,
  47. "amatsu",
  48. "ayothaya",
  49. "brasilis",
  50. "comodo",
  51. "dewata",
  52. "dicastes01",
  53. "eclage",
  54. "einbroch",
  55. "geffen",
  56. "gonryun",
  57. "hugel",
  58. "izlude",
  59. "jawaii",
  60. "lighthalzen",
  61. "louyang",
  62. "malangdo",
  63. "malaya",
  64. "manuk",
  65. "mora",
  66. "morocc",
  67. "moscovia",
  68. "niflheim",
  69. "payon",
  70. "prontera",
  71. "rachel",
  72. "splendide",
  73. "thor_camp",
  74. "umbala",
  75. "veins",
  76. "xmas",
  77. "yuno"; // 31
  78. setarray .@tcoordsx, 197, 150, 196, 209, 199, 197, 111, 64, 120, 160, 96, 128, 213, 158, 217, 224, 212, 260, 111, 156, 219, 202, 179, 155, 130, 200, 246, 127, 216, 147, 157,52;
  79. setarray .@tcoordsy, 89, 113, 227, 143, 179, 187, 39, 200, 68, 121, 145, 114, 230, 92, 100, 184, 206, 175, 97, 93, 193, 174, 100, 183, 111, 153, 68, 128, 123, 134, 151,17;
  80.  
  81. setarray .@dungeons$,
  82. "abyss_01",
  83. "abyss_02",
  84. "abyss_03",
  85. "ama_dun01",
  86. "ama_dun02",
  87. "ama_dun03",
  88. "anthell01",
  89. "anthell02",
  90. "ayo_dun01",
  91. "ayo_dun02",
  92. "beach_dun",
  93. "beach_dun2",
  94. "beach_dun3",
  95. /*"ecl_tdun01",
  96. "ecl_tdun02",
  97. "ecl_tdun03",
  98. "ecl_tdun04",*/
  99. "lhz_dun01",
  100. "lhz_dun02",
  101. "lhz_dun03",
  102. /*"lhz_dun04",*/
  103. "bra_dun01",
  104. "bra_dun02",
  105. /*"izlu2dun",*/
  106. "iz_dun00",
  107. "iz_dun01",
  108. "iz_dun02",
  109. "iz_dun03",
  110. "iz_dun04",
  111. "c_tower1",
  112. "c_tower2",
  113. "c_tower3",
  114. "c_tower4",
  115. "alde_dun01",
  116. "alde_dun02",
  117. "alde_dun03",
  118. "alde_dun04",
  119. "mjo_dun01",
  120. "mjo_dun02",
  121. "mjo_dun03",
  122. "dew_dun01",
  123. "dew_dun02",
  124. "ein_dun01",
  125. "ein_dun02",
  126. "gef_dun00",
  127. "gef_dun01",
  128. "gef_dun02",
  129. "gef_dun03",
  130. "gefenia01",
  131. "gefenia02",
  132. "gefenia03",
  133. "gefenia04",
  134. "glast_01",
  135. "gl_church",
  136. "gl_chyard",
  137. "gl_cas01",
  138. "gl_cas02",
  139. "gl_prison",
  140. "gl_prison1",
  141. "gl_knt01",
  142. "gl_knt02",
  143. "gl_in01",
  144. "gl_step",
  145. "gl_sew01",
  146. "gl_sew02",
  147. "gl_sew03",
  148. "gl_sew04",
  149. "gl_dun01",
  150. "gl_dun02",
  151. "gon_dun01",
  152. "gon_dun02",
  153. "gon_dun03",
  154. "prt_maze01",
  155. "prt_maze02",
  156. "prt_maze03",
  157. "ice_dun01",
  158. "ice_dun02",
  159. "ice_dun03",
  160. "ice_dun04",
  161. "juperos_01",
  162. "juperos_02",
  163. "jupe_core",
  164. "kh_dun01",
  165. "kh_dun02",
  166. "lou_dun01",
  167. "lou_dun02",
  168. "lou_dun03",
  169. "mag_dun01",
  170. "mag_dun02",
  171. "mosk_dun01",
  172. "most_dun02",
  173. "most_dun03",
  174. "nameless_n",
  175. "abbey01",
  176. "abbey02",
  177. "abbey03",
  178. "1@nyd",
  179. "2@nyd",
  180. "odin_temp01",
  181. "odin_temp02",
  182. "odin_temp03",
  183. "orcsdun01",
  184. "orcsdun02",
  185. "pay_dun00",
  186. "pay_dun01",
  187. "pay_dun02",
  188. "pay_dun03",
  189. "pay_dun04",
  190. "prt_sewb1",
  191. "prt_sewb2",
  192. "prt_sewb3",
  193. "prt_sewb4",
  194. "moc_pryd01",
  195. "moc_pryd02",
  196. "moc_pryd03",
  197. "moc_pryd04",
  198. "moc_pryd05",
  199. "moc_pryd06",
  200. "ra_san01",
  201. "ra_san02",
  202. "ra_san03",
  203. "ra_san04",
  204. "ra_san05",
  205. "dic_dun01",
  206. "dic_dun02",
  207. "dic_dun03",
  208. "in_sphinx1",
  209. "in_sphinx2",
  210. "in_sphinx3",
  211. "in_sphinx4",
  212. "in_sphinx5",
  213. "treasure01",
  214. "treasure02",
  215. "tha_t01";
  216. setarray .@dcoordsx, 264, 275, 116, 228, 34, 119, 35, 168, 275, 24, 266, 255, 23,/*ecl*/ 150, 150, 140,/*lhz_dun04*/ 199, 22,/*izlu2dun*/ 168, 253, 236, 32, 26, 199, 148, 65, 56, 297, 127, 277, 268,52,381,302,286,277,22,292,104,115,106,203, 40,203,266,130,270,156,147,199,104,14,150,150,157,77,12,258,108,171, 68,133,224,153, 28,68,176,93,23,157,151,149, 33, 53,37,150, 28, 41,218,282,165,126,47,189,163, 33,256,51,150,120,311,163,298,224,266, 32, 21, 21,19,19,155,201,131,19,180,100,192, 10,100,181,94,192,139, 32, 10,204,150, 151,365,103,288,149,210, 10,100,69,102,150;
  217. setarray .@dcoordsy, 272, 270, 28, 11, 41, 14, 262, 170, 19, 26, 67, 244, 260,/*ecl*/ 228, 18, 133,/*lhz_dun04*/ 41, 30,/*izlu2dun*/ 168, 252, 204, 63, 27, 159, 283, 147, 115, 25, 169, 178, 74,17,343,262,162, 31,14,290, 99,236,132,200,103, 34,168,272,304, 7, 15, 29, 25,70, 14, 15,287,68, 7,255,291,283,277,271,274, 53,113,16, 7,20, 8, 14,155, 22,158,247,63,285,226,198,196, 20, 38, 68,30, 46, 33,136,215,14, 11, 10,196,157,167,149,280,170,185,163,33,63,159,204,247,19,169, 92, 9,192, 92, 11,96, 8, 17, 21,149,218, 9, 181, 45,141, 9, 81, 54,222, 99,24, 27, 39;
  218.  
  219. setarray .@dungeons2$,
  220. "tha_t02",
  221. "tha_t03",
  222. "tha_t04",
  223. "tha_t05",
  224. "tha_t06",
  225. "tha_t07",
  226. "tha_t08",
  227. "tha_t09",
  228. "tha_t10",
  229. "tha_t11",
  230. "tha_t12",
  231. "thor_v01",
  232. "thor_v02",
  233. "thor_v03",
  234. "xmas_dun01",
  235. "xmas_dun02",
  236. "tur_dun01",
  237. "tur_dun02",
  238. "tur_dun03",
  239. "tur_dun04",
  240. "um_dun01",
  241. "um_dun02",
  242. "gld_dun02",
  243. "gld_dun04",
  244. "arug_dun01",
  245. "schg_dun01";
  246. setarray .@d2coordsx,150,220, 59,62, 89, 35, 93, 29,159,19,130, 21, 75, 34,205,129,154,148,132,100,42,51, 26,200,111,200;
  247. setarray .@d2coordsy,136,158,143,11,221,166,148,107,138,20, 52,228,205,272, 15,133, 49,261,189,192,31,25,161,193, 31,137;
  248.  
  249. setarray .@fields$,
  250. "ama_fild01",
  251. "ayo_fild01",
  252. "ayo_fild02",
  253. "bif_fild01",
  254. "bif_fild02",
  255. "bra_fild01",
  256. "cmd_fild01",
  257. "cmd_fild02",
  258. "cmd_fild03",
  259. "cmd_fild04",
  260. "cmd_fild05",
  261. "cmd_fild06",
  262. "cmd_fild07",
  263. "cmd_fild08",
  264. "cmd_fild09",
  265. "dew_fild01",
  266. "einbech",
  267. "ein_fild01",
  268. "ein_fild02",
  269. "ein_fild03",
  270. "ein_fild04",
  271. "ein_fild05",
  272. "ein_fild06",
  273. "ein_fild07",
  274. "ein_fild08",
  275. "ein_fild09",
  276. "ein_fild10",
  277. "dicastes02",
  278. "dic_fild01",
  279. "dic_fild02",
  280. "gef_fild00",
  281. "gef_fild01",
  282. "gef_fild02",
  283. "gef_fild03",
  284. "gef_fild04",
  285. "gef_fild05",
  286. "gef_fild06",
  287. "gef_fild07",
  288. "gef_fild08",
  289. "gef_fild09",
  290. "gef_fild10",
  291. "gef_fild11",
  292. "gef_fild12",
  293. "gef_fild13",
  294. "gef_fild14",
  295. "gon_fild01",
  296. "hu_fild01",
  297. "hu_fild02",
  298. "hu_fild03",
  299. "hu_fild04",
  300. "hu_fild05",
  301. "hu_fild06",
  302. "hu_fild07",
  303. "lhz_fild01",
  304. "lhz_fild02",
  305. "lhz_fild03",
  306. "lou_fild01",
  307. "xmas_fild01",
  308. "man_fild01",
  309. "man_fild02",
  310. "man_fild03",
  311. "moc_fild01",
  312. "moc_fild02",
  313. "moc_fild03",
  314. "moc_fild04",
  315. "moc_fild05",
  316. "moc_fild06",
  317. "moc_fild07",
  318. "moc_fild08",
  319. "moc_fild09",
  320. "moc_fild10",
  321. "moc_fild11",
  322. "moc_fild12",
  323. "moc_fild13",
  324. "moc_fild14",
  325. "moc_fild15",
  326. "moc_fild16",
  327. "moc_fild17",
  328. "moc_fild18",
  329. "moc_fild19",
  330. "moc_fild21",
  331. "moc_fild22",
  332. "mosk_fild01",
  333. "mosk_fild02",
  334. "mjolnir_01",
  335. "mjolnir_02",
  336. "mjolnir_03",
  337. "mjolnir_04",
  338. "mjolnir_05",
  339. "mjolnir_06",
  340. "mjolnir_07",
  341. "mjolnir_08",
  342. "mjolnir_09",
  343. "mjolnir_10",
  344. "mjolnir_11",
  345. "mjolnir_12",
  346. "nif_fild01",
  347. "nif_fild02",
  348. "pay_fild01",
  349. "pay_fild02",
  350. "pay_fild03",
  351. "pay_fild04",
  352. "pay_fild05",
  353. "pay_fild06",
  354. "pay_fild07",
  355. "pay_fild08",
  356. "pay_fild09",
  357. "pay_fild10",
  358. "pay_fild11",
  359. "prt_fild00",
  360. "prt_fild01",
  361. "prt_fild02",
  362. "prt_fild03",
  363. "prt_fild04",
  364. "prt_fild05",
  365. "prt_fild06",
  366. "prt_fild07",
  367. "prt_fild08",
  368. "prt_fild09",
  369. "prt_fild10",
  370. "prt_fild11",
  371. "ra_fild01",
  372. "ra_fild02",
  373. "ra_fild03",
  374. "ra_fild04",
  375. "ra_fild05",
  376. "ra_fild06",
  377. "ra_fild07";
  378. setarray .@fcoordsx, 190,173,212,161,156,78,180,231,191,228,224,190,234,194,172,55,190,142,182,187,185,216,195,272,173,207,196,198,34, 71, 46,213,195,257,188,166,248,195,186,221,178,136,240,235,211,220,268,222,232,252,196,216,227,240,185,240,229,115,364, 38, 84,219,177,194,184,203,213,224,229,195,209,198,156,185,209,223,206,208,209,85, 35, 37, 99,204,204,175,208,179,181,195,235,188,205,245,180,196,215,167,158,151,205,186,134,193,200,137,201,160,194,184,190,240,190,307,239,185,193,187,210,195,198,192,235,202,202,225,202,263;
  379. setarray .@fcoordsy, 197,134,150,322,232,34,178,160,172,194,203,223,177,175,172,68, 79,225,141,228,173,173,148,220,214,174,200,192,84,364,199,204,212,192,171,263,158,191,183,117,218,328,181,235,185,227,101,193,185,189,106,220,197,179,235,226,187,145,230,261,364,205,206,182,217,213,208,170,177,198,168,216,187,263,219,188,228,238,223,97,193,195,105, 59,120,193,213,180,240,270,202,215,144,223,206,208,229,234,206,219,148,247,204,235,177,189,224,205,150,235,206,206,143,252,213,188,194,218,183,149,164,162,166,206,208,202,214,196;
  380.  
  381. setarray .@fields2$,
  382. "ra_fild08",
  383. "ra_fild09",
  384. "ra_fild10",
  385. "ra_fild11",
  386. "ra_fild12",
  387. "ra_fild13",
  388. "spl_fild01",
  389. "spl_fild02",
  390. "spl_fild03",
  391. "um_fild01",
  392. "um_fild02",
  393. "um_fild03",
  394. "um_fild04",
  395. "ve_fild01",
  396. "ve_fild02",
  397. "ve_fild03",
  398. "ve_fild04",
  399. "ve_fild05",
  400. "ve_fild06",
  401. "ve_fild07",
  402. "yggdrasil01",
  403. "yuno_fild01",
  404. "yuno_fild02",
  405. "yuno_fild03",
  406. "yuno_fild04",
  407. "yuno_fild05",
  408. "yuno_fild06",
  409. "yuno_fild07",
  410. "yuno_fild08",
  411. "yuno_fild09",
  412. "yuno_fild10",
  413. "yuno_fild11",
  414. "yuno_fild12";
  415. setarray .@f2coordsx, 217, 87, 277, 221, 175, 174, 288, 98, 98,217,223,237,202,186,196,222, 51,202,150,149,204,189,192,221,226,227,187,231,196,183,200,195,196;
  416. setarray .@f2coordsy, 201,121,181, 185, 200, 197, 34, 35,365,206,221,215,197,175,370, 45,250,324,223,307, 78,224,207,157,199,177,232,174,203,214,124,226,370;
  417.  
  418. set .@tarraysize, getarraysize(.@towns$);
  419. set .@darraysize, getarraysize(.@dungeons$);
  420. set .@d2arraysize, getarraysize(.@dungeons2$);
  421. set .@farraysize, getarraysize(.@fields$);
  422. set .@f2arraysize, getarraysize(.@fields2$);
  423. set .@totalmapsize,.@totalmapsize+.@tarraysize+.@darraysize+.@d2arraysize+.@farraysize+.@f2arraysize;
  424.  
  425. set .@darraysize,.@darraysize+.@d2arraysize;
  426. set .@farraysize,.@farraysize+.@f2arraysize;
  427.  
  428. set .@warp$,"prontera"; //default value
  429. mes "[Warp Agent]";
  430. mes "There are "+ .@totalmapsize +" maps that can be inputted";
  431. mes "- "+ .@tarraysize +" towns";
  432. mes "- "+ .@darraysize +" dungeons";
  433. mes "- "+ .@farraysize +" fields";
  434. next;
  435. mes "Please type the name of the map you want to go:";
  436. mes "NOTE: ONLY FIELDS, DUNGEONS AND TOWNS.";
  437. mes "Example: prontera, prt_fild08, /etc.";
  438. next;
  439. input .@warp$;
  440. set .@i,0;
  441. while ((.@warp$ != .@towns$[.@i] && .@warp$ != .@dungeons$[.@i] && .@warp$ != .@dungeons2$[.@i] && .@warp$ != .@fields$[.@i] && .@warp$ != .@fields2$[.@i]) && .@i < 128) {
  442. set .@i,.@i+1;
  443. if(.@i == 128) {
  444. mes "[Warp Agent]";
  445. mes "Invalid map! You must have typed a restricted map";
  446. mes "or misspelled the map name.";
  447. cutin "",255;
  448. close;
  449. }
  450. }
  451. next;
  452. mes "[Warp Agent]";
  453. mes "You'll be warped to "+ .@warp$ +".";
  454. next;
  455. if(.@towns$[.@i] == .@warp$ ) { warp .@towns$[.@i],.@tcoordsx[.@i],.@tcoordsy[.@i]; set lastmap$,.@towns$[.@i]; set lastx,.@tcoordsx[.@i]; set lasty,.@tcoordsx[.@i]; }
  456. else if(.@dungeons$[.@i] == .@warp$ ) { warp .@dungeons$[.@i],.@dcoordsx[.@i],.@dcoordsy[.@i]; set lastmap$,.@dungeons$[.@i]; set lastx,.@dcoordsx[.@i]; set lasty,.@dcoordsx[.@i]; }
  457. else if(.@fields$[.@i] == .@warp$ ) { warp .@fields$[.@i],.@fcoordsx[.@i],.@fcoordsy[.@i]; set lastmap$,.@fields$[.@i]; set lastx,.@fcoordsx[.@i]; set lasty,.@fcoordsx[.@i]; }
  458. else if(.@fields2$[.@i] == .@warp$ ) { warp .@fields2$[.@i],.@f2coordsx[.@i],.@f2coordsy[.@i]; set lastmap$,.@fields2$[.@i]; set lastx,.@f2coordsx[.@i]; set lasty,.@f2coordsx[.@i]; }
  459. else if(.@dungeons2$[.@i] == .@warp$ ) {
  460. if (.@warp$ == "gld_dun02" || .@warp$ == "arug_dun01" || .@warp$ == "gld_dun04" || .@warp$ == "schg_dun01"){
  461. mes "[Warp NPC]";
  462. mes "Warping to this area costs ^FF0000" + BaseLevel*5000 + "^000000 Zeny.";
  463. mes "Is that ok with you?";
  464. next;
  465. switch(select("Yes:No")) {
  466. case 1:
  467. if(BaseLevel*5000 > Zeny){
  468. mes "[Warp Agent]";
  469. mes "I'm sorry, you don't have the required Zeny.";
  470. mes "Please come back once you earned enough.";
  471. cutin "",255;
  472. close;
  473. }
  474. else {
  475. set Zeny,Zeny-(BaseLevel*5000);
  476. warp .@dungeons2$[.@i],.@d2coordsx[.@i],.@d2coordsy[.@i];
  477. set lastmap$,.@dungeons2$[.@i];
  478. set lastx,.@d2coordsx[.@i];
  479. set lasty,.@d2coordsy[.@i];
  480. }
  481. case 2:
  482. mes "[Warp Agent]";
  483. mes "Have a nice day.";
  484. cutin "",255;
  485. close;
  486. }
  487. }
  488. else {
  489. warp .@dungeons2$[.@i],.@d2coordsx[.@i],.@d2coordsy[.@i];
  490. set lastmap$,.@dungeons2$[.@i];
  491. set lastx,.@d2coordsx[.@i];
  492. set lasty,.@d2coordsy[.@i];
  493. }
  494. }
  495. else {
  496. next;
  497. mes "[Warp Agent]";
  498. mes "I'm sorry, something appears to be wrong.";
  499. mes "I will contact the developer to fix this issue." ;
  500. mes "Sorry for the inconvenience.";
  501. cutin "",255;
  502. close;
  503. }
  504. end;
  505. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement