Witamy na nowym Forum o Grze Tibia
Opis: Po klikniêciu USE na grzyba(rosn±cego) znika on z ziemi, ale za to pojawia nam siê jadalny grzyb w plecaku.
Testowane na: YurOTS 0.9.4f
W xxx\data\actions\scripts tworzymy nowy plik grzyby.lua i wklejamy do niego:
function onUse(cid, item, frompos, item2, topos) if item.itemid == 4170 then doPlayerAddItem(cid ,2792, 1) doRemoveItem(item.uid,item.type) elseif item.itemid == 4171 then doPlayerAddItem(cid ,2792, 3) doRemoveItem(item.uid,item.type) elseif item.itemid == 4178 or item.itemid == 4180 then doPlayerAddItem(cid ,2789, 1) doRemoveItem(item.uid,item.type) elseif item.itemid == 4179 or item.itemid == 4181 then doPlayerAddItem(cid ,2789, 3) doRemoveItem(item.uid,item.type) elseif item.itemid == 4182 or item.itemid == 4840 then doPlayerAddItem(cid ,2795, 1) doRemoveItem(item.uid,item.type) elseif item.itemid == 4183 then doPlayerAddItem(cid ,2795, 3) doRemoveItem(item.uid,item.type) end doPlayerSay(cid,"I kolejny grzybek.",16) return 1 end
W xxx\data\actions\actions.xml dodajemy linijki:
<action itemid="4170" script="grzyby.lua" /> <action itemid="4171" script="grzyby.lua" /> <action itemid="4178" script="grzyby.lua" /> <action itemid="4179" script="grzyby.lua" /> <action itemid="4180" script="grzyby.lua" /> <action itemid="4181" script="grzyby.lua" /> <action itemid="4182" script="grzyby.lua" /> <action itemid="4183" script="grzyby.lua" /> <action itemid="4840" script="grzyby.lua" />
Offline