wa制作奥法蓝盾吸收条
这个我也发在NGA了,传送门:
http://bbs.ngacn.cc/read.php?tid=13174027
求老哥们帮顶一手
大致效果就是如图。。。
wa字符串如下:
dC1riaGii4skvvJcPQtHuzvkvLxPuPMLI6wucAxsv9lkjnmLYXquldvPNjjAAsv6Aus12Oe4BOQsnoLQ4Cuc5DqinpkrCps0brKfIQ4HqOMie1frvzJif9rkPmsuvvojezLqAMifUjQu7ef9tLQ0qvQGLIkXtbMkjDvjbBfcXzPeQ9s8xj1GvDysTyK8yuAYsLldAZOIptcJwroTuwnQQKxlj0SH62uQDRKFlXWrHLtXZvy6uDDe2UufFxPIgVK05rkTEkjSFXPsvv14svvCSkrzZvIQhLQkmNuvLoDLeTMuvrFivs1pQeP7LkjgsQKY2wQqtjvs6YlvYczrva2cOtaDIQa0SERSgIQaARMlQcORuZsm8ITWJayjgEXwaGjigZTUkjQrXqPK82wqbtqmMe1OyOYvMVjU4cGtz50eRvmeWERGknqIjFcGsBqCbxmIQWKSWCtyYRqtlWISOk3dVwVYTkTG9qM3E3eowO17vywPWKS4cax0DIQaCngUCEfvbytG9MOkU4cW1y4YfvbytG9MOkU4cORXHtJLa70kQcWMa7nrvCXfGPGHIQaSjWEtufxCbWOhgUgdxUOkaBcS3evXfxaC0SERSevbytG9MOkU4cWOzHIQaSjWEtufxCXfWWUu8PDWuuyGJHWJamqfTYsLwgqbOjmAkTradxZwXHqjahw1Pzz5cGVkGKagm0Mkk8iaQIPdAqAnGUWSsb01g8lIfR36bkanglawIHxSvHvDbWHyX6TYIE6cAEEEUb6eMv(WnTLI(CkgBTtpc7VpzoimdMGymjQrXqzvYBBBB0L3Vpc7m3Q5i0V)WnTLI(CkgBTtpc7VpzoimdMGym36QKOgfdLvjVTTTrx)(iSteckC1janR36bQAAkuanCx6GctlK8Ma6AdgynTQWQonGCCbSFwb4MMcfqJOkaIbSMy1CHhbWsm8ITkSQtyGcqaSedVyxp16GcWB2Wob40YakawIHxSfalXWl2cGdXI1BLvo90f0888Cd0jmRC3qadkC1f0Gg0Gg0Gg0GkawIHxSrMWO9wzjaoelwVvw0txqZZZZXfwnoV1vnxzo5GMNNNJlSACURnkGoGbeJrc5CL58wP1716BbnppphmbXysuJIHkxz(wqZZZZnqgqTh08888888CCHvJZhmGymtTnCUEUEUEUEUEUEUEUEUEEWaIXiH8C9C9C9C9C9SMAumuKSlelFUoxzEfwnNhcoCOhbgynTqdcZTUQ0f088888888GMNNNNNNN34KpyaXyKqoxPYCxBuaDadigJeY5(eCf088888888888CWeeJjrnkgQCL5AQrXqrYUqS8GMNNNNNNNdxDbnppppppppO55555555TUQ5kZBDvZ3Do5GMNNNtS8goFWaIXm12WCLkZxnCqZZZZXfwnoVEUTCigdz95656CL5vy1CGRD6rGbwtl0GWCV0HObnpppVhOzOXEd3CAZvMBnOJ4InL25I2Blf8uwed6rmxQre(4cGKks0ajvlUgzsCtYA8vJ8EzYhD57o3AqhrGMH2B4MtlpLfXGEeZLAeHpUaiPIenqs1IRrMe3KSgF1iVxM8rhIg0888CCHvJZz1ywcS2Hk537RTCigdz99rp5TTD3d0m0yVHBoT0zvYBB7JC)9GObnppppO5555no5GjigZTUkjQrXqzjGjigtIAumu5(eCf08888888CWeeJ5wxLe1OyOucMGymjQrXqf0888C4QlO5555bnpppVXjhmbXysuJIHYsy1ywcS2H5(eCf08888888CWeeJ5wxLe1OyOuYQXSeyTddAEEEoC1f08888GMNNNBGoHzLdMGymjQrXqndMGym36QKOgfd1m5GMNNNhu4QlObnObnOcGLy4fBMABOaealXWl21oTmGcy4ANyia2jiBffabJoTdfaXc2dC5cqt4fXfWeSPyYfM8UjaVzdncLaARMxpCTXHDctYcyNToFsyw52MaOkMoOr4ra6f7uXqtJ2gstJ2gkaAa54iEs7iRD9oOxqmYAxRcR6vkGgBzjucyWqBQi)d2um5cZE3eqRtawo)WY2fxH)VllZsTs(j)DxCn(JLZv3rRKRBPcGQy6Gg(6uafap4MvyfAtxUAPG9gdbSiSvnnfkGMHWKS4cyiaE73BFEjlGEeMK7LxYIlc
那么让我们来看一下具体的原理
首先是wa中“进度条”的原理,他的核心内容为这一项
这一项中,需要函数返回三个值。第一个值为当前数值,第二个为总值,第三个我也不知道是什么意思,反正返回1就行。。。
所以我们首先需要在初始化中写入这两句代码:
即为简单的初始化两个数值,其中ShellAbsorb用于储存盾的当前吸收量,而ShellMaxAbsorb用于储存盾的总吸收量
然后就是核心的“持续时间讯息”
function() local idx = 1 local targetSpellID = 235450 ShellAbsorb = 0 repeat local spellName,_,_,_,_,_,_,_,_,_,spellID,_,_,_,_,_,absorbAmount,_ = UnitBuff("player",idx) if spellID == targetSpellID then ShellAbsorb = absorbAmount end idx = idx + 1 until spellName == nil local _,intellect,_,_ = UnitStat("player",4); versaltility = GetCombatRatingBonus(CR_VERSATILITY_DAMAGE_DONE) + GetVersatilityBonus(CR_VERSATILITY_DAMAGE_DONE); local calculate=7*intellect*(100+versaltility)/100*1.8; if ShellMaxAbsorb<ShellAbsorb then ShellMaxAbsorb=ShellAbsorb end if ShellAbsorb<calculate then ShellMaxAbsorb=calculate end return ShellAbsorb,ShellMaxAbsorb,1 end
这段代码的意思其实比较简单,主要讲解一些API。
repeat那一段为遍历玩家的所有BUFF,找到盾BUFF后获取他的参数(吸收量)
local _,intellect,_,_ = UnitStat("player",4);
这一句即为获取智力
versaltility = GetCombatRatingBonus(CR_VERSATILITY_DAMAGE_DONE) + GetVersatilityBonus(CR_VERSATILITY_DAMAGE_DONE);
这一句为获取全能,天知道为什么暴击急速精通都有直接的一个API可以获取而全能那么麻烦。。。
local calculate=7*intellect*(100+versaltility)/100*1.8;
这一句则是计算盾的吸收量,7为固有参数,最后的1.8表示神器的特质,棱彩屏障的吸收量增加80%
其他的都没什么,然后在判定里面写一个永远返回true的就可以了,显示的伤害就直接显示ShellAbsorb