ziomal11 - 2006-10-29 07:39:15

data actions.xml wpisujemy cos takiego
<action itemid="2972" script="talons.lua" />

w data/actions/scripts tworzycie talons.lua
a tam wpisujecie


function onUse(cid, item, frompos, item2, topos)
if doRemoveItem(item.uid,1) then
doPlayerSendTextMessage(cid,22,"You have changed 1 talon to 100 crystal coins")
doPlayerAddItem(cid,2981,100)
end
end

teraz idziemy do actions/crystal.lua
jest tam takie coś


function onUse(cid, item, frompos, item2, topos)
if doRemoveItem(item.uid,1) then
doPlayerSendTextMessage(cid,22,"You have changed 1 crystal coin to 100 platinum coins")
doPlayerAddItem(cid,2973,100)
end
end

--------------------------------------
a ma to wyglądać tak po dodaniu skryptu



function onUse(cid, item, frompos, item2, topos)
if doRemoveItem(item.uid,1) then
doPlayerSendTextMessage(cid,22,"You have changed 1 crystal coin to 100 platinum coins")
doPlayerAddItem(cid,2973,100)
end
end
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2981 and item.type == 100 then
doRemoveItem(item.uid,item.type)
doPlayerAddItem(cid,2972,1)
doPlayerSendTextMessage(cid,22,"You have changed 100 crystal to 1 talon")
elseif item.itemid == 2981 and item.type < 100 then
doRemoveItem(item.uid,1)
doPlayerAddItem(cid,2973,100)
doPlayerSendTextMessage(cid,22,"You have changed 1 crystal to 100 platinum coins")
end
end

www.youots.pun.pl www.shadowofbleach.pun.pl www.wampiria.pun.pl www.slnhlo.pun.pl www.fir2010.pun.pl