Ir para conteúdo
  • 0

ronn2424

Pergunta

Se alguem souber o erro e postar a solução agradeço muito!

tá dando o seguinte, a vara pesca em qualquer piso do poketibia! uso como base o PF Guuh Melo ARRUMADO, escolhi esse tipo aew e tow editando, eu editei tbm o fishing pra um q axei aq no xtibia, muito bom por sinal mas creio q esse n tenha sido o motivo do erro.

vo posta o fishing pra vcs verem:

aq ta o action da vara com id 2580 :<action itemid="2580" event="script" value="tools/fishing.lua" allowfaruse="1"/>

aq ta o fishing.lua : local fishes = {

[70] = {"Magikarp", "Poliwag", "Horsea", "Krabby", "Goldeen", "Tentacool", "Staryu", "Poliwhirl", "Seaking", "Kingler", "Seadra", "Starmie", "Tentacruel"},

[65] = {"Magikarp", "Poliwag", "Horsea", "Krabby", "Goldeen", "Tentacool", "Staryu", "Poliwhirl", "Seaking", "Kingler", "Seadra", "Starmie"},

 

[60] = {"Magikarp", "Poliwag", "Horsea", "Krabby", "Goldeen", "Tentacool", "Staryu", "Poliwhirl", "Seaking", "Kingler", "Seadra"},

[55] = {"Magikarp", "Poliwag", "Horsea", "Krabby", "Goldeen", "Tentacool", "Staryu", "Poliwhirl", "Seaking", "Kingler"},

[50] = {"Magikarp", "Poliwag", "Horsea", "Krabby", "Goldeen", "Tentacool", "Staryu", "Poliwhirl", "Seaking"},

[45] = {"Magikarp", "Poliwag", "Horsea", "Krabby", "Goldeen", "Tentacool", "Staryu", "Poliwhirl"},

[40] = {"Magikarp", "Poliwag", "Horsea", "Krabby", "Goldeen", "Tentacool", "Staryu"},

[35] = {"Magikarp", "Poliwag", "Horsea", "Krabby", "Goldeen", "Tentacool"},

 

[30] = {"Magikarp", "Poliwag", "Horsea", "Krabby", "Goldeen"},

[25] = {"Magikarp", "Poliwag", "Horsea", "Krabby"},

[20] = {"Magikarp", "Poliwag", "Horsea"},

[15] = {"Magikarp", "Poliwag"},

[10] = {"Magikarp"}

}

 

local storage = 15458

local bonus = 1

 

 

local function doFish(cid, pos, ppos, chance, interval, number)

if not isCreature(cid) then return false end

if getThingPos(cid).x ~= ppos.x or getThingPos(cid).y ~= ppos.y then

return false end

if getPlayerStorageValue(cid, storage) ~= number then return false end

doSendMagicEffect(pos, CONST_ME_LOSEENERGY)

local removed = doCreateItem(1285, 1, getThingPos(cid))

local playerpos = getClosestFreeTile(cid, getThingPos(cid))

doRemoveItem(removed, 1)

doPlayerAddSkillTry(cid, 6, bonus)

for a, b in pairs(fishes) do

if getPlayerSkillLevel(cid, 6) >= a and math.random(0, 1) <= chance then

doPlayerAddSkillTry(cid, 6, 89)

local peixe = doSummonCreature(b[math.random(0, 1)], playerpos)

if getCreatureSummons(cid) <= 0 then

doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 173)

doChallengeCreature(getCreatureSummons(cid)[0], peixe)

else

doSendMagicEffect(getThingPos(cid), 173)

doChallengeCreature(cid, peixe)

end

return true

end

end

addEvent(doFish, interval, cid, pos, ppos, chance, interval, number)

return true

end

 

function onUse(cid, item, fromPos, itemEx, toPos)

 

local waters = {4820}

 

if isInArray(waters, getTileInfo(getThingPos(cid)).itemid) then

doPlayerSendCancel(cid, "You can\'t fish whileurfing neither flying above water.")

return true

end

 

setPlayerStorageValue(cid, storage, getPlayerStorageValue(cid, storage) + 1)

 

local delay = 15000 - getPlayerSkillLevel(cid, 2) * 15000

local chance = 5 + getPlayerSkillLevel(cid, 6) / 2.5

 

doFish(cid, toPos, getThingPos(cid), chance, delay, getPlayerStorageValue(cid, storage))

 

return true

end

 

Eu coloquei o local waters só com o id do shallow water (Walkable), mas tava assim : local waters = {4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825}

E aq ta o quote da minha pokerod no items.xml :

</item>

 

<item id="2580" article="a" name="pokerod">

 

<attribute key="weight" value="0" />

 

<attribute key="slotType" value="necklace" />

</item>

Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...