骑马与砍杀中文站论坛

 找回密码
 注册(Register!)

QQ登录

只需一步,快速开始

搜索
购买CDKEY 衣谷三国
查看: 11817|回复: 53

[功能与代码] 【战团】一键给领主刷兵,刷满!所有领主+阵营兵,提高...

  [复制链接]

34

主题

243

回帖

198

积分

见习骑士

Rank: 3

UID
2462463
第纳尔
1607
精华
0
互助
23
荣誉
0
贡献
0
魅力
85
注册时间
2015-3-3
鲜花(62) 鸡蛋(0)
发表于 2023-2-27 10:59:26 | 显示全部楼层 |阅读模式
本帖最后由 agjib 于 2023-10-23 23:00 编辑

代码环境1.171

刷兵触发器已经到处是了,我只是加了点功能:自动识别想要的国家,给国家所有领主都加对应阵营兵。建议给敌国使用,提高团战规模。

代码实际效果:把玩家身处A国任意城、村时,使用该触发器,会给A国所有活着的领主添加A国兵种,并给领主回血。
左下角会提示成功刷兵的领主数量,为0的时候代表所有领主都满了,不用刷了。目前刷兵上限是93人(修改方式空格93空格,改为自己要的数字)。

代码使用方式:魔球触发器。例如随便选个武器,最后边触发器,右键新建触发器,触发选武器攻击。然后把下面的抄进去即可。不用新开档,直接能用。
11.jpg 444.jpg 部队补给.jpg 22.jpg


txt码:
2133 2 1224979098644774912 0 2133 2 1224979098644774913 9999999 11 1 1224979098644774914 521 3 1224979098644774915 1224979098644774914 0 1073741855 2 1224979098644774915 3 31 2 1224979098644774915 2 2281 3 1224979098644774916 0 1224979098644774914 2147483678 2 1224979098644774916 1224979098644774913 2133 2 1224979098644774913 1224979098644774916 2133 2 1224979098644774912 1224979098644774914 3 0 2204 2 1224979098644774917 1224979098644774912 2133 2 144115188075855883 0 11 1 1224979098644774918 132 1 1224979098644774918 521 3 1224979098644774915 1224979098644774918 0 2204 2 1224979098644774919 1224979098644774918 31 2 1224979098644774919 1224979098644774917 1601 2 1224979098644774920 1224979098644774918 2133 2 1224979098644774921 93 2147483678 2 1224979098644774920 1224979098644774921 522 3 1224979098644774922 1224979098644774919 77 522 3 1224979098644774923 1224979098644774919 78 522 3 1224979098644774924 1224979098644774919 79 2133 2 1224979098644774925 0 2136 3 1224979098644774926 0 100 4 0 30 2 1224979098644774926 163 1073741855 2 1224979098644774915 3 31 2 1224979098644774915 2 4 0 2147483678 2 1224979098644774926 65 2133 2 1224979098644774925 1224979098644774922 5 0 2133 2 1224979098644774925 1224979098644774923 3 0 5 0 31 2 1224979098644774915 13 4 0 2147483678 2 1224979098644774926 50 2133 2 1224979098644774925 1224979098644774922 5 0 2147483678 2 1224979098644774926 75 2133 2 1224979098644774925 1224979098644774923 5 0 2133 2 1224979098644774925 1224979098644774924 3 0 3 0 4 0 32 2 1224979098644774925 0 1675 2 1224979098644774918 1224979098644774925 1675 2 1224979098644774918 1224979098644774925 1675 2 1224979098644774918 1224979098644774925 1652 3 1224979098644774927 1224979098644774918 0 1560 2 1224979098644774927 97 2120 3 144115188075855883 144115188075855883 1 3 0 3 0 2335 2 50 1224979098644774917 2133 2 72057594037927937 144115188075855883 2320 2 51 216172782113783817 1106 2 216172782113783818 3715294   




py码:开头是自己的,中间刷兵抄script_cf_reinforce_party
    #Agland
      #(store_faction_of_party, ":cur_faction", "$g_encountered_party"),
        (assign, ":encount_party", 0),
        (assign, ":min_distance", 9999999),
        (try_for_parties,":center_no"),
            (party_get_slot,":party_type",":center_no",0),
            (this_or_next|eq, ":party_type", spt_town),
            (eq, ":party_type", spt_castle),
            (store_distance_to_party_from_party, ":party_distance", 0, ":center_no"),
            (lt, ":party_distance", ":min_distance"),
            (assign, ":min_distance", ":party_distance"),
            (assign, ":encount_party", ":center_no"),
        (try_end),         
        (store_faction_of_party, ":cur_faction", ":encount_party"),
      (assign, "$reserved_12", 0),
      (try_for_parties,":party_no"),
        (party_is_active, ":party_no"),
        (party_get_slot,":party_type",":party_no",0),
        (store_faction_of_party, ":party_faction", ":party_no"),
        (eq, ":party_faction", ":cur_faction"),
        (party_get_num_companions, ":party_size", ":party_no"),
        (assign, ":ideal_size",93),
        (lt,":party_size",":ideal_size"),
        (faction_get_slot, ":party_template_a", ":party_faction", slot_faction_reinforcements_a),
        (faction_get_slot, ":party_template_b", ":party_faction", slot_faction_reinforcements_b),
        (faction_get_slot, ":party_template_c", ":party_faction", slot_faction_reinforcements_c),
        (assign, ":party_template", 0),
        (store_random_in_range, ":rand", 0, 100),
        (try_begin),
          (ge, ":rand", 163),
          (this_or_next|eq, ":party_type", spt_town),
          (eq, ":party_type", spt_castle), #CASTLE OR TOWN
          (try_begin),
            (lt, ":rand", 65),
            (assign, ":party_template", ":party_template_a"),
          (else_try),
            (assign, ":party_template", ":party_template_b"),
          (try_end),
        (else_try),
          (eq, ":party_type", spt_kingdom_hero_party),
          (try_begin),
            (lt, ":rand", 50),
            (assign, ":party_template", ":party_template_a"),
          (else_try),
            (lt, ":rand", 75),
            (assign, ":party_template", ":party_template_b"),
          (else_try),
            (assign, ":party_template", ":party_template_c"),
          (try_end),
        (try_end),

        (try_begin),
          (gt, ":party_template", 0),
          (party_add_template, ":party_no", ":party_template"),
          (party_add_template, ":party_no", ":party_template"),
          (party_add_template, ":party_no", ":party_template"),
          (party_stack_get_troop_id, ":party_leader", ":party_no", 0),
          (troop_set_health, ":party_leader", 97),
          #(heal_party,":party_no"),#Not working......
          (store_add,"$reserved_12","$reserved_12",1),
        (try_end),

      (try_end),
      (str_store_faction_name, s50, ":cur_faction"),
      (assign, reg1, "$reserved_12"),
      (str_store_string, s51, "str_reg1"),
      (display_message, "str_s50_comma_s51",0x38B0DE),
    #Agland









评分

参与人数 2第纳尔 +30 互助 +1 魅力 +1 收起 理由
幼稚园殺手 + 10 + 1 文章不错,继续努力!
vegetto + 20 + 1 文章不错,继续努力!

查看全部评分

您需要登录后才可以回帖 登录 | 注册(Register!)

本版积分规则

Archiver|手机版|小黑屋|骑马与砍杀中文站

GMT+8, 2025-9-30 02:46 , Processed in 0.103810 second(s), 21 queries , Gzip On, MemCached On.

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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