Postado Novembro 18, 2012 12 anos Eu quero um script em que apareça tiles de swamp no local indicado na imagem e depois de 10 segundos os tiles de swamp sumam e apareçam tiles de terra id 354. Esse primeiro script criava apenas bordas do swamp e no meio aparecia terra (id 354), quando deveria aparecer tiles de swamp e apenas depois de 10 segundos serem removidos e substituídos por tiles de terra. function wall()[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]local wallTab = { {4693, {x = 710, y = 544, z = 7}}, {4714, {x = 710, y = 543, z = 7}}, {4714, {x = 709, y = 544, z = 7}}, {4714, {x = 710, y = 542, z = 7}}, {4693, {x = 710, y = 543, z = 7}}, {4719, {x = 712, y = 542, z = 7}}, {4716, {x = 712, y = 541, z = 7}}, {4693, {x = 710, y = 542, z = 7}}, {4693, {x = 711, y = 544, z = 7}}, {4693, {x = 711, y = 543, z = 7}}, {4693, {x = 711, y = 542, z = 7}}, {4693, {x = 711, y = 541, z = 7}}, {4693, {x = 710, y = 541, z = 7}}, {4693, {x = 709, y = 542, z = 7}}, {4713, {x = 709, y = 543, z = 7}}, {4716, {x = 712, y = 541, z = 7}}, {4716, {x = 712, y = 542, z = 7}}, {4719, {x = 712, y = 540, z = 7}}, {4718, {x = 708, y = 543, z = 7}} }[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]for i = 1, #wallTab do if getTileItemById(wallTab[i][2], wallTab[i][1]).uid > 0 then doRemoveItem(getTileItemById(wallTab[i][2], wallTab[i][1]).uid) doCreateItem(354, 1, wallTab[i][2]) else doCreateItem(wallTab[i][1], 1, wallTab[i][2]) doCreateItem(354, 1, wallTab[i][2]) end end end[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]function onUse(cid, item, fromPosition, itemEx, toPosition)[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]if getGlobalStorageValue(8273) > 0 then doPlayerSendTextMessage(cid, 27, "Já estão usando a armadilha.") return true end[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]if getPlayerStorageValue(cid, 8274) > 0 then doPlayerSendCancel(cid, "Você já ativou uma vez.") return true end[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]if item.uid == 1509 and itemEx.uid == 1510 then wall() addEvent(wall, 10 * 1000) doPlayerSendTextMessage(cid, 27, "Armadilha ativa.") setPlayerStorageValue(cid, 8274, 1) doSendMagicEffect(toPosition, 14) setGlobalStorageValue(8273, 1) addEvent(setGlobalStorageValue, 10 * 1000, 8273, 0) end return true end[/font][/color] [color=#282828][font=helvetica, arial, sans-serif] Ai depois tentei com esse script. Ele cria os tiles de swamp certinho, mas depois de 10 segundos apenas as bordas do swamp desaparecem e não é criado terra por cima dos tiles de swamp. function terra()[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]local terraTab = { {354, {x = 710, y = 544, z = 7}}, {354, {x = 710, y = 543, z = 7}}, {354, {x = 709, y = 544, z = 7}}, {354, {x = 710, y = 542, z = 7}}, {354, {x = 710, y = 543, z = 7}}, {354, {x = 712, y = 542, z = 7}}, {354, {x = 712, y = 541, z = 7}}, {354, {x = 710, y = 542, z = 7}}, {354, {x = 711, y = 544, z = 7}}, {354, {x = 711, y = 543, z = 7}}, {354, {x = 711, y = 542, z = 7}}, {354, {x = 711, y = 541, z = 7}}, {354, {x = 710, y = 541, z = 7}}, {354, {x = 709, y = 542, z = 7}}, {354, {x = 709, y = 543, z = 7}}, {354, {x = 712, y = 541, z = 7}}, {354, {x = 712, y = 542, z = 7}}, {354, {x = 712, y = 540, z = 7}}, {354, {x = 708, y = 543, z = 7}} }[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]for w = 1, #terraTab do addEvent(doCreateItem, 10 * 1000, terraTab[w][1], 1, terraTab[w][2]) end end[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]function wall()[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]local wallTab = { {4693, {x = 710, y = 544, z = 7}}, {4714, {x = 710, y = 543, z = 7}}, {4714, {x = 709, y = 544, z = 7}}, {4714, {x = 710, y = 542, z = 7}}, {4693, {x = 710, y = 543, z = 7}}, {4719, {x = 712, y = 542, z = 7}}, {4716, {x = 712, y = 541, z = 7}}, {4693, {x = 710, y = 542, z = 7}}, {4693, {x = 711, y = 544, z = 7}}, {4693, {x = 711, y = 543, z = 7}}, {4693, {x = 711, y = 542, z = 7}}, {4693, {x = 711, y = 541, z = 7}}, {4693, {x = 710, y = 541, z = 7}}, {4693, {x = 709, y = 542, z = 7}}, {4713, {x = 709, y = 543, z = 7}}, {4716, {x = 712, y = 541, z = 7}}, {4716, {x = 712, y = 542, z = 7}}, {4719, {x = 712, y = 540, z = 7}}, {4718, {x = 708, y = 543, z = 7}} }[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]for i = 1, #wallTab do if getTileItemById(wallTab[i][2], wallTab[i][1]).uid > 0 then doRemoveItem(getTileItemById(wallTab[i][2], wallTab[i][1]).uid) else doCreateItem(wallTab[i][1], 1, wallTab[i][2]) end end end[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]function onUse(cid, item, fromPosition, itemEx, toPosition)[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]if getGlobalStorageValue(8273) > 0 then doPlayerSendTextMessage(cid, 27, "Já estão usando a armadilha.") return true end[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]if getPlayerStorageValue(cid, 8274) > 0 then doPlayerSendCancel(cid, "Você já ativou uma vez.") return true end[/font][/color] [color=#282828][font=helvetica, arial, sans-serif]if item.uid == 1509 and itemEx.uid == 1510 then wall() terra() addEvent(wall, 10 * 1000) doPlayerSendTextMessage(cid, 27, "Armadilha ativa.") setPlayerStorageValue(cid, 8274, 1) doSendMagicEffect(toPosition, 14) setGlobalStorageValue(8273, 1) addEvent(setGlobalStorageValue, 10 * 1000, 8273, 0) end return true end Se alguém conseguir me ajudar a consertar esse script, dou REP.
Postado Novembro 18, 2012 12 anos Está faltando o stackpos para remover as bordas , no caso seria stackpos 1 exeplo de como ficaria na pos pos = {x=321, y=123, z=5, stackpos = 1}
Postado Novembro 18, 2012 12 anos Autor não to conseguindo, to usando esse script function terra() local terraTab = { {354, {x = 710, y = 544, z = 7, stackpos = 1}}, {354, {x = 710, y = 543, z = 7, stackpos = 1}}, {354, {x = 709, y = 544, z = 7, stackpos = 1}}, {354, {x = 710, y = 542, z = 7, stackpos = 1}}, {354, {x = 710, y = 543, z = 7, stackpos = 1}}, {354, {x = 712, y = 542, z = 7, stackpos = 1}}, {354, {x = 712, y = 541, z = 7, stackpos = 1}}, {354, {x = 710, y = 542, z = 7, stackpos = 1}}, {354, {x = 711, y = 544, z = 7, stackpos = 1}}, {354, {x = 711, y = 543, z = 7, stackpos = 1}}, {354, {x = 711, y = 542, z = 7, stackpos = 1}}, {354, {x = 711, y = 541, z = 7, stackpos = 1}}, {354, {x = 710, y = 541, z = 7, stackpos = 1}}, {354, {x = 709, y = 542, z = 7, stackpos = 1}}, {354, {x = 709, y = 543, z = 7, stackpos = 1}}, {354, {x = 712, y = 541, z = 7, stackpos = 1}}, {354, {x = 712, y = 542, z = 7, stackpos = 1}}, {354, {x = 712, y = 540, z = 7, stackpos = 1}}, {354, {x = 708, y = 543, z = 7, stackpos = 1}} } for w = 1, #terraTab do addEvent(doCreateItem, 10 * 1000, terraTab[w][1], 1, terraTab[w][2]) end end function wall() local wallTab = { {4693, {x = 710, y = 544, z = 7, stackpos = 1}}, {4714, {x = 710, y = 543, z = 7, stackpos = 1}}, {4714, {x = 709, y = 544, z = 7, stackpos = 1}}, {4714, {x = 710, y = 542, z = 7, stackpos = 1}}, {4693, {x = 710, y = 543, z = 7, stackpos = 1}}, {4719, {x = 712, y = 542, z = 7, stackpos = 1}}, {4716, {x = 712, y = 541, z = 7, stackpos = 1}}, {4693, {x = 710, y = 542, z = 7, stackpos = 1}}, {4693, {x = 711, y = 544, z = 7, stackpos = 1}}, {4693, {x = 711, y = 543, z = 7, stackpos = 1}}, {4693, {x = 711, y = 542, z = 7, stackpos = 1}}, {4693, {x = 711, y = 541, z = 7, stackpos = 1}}, {4693, {x = 710, y = 541, z = 7, stackpos = 1}}, {4693, {x = 709, y = 542, z = 7, stackpos = 1}}, {4713, {x = 709, y = 543, z = 7, stackpos = 1}}, {4716, {x = 712, y = 541, z = 7, stackpos = 1}}, {4716, {x = 712, y = 542, z = 7, stackpos = 1}}, {4719, {x = 712, y = 540, z = 7, stackpos = 1}}, {4718, {x = 708, y = 543, z = 7, stackpos = 1}} } for i = 1, #wallTab do if getTileItemById(wallTab[i][2], wallTab[i][1]).uid > 0 then doRemoveItem(getTileItemById(wallTab[i][2], wallTab[i][1]).uid) else doCreateItem(wallTab[i][1], 1, wallTab[i][2]) end end end function onUse(cid, item, fromPosition, itemEx, toPosition) if getGlobalStorageValue(8273) > 0 then doPlayerSendTextMessage(cid, 27, "Já estão usando a armadilha.") return true end if getPlayerStorageValue(cid, 8274) > 0 then doPlayerSendCancel(cid, "Você já ativou uma vez.") return true end if item.uid == 1509 and itemEx.uid == 1510 then wall() terra() addEvent(wall, 10 * 1000) doPlayerSendTextMessage(cid, 27, "Armadilha ativa.") setPlayerStorageValue(cid, 8274, 1) doSendMagicEffect(toPosition, 14) setGlobalStorageValue(8273, 1) addEvent(setGlobalStorageValue, 10 * 1000, 8273, 0) end return true end Só que o swamp não ta sumindo, só as bordas, tinha que vir terra por cima do swamp. Tem como vc editar pra mim? Editado Novembro 18, 2012 12 anos por NewAge (veja o histórico de edições)
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.