I got a script from this thread:
http://otland.net/threads/light-up-the-streets-at-night.197060/
But the lights does not turn on ingame for some reason ;/
Can someone script this and make it so the All lights with id 1479 around the whole map
http://otland.net/threads/light-up-the-streets-at-night.197060/
But the lights does not turn on ingame for some reason ;/
Can someone script this and make it so the All lights with id 1479 around the whole map
Code:
local t = {
{x = 1826, y = 1565, z = 7, stackpos = 2}, -- Street Lights on the Map
{x = 1837, y = 1569, z = 7, stackpos = 2},
{x = 1820, y = 1551, z = 7, stackpos = 2},
{x = 1874, y = 1591, z = 7, stackpos = 2},
{x = 1864, y = 1598, z = 7, stackpos = 2},
{x = 1851, y = 1603, z = 7, stackpos = 2},
{x = 1845, y = 1597, z = 7, stackpos = 2},
{x = 1852, y = 1592, z = 7, stackpos = 2},
{x = 1841, y = 1588, z = 7, stackpos = 2},
{x = 1810, y = 1592, z = 7, stackpos = 2},
{x = 1827, y = 1575, z = 7, stackpos = 2},
{x = 1860, y = 1574, z = 7, stackpos = 2},
{x = 1856, y = 1565, z = 7, stackpos = 2},
{x = 1842, y = 1571, z = 6, stackpos = 2},
{x = 1815, y = 1566, z = 7, stackpos = 2},
{x = 1808, y = 1546, z = 7, stackpos = 2},
{x = 1811, y = 1602, z = 7, stackpos = 2},
{x = 1808, y = 1620, z = 7, stackpos = 2},
{x = 1791, y = 1593, z = 7, stackpos = 2} -- No Comma Needed on the Last Light
}
local ret = "The city's streets are lit up. Have a safe evening."
function onTime()
for i = 1, #t do
local light = getTileItemById(t, 1479).uid
if(light > 0) then
doTransformItem(light, 1480)
ret = "The city's streets are lit up. Have a safe evening."
end
end
addEvent(broadcastMessage, 150, ret, MESSAGE_STATUS_DEFAULT)
return true
end