Advertisement
hendra814

Fishing

Oct 10th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.58 KB | None | 0 0
  1. //===== Custom eAthena Script =======================================
  2. //= Fishing Script
  3. //===== By: =========================================================
  4. //= Mercurial
  5. //===== Description =================================================
  6. //= Fishing spot with random prizes and monsters
  7. //===== Version =====================================================
  8. //= 1.0
  9. //===== Description =================================================
  10. //= $@fishitem - Fishing Prize IDs
  11. //= $itemreq[0] - Fishing Rod ID (Currently set at Hypnotist's Staff[1])
  12. //= $itemreq[1] - Bait ID (Currently set at Fatty Chubby Earthworm)
  13. //= $itemreq[2] - Fishing Hat ID (Currently set at Fisherman's Hat)
  14. //= $@emonster - Monster IDs
  15. //= @fishch - Fishing Item Chance
  16. //= $@fp$ - NPC Name
  17. //===================================================================
  18. //= If you want to add more events just add more cases in the second
  19. //= switch()
  20. //= Have fun!
  21. //===================================================================
  22.  
  23. alb2trea,95,98,4 script Fishing Spot::fishing 723,{
  24. setarray $@Rareitem[0], 12107, 12106, 5100, 5283, 5277, 5284, 5099, 5140, 5153, 2358, 5103, 5278, 5102, 12244, 12189, 12240, 5287, 5184, 5200, 5282, 2664, 2708, 2665, 2667;
  25. setarray $@fishitem[0], 7539,644,603,617,12211,12208,12103,604,12999, 13761, 13598;
  26. setarray $@Catch[0], 902,2401,6426,6049,6096,579,908,963,956,918,960,624,7047,704,1054,1053,7003,720,7013,7870;// List of Junk/Other
  27. //Fishing rod
  28. set .@Rod,2764;
  29. //Fishing Lure
  30. set .@Lure,537;
  31. setarray $@emonster[0], 1031, 1045, 1070, 1044;
  32. set @fishch, 80;
  33. set $@fp$, "[Fishing Spot]";
  34.  
  35. if (isequipped(.@Rod)) && (countitem(.@Lure))
  36. {
  37. mes $@fp$;
  38. mes "You see fish swimming at your feet.";
  39. mes "Do you want start fishing?";
  40. switch(select("Yes", "No"))
  41. {
  42. case 1:
  43. next;
  44. switch(rand(1,7))
  45. {
  46. delitem .@Lure, 1;
  47. case 1:
  48. goto GotFish;
  49. break;
  50. case 2:
  51. mes $@fp$;
  52. mes "You were close but nothing was caught.";
  53. dispbottom "[Fishing] Nothing was caught...";
  54. close2;
  55. specialeffect2 611;
  56. end;
  57. break;
  58. case 3:
  59. mes $@fp$;
  60. mes "You caught an piece of junk item... Yay?";
  61. getitem $@Catch[rand(0,getarraysize($@Catch)-1)],1;
  62. close;
  63. break;
  64. case 4:
  65. getmapxy $@fmap$,$@fmapx,$@fmapy,0;
  66. set $@rn, rand(0, getarraysize($@emonster) - 1);
  67. mes $@fp$;
  68. mes "You fished out a " + getmonsterinfo($@emonster[$@rn], 0) + " ... Run!!!";
  69. monster $@fmap$, $@fmapx, $@fmapy, getmonsterinfo($@emonster[$@rn], 0) + " Leader", $@emonster[$@rn], 1;
  70. close2;
  71. for(set .ctr,0; .ctr<=10; set .ctr, .ctr + 1)
  72. {
  73. if(rand(1, 10) <= 1)
  74. {
  75. npctalk "The " + getmonsterinfo($@emonster[$@rn],0) + " called for back up... RUN!";
  76. monster $@fmap$, $@fmapx, $@fmapy, getmonsterinfo($@emonster[$@rn], 0), $@emonster[$@rn], 1;
  77. }
  78. }
  79. end;
  80. break;
  81. case 5:
  82. mes $@fp$;
  83. mes "You caught an piece of junk item... Yay?";
  84. getitem $@Catch[rand(0,getarraysize($@Catch)-1)],1;
  85. close;
  86. break;
  87. case 6:
  88. mes $@fp$;
  89. goto GotFish;
  90. close;
  91. break;
  92. case 7:
  93. mes $@fp$;
  94. mes "You were close but nothing was caught.";
  95. dispbottom "[Fishing] Nothing was caught...";
  96. close2;
  97. specialeffect2 611;
  98. end;
  99. break;
  100. case 8:
  101. mes $@fps$;
  102. mes "The Luck Dice rolls...";
  103. mes "Input the a number from 1 to 4";
  104. set @chance,rand(1,4);
  105. input @hisinput;
  106. if(@hisinput==@chance)
  107. {
  108. set @fishch,@fishch+10;
  109. goto GotFish;
  110.  
  111. }
  112. else
  113. goto GotFish;
  114. }
  115. break;
  116.  
  117. case 2:
  118. next;
  119. mes $@fp$;
  120. mes "...You walked away...";
  121. close;
  122. break;
  123. }
  124. close;
  125. }
  126. else
  127. {
  128. mes $@fp$;
  129. mes "You need a "+getitemname(.@Rod)+" and to "+getitemname(.@Lure)+" start fishing.";
  130. next;
  131. mes " for better change you need a "+getitemname(5317)+", "+getitemname(2550)+" and "+getitemname(2443)+" .";
  132. close;
  133. }
  134. end;
  135.  
  136. GotFish :
  137. if (isequipped(5317)) set @fishch,@fishch + 5;
  138. if (isequipped(2550)) set @fishch,@fishch + 5;
  139. if (isequipped(2443)) set @fishch,@fishch + 5;
  140. if (isequipped(2764)) set @fishch,@fishch + 5;
  141. if(rand(1,100) >= 100)
  142. {
  143. mes $@fp$;
  144. mes "You had to throw the fish back";
  145. mes "but luckily it was carrying an item.";
  146. getitem $@Rareitem[rand(0,getarraysize($@Rareitem)-1)],1;
  147. mapannounce strcharinfo(3),strcharinfo(0)+" has caught a Super Jackpot from fishing!",bc_map,"0xff77ff";
  148. close2;
  149. specialeffect2 610;
  150. end;
  151. }
  152. else if(rand(1, 100) < @fishch)
  153. {
  154. mes $@fp$;
  155. mes "You had to throw the fish back";
  156. mes "but luckily it was carrying an item.";
  157. getitem $@fishitem[rand(0,getarraysize($@fishitem)-1)],1;
  158. mapannounce strcharinfo(3),strcharinfo(0)+" has caught a Jackpot from fishing!",bc_map,"0xff77ff";
  159. close2;
  160. specialeffect2 610;
  161. end;
  162. }
  163. else if(rand(1, 100) <= 15 && countitem(.@Rod))
  164. {
  165. mes $@fp$;
  166. mes "You managed to catch something, but it was too heavy for your pole";
  167. mes "to endure. The Pole you were using snapped in half.";
  168. delitem .@Rod, 1;
  169. close2;
  170. specialeffect2 611;
  171. end;
  172. }
  173. else
  174. {
  175. mes $@fp$;
  176. mes "You managed to catch something, but it managed to escape.";
  177. close2;
  178. specialeffect2 611;
  179. end;
  180. }
  181. end;
  182. }
  183. hu_fild05,181,226,4 duplicate(fishing) Fishing Spot 723
  184. jawaii.gat,146,105,1 duplicate(fishing) Fishing Spot#10 723
  185. jawaii.gat,190,112,1 duplicate(fishing) Fishing Spot#11 723
  186. jawaii.gat,185,137,1 duplicate(fishing) Fishing Spot#12 723
  187. jawaii.gat,194,136,1 duplicate(fishing) Fishing Spot#13 723
  188. jawaii.gat,244,117,1 duplicate(fishing) Fishing Spot#14 723
  189. jawaii.gat,156,182,1 duplicate(fishing) Fishing Spot#15 723
  190. jawaii.gat,105,181,1 duplicate(fishing) Fishing Spot#16 723
  191. jawaii.gat,106,199,1 duplicate(fishing) Fishing Spot#17 723
  192. jawaii.gat,123,219,1 duplicate(fishing) Fishing Spot#18 723
  193. jawaii.gat,133,271,1 duplicate(fishing) Fishing Spot#19 723
  194. jawaii.gat,104,235,1 duplicate(fishing) Fishing Spot#20 723
  195. jawaii.gat,120,247,1 duplicate(fishing) Fishing Spot#21 723
  196. jawaii.gat,159,185,1 duplicate(fishing) Fishing Spot#22 723
  197. jawaii.gat,119,164,1 duplicate(fishing) Fishing Spot#23 723
  198. comodo.gat,256,163,1 duplicate(fishing) Fishing Spot#37 723
  199. comodo.gat,223,115,1 duplicate(fishing) Fishing Spot#38 723
  200. comodo.gat,167,80,1 duplicate(fishing) Fishing Spot#39 723
  201. comodo.gat,231,77,1 duplicate(fishing) Fishing Spot#40 723
  202. comodo.gat,254,80,1 duplicate(fishing) Fishing Spot#41 723
  203. alb2trea.gat,116,88,1 duplicate(fishing) Fishing Spot#24 723
  204. alb2trea.gat,102,97,1 duplicate(fishing) Fishing Spot#25 723
  205. treasure01.gat,68,113,1 duplicate(fishing) Fishing Spot#26 723
  206. treasure01.gat,68,148,1 duplicate(fishing) Fishing Spot#27 723
  207. treasure01.gat,52,154,1 duplicate(fishing) Fishing Spot#28 723
  208. treasure01.gat,87,156,1 duplicate(fishing) Fishing Spot#29 723
  209. treasure01.gat,68,168,1 duplicate(fishing) Fishing Spot#30 723
  210. treasure02.gat,101,68,1 duplicate(fishing) Fishing Spot#31 723
  211. hu_fild05.gat,187,186,1 duplicate(fishing) Fishing Spot#42 723
  212. hu_fild05.gat,182,228,1 duplicate(fishing) Fishing Spot#43 723
  213. hu_fild05.gat,143,127,1 duplicate(fishing) Fishing Spot#44 723
  214. hu_fild05.gat,243,123,1 duplicate(fishing) Fishing Spot#45 723
  215. hu_fild05.gat,169,201,1 duplicate(fishing) Fishing Spot#46 723
  216. prt_fild08,329,301,0 duplicate(fishing) Fishing Spot#47 723
  217. izlude,143,222,0 duplicate(fishing) Fishing Spot#48 723
  218. hugel,150,135,0 duplicate(fishing) Fishing Spot#49 723
  219. niflheim,59,232,0 duplicate(fishing) Fishing Spot#50 723
  220. hugel,119,182,0 duplicate(fishing) Fishing Spot#51 723
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement