Hegemonia OTS

Forum Hegemonia OTS


#1 2006-10-29 07:39:15

ziomal11

Newbie

Zarejestrowany: 2006-10-29
Posty: 8
Punktów :   

100crystal x 100 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

Offline

 
Hegemonia OTS

Stopka forum

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


Darmowe Forum | Ciekawe Fora | Darmowe Fora
www.pokefireonline.pun.pl www.nfs.pun.pl www.logistyka-wscil.pun.pl www.nostale.pun.pl www.zbp.pun.pl