1080 1312 SoundVolume "0x2c2928" Coin STANDBY CoinClear ; Var TestCoinLine1 = "กรุณาใส่เงิน . . ." Var TestCoinLine1 = "insert money . . ." ; Var TestCoinLine2 = "จำนวนเงินทั้งหมด 0 บาท" Var TimerCountDown = 3 Var TimerChangeSuccess = 0 Var startTimerChangeSuccess = "false" Var restartTimerChange = 3 Var startrestartTimerChange = "false" Var TimerbacktoHome = 300 Var RemainAmountStr !assigned StringFmt( CoinAmount, DisplayFormat, PreScaleConvertShow ) Var TestCoinLine2 = "total amount " Var TestCoinLine2 = TestCoinLine2 + RemainAmountStr Var RemainAmountStr1 = 0 Var LastCoin = 0 Var openTextPlaseWait = "Invisible" Var currentStage = "" Var intosw = 0 Var testCoinChange = 10 Var popupBeforeTestCoinWarning = "Enable" Var buttonBeforeTestCoinBack = "Enable" Var buttonTestCoinStart = "Enable" Var popupAfterTestCoinWarning = "Invisible" Var buttonTestCoinEnd = "Invisible" Var showTextCoin10Nor = "Invisible" Var showTextCoin10Foc = "Invisible" Var showTextCoin10Succ = "Invisible" Var showTextCoin10Fail = "Invisible" Var showTextBank20Nor = "Invisible" Var showTextBank20Foc = "Invisible" Var showTextBank20Succ = "Invisible" Var showTextBank20Fail = "Invisible" Var showTextChange10Nor = "Invisible" Var showTextChange10Foc = "Invisible" Var showTextChange10Succ = "Invisible" Var showTextChange10Fail = "Invisible" Var showTextmessagebankfail = "Invisible" Var showTextmessagecoinfail = "Invisible" Var showTextmessagetestallsuccess = "Invisible" Var showTextmesssagechangefail = "Invisible" Var showTextundotest_testcoin = "Invisible" Var showTextbacktohome_testcoin = "Invisible" Var showTextretryprocess_testcoin = "Invisible" Var showButtonChange10 = "Invisible" Var showExitbutton = "Enable" Var ChangeOK = 0 SAVELOG "state_init" DEBUGVAR RemainAmountStr DEBUGVAR RemainAmountStr1 DEBUGVAR currentStage DEBUGVAR LastCoin DEBUGVAR CoinAmount StatusLog "On testcoinbank" Var TimerbacktoHome = 300 Var LastCoin = CoinAmount - LastCoin Var RemainAmountStr1 !assigned StringFmt( LastCoin, DisplayFormat, PreScaleConvertShow ) Var RemainAmountStr !assigned StringFmt( CoinAmount, DisplayFormat, PreScaleConvertShow ) DEBUGVAR RemainAmountStr DEBUGVAR RemainAmountStr1 DEBUGVAR currentStage DEBUGVAR LastCoin DEBUGVAR CoinAmount If currentStage = "test10bath" Then If intosw = 0 Then Var intosw = 1 If LastCoin = 10 Then SAVELOG "test10bath_pass" StatusLog "test10bath_pass" Var currentStage = "test20bath" SAVELOG "state_test20bath" Else SAVELOG "test10bath_fail" StatusLog "test10bath_fail" Var currentStage = "test10fail" SAVELOG "state_test10fail" EndIf EndIf EndIf If currentStage = "test20bath" Then If intosw = 0 Then Var intosw = 1 If LastCoin = 20 Then SAVELOG "test20bath_pass" StatusLog "test20bath_pass" Var currentStage = "testchange10" SAVELOG "state_testchange10" Else SAVELOG "test20bath_fail" StatusLog "test20bath_fail" Var currentStage = "test20fail" SAVELOG "state_test20fail" EndIf EndIf EndIf If currentStage = "test10fail" Then If LastCoin = 10 Then SAVELOG "test10bath_pass" StatusLog "test10bath_pass" Var currentStage = "test20bath" SAVELOG "state_test20bath" EndIf EndIf If currentStage = "test20fail" Then If LastCoin = 20 Then SAVELOG "test20bath_pass" StatusLog "test20bath_pass" Var currentStage = "testchange10" SAVELOG "state_testchange10" EndIf EndIf ; Var TestCoinLine1 = "ท่านได้ใส่เงินจำนวน " Var TestCoinLine1 = "insert money " Var TestCoinLine1 = TestCoinLine1 + RemainAmountStr1 ; Var TestCoinLine1 = TestCoinLine1 + " บาท" ; Var TestCoinLine2 = "จำนวนเงินทั้งหมด " Var TestCoinLine2 = "total amount " Var TestCoinLine2 = TestCoinLine2 + RemainAmountStr ; Var TestCoinLine2 = TestCoinLine2 + " บาท" Var LastCoin = CoinAmount ; Var RemainAmountStr = RemainAmountStr + "###size=90" Var intosw = 0 Refresh Var TimerbacktoHome = 300 DEBUGVAR ChangeStatus If ChangeStatus = "payout-end" Then Var ChangeOK = 1 EndIf If currentStage = "testchange10" Then If ChangeOK = 1 Then SAVELOG "testchange10_pass" StatusLog "testchange10_pass" Var currentStage = "finish" Var TimerChangeSuccess = 0 Var startTimerChangeSuccess = "false" SAVELOG "state_finish" EndIf EndIf If currentStage = "testchange10fail" Then If ChangeOK = 1 Then SAVELOG "testchange10_pass" StatusLog "testchange10_pass" Var currentStage = "finish" Var TimerChangeSuccess = 0 Var startTimerChangeSuccess = "false" SAVELOG "state_finish" EndIf EndIf 1000 DEBUGVAR currentStage If currentStage = "init" Then Var TimerCountDown = TimerCountDown - 1 If TimerCountDown = 0 Then Coin ON Var currentStage = "test10bath" Var openTextPlaseWait = "Invisible" SAVELOG "state_test10bath" EndIf EndIf If currentStage = "test10bath" Then Var showTextCoin10Nor = "Invisible" Var showTextCoin10Foc = "Enable" Var showTextCoin10Succ = "Invisible" Var showTextCoin10Fail = "Invisible" Var showTextBank20Nor = "Enable" Var showTextBank20Foc = "Invisible" Var showTextBank20Succ = "Invisible" Var showTextBank20Fail = "Invisible" Var showTextChange10Nor = "Enable" Var showTextChange10Foc = "Invisible" Var showTextChange10Succ = "Invisible" Var showTextChange10Fail = "Invisible" Var showButtonChange10 = "Invisible" Var showTextmessagebankfail = "Invisible" Var showTextmessagecoinfail = "Invisible" Var showTextmessagetestallsuccess = "Invisible" Var showTextmesssagechangefail = "Invisible" Var showTextundotest_testcoin = "Enable" Var showTextbacktohome_testcoin = "Invisible" Var showTextretryprocess_testcoin = "Invisible" Var showExitbutton = "Enable" EndIf If currentStage = "test10fail" Then Var showTextCoin10Nor = "Invisible" Var showTextCoin10Foc = "Invisible" Var showTextCoin10Succ = "Invisible" Var showTextCoin10Fail = "Enable" Var showTextBank20Nor = "Enable" Var showTextBank20Foc = "Invisible" Var showTextBank20Succ = "Invisible" Var showTextBank20Fail = "Invisible" Var showTextChange10Nor = "Enable" Var showTextChange10Foc = "Invisible" Var showTextChange10Succ = "Invisible" Var showTextChange10Fail = "Invisible" Var showButtonChange10 = "Invisible" Var showTextmessagebankfail = "Invisible" Var showTextmessagecoinfail = "Enable" Var showTextmessagetestallsuccess = "Invisible" Var showTextmesssagechangefail = "Invisible" Var showTextundotest_testcoin = "Invisible" Var showTextbacktohome_testcoin = "Invisible" Var showTextretryprocess_testcoin = "Invisible" Var showExitbutton = "Enable" EndIf If currentStage = "test20bath" Then Var showTextCoin10Nor = "Invisible" Var showTextCoin10Foc = "Invisible" Var showTextCoin10Succ = "Enable" Var showTextCoin10Fail = "Invisible" Var showTextBank20Nor = "Invisible" Var showTextBank20Foc = "Enable" Var showTextBank20Succ = "Invisible" Var showTextBank20Fail = "Invisible" Var showTextChange10Nor = "Enable" Var showTextChange10Foc = "Invisible" Var showTextChange10Succ = "Invisible" Var showTextChange10Fail = "Invisible" Var showButtonChange10 = "Invisible" Var showTextmessagebankfail = "Invisible" Var showTextmessagecoinfail = "Invisible" Var showTextmessagetestallsuccess = "Invisible" Var showTextmesssagechangefail = "Invisible" Var showTextundotest_testcoin = "Enable" Var showTextbacktohome_testcoin = "Invisible" Var showTextretryprocess_testcoin = "Invisible" Var showExitbutton = "Enable" EndIf If currentStage = "test20fail" Then Var showTextCoin10Nor = "Invisible" Var showTextCoin10Foc = "Invisible" Var showTextCoin10Succ = "Enable" Var showTextCoin10Fail = "Invisible" Var showTextBank20Nor = "Invisible" Var showTextBank20Foc = "Invisible" Var showTextBank20Succ = "Invisible" Var showTextBank20Fail = "Enable" Var showTextChange10Nor = "Enable" Var showTextChange10Foc = "Invisible" Var showTextChange10Succ = "Invisible" Var showTextChange10Fail = "Invisible" Var showButtonChange10 = "Invisible" Var showTextmessagebankfail = "Enable" Var showTextmessagecoinfail = "Invisible" Var showTextmessagetestallsuccess = "Invisible" Var showTextmesssagechangefail = "Invisible" Var showTextundotest_testcoin = "Invisible" Var showTextbacktohome_testcoin = "Invisible" Var showTextretryprocess_testcoin = "Invisible" Var showExitbutton = "Enable" EndIf If currentStage = "testchange10" Then Var showTextCoin10Nor = "Invisible" Var showTextCoin10Foc = "Invisible" Var showTextCoin10Succ = "Enable" Var showTextCoin10Fail = "Invisible" Var showTextBank20Nor = "Invisible" Var showTextBank20Foc = "Invisible" Var showTextBank20Succ = "Enable" Var showTextBank20Fail = "Invisible" Var showTextChange10Nor = "Invisible" Var showTextChange10Foc = "Enable" Var showTextChange10Succ = "Invisible" Var showTextChange10Fail = "Invisible" Var showButtonChange10 = "Enable" Var showTextmessagebankfail = "Invisible" Var showTextmessagecoinfail = "Invisible" Var showTextmessagetestallsuccess = "Invisible" Var showTextmesssagechangefail = "Invisible" Var showTextundotest_testcoin = "Enable" Var showTextbacktohome_testcoin = "Invisible" Var showTextretryprocess_testcoin = "Invisible" Var showExitbutton = "Enable" EndIf If currentStage = "finish" Then Var showTextCoin10Nor = "Invisible" Var showTextCoin10Foc = "Invisible" Var showTextCoin10Succ = "Invisible" Var showTextCoin10Fail = "Invisible" Var showTextBank20Nor = "Invisible" Var showTextBank20Foc = "Invisible" Var showTextBank20Succ = "Invisible" Var showTextBank20Fail = "Invisible" Var showTextChange10Nor = "Invisible" Var showTextChange10Foc = "Invisible" Var showTextChange10Succ = "Invisible" Var showTextChange10Fail = "Invisible" Var showButtonChange10 = "Invisible" Var showTextmessagebankfail = "Invisible" Var showTextmessagecoinfail = "Invisible" Var showTextmessagetestallsuccess = "Invisible" Var showTextmesssagechangefail = "Invisible" Var showTextundotest_testcoin = "Invisible" Var showTextbacktohome_testcoin = "Invisible" Var showTextretryprocess_testcoin = "Invisible" Var showExitbutton = "Invisible" Var popupBeforeTestCoinWarning = "Invisible" Var buttonBeforeTestCoinBack = "Invisible" Var buttonTestCoinStart = "Invisible" Var buttonTestCoinEnd = "Enable" Var popupAfterTestCoinWarning = "Enable" EndIf If currentStage = "testchange10fail" Then Var showTextCoin10Nor = "Invisible" Var showTextCoin10Foc = "Invisible" Var showTextCoin10Succ = "Enable" Var showTextCoin10Fail = "Invisible" Var showTextBank20Nor = "Invisible" Var showTextBank20Foc = "Invisible" Var showTextBank20Succ = "Enable" Var showTextBank20Fail = "Invisible" Var showTextChange10Nor = "Invisible" Var showTextChange10Foc = "Invisible" Var showTextChange10Succ = "Invisible" Var showTextChange10Fail = "Enable" Var showButtonChange10 = "Enable" Var showTextmessagebankfail = "Invisible" Var showTextmessagecoinfail = "Invisible" Var showTextmessagetestallsuccess = "Invisible" Var showTextmesssagechangefail = "Enable" Var showTextundotest_testcoin = "Invisible" Var showTextbacktohome_testcoin = "Invisible" Var showTextretryprocess_testcoin = "Invisible" Var showExitbutton = "Enable" EndIf If startTimerChangeSuccess = "true" Then Var TimerChangeSuccess = TimerChangeSuccess + 1 Var showButtonChange10 = "Invisible" If TimerChangeSuccess > 5 Then Var TimerChangeSuccess = 0 Var startTimerChangeSuccess = "false" Var currentStage = "testchange10fail" Coin STANDBY CoinClear SAVELOG "testchange10_fail" SAVELOG "state_testchange10fail" StatusLog "testchange10_fail" Var startrestartTimerChange = "true" EndIf EndIf If startrestartTimerChange = "true" Then Var restartTimerChange = restartTimerChange - 1 If restartTimerChange = 0 Then Var startrestartTimerChange = "false" Var restartTimerChange = 3 Var showButtonChange10 = "Enable" Var showTextundotest_testcoin = "Enable" Coin ON EndIf EndIf Var TimerbacktoHome = TimerbacktoHome - 1 If TimerbacktoHome = 0 Then SAVELOG "timeout" Coin STANDBY CoinClear SAVELOG "back_to_page_board" Open "ROOT/taobin_project/xml/vending_tasks_pre_main.xml" EndIf Refresh TimerReset ; header 0 0 80 1080 SoundVolume "ROOT/taobin_project/image/new_vending_info/nav-bar-mid.png" ;back 800 20 19 fontType1 0xe2e2e2 Text1_9 ;task 270 140 40 560 SoundVolume "ROOT/taobin_project/image/new_vending_info/testcoinbank_header.png" "Enable" ;group 10 bath start 200 230 40 560 SoundVolume "ROOT/taobin_project/image/new_vending_info/testcoin_10_nor.png" showTextCoin10Nor 205 230 40 560 SoundVolume "ROOT/taobin_project/image/new_vending_info/testcoin_10_foc.png" showTextCoin10Foc 210 230 60 590 SoundVolume "ROOT/taobin_project/image/new_vending_info/testcoin_10_succ.png" showTextCoin10Succ 210 230 60 590 SoundVolume "ROOT/taobin_project/image/new_vending_info/testcoin_10_fail.png" showTextCoin10Fail ;group 10 bath end ;group 20 bath start 180 320 40 560 SoundVolume "ROOT/taobin_project/image/new_vending_info/testcoin_20_nor.png" showTextBank20Nor 180 320 40 560 SoundVolume "ROOT/taobin_project/image/new_vending_info/testcoin_20_foc.png" showTextBank20Foc 175 320 60 590 SoundVolume "ROOT/taobin_project/image/new_vending_info/testcoin_20_succ.png" showTextBank20Succ 175 320 60 590 SoundVolume "ROOT/taobin_project/image/new_vending_info/testcoin_20_fail.png" showTextBank20Fail ;group 20 bath end ;group change 10 bath start 245 400 60 590 SoundVolume "ROOT/taobin_project/image/new_vending_info/testcoin_change_nor.png" showTextChange10Nor 230 400 60 590 SoundVolume "ROOT/taobin_project/image/new_vending_info/testcoin_change_foc.png" showTextChange10Foc 255 400 60 590 SoundVolume "ROOT/taobin_project/image/new_vending_info/testcoin_change_succ.png" showTextChange10Succ 255 400 60 590 SoundVolume "ROOT/taobin_project/image/new_vending_info/testcoin_change_fail.png" showTextChange10Fail ;group change 10 bath end 280 220 40 560 SoundVolume "ROOT/taobin_project/image/new_vending_info/testcoinbankwait.png" openTextPlaseWait ;group message start 240 700 60 590 SoundVolume "ROOT/taobin_project/image/new_vending_info/messagecoinfail.png" showTextmessagecoinfail 240 700 60 590 SoundVolume "ROOT/taobin_project/image/new_vending_info/messagebankfail.png" showTextmessagebankfail 240 800 60 590 SoundVolume "ROOT/taobin_project/image/new_vending_info/messsagechangefail.png" showTextmesssagechangefail 240 700 60 590 SoundVolume "ROOT/taobin_project/image/new_vending_info/messagetestallsuccess.png" showTextmessagetestallsuccess ;group message end ; warning before start zone start 150 150 800 800 SoundVolume "ROOT/taobin_project/image/new_vending_info/warningbeforetestcoin.png" popupBeforeTestCoinWarning ; warning before start zone end ; warning after end zone start 150 150 800 800 SoundVolume "ROOT/taobin_project/image/new_vending_info/aftertestcoinwarning.png" popupAfterTestCoinWarning ; warning after end zone end