I found the way how to do it. Below is working code.
Code:
[event]name=recruit,recall,side turn endfirst_time_only=noid=new_units_forms_016[store_unit][filter]type=Elvish Archer[not][filter_wml][variables]elvish_archer_updated=yes[/variables][/filter_wml][/not][/filter]variable=units[/store_unit]{FOREACH units i}{VARIABLE units[$i].advances_to "Elvish Ranger,Elvish Marksman,Elvish Lord"}{VARIABLE units[$i].variables.elvish_archer_updated yes}[unstore_unit]variable=units[$i][/unstore_unit]{NEXT i}[/event]
Statistics: Posted by ChaosRider — Today, 2:15 pm