Postado Julho 23, 2021 3 anos Alguém poderia me ajudar a remover essas checagem de vocation e item? Qual o motivo deste tópico? Remover checagem de vocation e checagem de item Está surgindo algum erro? Se sim coloque-o aqui. Não Você tem o código disponível? Se tiver publique-o aqui: local lvl = 1 local stor_time = 68741 local hours = 24 local t = { {vocations = {1, 1},Pos = {{x=906, y=625, z=5},{x=917, y=586, z=7}},item= {9020,{x=907, y=623, z=5}}}, -- TANK OR DRUNK {vocations = {1, 1},Pos = {{x=907, y=625, z=5},{x=916, y=587, z=7}},item= {9020,{x=907, y=623, z=5}}}, -- TANK OR DRUNK {vocations = {1, 1},Pos = {{x=908, y=624, z=5},{x=915, y=588, z=7}},item= {9020,{x=907, y=623, z=5}}}, -- TANK OR DRUNK {vocations = {1, 1},Pos = {{x=908, y=623, z=5},{x=915, y=576, z=7}},item= {9020,{x=907, y=623, z=5}}}, -- TANK OR DRUNK {vocations = {1, 1},Pos = {{x=907, y=622, z=5},{x=914, y=575, z=7}},item= {9020,{x=907, y=623, z=5}}}, -- TANK OR DRUNK {vocations = {1, 1},Pos = {{x=906, y=622, z=5},{x=913, y=574, z=7}},item= {9020,{x=907, y=623, z=5}}} -- TANK OR DRUNK } function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} local items = {} for _, k in ipairs(t) do local x = getTopCreature(k.Pos[1]).uid local v = getTileItemById(k.item[2], k.item[1]) if x == 0 or not isPlayer(x) or getPlayerLevel(x) < lvl or isInArray(k.vocations, getPlayerVocation(x)) == FALSE or getPlayerStorageValue(x, stor_time) - os.time() > 0 then doPlayerSendCancel(cid, 'Está faltando player, alguém não possui level '..lvl..' , não está transformado no maximo ou você já fez a quest em menos de 24 horas.') return true elseif v.uid == 0 then doPlayerSendCancel(cid, "Todos os itens precisão estar na posição.") return true end table.insert(check, x) table.insert(items, v) end for k, tid in ipairs(check) do doSendMagicEffect(getCreaturePosition(tid), CONST_ME_POFF) if tid ~= sort then doTeleportThing(tid, t[k].Pos[2]) end doSendMagicEffect(getCreaturePosition(tid), CONST_ME_TELEPORT) setPlayerStorageValue(tid, stor_time, os.time()+hours*1440) end for _, remove in ipairs(items) do doRemoveItem(remove.uid) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
Postado Julho 24, 2021 3 anos tenta ai local lvl = 1 local stor_time = 68741 local hours = 24 local t = { {Pos = {{x=906, y=625, z=5},{x=917, y=586, z=7}}}, -- TANK OR DRUNK {Pos = {{x=907, y=625, z=5},{x=916, y=587, z=7}}}, -- TANK OR DRUNK {Pos = {{x=908, y=624, z=5},{x=915, y=588, z=7}}}, -- TANK OR DRUNK {Pos = {{x=908, y=623, z=5},{x=915, y=576, z=7}}}, -- TANK OR DRUNK {Pos = {{x=907, y=622, z=5},{x=914, y=575, z=7}}}, -- TANK OR DRUNK {Pos = {{x=906, y=622, z=5},{x=913, y=574, z=7}}} -- TANK OR DRUNK } function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} for _, k in ipairs(t) do local x = getTopCreature(k.Pos[1]).uid if x == 0 or not isPlayer(x) or getPlayerLevel(x) < lvl or getPlayerStorageValue(x, stor_time) - os.time() > 0 then doPlayerSendCancel(cid, 'Está faltando player, alguém não possui level '..lvl..' , não está transformado no maximo ou você já fez a quest em menos de 24 horas.') return true return true end table.insert(check, x) end for k, tid in ipairs(check) do doSendMagicEffect(getCreaturePosition(tid), CONST_ME_POFF) if tid ~= sort then doTeleportThing(tid, t[k].Pos[2]) end doSendMagicEffect(getCreaturePosition(tid), CONST_ME_TELEPORT) setPlayerStorageValue(tid, stor_time, os.time()+hours*1440) end return true end
Postado Julho 24, 2021 3 anos Autor 1 hora atrás, So volto tarde disse: tenta ai local lvl = 1 local stor_time = 68741 local hours = 24 local t = { {Pos = {{x=906, y=625, z=5},{x=917, y=586, z=7}}}, -- TANK OR DRUNK {Pos = {{x=907, y=625, z=5},{x=916, y=587, z=7}}}, -- TANK OR DRUNK {Pos = {{x=908, y=624, z=5},{x=915, y=588, z=7}}}, -- TANK OR DRUNK {Pos = {{x=908, y=623, z=5},{x=915, y=576, z=7}}}, -- TANK OR DRUNK {Pos = {{x=907, y=622, z=5},{x=914, y=575, z=7}}}, -- TANK OR DRUNK {Pos = {{x=906, y=622, z=5},{x=913, y=574, z=7}}} -- TANK OR DRUNK } function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} for _, k in ipairs(t) do local x = getTopCreature(k.Pos[1]).uid if x == 0 or not isPlayer(x) or getPlayerLevel(x) < lvl or getPlayerStorageValue(x, stor_time) - os.time() > 0 then doPlayerSendCancel(cid, 'Está faltando player, alguém não possui level '..lvl..' , não está transformado no maximo ou você já fez a quest em menos de 24 horas.') return true return true end table.insert(check, x) end for k, tid in ipairs(check) do doSendMagicEffect(getCreaturePosition(tid), CONST_ME_POFF) if tid ~= sort then doTeleportThing(tid, t[k].Pos[2]) end doSendMagicEffect(getCreaturePosition(tid), CONST_ME_TELEPORT) setPlayerStorageValue(tid, stor_time, os.time()+hours*1440) end return true end https://prnt.sc/1f1jrl4 deu esse erro na distro
Postado Julho 24, 2021 3 anos Solução 13 horas atrás, Breniinx disse: https://prnt.sc/1f1jrl4 deu esse erro na distro local lvl = 1 local stor_time = 68741 local hours = 24 local t = { {Pos = {{x=906, y=625, z=5},{x=917, y=586, z=7}}}, -- TANK OR DRUNK {Pos = {{x=907, y=625, z=5},{x=916, y=587, z=7}}}, -- TANK OR DRUNK {Pos = {{x=908, y=624, z=5},{x=915, y=588, z=7}}}, -- TANK OR DRUNK {Pos = {{x=908, y=623, z=5},{x=915, y=576, z=7}}}, -- TANK OR DRUNK {Pos = {{x=907, y=622, z=5},{x=914, y=575, z=7}}}, -- TANK OR DRUNK {Pos = {{x=906, y=622, z=5},{x=913, y=574, z=7}}} -- TANK OR DRUNK } function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} for _, k in ipairs(t) do local x = getTopCreature(k.Pos[1]).uid if x == 0 or not isPlayer(x) or getPlayerLevel(x) < lvl or getPlayerStorageValue(x, stor_time) - os.time() > 0 then doPlayerSendCancel(cid, 'Está faltando player, alguém não possui level '..lvl..' , não está transformado no maximo ou você já fez a quest em menos de 24 horas.') return true end table.insert(check, x) end for k, tid in ipairs(check) do doSendMagicEffect(getCreaturePosition(tid), CONST_ME_POFF) if tid ~= sort then doTeleportThing(tid, t[k].Pos[2]) end doSendMagicEffect(getCreaturePosition(tid), CONST_ME_TELEPORT) setPlayerStorageValue(tid, stor_time, os.time()+hours*1440) end return true end
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.