I do not get an error but however I do the money just won't register so one of the items for a neutral ending is just not available currently
Code: Select all
#Items
init python:
class Item:
def __init__(self, name, cost):
self.name = name
self.cost = cost
#This is your money and your inventory. This will give option to two second endings upon entering scene 4 the town
class Bags:
def __init__(self, Dollar = 0):
self.Dollar = Dollar
self.items = [ ]
#How do you buy stuffssssssssssssssssssssss
def buy(self, item):
if self.Dollar >= item.cost:
self.Dollar -= item.cost
self.items.append(item)
return True
else:
return False
#Earning money is simpel and clean :3
def earn(self, amount):
self.Dollar += amount
#Item managing for the ending so the game can check after the requierd items for the, DRAW or the TAIL ending
# Never used beacuse of the shop menu being a better way to jump straight to the endings of choice
def has_item(self, item):
if item in self.items:
return True
else:
return False
Code: Select all
python:
bag = Bags()
$ bag.earn(10)
$ current_Dollar = bag.Dollar
M "Thanks %(current_Dollar)d Dollars... You have done to much guys"
Code: Select all
python:
bag = Bags()
Gun = Item("Gun", 6)
Whip = Item("Whip", 6)
WaterBottle = Item("WaterBottle", )
label Shit:
$ Guncost = Gun.cost
$ Whipcost = Whip.cost
$ WaterBottlecost = WaterBottle.cost
N "After buying a horse you named Volley to commemorate Clacker you go to check the store."
S "Welcome traveler Just tell me if you wanna buy anything."
N "You glance at the items in stock"
menu shop1:
"Buy Gun for %(Guncost)d coins.":
if bag.buy(Gun):
S "Ah a gun! Of course in this world being able to defend yourself is important with the steel ball run going!"
M "I have noticed"
S "Ah, I am guessing that encounter made you decide on the gun."
M "You think?"
N "You spin the gun wheel getting a feel for the gun before thanking the shopkeeper leaving the shop"
N "You decide to check in on the tavern and eat dinner with Johnny and Gyro before going to bed to get some
well deserved sleep"
jump GoodEnd
"Buy olives for %(Whipcost)d coins.":
if bag.buy(Whip):
S "A whip. A hard weapon to master but powerful if you do. You must have time on your hand"
M "I have some experience with whips but not near enough to use them properly thought I'd pick one up and properly learn."
S"That is an excellent idea I hope you do well!"
N "You take the whip thanking the shopkeeper before leaving the shop"
N "You decide to check in on the tavern and eat dinner with Johnny and Gyro before going to bed to get some well-deserved sleep"
jump GoodEnd
"Buy chocolate for %(WaterBottlecost)d coins.":
if bag.buy(WaterBottle):
S "A water bottle is an excellent choice in this heat wave we are currently having!"
M "Yeah I've kind of lost mine"
S "Then It's an even better purchase! Hope your travels goes well!"
M "Hope your business goes well"
N "You are given the water bottle and leaves the shop"
N "You decide to check in on the tavern and eat dinner with Johnny and Gyro before going to bed to get some well-deserved sleep"
jump GoodEnd
"Buy nothing.":
N "You decide to buy nothing as you don't see anything you like and you leave the shop"
N "You decide to check in on the tavern and eat dinner with Johnny and Gyro before going to bed to get some well-deserved sleep"
jump GoodEnd
label fallthrough1:
M "Not enough money to buy that..."
N "You decide to leave the shop as you don't have money for anything..."
N "You decide to check in on the tavern and eat dinner with Johnny and Gyro before going to bed to get some well-deserved sleep"
jump GoodEnd