Fiz correndo isso pra coloca no Zorzin Ot
e graças ao meu querido amigo Soulblaster que ja tinha feito isso a tempos e o tuto de movements do frerety
acabei
antes eram varios arquivos e era um horror :x
agr só tem 2
em actions/scripts :
makes.lua
--function by Ta4e----Basead in action of Rikezinho--
--bread,cake and pumkin system--
function onUse(cid, item, frompos, item2, topos)
topos = {x=topos.x,y=topos.y,z=topos.z}
local frutas = {2673, 2674, 2675, 2676, 2677, 2679, 2680, 2681, 2682, 2683, 2684, 2685, 2678}
local forno = {1786, 1788, 1790, 1792, 6536, 6538, 6360, 6362}
--fazendo a farinha--
if item.itemid == 2694 then
if item2.itemid == 1381 or item2.itemid == 1382 or item2.itemid == 1383 or item2.itemid == 1384 then
doRemoveItem(item.uid,1)
doPlayerAddItem(cid,2692,1)
else
return 0
end
elseif item.itemid == 2692 then
if item2.itemid == 1775 or item2.itemid == 2005 then
if item2.type == 1 then
doChangeTypeItem(item2.uid,0)
doRemoveItem(item.uid,1)
doPlayerAddItem(cid,2693,1)
elseif item2.type == 6 then
doChangeTypeItem(item2.uid,0)
doRemoveItem(item.uid,1)
doPlayerAddItem(cid,6277,1)
else
return 0
end
else
return 0
end
--fazendo pão--
elseif item.itemid == 2693 then
if isInArray(forno,item2.itemid) == 1 then
doRemoveItem(item.uid,1)
doCreateItem(2689,1,topos)
else
return 0
end
--fazendo bolo--
elseif item.itemid == 6277 then
if isInArray(forno,item2.itemid) == 1 then
doRemoveItem(item.uid,1)
doCreateItem(6278,1,topos)
else
return 0
end
--clicando no bolo--
elseif item.itemid == 6280 then
doTransformItem(item.uid,6279)
doSendMagicEffect(topos,2)
name = getPlayerName(cid)
doPlayerSay(cid, name ..' blew out the candle.',16)
--cortando a abobora e o bolo --
elseif item.itemid == 2566 then
if item2.itemid == 2683 then
doTransformItem(item2.uid,2096)
elseif isInArray(frutas,item2.itemid) == 1 then
if doPlayerRemoveItem(cid,6278,1) == 1 then
doTransformItem(item2.uid,6279)
else
return 0
end
else
return 0
end
-- abobora na vela--
elseif item.itemid == 2096 then
if item2.itemid == 2048 or item2.itemid == 2047 then
doTransformItem(item2.uid,2097)
doRemoveItem(item.uid,1)
end
end
return 1
end
em actions.xml add :
--cake,bread,pumpkin system--<action itemid="2550" script="makes.lua" />
<action itemid="2694" script="makes.lua" />
<action itemid="2692" script="makes.lua" />
<action itemid="2693" script="makes.lua" />
<action itemid="6277" script="makes.lua" />
<action itemid="6280" script="makes.lua" />
<action itemid="2566" script="makes.lua" />
<action itemid="2683" script="makes.lua" />
<action itemid="2096" script="makes.lua" />
Agr a parte q eu tive ajuda :s
em movements/script add:
bolo.lua
--function by ta4e--function onAddItem(moveitem, tileitem, pos)
if moveitem.itemid == 2048 then
doTransformItem(moveitem.uid,6280)
doRemoveItem(tileitem.uid,1)
doSendMagicEffect(pos, 14)
end
return 1
end
e em movements.xml add:
<movevent event="AddItem" tileitem="1" itemid="6279" script="bolo.lua" />
tive trabalho
comentem
flws :hi: