@ Cykotitan
Very thanks man....
worck perfectly
Very thanks man....
worck perfectly
Lua:
local t = {
levers = {
{x=106, y=136, z=7, stackpos = 1},
{x=109, y=133, z=7, stackpos = 1},
{x=113, y=136, z=7, stackpos = 1},
{x=109, y=140, z=7, stackpos = 1}
},
walls = {
-- horizontals of coordinate 1 to the 6, from the 7 to the 12 vertical
-- electric iron bars (horizontals 5071, verticals 5072)....
{x=109, y=135, z=7}, -- 1
{x=110, y=135, z=7}, -- 2
{x=111, y=135, z=7}, -- 3
{x=109, y=138, z=7}, -- 4
{x=110, y=138, z=7}, -- 5
{x=111, y=138, z=7}, -- 6
{x=108, y=136, z=7}, -- 7
{x=108, y=137, z=7}, -- 8
{x=108, y=138, z=7}, -- 9
{x=111, y=136, z=7}, -- 10
{x=111, y=137, z=7}, -- 11
{x=111, y=138, z=7} -- 12
},
monsters = {
"Dragon",
"Dragon",
"Dragon"
}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 1945 then
if item.actionid == 8787 then
for i = 1, #t.levers do
if getThingfromPos(t.levers[i]).itemid == 1946 then
failed = true
break
end
end
if not failed then
for i = 1, #t.walls do
doCreateItem(i < 7 and 5071 or 5072, 1, t.walls[i])
end
for i = 1, #t.monsters do
doSummonCreature(t.monsters[i], fromPosition)
end
else
doPlayerSendCancel(cid, "You need to pull the other levers first.")
return TRUE
end
end
doTransformItem(item.uid,item.itemid+1)
elseif item.itemid == 1946 and item.actionid == 8787 then
doTransformItem(item.uid,item.itemid-1)
end
return TRUE
end
Last edited: