sirakx
Member
- Joined
- Feb 23, 2015
- Messages
- 51
- Solutions
- 1
- Reaction score
- 8
I want to place a stone above the teleport but apparently the stackpos not work, anyone can help me? Thank you.
this is my code:
and this is my result of bad luck.
this is my code:
Code:
local config = {
pos = Position(779, 504, 7, 2),
id = 1354
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local player = Player(cid)
if not player then return false end
local tile = Tile(config.pos)
if tile ~= nil then
local piedra = tile:getItemById(config.id)
if piedra then
piedra:remove()
config.pos:sendMagicEffect(3)
player:sendTextMessage(MESSAGE_EVENT_ORANGE, "Has removido la piedra que impedia pasar al porta.")
else
Game.createItem(config.id, 1, config.pos)
config.pos:sendMagicEffect(15)
player:sendTextMessage(MESSAGE_EVENT_ORANGE, "Has creado la piedra, ahora el lugar fue protegido.")
end
end
Item(item.uid):transform( ((item.itemid == 1945) and 1946 or 1945) )
return true
end
and this is my result of bad luck.
Last edited: