Tibia i OTS

Tibia i OTS


#1 2008-01-10 07:57:44

Xidexo

Morderca

Zarejestrowany: 2008-01-09
Posty: 11
Punktów :   
Noob: Xidexo

100 CC w jednej monecie

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


Pomogłem Daj Reputka

Offline

 

Stopka forum

RSS
Powered by PunBB
© Copyright 2002–2008 PunBB
Polityka cookies - Wersja Lo-Fi


Darmowe Forum | Ciekawe Fora | Darmowe Fora
www.jnw.pun.pl www.geografia90.pun.pl www.dissowo.pun.pl www.gim2wswaju.pun.pl www.loza-szydercow.pun.pl