佳丽云

英雄无敌3-WoG中文站

 找回密码
 英雄注册|Register
查看: 5497|回复: 2

New script: disables the negative experience bug

[复制链接]

该用户从未签到

409

回帖

8927

金币

4

精华

论坛嘉宾

Rank: 9Rank: 9Rank: 9

积分
1187
发表于 2009-2-13 13:55:04 | 显示全部楼层 |阅读模式
This script will restore automatically your experience if it goes into the negative. It happens on almost all my maps and in Chaser too (after the 9999x7 azure dragons)

ZVSE

** script to prevent creature experience reduction due to overflow. JHV,
2/3/2009

** uses v7090-v7103 to store troop ranks @ start of battle
** uses FU459-FU462

!?BA0&1000; start of (human) battle
!!BA:H0/?v1; get attacker hero #
!!BA:H1/?v2; get defender hero # (if any)
!!DO459/0/6/1&v1>-1/v1<156:Pv1; check stacks 0-6 for attacker
!!DO460/0/6/1&v2>-1/v2<156:Pv2; check stacks 0-6 for defender


!?FU459; get exp. rank of troop in slot x16 of hero x1, store in v[7090+x16]
!!HEx1:C0/x16/?y1/?y2/?y3/2; y1=type, y2=no., y3=experience
!!VRv5:S7090+x16;
!!VRvv5:Sy3;

!?FU460; get exp. rank of troop in slot x16 of hero x1, store in v[7097+x16]
!!HEx1:C0/x16/?y1/?y2/?y3/2; y1=type, y2=no., y3=experience
!!VRv5:S7097+x16;
!!VRv5:Sy3;

!?BA1&1000; end of (human) battle
!!BA:H0/?v1; get attacker hero #
!!BA:H1/?v2; get defender hero # (if any)
!!VRv3:C-1/-1; set v3 & v4 to -1
!!HEv1&v1>-1/v1<156:O?v3; get attacker's Owner - will be 0-7 if attacker won
!!HEv2&v2>-1/v2<156:O?v4; get defender's Owner - will be 0-7 if defender won
!!DO461/0/6/1&v3>-1/v3<8:Pv1; check stacks 0-6 for attacker
!!DO462/0/6/1&v4>-1/v4<8:Pv2; check stacks 0-6 for defender

!?FU461; get exp. rank of troop in slot x16 of hero x1, vs. v[7090+x16]
!!HEx1:C0/x16/?y1/?y2/?y3/2; y1=type, y2=no., y3=experience
!!FU&y2<1:E; quit if no troops left in slot
!!VRv5:S7090+x16;
!!VRy4:Svv5;
!!HEx1&y4>y3:C0/x16/d/d/11/12; set rank to 11 if negative experience was
gained (overflow occurred)

!?FU462; get exp. rank of troop in slot x16 of hero x1, vs. v[7097+x16]
!!HEx1:C0/x16/?y1/?y2/?y3/2; y1=type, y2=no., y3=experience
!!FU&y2<1:E; quit if no troops left in slot
!!VRv5:S7097+x16;
!!VRy4:Svv5;
!!HEx1&y4>y3:C0/x16/d/d/11/12; set rank to 11 if negative experience was
gained (overflow occurred)
!!IF&610:V616/1;

[ 本帖最后由 Salamandre 于 2009-2-18 19:20 编辑 ]

评分

2

查看全部评分

  • TA的每日心情

    2022-10-15 22:15
  • 签到天数: 621 天

    连续签到: 1 天

    [LV.9]龙巫妖

    330

    回帖

    6162

    金币

    1

    精华

    白银会员

    Rank: 5Rank: 5

    积分
    21430
    发表于 2009-2-20 16:18:30 | 显示全部楼层
    Thanks! It's a really useful script!
  • TA的每日心情
    开心
    2019-1-31 14:25
  • 签到天数: 130 天

    连续签到: 1 天

    [LV.7]血污怪

    2778

    回帖

    2万

    金币

    14

    精华

    论坛嘉宾

    Rank: 9Rank: 9Rank: 9

    积分
    14801

    退役版主社区QQ达人魅力之星

    发表于 2009-8-25 14:36:28 | 显示全部楼层
    thank you.very useful.
    ahome_bigavatar:guest
    ahome_bigavatar:welcomelogin
    您需要登录后才可以回帖 登录 | 英雄注册|Register

    本版积分规则

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

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

    GMT+8, 2024-12-23 08:47 , Processed in 0.444877 second(s), 14 queries , Gzip On, File On.

    Powered by Discuz! X3.4

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

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