Auto-translated
I can't check it right now.
These lines raise some questions for me:
```
local x,y,p = 0;
if IsObjectExists("Olhar") == true then
x,y,p = GetObjectPosition("Olhar");
end;
if GetHeroTown("Olhar") ~= nil then
p = 1;
end;
```
1. `local x, y, p = 0;` is equivalent to:
```
local x = 0
local y = nil
local p = nil
```
and not:
```
local x = 0
local y = 0
local p = 0
```
2. In a function that is only called for a living hero, its existence is checked in a non-trivial way (using `IsHeroAlive`). Why?
3. The function that provides the town's name instead of the hero's name (when the hero is in the town) is not used, which could lead to an error in `GetObjectPosition`.
P.S. I checked it using build 76.