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