Estatua de cobra vira cobra
primero vá /data/action/scripts e crie cobra vert.lua vamos fazer o vertical primero
-- Cobra by Pun --function onUse(cid, item, frompos, item2, topos)pos = getPlayerPosition(cid) if getTilePzInfo(topos) == 0 thenif getTilePzInfo(pos) == 0 thenif item.itemid == 1467 or 1468 thendoTransformItem(item.uid,1466)doSummonCreature("Cobra", pos)doSendMagicEffect(topos,12)doPlayerSay(cid,"Oo",1)elsedoPlayerSendCancel(cid,"You cannot use that.")end elsedoPlayerSendCancel(cid,"You cannot use this.")endelsedoPlayerSendCancel(cid,"You cannot use this here.")endreturn 1end
e coloque no actions.xml :
<action itemid="1467" script="cobra vert.lua" /><action itemid="1468" script="cobra vert.lua" />
cobra horizontal agora... crie o arquivo lua cobra hori.lua e nele coloque:
-- Cobra by Pun --function onUse(cid, item, frompos, item2, topos)pos = getPlayerPosition(cid) if getTilePzInfo(topos) == 0 thenif getTilePzInfo(pos) == 0 thenif item.itemid == 1470 or 1471 thendoTransformItem(item.uid,1469)doSummonCreature("Cobra", pos)doSendMagicEffect(topos,12)doPlayerSay(cid,"Oo",1)elsedoPlayerSendCancel(cid,"You cannot use that.")end elsedoPlayerSendCancel(cid,"You cannot use this while you are in a Protect Zone.")endelsedoPlayerSendCancel(cid,"You cannot use this on a protect zone.")endreturn 1end
e no actions.xml
<action itemid="1470" script="cobra hori.lua" /><action itemid="1471" script="cobra hori.lua" />
--------------------
Fonte:OT BR
Creditos:Punzinhu