132 lines
3.9 KiB
Text
132 lines
3.9 KiB
Text
TRY "/mnt/sdcard/coffeevending/taobin_project/inter/mys/xml/event/tricker.ev"
|
|
|
|
Var XMLProfilePreEvent = XMLProfile
|
|
DEBUGVAR XMLProfile
|
|
STRCONTAIN "PromoYuzu250" XMLProfile HasProYuzu250Concat
|
|
STRCONTAIN "PromoReduced" XMLProfile IsProfileReduce
|
|
|
|
STRCONTAIN "PromoMelon" XMLProfile HasProMelonConcat
|
|
|
|
Var refresh_str = "-RefreshProf"
|
|
STRCONTAIN refresh_str XMLProfile HasRefreshProf
|
|
|
|
DEBUGVAR HasRefreshProf
|
|
DEBUGVAR NeedRefreshProfile
|
|
|
|
; refresh-profile-after-promo-end
|
|
If NeedRefreshProfile = 1 Then
|
|
|
|
READ_FILE "/mnt/sdcard/coffeevending/profile/price/profile_MYS_slot_3.json" ProfileSlot3MYS
|
|
READ_FILE "/mnt/sdcard/coffeevending/profile/price/profile_MYS_slot_4.json" ProfileSlot4MYS
|
|
|
|
STRCONTAIN "Drop" ProfileSlot3MYS PromoYuzuDrop
|
|
STRCONTAIN "Drop" ProfileSlot4MYS PromoMelonDrop
|
|
|
|
DEBUGVAR PromoYuzuDrop
|
|
DEBUGVAR PromoMelonDrop
|
|
|
|
If HasRefreshProf = "true" Then
|
|
|
|
DEBUGVAR "case already refresh"
|
|
|
|
; restore-profile
|
|
CacheVarStr "get" XMLProfilePreEvent
|
|
Var XMLProfile = XMLProfilePreEvent
|
|
Var NeedRefreshProfile = 0
|
|
Else
|
|
; save-current-as-pre
|
|
CacheVarStr "get" XMLProfilePreEvent
|
|
|
|
Var XMLProfile = XMLProfilePreEvent
|
|
|
|
If PromoMelonDrop = "true" Then
|
|
SAVELOG "case melon drop --> refresh"
|
|
Var XMLProfile = XMLProfile + refresh_str
|
|
EndIf
|
|
|
|
EndIf
|
|
Else
|
|
|
|
DEBUGVAR HasProYuzu250Concat
|
|
DEBUGVAR ProReducedPriceEnable
|
|
|
|
DEBUGVAR HasProMelonConcat
|
|
|
|
DEBUGVAR IgnoreProfileFromRunEV
|
|
|
|
If ProReducedPriceEnable = 1 Then
|
|
|
|
Else
|
|
DEBUGVAR "Case pro reduce end"
|
|
; case-pro-reduce-end
|
|
If IgnoreProfileFromRunEV = 1 Then
|
|
DEBUGVAR "Pro melon ongoing"
|
|
; concat-profile
|
|
If HasProMelonConcat = "true" Then
|
|
DEBUGVAR "Pro melon concat"
|
|
Else
|
|
|
|
If IsProfileReduce = "true" Then
|
|
DEBUGVAR "Pro reduce was set but disabled from trick"
|
|
CacheVarStr "get" XMLProfilePreEvent
|
|
If XMLProfilePreEvent = "" Then
|
|
DEBUGVAR "Get PreEvent Empty"
|
|
Var XMLProfile = "General"
|
|
Else
|
|
DEBUGVAR "Restore profile by pre-event, also concat Melon"
|
|
DEBUGVAR XMLProfilePreEvent
|
|
Var XMLProfile = XMLProfilePreEvent + "-"
|
|
Var XMLProfile = XMLProfile + "PromoMelon250"
|
|
|
|
EndIf
|
|
|
|
Else
|
|
DEBUGVAR "No pro reduce, concat pro melon"
|
|
CacheVarStr "put" XMLProfilePreEvent
|
|
|
|
Var XMLProfile = XMLProfile + "-"
|
|
Var XMLProfile = XMLProfile + "PromoMelon250"
|
|
|
|
EndIf
|
|
EndIf
|
|
Else
|
|
If IsProfileReduce = "true" Then
|
|
DEBUGVAR "No melon but set pro reduce"
|
|
CacheVarStr "get" XMLProfilePreEvent
|
|
If XMLProfilePreEvent = "" Then
|
|
DEBUGVAR "PreEvent empty, set General"
|
|
Var XMLProfile = "General"
|
|
Else
|
|
DEBUGVAR "Restore profile by pre-event"
|
|
Var XMLProfile = XMLProfilePreEvent
|
|
EndIf
|
|
|
|
Else
|
|
|
|
If HasProMelonConcat = "true" Then
|
|
CacheVarStr "get" XMLProfilePreEvent
|
|
Var XMLProfile = XMLProfilePreEvent
|
|
EndIf
|
|
|
|
DEBUGVAR "Store profile pre event"
|
|
DEBUGVAR XMLProfilePreEvent
|
|
CacheVarStr "put" XMLProfilePreEvent
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
If IgnoreProfileFromRunEV = 1 Then
|
|
Var ToggleAfterEventProfileOff = 1
|
|
|
|
If ProMelonEnable = 1 Then
|
|
Var IgnoreProfileFromRunEV = 0
|
|
SAVELOG "Allow exec cmd brew from event_profile"
|
|
EndIf
|
|
EndIf
|
|
|
|
|
|
EndIf
|