• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Fishing system

breadmaker

New Member
Joined
Jul 16, 2010
Messages
160
Reaction score
3
Hello.
Anyone can make for me simple fishing system like this:
- We have 5% chance to destroy fishing rod after using
- Fishes are not depended on fishing (remove Skill_Fish)

We have X % chances to get:
- fish 15%
- big fish 10%
- shrimp 5%

Anyone can write it for me ?
Thanks.
 
LUA:
local fish = {
	[1] = {itemid = 2667, rate = 15},
	[2] = {itemid = 2669, rate = 10},
	[3] = {itemid = 2670, rate = 5}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(isInArray({4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625}, itemEx.itemid)) then
		if(math.random(100) <= 5) then
			return doRemoveItem(item.uid)
		end
		doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY)
		for i = 1, #fish do
			if(math.random(100) <= fish[i].rate) then
				return doPlayerAddItem(cid, fish[i].itemid, 1)
			end
		end
	end
	return true
end
 
Last edited:
Back
Top