Code: Select all
function zappulsechamberpuzzle()
local max = 0
if Electricution_lever_1.lever:isDeactivated() and
Electricution_lever_2.lever:isDeactivated() then
max = 2
elseif Electricution_lever_1.lever:isActivated() and
Electricution_lever_2.lever:isDeactivated() then
max = 1
elseif Electricution_lever_2.lever:isActivated() and
Electricution_lever_1.lever:isDeactivated() then
max = 0
elseif Electricution_lever_1.lever:isActivated() and
Electricution_lever_2.lever:isActivated() then
max = 0
end
for x = -max,max do
for y = -max,max do
if ( (x ~= 0) or (y ~= 0) ) then
spawn("lightning_bolt_blast", 1, 19 + x, 15 + y, 0)
spawn("lightning_bolt_blast", 1, 19, 15, 0)
else if ( (x == 0) or (y == 0) ) then
spawn("lightning_bolt_blast", 1, 19, 15, 0)
end
end
end
end
end
Code: Select all
function frostexplosion()
local fmax = 0
if frost_dummy_lever.lever:isDeactivated() then
fmax = 3
elseif frost_dummy_lever.lever:isActivated() then
fmax = 3
end
for x = -fmax,fmax do
for y = -fmax,fmax do
if ( (x ~= 0) or (y ~= 0) ) then
spawn("lightning_bolt_blast", 1, 25 + x, 7 + y, 0)
spawn("lightning_bolt_blast", 1, 25, 7, 0)
else
return nil
end
end
end
end
Code: Select all
function frostexplosion()
local fmax = 3
for x = -fmax,fmax do
for y = -fmax,fmax do
if ( (x ~= 0) or (y ~= 0) ) then
spawn("lightning_bolt_blast", 1, 25 + x, 7 + y, 0)
spawn("lightning_bolt_blast", 1, 25, 7, 0)
else
return nil
end
end
end
end