Пример.
Code
{$CLEO}
const
pool = 0@
BuildingPool = 0xB74498
numBuildings = 1@
buildingStructsSize = 2@
building = 3@
v4 = 4@
end
0000:
while true
wait 0
0A8D: pool = read_memory BuildingPool size 4 virtual_protect 0
0A8D: numBuildings = read_memory BuildingPool size 4 virtual_protect 0
numBuildings += 8
0A8D: numBuildings = read_memory numBuildings size 4 virtual_protect 0
if
numBuildings <> 0
then
0A90: buildingStructsSize = 56 * numBuildings
repeat
0A8E: v4 = pool + 4
0A8D: v4 = read_memory v4 size 4 virtual_protect 0
v4 -= 1
005A: v4 += numBuildings
0A8D: v4 = read_memory v4 size 1 virtual_protect 0
numBuildings -= 1
buildingStructsSize -= 56
if
v4 >= 0
then
0A8D: building = read_memory pool size 4 virtual_protect 0
005A: building += buildingStructsSize
if
building <> 0
then
// В building записан адрес структуры CBuilding
building += 0x14
0A8D: building = read_memory building size 4 virtual_protect 0
if
building > 0
then
// узнаём позицию и создаём корону
building += 0x30
0A8D: 11@ = read_memory building size 4 virtual_protect 0
building += 4
0A8D: 12@ = read_memory building size 4 virtual_protect 0
building += 4
0A8D: 13@ = read_memory building size 4 virtual_protect 0
024F: create_corona_with_radius 2.0 type 0 lensflares 0 with_color 255 0 0 at 11@ 12@ 13@
end
end
end
until numBuildings == 0
end
end