回复 20# apibits
有个地方翻译错了,抱歉Global $level[21] = [0, 800, 1760, 2660, 3620, 4700, 6982, 9478, 12441, 15884, 21801, 26680, 30144, 38540, 44250, 57850, 59456, 66410, 77000, 80000, 100000]
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)
|