Datero
New Member
- Joined
- Apr 16, 2013
- Messages
- 6
- Reaction score
- 1
Hey, i making " put helmet on slot, and remove wall, go to hidden location " i tried everything, i can't remove wall, stackpos, work, but... not where is wall, removes item, always below, not where is my wall. I tried reading source documentation, for now, i don't understand much. Idk, if, option movement+slot, work with removing wall.
Lua:
local item = 11337
getpos = getThingfromPos(wallPos1)
local wallPosition = Position{x = 32039, y = 32271, z = 6}
function onEquip(player, item, slot, position, fromPosition, toPosition)
local player = Player(cid)
Game.createItem(1043, 1, wallPosition)
--doCreateItem(config.wallId, 1, config.wallPos)
-- doTransformItem(item.uid, item.itemid -1)
-- doTransformItem(config.lampId):getItemById(config.wallId -1)
-- doRemoveItem(config.wallId, 1, config.wallPos)
return true
end
local item = 11337
local player = Player(cid)
function onDeEquip(player, item, slot, position, fromPosition, toPosition, isCheck, topOrder)
local slot = getPlayerSlotItem(CONST_SLOT_HEAD)
local tile = Tile(Position(32039, 32271, 6):getItemById(1043))
local wallItem = tile:getTileItemById(1043)
if wallItem then
if wallItem.stackpos == 1 then
wallItem:doRemoveItem(getTileThingByPos({x=32039, y=32271, z=6, id = 1043, stackpos=1}).uid, 1)
return true
end
end
end