From 2c14eef239e1d2743f4114e1a489d4bcd066f9f6 Mon Sep 17 00:00:00 2001 From: darkfire006 Date: Thu, 21 Dec 2023 00:09:59 -0600 Subject: [PATCH] fix daily juice giving --- .../Scripts/frontier/shops/juice/daily.dat | 32 +++++++++++++------ .../Scripts/frontier/shops/juice/give.dat | 30 +++++++++++------ 2 files changed, 42 insertions(+), 20 deletions(-) diff --git a/P3D/Content/Data/Scripts/frontier/shops/juice/daily.dat b/P3D/Content/Data/Scripts/frontier/shops/juice/daily.dat index 1266efae6..4845232cd 100644 --- a/P3D/Content/Data/Scripts/frontier/shops/juice/daily.dat +++ b/P3D/Content/Data/Scripts/frontier/shops/juice/daily.dat @@ -9,10 +9,19 @@ version=2 @register.unregister(solddailyjuice) @storage.set(integer,berry1,) - @storage.set(integer,berry2,) - @storage.set(string,drink,fail) - @storage.set(integer,value,-1) - @script.start(frontier\shops\juice\calc) + :if:>0 + @storage.set(string,drink,)>) + @storage.set(integer,value,)>*4)>) + :else + @storage.set(integer,berry2,) + :if:>18 + @storage.set(integer,berry1,) + @storage.set(integer,berry2,) + :endif + @storage.set(string,drink,fail) + @storage.set(integer,value,-1) + @script.start(frontier\shops\juice\calc) + :endif @register.register(juicetype,str,) @register.register(juiceval,int,) @@ -60,18 +69,20 @@ version=2 @storage.set(integer,value,-1) +@storage.set(integer,juiceindex,0) @storage.set(integer,juicecount,0) @storage.set(string,juiceselect,) -:while:6> - :if:)>=false - @storage.set(string,juiceselect,)>,) +:while:6> + :if:)>=false + @storage.set(string,juiceselect,)>,) + @storage.set(integer,juicecount,+1)>) :endif - @storage.set(integer,juicecount,+1)>) + @storage.set(integer,juiceindex,+1)>) :endwhile @storage.set(string,juiceselect,Exit) @text.show(Welcome to the Juice Shoppe!*Please take a look~at our daily specials!) -@options.setcancelindex(6) +@options.setcancelindex() @options.show() :when:Exit @text.show(Come again soon!) @@ -110,7 +121,8 @@ version=2 :endif @script.start(frontier\shops\juice\give) -@player.addbp(-) +@player.addbp(-)>) @register.register(solddailyjuice) +@text.show(I hope )>~liked the drink!*Come again soon!) :end diff --git a/P3D/Content/Data/Scripts/frontier/shops/juice/give.dat b/P3D/Content/Data/Scripts/frontier/shops/juice/give.dat index a4c2242f4..a34a6a612 100644 --- a/P3D/Content/Data/Scripts/frontier/shops/juice/give.dat +++ b/P3D/Content/Data/Scripts/frontier/shops/juice/give.dat @@ -7,8 +7,9 @@ version=2 @text.show(Give this Purple Juice to your~)>?) @Options.show(Yes,No) :when:No - @text.show(Come again soon!) + @text.show(Come again soon!) :endscript + :when:Yes :endwhen @pokemon.addfriendship(,4) @pokemon.addev(,hp,) @@ -17,8 +18,9 @@ version=2 @text.show(Give this Red Juice to your~)>?) @Options.show(Yes,No) :when:No - @text.show(Come again soon!) + @text.show(Come again soon!) :endscript + :when:Yes :endwhen @pokemon.addfriendship(,4) @pokemon.addev(,atk,) @@ -27,8 +29,9 @@ version=2 @text.show(Give this Yellow Juice to your~)>?) @Options.show(Yes,No) :when:No - @text.show(Come again soon!) + @text.show(Come again soon!) :endscript + :when:Yes :endwhen @pokemon.addfriendship(,4) @pokemon.addev(,def,) @@ -37,8 +40,9 @@ version=2 @text.show(Give this Blue Juice to your~)>?) @Options.show(Yes,No) :when:No - @text.show(Come again soon!) + @text.show(Come again soon!) :endscript + :when:Yes :endwhen @pokemon.addfriendship(,4) @pokemon.addev(,spatk,) @@ -47,8 +51,9 @@ version=2 @text.show(Give this Green Juice to your~)>?) @Options.show(Yes,No) :when:No - @text.show(Come again soon!) + @text.show(Come again soon!) :endscript + :when:Yes :endwhen @pokemon.addfriendship(,4) @pokemon.addev(,spdef,) @@ -57,8 +62,9 @@ version=2 @text.show(Give this Pink Juice to your~)>?) @Options.show(Yes,No) :when:No - @text.show(Come again soon!) + @text.show(Come again soon!) :endscript + :when:Yes :endwhen @pokemon.addfriendship(,4) @pokemon.addev(,speed,) @@ -67,8 +73,9 @@ version=2 @text.show(Give this Colorful Shake to~your )>?) @Options.show(Yes,No) :when:No - @text.show(Come again soon!) + @text.show(Come again soon!) :endscript + :when:Yes :endwhen @pokemon.addfriendship(,) :when:soda @@ -80,16 +87,19 @@ version=2 :endwhen @Options.show(Yes,No) :when:No - @text.show(Come again soon!) + @text.show(Come again soon!) :endscript + :when:Yes :endwhen @pokemon.addlevel(,) :when:soup @text.show(Give this Perilous Soup to your~)>?) @Options.show(Yes,No) :when:No - @text.show(Come again soon!) + @text.show(Come again soon!) :endscript + :when:Yes :endwhen @pokemon.setallevs(,0,0,0,0,0,0) -:endwhen \ No newline at end of file +:endwhen +:end \ No newline at end of file