Retire as tags que você encontrou no Actions.xml, e adicione essa:
<!-- Beds System --> <action fromid="7904" toid="7907" event="script" value="other/beds1.lua"/>
Agora na pasta data/actions/scripts/other, crie um arquivo chamado beds1.lua e adicione isso dentro:
local BEDS = {
[7904] = {{1754, 1755}, {1760, 1761}}, -- blue kit
[7905] = {{7811, 7812}, {7813, 7814}}, -- green kit
[7906] = {{7815, 7816}, {7817, 7818}}, -- red kit
[7907] = {{7819, 7820}, {7821, 7822}} -- yellow kit
}
local function internalBedTransform(item, itemEx, toPosition, ids)
doTransformItem(itemEx.uid, ids[1])
doTransformItem(getThingfromPos(toPosition).uid, ids[2])
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_POFF)
doSendMagicEffect(toPosition, CONST_ME_POFF)
doRemoveItem(item.uid)
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local newBed = BEDS[item.itemid]
if(not newBed or not getHouseFromPos(getCreaturePosition(cid))) then
return false
end
--TODO
--Is it possible in real tibia, to use same modification on current used?
if(isInArray({newBed[1][1], newBed[2][1]}, itemEx.itemid)) then
doPlayerSendCancel(cid, "You already have this bed modification.")
return true
end
for kit, bed in pairs(BEDS) do
if(bed[1][1] == itemEx.itemid or itemEx.itemid == 1758) then
toPosition.y = toPosition.y + 1
internalBedTransform(item, itemEx, toPosition, newBed[1])
break
elseif(bed[2][1] == itemEx.itemid or itemEx.itemid == 1756) then
toPosition.x = toPosition.x + 1
internalBedTransform(item, itemEx, toPosition, newBed[2])
break
end
end
return true
end
Aonde eu selecionei com a cor vermelha são os IDS das Beds, boa sorte!



info
Grupo: Artesão
Registrado: 06/02/13
Posts: 132
Reputação: +8
Char no Tibia: Koete
eu tava procurando no meu otserver o bed system
mas eu não encontrei
então não tem como ter sistema de cama em meu ot?
nem se eu tentasse adicionar de alguma forma?
Alguém pode me ajudar?
eu encontrei um script de bed em actions no meu ot mas n sei se é isso podem dar uma olhada/
furniturebeds.rar