;ACe

@cin_item_buy
;ACewpBƂႢB
gosub @sin_textw_btn_kakusi	;{^\
;wi
bg "bg/00/sin_kara_bg.png",#F,300

spset "title",99
;߂
%name="߂"
	sp "title:07",{name={"?"+%name+",menu0","?"+%name+",menu1"},x=1280-60,y=160+35*7+10,z=0}
;///////////////////////ACeꗗ
id=7:%name=item[id][0]+"@"+str(item[id]):%name2="title:"+str(id):%name=%name+"@"+str(item[id][4])+"X["
sp %name2,{name={"?"+%name+",sin_item_001","?"+%name+",menu1"},x=50,y=100+35*0,z=95}

id=8:%name=item[id][0]+"@"+str(item[id]):%name2="title:"+str(id):%name=%name+"@"+str(item[id][4])+"X["
sp %name2,{name={"?"+%name+",sin_item_001","?"+%name+",menu1"},x=50,y=100+35*1,z=95}

;/////////////////////////////////////
@cin_item_buy_sel
print #c
btnclear "title"

btn "title:7",{on="S(rpg_sozai\se\sin_click.ogg)"}
btn "title:8",{on="S(rpg_sozai\se\sin_click.ogg)"}
btn "title:02",{on="S(rpg_sozai\se\sin_click.ogg)"}
btn "title:07",{on="S(rpg_sozai\se\sin_click.ogg)"}

for %0=1 to 2000
	%name="title:"+str(%0)
	btn %name,{on="S(rpg_sozai\se\sin_click.ogg)"}
next

@cin_item_buy_sel_l_lp
btnexec %ret,"title",{func=1}
if %ret=="#F1" then gosub @sin_ss
;if %ret=="dn" then goto @gousei_02
if %ret=="#R" then spsetdelete "title" :spsetdelete "title" : goto @sin_menu	;j[ɖ߂
if %ret=="07" then spsetdelete "title" :spsetdelete "title" : goto @sin_menu	;j[ɖ߂
;if %ret=="#R" then spsetdelete "title" :spsetdelete "title" : goto @gousei_00	;j[ɖ߂
;if %ret=="07" then spsetdelete "title" :spsetdelete "title" : goto @gousei_00	;j[ɖ߂


;-----------------------------------------ACew

if %ret=="7" then
sing[101]=7		;ACeid
sing[0]=0		;
sing[100]=item[sing[101]][3]		;ACe̐
gosub @sin_gosei_soubi					;ACê݂̍
goto @cin_buy_kosuu_2
endif

if %ret=="8" then
sing[101]=8		;ACeid
sing[0]=0		;
sing[100]=item[sing[101]][3]		;ACe̐
gosub @sin_gosei_soubi					;ACê݂̍
goto @cin_buy_kosuu_2
endif

goto @cin_item_buy_sel_l_lp






@cin_buy_kosuu_2
spset "toto",50
	if item[sing[101]][4] > ste[21] then 
	܂I
	goto @cin_item_buy
endif
	item[sing[101]]=item[sing[101]]+1:ste[21]=ste[21]-itetm[sing[101]]
setumei=sing[101][0]+"P܂"
gosub @sin_1hyouzi_01

goto @cin_item_buy






























@cin_buy_kosuu



spsetvisible "ste",0:print #C
spset "toto",50
;IB̍őlB
%name="toto:buy"
sp %name,{name={"?"+item[sing[101]][0]+",sin_item_001","?"+item[sing[101]][0]+",menu1"},x=1280/2-300,y=720/2,z=95}
%name="toto:buy1"
sp %name,{name={"?{P,sin_item_001","?{P,menu1"},cx=1280/2+100,cy=720/2,z=95}
%name="toto:buy100"
;sp %name,{name={"?{PO,sin_item_001","?{PO,menu1"},cx=1280/2+150,cy=,720/2,z=95}
sp %name,{name={"?{PO,sin_item_001","?{PO,menu1"},cx=1280/2+150,cy=720/2,z=95}

@cin_item_buy_sel_
print #c
btnclear "toto"

btn "toto:buy1",{on="S(rpg_sozai\se\sin_click.ogg)"}
;btn "toto:buy10",{on="S(rpg_sozai\se\sin_click.ogg)"}
btn "toto:buy100",{on="S(rpg_sozai\se\sin_click.ogg)"}
;btn "toto:buy1000",{on="S(rpg_sozai\se\sin_click.ogg)"}
btn "toto:07",{on="S(rpg_sozai\se\sin_click.ogg)"}

;for %0=1 to 2000
;btnexec %ret,"toto",{func=1}
;	btn %name,{on="S(rpg_sozai\se\sin_click.ogg)"}
;next


@cin_item_buy_ko_l__lp
btnexec %ret,"toto",{func=1}
if %ret=="#F1" then gosub @sin_ss
if %ret=="#R" then spsetdelete "toto" :spsetdelete "toto" : goto @sin_menu	;j[ɖ߂
if %ret=="07" then spsetdelete "toto" :spsetdelete "toto" : goto @sin_menu	;j[ɖ߂


;-----------------------------------------ACew
;ACeƉiB
;ACe
if %ret=="buy1" then 
	if item[sing[101]] > ste[21] then 
	;O[

	endif
	item[sing[101]]=item[sing[101]]+1:ste[21]=ste[21]-itetm[sing[101]]
	;O[

endif

if %ret=="buy100" then 
	if item[sing[101]]*10 > ste[21] then goto @cin_item_buy
	item[sing[101]]=item[sing[101]]+10:ste[21]=ste[21]-itetm[sing[101]]*10
	;O[
endif

;if %ret=="100" then 
;	if item[sing[101]] < ste[21] then item[sing[101]]=item[sing[101]]-1:goto @cin_buy_kosuu
;endif

;if %ret=="1000" then 
;	if item[sing[101]]*10 < ste[21] then item[sing[101]]=item[sing[101]]-10:goto @cin_buy_kosuu
;endif

	;ACeID{i


goto @cin_item_buy_ko_l__lp

