Can't be laggy if no ert/ers files, that is a short script, does not matter.
Well, you can do many things, but there is no universal solution. Each script requires compiling various commands so you must have some experience at erm.
1) Store in hero w var the battles he won (IF:W-1)
2) When battle =x, ask him to build a mine on right-click (CM)
3) Check if already enough mines on map (DO loop)
4) If ok, check if location clicked is in player view (!!TR1:V?i check visibility)
5) Check if can build at that location (TR:E/P)
6) Ask which mine he wants (IF:G1 dialog)
7) Place the mine (UN:I)
8) Assign a number to the mine (UN:C), I think is necessary to avoid duplicates
9) Reset hero w var
So, for a simple thing as adding a mine, you have to browse large parts from erm help. Is not one command.
(This post was last modified: 22.07.2014 00:34 by Valery.)