W actions/scripts robimy plik o nazwie water.lua ,a w nim :
Kod:
Spoiler:
function onUse(cid, item, frompos, item2, topos)
if item2.itemid == 0 then
return 0
end
if item2.itemid == 1487 then
doRemoveItem(item2.uid,1487)
createpos = topos
doCreateItem(2016,1,createpos)
elseif item2.itemid == 1488 then
doRemoveItem(item2.uid,1488)
createpos = topos
doCreateItem(2016,1,createpos)
elseif item2.itemid == 1489 then
doRemoveItem(item2.uid,1489)
createpos = topos
doCreateItem(2016,1,createpos)
elseif item2.itemid == 1492 then
doRemoveItem(item2.uid,1492)
createpos = topos
doCreateItem(2016,1,createpos)
elseif item2.itemid == 1493 then
doRemoveItem(item2.uid,1493)
createpos = topos
doCreateItem(2016,1,createpos)
elseif item2.itemid == 1494 then
doRemoveItem(item2.uid,1494)
createpos = topos
doCreateItem(2016,1,createpos)
else
return 0
end
doDecayItem(item.uid)
return 1
end
W actions.xml dodajemy to :
Kod:
Spoiler:
<action itemid="2015" script="Water.lua" />
Offline