Code: Select all
while(!who.dead && who.connected)
while(who.x == lx && who.y == ly)
if (GetMana(who) < GetIntelligence(who) - 19 && timer + 20 <= ReadGameClock())
PlaySoundEffect(who, sfx_meditation);
SetMana(who, GetMana(who) + 20);
SetObjProperty(created, "lastmana1", ReadGameClock());
timer := GetObjProperty( created, "lastmana1");
endif
//var ev := os::wait_for_event(1);
endwhile
MoveItemToLocation(created, who.x, who.y, who.z + zz);
endwhile