vRP item_transformers

Is there anyway you can make it a chance think. Like i am about to make fishing on my server. Is there any way making it so sometimes you catch a different fish or somthing else i have addes in my items.lua. Is it also possible to make it so, you sell all you different fish to a fisherman, but only 1 fish at a time?

What?

For randomization, have you tried using math.random() that is built into Lua?

You would do something like

local r = math.random(1,100) -- between 1 and 100
if (r <= 50) then
    -- do something (50/50 chance)
else
    --- do something else
end

Which folder do i put that in? And were do i find that?

What? You asked how you would add “chance” to your script you’re making. I provided the answer. You put this in your logic for catching a fish.

Thx i am just a noob @Havoc, thats why i dind’t understand.

name=“Pesca em Auto Mar”, – menu name
– permissions = {“harvest.water_bottle_tacos”}, – you can add permissions
r=0,g=125,b=255, – color
max_units=20,
units_per_minute=10,
x=1861,y=3680.5,z=33.26, – pos
radius=8, height=5, – area
recipes = {
[“Pescando Corvina”] = { – action name
description=“Jogando a rede para pegas algumas Corvinas”, – action description
in_money=0, – money taken per unit
out_money=0, – money earned per unit
reagents={}, – items taken per unit
products={ – items given per unit
[“corvina”] = 1
}

Aonde eu adicionaria o math.random?

Itemtransformers. Just look at the other for a tutorial