function onUse(cid, item, frompos, item2, topos)
local config = {
actionid = 4444, -- put here action id of your statue
itemid = 5000, -- put here item id of your statue
monster = "Rat" -- put here monster name
}
local dir = getPlayerLookDir(cid)
local pos = getPlayerPosition(cid)
if(dir==1)then
pos.x = pos.x + 1
elseif(dir==2)then
pos.y = pos.y + 1
elseif(dir==3)then
pos.x = pos.x - 1
elseif(dir==0)then
pos.y = pos.y - 1
end
if item.itemid == config.itemid and item.actionid == config.actionid then
doCreateMonster(config.monster, pos)
end
return LUA_NO_ERROR
end