Advertisement
Guest User

Untitled

a guest
Apr 13th, 2015
615
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.03 KB | None | 0 0
  1. //===== By: ==================================================
  2. //= EL Dragon
  3. //===== Current Version: =====================================
  4. //= 1.00
  5. //===== Compatible With: =====================================
  6. //= rAthena SVN
  7. //============================================================
  8. - script event -1,{
  9.  
  10. OnInit:
  11. //---- Lucky Poring Event -----
  12. set .SpecialPorings,5;
  13. set .NormalPorings,666;
  14. //---- Bring Me Items Event -----
  15. setarray .BringMeItems[0],985,914,756,7054,7005,1034,7446,1035,7563,1095,739,7507,508,949,7210,7119,532,1068,7441,7753,7158,7215; // Farm Event Item max. 127
  16. //---- Join Event Warp Command -----
  17. .map_name1$ = "poring_w02";
  18. .map_x1 = 100;
  19. .map_y1 = 194;
  20. bindatcmd "joinevent", strnpcinfo(3) +"::OnEventWarp";
  21. //---------------------
  22. bindatcmd "event",strnpcinfo(3)+"::OnEvent", 40,99;
  23. end;
  24.  
  25.  
  26.  
  27.  
  28. L_BoxEnd:
  29. if(.th_event) announce "Treasure Hunter : All Hyrican Event Box(s) are Dead. The Event is Over!",bc_all,0xcc99ff;
  30. killmonster .map$,"All";
  31. set .th_event,0;
  32. end;
  33.  
  34.  
  35. Onth_win:
  36. dispbottom "Your prize is: "+getitemname(.th_prize)+". Congratulations!";
  37. getitem(.th_prize,.th_prize_amount);
  38. set .Event_Box, .Event_Box - 1;
  39. if( .Event_Box == 0 )
  40. goto L_BoxEnd;
  41. else
  42. announce "Treasure Hunter : " + .Event_Box + " Hyrican Event Box(s) are Alive!",bc_all,0xcc99ff;
  43. end;
  44. set .th_event, 0;
  45.  
  46. Onpc_fail:
  47. dispbottom "Sorry, wrong Poring!";
  48. warp "prontera",156,178;
  49. end;
  50.  
  51. Onpc_win:
  52. killmonster .map$,"All";
  53. dispbottom "That was correct. You win!";
  54. dispbottom "Your prize is: "+getitemname(.pc_prize)+". Congratulations!";
  55. getitem(.pc_prize,.pc_prize_amount);
  56. set .pc_event, 0;
  57. setmapflag .map$,mf_nomobloot;
  58. setmapflag .map$,mf_nodrop;
  59. announce strcharinfo(0)+" wins Poring Catcher Event. Congratulations!",0;
  60. end;
  61.  
  62. OnSpecialKill:
  63. set .SpecialPorings[1],.SpecialPorings[1]-1;
  64. dispbottom "Your prize is: "+getitemname(.luky_prize)+". Congratulations!";
  65. getitem(.luky_prize,.luky_prize_amount);
  66. goto PoringCount;
  67.  
  68. OnNormalKill:
  69. set .NormalPorings[1],.NormalPorings[1]-1;
  70. goto PoringCount;
  71.  
  72. PoringCount:
  73. announce "Special Poring: " + .SpecialPorings[1] + " || Normal Poring: " + .NormalPorings[1],bc_map;
  74. if(!.SpecialPorings[1]) goto OnEndEvent;
  75. end;
  76.  
  77. OnEndEvent:
  78. announce "The Poring Summon Event is now over!",bc_all;
  79. killmonster .Map$,"All";
  80. removemapflag .Map$,mf_nomobloot;
  81. removemapflag .Map$,mf_nodrop;
  82. set .Event,0;
  83. set .SpecialPorings[1],0;
  84. set .NormalPorings[1],0;
  85. end;
  86.  
  87. OnEventWarp:
  88. if($joinevent == 0) goto OnEndWarp;
  89. warp .map_name1$, .map_x1, .map_y1;
  90. end;
  91.  
  92. OnEndWarp:
  93. dispbottom "No Event at the moment.";
  94. end;
  95.  
  96.  
  97.  
  98. OnEvent:
  99. if(getgmlevel()<97) end;
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108. if(.@atcmd_parameters$[0]=="lucky" && .@atcmd_parameters$[1]=="stop"){
  109. if(.lucky_event==0){
  110. dispbottom "Event didn't started.";
  111. end;
  112. }
  113. killmonster .map$,"All";
  114. set .lucky_event, 0;
  115. removemapflag .Map$,mf_nomobloot;
  116. removemapflag .Map$,mf_nodrop;
  117. announce "Lucky Poring Event was ended by "+strcharinfo(0)+".",0;
  118. end;
  119. }
  120.  
  121. if(.@atcmd_parameters$[0]=="lucky" && .@atcmd_parameters$[1]=="start"){
  122. if(.lucky_event==1){
  123. dispbottom "Event is already running.";
  124. end;
  125. }
  126. set .luky_prize, .@atcmd_parameters$[2];
  127. set .luky_prize_amount, .@atcmd_parameters$[3];
  128. set .Event,0;
  129. set .lucky_event,1;
  130. set .SpecialPorings[1],0;
  131. set .NormalPorings[1],0;
  132. set $@ran, rand(1,8);
  133. if ($@ran == 8) set .Map$,"lighthalzen";
  134. if ($@ran == 7) set .Map$,"louyang";
  135. if ($@ran == 6) set .Map$,"comodo";
  136. if ($@ran == 5) set .Map$,"xmas";
  137. if ($@ran == 4) set .Map$,"aldebaran";
  138. if ($@ran == 3) set .Map$,"payon";
  139. if ($@ran == 2) set .Map$,"geffen";
  140. if ($@ran == 1) set .Map$,"morocc";
  141. killmonster .Map$,"All";
  142. setmapflag .Map$,mf_nomobloot;
  143. setmapflag .map$,mf_nodrop;
  144. monster .Map$,0,0,"Poring",1002,.SpecialPorings, strnpcinfo(0)+"::OnSpecialKill";
  145. monster .Map$,0,0,"Poring",1002,.NormalPorings, strnpcinfo(0)+"::OnNormalKill";
  146. set .SpecialPorings[1],.SpecialPorings;
  147. set .NormalPorings[1],.NormalPorings;
  148. announce "The Poring Event has begun!",bc_all;
  149. announce "Location: " + .Map$,bc_all;
  150. mapannounce ".Map$","Special Poring: " + .SpecialPorings,bc_all;
  151. mapannounce ".Map$","Normal Poring: " + .NormalPorings,bc_all;
  152. end;
  153. }
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161. if(.@atcmd_parameters$[0]=="poring" && .@atcmd_parameters$[1]=="stop"){
  162. if(.pc_event==0){
  163. dispbottom "Event didn't started.";
  164. end;
  165. }
  166. killmonster .map$,"All";
  167. set .pc_event, 0;
  168. removemapflag .Map$,mf_nomobloot;
  169. removemapflag .Map$,mf_nodrop;
  170. removemapflag .Map$,mf_noskill;
  171. announce "Poring Catcher Event was ended by "+strcharinfo(0)+".",0;
  172. end;
  173. }
  174.  
  175. if(.@atcmd_parameters$[0]=="poring" && .@atcmd_parameters$[1]=="start"){
  176. if(.pc_event==1){
  177. dispbottom "Event is already running.";
  178. end;
  179. }
  180. getmapxy(.map$,.mapx,.mapy,0);
  181. set .@pc_x1,(.mapx-15);
  182. set .@pc_y1,(.mapy+15);
  183. set.@pc_x2,(.mapx+15);
  184. set .@pc_y2,(.mapy-15);
  185. set .pc_prize, .@atcmd_parameters$[2];
  186. set .pc_prize_amount, .@atcmd_parameters$[3];
  187. areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "P0ring", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
  188. areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Poriing", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
  189. areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Pooring", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
  190. areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Porinng", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
  191. areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Poporing", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
  192. areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Poríng", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
  193. areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Porìng", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
  194. areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Póring", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
  195. areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Pòring", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
  196. areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Porinq", 1002, 10, strnpcinfo(0)+"::Onpc_fail";
  197. areamonster .map$, .@pc_x1, .@pc_y1, .@pc_x2, .@pc_y2, "Poring", 1002, 1, strnpcinfo(0)+"::Onpc_win";
  198. setmapflag .map$,mf_nomobloot;
  199. setmapflag .map$,mf_nodrop;
  200. setmapflag .map$,mf_noskill;
  201. set .pc_event, 1;
  202. announce "Poring Catcher Event started in "+.map$+".",0;
  203. end;
  204. }
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212. if(.@atcmd_parameters$[0]=="box" && .@atcmd_parameters$[1]=="stop"){
  213. if(.th_event==0){
  214. dispbottom "Event didn't started.";
  215. end;
  216. }
  217. killmonster .map$,"All";
  218. set .th_event, 0;
  219. announce "Treasure Hunter Event was ended by "+strcharinfo(0)+".",0;
  220. end;
  221. }
  222.  
  223. if(.@atcmd_parameters$[0]=="box" && .@atcmd_parameters$[1]=="start"){
  224. if(.th_event==1){
  225. dispbottom "Event is already running.";
  226. end;
  227. }
  228. getmapxy(.map$,.mapx,.mapy,0);
  229. set .th_prize, .@atcmd_parameters$[2];
  230. set .th_prize_amount, .@atcmd_parameters$[3];
  231. set .@rand,rand(1,6);
  232. if (.@rand == 1) set .Event_Box,"1";
  233. if (.@rand == 2) set .Event_Box,"2";
  234. if (.@rand == 3) set .Event_Box,"3";
  235. if (.@rand == 4) set .Event_Box,"2";
  236. if (.@rand == 5) set .Event_Box,"1";
  237. monster .map$, 0, 0, "Hyrican Event Box", 1732, .Event_Box, strnpcinfo(0)+"::Onth_win";
  238. set .th_event, 1;
  239. announce "Treasure Hunter Event started in "+.map$+".",0;
  240. announce "Treasure Hunter : " + .Event_Box + " Hyrican Event Box(s) are Alive!",bc_all,0xcc99ff;
  241. }
  242.  
  243. if(.@atcmd_parameters$[0]=="dice" && .@atcmd_parameters$[1]=="stop"){
  244. if(.dc_event==0){
  245. dispbottom "Event didn't started.";
  246. end;
  247. }
  248. set .dc_event, 0;
  249. set $joinevent,0;
  250. announce "Dice Event was ended by "+strcharinfo(0)+".",0;
  251. end;
  252. }
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261. if(.@atcmd_parameters$[0]=="item" && .@atcmd_parameters$[1]=="stop"){
  262. if(.item_event==0){
  263. dispbottom "Event didn't started.";
  264. end;
  265. }
  266. set .item_event, 0;
  267. set $joinevent,0;
  268. announce "BringMeItems was ended by "+strcharinfo(0)+".",0;
  269. end;
  270. }
  271.  
  272. if(.@atcmd_parameters$[0]=="dice" && .@atcmd_parameters$[1]=="start"){
  273. if(.dc_event==1){
  274. dispbottom "Event is already running.";
  275. end;
  276. }
  277.  
  278. set getvariableofnpc(.dc_prize,"startevent"), .@atcmd_parameters$[2];;
  279. set getvariableofnpc(.dc_prize_amount,"itemfarmevent"), .@atcmd_parameters$[3];;
  280. announce "Dice Event: started in 1 minute at Event Jack. use @joinevent",0;
  281. set $joinevent,1;
  282. sleep2 60000;
  283. set .dc_event, 1;
  284. set $joinevent,0;
  285. announce "Dice Event: started talk to Event Jack.",0;
  286. end;
  287. }
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294. if(.@atcmd_parameters$[0]==""){
  295. dispbottom "Syntax:";
  296. dispbottom "@event Event Name#Start or Stop#Prize ID#ID Amount , without #";
  297. dispbottom "====================================";
  298. dispbottom "Events:";
  299. dispbottom "poring, box, dice, item, lucky";
  300. end;
  301. }
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308. if(.@atcmd_parameters$[0]=="item" && .@atcmd_parameters$[1]=="start"){
  309. if(.item_event==1){
  310. dispbottom "Event is already running.";
  311. end;
  312. }
  313.  
  314. set getvariableofnpc(.item_prize,"itemfarmevent"), .@atcmd_parameters$[2];;
  315. set getvariableofnpc(.item_prize_amount,"itemfarmevent"), .@atcmd_parameters$[3];;
  316. announce "BringMeItems: started at Item Farmer. use @joinevent",0;
  317. set $joinevent,1;
  318. sleep2 100;
  319. set .item_event, 1;
  320. set .@i, rand( getarraysize( .BringMeItems ) );
  321. set $item, .BringMeItems[ .@i ];
  322. set $amount, rand( 20, 45 );
  323. announce "Itme Farmer: Bring me " + $amount + "x " + getitemname( $item ),0;
  324. end;
  325. }
  326. }
  327.  
  328.  
  329.  
  330. //------------ Dice Event ------------
  331. poring_w02,101,202,4 script Event Jack::startevent 873,{
  332. if(getvariableofnpc(.dc_event,"event")==1) goto OnDCEvent;
  333. else mes "[^FF7700Event Jack^000000]";
  334. mes "No Event at the moment.";
  335. close;
  336.  
  337.  
  338.  
  339. OnDCEvent:
  340. mes "[^FF7700Event Jack^000000]";
  341. mes "Hello my fellow friend, wanna try your luck with a dice?";
  342. next;
  343. switch(select("Yes:No")){
  344.  
  345. case 1:
  346. mes "[^FF7700Event Jack^000000]";
  347. mes "If you dice a 6 you win.";
  348. next;
  349. L_dice:
  350. mes "[^FF7700Event Jack^000000]";
  351. mes "Good Luck!";
  352. next;
  353. switch(select("Dice:Stop")) {
  354.  
  355. case 1:
  356. progressbar "00FF00",3;
  357. set .dc_rand, rand(1,100);
  358. if(.dc_rand<=3) { emotion 63, 1; dispbottom "Dice Number: 6. You won!"; goto L_DCWin; }
  359. if(.dc_rand>3 && .dc_rand<=15) { emotion 62, 1; dispbottom "Dice Number: 5. Almost!"; goto L_DCFail; }
  360. if(.dc_rand>15 && .dc_rand<=35) { emotion 61, 1; dispbottom "Dice Number: 4. A bit more."; goto L_DCFail; }
  361. if(.dc_rand>35 && .dc_rand<=60) { emotion 60, 1; dispbottom "Dice Number: 3. Try again!"; goto L_DCFail; }
  362. if(.dc_rand>60 && .dc_rand<=80) { emotion 59, 1; dispbottom "Dice Number: 2. Don't give up."; goto L_DCFail; }
  363. else { emotion 58, 1; dispbottom "Dice Number: 1. You can do it!"; goto L_DCFail; }
  364.  
  365. case 2:
  366. goto L_close;
  367. end;
  368. }
  369.  
  370. case 2:
  371. L_close:
  372. mes "[^FF7700Event Jack^000000]";
  373. mes "Maybe next time!";
  374. close;
  375. }
  376.  
  377. L_DCWin:
  378. if(getvariableofnpc(.dc_event,"event")==0){
  379. mes "[^FF7700Event Jack^000000]";
  380. mes "The Event is over. Someone has won already.";
  381. close;
  382. }
  383. set getvariableofnpc(.dc_event,"event"), 0;
  384. dispbottom "Your prize is "+getitemname(.dc_prize)+".";
  385. getitem(.dc_prize,.dc_prize_amount);
  386. announce strcharinfo(0)+" wins Dice Event. Congratulations!",0;
  387. close;
  388.  
  389. L_DCFail:
  390. if(getvariableofnpc(.dc_event,"event")==0){
  391. mes "[^FF7700Event Jack^000000]";
  392. mes "The Event is over. Someone has won!";
  393. close;
  394. }
  395. goto L_dice;
  396. end;
  397. }
  398.  
  399.  
  400. //------------ BringMeItems Event ------------
  401. poring_w02,96,202,4 script Item Farmer::itemfarmevent 866,{
  402. if(getvariableofnpc(.item_event,"event")==1) goto OnIDEvent;
  403. else mes "[^FF7700Item Farmer^000000]";
  404. mes "No Event at the moment.";
  405. close;
  406.  
  407. OnIDEvent:
  408. if ( countitem( $item ) < $amount ) {
  409. mes "[^FF7700Item Farmer^000000]";
  410. mes "Bring me " + $amount + "x "+getitemname($item)+".";
  411. close;
  412. }
  413. delitem $item, $amount;
  414. announce strcharinfo(0)+" wins BringMeItems Event. Congratulations!",0;
  415. set getvariableofnpc(.item_event,"event"), 0;
  416. getitem(.item_prize,.item_prize_amount);
  417. set .item_event, .item_prize_amount;
  418. set $joinevent,0;
  419. end;
  420.  
  421. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement