<Script Language="VBScript">
Dim dice_number ''''' 儲存骰仔數字
Dim money ''''' 儲存籌碼餘額
Dim point_chosen ''''' 儲存由1-6 你所選擇的點數
SUB cmdROLL_ONCLICK() ''''' 拋骰仔程序"的開始
Randomize
dice_number = Rnd()*6 '' 隨機產生骰仔數字 dice_number
If dice_number<1 Then
document.dice1.src="http://eclass.ccgss.edu.hk/home/imail/downloadattachment.php?PartID=77551&CampusMailID=797652"
ElseIf dice_number<2 Then
document.dice1.src="http://eclass.ccgss.edu.hk/home/imail/downloadattachment.php?PartID=77556&CampusMailID=797652"
ElseIf dice_number<3 Then
document.dice1.src="http://eclass.ccgss.edu.hk/home/imail/downloadattachment.php?PartID=77553&CampusMailID=797652"
ElseIf dice_number<4 Then
document.dice1.src="http://eclass.ccgss.edu.hk/home/imail/downloadattachment.php?PartID=77555&CampusMailID=797652"
ElseIf dice_number<5 Then
document.dice1.src="http://eclass.ccgss.edu.hk/home/imail/downloadattachment.php?PartID=77554&CampusMailID=797652"
Else
document.dice1.src="http://eclass.ccgss.edu.hk/home/imail/downloadattachment.php?PartID=77552&CampusMailID=797652"
End If
call result() ''call 表示執行遊戲結果程序
If money<0 Then
txtTOTAL.value="No money no talk !有錢再來吧@v@"
call cmdAGAIN_ONCLICK()
Else
txtTOTAL.value=money
End If
END SUB ''''' 拋骰仔程序的終結
FUNCTION checkPoint() ''''' 核對所選擇點數程序開始
point_chosen=point_chosen+1
MsgBox(point_chosen)
END FUNCTION ''''' 核對所選擇點數程序終結
FUNCTION result() ''''' 遊戲結果的開始
If dice_number<1 and point_chosen=1 Then
money=CDbl(txtTOTAL.value)+CDbl(txtEACH.value)
Else
money=CDbl(txtTOTAL.value)-CDbl(txtEACH.value)
End If
END FUNCTION '''''遊戲結果的終結
<Script Language="VBScript">
Dim dice_number ''''' 儲存骰仔數字
Dim money ''''' 儲存籌碼餘額
Dim point_chosen ''''' 儲存由1-6 你所選擇的點數
SUB cmdROLL_ONCLICK() ''''' 拋骰仔程序"的開始
Randomize
dice_number = Rnd()*6 '' 隨機產生骰仔數字 dice_number
If dice_number<1 Then
document.dice1.src="http://eclass.ccgss.edu.hk/home/imail/downloadattachment.php?PartID=77551&CampusMailID=797652"
ElseIf dice_number<2 Then
document.dice1.src="http://eclass.ccgss.edu.hk/home/imail/downloadattachment.php?PartID=77556&CampusMailID=797652"
ElseIf dice_number<3 Then
document.dice1.src="http://eclass.ccgss.edu.hk/home/imail/downloadattachment.php?PartID=77553&CampusMailID=797652"
ElseIf dice_number<4 Then
document.dice1.src="http://eclass.ccgss.edu.hk/home/imail/downloadattachment.php?PartID=77555&CampusMailID=797652"
ElseIf dice_number<5 Then
document.dice1.src="http://eclass.ccgss.edu.hk/home/imail/downloadattachment.php?PartID=77554&CampusMailID=797652"
Else
document.dice1.src="http://eclass.ccgss.edu.hk/home/imail/downloadattachment.php?PartID=77552&CampusMailID=797652"
End If
call result() ''call 表示執行遊戲結果程序
If money<0 Then
txtTOTAL.value="No money no talk !有錢再來吧@v@"
call cmdAGAIN_ONCLICK()
Else
txtTOTAL.value=money
End If
END SUB ''''' 拋骰仔程序的終結
FUNCTION checkPoint() ''''' 核對所選擇點數程序開始
point_chosen=point_chosen+1
MsgBox(point_chosen)
END FUNCTION ''''' 核對所選擇點數程序終結
FUNCTION result() ''''' 遊戲結果的開始
If dice_number<1 and point_chosen=1 Then
money=CDbl(txtTOTAL.value)+CDbl(txtEACH.value)
Else
money=CDbl(txtTOTAL.value)-CDbl(txtEACH.value)
End If
END FUNCTION '''''遊戲結果的終結