Postado Junho 5, 2016 9 anos Bom gente quando eu puxo alavancar com niguem em cima, aparece essa mensagem "Desculpe, não é possível, são necessários quatro jogadores." correto. mas no console aparece esse erro: [Error- Action Interface] data/actions/scripts/alavanca/alavanca anihi.lua:onUse Description: <luaGetThingFromPos> Tile not found e quando esta com os player em seus locais funcionar nomalmente perfeito. Só isso ai que fica aparece na distro e min imcomoda muito. alguem poderia ajuda pq esta dando esse erro. Spoiler function onUse(cid, item, frompos, item2, topos) if getPlayerGroupId(cid) > 2 and getPlayerGroupId(cid) < 5 then return TRUE end if item.itemid == 1945 then player1pos = {x=108, y=527, z=13, stackpos=253} player1 = getThingfromPos(player1pos) player2pos = {x=107, y=527, z=13, stackpos=253} player2 = getThingfromPos(player2pos) player3pos = {x=106, y=527, z=13, stackpos=253} player3 = getThingfromPos(player3pos) player4pos = {x=105, y=527, z=13, stackpos=253} player4 = getThingfromPos(player4pos) if (player1.itemid > 0) and (player2.itemid > 0) and (player3.itemid > 0) and (player4.itemid > 0) then player1level = getPlayerLevel(player1.uid) player2level = getPlayerLevel(player2.uid) player3level = getPlayerLevel(player3.uid) player4level = getPlayerLevel(player4.uid) questlevel = 140 if (player1level >= questlevel) and (player2level >= questlevel) and (player3level >= questlevel) and (player4level >= questlevel) then queststatus1 = getPlayerStorageValue(player1.uid,100) queststatus2 = getPlayerStorageValue(player2.uid,100) queststatus3 = getPlayerStorageValue(player3.uid,100) queststatus4 = getPlayerStorageValue(player4.uid,100) if queststatus1 == -1 and queststatus2 == -1 and queststatus3 == -1 and queststatus4 == -1 then demon1pos = {x=114, y=538, z=14} demon2pos = {x=113, y=538, z=14} demon3pos = {x=112, y=541, z=14} demon4pos = {x=110, y=541, z=14} demon5pos = {x=111, y=535, z=14} demon6pos = {x=109, y=535, z=14} doSummonCreature("Anihilator Minion", demon1pos) doSummonCreature("Anihilator Minion", demon2pos) doSummonCreature("Anihilator Minion", demon3pos) doSummonCreature("Anihilator Minion", demon4pos) doSummonCreature("Anihilator Minion", demon5pos) doSummonCreature("Anihilator Minion", demon6pos) nplayer1pos = {x=112, y=538, z=14} nplayer2pos = {x=111, y=538, z=14} nplayer3pos = {x=110, y=538, z=14} nplayer4pos = {x=109, y=538, z=14} doSendMagicEffect(player1pos,2) doSendMagicEffect(player2pos,2) doSendMagicEffect(player3pos,2) doSendMagicEffect(player4pos,2) doTeleportThing(player1.uid,nplayer1pos) doTeleportThing(player2.uid,nplayer2pos) doTeleportThing(player3.uid,nplayer3pos) doTeleportThing(player4.uid,nplayer4pos) doSendMagicEffect(nplayer1pos,10) doSendMagicEffect(nplayer2pos,10) doSendMagicEffect(nplayer3pos,10) doSendMagicEffect(nplayer4pos,10) doTransformItem(item.uid,1945) else doPlayerSendCancel(cid,"Desculpe, não é possível, alguém no time já completou a quest.") end else doPlayerSendCancel(cid,"Desculpe, não é possível, todos os jogadores no time devem ser level 140 ou maior.") end else doPlayerSendCancel(cid,"Desculpe, não é possível, são necessários quatro jogadores.") end -- Codigo de checagem e teleporte dos monstros if item.itemid == 1945 then starting={x=149, y=226, z=15, stackpos=253} checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos} ending={x=154, y=231, z=15, stackpos=253} players=0 totalmonsters=0 monster = {} repeat creature= getThingfromPos(checking) if creature.itemid > 0 then if getPlayerAccess(creature.uid) == 0 then players=players+1 end if (getPlayerAccess(creature.uid) ~= 0) and (getPlayerAccess(creature.uid) ~= 3) then totalmonsters = totalmonsters+1 monster[totalmonsters]=creature.uid end end checking.x=checking.x+1 if checking.x>ending.x then checking.x=starting.x checking.y=checking.y+1 end until checking.y>ending.y if players == 0 then trash = {x=155, y=189, z=15} current = 0 repeat current = current+1 if totalmonsters > 0 then doTeleportThing(monster[current],trash) end until current >= totalmonsters doTransformItem(item.uid,1946) end -- Codigo de checagem e teleporte dos monstros doTransformItem(item.uid,1946) end else doTransformItem(item.uid,1945) end return TRUE end Uso tfs 0.4,8.60.
Postado Junho 5, 2016 9 anos Solução local t = { lvl = 100, entrada = { {x = 710, y = 1420, z = 5}, -- pos players {x = 709, y = 1420, z = 5}, {x = 708, y = 1420, z = 5}, {x = 707, y = 1420, z = 5} }, saida = { {x = 710, y = 1420, z = 6}, -- pos para onde eles irão {x = 709, y = 1420, z = 6}, {x = 708, y = 1420, z = 6}, {x = 707, y = 1420, z = 6} }, monstros = { {{x = 707, y = 1418, z = 6}, "Demon"}, -- defina pos dos montros e nomes {{x = 709, y = 1418, z = 6}, "Demon"}, {{x = 708, y = 1422, z = 6}, "Demon"}, {{x = 710, y = 1422, z = 6}, "Demon"}, {{x = 712, y = 1420, z = 6}, "Hellfire Fighter"}, {{x = 713, y = 1420, z = 6}, "Hellfire Fighter"}, {{x = 711, y = 1420, z = 6}, "Ghazbaran"} } } function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} for _, k in ipairs(t.entrada) do local x = getTopCreature(k).uid if(x == 0 or not isPlayer(x) or getPlayerLevel(x) < t.lvl) then doPlayerSendCancel(cid, 'Está faltando player ou alguém não possui level '..t.lvl..' ou mais.') return true end table.insert(check, x) end for _, summon in pairs(t.monstros) do local creature = getTopCreature(summon[1]).uid if(creature > 0 and not isPlayer(creature)) then doRemoveCreature(creature) end doCleanTile(summon[1]) doCreateMonster(summon[2], summon[1]) end for i, tid in ipairs(check) do doSendMagicEffect(t.entrada[i], CONST_ME_POFF) doTeleportThing(tid, t.saida[i], false) doSendMagicEffect(t.saida[i], CONST_ME_ENERGYAREA) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
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.