• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Fishing rod, fishing monster

Stewie

Family Guy # ;3
Joined
May 3, 2010
Messages
786
Reaction score
12
Location
TV
Fishing Rod = Fishing Monsters

Tested : TFS 8.50

First,go to actions/scripts/tools/fishing change what is inside so:

PHP:
local configg = {
    waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4820, 4821, 4822, 4823, 4824, 4825}
    }
local monsters = {
    {'Water Elemental'},
    {'Rat'}
}
local numero = 2 -- numero de monstros que você colocou /\
local number = 10 -- < quanto maior, mais dificil de pescar um monstro
local config = {
    rateSkill = getConfigValue("rateSkill"),
    allowFromPz = false,
    useWorms = true
}
function onUse(cid, item, frompos, item2, topos)
    if(not isInArray(configg.waterIds, item2.itemid)) then
        return false
    end
    local chance = math.random(1,numero+number) --
    if chance >= 1 and chance <= numero then
    create = monsters[chance][1]
    doSummonCreature(create, getCreaturePosition(cid))
    doSendMagicEffect(topos, 11)
    doCreatureSay(cid, "Whatahell", TEXTCOLOR_BLUE)
    else
    doSendMagicEffect(topos, CONST_ME_LOSEENERGY)
    end
    if((config.allowFromPz or not getTileInfo(getCreaturePosition(cid)).protection) and item2.itemid ~= 493 and
        math.random(1, (100 + (getPlayerSkill(cid, SKILL_FISHING) / 10))) < getPlayerSkill(cid, SKILL_FISHING) and
        (not config.useWorms or (getPlayerItemCount(cid, ITEM_WORM) > 0 and doPlayerRemoveItem(cid, ITEM_WORM, 1)))) then
        doPlayerAddItem(cid, ITEM_FISH, 1)
        doPlayerAddSkillTry(cid, SKILL_FISHING, config.rateSkill)
        doSendMagicEffect(topos, CONST_ME_LOSEENERGY)
    else
    doSendMagicEffect(topos, CONST_ME_LOSEENERGY)
    end
    return true
end

explaining :
PHP:
{'Water Elemental'}
where you put the name of the monsters.
PHP:
local numero = 2
number of monsters you put.
PHP:
local number = 10
the more harder.
REP ++++
 
Last edited:
ugh
Code:
local config = {
	waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4820, 4821, 4822, 4823, 4824, 4825},
	rateSkill = getConfigValue("rateSkill"),
	allowFromPz = false,
	useWorms = true,
	Grr = {
		{n = "Water Elemental", r = {1, 2}, c = "You have caught a "},
		{n = "Rat", r = {2, 4}, c = "You have caught a "}
	}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if not isInArray(config.waterIds, itemEx.itemid) then
		return false
	end
	if (config.allowFromPz or not getTileInfo(getThingPos(cid)).protection) and itemEx.itemid ~= 493 and math.random((100 + (getPlayerSkill(cid, SKILL_FISHING) / 50))) < getPlayerSkill(cid, SKILL_FISHING) and (not config.useWorms or (getPlayerItemCount(cid, ITEM_WORM) > 0 and doPlayerRemoveItem(cid, ITEM_WORM, 1))) then
		for _, v in ipairs(config.Grr) do
			local this = math.random(10)
			if this >= v.r[1] and this <= v.r[2] then
				doSummonCreature(v.n, getThingPos(cid))
				doPlayerSendTextMessage(cid, 20, v.c .. "" .. v.n)
				doPlayerAddSkillTry(cid, SKILL_FISHING, 1)
			else
				doPlayerAddItem(cid, ITEM_FISH, 1)
				break
			end
		end
	end
	return doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY)
end
 
this work like real tibia? Like when you fish water elementals

no. its for "regular fishing" except u fish up monsters.
its been done and created at least 10times before......
 
Back
Top