lucasholanda
New Member
- Joined
- Jun 16, 2014
- Messages
- 8
- Reaction score
- 0
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.2
my script its:
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.2
my script its:
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(33349, 31123, 5),
Position(33349, 31124, 5),
Position(33349, 31125, 5),
Position(33349, 31126, 5),
Position(33349, 31127, 5)
},
[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
[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(33349, 31123, 5),
Position(33349, 31124, 5),
Position(33349, 31125, 5),
Position(33349, 31126, 5),
Position(33349, 31127, 5)
},
[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