ralke
(҂ ͠❛ ෴ ͡❛)ᕤ
Hi again guys! Based on this revscript orts2/dreamer_challenge.lua at main · EPuncker/orts2 (https://github.com/EPuncker/orts2/blob/main/data/scripts/quests/dreamer_challenge.lua) I tried to merge Dreamer Challenge on my server. I'm on the pillows puzzle now, struggling with this part, and I have the following errors:
a) When I finish the puzzle no magic effect is sent (to confirm that I've finished)
b) The teleport for the next room isn't created after finishing the puzzle, destination should be 1271, 749, 14
b) The tile triggers (of the puzzle) still work when I finish the puzzle, i'm not sure, but they're supposed to be enabled again as soon you stepIn the teleport
Here's good evidence of how works, check 21:52 aproximatelly
Live! - DREAMER'S CHALLENGE QUEST - PASO A PASO (https://www.youtube.com/live/kjQlJhxzNl8?feature=share&t=1312)
A photo of finished puzzle (proof that tile triggers works)
Hope someone can help me finishing this quest,
Thanks in advance!
a) When I finish the puzzle no magic effect is sent (to confirm that I've finished)
b) The teleport for the next room isn't created after finishing the puzzle, destination should be 1271, 749, 14
b) The tile triggers (of the puzzle) still work when I finish the puzzle, i'm not sure, but they're supposed to be enabled again as soon you stepIn the teleport
Here's good evidence of how works, check 21:52 aproximatelly
Live! - DREAMER'S CHALLENGE QUEST - PASO A PASO (https://www.youtube.com/live/kjQlJhxzNl8?feature=share&t=1312)
Lua:
local riddleTeleport = MoveEvent()
local destination = Position(1271, 749, 14)
local topLeftPosition = Position(1322, 808, 9)
local pillowPositions = {
{itemid = 1686, center = topLeftPosition + Position(2, 2, 0)},
{itemid = 1687, center = topLeftPosition + Position(2, 5, 0)},
{itemid = 1688, center = topLeftPosition + Position(5, 2, 0)},
{itemid = 1689, center = topLeftPosition + Position(5, 5, 0)}
}
function riddleTeleport.onStepIn(creature, item, position, fromPosition)
if not player:getPlayer() then
return true
end
local pillows = {}
for i = 1, #pillowPositions do
local pillowPos = pillowPositions[i]
for x = -1, 1 do
for y = -1, 1 do
local item = Tile(pillowPos.center + Position(x, y, 0)):getThing(1)
if not item or item.itemid ~= pillowPos.itemid then
player:teleportTo(fromPosition, true)
fromPosition:sendMagicEffect(CONST_ME_TELEPORT)
return true
end
pillows[#pillows + 1] = item
end
end
end
player:teleportTo(destination)
destination:sendMagicEffect(CONST_ME_TELEPORT)
for x = 1, 6 do
for y = 1, 6 do
local index = math.random(#pillows)
pillows[index]:moveTo(topLeftPosition + Position(x, y, 0))
table.remove(pillows, index)
end
end
return true
end
riddleTeleport:type("stepin")
riddleTeleport:uid(50147)
riddleTeleport:register()
A photo of finished puzzle (proof that tile triggers works)
Hope someone can help me finishing this quest,
Thanks in advance!