Luciano
Member
- Joined
- Feb 18, 2010
- Messages
- 998
- Reaction score
- 24
Code:
local breakChance = 0
local rustyItems = {
[9927] = {2128}, --rich helmet
[8879] = {8880}, --rich armor
[9928] = {9777}, --rich legs
[6391] = {6391}, --rich shield
[7892] = {7893}, --rich boots
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if rustyItems[itemEx.itemid] ~= nil then
doRemoveItem(itemEx.uid)
else
local newId = rustyItems[itemEx.itemid][math.random(#rustyItems[itemEx.itemid])]
doTransformItem(itemEx.uid,newId)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You upgraded your armor too"..getItemNameById(newId))
end
doRemoveItem(item.uid)
return TRUE
end
return FALSE
end
Error in console:
Code:
[26/03/2010 20:00:21] data/actions/scripts/rustremover.lua:22: '<eof>' expected near 'end'
Basicly it is rust remover.
Made to change X iten in Y item.
Why error? ._.