Ir para conteúdo

[Encerrado] Dúvida sobre script de pesca !


guirlz

Posts Recomendados

Seguinte galerinha, beleza?

Estou usando um script de pesca para pokemon, porém, quando pesco o pokemon ele já vem agressivo, se eu pescar e nao tiver um pokemon ele ja vai sair atacando os outros, isso é ruim porque os leveis mais altos conseguem matar low leveis..

Porém, tenho também um script antigo onde os pokemons vem atacando somente quem pescou eles, irei postar os 2 para ver se vocês conseguem me ajudar a colocar esta função no script novo...

Segue scripts:

 

Este é o atual, ele está como quero, só quero adicionar a função nele dos pokemons só atacarem quem os pescou à princípio..

 

 

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

d0 =

{

[0] = {pokemon = 'Magikarp'},

[1] = {pokemon = 'Poliwag'},

[2] = {pokemon = 'Krabby'},

[3] = {pokemon = 'Magikarp'},

[4] = {pokemon = 'Poliwag'},

}

d20 =

{

[0] = {pokemon = 'Magikarp'},

[1] = {pokemon = 'Marill'},

[2] = {pokemon = 'Remoraid'},

[3] = {pokemon = 'Krabby'},

[4] = {pokemon = 'Horsea'},

[6] = {pokemon = 'Poliwag'},

[5] = {pokemon = 'Goldeen'},

[6] = {pokemon = 'Magikarp'},

[7] = {pokemon = 'Marill'},

[8] = {pokemon = 'Remoraid'},

[9] = {pokemon = 'Krabby'},

[10] = {pokemon = 'Horsea'},

[11] = {pokemon = 'Poliwag'},

[12] = {pokemon = 'Goldeen'},

}

d40 =

{

[0] = {pokemon = 'Magikarp'},

[1] = {pokemon = 'Remoraid'},

[2] = {pokemon = 'Marill'},

[3] = {pokemon = 'Krabby'},

[4] = {pokemon = 'Horsea'},

[6] = {pokemon = 'Poliwag'},

[5] = {pokemon = 'Goldeen'},

[7] = {pokemon = 'Tentacool'},

[8] = {pokemon = 'Chinchou'},

[9] = {pokemon = 'Staryu'},

[10] = {pokemon = 'Magikarp'},

[11] = {pokemon = 'Remoraid'},

[12] = {pokemon = 'Marill'},

[13] = {pokemon = 'Krabby'},

[14] = {pokemon = 'Horsea'},

[15] = {pokemon = 'Poliwag'},

[16] = {pokemon = 'Goldeen'},

[17] = {pokemon = 'Tentacool'},

[18] = {pokemon = 'Chinchou'},

[19] = {pokemon = 'Staryu'},

}

d60 =

{

[0] = {pokemon = 'Magikarp'},

[1] = {pokemon = 'Remoraid'},

[2] = {pokemon = 'Marill'},

[3] = {pokemon = 'Krabby'},

[4] = {pokemon = 'Horsea'},

[5] = {pokemon = 'Poliwag'},

[6] = {pokemon = 'Goldeen'},

[7] = {pokemon = 'Tentacool'},

[8] = {pokemon = 'Chinchou'},

[9] = {pokemon = 'Staryu'},

[10] = {pokemon = 'Poliwhirl'},

[11] = {pokemon = 'Seaking'},

[12] = {pokemon = 'Kingler'},

[13] = {pokemon = 'Magikarp'},

[14] = {pokemon = 'Remoraid'},

[15] = {pokemon = 'Marill'},

[16] = {pokemon = 'Krabby'},

[17] = {pokemon = 'Horsea'},

[18] = {pokemon = 'Poliwag'},

[19] = {pokemon = 'Goldeen'},

[20] = {pokemon = 'Tentacool'},

[21] = {pokemon = 'Chinchou'},

[22] = {pokemon = 'Staryu'},

[23] = {pokemon = 'Poliwhirl'},

[24] = {pokemon = 'Seaking'},

[25] = {pokemon = 'Kingler'},

}

d80 =

{

[0] = {pokemon = 'Magikarp'},

[1] = {pokemon = 'Remoraid'},

[2] = {pokemon = 'Marill'},

[3] = {pokemon = 'Krabby'},

[4] = {pokemon = 'Horsea'},

[5] = {pokemon = 'Poliwag'},

[6] = {pokemon = 'Goldeen'},

[7] = {pokemon = 'Tentacool'},

[8] = {pokemon = 'Chinchou'},

[9] = {pokemon = 'Staryu'},

[10] = {pokemon = 'Poliwhirl'},

[11] = {pokemon = 'Seaking'},

[12] = {pokemon = 'Kingler'},

[13] = {pokemon = 'Seadra'},

[14] = {pokemon = 'Starmie'},

[15] = {pokemon = 'Corsola'},

[16] = {pokemon = 'Mantine'},

[17] = {pokemon = 'Politoed'},

[18] = {pokemon = 'Magikarp'},

[19] = {pokemon = 'Remoraid'},

[20] = {pokemon = 'Marill'},

[21] = {pokemon = 'Krabby'},

[22] = {pokemon = 'Horsea'},

[23] = {pokemon = 'Poliwag'},

[24] = {pokemon = 'Goldeen'},

[25] = {pokemon = 'Tentacool'},

[26] = {pokemon = 'Chinchou'},

[27] = {pokemon = 'Staryu'},

[28] = {pokemon = 'Poliwhirl'},

[29] = {pokemon = 'Seaking'},

[30] = {pokemon = 'Kingler'},

[31] = {pokemon = 'Seadra'},

[32] = {pokemon = 'Starmie'},

[33] = {pokemon = 'Corsola'},

[34] = {pokemon = 'Mantine'},

[35] = {pokemon = 'Politoed'},

}

d100 =

{

[0] = {pokemon = 'Magikarp'},

[1] = {pokemon = 'Remoraid'},

[2] = {pokemon = 'Marill'},

[3] = {pokemon = 'Krabby'},

[4] = {pokemon = 'Horsea'},

[5] = {pokemon = 'Poliwag'},

[6] = {pokemon = 'Goldeen'},

[7] = {pokemon = 'Tentacool'},

[8] = {pokemon = 'Chinchou'},

[9] = {pokemon = 'Staryu'},

[10] = {pokemon = 'Poliwhirl'},

[11] = {pokemon = 'Seaking'},

[12] = {pokemon = 'Kingler'},

[13] = {pokemon = 'Seadra'},

[14] = {pokemon = 'Starmie'},

[15] = {pokemon = 'Corsola'},

[16] = {pokemon = 'Mantine'},

[17] = {pokemon = 'Politoed'},

[18] = {pokemon = 'Octillery'},

[19] = {pokemon = 'Kingdra'},

[20] = {pokemon = 'Tentacruel'},

[21] = {pokemon = 'Gyarados'},

}

local bonus = 8

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 borders = {4632, 4633, 4634, 4635, 4636, 4637, 4638, 4639, 4650, 4651, 4652, 4653, 4654, 4655, 4656, 4658, 4659, 4660, 4661, 4662, 4663}

 

local skill = getPlayerSkillLevel(cid, 6)

local playerpos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z}

function Effect()

doSendMagicEffect(toPos, 1)

end

function Say()

if skill >= 0 and skill < 20 then

local random = math.random(0, 7)

if random <= 2 then

doSummonCreature(d0[random].pokemon, playerpos)

elseif random <= 4 then

doSummonCreature(d0[random].pokemon, playerpos)

doSummonCreature(d0[random].pokemon, playerpos)

elseif random > 4 then

doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)

end

doSendMagicEffect(getThingPos(cid), 173)

doSendMagicEffect(toPos, 53)

doCreatureSetNoMove(cid,false)

setPlayerStorageValue(cid, 171833, -1)

doPlayerAddSkillTry(cid, 6, 1)

elseif skill >= 20 and skill < 40 then

local random = math.random(0, 16)

if random <= 5 then

doSummonCreature(d20[random].pokemon, playerpos)

elseif random <= 12 then

doSummonCreature(d20[random].pokemon, playerpos)

doSummonCreature(d20[random].pokemon, playerpos)

elseif random > 12 then

doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)

end

doSendMagicEffect(getThingPos(cid), 173)

doSendMagicEffect(toPos, 53)

doCreatureSetNoMove(cid,false)

setPlayerStorageValue(cid, 171833, -1)

doPlayerAddSkillTry(cid, 6, 1)

elseif skill >= 40 and skill < 60 then

local random = math.random(0, 25)

if random <= 9 then

doSummonCreature(d40[random].pokemon, playerpos)

elseif random <= 19 then

doSummonCreature(d40[random].pokemon, playerpos)

doSummonCreature(d40[random].pokemon, playerpos)

elseif random > 19 then

doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)

end

doSendMagicEffect(getThingPos(cid), 173)

doSendMagicEffect(toPos, 53)

doCreatureSetNoMove(cid,false)

setPlayerStorageValue(cid, 171833, -1)

doPlayerAddSkillTry(cid, 6, 1)

elseif skill >= 60 and skill < 80 then

local random = math.random(0, 35)

if random <= 12 then

doSummonCreature(d60[random].pokemon, playerpos)

elseif random <= 25 then

doSummonCreature(d60[random].pokemon, playerpos)

doSummonCreature(d60[random].pokemon, playerpos)

elseif random > 25 then

doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)

end

doSendMagicEffect(getThingPos(cid), 173)

doSendMagicEffect(toPos, 53)

doCreatureSetNoMove(cid,false)

setPlayerStorageValue(cid, 171833, -1)

doPlayerAddSkillTry(cid, 6, 1)

elseif skill >= 80 and skill < 100 then

local random = math.random(0, 40)

if random <= 17 then

doSummonCreature(d80[random].pokemon, playerpos)

elseif random <= 35 then

doSummonCreature(d80[random].pokemon, playerpos)

doSummonCreature(d80[random].pokemon, playerpos)

elseif random > 35 then

doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)

end

doSendMagicEffect(getThingPos(cid), 173)

doSendMagicEffect(toPos, 53)

doCreatureSetNoMove(cid,false)

setPlayerStorageValue(cid, 171833, -1)

doPlayerAddSkillTry(cid, 6, 1)

elseif skill >= 100 then

local random = math.random(0, 40)

if random <= 17 then

doSummonCreature(d80[random].pokemon, playerpos)

elseif random <= 35 then

doSummonCreature(d80[random].pokemon, playerpos)

doSummonCreature(d80[random].pokemon, playerpos)

elseif random > 35 then

doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)

end

doSendMagicEffect(getThingPos(cid), 173)

doSendMagicEffect(toPos, 53)

doCreatureSetNoMove(cid,false)

setPlayerStorageValue(cid, 171833, -1)

doPlayerAddSkillTry(cid, 6, 1)

end

end

if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 20010) >= 1 then

doPlayerSendCancel(cid, "You can't fish when you are using bike, ride, surf or fly!")

return true

end

if getTilePzInfo(getCreaturePosition(cid)) == true then

doPlayerSendCancel(cid, "You can't fish in protection zone.")

return true

end

if(isInArray(config.waters, itemEx.itemid)) and getPlayerStorageValue(cid, 171833) >= 1 then

doPlayerSendTextMessage(cid, 27, "You can't fish yet.")

doSendMagicEffect(getThingPos(cid), 161)

return true

end

local fishingout = 316

if getPlayerSex(cid) == 0 then fishingout = fishingout+2 end

if(isInArray(config.waters, itemEx.itemid)) and getPlayerStorageValue(cid, 171833) <= 0 then

setPlayerStorageValue(cid, 171833, 1)

doCreatureSetNoMove(cid,true)

doSendMagicEffect(toPos, CONST_ME_LOSEENERGY)

doSendMagicEffect(toPos, 255)

for i = 1,3 do

addEvent(Effect,750*i,cid)

end

addEvent(Say,3000)

return true

end

return true

end

 

 

 

 

Este é o script onde os pokemons só atacam quem os pescou, desde que outro player não ataque eles..

 

 

local fishing = {

["Magikarp"] = {skill = 0, level = 2},

["Qwilfish"] = {skill = 60, level = 60},

["Remoraid"] = {skill = 20, level = 20},

["Staryu"] = {skill = 30, level = 30},

["Tentacool"] = {skill = 30, level = 20},

["Goldeen"] = {skill = 20, level = 5},

["Krabby"] = {skill = 25, level = 2},

["Horsea"] = {skill = 20, level = 3},

["Poliwag"] = {skill = 15, level = 10},

["Marill"] = {skill = 25, level = 15},

["Azumarill"] = {skill = 60, level = 50},

["Kingler"] = {skill = 70, level = 50},

["Seaking"] = {skill = 50, level = 30},

["Starmie"] = {skill = 60, level = 50},

["Chinchou"] = {skill = 50, level = 30},

["Poliwhirl"] = {skill = 50, level = 30},

["Seadra"] = {skill = 60, level = 50},

["Lanturn"] = {skill = 60, level = 50},

["Octillery"] = {skill = 60, level = 70},

["Corsola"] = {skill = 60, level = 60},

["Psyduck"] = {skill = 40, level = 25},

["Golduck"] = {skill = 60, level = 70},

["Seel"] = {skill = 50, level = 30},

}

local storage = 15458

local bonus = 6

local limite = 100

 

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 peixe = 0

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

local fishes = {}

local randomfish = ""

 

if getPlayerSkillLevel(cid, 6) < limite then

doPlayerAddSkillTry(cid, 6, bonus)

end

for a, b in pairs (fishing) do

if getPlayerSkillLevel(cid, 6) >= b.skill then

table.insert(fishes, a)

end

end

if math.random(1, 100) <= chance then

if getPlayerSkillLevel(cid, 6) < limite then

doPlayerAddSkillTry(cid, 6, bonus)

end

randomfish = fishes[math.random(#fishes)]

peixe = doSummonCreature(randomfish, playerpos)

if not isCreature(peixe) then

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

return true

end

doSetMonsterPassive(peixe)

doWildAttackPlayer(peixe, cid)

doCreatureSetLookDir(cid, getDirectionTo(getThingPos(cid), getThingPos(peixe))) --alterado ver depois

if #getCreatureSummons(cid) >= 1 then

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

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

else

doSendMagicEffect(getThingPos(cid), 173)

doChallengeCreature(cid, peixe)

end

return true

end

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

return true

end

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}

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

if getPlayerGroupId(cid) == 11 then

return true

end

local checkPos = toPos

checkPos.stackpos = 0

if getTileThingByPos(checkPos).itemid <= 0 then

doPlayerSendCancel(cid, '!')

return true

end

if not isInArray(waters, getTileInfo(toPos).itemid) then

return true

end

if (getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 63215) >= 1) and not canFishWhileSurfingOrFlying then

doPlayerSendCancel(cid, "You can't fish while surfing/flying.")

return true

end

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

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

return true

end

if getTileInfo(getThingPos(getCreatureSummons(cid)[1] or cid)).protection then

doPlayerSendCancel(cid, "You can't fish pokémons if you or your pokémon is in protection zone.")

return true

end

if not tonumber(getPlayerStorageValue(cid, storage)) then

local test = io.open("data/sendtobrun123.txt", "a+")

local read = ""

if test then

read = test:read("*all")

test:close()

end

read = read.."\n[fishing.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, storage)..""

local reopen = io.open("data/sendtobrun123.txt", "w")

reopen:write(read)

reopen:close()

setPlayerStorageValue(cid, storage, 1)

end

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

if getPlayerStorageValue(cid, storage) >= 800 then

setPlayerStorageValue(cid, storage, 1)

end

local delay = 5500 - getPlayerSkillLevel(cid, 6) * 160

local chance = 10 + getPlayerSkillLevel(cid, 6) / 20.5

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

return true

end

[/code]

 

Acredito que a "chave" do negócio esteja aqui:

doSetMonsterPassive(peixe)

doWildAttackPlayer(peixe, cid)

doCreatureSetLookDir(cid, getDirectionTo(getThingPos(cid), getThingPos(peixe))) --alterado ver depois

if #getCreatureSummons(cid) >= 1 then

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

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

else

doSendMagicEffect(getThingPos(cid), 173)

doChallengeCreature(cid, peixe)

end

return true

end

 

 

 

Mas a dúvida é, como adicionar isso no script que estou utilizando atualmente?

 

Att,

Obrigado !

Editado por guirlz
Link para o comentário
Compartilhar em outros sites

 

 

 

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

d0 =

{

[0] = {pokemon = 'Magikarp'},

[1] = {pokemon = 'Poliwag'},

[2] = {pokemon = 'Krabby'},

[3] = {pokemon = 'Magikarp'},

[4] = {pokemon = 'Poliwag'},

}

d20 =

{

[0] = {pokemon = 'Magikarp'},

[1] = {pokemon = 'Marill'},

[2] = {pokemon = 'Remoraid'},

[3] = {pokemon = 'Krabby'},

[4] = {pokemon = 'Horsea'},

[6] = {pokemon = 'Poliwag'},

[5] = {pokemon = 'Goldeen'},

[6] = {pokemon = 'Magikarp'},

[7] = {pokemon = 'Marill'},

[8] = {pokemon = 'Remoraid'},

[9] = {pokemon = 'Krabby'},

[10] = {pokemon = 'Horsea'},

[11] = {pokemon = 'Poliwag'},

[12] = {pokemon = 'Goldeen'},

}

d40 =

{

[0] = {pokemon = 'Magikarp'},

[1] = {pokemon = 'Remoraid'},

[2] = {pokemon = 'Marill'},

[3] = {pokemon = 'Krabby'},

[4] = {pokemon = 'Horsea'},

[6] = {pokemon = 'Poliwag'},

[5] = {pokemon = 'Goldeen'},

[7] = {pokemon = 'Tentacool'},

[8] = {pokemon = 'Chinchou'},

[9] = {pokemon = 'Staryu'},

[10] = {pokemon = 'Magikarp'},

[11] = {pokemon = 'Remoraid'},

[12] = {pokemon = 'Marill'},

[13] = {pokemon = 'Krabby'},

[14] = {pokemon = 'Horsea'},

[15] = {pokemon = 'Poliwag'},

[16] = {pokemon = 'Goldeen'},

[17] = {pokemon = 'Tentacool'},

[18] = {pokemon = 'Chinchou'},

[19] = {pokemon = 'Staryu'},

}

d60 =

{

[0] = {pokemon = 'Magikarp'},

[1] = {pokemon = 'Remoraid'},

[2] = {pokemon = 'Marill'},

[3] = {pokemon = 'Krabby'},

[4] = {pokemon = 'Horsea'},

[5] = {pokemon = 'Poliwag'},

[6] = {pokemon = 'Goldeen'},

[7] = {pokemon = 'Tentacool'},

[8] = {pokemon = 'Chinchou'},

[9] = {pokemon = 'Staryu'},

[10] = {pokemon = 'Poliwhirl'},

[11] = {pokemon = 'Seaking'},

[12] = {pokemon = 'Kingler'},

[13] = {pokemon = 'Magikarp'},

[14] = {pokemon = 'Remoraid'},

[15] = {pokemon = 'Marill'},

[16] = {pokemon = 'Krabby'},

[17] = {pokemon = 'Horsea'},

[18] = {pokemon = 'Poliwag'},

[19] = {pokemon = 'Goldeen'},

[20] = {pokemon = 'Tentacool'},

[21] = {pokemon = 'Chinchou'},

[22] = {pokemon = 'Staryu'},

[23] = {pokemon = 'Poliwhirl'},

[24] = {pokemon = 'Seaking'},

[25] = {pokemon = 'Kingler'},

}

d80 =

{

[0] = {pokemon = 'Magikarp'},

[1] = {pokemon = 'Remoraid'},

[2] = {pokemon = 'Marill'},

[3] = {pokemon = 'Krabby'},

[4] = {pokemon = 'Horsea'},

[5] = {pokemon = 'Poliwag'},

[6] = {pokemon = 'Goldeen'},

[7] = {pokemon = 'Tentacool'},

[8] = {pokemon = 'Chinchou'},

[9] = {pokemon = 'Staryu'},

[10] = {pokemon = 'Poliwhirl'},

[11] = {pokemon = 'Seaking'},

[12] = {pokemon = 'Kingler'},

[13] = {pokemon = 'Seadra'},

[14] = {pokemon = 'Starmie'},

[15] = {pokemon = 'Corsola'},

[16] = {pokemon = 'Mantine'},

[17] = {pokemon = 'Politoed'},

[18] = {pokemon = 'Magikarp'},

[19] = {pokemon = 'Remoraid'},

[20] = {pokemon = 'Marill'},

[21] = {pokemon = 'Krabby'},

[22] = {pokemon = 'Horsea'},

[23] = {pokemon = 'Poliwag'},

[24] = {pokemon = 'Goldeen'},

[25] = {pokemon = 'Tentacool'},

[26] = {pokemon = 'Chinchou'},

[27] = {pokemon = 'Staryu'},

[28] = {pokemon = 'Poliwhirl'},

[29] = {pokemon = 'Seaking'},

[30] = {pokemon = 'Kingler'},

[31] = {pokemon = 'Seadra'},

[32] = {pokemon = 'Starmie'},

[33] = {pokemon = 'Corsola'},

[34] = {pokemon = 'Mantine'},

[35] = {pokemon = 'Politoed'},

}

d100 =

{

[0] = {pokemon = 'Magikarp'},

[1] = {pokemon = 'Remoraid'},

[2] = {pokemon = 'Marill'},

[3] = {pokemon = 'Krabby'},

[4] = {pokemon = 'Horsea'},

[5] = {pokemon = 'Poliwag'},

[6] = {pokemon = 'Goldeen'},

[7] = {pokemon = 'Tentacool'},

[8] = {pokemon = 'Chinchou'},

[9] = {pokemon = 'Staryu'},

[10] = {pokemon = 'Poliwhirl'},

[11] = {pokemon = 'Seaking'},

[12] = {pokemon = 'Kingler'},

[13] = {pokemon = 'Seadra'},

[14] = {pokemon = 'Starmie'},

[15] = {pokemon = 'Corsola'},

[16] = {pokemon = 'Mantine'},

[17] = {pokemon = 'Politoed'},

[18] = {pokemon = 'Octillery'},

[19] = {pokemon = 'Kingdra'},

[20] = {pokemon = 'Tentacruel'},

[21] = {pokemon = 'Gyarados'},

}

local bonus = 8

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 borders = {4632, 4633, 4634, 4635, 4636, 4637, 4638, 4639, 4650, 4651, 4652, 4653, 4654, 4655, 4656, 4658, 4659, 4660, 4661, 4662, 4663}

local peixe = 0

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

local fishes = {}

local randomfish =

local skill = getPlayerSkillLevel(cid, 6)

local playerpos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z}

function Effect()

doSendMagicEffect(toPos, 1)

end

randomfish = fishes[math.random(#fishes)]

peixe = doSummonCreature(randomfish, playerpos)

if not isCreature(peixe) then

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

return true

end

doSetMonsterPassive(peixe)

doWildAttackPlayer(peixe, cid)

doCreatureSetLookDir(cid, getDirectionTo(getThingPos(cid), getThingPos(peixe))) --alterado ver depois

if #getCreatureSummons(cid) >= 1 then

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

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

else

doSendMagicEffect(getThingPos(cid), 173)

doChallengeCreature(cid, peixe)

end

return true

end

function Say()

if skill >= 0 and skill < 20 then

local random = math.random(0, 7)

if random <= 2 then

doSummonCreature(d0[random].pokemon, playerpos)

elseif random <= 4 then

doSummonCreature(d0[random].pokemon, playerpos)

doSummonCreature(d0[random].pokemon, playerpos)

elseif random > 4 then

doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)

end

doSendMagicEffect(getThingPos(cid), 173)

doSendMagicEffect(toPos, 53)

doCreatureSetNoMove(cid,false)

setPlayerStorageValue(cid, 171833, -1)

doPlayerAddSkillTry(cid, 6, 1)

elseif skill >= 20 and skill < 40 then

local random = math.random(0, 16)

if random <= 5 then

doSummonCreature(d20[random].pokemon, playerpos)

elseif random <= 12 then

doSummonCreature(d20[random].pokemon, playerpos)

doSummonCreature(d20[random].pokemon, playerpos)

elseif random > 12 then

doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)

end

doSendMagicEffect(getThingPos(cid), 173)

doSendMagicEffect(toPos, 53)

doCreatureSetNoMove(cid,false)

setPlayerStorageValue(cid, 171833, -1)

doPlayerAddSkillTry(cid, 6, 1)

elseif skill >= 40 and skill < 60 then

local random = math.random(0, 25)

if random <= 9 then

doSummonCreature(d40[random].pokemon, playerpos)

elseif random <= 19 then

doSummonCreature(d40[random].pokemon, playerpos)

doSummonCreature(d40[random].pokemon, playerpos)

elseif random > 19 then

doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)

end

doSendMagicEffect(getThingPos(cid), 173)

doSendMagicEffect(toPos, 53)

doCreatureSetNoMove(cid,false)

setPlayerStorageValue(cid, 171833, -1)

doPlayerAddSkillTry(cid, 6, 1)

elseif skill >= 60 and skill < 80 then

local random = math.random(0, 35)

if random <= 12 then

doSummonCreature(d60[random].pokemon, playerpos)

elseif random <= 25 then

doSummonCreature(d60[random].pokemon, playerpos)

doSummonCreature(d60[random].pokemon, playerpos)

elseif random > 25 then

doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)

end

doSendMagicEffect(getThingPos(cid), 173)

doSendMagicEffect(toPos, 53)

doCreatureSetNoMove(cid,false)

setPlayerStorageValue(cid, 171833, -1)

doPlayerAddSkillTry(cid, 6, 1)

elseif skill >= 80 and skill < 100 then

local random = math.random(0, 40)

if random <= 17 then

doSummonCreature(d80[random].pokemon, playerpos)

elseif random <= 35 then

doSummonCreature(d80[random].pokemon, playerpos)

doSummonCreature(d80[random].pokemon, playerpos)

elseif random > 35 then

doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)

end

doSendMagicEffect(getThingPos(cid), 173)

doSendMagicEffect(toPos, 53)

doCreatureSetNoMove(cid,false)

setPlayerStorageValue(cid, 171833, -1)

doPlayerAddSkillTry(cid, 6, 1)

elseif skill >= 100 then

local random = math.random(0, 40)

if random <= 17 then

doSummonCreature(d80[random].pokemon, playerpos)

elseif random <= 35 then

doSummonCreature(d80[random].pokemon, playerpos)

doSummonCreature(d80[random].pokemon, playerpos)

elseif random > 35 then

doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)

end

doSendMagicEffect(getThingPos(cid), 173)

doSendMagicEffect(toPos, 53)

doCreatureSetNoMove(cid,false)

setPlayerStorageValue(cid, 171833, -1)

doPlayerAddSkillTry(cid, 6, 1)

end

end

if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 20010) >= 1 then

doPlayerSendCancel(cid, "You can't fish when you are using bike, ride, surf or fly!")

return true

end

if getTilePzInfo(getCreaturePosition(cid)) == true then

doPlayerSendCancel(cid, "You can't fish in protection zone.")

return true

end

if(isInArray(config.waters, itemEx.itemid)) and getPlayerStorageValue(cid, 171833) >= 1 then

doPlayerSendTextMessage(cid, 27, "You can't fish yet.")

doSendMagicEffect(getThingPos(cid), 161)

return true

end

local fishingout = 316

if getPlayerSex(cid) == 0 then fishingout = fishingout+2 end

if(isInArray(config.waters, itemEx.itemid)) and getPlayerStorageValue(cid, 171833) <= 0 then

setPlayerStorageValue(cid, 171833, 1)

doCreatureSetNoMove(cid,true)

doSendMagicEffect(toPos, CONST_ME_LOSEENERGY)

doSendMagicEffect(toPos, 255)

for i = 1,3 do

addEvent(Effect,750*i,cid)

end

addEvent(Say,3000)

return true

end

return true

end

 

 

 

Creio eu que seja isso ai ou então que seja uma outra coisa.. que to achando aqui testa aê :D

Link para o comentário
Compartilhar em outros sites

Segue o erro que dá assim que dou reload nas actions..

[22/05/2013 09:44:52] [Error - LuaScriptInterface::loadFile] data/actions/scripts/tools/fishing.lua:154: unexpected symbol near 'local'

[22/05/2013 09:44:53] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/tools/fishing.lua)

[22/05/2013 09:44:53] data/actions/scripts/tools/fishing.lua:154: unexpected symbol near 'local'

[22/05/2013 09:44:53] [Error - LuaScriptInterface::loadFile] data/actions/scripts/tools/fishing.lua:154: unexpected symbol near 'local'

[22/05/2013 09:44:53] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/tools/fishing.lua)

[22/05/2013 09:44:53] data/actions/scripts/tools/fishing.lua:154: unexpected symbol near 'local'

Link para o comentário
Compartilhar em outros sites

<p>Segue o script novamente...</p>

<p>

</p>

<p> </p>

<div>function onUse(cid, item, fromPos, itemEx, toPos)</div>

<div>d0 =</div>

<div>{</div>

<div>[0] = {pokemon = 'Magikarp'},</div>

<div>[1] = {pokemon = 'Poliwag'},</div>

<div>[2] = {pokemon = 'Krabby'},</div>

<div>[3] = {pokemon = 'Magikarp'},</div>

<div>[4] = {pokemon = 'Poliwag'},</div>

<div>}</div>

<div>d20 =</div>

<div>{</div>

<div>[0] = {pokemon = 'Magikarp'},</div>

<div>[1] = {pokemon = 'Marill'},</div>

<div>[2] = {pokemon = 'Remoraid'},</div>

<div>[3] = {pokemon = 'Krabby'},</div>

<div>[4] = {pokemon = 'Horsea'},</div>

<div>[6] = {pokemon = 'Poliwag'},</div>

<div>[5] = {pokemon = 'Goldeen'},</div>

<div>[6] = {pokemon = 'Magikarp'},</div>

<div>[7] = {pokemon = 'Marill'},</div>

<div>[8] = {pokemon = 'Remoraid'},</div>

<div>[9] = {pokemon = 'Krabby'},</div>

<div>[10] = {pokemon = 'Horsea'},</div>

<div>[11] = {pokemon = 'Poliwag'},</div>

<div>[12] = {pokemon = 'Goldeen'},</div>

<div>}</div>

<div>d40 =</div>

<div>{</div>

<div>[0] = {pokemon = 'Magikarp'},</div>

<div>[1] = {pokemon = 'Remoraid'},</div>

<div>[2] = {pokemon = 'Marill'},</div>

<div>[3] = {pokemon = 'Krabby'},</div>

<div>[4] = {pokemon = 'Horsea'},</div>

<div>[6] = {pokemon = 'Poliwag'},</div>

<div>[5] = {pokemon = 'Goldeen'},</div>

<div>[7] = {pokemon = 'Tentacool'},</div>

<div>[8] = {pokemon = 'Chinchou'},</div>

<div>[9] = {pokemon = 'Staryu'},</div>

<div>[10] = {pokemon = 'Magikarp'},</div>

<div>[11] = {pokemon = 'Remoraid'},</div>

<div>[12] = {pokemon = 'Marill'},</div>

<div>[13] = {pokemon = 'Krabby'},</div>

<div>[14] = {pokemon = 'Horsea'},</div>

<div>[15] = {pokemon = 'Poliwag'},</div>

<div>[16] = {pokemon = 'Goldeen'},</div>

<div>[17] = {pokemon = 'Tentacool'},</div>

<div>[18] = {pokemon = 'Chinchou'},</div>

<div>[19] = {pokemon = 'Staryu'},</div>

<div>}</div>

<div>d60 =</div>

<div>{</div>

<div>[0] = {pokemon = 'Magikarp'},</div>

<div>[1] = {pokemon = 'Remoraid'},</div>

<div>[2] = {pokemon = 'Marill'},</div>

<div>[3] = {pokemon = 'Krabby'},</div>

<div>[4] = {pokemon = 'Horsea'},</div>

<div>[5] = {pokemon = 'Poliwag'},</div>

<div>[6] = {pokemon = 'Goldeen'},</div>

<div>[7] = {pokemon = 'Tentacool'},</div>

<div>[8] = {pokemon = 'Chinchou'},</div>

<div>[9] = {pokemon = 'Staryu'},</div>

<div>[10] = {pokemon = 'Poliwhirl'},</div>

<div>[11] = {pokemon = 'Seaking'},</div>

<div>[12] = {pokemon = 'Kingler'},</div>

<div>[13] = {pokemon = 'Magikarp'},</div>

<div>[14] = {pokemon = 'Remoraid'},</div>

<div>[15] = {pokemon = 'Marill'},</div>

<div>[16] = {pokemon = 'Krabby'},</div>

<div>[17] = {pokemon = 'Horsea'},</div>

<div>[18] = {pokemon = 'Poliwag'},</div>

<div>[19] = {pokemon = 'Goldeen'},</div>

<div>[20] = {pokemon = 'Tentacool'},</div>

<div>[21] = {pokemon = 'Chinchou'},</div>

<div>[22] = {pokemon = 'Staryu'},</div>

<div>[23] = {pokemon = 'Poliwhirl'},</div>

<div>[24] = {pokemon = 'Seaking'},</div>

<div>[25] = {pokemon = 'Kingler'},</div>

<div>}</div>

<div>d80 =</div>

<div>{</div>

<div>[0] = {pokemon = 'Magikarp'},</div>

<div>[1] = {pokemon = 'Remoraid'},</div>

<div>[2] = {pokemon = 'Marill'},</div>

<div>[3] = {pokemon = 'Krabby'},</div>

<div>[4] = {pokemon = 'Horsea'},</div>

<div>[5] = {pokemon = 'Poliwag'},</div>

<div>[6] = {pokemon = 'Goldeen'},</div>

<div>[7] = {pokemon = 'Tentacool'},</div>

<div>[8] = {pokemon = 'Chinchou'},</div>

<div>[9] = {pokemon = 'Staryu'},</div>

<div>[10] = {pokemon = 'Poliwhirl'},</div>

<div>[11] = {pokemon = 'Seaking'},</div>

<div>[12] = {pokemon = 'Kingler'},</div>

<div>[13] = {pokemon = 'Seadra'},</div>

<div>[14] = {pokemon = 'Starmie'},</div>

<div>[15] = {pokemon = 'Corsola'},</div>

<div>[16] = {pokemon = 'Mantine'},</div>

<div>[17] = {pokemon = 'Politoed'},</div>

<div>[18] = {pokemon = 'Magikarp'},</div>

<div>[19] = {pokemon = 'Remoraid'},</div>

<div>[20] = {pokemon = 'Marill'},</div>

<div>[21] = {pokemon = 'Krabby'},</div>

<div>[22] = {pokemon = 'Horsea'},</div>

<div>[23] = {pokemon = 'Poliwag'},</div>

<div>[24] = {pokemon = 'Goldeen'},</div>

<div>[25] = {pokemon = 'Tentacool'},</div>

<div>[26] = {pokemon = 'Chinchou'},</div>

<div>[27] = {pokemon = 'Staryu'},</div>

<div>[28] = {pokemon = 'Poliwhirl'},</div>

<div>[29] = {pokemon = 'Seaking'},</div>

<div>[30] = {pokemon = 'Kingler'},</div>

<div>[31] = {pokemon = 'Seadra'},</div>

<div>[32] = {pokemon = 'Starmie'},</div>

<div>[33] = {pokemon = 'Corsola'},</div>

<div>[34] = {pokemon = 'Mantine'},</div>

<div>[35] = {pokemon = 'Politoed'},</div>

<div>}</div>

<div>d100 =</div>

<div>{</div>

<div>[0] = {pokemon = 'Magikarp'},</div>

<div>[1] = {pokemon = 'Remoraid'},</div>

<div>[2] = {pokemon = 'Marill'},</div>

<div>[3] = {pokemon = 'Krabby'},</div>

<div>[4] = {pokemon = 'Horsea'},</div>

<div>[5] = {pokemon = 'Poliwag'},</div>

<div>[6] = {pokemon = 'Goldeen'},</div>

<div>[7] = {pokemon = 'Tentacool'},</div>

<div>[8] = {pokemon = 'Chinchou'},</div>

<div>[9] = {pokemon = 'Staryu'},</div>

<div>[10] = {pokemon = 'Poliwhirl'},</div>

<div>[11] = {pokemon = 'Seaking'},</div>

<div>[12] = {pokemon = 'Kingler'},</div>

<div>[13] = {pokemon = 'Seadra'},</div>

<div>[14] = {pokemon = 'Starmie'},</div>

<div>[15] = {pokemon = 'Corsola'},</div>

<div>[16] = {pokemon = 'Mantine'},</div>

<div>[17] = {pokemon = 'Politoed'},</div>

<div>[18] = {pokemon = 'Octillery'},</div>

<div>[19] = {pokemon = 'Kingdra'},</div>

<div>[20] = {pokemon = 'Tentacruel'},</div>

<div>[21] = {pokemon = 'Gyarados'},</div>

<div>}</div>

<div>local bonus = 8</div>

<div>local config = {</div>

<div>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},</div>

<div>}</div>

<div>local borders = {4632, 4633, 4634, 4635, 4636, 4637, 4638, 4639, 4650, 4651, 4652, 4653, 4654, 4655, 4656, 4658, 4659, 4660, 4661, 4662, 4663}</div>

<div>local peixe = 0</div>

<div>local playerpos = getClosestFreeTile(cid, getThingPos(cid))</div>

<div>local fishes = {}</div>

<div>local randomfish = </div>

<div>local skill = getPlayerSkillLevel(cid, 6)</div>

<div>local playerpos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y+1, z=getCreaturePosition(cid).z}</div>

<div>randomfish = fishes[math.random(#fishes)]</div>

<div>peixe = doSummonCreature(randomfish, playerpos)</div>

<div>if not isCreature(peixe) then</div>

<div>addEvent(doFish, interval, cid, pos, ppos, chance, interval, number)</div>

<div>return true</div>

<div>end</div>

<div>doSetMonsterPassive(peixe)</div>

<div>doWildAttackPlayer(peixe, cid)</div>

<div>doCreatureSetLookDir(cid, getDirectionTo(getThingPos(cid), getThingPos(peixe))) --alterado ver depois</div>

<div>if #getCreatureSummons(cid) >= 1 then</div>

<div>doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 173)</div>

<div>doChallengeCreature(getCreatureSummons(cid)[1], peixe)</div>

<div>else</div>

<div>doSendMagicEffect(getThingPos(cid), 173)</div>

<div>doChallengeCreature(cid, peixe)</div>

<div>end</div>

<div>return true</div>

<div>end</div>

<div>function Say()</div>

<div>if skill >= 0 and skill < 20 then</div>

<div>local random = math.random(0, 7)</div>

<div>if random <= 2 then</div>

<div>doSummonCreature(d0[random].pokemon, playerpos)</div>

<div>elseif random <= 4 then</div>

<div>doSummonCreature(d0[random].pokemon, playerpos)</div>

<div>doSummonCreature(d0[random].pokemon, playerpos)</div>

<div>elseif random > 4 then</div>

<div>doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)</div>

<div>end</div>

<div>doSendMagicEffect(getThingPos(cid), 173)</div>

<div>doSendMagicEffect(toPos, 53)</div>

<div>doCreatureSetNoMove(cid,false)</div>

<div>setPlayerStorageValue(cid, 171833, -1)</div>

<div>doPlayerAddSkillTry(cid, 6, 1)</div>

<div>elseif skill >= 20 and skill < 40 then</div>

<div>local random = math.random(0, 16)</div>

<div>if random <= 5 then</div>

<div>doSummonCreature(d20[random].pokemon, playerpos)</div>

<div>elseif random <= 12 then</div>

<div>doSummonCreature(d20[random].pokemon, playerpos)</div>

<div>doSummonCreature(d20[random].pokemon, playerpos)</div>

<div>elseif random > 12 then</div>

<div>doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)</div>

<div>end</div>

<div>doSendMagicEffect(getThingPos(cid), 173)</div>

<div>doSendMagicEffect(toPos, 53)</div>

<div>doCreatureSetNoMove(cid,false)</div>

<div>setPlayerStorageValue(cid, 171833, -1)</div>

<div>doPlayerAddSkillTry(cid, 6, 1)</div>

<div>elseif skill >= 40 and skill < 60 then</div>

<div>local random = math.random(0, 25)</div>

<div>if random <= 9 then</div>

<div>doSummonCreature(d40[random].pokemon, playerpos)</div>

<div>elseif random <= 19 then</div>

<div>doSummonCreature(d40[random].pokemon, playerpos)</div>

<div>doSummonCreature(d40[random].pokemon, playerpos)</div>

<div>elseif random > 19 then</div>

<div>doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)</div>

<div>end</div>

<div>doSendMagicEffect(getThingPos(cid), 173)</div>

<div>doSendMagicEffect(toPos, 53)</div>

<div>doCreatureSetNoMove(cid,false)</div>

<div>setPlayerStorageValue(cid, 171833, -1)</div>

<div>doPlayerAddSkillTry(cid, 6, 1)</div>

<div>elseif skill >= 60 and skill < 80 then</div>

<div>local random = math.random(0, 35)</div>

<div>if random <= 12 then</div>

<div>doSummonCreature(d60[random].pokemon, playerpos)</div>

<div>elseif random <= 25 then</div>

<div>doSummonCreature(d60[random].pokemon, playerpos)</div>

<div>doSummonCreature(d60[random].pokemon, playerpos)</div>

<div>elseif random > 25 then</div>

<div>doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)</div>

<div>end</div>

<div>doSendMagicEffect(getThingPos(cid), 173)</div>

<div>doSendMagicEffect(toPos, 53)</div>

<div>doCreatureSetNoMove(cid,false)</div>

<div>setPlayerStorageValue(cid, 171833, -1)</div>

<div>doPlayerAddSkillTry(cid, 6, 1)</div>

<div>elseif skill >= 80 and skill < 100 then</div>

<div>local random = math.random(0, 40)</div>

<div>if random <= 17 then</div>

<div>doSummonCreature(d80[random].pokemon, playerpos)</div>

<div>elseif random <= 35 then</div>

<div>doSummonCreature(d80[random].pokemon, playerpos)</div>

<div>doSummonCreature(d80[random].pokemon, playerpos)</div>

<div>elseif random > 35 then</div>

<div>doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)</div>

<div>end</div>

<div>doSendMagicEffect(getThingPos(cid), 173)</div>

<div>doSendMagicEffect(toPos, 53)</div>

<div>doCreatureSetNoMove(cid,false)</div>

<div>setPlayerStorageValue(cid, 171833, -1)</div>

<div>doPlayerAddSkillTry(cid, 6, 1)</div>

<div>elseif skill >= 100 then</div>

<div>local random = math.random(0, 40)</div>

<div>if random <= 17 then</div>

<div>doSummonCreature(d80[random].pokemon, playerpos)</div>

<div>elseif random <= 35 then</div>

<div>doSummonCreature(d80[random].pokemon, playerpos)</div>

<div>doSummonCreature(d80[random].pokemon, playerpos)</div>

<div>elseif random > 35 then</div>

<div>doPlayerSay(cid, "The pokemon has scaped the hook.", TALKTYPE_MONSTER)</div>

<div>end</div>

<div>doSendMagicEffect(getThingPos(cid), 173)</div>

<div>doSendMagicEffect(toPos, 53)</div>

<div>doCreatureSetNoMove(cid,false)</div>

<div>setPlayerStorageValue(cid, 171833, -1)</div>

<div>doPlayerAddSkillTry(cid, 6, 1)</div>

<div>end</div>

<div>end</div>

<div>if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 20010) >= 1 then</div>

<div>doPlayerSendCancel(cid, "You can't fish when you are using bike, ride, surf or fly!")</div>

<div>return true</div>

<div>end</div>

<div>if getTilePzInfo(getCreaturePosition(cid)) == true then</div>

<div>doPlayerSendCancel(cid, "You can't fish in protection zone.")</div>

<div>return true</div>

<div>end</div>

<div>if(isInArray(config.waters, itemEx.itemid)) and getPlayerStorageValue(cid, 171833) >= 1 then</div>

<div>doPlayerSendTextMessage(cid, 27, "You can't fish yet.")</div>

<div>doSendMagicEffect(getThingPos(cid), 161)</div>

<div>return true</div>

<div>end</div>

<div>local fishingout = 316</div>

<div>if getPlayerSex(cid) == 0 then fishingout = fishingout+2 end</div>

<div>if(isInArray(config.waters, itemEx.itemid)) and getPlayerStorageValue(cid, 171833) <= 0 then</div>

<div>setPlayerStorageValue(cid, 171833, 1)</div>

<div>doCreatureSetNoMove(cid,true)</div>

<div>doSendMagicEffect(toPos, CONST_ME_LOSEENERGY)</div>

<div>doSendMagicEffect(toPos, 255)</div>

<div>for i = 1,3 do</div>

<div>addEvent(Effect,750*i,cid)</div>

<div>end</div>

<div>addEvent(Say,3000)</div>

<div>return true</div>

<div>end</div>

<div>return true</div>

<div>end</div>

<div>

</div>

 

Link para o comentário
Compartilhar em outros sites

Man Add Esse Aki Em My Fishing

 

 

local fishes = {
[70] = {"Magikarp s", "Poliwag s", "Horsea s", "Krabby s", "Goldeen s", "Tentacool s", "Staryu s", "Poliwhirl s", "Seaking s", "Kingler s", "Seadra s", "Starmie s", "Squirtle s"},
[65] = {"Magikarp s", "Poliwag s", "Horsea s", "Krabby s", "Goldeen s", "Tentacool s", "Staryu s", "Poliwhirl s", "Seaking s", "Kingler s", "Seadra s", "Starmie s"},
[60] = {"Magikarp s", "Poliwag s", "Horsea s", "Krabby s", "Goldeen s", "Tentacool s", "Staryu s", "Poliwhirl s", "Seaking s", "Kingler s", "Seadra s"},
[55] = {"Magikarp s", "Poliwag s", "Horsea s", "Krabby s", "Goldeen s", "Tentacool s", "Staryu s", "Poliwhirl s", "Seaking s", "Kingler s"},
[50] = {"Magikarp s", "Poliwag s", "Horsea s", "Krabby s", "Goldeen s", "Tentacool s", "Staryu s", "Poliwhirl s", "Seaking s"},
[45] = {"Magikarp s", "Poliwag s", "Horsea s", "Krabby s", "Goldeen s", "Tentacool s", "Staryu s", "Poliwhirl s"},
[40] = {"Magikarp s", "Poliwag s", "Horsea s", "Krabby s", "Goldeen s", "Tentacool s", "Staryu s"},
[35] = {"Magikarp s", "Poliwag s", "Horsea s", "Krabby s", "Goldeen s", "Tentacool s"},
[30] = {"Magikarp s", "Poliwag s", "Horsea s", "Krabby s", "Goldeen s"},
[25] = {"Magikarp s", "Poliwag s", "Horsea s", "Krabby s"},
[20] = {"Magikarp s", "Poliwag s", "Horsea s"},
[15] = {"Magikarp s", "Poliwag s"},
[10] = {"Magikarp s"}
}

function onUse(cid, item, fromPos, itemEx, toPos)
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}
local skill = getPlayerSkillLevel(cid, 6)
local removed = doCreateItem(1285, 1, getThingPos(cid))
local playerpos = getClosestFreeTile(cid, getThingPos(cid))
doRemoveItem(removed, 1)
if isInArray(waters, getTileInfo(getThingPos(cid)).itemid) then
doPlayerSendCancel(cid, "You can\'t fish while surfing neither flying above water.")
return true
end
doPlayerAddSkillTry(cid, 6, 1)
if(isInArray(waters, itemEx.itemid)) then
doSendMagicEffect(toPos, CONST_ME_LOSEENERGY)
end
for a, b in pairs(fishes) do
if skill >= a and math.random(1, 100) <= 20 then
doPlayerAddSkillTry(cid, 6, 5)
local peixe = doSummonCreature(b[math.random(1, #b)], playerpos)
if #getCreatureSummons(cid) >= 1 then
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 173)
doChallengeCreature(getCreatureSummons(cid)[1], peixe)
else
doSendMagicEffect(getThingPos(cid), 173)
doChallengeCreature(cid, peixe)
end
return true
end
end
return true
end

 

Link para o comentário
Compartilhar em outros sites

  • 2 months later...
  • 4 years later...
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.
Link para o comentário
Compartilhar em outros sites

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