Nao faça isso cara, vou lhe explicar, onde estava "function onUse(cid, item, fromPos, itemEx, toPos)" representa o inicio do script, se voce coloca um "End" logo após ta falando pra ele que termina ali. Entao ele nao vai ler todo o resto entendeu? Entao teria que colocar o End depois de todo o script. Assim:
function onUse(cid, item, fromPos, itemEx, toPos)
d1 =
{
[0] = {pesca = 'Fish'},
[1] = {pesca = 'Jellyfish'},
[2] = {pesca = 'Manta Ray'},
[3] = {pesca = 'Northern Pick'},
[4] = {pesca = 'Shark'},
}
d100 =
{
[0] = {pesca = 'Young Sea Serpent'},
[1] = {pesca = 'Quara Predator Scout'},
[2] = {pesca = 'Quara Constrictor Scout'},
[3] = {pesca = 'Quara Mantassin Scout'},
}
d120 =
{
[0] = {pesca = 'Quara Hydromancer'},
[1] = {pesca = 'Quara Mantassint'},
}
d150 =
{
[0] = {pesca = 'Sea Serpent'},
[1] = {pesca = 'Quara Predator'},
}
local config = {
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},
}
local skill = getPlayerSkillLevel(cid, 6)
local playerpos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z}
if not (isInArray(config.waters, itemEx.itemid)) then
return doPlayerSendCancel(cid, "You cannot fish here.")
end
doSendMagicEffect(toPos, CONST_ME_LOSEENERGY)
doPlayerAddSkillTry(cid, 6, 1)
if skill >= 1 then
local random = math.random(0, 30) -- 1 VAI PESCAR TODAS AS VEZES PARA DEIXAR MAIS DIFICIL POE 30/40
if random <= 1 then
doSummonCreature(d150[random].pesca, playerpos)
return true
end if skill >= 150 then
local random = math.random(0, 15) -- 1 VAI PESCAR TODAS AS VEZES PARA DEIXAR MAIS DIFICIL POE 30/40
if random <= 1 then
doSummonCreature(d150[random].pesca, playerpos)
return true
end
elseif skill >= 120 then
local random = math.random(0, 20) -- 1 VAI PESCAR TODAS AS VEZES PARA DEIXAR MAIS DIFICIL POE 30/40
if random <= 1 then
doSummonCreature(d120[random].pesca, playerpos)
return true
end
elseif skill >= 100 then
local random = math.random(0, 25) -- 1 VAI PESCAR TODAS AS VEZES PARA DEIXAR MAIS DIFICIL POE 30/40
if random <= 3 then
doSummonCreature(d100[random].pesca, playerpos)
return true
end
end
return true
end
end
Se ajudei Rep++!




info
Grupo: Campones
Registrado: 07/11/12
Posts: 9
Reputação: 0
function onUse(cid, item, fromPos, itemEx, toPos) end d1 = { [0] = {pesca = 'Fish'}, [1] = {pesca = 'Jellyfish'}, [2] = {pesca = 'Manta Ray'}, [3] = {pesca = 'Northern Pick'}, [4] = {pesca = 'Shark'}, } d100 = { [0] = {pesca = 'Young Sea Serpent'}, [1] = {pesca = 'Quara Predator Scout'}, [2] = {pesca = 'Quara Constrictor Scout'}, [3] = {pesca = 'Quara Mantassin Scout'}, } d120 = { [0] = {pesca = 'Quara Hydromancer'}, [1] = {pesca = 'Quara Mantassint'}, } d150 = { [0] = {pesca = 'Sea Serpent'}, [1] = {pesca = 'Quara Predator'}, } local config = { 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}, } local skill = getPlayerSkillLevel(cid, 6) local playerpos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z} if not (isInArray(config.waters, itemEx.itemid)) then return doPlayerSendCancel(cid, "You cannot fish here.") end doSendMagicEffect(toPos, CONST_ME_LOSEENERGY) doPlayerAddSkillTry(cid, 6, 1) if skill >= 1 then local random = math.random(0, 30) -- 1 VAI PESCAR TODAS AS VEZES PARA DEIXAR MAIS DIFICIL POE 30/40 if random <= 1 then doSummonCreature(d150[random].pesca, playerpos) return true end if skill >= 150 then local random = math.random(0, 15) -- 1 VAI PESCAR TODAS AS VEZES PARA DEIXAR MAIS DIFICIL POE 30/40 if random <= 1 then doSummonCreature(d150[random].pesca, playerpos) return true end elseif skill >= 120 then local random = math.random(0, 20) -- 1 VAI PESCAR TODAS AS VEZES PARA DEIXAR MAIS DIFICIL POE 30/40 if random <= 1 then doSummonCreature(d120[random].pesca, playerpos) return true end elseif skill >= 100 then local random = math.random(0, 25) -- 1 VAI PESCAR TODAS AS VEZES PARA DEIXAR MAIS DIFICIL POE 30/40 if random <= 3 then doSummonCreature(d100[random].pesca, playerpos) return true end end return true endTava faltando um end na primeira linha e eu botei, mas ainda tem esse erro daqui
Por favor, alguém ajuda ae!