make shops actually prevent buying items you can afford
This commit is contained in:
parent
be184a85ed
commit
27410cb283
P3D/Content/Data/Scripts/frontier/shops
|
@ -3,6 +3,10 @@ version=2
|
||||||
@options.SetCancelIndex(3)
|
@options.SetCancelIndex(3)
|
||||||
@options.show(Standard Bag 5 BP,Special Bag 10 BP,Info,Exit)
|
@options.show(Standard Bag 5 BP,Special Bag 10 BP,Info,Exit)
|
||||||
:when:Standard Bag 5 BP
|
:when:Standard Bag 5 BP
|
||||||
|
:if:<player.bp><5
|
||||||
|
@text.show(You don't have enough BP!~Come back soon!)
|
||||||
|
:exitscript
|
||||||
|
:end
|
||||||
@storage.set(integer,berryloop,0)
|
@storage.set(integer,berryloop,0)
|
||||||
:while:15><storage.get(integer,berryloop)>
|
:while:15><storage.get(integer,berryloop)>
|
||||||
@storage.set(integer,berrytogive,<system.random(2000,2067)>)
|
@storage.set(integer,berrytogive,<system.random(2000,2067)>)
|
||||||
|
@ -11,6 +15,10 @@ version=2
|
||||||
@storage.set(integer,berryloop,<storage.get(integer,berryloop)>+1)
|
@storage.set(integer,berryloop,<storage.get(integer,berryloop)>+1)
|
||||||
:endwhile
|
:endwhile
|
||||||
:when:Special Bag 10 BP
|
:when:Special Bag 10 BP
|
||||||
|
:if:<player.bp><10
|
||||||
|
@text.show(You don't have enough BP!~Come back soon!)
|
||||||
|
:exitscript
|
||||||
|
:end
|
||||||
@storage.set(integer,berryloop,0)
|
@storage.set(integer,berryloop,0)
|
||||||
:while:10><storage.get(integer,berryloop)>
|
:while:10><storage.get(integer,berryloop)>
|
||||||
@storage.set(integer,berrytogive,<system.random(2029,2067)>)
|
@storage.set(integer,berrytogive,<system.random(2029,2067)>)
|
||||||
|
|
|
@ -112,8 +112,13 @@ version=2
|
||||||
@storage.set(string,drink,<register.value(juicetype5)>)
|
@storage.set(string,drink,<register.value(juicetype5)>)
|
||||||
@storage.set(integer,value,<register.value(juiceval5)>)
|
@storage.set(integer,value,<register.value(juiceval5)>)
|
||||||
@storage.set(integer,select,5)
|
@storage.set(integer,select,5)
|
||||||
:endwhen
|
:endwhen
|
||||||
|
|
||||||
|
:if:<player.bp><<register.value(juicecost<storage.get(integer,select)>)>
|
||||||
|
@text.show(You don't have enough BP!~Come again soon!)
|
||||||
|
:exitscript
|
||||||
|
:end
|
||||||
|
|
||||||
@text.show(Which Pokemon is this~drink for?)
|
@text.show(Which Pokemon is this~drink for?)
|
||||||
@pokemon.select
|
@pokemon.select
|
||||||
:if:<pokemon.selected>=-1
|
:if:<pokemon.selected>=-1
|
||||||
|
|
Loading…
Reference in New Issue