Auto-translated
The code needs to be written in the top panel of the editor -> map properties -> map script -> edit. The script text is embedded in the message. I just made a mistake there: before 23, instead of ==, it should be >.
I did everything as you said, but it still doesn't work!!! When I enter the hut, it tells me that there is no one here!!! Please help!!! Here's how I write it:
function lev(hero)
if GetHeroLevel(hero)>1 and GetObjectOwner(hero)==4 then
LevelUpHero(hero);
sleep(4);
LevelUpHero(hero);
Trigger(OBJECT_TOUCH_TRIGGER,Seer,nil);
end;
end;
SetObjectEnabled(Seer,nil);
Trigger(OBJECT_TOUCH_TRIGGER,Seer,'lev');