I have problem with walk through chest. I set uid, aid on chest and nothing - i can walk this on fuc**nk chest
Its my simple script:
And my walkback.lua
TFS 0.4
Its my simple script:
Lua:
local items =
{
[5039] = {storage = 5039, reward = 2335, count = 1},
[5040] = {storage = 5040, reward = 2336, count = 1},
[5041] = {storage = 5041, reward = 2337, count = 1},
[5042] = {storage = 5042, reward = 2338, count = 1},
[5073] = {storage = 5073, reward = 2339, count = 1},
[5074] = {storage = 5074, reward = 2340, count = 1},
[5058] = {storage = 5058, reward = 2341, count = 1}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local t = items[item.uid]
if items[item.uid] then
if(getCreatureStorage(cid, t.storage) < 1) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found " .. getItemArticleById(t.reward) .. " " .. getItemNameById(t.reward) .. ".")
doPlayerAddItem(cid, t.reward, t.count)
doCreatureSetStorage(cid, t.storage, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It's empty.")
end
end
return TRUE
end
And my walkback.lua
Lua:
local SPECIAL_QUESTS = {2001}
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if(not isPlayer(cid) or
(isContainer(item.uid) and (not isInArray(SPECIAL_QUESTS, item.actionid) and item.uid > 65535) or
getTileInfo(position).creatures <= 1)) then
return true
end
if(lastPosition.x == 0) then -- player just logged in
lastPosition = getTownTemplePosition(getPlayerTown(cid))
doSendMagicEffect(lastPosition, CONST_ME_TELEPORT)
end
doTeleportThing(cid, lastPosition, true)
return true
end
TFS 0.4