Olá queria saber se alguém consegui mi ajudar com um script, tipo os players no servidor ao jogar a vara na agua eles conseguem ficar jogando a vara toda hora assim bugando o tempo de puxar o pokemon puxando varios de em pouco tempo queria saber se alguém consegue colocar uma função que ele so pode usar a vara novamente assim que ele puxar o pokemon. Ou um tempo em segundos que ele só pode usar a vara depois que esse tempo acabar!
local fishing = {[-1] = { segs = 500, pokes = {{"Magikarp", 1}} },[3976] = { segs = 500, pokes = {{"Horsea", 1}, {"Remoraid", 1}, {"Goldeen", 1}, {"Poliwag", 1}} }, -- pega no client da pxg[12855] = { segs = 500, pokes = {{"Tentacool", 1}, {"Staryu", 1}, {"Krabby", 1}, {"Shellder", 1} } },[12854] = { segs = 500, pokes = {{"Seel", 1}, {"Chinchou", 1} } },[12858] = { segs = 500, pokes = {{"Seaking", 1}, {"Seadra", 1}, {"Poliwhirl", 1}} },[12857] = { segs = 500, pokes = {{"Starmie", 1}, {"Kingler", 1}, {"Corsola", 1}, {"Qwilfish", 1}} }, -- pega no client da pxg[12860] = { segs = 500, pokes = {{"Lanturn", 1}, {"Dewgong", 1}}},[12859] = { segs = 500, pokes = {{"Cloyster", 1}, {"Poliwrath", 1}, {"Politoed", 1}, {"Octillery", 1}} },[12856] = { segs = 500, pokes = {{"Dratini", 1}, {"Dragonair", 1} }},[12853] = { segs = 500, pokes = {{"Gyarados", 1}, {"Mantine", 1}, {"Tentacruel", 1}, {"Kingdra", 1}} },}local storageP = 154584local sto_iscas = 5648454 --muda aki pra sto q ta no script da iscalocal bonus = 15local limite = 100local fightcondition = createConditionObject(CONDITION_INFIGHT)setConditionParam(fightcondition, CONDITION_PARAM_TICKS, 5 * 1000)function fightCondic(cid) if not isCreature(cid) then return true end if not isCreature(getCreatureTarget(cid)) then return true end doAddCondition(cid, fightcondition)addEvent(fightCondic, 1000, cid)endlocal function doFish(cid, pos, ppos, interval) if not isCreature(cid) then return false end if getThingPos(cid).x ~= ppos.x or getThingPos(cid).y ~= ppos.y then return false end doSendMagicEffect(pos, CONST_ME_LOSEENERGY) if interval > 0 then addEvent(doFish, 1000, cid, pos, ppos, interval-1) return true end local peixe = 0 local playerpos = getClosestFreeTile(cid, getThingPos(cid)) local fishes = fishing[getPlayerStorageValue(cid, sto_iscas)] local random = {} if getPlayerSkillLevel(cid, 6) < limite then doPlayerAddSkillTry(cid, 6, bonus * 5) end --[[if math.random(1, 100) <= chance then if getPlayerSkillLevel(cid, 6) < limite then doPlayerAddSkillTry(cid, 6, bonus * 5) end]] random = fishes.pokes[math.random(#fishes.pokes)] for i = 1, math.random(random[2]) do peixe = doSummonCreature(random[1], playerpos) if not isCreature(peixe) then setPlayerStorageValue(cid, storageP, -1) doRemoveCondition(cid, CONDITION_OUTFIT) return true end setPokemonPassive(peixe, true) doSetPokemonAgressiveToPlayer(peixe, cid) setPlayerStorageValue(peixe, storageP, 1) fightCondic(cid) if #getCreatureSummons(cid) >= 1 then doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 0) doChallengeCreature(getCreatureSummons(cid)[1], peixe) else doSendMagicEffect(getThingPos(cid), 0) doChallengeCreature(cid, peixe) end end setPlayerStorageValue(cid, storageP, -1) doRemoveCondition(cid, CONDITION_OUTFIT)return trueendlocal waters = {11756}local times = {s = 2256891, -- n mexaexhau = 5 -- tempo em seegundos para salvar denovo}function onUse(cid, item, fromPos, itemEx, toPos)if isWatchingTv(cid) thenreturn trueendlocal checkPos = toPoscheckPos.stackpos = 0if getTileThingByPos(checkPos).itemid <= 0 then return trueendif not isInArray(waters, getTileInfo(toPos).itemid) then return trueendif isRiderOrFlyOrSurf(cid) and not canFishWhileSurfingOrFlying then doPlayerSendCancel(cid, "You can't fish while surfing/flying.") return trueendif 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 trueendlocal delay = fishing[getPlayerStorageValue(cid, sto_iscas)].segsif getPlayerStorageValue(cid, sto_iscas) ~= -1 then if getPlayerItemCount(cid, getPlayerStorageValue(cid, sto_iscas)) >= 1 then doPlayerRemoveItem(cid, getPlayerStorageValue(cid, sto_iscas), 1) else setPlayerStorageValue(cid, sto_iscas, -1) endendif getPlayerSex(cid) == 1 thenif getCreatureOutfit(cid).lookType ~= 520 then ---- Outfit necessaria para usar o fishingdoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você precisa estar com a outfit de pesca para pescar.")return falseendelseif getCreatureOutfit(cid).lookType ~= 521 then ---- Outfit necessaria para usar o fishingdoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você precisa estar com a outfit de pesca para pescars.")return falseendendlocal outfit = getCreatureOutfit(cid)local out = getPlayerSex(cid) == 0 and 1467 or 1468doSetCreatureOutfit(cid, {lookType = out, lookHead = outfit.lookHead, lookBody = outfit.lookBody, lookLegs = outfit.lookLegs, lookFeet = outfit.lookFeet}, -1)setPlayerStorageValue(cid, storageP, 1) --alterei looktypedoCreatureSetNoMove(cid, false)local pos2 = getThingPos(itemEx.uid)doCreatureSetLookDir(cid, getLookToFish(getThingPos(cid), pos2)) --alterado ver depoisdoFish(cid, toPos, getThingPos(cid), math.random(5, delay))return trueendfunction getLookToFish(pos, pos2)local x1, y1 = pos.x, pos.ylocal x2, y2 = pos2.x, pos2.yif x1-x2 <= 0 and y1-y2 > 0 then return NORTHelseif x1-x2 < 0 and y1-y2 == 0 then return EASTelseif x1-x2 < 0 and y1-y2 < 0 then return EASTelseif x1-x2 > 0 and y1-y2 < 0 then return SOUTHelseif x1-x2 > 0 and y1-y2 <= 0 then return WESTelseif x1-x2 > 0 and y1-y2 >= 0 then return WESTelseif x1-x2 < 0 and y1-y2 < 0 then return EASTelseif x1-x2 == 0 and y1-y2 < 0 then return SOUTHendreturn WESTend--[[-- resulatados em linha reta(exatos)if x1 == x2 then -- virar para norte if (y1 - y2) > 0 then -- virar para cima return NORTH elseif (y1 - y2) < 0 then -- virar para baixo return SOUTH endelseif y1 == y2 then if (x1 - x2) > 0 then -- virar para OESTE << return WEST elseif (x1 - x2) < 0 then -- virar para LESTE >> return EAST endend-- resulatados em linha reta(exatos)if (x1 ~= x2) or (y1 ~= y2) then if (x1 - x2) < 0 then return EAST -- virar para LESTE >> elseif (x1 - x2) > 0 then return WEST endend]]