- 积分
- 2052
- 威望
- 16
- 魅力
- 16
- 经验
- 1195
- 热心度
- 0
- 注册时间
- 2009-11-16
- 最后登录
- 2024-11-8
- 主题
- 24
- 回帖
- 353
- 精华
- 1
- 阅读权限
- 90
TA的每日心情 | 无聊 2016-8-14 22:42 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]投石矮人
论坛嘉宾
- 积分
- 2052
|
100秘银
和朋友对战,两人都抱怨游戏进程太慢了,因此把战斗调成了自动,直到双方碰面时才又调成手动。因此想到能否有这样一个erm方便对战的玩家?
检测是否多人游戏,是开启以下功能,否略过:
开启wog的“选择随机城堡类型的脚本”(主要可以在对战时平衡野外城镇),并且当人类玩家与ai战斗时强制自动战斗,当人类玩家与人类玩家战斗时强制手动战斗。
这样便可大大节省对战的时间,提高对战的体验,不知道有没有erm高手可以帮忙做一个这样的脚本。
选择随机城堡类型脚本代码如下(在wog脚本文件夹下面的53 wog - map options.erm中)
********************************************************************************
Select Neutral Town Types
********************************************************************************
Functions used: FU50..FU53
ERM Numbers: 220
Variables used: v1..v4, z-1..z-10, y1..y6, y-1..y-13, x1, x16
--------------------------------------------------------------------------------
[Select Neutral Town Types]
!?PI;
!!UN:P220/?y-13; [Check if script is enabled: y-13=1 if yes]
!!FU&y-13<>1:E; [Exit if not enabled]
!!FU50:P; [Select town types]
!!UN:U98/-1/?y-11; [Number of towns: y-11]
!!VRv2:S-1; [Initialize v2 to -1 to work with new faster UN:U syntax]
!!DO51/1/y-11/1&y-10<9/y-11>0:P; [Cycle through towns if any disallowed]
--------------------------------------------------------------------------------
[Select town types]
!?FU50;
!!VRz-1:Sz125053;
!!VRz-2:Sz125054;
!!VRz-3:Sz125055;
!!VRz-4:Sz125056;
!!VRz-5:Sz125057;
!!VRz-6:Sz125058;
!!VRz-7:Sz125059;
!!VRz-8:Sz125060;
!!VRz-9:Sz125061;
!!VRz-10:Sz125062;
!!IF:G0/1/511/-1/-2/-3/-4/-5/-6/-7/-8/-9/-10/0/0/0;
[Initialize y-1..y-9 to -1]
!!VRy-1:S-1; !!VRy-2:S-1; !!VRy-3:S-1;
!!VRy-4:S-1; !!VRy-5:S-1; !!VRy-6:S-1;
!!VRy-7:S-1; !!VRy-8:S-1; !!VRy-9:S-1;
!!VRy-10:S0; [Initialize y-10 (index) to 0: y-10]
!!VRy1:Sv1; [Set y1 to options selected: y1]
!!VRy1:&1; [Check for Castle: y1=1 if selected: y1]
!!VRy-10&y1=1:-1; [Subtract 1 from index if Castle selected: y-10]
!!VRyy-10&y1=1:S0; [Store Castle (0) if selected: yy-10]
!!VRy1:Sv1; [Set y1 to options selected: y1]
!!VRy1:&2; [Check for Rampart: y1=1 if selected: y1]
!!VRy-10&y1=2:-1; [Subtract 1 from index if Rampart selected: y-10]
!!VRyy-10&y1=2:S1; [Store Rampart (1) if selected: yy-10]
!!VRy1:Sv1; [Set y1 to options selected: y1]
!!VRy1:&4; [Check for Tower: y1=1 if selected: y1]
!!VRy-10&y1=4:-1; [Subtract 1 from index if Tower selected: y-10]
!!VRyy-10&y1=4:S2; [Store Tower (2) if selected: yy-10]
!!VRy1:Sv1; [Set y1 to options selected: y1]
!!VRy1:&8; [Check for Inferno: y1=1 if selected: y1]
!!VRy-10&y1=8:-1; [Subtract 1 from index if Inferno selected: y-10]
!!VRyy-10&y1=8:S3; [Store Inferno (3) if selected: yy-10]
!!VRy1:Sv1; [Set y1 to options selected: y1]
!!VRy1:&16; [Check for Necropolis: y1=1 if selected: y1]
!!VRy-10&y1=16:-1; [Subtract 1 from index if Necropolis selected: y-10]
!!VRyy-10&y1=16:S4; [Store Necropolis (4) if selected: yy-10]
!!VRy1:Sv1; [Set y1 to options selected: y1]
!!VRy1:&32; [Check for Dungeon: y1=1 if selected: y1]
!!VRy-10&y1=32:-1; [Subtract 1 from index if Dungeon selected: y-10]
!!VRyy-10&y1=32:S5; [Store Dungeon (5) if selected: yy-10]
!!VRy1:Sv1; [Set y1 to options selected: y1]
!!VRy1:&64; [Check for Stronghold: y1=1 if selected: y1]
!!VRy-10&y1=64:-1; [Subtract 1 from index if Stronghold selected: y-10]
!!VRyy-10&y1=64:S6; [Store Stronghold (6) if selected: yy-10]
!!VRy1:Sv1; [Set y1 to options selected: y1]
!!VRy1:&128; [Check for Fortress: y1=1 if selected: y1]
!!VRy-10&y1=128:-1; [Subtract 1 from index if Fortress selected: y-10]
!!VRyy-10&y1=128:S7; [Store Fortress (7) if selected: yy-10]
!!VRy1:Sv1; [Set y1 to options selected: y1]
!!VRy1:&256; [Check for Conflux: y1=1 if selected: y1]
!!VRy-10&y1=256:-1; [Subtract 1 from index if Conflux selected: y-10]
!!VRyy-10&y1=256:S8; [Store Conflux (8) if selected: yy-10]
!!IF&v1=0:M1/z125063;
!!FU50&v1=0:P; [Call function again if no towns chosen]
--------------------------------------------------------------------------------
[Cycle through towns]
!?FU51;
!!UN:U98/-1/-1/2; [Store next town's coordinates in v2/v3/v4]
!!CA2:O?y1; [Owner of town: y1]
!!FU&y1>=0:E; [Exit function if town is owned]
!!CA2:T?y2; [Type of town: y2]
!!VRy3:Sy-10 *-1; [Convert y-10 (index) to positive number: y3]
!!VRy-12:S0; [Initialize y-12 to 0]
!!DO52/1/y3/1:Py2; [Check if town type is allowed: y-12=1 if yes]
!!FU&y-12=1:E; [Exit function if town type is allowed]
!!VRy4:Sy3 -1; [Subtract 1 from y3: y4]
!!VRy5:Sy-10 Ry4; [Generate number from y-10 to y-10+(random y4): y5]
!!VRy6:Syy5; [New random allowable town type: y6]
!!CA2:Ty6 I0; [Set town to new allowable town type and redraw outside: y6]
!!DO53/0/6/1:Py6; [Change garrison creatures to match new town type]
[Adjust Mage Guild enabling]
!!VRy7:S0;
!!CA2&y2=0/y6<>6/y6<>7:B4/4; [If old was Castle and new not Stronghold or Fortress, enable level 5 mage guild]
!!VRy7&y2=0/y6<>6/y6<>7:S5; [Generate a 5th level spell: y7=5]
!!CA2&y2=6/y6=0:B4/3; [If old was Stronghold and new is Castle, enable level 4 mage guild]
!!VRy7&y2=6/y6=0:S4; [Generate a 4th level spell: y7=4]
!!CA2&y2=7/y6=0:B4/3; [If old was Fortress and new is Castle, enable level 4 mage guild]
!!VRy7&y2=7/y6=0:S4; [Generate a 4th level spell: y7=4]
!!CA2&y2=6/y6<>0/y6<>7:B4/3 B4/4; [If old was Stronghold and new not Fortress or Castle, enable level 4 and 5 mage guilds]
!!VRy7&y2=6/y6<>0/y6<>7:S6; [Generate a 4th and 5th level spell: y7=6]
!!CA2&y2=7/y6<>0/y6<>6:B4/3 B4/4; [If old was Fortress and new not Stronghold or Castle, enable level 4 and 5 mage guilds]
!!VRy7&y2=7/y6<>0/y6<>6:S6; [Generate a 4th and 5th level spell: y7=6]
!!FU&y7=0:E; [Exit if no change to Mage Guilds]
[Choose a new 4th level spell: y13]
!!VRy14:S13; [Initialize y14 to 13 (for 14 spells)]
!!UN:J0/7/?y15; [See if Water Walk is enabled: y15=0 if enabled]
!!VRy14&y15<>0:-1; [Subtract 1 from y14 if Water Walk disabled]
!!UN:J0/9/?y16; [See if Town Portal enabled: y12=0 if enabled]
!!VRy14&y16<>0:-1; [Subtract 1 from y14 if Town Portal disabled]
!!VRy17:S0;
!!VRy17|y7=4/y7=6:S1 Ry14; [Choose 1st 4th level spell: y17]
!!VRy13:S0;
!!VRy13&y17=1:S19; [Chain Lightning]
!!VRy13&y17=2:S58; [Counterstrike]
!!VRy13&y17=3:S23; [Meteor Shower]
!!VRy13&y17=4:S38; [Resurrection]
!!VRy13&y17=5:S50; [Sorrow]
!!VRy13&y17=6:S59; [Berserk]
!!VRy13&y17=7:S29; [Fire Shield]
!!VRy13&y17=8:S56; [Frenzy]
!!VRy13&y17=9:S22; [Inferno]
!!VRy13&y17=10:S55; [Slayer]
!!VRy13&y17=11:S65; [Clone]
!!VRy13&y17=12:S48; [Prayer]
!!VRy13&y17=13/y15=0:S7; [Water Walk]
!!VRy13&y17=13/y15=1:S9; [Town Portal if Water Walk is disabled]
!!VRy13&y17=14:S9; [Town Portal]
!!CA2&y13>0:G4 G3/0/y13; [Set 1st L4 spell: y13]
!!VRy18:S0;
!!VRy18|y7=4/y7=6:S1 Ry14; [Choose 2nd 4th level spell: y18]
!!VRy18&y18>0/y18=y17:S1 Ry14; [If a duplicate choose again: y18]
!!VRy18&y18>0/y18=y17:S1 Ry14; [If a duplicate choose again: y18]
!!VRy13:S0;
!!VRy13&y18=1:S19; [Chain Lightning]
!!VRy13&y18=2:S58; [Counterstrike]
!!VRy13&y18=3:S23; [Meteor Shower]
!!VRy13&y18=4:S38; [Resurrection]
!!VRy13&y18=5:S50; [Sorrow]
!!VRy13&y18=6:S59; [Berserk]
!!VRy13&y18=7:S29; [Fire Shield]
!!VRy13&y18=8:S56; [Frenzy]
!!VRy13&y18=9:S22; [Inferno]
!!VRy13&y18=10:S55; [Slayer]
!!VRy13&y18=11:S65; [Clone]
!!VRy13&y18=12:S48; [Prayer]
!!VRy13&y18=13/y15=0:S7; [Water Walk]
!!VRy13&y18=13/y15=1:S9; [Town Portal if Water Walk is disabled]
!!VRy13&y18=14:S9; [Town Portal]
!!CA2&y13>0:G3/1/y13; [Set 2nd L4 spell: y13]
!!VRy19:S0;
!!VRy19|y7=4/y7=6:S1 Ry14; [Choose 3rd 4th level spell for Tower: y19]
!!VRy19&y19>0/y19=y17:S1 Ry14; [If a duplicate choose again: y19]
!!VRy19&y19>0/y19=y17:S1 Ry14; [If a duplicate choose again: y19]
!!VRy19&y19>0/y19=y18:S1 Ry14; [If a duplicate choose again: y19]
!!VRy19&y19>0/y19=y18:S1 Ry14; [If a duplicate choose again: y19]
!!VRy13:S0;
!!VRy13&y19=1:S19; [Chain Lightning]
!!VRy13&y19=2:S58; [Counterstrike]
!!VRy13&y19=3:S23; [Meteor Shower]
!!VRy13&y19=4:S38; [Resurrection]
!!VRy13&y19=5:S50; [Sorrow]
!!VRy13&y19=6:S59; [Berserk]
!!VRy13&y19=7:S29; [Fire Shield]
!!VRy13&y19=8:S56; [Frenzy]
!!VRy13&y19=9:S22; [Inferno]
!!VRy13&y19=10:S55; [Slayer]
!!VRy13&y19=11:S65; [Clone]
!!VRy13&y19=12:S48; [Prayer]
!!VRy13&y19=13/y15=0:S7; [Water Walk]
!!VRy13&y19=13/y15=1:S9; [Town Portal if Water Walk is disabled]
!!VRy13&y19=14:S9; [Town Portal]
!!CA2&y13>0/y6=2:G3/2/y13; [Set 3rd L4 spell for Tower: y13]
[Choose a 5th level spell: y9]
!!VRy10:S8; [Initialize y10 to 8 (for 9 spells)]
!!UN:J0/6/?y11; [See if Fly is enabled: y11=0 if enabled]
!!VRy10&y11<>0:-1; [Subtract 1 from y10 if Fly disabled]
!!UN:J0/8/?y12; [See if Dimension Door is enabled: y12=0 if enabled]
!!VRy10&y12<>0:-1; [Subtract 1 from y10 if Dimension Door disabled]
!!VRy8:S0;
!!VRy8|y7=5/y7=6:S1 Ry10; [Choose 1st 5th level spell: y8]
!!VRy9:S0;
!!VRy9&y8=1:S18; [Implosion]
!!VRy9&y8=2:S36; [Magic Mirror]
!!VRy9&y8=3:S40; [Sacrifice]
!!VRy9&y8=4:S66; [Fire Elemental]
!!VRy9&y8=5:S67; [Earth Elemental]
!!VRy9&y8=6:S68; [Water Elemental]
!!VRy9&y8=7:S69; [Air Elemental]
!!VRy9&y8=8/y11=0:S6; [Fly]
!!VRy9&y8=8/y11=1:S8; [Dimension Door if Fly is disabled]
!!VRy9&y8=9:S8; [Dimension Door]
!!CA2&y9>0:G5 G4/0/y9; [Set L5 spell: y9]
!!VRy20|y7=5/y7=6:S1 Ry10; [Choose a 2nd 5th level spell for Tower: y20]
!!VRy20&y20>0/y20=y8:S1 Ry10; [If a duplicate choose again: y20]
!!VRy20&y20>0/y20=y8:S1 Ry10; [If a duplicate choose again: y20]
!!VRy9:S0;
!!VRy9&y20=1:S18; [Implosion]
!!VRy9&y20=2:S36; [Magic Mirror]
!!VRy9&y20=3:S40; [Sacrifice]
!!VRy9&y20=4:S66; [Fire Elemental]
!!VRy9&y20=5:S67; [Earth Elemental]
!!VRy9&y20=6:S68; [Water Elemental]
!!VRy9&y20=7:S69; [Air Elemental]
!!VRy9&y20=8/y11=0:S6; [Fly]
!!VRy9&y20=8/y11=1:S8; [Dimension Door if Fly is disabled]
!!VRy9&y20=9:S8; [Dimension Door]
!!CA2&y9>0/y6=2:G5 G4/1/y9; [Set 2nd L5 spell for Tower: y9]
--------------------------------------------------------------------------------
[Check if town type is allowed]
[x1=town type]
!?FU52;
!!VRy1:Sx16 *-1; [Convert x16 to negative number: y1]
!!VRy-12&x1=yy1:S1; [Set y-12 to 1 if town type is allowed]
!!VRx16&x1=yy1:S99; [Exit loop if town type is allowed]
--------------------------------------------------------------------------------
[Change garrison creatures to match new town type]
[x1=town type, v2/v3/v4=coordinates]
!?FU53;
!!CA2:M2/x16/?y1/?y2; [Type: y1, Number: y2]
!!FU|y1<0/y2=0:E; [Exit if slot empty]
!!MA:Ly1/?y3; [Level of monster (0..6): y3]
!!VRy4:S0 R1; [Random non-upgraded/upgraded: y4]
!!UN:Tx1/y3/y4/?y5; [Type of correct monster: y5]
!!CA2:M2/x16/y5/y2; [Replace with correct monster types]
--------------------------------------------------------------------------------
[End of Select Neutral Town Types]
|
最佳答案
查看完整内容
ZVSE
!?BA52;
!!BA:O?y1/?y2 Q?v4444;
!!FU|y1
|