Olá galera.
Muito tempo sem postar action nova, ai estava vendo a versão Evolutions, que sempre dava um problema naquela "porta secreta" dos Heros em mystic island, então para previnir de erros, fiz essa aqui seria uma versão melhorada sem "BUG", mas feita 100% by me, pois podem perceber que naum tem nada haver com a action original.
-Prontos?!
-- Action By BrunuxX function onUse(cid, item, frompos, item2, topos) -- Posição das Paredes wall1pos = {x=, y=, z=, stackpos=1} wall2pos = {x=, y=, z=, stackpos=1} -- ID da parede idparede = -- UniqueId das Lavancas uniqueid1 = uniqueid2 = -- Não Mexer wall1 = getThingfromPos(wall1pos) wall2 = getThingfromPos(wall2pos) if wall1.itemid >= 1 and wall2.itemid >=1 then if item.itemid == 1945 and item.uid == uniqueid1 then doRemoveItem(wall1.uid,idparede) doRemoveItem(wall2.uid,idparede) doTransformItem(item.uid,item.itemid+1) elseif item.itemid == 1946 and item.uid == uniqueid2 then doRemoveItem(wall1.uid,idparede) doRemoveItem(wall2.uid,idparede) doTransformItem(item.uid,item.itemid-1) elseif item.itemid == 1946 and item.uid == uniqueid1 then doRemoveItem(wall1.uid,idparede) doRemoveItem(wall2.uid,idparede) doTransformItem(item.uid,item.itemid-1) elseif item.itemid == 1945 and item.uid == uniqueid2 then doRemoveItem(wall1.uid,idparede) doRemoveItem(wall2.uid,idparede) doTransformItem(item.uid,item.itemid+1) else return 0 end return 1 end if wall1.itemid == 0 and wall2.itemid == 0 then if item.itemid == 1945 and item.uid == uniqueid1 then doCreateItem(idparede,1,wall1pos) doCreateItem(idparede,1,wall2pos) doTransformItem(item.uid,item.itemid+1) -- Action By BrunuxX elseif item.itemid == 1946 and item.uid == uniqueid2 then doCreateItem(idparede,1,wall1pos) doCreateItem(idparede,1,wall2pos) doTransformItem(item.uid,item.itemid-1) elseif item.itemid == 1946 and item.uid == uniqueid1 then doCreateItem(idparede,1,wall1pos) doCreateItem(idparede,1,wall2pos) doTransformItem(item.uid,item.itemid-1) elseif item.itemid == 1945 and item.uid == uniqueid2 then doCreateItem(idparede,1,wall1pos) doCreateItem(idparede,1,wall2pos) doTransformItem(item.uid,item.itemid+1) else return 0 end return 1 end end
Agora só configurar no começo, coloque as coordenadas corretamente, pois são duas partes de parede para retirar, depois o id da parede que será retirado no caso é igual para as duas.
No Actions.XMl ponha
<action uniqueid="uniqueid da lever 1" script="endereço do script.lua"/> <action uniqueid="uniqueid da lever 2" script="endereço do script.lua"/>
É isso pessoal, comentem deêm críticas e retirem suas dúvidas.
//BrunuxX