• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Problem with children of revolution tfs 1.1

Xarly

Member
Joined
Mar 9, 2015
Messages
360
Reaction score
20
Hello guys if someone can help me please, i have a bug on children of the revolution quests mission 4 levers
after using the oil on the levers all works fine but when i try to click on the levers for change the symbols won't work without distro errors if someone can help me or give me any script for fix it please! im using tfs 1.1
my script its:
Code:
local leverChange = {
    [1] = {1, 3, 2, 4},
    [2] = {2, 1, 3, 4},
    [3] = {2, 3, 1, 4},
    [4] = {3, 2, 4, 1},
    [5] = {4, 2, 1, 3}
}

local position = {
    [1] = {
        Position(33355, 31126, 7),
        Position(33356, 31126, 7),
        Position(33357, 31126, 7),
        Position(33358, 31126, 7)
    },
    [2] = {
        Position(33352, 31126, 5),
        Position(33353, 31126, 5),
        Position(33354, 31126, 5),
        Position(33355, 31126, 5)
    }
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if target.actionid ~= 8013 then
        return false
    end

    if player:getStorageValue(Storage.ChildrenoftheRevolution.Questline) ~= 14 then
        player:say("The lever does not budge.", TALKTYPE_MONSTER_SAY)
        return true
    end

    local lever, tmp, ground = toPosition.y - 31122, {}
    for i = 1, #position[1] do
        ground = Tile(position[1]):getGround()
        if ground then
            tmp = ground.itemid
        end
    end

    for i = 1, #position[2] do
        ground = Tile(position[2]):getGround()
        if ground then
            ground:transform(tmp[leverChange[lever]])
            ground:getPosition():sendMagicEffect(CONST_ME_POFF)
        end
    end

    local groundIds, pass = {10856, 10853, 10855, 10850}, 0
    for i = 1, #position[2] do
        ground = Tile(position[2]):getGround()
        if ground and ground.itemid == groundIds then
            pass = pass + 1
        end
    end

    if pass ~= 4 then
        return true
    end

    player:setStorageValue(Storage.ChildrenoftheRevolution.Questline, 17)
    player:setStorageValue(Storage.ChildrenoftheRevolution.Mission04, 5) --Questlog, Children of the Revolution "Mission 4: Zze Way of Zztonezz"
    player:say("After a cracking noise a deep humming suddenly starts from somewhere below.", TALKTYPE_MONSTER_SAY)

    target:transform(target.itemid == 10044 and 10045 or 10044)
    return true
end

thanks in advance
 
Hello, I have the same script and the same problem could help me fix it ?, gives no error console, only the levers do not work
 
Back
Top