THAI: pro free energy: new imgs, WIP add data

This commit is contained in:
Pakin 2024-03-07 15:07:48 +07:00
parent 5edecc1655
commit ffa66d033e
10 changed files with 108 additions and 34 deletions

View file

@ -1,6 +1,6 @@
normal_eng=ROOT/taobin_project/image/event/pepsi_second_cup_30/pro_pepsi_second_cup_30.png normal_eng=ROOT/taobin_project/image/event/powerup_free_1/powerup_en.png
normal_thai=ROOT/taobin_project/image/event/pepsi_second_cup_30/pro_pepsi_second_cup_30.png normal_thai=ROOT/taobin_project/image/event/powerup_free_1/powerup.png
press_eng=ROOT/taobin_project/image/event/pepsi_second_cup_30/pro_pepsi_second_cup_30.png press_eng=ROOT/taobin_project/image/event/powerup_free_1/powerup_en.png
press_thai=ROOT/taobin_project/image/event/pepsi_second_cup_30/pro_pepsi_second_cup_30.png press_thai=ROOT/taobin_project/image/event/powerup_free_1/powerup.png
disable_eng=ROOT/taobin_project/image/event/pepsi_second_cup_30/pro_pepsi_second_cup_30.png disable_eng=ROOT/taobin_project/image/event/powerup_free_1/powerup_en.png
disable_thai=ROOT/taobin_project/image/event/pepsi_second_cup_30/pro_pepsi_second_cup_30.png disable_thai=ROOT/taobin_project/image/event/powerup_free_1/powerup.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 KiB

After

Width:  |  Height:  |  Size: 258 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

View file

@ -1,5 +1,3 @@
; TODO: like y20, but without age check instead check usage of that id.
<Popup> <Popup>
<Cache> "Enable" </Cache> <Cache> "Enable" </Cache>
<Width> 1080 </Width> <Width> 1080 </Width>

View file

@ -71,6 +71,7 @@
Var FailTrickCount = 0 Var FailTrickCount = 0
Var FailState = "Invisible" Var FailState = "Invisible"
Var FullQuotaState = "Invisible"
Var StepGetServer = 0 Var StepGetServer = 0
@ -86,6 +87,25 @@
DEBUGVAR Ext1a DEBUGVAR Ext1a
; example
If StepGetServer = 1 Then
If Ext1a = "0" Then
If LegitAge = "true" Then
Var RoadShow = "true"
Open "ROOT/taobin_project/xml/page_payment.xml"
Else
Var load_gif_stage = "Invisible"
Var FailState = "Enable"
EndIf
Refresh
Else
Var FullQuotaState = "Enable"
EndIf
EndIf
; If StepGetServer = 1 Then ; If StepGetServer = 1 Then
; If Ext1a = "ok" Then ; If Ext1a = "ok" Then
@ -117,6 +137,11 @@
</EventActionOk> </EventActionOk>
<EventActionError> <EventActionError>
; handle quota full
; response smth
Var FullQuotaState = "Enable"
</EventActionError> </EventActionError>
@ -222,9 +247,12 @@
If AgeNumber >= 18 Then If AgeNumber >= 18 Then
; TODO: check quota --- AddData; Wait for new add num ; TODO: check quota --- AddData; Wait for new add num
Var LegitAge = "true"
; Then enable RoadShow ; Then enable RoadShow
Var RoadShow = "true" ;Var RoadShow = "true"
Open "ROOT/taobin_project/xml/page_payment.xml" ;Open "ROOT/taobin_project/xml/page_payment.xml"
EndIf EndIf
@ -356,6 +384,7 @@ eval(
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound> <Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume> <Volume> SoundVolume </Volume>
<EventClick> <EventClick>
Var RoadShow = ""
Open "ROOT/taobin_project/xml/page_catalog2.xml" Open "ROOT/taobin_project/xml/page_catalog2.xml"
</EventClick> </EventClick>
</Button> </Button>
@ -370,6 +399,7 @@ eval(
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound> <Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume> <Volume> SoundVolume </Volume>
<EventClick> <EventClick>
Var RoadShow = ""
Open "ROOT/taobin_project/xml/page_catalog2.xml" Open "ROOT/taobin_project/xml/page_catalog2.xml"
</EventClick> </EventClick>
</Button> </Button>
@ -424,7 +454,41 @@ eval(
</Button> </Button>
; Full Quota
<Image>
<X> 0 </X>
<Y> 380 </Y>
<State> FullQuotaState </State>
<Filename> "ROOT/taobin_project/image/page_payment/alpha.png" </Filename>
</Image>
<Image>
<X> 249 </X>
<Y> 751 </Y>
<State> FullQuotaState </State>
<Filename> eval(
If show_eng = "true" Then
Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup_quota_full_en.png"
Else
Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup_quota_full.png"
EndIf
) </Filename>
</Image>
<Button>
<X> 350 </X>
<Y> 1370 </Y>
<State>FullQuotaState</State>
<Filename> Var( DirImage + "/bn_cancel_all.png" )</Filename>
<FilenamePress> Var( DirImage + "/bp_cancel_all.png" ) </FilenamePress>
<FilenameDisable> Var( DirImage + "/bp_cancel_all.png" ) </FilenameDisable>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
Var RoadShow = ""
Open "ROOT/taobin_project/xml/page_catalog2.xml"
</EventClick>
</Button>
<GIF> <GIF>
<X> 440 </X> <X> 440 </X>
@ -448,7 +512,7 @@ eval(
EventEvaluate "EventIDCard" EventEvaluate "EventIDCard"
</EventUnitTest2> </EventUnitTest2>
<EventUnitTest3> <EventUnitTest3>
Var FailState = "Enable" Var FullQuotaState = "Enable"
</EventUnitTest3> </EventUnitTest3>
<EventUnitTest4> <EventUnitTest4>

View file

@ -11327,7 +11327,7 @@ LIMENADE SODA" </Value>
<Filename> <Filename>
eval( eval(
If show_eng = "true" Then If show_eng = "true" Then
Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup.png" Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup_en.png"
Else Else
Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup.png" Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup.png"
EndIf EndIf
@ -11336,7 +11336,7 @@ LIMENADE SODA" </Value>
<FilenamePress> <FilenamePress>
eval( eval(
If show_eng = "true" Then If show_eng = "true" Then
Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup.png" Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup_en.png"
Else Else
Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup.png" Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup.png"
EndIf EndIf
@ -11345,7 +11345,7 @@ LIMENADE SODA" </Value>
<FilenameDisable> <FilenameDisable>
eval( eval(
If show_eng = "true" Then If show_eng = "true" Then
Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup.png" Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup_en.png"
Else Else
Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup.png" Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup.png"
EndIf EndIf

View file

@ -1,4 +1,3 @@
<Button> <Button>
<X> 42 </X> <X> 42 </X>
<Y> 520 </Y> <Y> 520 </Y>
@ -7,27 +6,27 @@
<Filename> <Filename>
eval( eval(
If show_eng = "true" Then If show_eng = "true" Then
Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup.png" Var return = ###normal_eng
Else Else
Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup.png" Var return = ###normal_thai
EndIf EndIf
) )
</Filename> </Filename>
<FilenamePress> <FilenamePress>
eval( eval(
If show_eng = "true" Then If show_eng = "true" Then
Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup.png" Var return = ###normal_eng
Else Else
Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup.png" Var return = ###normal_thai
EndIf EndIf
) )
</FilenamePress> </FilenamePress>
<FilenameDisable> <FilenameDisable>
eval( eval(
If show_eng = "true" Then If show_eng = "true" Then
Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup.png" Var return = ###normal_eng
Else Else
Var return = "ROOT/taobin_project/image/event/powerup_free_1/powerup.png" Var return = ###normal_thai
EndIf EndIf
) )
</FilenameDisable> </FilenameDisable>

View file

@ -18,16 +18,25 @@ Else
If OpenFromPageBoard = 1 Then If OpenFromPageBoard = 1 Then
DEBUGVAR FreeEnergyDrink DEBUGVAR FreeEnergyDrink
DEBUGVAR BigButtonEnable DEBUGVAR BigButtonEnable
If FreeEnergyDrink = 1 Then
Var FreePowerup = "Enable"
Var BigButtonEnable = "Enable"
OpenInst 2 "ROOT/taobin_project/xml/event/promotion_powerup_free_1.xml"
Var OpenFromPageBoard = 0 ; check profile to enable free energy drink promotion
STRCONTAIN "ProEnergyDrinkFreePerCardID" XMLProfile EnableFreeEnergyDrink
If EnableFreeEnergyDrink = "true" Then
If FreeEnergyDrink = 1 Then
Var FreePowerup = "Enable"
Var BigButtonEnable = "Enable"
OpenInst 2 "ROOT/taobin_project/xml/event/promotion_powerup_free_1.xml"
Var OpenFromPageBoard = 0
Else
Var FreePowerup = "Invisible"
OpenInst 2 "ROOT/taobin_project/xml/page_catalog_group_recommend.xml"
EndIf
Else Else
Var FreePowerup = "Invisible" Var FreePowerup = "Invisible"
OpenInst 2 "ROOT/taobin_project/xml/page_catalog_group_recommend.xml" OpenInst 2 "ROOT/taobin_project/xml/page_catalog_group_recommend.xml"
EndIf EndIf
Else Else
DEBUGVAR FreeEnergyDrink DEBUGVAR FreeEnergyDrink

View file

@ -38,11 +38,6 @@
If Seeker = "curr" Then If Seeker = "curr" Then
Var LastMakeDrinkResult = "-" Var LastMakeDrinkResult = "-"
EndIf EndIf
If FreeEnergyDrink = 1 Then
; reset
Var RoadShow = ""
EndIf
If show_eng = "true" Then If show_eng = "true" Then
Var ImageDoing = "ROOT/taobin_project/image/page_doing/img2_eng.png" Var ImageDoing = "ROOT/taobin_project/image/page_doing/img2_eng.png"
@ -283,7 +278,16 @@
Var ShowCountDownBrewing = CountDownBrewing Var ShowCountDownBrewing = CountDownBrewing
If RoadShow = "true" Then If RoadShow = "true" Then
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
If FreeEnergyDrink = 1 Then
; reset
Var RoadShow = ""
; AddData
; +1 in quota in this id card
AddData <ID> <user-id> <menu?>
EndIf
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
Else Else
Var Seeker.OrderChanel = Seeker.OrderChanel + ":" Var Seeker.OrderChanel = Seeker.OrderChanel + ":"