Level = 2660 也就是 升级到4J需要 2660经验
而4那个就是升级到5级的经验
apibits 发表于 2011-3-24 11:33 http://www.autoitx.com/images/common/back.gif
误解了...我还以为升级到3级需要2660经验.... {:face (411):}原来如此,总算看明白LZ的意思了 Global $level =
Dim $Lv, $tempExp, $iUpLv
$CurrentEXP = InputBox("Input", "当前拥有经验")
$WriteLv = InputBox("Input", "输入等级")
For $Lv = Int($WriteLv) To UBound($level) - 1 Step 1
$tempExp += $level[$Lv]
If $tempExp == $CurrentEXP Then
$iUpLv = $Lv + 1
ExitLoop
Else
$iUpLv = $Lv
ExitLoop
EndIf
If $Lv = 20 Then $iUpLv = $Lv
Next Global $level =
Dim $Lv, $tempExp, $iUpLv
$CurrentEXP = InputBox("Input", "当前拥有经验")
$WriteLv = InputBox("Input", "输入等级")
For $Lv = Int($WriteLv) To UBound($level) - 1 Step 1
$tempExp += $level[$Lv]
If $tempExp == $CurrentEXP Then
$iUpLv = $Lv + 1
ExitLoop
Else
$iUpLv = $Lv
ExitLoop
EndIf
If $Lv = 20 Then $iUpLv = $Lv
Next 回复 19# 298311657
我就奇怪了...我试验的时候用这个代码 ,,为什么啥数据都出不来呢?
MsgBox(0,"",$Lv & @CRLF & $CurrentEXP & @CRLF& @CRLF & UBound($XyLevel) - 1 & @CRLF & $tempExp)
这个出现的数据都不对呢....输入6982经验,等级为3的时候
输出是 3回车6982回车回车20回车2660 回复 20# apibits
有个地方翻译错了,抱歉Global $level =
Dim $Lv, $tempExp, $iUpLv
$CurrentEXP = InputBox("Input", "当前拥有经验")
$WriteLv = InputBox("Input", "输入等级")
For $Lv = Int($WriteLv) To UBound($level) - 1 Step 1
$tempExp += $level[$Lv]
If $tempExp == $CurrentEXP Then
$iUpLv = $Lv + 1
ExitLoop
ElseIf $tempExp > $CurrentEXP Then
$iUpLv = $Lv
ExitLoop
EndIf
If $Lv = 20 Then $iUpLv = $Lv
Next
MsgBox(0,0,$Lv) 回复apibits
有个地方翻译错了,抱歉
298311657 发表于 2011-3-26 01:36 http://www.autoitx.com/images/common/back.gif
恩.感谢提供的代码..我看懂了...大哥是不是学过 Java啊~~~~
这个就是照着那个JAVA脚本到Au3 代码的 学习中。。
页:
1
[2]