佳丽云

英雄无敌3-WoG中文站

 找回密码
 英雄注册|Register
查看: 6351|回复: 16

请高手写一下作战术(炮术、弹道、医疗术三合一)的脚本,谢谢!

[复制链接]

该用户从未签到

83

回帖

6172

金币

0

精华

2级 Adventuring Hero

Rank: 2

积分
238
发表于 2012-1-9 21:00:44 | 显示全部楼层 |阅读模式
各路高手,我一直在努力把script64.erm中关于作战术(炮术、弹道、医疗术三合一)的脚本弄到不允许wog化的地图事件中,可是一进地图就会出错,请各位高手帮忙,提出一个把《加强战争机器II、辅助技能强化、宝物(保括指挥官宝物)强化、作战术(炮术、弹道、医疗术三合一)》和根据英雄等级召唤帐蓬(不仅是圣师宠物)能召唤多帐蓬的一系列脚本事件方案吧,这是我在script64.erm中提取的脚本,请参考一下:



** FIRST AID ENHANCED (2005 Aug 25)                            (for WoG v3.58f)
** by Tobyn
**
** This script greatly enhances First Aid skill and hero specialty.
** - First Aid skill summons and gives control over additional First Aid
**   Tents (# of tents = hero level).
**   The one warmachine Tent and Hierophant Commander Tents are added.
** - Casts a Cure spell each healing, based on First Aid expertise (Expert
**   First Aid will give Mass Cure) and spellpower equal to number of tents.
**   Tent Healing Cursor upon two-hex-creatures gives Cure only if the left
**   hex (position) is targetted, the right hex only gives standard healing.
** - First Aid Specialty gives 2 Tents per hero level and temporary knowledge
**   of three spells during that combat (Cure, Animate Dead and Resurrection)
**   First Aid Specialty will also restore First Aid Tent Warmachine *if*
**   hero had one before battle began, even if it was destroyed in battle.
**
** uses vars v2301..23
** uses vars v2398..99 (99/98 attacking/defending hero)
** ONLY ACTIVE if v2364=1 (wogify option 190)

  INIT SKILL DESCRIPTION moved to script75.erm (skill descriptions)
  BATTLE AFFAIRS BELOW
  v2301=hero level, v2302=spellpower, v2303=1 if specialty, v2304=First Aid expertise,
  v2305=1 if Tent warmachine present, v2306 amount of warmachine/Hierophant Tents
  v2307=Cure, v2308=Resurrection and v2309=Animate Dead (=1 each if known by hero)
  v2311..v2319 same for defender (if present)

  BEFORE BATTLE
!?BA52&v2364=1;                    start combat trigger for both sides (if script active)
!!BA:H0/?v2399 H1/?v2398;            store attacking/defending hero numbers
!!VRv2301:C0/0/0/0/0/0/0/0/0/0/0;    init v2301..11
!!VRv2312:C0/0/0/0/0/0/0/0/0/0/0/0;  init v2312..23
!!HEv2399:         Ed/?v2301 Fd/d/?v2302/d S27/?v2304 A2/6/?v2305/d M37/?v2307 M38/?v2308 M39/?v2309;
!!HEv2398&v2398>-1:Ed/?v2311 Fd/d/?v2312/d S27/?v2314 A2/6/?v2315/d M37/?v2317 M38/?v2318 M39/?v2319;
  First Aid Specialty
!!HEv2399:X?y-1/?y-2/d/d/d/d/d;    get Attacker skill specialty
!!VRv2303&y-1=0/y-2=27:S1;           set indicator if First Aid spec
!!HEv2399&v2303=1:M37/1;             hero temp gets Cure spell during battle if specialist (even w/o First Aid skill)
!!HEv2399&v2303=1/v2304>1:M38/1;     hero temp gets Animate Dead if Advanced or Expert specialist
!!HEv2399&v2303=1/v2304>2:M39/1;     hero temp gets Resurrection if Expert specialist
!!VRv2301&v2303=1:*2;                specialty gives 2 Tents per hero level
!!HEv2398&v2398>-1:X?y-3/?y-4/d/d/d/d/d; get Defender skill specialty
!!VRv2313&v2398>-1/y-3=0/y-4=27:S1;  set indicator if First Aid spec
!!HEv2398&v2313=1:M37/1;             temp Cure spell during battle
!!HEv2398&v2313=1/v2314>1:M38/1;     temp Animate Dead if Advanced or Expert
!!HEv2398&v2313=1/v2314>2:M39/1;     temp Resurrection if Expert
!!VRv2311&v2313=1:*2;                specialty gives 2 Tents per hero level

  IN BATTLE (summon Tents and apply Cure spell)
!?BF&v2364=1;                      start battlefield trigger (if script active)
!!BU&v2304>0:E153/?v2306;            check if attacker already has tents
!!BU&v2314>0:E168/?v2316;            check if defender already has tents
!!BMv2306&v2304>0/v2306>0:Ndv2301;   add Tents for attacker
!!BMv2316&v2314>0/v2316>0:Ndv2311;   add Tents for defender
!!BU&v2304>0/v2306=-1:S147/v2301/153/0/-1/0; summons Tents for attacker
!!BU&v2314>0/v2316=-1:S147/v2311/168/1/-1/0; summons Tents for defender
!?BG&v2364=1;                      battleground action (useable by both sides) (if script active)
!!BG:A?v2320;                          get current action (wait for Tent Healing)
!!BG&v2320=11:N?v2321 D?v2322 Q?v2310; get Tent number, destination position, owner
!!BMv2321&v2320=11:N?v2323;            get current amount of Tents
!!BMv2321&v2320=11/v2310=0/v2304>0:C37/v2322/v2304/v2323/1; cast Cure on destination (left side)
!!BMv2321&v2320=11/v2310=1/v2314>0:C37/v2322/v2314/v2323/1; cast Cure on destination (right side)

  AFTER BATTLE (restore values given by First Aid Specialty)
!?BG1&v2364=1;                     post-action trigger, if script active
!!BU:C?y-1;                          check if combat has ended this turn
!!FU&y-1=0:E;                        exit if it hasn't
  attacker
!!HEv2399&v2303=1/v2305>0:A1/6/15;   restore Tent if given and hero specialty
!!HEv2399&v2303=1:M37/v2307 M38/v2308 M39/v2309; remove Cure, Res, AnDead spells if only given by Specialty
  defender
!!HEv2398&v2313=1/v2315>0:A1/6/15;   restore Tent if given and hero specialty
!!HEv2398&v2313=1/v2398>-1:M37/v2317 M38/v2318 M39/v2319; remove Cure, Res, AnDead spells if only given by Specialty
******************************************************************************************
** WARFARE (2004 September 19)                                  (for WoG v3.58)
** by Tobyn
**
** This script combines the three war machine skills Artillery, Ballistics
** and First Aid and treats them as one skill. This new Warfare "skill"
** gives you control over all three War Machines and standard SoD abilities
** from all three skills.
**
** First Aid Tents get 750 HPs (only if no other First Aid enhancements active).
**
** Whenever a hero has one or more of the skills and a battle starts,
** the hero will get all three skills at the highest expertise available.
** Similar if clicked on any warfare skill in hero screen, but:
** - if clicked on icon of any Warfare skill, you get standard skill description
** - if clicked on text (name or expertise), you get another msgbox instead
**   (left-click lets you choose, right-click cycles the displayed Warfare skill)
**
** Hero might temporarily have diverging expertises in the three Warfare
** skills while on adventure map (e.g. via Witch Huts or through other ERM),
** but this and display will adjust with the next click, levelup or battle.
**
** NOTE:
** - side effect with Arstahd's Enhanced Commander Artifacts (give hero skills)
**   As soon as an artifact with one of the three skills is obtained, player may
**   get instant Expert Warfare with just a few mouse clicks and without further
**   need for the Artifact thereafter
**   (by toggling the Warfare skills while repeatedly equipping the artifact).
**   Three free Expert skills for just temporarily having one artifact equipped. WOW!
**   And you can always give it to another hero or to a commander afterwards...
**
** uses vars (v248)
** uses vars v2398..99 (Tobyn universal vars, v2399/v2398 attacking/defending hero)
** uses fcts FU2340,2341
** uses strings z237..239 for skill names
** uses Universal Timer TM1/2 (day1)
** ONLY ACTIVE if v2365=1 (wogify option 193)

  INIT SKILL NAMES (leaves descriptions unchanged)
!?TM2&$day$=1/$once$=1/v2365=1;      triggers for first active color on day 1 only (if script active)
;                                      (will trigger after script03.erm skill enhancement)
!!UN:P54/?y-1;                         check if War Machines I is active (Overlord, script54, war machine levels)
!!UN:P55/?y-2;                         check if War Machines II is active (Arstahd, script55, Tent mid-battle Resurrection)
!!UN:P204/?y-3;                        check if First Aid I is active (Arstahd, script48, Tent post-battle Resurrection)
!!UN:P190/?y-4;                        check if First Aid II is active (Tobyn, script64 see above, Tent Cure spell)
!!UN:P201/?y-5;                        check if Artillery I is active (Arstahd, script48, pre-battle damage)
!!MA&y-1=0/y-2=0/y-3=0/y-4=0:P147/750; all First Aid Tents will have 750 HPs (if neither First Aid skill nor the Tent war machine itself are enhanced)
!!VRz237:Sz164039;                     if no warfare relevant skills were enhanced
!!VRz238:Sz164040;                      .
!!VRz239:Sz164041;                      .
!!VRz237|y-1=1/y-2=1:Sz164042;         if Ballistics enhanced by script 54 or 55
!!VRz238|y-5=1:Sz164043;               if Artillery enhanced by script 48
!!VRz239|y-3=1/y-4=1:Sz164044;         if First Aid enhanced by script 48 or 64
!!UN:G0/10/0/237 G0/20/0/238 G0/27/0/239;  set skill names to Warfare

  MANUALLY SET WARFARE MAIN SKILL
!?CM2&v2365=1;                       right-clicked at hero screen
!!CM:I?y-1;                            get right-click number (y-1) (79..102 is skill area)
!!CM:S?y-2;                            check left/right-click (=12 left click, =14 right click)
!!FU2345:Py-1/-1/?y-3/?y-4/?y-5;       call skill click function (in: click number and hero number, out: skill (y-3), area (y-4) and slot (y-5))
!!VRy-6|y-3=10/y-3=20/y-3=27:S1;       y-6 = 1 means either Bal, Art or FA was clicked
!!CM&y-1>78/y-1<103/y-6=1/y-4>1:R0;    if clicked text area of a Warfare skill, disable standard skill click reaction
!!FU2340&y-6=1:Py-4/y-2/y-3;           .. and call Warfare display function (in: skill area, left/right-click, skill)
!?FU2340;                            Warfare skill display and determination (x1=skill area, x2=click type, x3=skill)
!!VRy4&x2=12:S10;                      if left-click  then init y4:=10 (OK/Cancel buttons with three pics, two of them selectable)
!!VRy4&x2=14:S4;                       if right-click then init y4:=4 (no button)
!!CM&y4=0:R1;                          enable standard reaction if unidentified click and exit
!!FU&y4=0:E;       BUG COUNTERMEASURE (clicking non-functional-areas after Estates (with disabled std reaction) erroneously gives another msgbox and nasty side effects)
!!IF:W-1;                              set w var reference to current hero
!!VRy5:S0;                             init y5
!!VRy5&x1>1/x2=14:S1;                  set cycling "flag" y5 if right-clicked on text field (name or expertise)
!!FU2341:P-1/x3/y5;                    determine and set Warfare expertise (highest of all three skills) on current hero (-1)
!!HE-1:Sx3/?y6;                        get Warfare expertise
!!VRy1|w48<>10:S32 +y6;                (calculate correct display for type 10 message below...)
!!VRy1|w48=10:S62 +y6;                 (... which stores result (=1 left, =2 middle, =0 cancel)
!!VRy2|w48=0/w48=27:S62 +y6;           (... in v var instead of normally used dialogue flag)
!!VRy2|w48=10/w48=20:S83 +y6;           .
!!VRy3|w48=0/w48=27:S83 +y6;            .
!!VRy3|w48=10:S32 +y6;                  .
!!VRy3|w48=20:S62 +y6;                  .
!!VRv248:S0;                           init v248
!!VRz-1&v2360>0:Sz164045;              msgbox text if short skill description (script75) active
!!VRz-1&v2360=0:Sz164046;              if standard skill description (script75 inactive)
!!IF&x1>1:Q248/20/y1/20/y2/20/y3/y4^%Z-1^;  msg each time Warfare skill text field (name or expertise) is clicked
!!VRy7:S0;
!!VRy7&v248=1/w48=27:S10;                   v248 |  1   2   0
!!VRy7&v248=2/w48=27:S20;                 -------+-----------
!!VRy7&v248=1/w48=20:S10;                 w48=10 | 20  27  10
!!VRy7&v248=2/w48=20:S27;                     20 | 10  27  20
!!VRy7&v248=1/w48=10:S20;                     27 | 10  20  27
!!VRy7&v248=2/w48=10:S27;
!!FU2341&v248>0:P-1/y7/0;              determine and set Warfare expertise (highest of all three skills) on current hero (-1)
!!UN:R3/-1;                            redraw hero screen

  GET WARFARE MAIN SKILL AND EXPERTISE
!?FU2341;                  set Warfare main skill and expertise (x1=hero, x2= w48 or clicked Warfare skill, x3=if cycling)
!!FU&x2<>0/x2<>10/x2<>20/x2<>27:E; exit if skill parameter invalid (neither none, Bal, Art nor FA)
!!IF:Wx1;                    set w var reference to that hero
!!HEx1:S10/?y1 S20/?y2 S27/?y3; get expertise of all three Warfare skills (y1, y2, y3)
!!VRy4:Sy1;                  (calculate highest Warfare expertise (y4))
!!VRy4&y2>y4:Sy2;             .
!!VRy4&y3>y4:Sy3;             .
!!HEx1:S10/0 S20/0 S27/0;    remove any Warfare skill (to later guarantee they are the last displayed skills)
!!VRy6&x2=10/x3=1:S20;       cycle to display next skill (if skill text field (name or expertise) was right-clicked)
!!VRy6&x2=20/x3=1:S27;        .
!!VRy6&x2=27/x3=1:S10;        .
!!VRx2&x2>0/x3=1:Sy6;         .
!!VRx2&y4>0/x2=0:S10;        set Ballistics default if Warfare but no skill set for display yet
!!HEx1&y4>0/x2>0:Sx2/y4;     set max expertise to clicked/selected Warfare skill
!!VRw48&y4>0/x2>0:Sx2;       set hero var w48 to respective Warfare display skill
!!HEx1:S?y5;                 get number of skills shown (y5)
!!HEx1:S10/y4 S20/y4 S27/y4; give the other two skills at same expertise, but hide them afterwards
!!HEx1&x2=10:S0/20/1 S0/27/1; if Bal then hide Art and FA
!!HEx1&x2=20:S0/10/1 S0/27/1; if Art then hide Bal and FA
!!HEx1&x2=27:S0/10/1 S0/20/1; if FA  then hide Bal and Art
!!HEx1:Sy5;                  set back number of skills shown to avoid erroneous display

  TRIGGERS TO SET CORRECT EXPERTISE FOR THE OTHER TWO WARFARE SKILLS
!?HL-1&v2365=1;            hero levelup lets hero advance the other warfare skills to pre-levelup expertise [post-levelup trigger would be nice]
!!IF:W-1;                    set w var reference to current hero
!!FU2341:P-1/w48;            update Warfare skill levels and displayed skill
!?OB104&v2365=1;           University pre-visit trigger
!!IF:W-1;                    set w var reference to current hero
!!FU2341:P-1/w48;            update Warfare skill levels and displayed skill
!$OB104&v2365=1;           University post-visit trigger
!!IF:W-1;                    set w var reference to current hero
!!FU2341:P-1/w48;            update Warfare skill levels and displayed skill
**OB63/51&v2365=1;         Market of Time pre/post-visit trigger [NOT RECOMMENDED]
; pre-visit would still take place after script09 (Market of Time) effects
; -> problem now adressed and rectified in Market of Time script09
!$OB113&v2365=1;           Witch Hut post-visit trigger [pre-visit trigger might interfere with Advanced Witch Huts]
!!IF:W-1;                    set w var reference to current hero
!!FU2341:P-1/w48;            update Warfare skill levels and displayed skill
!?BA52&v2365=1;            battle has started (trigger for both sides)
!!BA:H0/?v2399 H1/?v2398;    store attacking/defending hero numbers
!!IF:Wv2399;                 set w var reference to attacking hero
!!FU2341:Pv2399/w48;         check attacking hero
!!IF&v2398>-1:Wv2398;          set w var reference to defending hero (if any)
!!FU2341&v2398>-1:Pv2398/w48;  check defending hero (if any)

评分

1

查看全部评分

  • TA的每日心情
    无聊
    2024-4-29 21:42
  • 签到天数: 3 天

    连续签到: 1 天

    [LV.2]野猪

    2735

    回帖

    11万

    金币

    1

    精华

    6级 Legendary Hero

    Rank: 6Rank: 6

    积分
    11625

    退役版主

    QQ
    发表于 2012-1-9 21:04:01 | 显示全部楼层
    这个真是纠结看不懂
  • TA的每日心情
    慵懒
    2019-8-17 09:46
  • 签到天数: 1158 天

    连续签到: 2 天

    [LV.10]圣龙

    2万

    回帖

    91万

    金币

    7

    精华

    论坛嘉宾

    守望论坛的稻草人

    Rank: 9Rank: 9Rank: 9

    积分
    87641

    社区QQ达人论坛守望者金牌裁判杰出贡献魅力之星TE联赛冠军

    发表于 2012-1-9 21:11:28 | 显示全部楼层
    WOG地图不管你是否WOG化,都会自动WOG化。
  • TA的每日心情
    开心
    昨天 18:17
  • 签到天数: 2644 天

    连续签到: 4 天

    [LV.Master]伴坛终老

    1万

    回帖

    16万

    金币

    0

    精华

    白银会员

    Rank: 5Rank: 5

    积分
    98639

    魅力之星

    QQ
    发表于 2012-1-9 21:31:09 | 显示全部楼层
    这个...........
    兄台,你是不是进去游戏没有选加强啊,64号可是官方的吧。
    该会员没有填写今日想说内容.

    该用户从未签到

    83

    回帖

    6172

    金币

    0

    精华

    2级 Adventuring Hero

    Rank: 2

    积分
    238
     楼主| 发表于 2012-1-9 21:35:40 | 显示全部楼层
    是官方的,我用的是清雨幽扬的选项设置,已经选加强了,但是在李多海变态之旅地图中,始终无法实现高级医疗术召唤出的多帐蓬和作战术功能
  • TA的每日心情
    开心
    2021-11-2 11:44
  • 签到天数: 754 天

    连续签到: 1 天

    [LV.10]圣龙

    8815

    回帖

    1万

    金币

    17

    精华

    论坛嘉宾

    寄蜉蝣于天地,渺沧海之一粟。

    Rank: 9Rank: 9Rank: 9

    积分
    42459

    退役版主社区QQ达人论坛守望者脚本测试狂论坛元老杰出贡献魅力之星

    发表于 2012-1-9 22:52:39 | 显示全部楼层

    回复 5# 的帖子

    呵呵,李多海是不允许进行WOG化的,寻梦人在地图里已经设置了很多好玩的ERM,楼主还是好好体会吧。至于你所说的那个ERM,离弦箭在ERM版块里已经整合出来了。
    “你看见的,是追随诸神脚步前进的埃拉西亚!”
    封神2.2黄金版 - 决战神之巅,英雄无敌世界的终极幻想

    该用户从未签到

    2446

    回帖

    6474

    金币

    0

    精华

    5级 Honorable Hero

    Rank: 5Rank: 5

    积分
    3313

    退役版主

    发表于 2012-1-9 23:14:07 | 显示全部楼层
    对地,这个脚本不能用在李多海上的啊
  • TA的每日心情

    2016-11-6 01:55
  • 签到天数: 548 天

    连续签到: 2 天

    [LV.9]龙巫妖

    1万

    回帖

    363万

    金币

    1

    精华

    论坛嘉宾

    狼行天下

    Rank: 9Rank: 9Rank: 9

    积分
    100624

    退役版主论坛守望者魅力之星

    发表于 2012-1-10 00:07:24 | 显示全部楼层
    有些自定制的BT地图可能是作者限制或者修改了此加强脚本的功效吧,普通随机地图肯定没问题的,最多有些小BUG而已吧。
    1、英雄无敌3追随神迹下载整合,总有一款适合你!
    2、WOG地图下载汇总,一网打尽!!
    3、三宝书等卷轴下载,新手必看!!老手必藏!!
    4、广大会员们有福了!论坛之星大红包!!
    5、WOG大陆英雄酒馆火爆营业中!!
    6、没有WOG币?来领红包!
    7、最火爆的WOG讨论群QQ36152349和超级群75673563,期待你的加入
    8、WOG中文站微博 http://t.sina.com.cn/wogcn
    9、登录后点击导航栏左侧的“查看新帖”非常方便
  • TA的每日心情
    开心
    2020-9-28 13:05
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]投石矮人

    982

    回帖

    6880

    金币

    0

    精华

    5级 Honorable Hero

    Rank: 5Rank: 5

    积分
    3842
    发表于 2012-1-10 04:52:26 | 显示全部楼层
    原帖由 兽哥哥 于 2012-1-9 21:11 发表
    WOG地图不管你是否WOG化,都会自动WOG化。

    兽哥哥还没仔细看过清雨修改的推荐帖吧,建议多看几遍。

    该用户从未签到

    83

    回帖

    6172

    金币

    0

    精华

    2级 Adventuring Hero

    Rank: 2

    积分
    238
     楼主| 发表于 2012-1-10 08:23:44 | 显示全部楼层
    嘿嘿,我就喜欢在别人做的地图上加上自己喜欢的脚本,不过我加了后不发布,只是自己玩,应该不玩侵权吧,我喜欢玩游戏,不喜欢被游戏玩。
  • TA的每日心情
    开心
    2021-11-2 11:44
  • 签到天数: 754 天

    连续签到: 1 天

    [LV.10]圣龙

    8815

    回帖

    1万

    金币

    17

    精华

    论坛嘉宾

    寄蜉蝣于天地,渺沧海之一粟。

    Rank: 9Rank: 9Rank: 9

    积分
    42459

    退役版主社区QQ达人论坛守望者脚本测试狂论坛元老杰出贡献魅力之星

    发表于 2012-1-10 10:35:00 | 显示全部楼层

    回复 10# 的帖子

    楼主,你这样做很容易变量冲突之类的错误的,像巫妖王、李多海、精灵光复、阿泰3、三国同心等,里面蓄含了很多的ERM,你如果没有完全读懂这些的话,随便加一个脚本都有可能引起错误。像那个诸神的所有变量,都是经过精心整合的,你添加一个脚本都有可能引起未知的错误。
    “你看见的,是追随诸神脚步前进的埃拉西亚!”
    封神2.2黄金版 - 决战神之巅,英雄无敌世界的终极幻想
  • TA的每日心情
    郁闷
    2018-12-26 07:27
  • 签到天数: 449 天

    连续签到: 2 天

    [LV.9]龙巫妖

    8929

    回帖

    107万

    金币

    3

    精华

    10级 Undefeatable Hero

    Rank: 10Rank: 10Rank: 10

    积分
    141106

    退役版主社区QQ达人魅力之星TE联赛季军脚本测试狂

    QQ
    发表于 2012-1-10 10:40:51 | 显示全部楼层
    原帖由 king200101 于 2012-1-10 08:23 发表
    嘿嘿,我就喜欢在别人做的地图上加上自己喜欢的脚本,不过我加了后不发布,只是自己玩,应该不玩侵权吧,我喜欢玩游戏,不喜欢被游戏玩。


    那你真的很好,是玩游戏的人,但要发表自己的观点,对大家都有好处

    该用户从未签到

    83

    回帖

    6172

    金币

    0

    精华

    2级 Adventuring Hero

    Rank: 2

    积分
    238
     楼主| 发表于 2012-1-10 10:43:42 | 显示全部楼层
    谢谢各位同学的关心,非常期待能把俺要的脚本给整出来

    该用户从未签到

    1546

    回帖

    2万

    金币

    4

    精华

    论坛嘉宾

    Rank: 9Rank: 9Rank: 9

    积分
    9883

    退役版主杰出贡献中流砥柱论坛元老

    发表于 2012-1-10 11:57:23 | 显示全部楼层
    ZVSE
    _WARNING_#1=IMPORTANT! This file is not in a plain text format. NEVER use any editor except ERM_S for making any kind of changes!
    ERMS_PoweredBy=ERM Scripter v. 2004.10.5.945
    ERMS_ScriptDate=12.9(September).2006

    ** All My Scripts (2005 Sept 12)                          (for WoG v3.58f script update)
    ** by Tobyn
    ** with big thanks to Fnord and the team for all their advice
    **
    ** Each scriptlet is fully documented and contains a separate variables list.
    ** Vars v2361-v2367 are script activity "flags" for my scriptlets here.
    ** To enable a script, set respective var to 1 (normally Wogify Options will set them).
    **
    ** Some scriptlets use my Universal Timer (which automatically runs with Wogify
    ** script00.erm). If you want to use them without wogify, e.g. by copying the code,
    ** enable UniTimer by setting v2370 to 1 in the following line (change S0 to S1 there).

    !#VRv2370:S0;              disabled Universal Timer setup and calculations (because already done by Wogify script00.erm)
    !#UN:P193/?v2365;          check if Warfare is enabled in WoGify Options
    !#UN:P75/?v2360;           check if Short Skill descriptions (script75.erm, Hermann the Weird) are enabled

    **
    ** --------> TOBYN'S SCRIPTS (script64.erm)   (2005 Aug 25)
    ** Author: Tobyn
    ** Scriptlets:
    **  (Universal Timer), Tobyn Library Functions, Advanced Witch Huts, Transfer Owner,
    **  Estates Enhanced, First Aid Enhanced, Warfare, Conflux/Rampart Monster Change
    ** ERM WoG Option Numbers: 64, 188-194
    ** Flags: 230-239 claimed                               (and 236-239 used)
    ** Permanent Variables: w47, w48, v2300-v2399 claimed   (and v2301-v2334, v2360-v2399 used)
    ** Temporary Variables: m-t, flag 1, v248
    ** Timers: TM1, TM2 (both together with script00.erm form the Universal Timer)
    ** Functions: FU2300-FU2399 claimed                     (and FU2332-FU2345 used)
    ** Strings: z232-z239 claimed                           (and z237-239 used)
    ** Macros: $month$,$weeks$,$week$,$day$,$weekday$,$AI$,$color$,$once$,
    **         $red$,$blue$,$tan$,$green$,$orange$,$purple$,$teal$,$pink$,
    **         $monday$,$tuesday$,$wednesday$,$thursday$,$friday$,$saturday$,$sunday$

    ******************************************************************************************

    ** UNIVERSAL TIMER (2004 September 19)                          (for WoG v3.58)
    ** by Tobyn
    **
    ** This scriptlet gives another, more universal approach on Timers.
    ** You now can use predefined timed conditions with triggers,
    ** not only have predefined timers.
    ** Timer 1 will be used to calculate several often-used conditions.
    ** Timer 2 trigger now may use that calculated stuff as conditions.
    **
    ** Instead of defining a new timer when you need one, merely use and
    ** call timer 2 (TM2) trigger with following conditions (leave out irrelevant ones)
    ** v2396 or $month$     current month (cont count like standard HoMM3 itself: month 12,13,...)
    ** v2395 or $color$     current player color (0..7, or from $red$ to $pink$)
    ** v2394 or $AI$        current player status (=0 if human only, =1 if AI only, ignore if irrelevant)
    ** v2393 or $weekday$   current weekday (1..7, or from $monday$ to $sunday$)
    ** v2392 or $day$       current day (c is current day, but sometimes direct comparison with c won't work)
    ** v2391 or $once$      once-on-that-day flag (irrespective of real color: first active color sets, others reset)
    ** v2390                (internal day comparator for once-on-that-day flag v2391)
    ** v2389 or $weeks$     current weeks in total  (1,2,3,4,5,6,...)
    ** v2388 or $week$      current week in a month (1,2,3,4,1,2,...)
    **
    ** Never try to set v2371..96 or "c" var, just get/read them where needed.
    **
    ** Then every script can use local TM2 trigger with conditions
    ** - e.g. trigger only if color=green, status=human and weekday=tuesday
    ** - omit conditions which don't matter (e.g. if color or human/AI irrelevant, or weekday for a daily trigger)
    **
    ** If you need other calculations done (e.g. 10-day period starting with the second month)
    ** just call TM1 locally and calculate whatever you need for your next TM2 trigger condition
    **
    ** uses TM1,2 and Tobyn universal vars v2371..v2395
    ** uses macros $day$, $weekday$, $week$, $weeks$, $month$, $AI$, $color$, $once$
    ** -- for easy usage of colors and weekdays, further macros are defined and initialized
    ** uses macros $red$, $blue$, $tan$, $green$, $orange$, $purple$, $teal$, $pink$
    ** uses macros $monday$, $tuesday$, $wednesday$, $thursday$, $friday$, $saturday$, $sunday$


      UNIVERSAL TIMER INIT

    !#TM1:S1/999/1/255;    triggers every color every day
    !#TM2:S1/999/1/255;    same but triggers only *after* all calculations from TM1 are done
    !#VRv2396:S1;          init v2396 month indicator (starts with month 1)
    !#VRv2390:S1;          init v2390 day comparator (c also starts with day 1 value)
    !#VRv2370:S1;
    !#VRv2365:S1;


      UNIVERSAL TIMER GLOBAL CALL EVERY DAY

    !?TM1&v2370=1;             GLOBAL CALL (careful: only one instance of these calculations allowed, which should normally be done by wogify script00.erm)
    !!OW:C?v2395;                get current player color (0..7)
    !!OW:Iv2395/?v2394;          get current player status (0=human, 1=AI)
    !!VRv2393:Sc %7;             set weekday (mon=1..sat=6,sun=0)
    !!VRv2393&v2393=0:S7;        set sunday=7 instead of sunday=0
    !!VRv2392:Sc;                set current day (comparison with c doesn't work in the next two lines)
    !!VRv2391&v2390=v2392:S1;    set once-on-that-day flag (only first active color)
    !!VRv2391&v2390>v2392:S0;    reset that flag (at second active color each day)
    !!VRv2390&v2391=1:+1;        inc day comparator (needed for flag)
    !!VRv2389&v2391=1:Sc -1 :7 +1; set weeks (cont count)
    !!VRv2388&v2393=1/v2391=1:+1; inc  week counter by 1 for each monday
    !!VRv2396&v2388=5/v2391=1:+1; inc month counter by 1 for each 5th week
    !!VRv2388&v2388=5/v2391=1:S1; reset week counter for each new month


    ******************************************************************************************

    ** WARFARE (2004 September 19)                                  (for WoG v3.58)
    ** by Tobyn
    **
    ** This script combines the three war machine skills Artillery, Ballistics
    ** and First Aid and treats them as one skill. This new Warfare "skill"
    ** gives you control over all three War Machines and standard SoD abilities
    ** from all three skills.
    **
    ** First Aid Tents get 750 HPs (only if no other First Aid enhancements active).
    **
    ** Whenever a hero has one or more of the skills and a battle starts,
    ** the hero will get all three skills at the highest expertise available.
    ** Similar if clicked on any warfare skill in hero screen, but:
    ** - if clicked on icon of any Warfare skill, you get standard skill description
    ** - if clicked on text (name or expertise), you get another msgbox instead
    **   (left-click lets you choose, right-click cycles the displayed Warfare skill)
    **
    ** Hero might temporarily have diverging expertises in the three Warfare
    ** skills while on adventure map (e.g. via Witch Huts or through other ERM),
    ** but this and display will adjust with the next click, levelup or battle.
    **
    ** NOTE:
    ** - side effect with Arstahd's Enhanced Commander Artifacts (give hero skills)
    **   As soon as an artifact with one of the three skills is obtained, player may
    **   get instant Expert Warfare with just a few mouse clicks and without further
    **   need for the Artifact thereafter
    **   (by toggling the Warfare skills while repeatedly equipping the artifact).
    **   Three free Expert skills for just temporarily having one artifact equipped. WOW!
    **   And you can always give it to another hero or to a commander afterwards...
    **
    ** uses vars (v248)
    ** uses vars v2398..99 (Tobyn universal vars, v2399/v2398 attacking/defending hero)
    ** uses fcts FU2340,2341
    ** uses strings z237..239 for skill names
    ** uses Universal Timer TM1/2 (day1)
    ** ONLY ACTIVE if v2365=1 (wogify option 193)


      INIT SKILL NAMES (leaves descriptions unchanged)

    !?TM2&v2392=1/v2391=1/v2365=1;         triggers for first active color on day 1 only (if script active)
    ;                                      (will trigger after script03.erm skill enhancement)
    !!UN:P54/?y-1;                         check if War Machines I is active (Overlord, script54, war machine levels)
    !!UN:P55/?y-2;                         check if War Machines II is active (Arstahd, script55, Tent mid-battle Resurrection)
    !!UN:P204/?y-3;                        check if First Aid I is active (Arstahd, script48, Tent post-battle Resurrection)
    !!UN:P190/?y-4;                        check if First Aid II is active (Tobyn, script64 see above, Tent Cure spell)
    !!UN:P201/?y-5;                        check if Artillery I is active (Arstahd, script48, pre-battle damage)

    !!MA&y-1=0/y-2=0/y-3=0/y-4=0:P147/750; all First Aid Tents will have 750 HPs (if neither First Aid skill nor the Tent war machine itself are enhanced)

    !!VRz237:S^战争机器(弹道)^;                     if no warfare relevant skills were enhanced
    !!VRz238:S^战争机器(炮术)^;                      .
    !!VRz239:S^战争机器(急救)^;                      .
    !!VRz237|y-1=1/y-2=1:S^{战争机器(弹道)}^;         if Ballistics enhanced by script 54 or 55
    !!VRz238|y-5=1:S^{战争机器(炮术)}^;               if Artillery enhanced by script 48
    !!VRz239|y-3=1/y-4=1:S^{战争机器(急救)}^;         if First Aid enhanced by script 48 or 64

    !!UN:G0/10/0/237 G0/20/0/238 G0/27/0/239;  set skill names to Warfare


      MANUALLY SET WARFARE MAIN SKILL

    !?CM2&v2365=1;                         right-clicked at hero screen
    !!CM:I?y-1;                            get right-click number (y-1) (79..102 is skill area)
    !!CM:S?y-2;                            check left/right-click (=12 left click, =14 right click)
    !!FU2345:Py-1/-1/?y-3/?y-4/?y-5;       call skill click function (in: click number and hero number, out: skill (y-3), area (y-4) and slot (y-5))
    !!VRy-6|y-3=10/y-3=20/y-3=27:S1;       y-6 = 1 means either Bal, Art or FA was clicked
    !!CM&y-1>78/y-1<103/y-6=1/y-4>1:R0;    if clicked text area of a Warfare skill, disable standard skill click reaction
    !!FU2340&y-6=1:Py-4/y-2/y-3;           .. and call Warfare display function (in: skill area, left/right-click, skill)

    !?FU2340;                            Warfare skill display and determination (x1=skill area, x2=click type, x3=skill)
    !!VRy4&x2=12:S10;                      if left-click  then init y4:=10 (OK/Cancel buttons with three pics, two of them selectable)
    !!VRy4&x2=14:S4;                       if right-click then init y4:=4 (no button)
    !!CM&y4=0:R1;                          enable standard reaction if unidentified click and exit
    !!FU&y4=0:E;       BUG COUNTERMEASURE (clicking non-functional-areas after Estates (with disabled std reaction) erroneously gives another msgbox and nasty side effects)
    !!IF:W-1;                              set w var reference to current hero
    !!VRy5:S0;                             init y5
    !!VRy5&x1>1/x2=14:S1;                  set cycling "flag" y5 if right-clicked on text field (name or expertise)
    !!FU2341:P-1/x3/y5;                    determine and set Warfare expertise (highest of all three skills) on current hero (-1)
    !!HE-1:Sx3/?y6;                        get Warfare expertise

    !!VRy1|w48<>10:S32 +y6;                (calculate correct display for type 10 message below...)
    !!VRy1|w48=10:S62 +y6;                 (... which stores result (=1 left, =2 middle, =0 cancel)
    !!VRy2|w48=0/w48=27:S62 +y6;           (... in v var instead of normally used dialogue flag)
    !!VRy2|w48=10/w48=20:S83 +y6;           .
    !!VRy3|w48=0/w48=27:S83 +y6;            .
    !!VRy3|w48=10:S32 +y6;                  .
    !!VRy3|w48=20:S62 +y6;                  .
    !!VRv248:S0;                           init v248
    !!VRz-1&v2360>0:S^{战争机器}

    {炮术 + 弹道术 + 急救
    {控制所有的战争机器
    {实现特技增强
    {单击图标查看描述^;              msgbox text if short skill description (script75) active
    !!VRz-1&v2360=0:S^{战争机器}

    战争机器兼有下面显示的三种技能
    让你控制三种战争机器。
    特技增强拥有{黄色}名字的技能。
    右键点击查看描述。
    你也可以选择在单技能槽中显示哪一种技能。
    另外二种技能隐藏起来了(单击经验图标)
    三种技能共享同一经验值。^;              if standard skill description (script75 inactive)

    !!IF&x1>1:Q248/20/y1/20/y2/20/y3/y4^%Z-1^;  msg each time Warfare skill text field (name or expertise) is clicked

    !!VRy7:S0;
    !!VRy7&v248=1/w48=27:S10;                   v248 |  1   2   0
    !!VRy7&v248=2/w48=27:S20;                 -------+-----------
    !!VRy7&v248=1/w48=20:S10;                 w48=10 | 20  27  10
    !!VRy7&v248=2/w48=20:S27;                     20 | 10  27  20
    !!VRy7&v248=1/w48=10:S20;                     27 | 10  20  27
    !!VRy7&v248=2/w48=10:S27;
    !!FU2341&v248>0:P-1/y7/0;              determine and set Warfare expertise (highest of all three skills) on current hero (-1)
    !!UN:R3/-1;                            redraw hero screen


      GET WARFARE MAIN SKILL AND EXPERTISE

    !?FU2341;                  set Warfare main skill and expertise (x1=hero, x2= w48 or clicked Warfare skill, x3=if cycling)
    !!FU&x2<>0/x2<>10/x2<>20/x2<>27:E; exit if skill parameter invalid (neither none, Bal, Art nor FA)
    !!IF:Wx1;                    set w var reference to that hero
    !!HEx1:S10/?y1 S20/?y2 S27/?y3; get expertise of all three Warfare skills (y1, y2, y3)
    !!VRy4:Sy1;                  (calculate highest Warfare expertise (y4))
    !!VRy4&y2>y4:Sy2;             .
    !!VRy4&y3>y4:Sy3;             .
    !!HEx1:S10/0 S20/0 S27/0;    remove any Warfare skill (to later guarantee they are the last displayed skills)
    !!VRy6&x2=10/x3=1:S20;       cycle to display next skill (if skill text field (name or expertise) was right-clicked)
    !!VRy6&x2=20/x3=1:S27;        .
    !!VRy6&x2=27/x3=1:S10;        .
    !!VRx2&x2>0/x3=1:Sy6;         .
    !!VRx2&y4>0/x2=0:S10;        set Ballistics default if Warfare but no skill set for display yet
    !!HEx1&y4>0/x2>0:Sx2/y4;     set max expertise to clicked/selected Warfare skill
    !!VRw48&y4>0/x2>0:Sx2;       set hero var w48 to respective Warfare display skill
    !!HEx1:S?y5;                 get number of skills shown (y5)
    !!HEx1:S10/y4 S20/y4 S27/y4; give the other two skills at same expertise, but hide them afterwards
    !!HEx1&x2=10:S0/20/1 S0/27/1; if Bal then hide Art and FA
    !!HEx1&x2=20:S0/10/1 S0/27/1; if Art then hide Bal and FA
    !!HEx1&x2=27:S0/10/1 S0/20/1; if FA  then hide Bal and Art
    !!HEx1:Sy5;                  set back number of skills shown to avoid erroneous display


      TRIGGERS TO SET CORRECT EXPERTISE FOR THE OTHER TWO WARFARE SKILLS

    !?HL-1&v2365=1;            hero levelup lets hero advance the other warfare skills to pre-levelup expertise [post-levelup trigger would be nice]
    !!IF:W-1;                    set w var reference to current hero
    !!FU2341:P-1/w48;            update Warfare skill levels and displayed skill

    !?OB104&v2365=1;           University pre-visit trigger
    !!IF:W-1;                    set w var reference to current hero
    !!FU2341:P-1/w48;            update Warfare skill levels and displayed skill

    !$OB104&v2365=1;           University post-visit trigger
    !!IF:W-1;                    set w var reference to current hero
    !!FU2341:P-1/w48;            update Warfare skill levels and displayed skill

    **OB63/51&v2365=1;         Market of Time pre/post-visit trigger [NOT RECOMMENDED]
    ; pre-visit would still take place after script09 (Market of Time) effects
    ; -> problem now adressed and rectified in Market of Time script09

    !$OB113&v2365=1;           Witch Hut post-visit trigger [pre-visit trigger might interfere with Advanced Witch Huts]
    !!IF:W-1;                    set w var reference to current hero
    !!FU2341:P-1/w48;            update Warfare skill levels and displayed skill

    !?BA52&v2365=1;            battle has started (trigger for both sides)
    !!BA:H0/?v2399 H1/?v2398;    store attacking/defending hero numbers
    !!IF:Wv2399;                 set w var reference to attacking hero
    !!FU2341:Pv2399/w48;         check attacking hero
    !!IF&v2398>-1:Wv2398;          set w var reference to defending hero (if any)
    !!FU2341&v2398>-1:Pv2398/w48;  check defending hero (if any)

    ******************************************************************************************



    楼主自行测试。有问题及时反馈。

    [ 本帖最后由 fastarrow 于 2012-1-10 11:58 编辑 ]

    该用户从未签到

    83

    回帖

    6172

    金币

    0

    精华

    2级 Adventuring Hero

    Rank: 2

    积分
    238
     楼主| 发表于 2012-1-10 12:38:26 | 显示全部楼层
    一个问题,用wog化的地图,开启战争武器加强II和辅助技能强化的情况下,不论英雄是否装备帐蓬,学会医疗术后战斗时就应该带着多帐蓬的,帐蓬数等于英雄等级,可是我把离弦箭写的代码加入地图后,战斗中并没有出现多帐蓬,请帮忙看看

    该用户从未签到

    2446

    回帖

    6474

    金币

    0

    精华

    5级 Honorable Hero

    Rank: 5Rank: 5

    积分
    3313

    退役版主

    发表于 2012-1-10 23:40:19 | 显示全部楼层
    不太懂哎,帮你顶一下了
  • TA的每日心情

    2015-7-19 15:36
  • 签到天数: 5 天

    连续签到: 1 天

    [LV.2]野猪

    79

    回帖

    6466

    金币

    0

    精华

    2级 Adventuring Hero

    Rank: 2

    积分
    498
    发表于 2012-1-20 20:25:24 | 显示全部楼层
    都是脚本高手呀。
    ahome_bigavatar:guest
    ahome_bigavatar:welcomelogin
    您需要登录后才可以回帖 登录 | 英雄注册|Register

    本版积分规则

    捐赠
    关注我们,英3Mod一网打尽!

    WoG中文站 ( 辽B2-20210485-10 )|辽公网安备 21128202000228 号

    GMT+8, 2024-12-27 01:07 , Processed in 0.758139 second(s), 14 queries , Gzip On, File On.

    Powered by Discuz! X3.4

    Copyright © 2004-2022, Beijing Second Sight Technology Co., LTD.

    快速回复 返回顶部 返回列表