on WriteDATA bn global ToSaveDATA,MDATA,gchd,BGMDATA if ToSaveDATA is not empty then if MDATA is empty then set name of cd btn id bn to "‚È‚µ" put empty into cd btn id bn set icon of cd btn id bn to 0 exit WriteDATA end if get the short date if it is not empty then set name of cd btn id bn to it set icon of cd btn id bn to line 2 of ToSaveDATA put ToSaveDATA into cd btn id bn end if put empty into ToSaveDATA pop card else if cd btn id bn is not empty then put cd btn id bn into MDATA put icon of cd btn id bn into gPLicon go cd "Black" lock screen go card id (line 1 of MDATA) --playBGM 2,0 if there is a cd btn "Cast0" then set icon of cd btn "Cast0" to line 2 of MDATA show cd btn "Cast0" at line 3 of MDATA end if delete line 1 to 3 of MDATA initMDATA put empty into ToSaveDATA put empty into gchd if short name of this bg is "MapBG" then send "initCard" to this card unlock screen with iris open if CondGlf(10) then send "Play" to window (line 1 of BGMDATA) else send "Play" to window (line 2 of BGMDATA) end if end if end WriteDATA on EraseAll repeat with bn=1 to 9 set name of cd btn id bn to "‚È‚µ" put empty into cd btn id bn set icon of cd btn id bn to 0 end repeat end EraseAll