To make it fit my purposes, I had to change it a bit, but now I'm stuck.
What I want: Every day the player opens the game, they'll be rewarded with 10 coins. (They only get them once per day.) The player can accumulate as many coins as they want - to beat the game, they need to buy a key for a certain amount of coins.
What I have so far:
Code: Select all
## script.rpy for a game in seven days
## original base code by nicolas (probablement.net)
## TIME
init -1 python:
import time
time = time.localtime(time.time()).tm_wday
days = ['Monday', # 0
'Tuesday', # 1
'Wednesday', # 2
'Thursday', # 3
'Friday', # 4
'Saturday', # 5
'Sunday'] # 6
## START
label start:
# What time is it?
$day = time
$dayname = days[time]
# Shared beginning.
centered "[dayname]"
"I woke up."
jump gotoday
## GO TO DAY
label gotoday:
# Jump to daily script.
if day == 0:
jump mon_start
elif day == 1:
jump tue_start
elif day == 2:
jump wed_start
elif day == 3:
jump thu_start
elif day == 4:
jump fri_start
elif day == 5:
jump sat_start
elif day == 6:
jump sun_start
else:
"Out of time!"
return
## 0 MONDAY
label mon_start:
# Check past
if persistent.mon_money: ##change to persistent.dayname_money?
"I already got today's money."
jump closing
# Flag day as started
$persistent.mon_money = True
"Every day, you recieve 10 coins."
menu:
"Take 10 coins":
$persistent.mon_money = True
"You got 10 coins!"
jump closing