找回密码
 点一下
查看: 2065|回复: 3

新手请教一段代码谢谢谢谢

[复制链接]
发表于 2009-8-25 01:45:08 | 显示全部楼层 |阅读模式
if(Trig_liubo_gongji_Func002C())then
set udg_liubosjs[27]=GetHeroLevel(GetAttacker())
if(Trig_liubo_gongji_Func002Func002C())then
call SetHeroLevelBJ(GetAttacker(),(udg_liubosjs[27]+1),false)
call CreateTextTagUnitBJ("等级提升",GetAttacker(),0,17.,GetRandomReal(0,100.),GetRandomReal(0,100.),GetRandomReal(0,100.),0)
call SetTextTagPermanent(bj_lastCreatedTextTag,false)
call SetTextTagVelocityBJ(bj_lastCreatedTextTag,GetRandomReal(40.,150.),GetRandomReal(0,360))
call SetTextTagLifespan(bj_lastCreatedTextTag,3.)
endif
set udg_liubosjs[26]=(3*(R2I(SquareRoot(I2R(udg_liubosjs[22])))*R2I(SquareRoot(I2R(GetHeroLevel(GetAttacker()))))))
if(Trig_liubo_gongji_Func002Func004C())then
call ModifyHeroStat(0,GetAttacker(),0,udg_liubosjs[26])
call CreateTextTagUnitBJ(("+力量"+I2S(udg_liubosjs[26])),GetAttacker(),0,17.,GetRandomReal(0,100.),GetRandomReal(0,100.),GetRandomReal(0,100.),0)
call SetTextTagPermanent(bj_lastCreatedTextTag,false)
比如这段当等级提升时set udg_liubosjs[26]=(3*(R2I(SquareRoot(I2R(udg_liubosjs[22])))*R2I(SquareRoot(I2R(GetHeroLevel(GetAttacker()))))))是所加力量的值么,如果是的话,我可不可以直接set udg_liubosjs[26]=GetRandomInt(1,5),从1-5随机取个数呢

完整的代码见附件
f.rar (4 KB, 下载次数: 20)
发表于 2009-8-25 11:31:48 | 显示全部楼层
不参与改图
回复

使用道具 举报

发表于 2009-8-25 11:52:30 | 显示全部楼层
可以,但原本的取值不仅限在1-5的范围内。
回复

使用道具 举报

发表于 2009-8-25 12:52:50 | 显示全部楼层
这个只要理解了想改啥改啥
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-5-4 09:39 , Processed in 0.177214 second(s), 22 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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