PHP Code:
function get_4floor_stone_pos()
local positions = {
{368, 629},
{419, 630},
{428, 653},
{422, 679},
{395, 689},
{369, 679},
{361, 658},
}
for i = 1, 6 do
local j = number(i, 7)
if i != j then
local t = positions[i];
positions[i] = positions[j];
positions[j] = t;
end
end
--for i = 1, 7 do
-- positions[i][1] = positions[i][1] * 100
-- positions[i][2] = positions[i][2] * 100
-- end
return positions
end
when 8031.kill with pc.in_dungeon() and pc.get_map_index() >= 660000 and pc.get_map_index() < 670000 begin
d.setf("level", 4)
-- ¦A²{¤j¶q©Çª«¤Î»s³y¯u¥ÛÀY©M°²¥ÛÀY
--d.regen_file("data/dungeon/deviltower4_regen.txt")
local positions = deviltower_zone.get_4floor_stone_pos()
for i = 1, 6 do
chat(positions[i][1], positions[i][2])
d.set_unique("fake" .. i , d.spawn_mob(8028, positions[i][1], positions[i][2]))
end
chat(positions[7][1], positions[7][2])
local vid = d.spawn_mob(8028, positions[7][1], positions[7][2])
chat(vid)
d.set_unique("real", vid)
server_loop_timer('devil_stone4_update', 10, pc.get_map_index())
server_timer('devil_stone4_fail1', 5*60, pc.get_map_index())