close
Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 已解決
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 已解決 
vb6 程式碼 改成 VB2008
Nov 16th 2014, 04:18

想做個遊戲經驗%計算
有人給了我VB6範例 只有程式原碼
但部分與VB2008使用的不同
會出現很多 ~~~~ 之類的東西
想問問有人會改嗎

Dim i, j, SumExp, i150 As Integer 'i=計數器j=公式 SumExp=總和

i = 1 '從1等
Do While i <= Val(Text1(0).Text) 'i算到自己的等級
If Check1(0).Value = vbChecked Then '若轉職被勾選
If i > 150 Then '若i算到轉職Lv>150
j = Round(2 ^ (3.3 * Log(i) / Log(2)) + 2 ^ (4.9 * Log(i - 150) / Log(2)), 0) '轉職Lv>150最大Exp
Else '否則
j = Round(2 ^ (3.3 * Log(i) / Log(2)) + 50, 0) '轉過Lv>=1最大Exp
End If
Else '否則
j = Round(2 ^ (3.1 * Log(i) / Log(2)) + 5, 0) '沒轉Lv>=1最大Exp
End If

SumExp = SumExp + j '總和加上算出來的
i = i + 1 'i往後一位
Loop

This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜

    wv52434 發表在 痞客邦 留言(0) 人氣()