Paste #37929: Question

Date: 2016/11/23 21:52:06 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18


How can this scenario be build to get it handled with using only 1 if ?

A shopsystem allows to set a money-limit for specific shops.
A limited shop can only give out this amount of money.
Other shops may are unlimited.

How could the if be builded, that it would be 'true' in these 2 scenarios:
- The shop has enough money left
  or
- The shop has infinity money




- if <shopmoneyATtheMoment||<shopmoneySTART>> <operator> <worthOfaItem> {
  - sell the item
  - set the new shopmoneyATtheMoment
  }