Postado Maio 29, 2015 10 anos Como posso utilizar um addevent para remover certa storage sem ta erro quanto nao tem o summon pokemon? ate fiz essa funçao pra ver mais sempre ta o erro (luaDoCreatureSetStorage) Creature not found function doResetStorageValue(cid, time, storage, value) if not isCreature(cid) then return true end addEvent(setPlayerStorageValue, time, cid, storage, value) end obs tb usei assim e deu erro function doResetStorageValue(cid, time, storage, value) if isCreature(cid) then addEvent(setPlayerStorageValue, time, cid, storage, value) end end Editado Maio 29, 2015 10 anos por nociam (veja o histórico de edições)
Postado Maio 29, 2015 10 anos function doResetStorageValue(cid, time, storage, value) if isCreature(cid) then return false end return addEvent(function() setPlayerStorageValue(cid, value, storage) end ,time) end Manda o script inteiro, se não der... Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado). Tópicos: [FAQ] BBCODE [LIB] Constant [RME] Administrando bordas. [TALK] Broadcast Editável. [TALK] Sugest. [TALK] Checkpoint. [MOVE] Pântano pegajoso. [ACTION] Piggy Bank. (Cassino). [GLOBAL] Uptime Ad. [C0DE] Consertando 'Invalid Password' [PROGRAM] Quest Maker
Postado Maio 29, 2015 10 anos Autor resolvido por base na sua. function doResetStorageValue(cid) if isCreature(cid) then setPlayerStorageValue(cid, 4440929, 1) addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 4440929, -1) end end, 2000) end end Editado Maio 29, 2015 10 anos por nociam (veja o histórico de edições)
Postado Maio 29, 2015 10 anos pq não usa storage + os.time()? [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Maio 29, 2015 10 anos Tenta. function doResetStorageValue(cid, time, storage, value) if isCreature(cid) then return addEvent(function() setPlayerStorageValue(cid, value, storage) end, time) end end local signal = {[NORTH] = {0, -1}, [SOUTH] = {0, 1}, [EAST] = {1, 0}, [WEST] = {-1, 0}} local d = isCreature(target) and getCreatureDirectionToTarget(cid, target) or getCreatureLookDir(cid) local p = getThingPosWithDebug(cid) local t = {} for b = 1, 6 do local pos = getThingPositionWithDebug(cid) pos.x = pos.x + signal[d][1] * b pos.y = pos.y + signal[d][2] * b if canWalkOnPos(pos, false, true, true, true, false) and isSightClear(getThingPositionWithDebug(cid), pos, false) then table.insert(t, pos) end end if #t <= 0 then return true end function doAquaJet(cid, area, areaEff, eff, pos, a) if not isCreature(cid) then return true end if not pos then return true end doAreaCombatHealth(cid, WATERDAMAGE, areaEff, 0, 0, 0, eff) doAreaCombatHealth(cid, WATERDAMAGE, area, whirl3, -min, -max, 0) doTeleportThing(cid, pos, true) -- if a == 6 then // essa opçao pra tirar a storage eu eliminei porque se o pokemon parar antes de terminar o for a storage tb nao sae -- setPlayerStorageValue(cid, 4440929, -1) --end ) end for a = 0, 6 do local AquaJet = { [0] = {675, {x=p.x, y=p.y-(a+0), z=p.z}, {x=p.x+1, y=p.y-(a-2), z=p.z}}, --pra cima [1] = {673, {x=p.x+(a+0), y=p.y, z=p.z}, {x=p.x+(a+0), y=p.y+1, z=p.z}}, --direito [2] = {674, {x=p.x, y=p.y+(a+0), z=p.z}, {x=p.x+1, y=p.y+(a+0), z=p.z}}, --baixo [3] = {676, {x=p.x-(a+0), y=p.y, z=p.z}, {x=p.x-(a-2), y=p.y+1, z=p.z}} --esquerdo } addEvent(doAquaJet, 310*a, cid, AquaJet[d][2], AquaJet[d][3], AquaJet[d][1], t[a], a) end doResetStorageValue(cid, 2000, 4440929, -1) setPlayerStorageValue(cid, 4440929, 1) addEvent(doDisapear, 180, cid) addEvent(doAppear, 1950, cid, 0) _ .-'` `} _./) / } .'o \ | } '.___.'`.\ {` /`\_/ , `. } ME DA UMA NOZ! \=' .-' _`\ { `'`;/ `, } _\ @ ; } /__`;-...'--' Cluck!
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.