SHARE
TWEET

Untitled

a guest Apr 24th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local Proxy = module("vrp", "lib/Proxy")
  2. local Tunnel = module("vrp", "lib/Tunnel")
  3.  
  4. vRP = Proxy.getInterface("vRP")
  5. vRPclient = Tunnel.getInterface("vRP","fishing")
  6.  
  7. RegisterServerEvent('fishing:item')
  8. AddEventHandler('fishing:item', function()
  9.     local user_id = vRP.getUserId({source})
  10.     local player = vRP.getUserSource({user_id})
  11.     local cops = vRP.getUsersByGroup({"Fisher"})
  12.     local randomBreak = math.random(1,20)
  13.     if vRP.hasGroup({user_id,"Fisher"}) then
  14.         if not vRP.tryGetInventoryItem({user_id,"fishing_pole",1}) then
  15.             TriggerClientEvent('cancel', player)
  16.             vRPclient.notify(player,{"~r~You need a fishing pole from the store."})
  17.         else
  18.             TriggerClientEvent('hasFishingPole', player)
  19.             if randomBreak ~= 3 then
  20.                 vRP.giveInventoryItem({user_id,"fishing_pole",1})
  21.             else
  22.                 vRPclient.notify(player,{"~r~Your Fishing Pole Has Broken."})
  23.             end
  24.         end
  25.     else
  26.         vRPclient.notify(player,{"~r~You are not a fisherman!"})
  27.     end
  28. end)
  29. --[[
  30. local Drop_1 = { 345, 341, 318, 290, 153, 327, 339, 120, 104, 329, 300, 4, 360, 26, 10, 54, 1, 6, 282, 162, 171, 109, 127, 125, 148, 217, 19, 361, 16, 261 }
  31. local Drop_2 = { 160, 105,  51, 85, 304, 164, 169, 80, 73, 332, 228, 77, 264, 24, 59, 242, 50, 216, 298, 350, 60, 197, 121, 203, 245 }
  32. local Drop_3 = { 33, 122, 326, 359, 47, 106, 66, 116, 259, 212, 248, 130, 268, 306, 18, 349, 74, 83, 218, 297 }
  33. local Drop_4 = { 157, 257, 348, 9 }
  34. local Drop_5 = { 355, 328, 289, 5, 362, 269, 56, 76, 295, 191, 101, 144, 275, 93, 17, 225, 319, 199, 28, 324 }
  35. local Drop_6 = { 301, 281, 314, 100, 331, 192, 40, 303, 239, 64, 255, 38, 147, 250, 287, 2, 184, 99, 30, 222 }
  36. local Drop_7 = 163
  37. local Drop_8 = { 312, 202, 253, 317, 234, 249, 49, 44, 150, 354, 330, 168, 236, 133, 175, 115, 61, 230, 135, 152, 207, 338 }
  38. local Drop_9 = { 180, 210, 285, 221, 258, 81, 70, 63, 294, 185, 335, 46, 237, 274, 262, 145, 181, 238 }
  39. local Drop_10 = { 91, 31, 140, 32, 263, 367, 138, 119, 177, 139, 34, 94, 194, 320, 36 }
  40. local Drop_11 = { 118, 88, 92, 244, 190 }
  41. local Drop_12 = { 188, 22, 195, 166, 356, 267, 68, 357, 103, 344 }
  42. local Drop_13 = { 365, 123 }
  43. local Drop_14 = { 322, 280, 176, 208, 313, 340 }
  44. local Drop_15 = 215
  45. --      local Drop_16 =
  46. --      local Drop_17 =
  47. --      local Drop_18 =
  48. --      local Drop_19 =
  49. local Drop_20 = { 29,  243,  134,  117,  96,  193,  113,  209,  353,  37,  13,  333,  307,  170,  129 }
  50. local Drop_21 = { 347, 277, 39, 233, 126, 186, 223, 246, 352, 52, 87, 270, 124, 231, 58, 235, 86, 196, 75, 346, 107 }
  51. local Drop_22 = { 219, 232, 128, 78, 27, 111, 161, 291, 143, 43, 321, 254, 167, 95, 311, 364, 251, 67 }
  52. local Drop_23 = { 283, 342, 42, 69, 7, 173, 226, 23, 284, 141, 363, 142, 14, 366, 252  }
  53. local Drop_24 = { 198, 201, 296, 3, 334, 62, 266, 200, 265, 308, 325, 97, 189, 337, 211, 227, 247, 159 }
  54. local Drop_26 = { 132, 179, 305 }
  55. local Drop_27 = { 118, 88, 92, 244, 190, 256, 172, 178, 343, 272 }
  56. local Drop_28 = { 131, 310, 65, 98, 53, 102, 57, 276, 72, 229, 136, 273, 8, 271, 25, 114, 48, 240 }
  57. local Drop_29 = { 224, 146, 183, 205, 45 }
  58. local Drop_30 = { 11, 158, 90, 15, 358, 204, 71, 82, 292, 110, 309, 323, 41, 89, 279, 241, 149, 351, 316, 165, 155 }
  59. local Drop_31 = { 154, 293, 55, 278, 35, 315, 174, 299, 112, 12, 108 }
  60. local Drop_32 = { 84, 20, 187, 206, 151, 286, 214, 21, 336, 156, 137, 213, 288, 220 }
  61. ]]
  62. RegisterServerEvent('fishing:reward')
  63. AddEventHandler('fishing:reward', function()
  64.     local user_id = vRP.getUserId({source})
  65.     local player = vRP.getUserSource({user_id})  
  66.     local randomDrop = math.random(1,367)
  67.     if randomDrop == Drop_1 then
  68.         vRP.giveInventoryItem({user_id,"tonno",1})
  69.         elseif randomDrop == Drop_2 then
  70.             vRP.giveInventoryItem({user_id,"salmone",1})
  71.         elseif randomDrop == Drop_3 then
  72.             vRP.giveInventoryItem({user_id,"spigola",1})
  73.         elseif randomDrop == Drop_4 then
  74.             vRP.giveInventoryItem({user_id,"pesce_Gatto",1})
  75.         elseif randomDrop == Drop_5 then
  76.             vRP.giveInventoryItem({user_id,"trota",1})
  77.         elseif randomDrop == Drop_6 then
  78.             vRP.giveInventoryItem({user_id,"orata",1})
  79.         elseif randomDrop == Drop_7 then
  80.             vRP.giveInventoryItem({user_id,"luccio_impreriale",1})
  81.         elseif randomDrop == Drop_8 then
  82.             vRP.giveInventoryItem({user_id,"luccio",1})
  83.         elseif randomDrop == Drop_9 then
  84.             vRP.giveInventoryItem({user_id,"branzino",1})
  85.         elseif randomDrop == Drop_10 then
  86.             vRP.giveInventoryItem({user_id,"seppia",1})
  87.         elseif randomDrop == Drop_11 then
  88.             vRP.giveInventoryItem({user_id,"polipo",1})
  89.         elseif randomDrop == Drop_12 then
  90.             vRP.giveInventoryItem({user_id,"merluzzo",1})
  91.         elseif randomDrop == Drop_13 then
  92.             vRP.giveInventoryItem({user_id,"pastinaca",1})
  93.         elseif randomDrop == Drop_14 then
  94.             vRP.giveInventoryItem({user_id,"anguilla",1})
  95.         elseif randomDrop == Drop_15 then
  96.             vRP.giveInventoryItem({user_id,"pesce_dorato",1})
  97.         elseif randomDrop == Drop_20 then
  98.             vRP.giveInventoryItem({user_id,"siluro",1})
  99.         elseif randomDrop == Drop_21 then
  100.             vRP.giveInventoryItem({user_id,"aringa",1})
  101.         elseif randomDrop == Drop_22 then
  102.             vRP.giveInventoryItem({user_id,"cefalo",1})
  103.         elseif randomDrop == Drop_23 then
  104.             vRP.giveInventoryItem({user_id,"cernia",1})
  105.         elseif randomDrop == Drop_24 then
  106.             vRP.giveInventoryItem({user_id,"dentice",1})
  107.         elseif randomDrop == Drop_25 then
  108.             vRP.giveInventoryItem({user_id,"pesce_San_Pietro",1})
  109.         elseif randomDrop == Drop_26 then
  110.             vRP.giveInventoryItem({user_id,"pesce_Palla",1})
  111.         elseif randomDrop == Drop_27 then
  112.             vRP.giveInventoryItem({user_id,"rombo",1})
  113.         elseif randomDrop == Drop_28 then
  114.             vRP.giveInventoryItem({user_id,"sogliola",1})
  115.         elseif randomDrop == Drop_29 then
  116.             vRP.giveInventoryItem({user_id,"totano",1})
  117.         elseif randomDrop == Drop_30 then
  118.             vRP.giveInventoryItem({user_id,"triglia",1})
  119.         elseif randomDrop == Drop_31 then
  120.             vRP.giveInventoryItem({user_id,"immondizia",1})
  121.         elseif randomDrop == Drop_32 then
  122.             vRPclient.notify(player,{"~r~Sarai Piu fortunato la prossima volta"})
  123.  
  124.     end
  125. end)
  126.  
  127. --[[
  128. --- Fish List
  129. 1-   Tonno                  |   25      |-
  130. 2-   Salmone                |   25      |-
  131. 3-   Spigola                |   20      |-
  132. 4-   Pesce_Gatto            |   4%      |-
  133. 5-   Trota                  |   20      |
  134. 6-   Orata                  |   20      |
  135. 7-   Luccio_Impreriale      |   1%      |-
  136. 8-   Luccio                 |   22      |
  137. 9-   Branzino               |   18      |
  138. 10-  Seppia                 |   15%     | 19 143 56 114 101 75 72 116 16 12 42
  139. 11-  Polipo                 |   5%      |-
  140. 12-  Merluzzo               |   10%     | 136 93 74 11 43 46 70 22 95  3
  141. 13-  Pastinaca              |   2%      |-
  142. 14-  Anguilla               |   6%      |-
  143. 15-  Pesce_Dorato           |   1%      |-
  144. 20-  Siluro                 |   15%     | 28 139 124  2 121 142 78 59 33 137 79
  145. 21-  Aringa                 |   21      |
  146. 22-  Cefalo                 |   24      | 73  1 39 89 48 26 34  40 109 149   7 15
  147. 23-  Cernia                 |   18      |
  148. 24-  Dentice                |   18%     | 61 146 108 44 37 18 51 133  30 115 120 14
  149. 25-  Pesce_San_Pietro       |   1%      |-
  150. 26-  Pesce_Palla            |   3%      |-
  151. 27-  Rombo                  |   10%     |-
  152. 28-  Sogliola               |   18%     |
  153. 29-  Totano                 |   5%      |-
  154. 30-  Triglia                |   21      | 41 57
  155. 31-  Immondizia 7%          |-
  156. 32-  Niente  12%            |-
  157.  
  158.  
  159.  
  160.  
  161. ]]--
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top