• 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.

[RELEASE] Fish monsters from water / water can.

gigastar

Member
Joined
Jan 25, 2009
Messages
252
Reaction score
15
Fish monster should work for A LOT of versions. Scripts start at 3.0+.

In actions.

monsterFish.lua
Lua:
local water = {4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825} -- Water Ids --

local monstersRand = {[1] = "Water Spirit", [2] = "Hydros", [3] = "Sea Serpant", [4] = "Kryotea", [5] = "anythingelse"} -- You monsters. As many as you want.

local levels = {50, 100, 200, 300, 500} --Put 1 level for each monster, make sure the level is the same amount of commas as the monster. Ex. 50 = water Spirit 100 = hydros --

local monsterME = {1, 5, 6, 7, 8} -- Magic Effect for monsters. --

local level_allow = 10 --- level to use rod --

local chance_catch = 1, 1000 -- This means 1 out of 1000 chances to catch a monster.

local castMSG = "You cast your fishing rod, hoping for just one catch." 
local caughtMSG = "You have caught a "

local useWorm = false
local giveFish = false

local wormId = 1111
local fishId = 2222

local useRodMagicEffect = 1

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getItemByItemId(item.uid) == water then
		if getPlayerLevel(cid) == level_allow then
			if math.random(chance) ~= monstersRand then
				doSendMagicEffect(toPosition, useRodMagicEffect)
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEAULT_GREEN, castMSG)
		if (useWorm) == true then
			if math.random(1, 10) == 1 then
				doPlayerRemoveItem(cid, wormId, 1)
			if (giveFish) == true
				doPlayerAddItem(cid, fishId, 1)
			end
		end
		end
		
			elseif math.random(chance) == monstersRand[1] then
				if getPlayerLevel(cid) == levels[1] then
				doSendMagicEffect(toPosition, useRodMagicEffect)
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, caughtMSG " " monsterRand[1])
				doTeleportThing(monstersRand[1], getPlayerPosition(cid))
				doSendMagicEffect(getPlayerPosition(cid), monsterME[1])
				else
				doSendMagicEffect(toPosition, useRodMagicEffect)
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_GREEN, castMSG)
				return false
				end
				
			elseif math.random(chance) == monstersRand[2] then
				if getPlayerLevel(cid) == levels[2] then
				doSendMagicEffect(toPosition, useRodMagicEffect)
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, caughtMSG " " monsterRand[2])
				doTeleportThing(monstersRand[2], getPlayerPosition(cid))
				doSendMagicEffect(getPlayerPosition(cid), monsterME[2])
				else
				doSendMagicEffect(toPosition, useRodMagicEffect)
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_GREEN, castMSG)
				return false
				end
			
			elseif math.random(chance) == monstersRand[3] then
				if getPlayerLevel(cid) == levels[3] then
				doSendMagicEffect(toPosition, useRodMagicEffect)
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, caughtMSG " " monsterRand[3])
				doTeleportThing(monstersRand[3], getPlayerPosition(cid))
				doSendMagicEffect(getPlayerPosition(cid), monsterME[3])
				else
				doSendMagicEffect(toPosition, useRodMagicEffect)
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_GREEN, castMSG)
				return false
				end
				
			elseif math.random(chance) == monstersRand[4] then
				if getPlayerLevel(cid) == levels[4] then
				doSendMagicEffect(toPosition, useRodMagicEffect)
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, caughtMSG " " monsterRand[4])
				doTeleportThing(monstersRand[4], getPlayerPosition(cid))
				doSendMagicEffect(getPlayerPosition(cid), monsterME[4])
				else
				doSendMagicEffect(toPosition, useRodMagicEffect)
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_GREEN, castMSG)
				return false
				end
				
			elseif math.random(chance) == monstersRand[5] then
				if getPlayerLevel(cid) == levels[5] then
				doSendMagicEffect(toPosition, useRodMagicEffect)
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, caughtMSG " " monsterRand[5])
				doTeleportThing(monstersRand[5], getPlayerPosition(cid))
				doSendMagicEffect(getPlayerPosition(cid), monsterME[5])
				else
				doSendMagicEffect(toPosition, useRodMagicEffect)
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_GREEN, castMSG)
				return false
				end
end
else
	doPlayerSendCancel(cid, "Your not high enough level to use this rod!")
end
else
	doPlayerSendCancel(cid, "You cannot use your fishing rod on this item!")
end
return true
end


Now waterCan
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if (itemEx.itemid == 3984) then
	doTransformItem(itemEx.uid, 3985)
	doSendMagicEffect(toPosition, 5)
return true

elseif (itemEx.itemid == 2781) then
	doTransformItem(itemEx.uid, 2782)
	doSendMagicEffect(toPosition, 5)
return true


elseif (itemEx.itemid == 2737) or (itemEx.itemid == 2738) then
	doTransformItem(itemEx.uid, 2739)
	doSendMagicEffect(toPosition, 5)
return true


elseif (itemEx.itemid == 5463) or (itemEx.itemid == 5464) then
	doTransformItem(itemEx.uid, 5466)
	doSendMagicEffect(toPosition, 5)
return true

else
	doPlayerSendCancel(cid, "You cannot use the watering can with this!")
end
return true
end

Code:
	<action itemid="7734" event="script" value="waterCan.lua"/>
	<action itemid="7734" event="script" value="monsterFish.lua"/>

MORE SCRIPTS ON WAY!

I will not advance the scripts in anyway. Thats why there free.

Most people would like to have skill based, on fishing rod aswell.
 
Back
Top