Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Hoje eu tava jogando um PokeTibia, e pensei: "Porque não pescar monstros no tibia também?" e fiz esse script!

Vamos logo ao que interessa kkk

 

Em actions\actions.xml procure essa tag:

(Caso não tenha, adicione-a)

<action itemid="10223" event="script" value="tools/mechanical_fishing.lua" allowfaruse="1"/>

Depois vá até actions\scripts\tools\mechanical_fishing.lua apague tudo que tem dentro e cole:

 

-- My Fat Doll improvisando nos otserver ;~
-- Fishing v 1.0 05/04/2013
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
--Config--
local Bait = 2671 -- ID da isca
local needBait = TRUE -- Precisa de isca? TRUE/FALSE
local FishRate = 1.0 -- Rate de fish
local time = 1 -- Tempo pra pescar denovo (em segundos)
local fishable = {"Water Elemental", "Massive Water Elemental", "Blood Crab", "Quara Constrictor", "Quara Predator Scout", "Quara Predator", "Quara Pincher Scout", "Quara Pincher", "Quara Mantassin Scout", "Quara Mantassin", "Quara Hydromancer Scout", "Quara Constrictor Scout", "Quara Hydromancer"} --Pescados
local message1 = "You need "..getItemNameById(Bait).."s to fish!" -- Mensagem se não tiver iscas!
local message2 = "You must wait few seconds!"  --Mensagem se tiver pescando muito rapido
--Config End--
 
-- Não mecha --
local storage = 5560
local waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625}
 
if not getTilePzInfo(getCreaturePosition(cid)) then
if needBait == TRUE then
if getPlayerItemCount(cid, Bait) > 0 then
if exhaustion.get(cid, storage) == FALSE then
exhaustion.set(cid, storage, time)
doPlayerAddSkillTry(cid, SKILL_FISHING, 1)
if isInArray(waterIds, itemEx.itemid) == TRUE then
doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY)
if itemEx.itemid ~= 493 then
if math.random(1, (100 + (getPlayerSkill(cid, SKILL_FISHING) / 10))) <= (getPlayerSkill(cid, SKILL_FISHING)*FishRate) then
doPlayerRemoveItem(cid, Bait, 1)
doCreateMonster(fishable[math.random(#fishable)], getPlayerPosition(cid))
end
end
end
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, message2)
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, message1)
end
return FALSE
end
 
if needBait == FALSE then
if exhaustion.get(cid, storage) == FALSE then
exhaustion.set(cid, storage, time)
doPlayerAddSkillTry(cid, SKILL_FISHING, 1)
 
if isInArray(waterIds, itemEx.itemid) == TRUE then
doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY)
if itemEx.itemid ~= 493 then
if math.random(1, (100 + (getPlayerSkill(cid, SKILL_FISHING) / 10))) <= (getPlayerSkill(cid, SKILL_FISHING)*FishRate) then
doCreateMonster(fishable[math.random(#fishable)], getPlayerPosition(cid))
end
end
 
end
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, message2)
end
end
return FALSE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can't fish in a protection zone!")
end
end

 
 

Para configurar é fácil, só precisa ler no script, deixei tudo bem explicado lá.

Caso tenha gostado dê +Rep, e caso tenha alguma dúvida ou sugestão, comente ai

 

        Att My Fat Doll ;~

Link para o post
Compartilhar em outros sites
  • 2 weeks later...
  • 3 months later...

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo