SCENE 6100 shop,  SCENE, "Koon's Korner", 0, 0
	GIVE L9999
	GIVE M9999
	ACTOR 0, "Koon", ronnie, 1,50,60
	COMPARE #<learnaboutshop>, 1
	IF= @checkday
	0: Welcome to my shop!
	0: In a moment, you will be surrounded by furniture that you can buy for your home.
	0: However, if you do not have a home, then you will not be able to use any of this.
	0: To buy something or learn more about it, simply right click it.
	0: Every day, I'll be sending back in my old stuff and getting new stuff in.
	0: If there's something you want, it might not be there the next day!
	0: Thanks for shopping!
	SET learnaboutshop, 1
	SET currentday, #<num.timeDay>
	SET currentmonth, #<num.timeMonth>
	SET currentyear, #<num.timeYear>
	GOTO @setupnewstuff
END
@checkday
; Has the player been here today?
	COMPARE #<num.timeDay>, #<currentday>
	IF= @checkmonth
; OK, so this means the player has not been here today.
; This means that the player needs to set up new furniture.
@setday
	SET currentday, #<num.timeDay>
	SET currentmonth, #<num.timeMonth>
	SET currentyear, #<num.timeYear>
	GOTO @setupnewstuff
END

@checkmonth
; But is it just the same day on another month?
	COMPARE #<num.timeMonth>, #<currentmonth>
	IF>, @setday
	IF<, @setday
	GOTO @checkyear
END

@checkyear
; Oh my, could it be that it's been a year since they've been here last?
	COMPARE #<num.timeYear>, #<currentyear>
	IF> @setday
	IF< @setday
	GOTO @setactors
END

@setupnewstuff
SET itemnum1bought, 0
SET itemnum2bought, 0
SET itemnum3bought, 0
SET itemnum4bought, 0
SET itemnum5bought, 0
SET itemnum6bou
@setbeds
	IF R20, @bedheart
	IF R25, @bedpurple
	IF R33, @bedgreen
	IF R25, @bedred
	GOTO @bedblue
END

@bedpurple
	SET itemnum1, "Purple Bed"
	SET itemnum1price, 22500
	SET itemnum1skin, beds
	set itemnum1frame, 1
	SET itemnum1id, 530
	ACTOR 1, "Purple Bed", beds, 1,20,30
	GOTO @setdresser
END

@bedgreen
	SET itemnum1, "Green Bed"
	SET itemnum1price, 25000
	SET itemnum1skin, beds
	set itemnum1frame, 2
	SET itemnum1id, 531
	ACTOR 1, "Green Bed", beds, 2,20,30
	GOTO @setdresser
END

@bedred
	SET itemnum1, "Red Bed"
	SET itemnum1price, 23000
	SET itemnum1skin, beds
	set itemnum1frame, 3
	SET itemnum1id, 532
	ACTOR 1, "Red Bed", beds, 3,20,30
	GOTO @setdresser
END

@bedblue
	SET itemnum1, "Blue Bed"
	SET itemnum1price, 26000
	SET itemnum1skin, beds
	set itemnum1frame, 4
	SET itemnum1id, 533
	ACTOR 1, "Blue Bed", beds, 4,20,30
	GOTO @setdresser
END

@bedheart
	SET itemnum1, "Heart Bed"
	SET itemnum1price, 50000
	SET itemnum1skin, beds
	set itemnum1frame, 5
	SET itemnum1id, 576
	ACTOR 1, "Heart Bed", beds, 5,20,30
	GOTO @setdresser
END

@setdresser
;
	GOTO @setradio
;
	IF R33, @dressersmall
	IF R50, @dressernormal
	GOTO @dresserlarge
END

@dressersmall
	SET itemnum2, "Small Dresser"
	SET itemnum2price
END

@setradio
	GOTO @radionormal
END

@radionormal
	SET itemnum3, "Normal Radio"
	SET itemnum3price, 25000
	SET itemnum3skin, radio
	set itemnum3frame, 1
	SET itemnum3id, 555
	ACTOR 3, "Normal Radio", radio, 1,80,30
	GOTO @setTV
END

@setTV
	IF R50, @TVblack
	GOTO @TVretro
END

@TVblack
	SET itemnum4, "Black TV"
	SET itemnum4price, 100000
	SET itemnum4skin, tv2
	set itemnum4frame, 1
	SET itemnum4id, 560
	SET itemnum4include, "Mor' News"
	SET itemnum4includeid, 566
	ACTOR 4, "Black TV", tv2, 1,20,80
	GOTO @setchannel
END

@TVretro
	SET itemnum4, "Retro TV"
	SET itemnum4price, 100000
	SET itemnum4skin, tv1
	set itemnum4frame, 1
	SET itemnum4id, 561
	SET itemnum4include, "Supa' Sports"
	SET itemnum4includeid, 565
	ACTOR 4, "Retro TV", tv1, 1,20,80
	GOTO @setchannel
END

@setchannel
	IF R50, @channelss
	GOTO @channelmn
END

@channelss
	SET itemnum5, "Supa' Sports"
	SET itemnum5price, 50000
	SET itemnum5skin, tv2
	set itemnum5frame, 3
	SET itemnum5id, 565
	ACTOR 5, "Supa' Sports", tv2, 3,50,80
	GOTO @setfigurine
END

@channelmn
	SET itemnum5, "Mor' News"
	SET itemnum5price, 50000
	SET itemnum5skin, tv2
	set itemnum5frame, 2
	SET itemnum5id, 566
	ACTOR 5, "Mor' News", tv2, 2,50,80
	GOTO @setfigurine
END

@setfigurine
	IF R14, @fbeggar
	IF R17, @faxl
	IF R20, @frose
	IF R25, @fdanner
	IF R33, @fmayor
	IF R50, @fjoe
	GOTO @fyoda
END

@fbeggar
	SET itemnum6, "Beggar Figurine"
	SET itemnum6price, 250000
	SET itemnum6skin, beggar
	set itemnum6frame, 1
	SET itemnum6id, 545
	ACTOR 6, "Beggar Figurine", beggar, 1,80,80
	GOTO @normal
END

@faxl
	SET itemnum6, "Axl Figurine"
	SET itemnum6price, 300000
	SET itemnum6skin, axl
	set itemnum6frame, 1
	SET itemnum6id, 546
	ACTOR 6, "Axl Figurine", axl, 1,80,80
	GOTO @normal
END

@frose
	SET itemnum6, "Rose Figurine"
	SET itemnum6price, 600000
	SET itemnum6skin, rose
	set itemnum6frame, 1
	SET itemnum6id, 547
	ACTOR 6, "Rose Figurine", rose, 1,80,80
	GOTO @normal
END

@fdanner
	SET itemnum6, "Mr. Danner Figurine"
	SET itemnum6price, 750000
	SET itemnum6skin, danner
	set itemnum6frame, 1
	SET itemnum6id, 548
	ACTOR 6, "Mr. Danner Figurine", danner, 1,80,80
	GOTO @normal
END

@fmayor
	SET itemnum6, "Mayor Figurine"
	SET itemnum6price, 400000
	SET itemnum6skin, ronnie
	set itemnum6frame, 1
	SET itemnum6id, 549
	ACTOR 6, "Mayor Figurine", ronnie, 1,80,80
	GOTO @normal
END

@fjoe
	SET itemnum6, "King Joe Figurine"
	SET itemnum6price, 350000
	SET itemnum6skin, kingjoe
	set itemnum6frame, 1
	SET itemnum6id, 550
	ACTOR 6, "King Joe Figurine", kingjoe, 1,80,80
	GOTO @normal
END

@fyoda
	SET itemnum6, "Yoda Figurine"
	SET itemnum6price, 600000
	SET itemnum6skin, adoy
	set itemnum6frame, 1
	SET itemnum6id, 551
	ACTOR 6, "Yoda Figurine", adoy, 1,80,80
	GOTO @normal
END

@setactors
@setactor1
COMPARE #<itemnum1bought>, 1
IF= @setactor1sold
	ACTOR 1, #<itemnum1>, #<itemnum1skin>, #<itemnum1frame>,20,30
@setactor2
COMPARE #<itemnum2bought>, 1
IF= @setactor2sold
;	ACTOR 2, #<itemnum2>, #<itemnum2skin>, #<itemnum2frame>,50,30
@setactor3
COMPARE #<itemnum3bought>, 1
IF= @setactor3sold
	ACTOR 3, #<itemnum3>, #<itemnum3skin>, #<itemnum3frame>,80,30
@setactor4
COMPARE #<itemnum4bought>, 1
IF= @setactor4sold
	ACTOR 4, #<itemnum4>, #<itemnum4skin>, #<itemnum4frame>,20,80
@setactor5
COMPARE #<itemnum5bought>, 1
IF= @setactor5sold
	ACTOR 5, #<itemnum5>, #<itemnum5skin>, #<itemnum5frame>,50,80
@setactor6
COMPARE #<itemnum6bought>, 1
IF= @setactor6sold
	ACTOR 6, #<itemnum6>, #<itemnum6skin>, #<itemnum6frame>,80,80
	GOTO @normal
END

@setactor1sold
	ACTOR 1, "", koonshop, 1,20,30
	GOTO @setactor2
END

@setactor2sold
	ACTOR 2, "", koonshop, 1,50,30
	GOTO @setactor3
END

@setactor3sold
	ACTOR 3, "", koonshop, 1,80,30
	GOTO @setactor4
END

@setactor4sold
	ACTOR 4, "", koonshop, 1,20,80
	GOTO @setactor5
END

@setactor5sold
	ACTOR 5, "", koonshop, 1,50,80
	GOTO @setactor6
END

@setactor6sold
	ACTOR 6, "", koonshop, 1,80,80
	GOTO @normal
END

@normal
	0: Right-click anything you'd like to know about!
END

@eventactorclick1
	COMPARE #<itemnum1bought>, 1
	IF= @soldout
	0: Ahh, I see you have your eye on a fine #<itemnum1>.
	0: It's very comfortable, and it has a low, low price of #<itemnum1price> gold!
	0: Would you like to buy it?
	ASK 9999
	IF Qy, @eventactorclick1buy
	0: Ahh, well that's a shame.
	0: Just tell me if there's anything I can help you with.
END

@eventactorclick1buy
	0: Very well then.
	COMPARE #<num.hostGP>, #<itemnum1price>
	IF< @cantafford
	0: Well, I'll just be taking the #<itemnum1price> gold...
	0: And here is your #<itemnum1>! Thank you!
	ACTOR 1, "", koonshop, 1,20,30
	SET itemnum1bought, 1
	GIVE I#<itemnum1id>
	TAKE G#<itemnum1price>
END

@eventactorclick2
	COMPARE #<itemnum2bought>, 1
	IF= @soldout
	0: Oh, I see you'd like to buy a #<itemnum2>.
	0: It can hold many items. And for just #<itemnum2price> gold!
	0: Would you care to buy it?
	ASK 9999
	IF Qy, @eventactorclick2buy
	0: Ahh, well that's a shame.
	0: Just tell me if there's anything I can help you with.
END

@eventactorclick2buy
	0: Very well then.
	COMPARE #<num.hostGP>, #<itemnum2price>
	IF< @cantafford
	0: Well, I'll just be taking the #<itennum2price> gold...
	0: And here is your #<itemnum2>! Thank you!
	ACTOR 2, "", koonshop, 1,50,30
	SET itemnum2bought, 1
	GIVE I#<itemnum2id>
	TAKE G#<itemnum2price>
END

@eventactorclick3
	COMPARE #<itemnum3bought>, 1
	IF= @soldout
	0: Ahh, that is a fine #<itemnum3>.
	0: It plays all your tunes, and for the low price of #<itemnum3price>!
	0: Would you like to purchase it?
	ASK 9999
	IF Qy, @eventactorclick3buy
	0: Ahh, well that's a shame.
	0: Just tell me if there's anything I can help you with.
END

@eventactorclick3buy
	0: Very well then.
	COMPARE #<num.hostGP>, #<itemnum3price>
	IF< @cantafford
	0: Well, I'll just be taking the #<itemnum3price> gold...
	0: And here is your #<itemnum3>! Thank you!
	ACTOR 3, "", koonshop, 1,80,30
	SET itemnum3bought, 1
	GIVE I#<itemnum3id>
	TAKE G#<itemnum3price>
END

@eventactorclick4
	COMPARE #<itemnum4bought>, 1
	IF= @soldout
	0: Ahh yes, that's a #<itemnum4>.
	0: It comes with #<itemnum4include>, and costs just #<itemnum4price>.
	0: Would you like to purchase it?
	ASK 9999
	IF Qy, @eventactorclick4buy
	0: Ahh, well that's a shame.
	0: Just tell me if there's anything I can help you with.
END

@eventactorclick4buy
	0: Very well then.
	COMPARE #<num.hostGP>, #<itemnum4price>
	IF< @cantafford
	0: Well, I'll just be taking the #<itemnum4price> gold...
	0: And here is your #<itemnum4>! Thank you!
	ACTOR 4, "", koonshop, 1,20,80
	SET itemnum4bought, 1
	GIVE I#<itemnum4id>
	GIVE I#<itemnum4includeid>
	TAKE G#<itemnum4price>
END

@eventactorclick5
	COMPARE #<itemnum5bought>, 1
	IF= @soldout
	0: That's the channel #<itemnum5>.
	0: You right click your TV to install it. It costs #<itemnum5price> gold.
	0: Will you be buying it?
	ASK 9999
	IF Qy, @eventactorclick5buy
	0: Ahh, well that's a shame.
	0: Just tell me if there's anything I can help you with.
END

@eventactorclick5buy
	0: Very well then.
	COMPARE #<num.hostGP>, #<itemnum5price>
	IF< @cantafford
	0: Well, I'll just be taking the #<itemnum5price> gold...
	0: And here is your #<itemnum5>! Thank you!
	ACTOR 5, "", koonshop, 1,50,80
	SET itemnum5bought, 1
	GIVE I#<itemnum5id>
	TAKE G#<itemnum5price>
END

@eventactorclick6
	COMPARE #<itemnum6bought>, 1
	IF= @soldout
	0: Ahh, I see you have your eye on a rare #<itemnum6>.
	0: Its a perfect immitation, and I can't let it go for any less than #<itemnum6price> gold.
	0: Will you be buying it?
	ASK 9999
	IF Qy, @eventactorclick6buy
	0: Ahh, well that's a shame.
	0: Just tell me if there's anything I can help you with.
END

@eventactorclick6buy
	0: Very well then.
	COMPARE #<num.hostGP>, #<itemnum6price>
	IF< @cantafford
	0: Well, I'll just be taking the #<itemnum6price> gold...
	0: And here is your #<itemnum6>! Thank you!
	ACTOR 6, "", koonshop, 1,80,80
	SET itemnum6bought, 1
	GIVE I#<itemnum6id>
	TAKE G#<itemnum6price>
END


@cantafford
	0: I'm sorry, but it looks like you're a little short on gold!
	0: Is there anything else I could help you with?
END

@soldout
END

