Postado Março 7, 2015 10 anos local playerPosition = { {x = 500, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE}, {x = 499, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE}, {x = 498, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE}, {x = 497, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE} } local newPosition = { {x=500, y=755, z=10}, {x=499, y=755, z=10}, {x=498, y=755, z=10}, {x=497, y=755, z=10} } local demonPosition = { {x=498, y=753, z=10}, {x=500, y=753, z=10}, {x=499, y=757, z=10}, {x=497, y=757, z=10}, {x=502, y=755, z=10}, {x=501, y=755, z=10} } function onUse(cid, item, fromPosition, itemEx, toPosition) local player = {0, 0, 0, 0} local failed = TRUE local count = 0 item.new = 1946 if(item.itemid == 1945) then if(os.time(t) >= (getGlobalStorageValue(9000) + 3600)) then for i = 1, 4 do player[i] = getThingfromPos(playerPosition[i]) if(player[i].itemid > 0) then if(isPlayer(player[i].uid) == TRUE) then if(getPlayerStorageValue(player[i].uid, 9000) <= 0) then if(getPlayerLevel(player[i].uid) >= 100 or getPlayerAccess(player[i].uid) >= 3) then failed = FALSE count = count + 1 end end end end if(failed == TRUE) then doTransformItem(item.uid, 1946) return TRUE end end if(count == 4) then for i = 1, 6 do doSummonCreature("Demon", demonPosition[i]) end for i = 1, 4 do doSendMagicEffect(playerPosition[i], CONST_ME_POFF) doTeleportThing(player[i].uid, newPosition[i], FALSE) doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA) setPlayerStorageValue(player[i].uid, 9000, 1) end setGlobalStorageValue(9000, os.time(t)) end end else item.new = 1945 end doTransformItem(item.uid, item.new) return TRUE end Coloca actionid 9000 na alavanca e configura as posições no script.. Ajudei? De nada \o/ Att Rusherzin
Postado Março 7, 2015 10 anos Autor local playerPosition = { {x = 500, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE}, {x = 499, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE}, {x = 498, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE}, {x = 497, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE} } local newPosition = { {x=500, y=755, z=10}, {x=499, y=755, z=10}, {x=498, y=755, z=10}, {x=497, y=755, z=10} } local demonPosition = { {x=498, y=753, z=10}, {x=500, y=753, z=10}, {x=499, y=757, z=10}, {x=497, y=757, z=10}, {x=502, y=755, z=10}, {x=501, y=755, z=10} } function onUse(cid, item, fromPosition, itemEx, toPosition) local player = {0, 0, 0, 0} local failed = TRUE local count = 0 item.new = 1946 if(item.itemid == 1945) then if(os.time(t) >= (getGlobalStorageValue(9000) + 3600)) then for i = 1, 4 do player[i] = getThingfromPos(playerPosition[i]) if(player[i].itemid > 0) then if(isPlayer(player[i].uid) == TRUE) then if(getPlayerStorageValue(player[i].uid, 9000) <= 0) then if(getPlayerLevel(player[i].uid) >= 100 or getPlayerAccess(player[i].uid) >= 3) then failed = FALSE count = count + 1 end end end end if(failed == TRUE) then doTransformItem(item.uid, 1946) return TRUE end end if(count == 4) then for i = 1, 6 do doSummonCreature("Demon", demonPosition[i]) end for i = 1, 4 do doSendMagicEffect(playerPosition[i], CONST_ME_POFF) doTeleportThing(player[i].uid, newPosition[i], FALSE) doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA) setPlayerStorageValue(player[i].uid, 9000, 1) end setGlobalStorageValue(9000, os.time(t)) end end else item.new = 1945 end doTransformItem(item.uid, item.new) return TRUE end Coloca actionid 9000 na alavanca e configura as posições no script.. Funcionou, porém tentei fazer novamente e não foi... sabe me dizer quais são as restrições e verificações do script? Não tem nenhuma mensagem ou aviso também... haveria possibilidade de adicioná-las? Editado Março 7, 2015 10 anos por ScythePhantom (veja o histórico de edições)
Postado Março 7, 2015 10 anos Ela só pode ser feita uma vez no dia, eu creio.. tenta assim: local playerPosition = { {x = 500, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE}, {x = 499, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE}, {x = 498, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE}, {x = 497, y = 755, z = 9, stackpos = STACKPOS_TOP_CREATURE} } local newPosition = { {x=500, y=755, z=10}, {x=499, y=755, z=10}, {x=498, y=755, z=10}, {x=497, y=755, z=10} } local demonPosition = { {x=498, y=753, z=10}, {x=500, y=753, z=10}, {x=499, y=757, z=10}, {x=497, y=757, z=10}, {x=502, y=755, z=10}, {x=501, y=755, z=10} } function onUse(cid, item, fromPosition, itemEx, toPosition) local player = {0, 0, 0, 0} local failed = TRUE local count = 0 item.new = 1946 if(item.itemid == 1945) then if(os.time(t) >= (getGlobalStorageValue(9000) + 3600)) then for i = 1, 4 do player[i] = getThingfromPos(playerPosition[i]) if(player[i].itemid > 0) then if(isPlayer(player[i].uid) == TRUE) then if(getPlayerStorageValue(player[i].uid, 9000) <= 0) then if(getPlayerLevel(player[i].uid) >= 100 or getPlayerAccess(player[i].uid) >= 3) then failed = FALSE count = count + 1 end end end end if(failed == TRUE) then doTransformItem(item.uid, 1946) return TRUE end end if(count == 4) then for i = 1, 6 do doSummonCreature("Demon", demonPosition[i]) end for i = 1, 4 do doSendMagicEffect(playerPosition[i], CONST_ME_POFF) doTeleportThing(player[i].uid, newPosition[i], FALSE) doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA) setPlayerStorageValue(player[i].uid, 9000, 1) end end end else item.new = 1945 end doTransformItem(item.uid, item.new) return TRUE end Quais mensagens queres adicionar? E em qual situação? Editado Março 7, 2015 10 anos por Rusherzin (veja o histórico de edições) Ajudei? De nada \o/ Att Rusherzin
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.