- 积分
- 105315
- 威望
- 85
- 魅力
- 86
- 经验
- 91785
- 热心度
- 28
- 注册时间
- 1970-1-1
- 最后登录
- 2024-11-22
- 主题
- 33
- 回帖
- 5754
- 精华
- 9
- 阅读权限
- 200
成长值: 14230 TA的每日心情 | 郁闷 2024-8-28 13:33 |
---|
签到天数: 1611 天 连续签到: 1 天 [LV.Master]伴坛终老
管理员
ERA Project TeamWoG俄文论坛版主
- 积分
- 105315
|
楼主 |
发表于 2021-3-26 08:46:17
|
显示全部楼层
- ZVSE2
- !#VRi^alwaysBuild2ndLevel^:S(TRUE); [Enable/Disable always build 2nd level dwellings]
- !?FU(OnEveryDay)&i^timerOnce^=(TRUE)/i^timerDay^=1/i^alwaysBuild2ndLevel^=(TRUE);
- !!FU(Build2ndLevelDwelling):P;
- !?FU(Build2ndLevelDwelling);
- !#VA(x:y) (y:y) (z:y); [define variables to store object coordinates]
- !!VR(x):S-1; [setting x-coordinate to -1 will force to start search from scratch]
- !!re i; [endless loop]
- !!SN:F^FindNextObject^/(OBJ_TOWN)/(ANY_OBJ)/?(x)/?(y)/?(z)/-1; [find next town, v1 is (TRUE) on success]
- !!br&v1=(FALSE); [exit loop if nothing found]
- !!CA(x)/(y)/(z):O?(player:y); [check for owner]
- !!CA(x)/(y)/(z):B3/7; [check for fort]
- !!co|-1/(player)<(PLAYER_FIRST); [next town if fort is not built / with no owner]
- !!CA(x)/(y)/(z)B3/30; [check for 1st level dwelling]
- !!CA(x)/(y)/(z)&1:B6/31; [build 2nd level dwellings if 1st has been built]
- !!en;
复制代码
这里添加了堡垒和一级生物巢穴的检查。同时满足并且已被占据的城镇才会自动建造二级巢穴。如果要堡垒改成“城堡”,把 !!CA(x)/(y)/(z):B3/7; 替换为 !!CA(x)/(y)/(z):B3/9; 就行
新旧ERM语法其实可以混用(虽然Berserker强烈不推荐),唯一一个要注意的是,一个函数内不要出现同类型变量的名称形式和数字形式,比如,不要同时出现 (player:y) 和 y1 。在编译的时候,(player:y) 会被编译为yxx,可能就会被编译为y1,这样就导致变量错乱。
|
|