Postado Março 7, 2015 10 anos Autor 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? Tipo; "Essa quest já foi feita hoje, retorne depois.", "Essa quest só é feita por um quarteto em level 100." São mensagens "generalizadas"... SCRIPT: (esse já está com as posições editadas) local playerPosition = { {x = 236, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 235, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 234, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 233, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE} } local newPosition = { {x=230, y=294, z=7}, {x=229, y=294, z=7}, {x=228, y=294, z=7}, {x=227, y=294, z=7} } local demonPosition = { {x=230, y=297, z=7}, {x=230, y=291, z=7}, {x=227, y=297, z=7}, {x=227, y=291, z=7}, {x=226, y=294, z=7}, {x=225, y=294, z=7} } 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 = getThingfromPos(playerPosition) if(player.itemid > 0) then if(isPlayer(player.uid) == TRUE) then if(getPlayerStorageValue(player.uid, 9000) <= 0) then if(getPlayerLevel(player.uid) >= 100 or getPlayerAccess(player.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) end for i = 1, 4 do doSendMagicEffect(playerPosition, CONST_ME_POFF) doTeleportThing(player.uid, newPosition, FALSE) doSendMagicEffect(newPosition, CONST_ME_ENERGYAREA) setPlayerStorageValue(player.uid, 9000, 1) end setGlobalStorageValue(9000, os.time(t)) end end else item.new = 1945 end doTransformItem(item.uid, item.new) return TRUE end
Postado Março 7, 2015 10 anos Tenta assim: local playerPosition = { {x = 236, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 235, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 234, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 233, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE} } local newPosition = { {x=230, y=294, z=7}, {x=229, y=294, z=7}, {x=228, y=294, z=7}, {x=227, y=294, z=7} } local demonPosition = { {x=230, y=297, z=7}, {x=230, y=291, z=7}, {x=227, y=297, z=7}, {x=227, y=291, z=7}, {x=226, y=294, z=7}, {x=225, y=294, z=7} } 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 else doPlayerSendTextMessage(cid, 25, "Apenas level 100 ou mais podem fazer esta quest.") else doPlayerSendTextMessage(cid, 25, "Voce ja completou essa quest.") else doPlayerSendTextMessage(cid, 25, "Voce so pode entrar com 4 players.") else doPlayerSendTextMessage(cid, 25, "Voce so pode entrar com 4 players.") else doPlayerSendTextMessage(cid, 25, "A quest ja foi feita, volte mais tarde.") 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 Ajudei? De nada \o/ Att Rusherzin
Postado Março 7, 2015 10 anos Autor Tenta assim: local playerPosition = { {x = 236, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 235, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 234, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 233, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE} } local newPosition = { {x=230, y=294, z=7}, {x=229, y=294, z=7}, {x=228, y=294, z=7}, {x=227, y=294, z=7} } local demonPosition = { {x=230, y=297, z=7}, {x=230, y=291, z=7}, {x=227, y=297, z=7}, {x=227, y=291, z=7}, {x=226, y=294, z=7}, {x=225, y=294, z=7} } 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 else doPlayerSendTextMessage(cid, 25, "Apenas level 100 ou mais podem fazer esta quest.") else doPlayerSendTextMessage(cid, 25, "Voce ja completou essa quest.") else doPlayerSendTextMessage(cid, 25, "Voce so pode entrar com 4 players.") else doPlayerSendTextMessage(cid, 25, "Voce so pode entrar com 4 players.") else doPlayerSendTextMessage(cid, 25, "A quest ja foi feita, volte mais tarde.") 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 Deu erro... mas me diz, as mensagens estão aleatórias? o.O ERRO:
Postado Março 7, 2015 10 anos Ué, tenta assim então: local playerPosition = { {x = 236, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 235, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 234, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 233, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE} } local newPosition = { {x=230, y=294, z=7}, {x=229, y=294, z=7}, {x=228, y=294, z=7}, {x=227, y=294, z=7} } local demonPosition = { {x=230, y=297, z=7}, {x=230, y=291, z=7}, {x=227, y=297, z=7}, {x=227, y=291, z=7}, {x=226, y=294, z=7}, {x=225, y=294, z=7} } 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 else doPlayerSendTextMessage(cid, 25, "Apenas level 100 ou mais podem fazer esta quest.") else doPlayerSendTextMessage(cid, 25, "Voce ja completou essa quest.") else doPlayerSendTextMessage(cid, 25, "Voce so pode entrar com 4 players.") else doPlayerSendTextMessage(cid, 25, "Voce so pode entrar com 4 players.") else doPlayerSendTextMessage(cid, 25, "A quest ja foi feita, volte em 1 hora.") 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 Ajudei? De nada \o/ Att Rusherzin
Postado Março 7, 2015 10 anos Autor Ué, tenta assim então: local playerPosition = { {x = 236, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 235, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 234, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE}, {x = 233, y = 294, z = 7, stackpos = STACKPOS_TOP_CREATURE} } local newPosition = { {x=230, y=294, z=7}, {x=229, y=294, z=7}, {x=228, y=294, z=7}, {x=227, y=294, z=7} } local demonPosition = { {x=230, y=297, z=7}, {x=230, y=291, z=7}, {x=227, y=297, z=7}, {x=227, y=291, z=7}, {x=226, y=294, z=7}, {x=225, y=294, z=7} } 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 else doPlayerSendTextMessage(cid, 25, "Apenas level 100 ou mais podem fazer esta quest.") else doPlayerSendTextMessage(cid, 25, "Voce ja completou essa quest.") else doPlayerSendTextMessage(cid, 25, "Voce so pode entrar com 4 players.") else doPlayerSendTextMessage(cid, 25, "Voce so pode entrar com 4 players.") else doPlayerSendTextMessage(cid, 25, "A quest ja foi feita, volte em 1 hora.") 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 Deu erro...
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.