Hindori
New Member
- Joined
- Jan 24, 2009
- Messages
- 157
- Reaction score
- 2
This is my first script. Very easy but i think usefull if you want something like bulding house system in your ots. When you use hammer(id 2557) wall transform to kit with wall.
In data\actions\scripts\tools create mlotek.lua and paste it:
next in actions.xml paste it:
I'm free for sugestions what can I upgrade or change to better work.
In data\actions\scripts\tools create mlotek.lua and paste it:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(itemEx.itemid == 1040) then
doTransformItem(itemEx.uid, 8693)
doDecayItem(itemEx.uid)
elseif(itemEx.itemid == 1039) then
doTransformItem(itemEx.uid, 8692)
doDecayItem(itemEx.uid)
elseif(itemEx.itemid == 1038) then
doTransformItem(itemEx.uid, 7962)
doDecayItem(itemEx.uid)
elseif(itemEx.itemid == 1037) then
doTransformItem(itemEx.uid, 7961)
doDecayItem(itemEx.uid)
elseif(itemEx.itemid == 1036) then
doTransformItem(itemEx.uid, 7960)
doDecayItem(itemEx.uid)
return true
end
return destroyItem(cid, itemEx, toPosition)
end
next in actions.xml paste it:
Code:
<action itemid="2557" event="script" value="tools/mlotek.lua"/>
I'm free for sugestions what can I upgrade or change to better work.