Forum Zostalo Stworzone By Pomagać Ludzią W Grze Tibia Ots
Zaczynamy od tego że edytujemy plik crystal.lua w data/actions/scripts a w nim to:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2160 and item.type == 100 then
doRemoveItem(item.uid,item.type)
doPlayerAddItem(cid,2159,1)
doPlayerSendTextMessage(cid,22,"You have changed 100 crystal coin to 1 scarab coin")
elseif item.itemid == 2159 and item.type < 100 then
doRemoveItem(item.uid,1)
doPlayerAddItem(cid,2160,100)
doPlayerSendTextMessage(cid,22,"You have changed 1 scarab coin to 100 crystal coins")
elseif item.itemid == 2160 and item.type < 100 then
doRemoveItem(item.uid,1)
doPlayerAddItem(cid,2152,100)
doPlayerSendTextMessage(cid,22,"You have changed 1 crystal to 100 platinum coins")
end
end
Potem tez w actions/scripts
Następnie tworzymy notatnik , a w nim wpisujemy:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2159 and item.type == 100 then
doRemoveItem(item.uid,item.type)
doPlayerAddItem(cid,2157,1)
doPlayerSendTextMessage(cid,22,"You have changed 100 scarab coin to 1 gold nugget")
elseif doRemoveItem(item.uid,1) then
doPlayerSendTextMessage(cid,22,"You have changed 1 scarab coin to 100 crystal coins")
doPlayerAddItem(cid,2160,100)
end
end
Zapisujemy jako: scarab.lua
Następnie tworzymy notatnik , a w nim wpisujemy:
function onUse(cid, item, frompos, item2, topos)
if doRemoveItem(item.uid,1) then
doPlayerSendTextMessage(cid,22,"You have changed 1 gold nugget to 100 scarab coins")
doPlayerAddItem(cid,2159,100)
end
end
Zapisujemy jako: nugget.lua
Na końcu przechodzimy w data/actions/actions.xml
pod -- Transform money wpisujemy:
<action itemid="2160" script="crystal.lua" />
<action itemid="2159" script="scarab.lua" />
<action itemid="2157" script="gold nugget.lua" />
Offline