SCRIPT`PARA LOS TAPESTRIES GIREN
:: Programación :: Scripts
Página 1 de 1.
SCRIPT`PARA LOS TAPESTRIES GIREN
primero hacemos un nuevo documento en data/action/script y le pones como nombre tapestry
Código:
--Tapetries by Zapatron and leandro_benedetti_--
function onUse(cid, item, frompos, item2, topos)
cortina1 = {x=topos.x-1, y=topos.y, z=topos.z}
cortina2 = {x=topos.x+1, y=topos.y-1, z=topos.z}
cortina3 = {x=topos.x, y=topos.y+1, z=topos.z}
if item.itemid == 1857 or item.itemid == 1860 or item.itemid == 1863 or item.itemid == 1866 or item.itemid == 1869 or item.itemid == 1872 then
doRemoveItem(item.uid,1)
doCreateItem(item.itemid-1,1,cortina1)
return 1
elseif item.itemid == 1856 or item.itemid == 1859 or item.itemid == 1862 or item.itemid == 1865 or item.itemid == 1868 or item.itemid == 1871 then
doRemoveItem(item.uid,1)
doCreateItem(item.itemid-1,1,cortina2)
return 1
elseif item.itemid == 1855 or item.itemid == 1858 or item.itemid == 1861 or item.itemid == 1864 or item.itemid == 1867 or item.itemid == 1870 then
doRemoveItem(item.uid,1)
doCreateItem(item.itemid+2,1,cortina3)
return 1
end
end
Luego vamos a data/action/actions.xml le damos en editar y le agregamos esto
Código:
<!-- tapetries -->
<action itemid="1855" script="tapestry.lua" />
<action itemid="1856" script="tapestry.lua" />
<action itemid="1857" script="tapestry.lua" />
<action itemid="1858" script="tapestry.lua" />
<action itemid="1859" script="tapestry.lua" />
<action itemid="1860" script="tapestry.lua" />
<action itemid="1861" script="tapestry.lua" />
<action itemid="1862" script="tapestry.lua" />
<action itemid="1863" script="tapestry.lua" />
<action itemid="1864" script="tapestry.lua" />
<action itemid="1865" script="tapestry.lua" />
<action itemid="1866" script="tapestry.lua" />
<action itemid="1867" script="tapestry.lua" />
<action itemid="1868" script="tapestry.lua" />
<action itemid="1869" script="tapestry.lua" />
<action itemid="1870" script="tapestry.lua" />
<action itemid="1871" script="tapestry.lua" />
<action itemid="1872" script="tapestry.lua" />
<action itemid="1878" script="tapestry.lua" />
<action itemid="1879" script="tapestry.lua" />
<action itemid="1880" script="tapestry.lua" />
<!-- /tapetries -->
Código:
--Tapetries by Zapatron and leandro_benedetti_--
function onUse(cid, item, frompos, item2, topos)
cortina1 = {x=topos.x-1, y=topos.y, z=topos.z}
cortina2 = {x=topos.x+1, y=topos.y-1, z=topos.z}
cortina3 = {x=topos.x, y=topos.y+1, z=topos.z}
if item.itemid == 1857 or item.itemid == 1860 or item.itemid == 1863 or item.itemid == 1866 or item.itemid == 1869 or item.itemid == 1872 then
doRemoveItem(item.uid,1)
doCreateItem(item.itemid-1,1,cortina1)
return 1
elseif item.itemid == 1856 or item.itemid == 1859 or item.itemid == 1862 or item.itemid == 1865 or item.itemid == 1868 or item.itemid == 1871 then
doRemoveItem(item.uid,1)
doCreateItem(item.itemid-1,1,cortina2)
return 1
elseif item.itemid == 1855 or item.itemid == 1858 or item.itemid == 1861 or item.itemid == 1864 or item.itemid == 1867 or item.itemid == 1870 then
doRemoveItem(item.uid,1)
doCreateItem(item.itemid+2,1,cortina3)
return 1
end
end
Luego vamos a data/action/actions.xml le damos en editar y le agregamos esto
Código:
<!-- tapetries -->
<action itemid="1855" script="tapestry.lua" />
<action itemid="1856" script="tapestry.lua" />
<action itemid="1857" script="tapestry.lua" />
<action itemid="1858" script="tapestry.lua" />
<action itemid="1859" script="tapestry.lua" />
<action itemid="1860" script="tapestry.lua" />
<action itemid="1861" script="tapestry.lua" />
<action itemid="1862" script="tapestry.lua" />
<action itemid="1863" script="tapestry.lua" />
<action itemid="1864" script="tapestry.lua" />
<action itemid="1865" script="tapestry.lua" />
<action itemid="1866" script="tapestry.lua" />
<action itemid="1867" script="tapestry.lua" />
<action itemid="1868" script="tapestry.lua" />
<action itemid="1869" script="tapestry.lua" />
<action itemid="1870" script="tapestry.lua" />
<action itemid="1871" script="tapestry.lua" />
<action itemid="1872" script="tapestry.lua" />
<action itemid="1878" script="tapestry.lua" />
<action itemid="1879" script="tapestry.lua" />
<action itemid="1880" script="tapestry.lua" />
<!-- /tapetries -->
:: Programación :: Scripts
Página 1 de 1.
Permisos de este foro:
No puedes responder a temas en este foro.