yunings 发表于 2009-2-10 11:08:22

修正生物经验溢出Bug,BT地图必备脚本!

帖子转自HC(http://heroescommunity.com/viewthread.php3?TID=28885),该脚本的作者:James Vogan
脚本的作用:消除海量兵种在BT地图作战时生物经验变负的bug。
脚本内容: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
!!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
!!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
!!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
!!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;帖子提供成品ERM下载,我将脚本编号设置成了78,如果和你的脚本编号有冲突,请自行更改。脚本需放置在Data\s文件夹中方可生效。
云斯原版

原帖由 老实猪 于 2009-4-13 16:56 发表 http://bbs.h3wog.com/images/common/back.gif


上面是yunings的原帖,今天看了一下,发现一个变量错误:
!!VRv5:S7097+x16;
!!VRv5:Sy3;

本来想在原帖上修改,悍然发现没有权限改boss的帖子,:shufu ...

老实猪修正版

老实猪 发表于 2009-2-10 11:49:08

不开生物经验的人飘过

用了不少函数和变量啊

songfx 发表于 2009-2-10 13:40:45

难道不可以直接并入原生物经验系统的脚本中去吗?

poet 发表于 2009-2-10 15:04:20

原帖由 songfx 于 2009-2-10 13:40 发表 http://bbs.h3wog.com/images/common/back.gif
难道不可以直接并入原生物经验系统的脚本中去吗?

生物经验是在 WoG 主程序中实现的,不是 erm 中,erm 只能控制经验的开启或关闭而已。

jianqin_hong 发表于 2009-2-10 21:59:37

好东西啊,以后就不用老是要在地图里加一大堆也怪备用了

ZVSE 发表于 2009-2-11 20:59:29

嗯嗯,必备!我顶!

wolf96_99 发表于 2009-2-12 07:52:26

厉害厉害,我很早的时候就碰到这个bug,也在论坛问过,当时还没办法解决,终于有高人来了。。。

magicfox 发表于 2009-2-12 08:35:27

好东西

zzy007 发表于 2009-2-12 08:37:35

很少玩BT图的人飘过

qqqq0759 发表于 2009-3-4 20:45:09

都是要顶和

qqqq0759 发表于 2009-3-4 20:48:18

不一定有用,如果能解决事件问题而引起的死机就好了

skywinds 发表于 2009-3-8 19:53:44

谢谢分享!!!!!!!!!

fdf1984 发表于 2009-3-16 11:00:03

怎么我用了后双剑生物大于一定数量(13000以上,跟生物等级有关)转移或合并后还是会经验变负?;yowe;
一直带着这堆生物不动它倒是几百万双剑也没问题。

renyuxingyue 发表于 2009-3-20 12:15:13

jjjjjjjjj

老实猪 发表于 2009-4-13 16:56:37

关于"生物经验溢出bug"的修复脚本(原脚本有误)

原帖由 yunings 于 2009-2-10 11:08 发表 http://bbs.h3wog.com/images/common/back.gif
帖子转自HC(http://heroescommunity.com/viewthread.php3?TID=28885),该脚本的作者:James Vogan
脚本的作用:消除海量兵种在BT地图作战时生物经验变负的bug。
脚本内容:ZVSE

** script to prevent creatur ...

链接:http://bbs.h3wog.com/thread-17029-1-1.html

上面是yunings的原帖,今天看了一下,发现一个变量错误:
!!VRv5:S7097+x16;
!!VRv5:Sy3;

本来想在原帖上修改,悍然发现没有权限改boss的帖子,:shufu:
新开个帖子,附件是修改过的.

顺便请教一下大家,谁遇到过经验溢出的现象? 是什么症状,经验变负还是级别变化?

outmoon 发表于 2009-4-13 17:21:16

经验变化,双剑变没级别

fly123 发表于 2009-4-13 17:28:06

谢啦,兄台。:good_job:

噬魂恶魔 发表于 2009-4-13 17:59:29

赞美老实猪。

顺便,鬼王召唤龙巫妖的编写如何le ?
;tl;

fdf1984 发表于 2009-4-13 20:41:09

我遇到的经验溢出就是移动或合并部队后部队经验大幅减少或是直接变为负值。

magicfox 发表于 2009-4-13 21:59:46

来看看,是不是原脚本当经验溢出时就....仍然无效
页: [1] 2 3 4
查看完整版本: 修正生物经验溢出Bug,BT地图必备脚本!

捐赠