Fix Battle Frontier Juice Shop

This commit is contained in:
JappaWakka 2023-12-04 15:08:32 +01:00
parent 4f1a940d9e
commit 76dcb2a9a1
3 changed files with 56 additions and 41 deletions

View File

@ -1,13 +1,13 @@
version=2 version=2
:if:<inventory.juicecolor(<storage.get(int,berry1)>)>=<inventory.juicecolor(<storage.get(int,berry2)>)> :if:<inventory.juicecolor(<storage.get(int,berry1)>)>=<inventory.juicecolor(<storage.get(int,berry2)>)>
@storage.set(string,drink,<inventory.juicecolor(<storage.get(int,berry1)>)>) @storage.set(string,drink,<inventory.juicecolor(<storage.get(int,berry1)>)>)
@storage.set(integer,value,(<inventory.juicegroup(<storage.get(int,berry1)>)>+<inventory.juicegroup(<storage.get(int,berry2)>)>)*4) @storage.set(integer,value,<math.int(<math.int(<inventory.juicegroup(<storage.get(int,berry1)>)>+<inventory.juicegroup(<storage.get(int,berry2)>)>)>*4)>)
:if:<storage.get(int,berry1)>=<storage.get(int,berry2)> :if:<storage.get(int,berry1)>=<storage.get(int,berry2)>
@storage.set(integer,value,<inventory.juicegroup(<storage.get(int,berry1)>)>*4) @storage.set(integer,value,<math.int(<inventory.juicegroup(<storage.get(int,berry1)>)>*4)>)
:endif :endif
:else :else
@storage.set(string,drink,shake) @storage.set(string,drink,shake)
@storage.set(integer,value,(<inventory.juicegroup(<storage.get(int,berry1)>)>+<inventory.juicegroup(<storage.get(int,berry2)>)>)*6) @storage.set(integer,value,<math.int(<math.int(<inventory.juicegroup(<storage.get(int,berry1)>)>+<inventory.juicegroup(<storage.get(int,berry2)>)>)>*6)>)
:select:<storage.get(int,berry1)> :select:<storage.get(int,berry1)>
:when:2057 :when:2057
@ -41,4 +41,5 @@ version=2
@storage.set(integer,value,0) @storage.set(integer,value,0)
:endif :endif
:endwhen :endwhen
:endif :endif
:end

View File

@ -1,8 +1,8 @@
version=2 version=2
:if:<register.registered(dailyjuicecalc)>=false :if:<register.registered(dailyjuicecalc)>=false
@register.registertime(dailyjuicecalc,1,day)
@storage.set(integer,juicecount,0) @storage.set(integer,juicecount,0)
:while:6><storage.get(integer,juicecount)> @storage.set(string,drink,fail)
:while:5><storage.get(integer,juicecount)>
@register.unregister(juicetype<storage.get(integer,juicecount)>,str) @register.unregister(juicetype<storage.get(integer,juicecount)>,str)
@register.unregister(juiceval<storage.get(integer,juicecount)>,int) @register.unregister(juiceval<storage.get(integer,juicecount)>,int)
@register.unregister(juicedesc<storage.get(integer,juicecount)>,int) @register.unregister(juicedesc<storage.get(integer,juicecount)>,int)
@ -12,52 +12,66 @@ version=2
@storage.set(integer,berry2,<system.random(2000,2066)>) @storage.set(integer,berry2,<system.random(2000,2066)>)
@storage.set(string,drink,fail) @storage.set(string,drink,fail)
@storage.set(integer,value,-1) @storage.set(integer,value,-1)
@script.start(frontier\shops\juice\calc) :select:<storage.get(integer,juicecount)>
:when:0
@script.start(frontier\shops\juice\calc)
:when:1
@script.start(frontier\shops\juice\calc)
:when:2
@script.start(frontier\shops\juice\calc)
:when:3
@script.start(frontier\shops\juice\calc)
:when:4
@script.start(frontier\shops\juice\calc)
:when:5
@script.start(frontier\shops\juice\calc)
:endwhen
@register.register(juicetype<storage.get(integer,juicecount)>,str,<storage.get(string,drink)>) @register.register(juicetype<storage.get(integer,juicecount)>,str,<storage.get(string,drink)>)
@register.register(juiceval<storage.get(integer,juicecount)>,int,<storage.get(integer,value)>) @register.register(juiceval<storage.get(integer,juicecount)>,int,<storage.get(integer,value)>)
:select:<storage.get(string,drink)> :select:<storage.get(string,drink)>
:when:fail :when:fail
@text.show(something went wrong please try again later) @text.show(Something went wrong please~try again later.)
:endscript :endscript
:when:purple :when:purple
@register.register(juicedesc<storage.get(integer,juicecount)>,str,Purple Juice <storage.get(integer,value)>/4 BP) @register.register(juicedesc<storage.get(integer,juicecount)>,str,Purple Juice <math.int(<storage.get(integer,value)>/4)> BP)
@register.register(juicecost<storage.get(integer,juicecount)>,int,<storage.get(integer,value)>/4) @register.register(juicecost<storage.get(integer,juicecount)>,int,<math.int(<storage.get(integer,value)>/4)>)
:when:red :when:red
@register.register(juicedesc<storage.get(integer,juicecount)>,str,Red Juice <storage.get(integer,value)>/4 BP) @register.register(juicedesc<storage.get(integer,juicecount)>,str,Red Juice <math.int(<storage.get(integer,value)>/4)> BP)
@register.register(juicecost<storage.get(integer,juicecount)>,int,<storage.get(integer,value)>/4) @register.register(juicecost<storage.get(integer,juicecount)>,int,<math.int(<storage.get(integer,value)>/4)>)
:when:yellow :when:yellow
@register.register(juicedesc<storage.get(integer,juicecount)>,str,Yellow Juice <storage.get(integer,value)>/4 BP) @register.register(juicedesc<storage.get(integer,juicecount)>,str,Yellow Juice <math.int(<storage.get(integer,value)>/4)> BP)
@register.register(juicecost<storage.get(integer,juicecount)>,int,<storage.get(integer,value)>/4) @register.register(juicecost<storage.get(integer,juicecount)>,int,<math.int(<storage.get(integer,value)>/4)>)
:when:blue :when:blue
@register.register(juicedesc<storage.get(integer,juicecount)>,str,Blue Juice <storage.get(integer,value)>/4 BP) @register.register(juicedesc<storage.get(integer,juicecount)>,str,Blue Juice <math.int(<storage.get(integer,value)>/4)> BP)
@register.register(juicecost<storage.get(integer,juicecount)>,int,<storage.get(integer,value)>/4) @register.register(juicecost<storage.get(integer,juicecount)>,int,<math.int(<storage.get(integer,value)>/4)>)
:when:green :when:green
@register.register(juicedesc<storage.get(integer,juicecount)>,str,Green Juice <storage.get(integer,value)>/4 BP) @register.register(juicedesc<storage.get(integer,juicecount)>,str,Green Juice <math.int(<storage.get(integer,value)>/4)> BP)
@register.register(juicecost<storage.get(integer,juicecount)>,int,<storage.get(integer,value)>/4) @register.register(juicecost<storage.get(integer,juicecount)>,int,<math.int(<storage.get(integer,value)>/4)>)
:when:pink :when:pink
@register.register(juicedesc<storage.get(integer,juicecount)>,str,Pink Juice <storage.get(integer,value)>/4 BP) @register.register(juicedesc<storage.get(integer,juicecount)>,str,Pink Juice <math.int(<storage.get(integer,value)>/4)> BP)
@register.register(juicecost<storage.get(integer,juicecount)>,int,<storage.get(integer,value)>/4) @register.register(juicecost<storage.get(integer,juicecount)>,int,<math.int(<storage.get(integer,value)>/4)>)
:when:shake :when:shake
@register.register(juicedesc<storage.get(integer,juicecount)>,str,Colorful Shake <storage.get(integer,value)>/6 BP) @register.register(juicedesc<storage.get(integer,juicecount)>,str,Colorful Shake <math.int(<storage.get(integer,value)>/6)> BP)
@register.register(juicecost<storage.get(integer,juicecount)>,int,<storage.get(integer,value)>/6) @register.register(juicecost<storage.get(integer,juicecount)>,int,<math.int(<storage.get(integer,value)>/6)>)
:when:soda :when:soda
:select:<storage.get(integer,value)> :select:<storage.get(integer,value)>
:when:1;2;3 :when:1;2;3
@register.register(juicedesc<storage.get(integer,juicecount)>,str,Rare Soda 10*<storage.get(integer,value)> BP) @register.register(juicedesc<storage.get(integer,juicecount)>,str,Rare Soda <math.int(10*<storage.get(integer,value)>)> BP)
@register.register(juicecost<storage.get(integer,juicecount)>,int,(1+<storage.get(integer,value)>)*10) @register.register(juicecost<storage.get(integer,juicecount)>,int,<math.int((1+<storage.get(integer,value)>)*10)>)
:when:4;5 :when:4;5
@register.register(juicedesc<storage.get(integer,juicecount)>,str,Ultra Rare Soda 10*<storage.get(integer,value)> BP) @register.register(juicedesc<storage.get(integer,juicecount)>,str,Ultra Rare Soda <math.int(10*<storage.get(integer,value)>)> BP)
@register.register(juicecost<storage.get(integer,juicecount)>,int,(1+<storage.get(integer,value)>)*10) @register.register(juicecost<storage.get(integer,juicecount)>,int,<math.int((1+<storage.get(integer,value)>)*10)>)
:endwhen :endwhen
:when:soup :when:soup
@register.register(juicedesc<storage.get(integer,juicecount)>,str,Perilous Soup 20 BP) @register.register(juicedesc<storage.get(integer,juicecount)>,str,Perilous Soup 20 BP)
@register.register(juicecost<storage.get(integer,juicecount)>,int,20) @register.register(juicecost<storage.get(integer,juicecount)>,int,20)
:endwhen :endwhen
@storage.set(string,drink,fail)
@storage.set(integer,juicecount,<storage.get(integer,juicecount)>+1) @storage.set(integer,juicecount,<math.int(<storage.get(integer,juicecount)>+1)>)
:endwhile :endwhile
@register.registertime(dailyjuicecalc,1,day)
:endif :endif
@storage.set(string,drink,fail) @storage.set(string,drink,fail)
@ -65,11 +79,11 @@ version=2
@storage.set(integer,juicecount,0) @storage.set(integer,juicecount,0)
@storage.set(string,juiceselect,) @storage.set(string,juiceselect,)
:while:6><storage.get(integer,juicecount)> :while:5><storage.get(integer,juicecount)>
:if:<register.registered(solddailyjuice<storage.get(integer,juicecount)>)>=false :if:<register.registered(solddailyjuice<storage.get(integer,juicecount)>)>=false
@storage.set(string,juiceselect,<storage.get(string,juiceselect)><register.value(juicedesc<storage.get(integer,juicecount)>)>,) @storage.set(string,juiceselect,<storage.get(string,juiceselect)><register.value(juicedesc<storage.get(integer,juicecount)>)>,)
:endif :endif
@storage.set(integer,juicecount,<storage.get(integer,juicecount)>+1) @storage.set(integer,juicecount,<math.int(<storage.get(integer,juicecount)>+1)>)
:endwhile :endwhile
@storage.set(string,juiceselect,<storage.get(string,juiceselect)>Exit) @storage.set(string,juiceselect,<storage.get(string,juiceselect)>Exit)

View File

@ -1,10 +1,10 @@
version=2 version=2
:select:<storage.get(string,drink)> :select:<storage.get(string,drink)>
:when:fail :when:fail
@text.show(something went wrong please try again later) @text.show(Something went wrong please~try again later.)
:endscript :endscript
:when:purple :when:purple
@text.show(Give this Purple Juice to your <pokemon.displayname(<pokemon.selected>)>?) @text.show(Give this Purple Juice to your~<pokemon.displayname(<pokemon.selected>)>?)
@Options.show(Yes,No) @Options.show(Yes,No)
:when:No :when:No
@text.show(Come again soon!) @text.show(Come again soon!)
@ -14,7 +14,7 @@ version=2
@pokemon.addev(<pokemon.selected>,hp,<storage.get(integer,value)>) @pokemon.addev(<pokemon.selected>,hp,<storage.get(integer,value)>)
@pokemon.calcstats(<pokemon.selected>) @pokemon.calcstats(<pokemon.selected>)
:when:red :when:red
@text.show(Give this Red Juice to your <pokemon.displayname(<pokemon.selected>)>?) @text.show(Give this Red Juice to your~<pokemon.displayname(<pokemon.selected>)>?)
@Options.show(Yes,No) @Options.show(Yes,No)
:when:No :when:No
@text.show(Come again soon!) @text.show(Come again soon!)
@ -24,7 +24,7 @@ version=2
@pokemon.addev(<pokemon.selected>,atk,<storage.get(integer,value)>) @pokemon.addev(<pokemon.selected>,atk,<storage.get(integer,value)>)
@pokemon.calcstats(<pokemon.selected>) @pokemon.calcstats(<pokemon.selected>)
:when:yellow :when:yellow
@text.show(Give this Yellow Juice to your <pokemon.displayname(<pokemon.selected>)>?) @text.show(Give this Yellow Juice to your~<pokemon.displayname(<pokemon.selected>)>?)
@Options.show(Yes,No) @Options.show(Yes,No)
:when:No :when:No
@text.show(Come again soon!) @text.show(Come again soon!)
@ -34,7 +34,7 @@ version=2
@pokemon.addev(<pokemon.selected>,def,<storage.get(integer,value)>) @pokemon.addev(<pokemon.selected>,def,<storage.get(integer,value)>)
@pokemon.calcstats(<pokemon.selected>) @pokemon.calcstats(<pokemon.selected>)
:when:blue :when:blue
@text.show(Give this Blue Juice to your <pokemon.displayname(<pokemon.selected>)>?) @text.show(Give this Blue Juice to your~<pokemon.displayname(<pokemon.selected>)>?)
@Options.show(Yes,No) @Options.show(Yes,No)
:when:No :when:No
@text.show(Come again soon!) @text.show(Come again soon!)
@ -44,7 +44,7 @@ version=2
@pokemon.addev(<pokemon.selected>,spatk,<storage.get(integer,value)>) @pokemon.addev(<pokemon.selected>,spatk,<storage.get(integer,value)>)
@pokemon.calcstats(<pokemon.selected>) @pokemon.calcstats(<pokemon.selected>)
:when:green :when:green
@text.show(Give this Green Juice to your <pokemon.displayname(<pokemon.selected>)>?) @text.show(Give this Green Juice to your~<pokemon.displayname(<pokemon.selected>)>?)
@Options.show(Yes,No) @Options.show(Yes,No)
:when:No :when:No
@text.show(Come again soon!) @text.show(Come again soon!)
@ -54,7 +54,7 @@ version=2
@pokemon.addev(<pokemon.selected>,spdef,<storage.get(integer,value)>) @pokemon.addev(<pokemon.selected>,spdef,<storage.get(integer,value)>)
@pokemon.calcstats(<pokemon.selected>) @pokemon.calcstats(<pokemon.selected>)
:when:pink :when:pink
@text.show(Give this Pink Juice to your <pokemon.displayname(<pokemon.selected>)>?) @text.show(Give this Pink Juice to your~<pokemon.displayname(<pokemon.selected>)>?)
@Options.show(Yes,No) @Options.show(Yes,No)
:when:No :when:No
@text.show(Come again soon!) @text.show(Come again soon!)
@ -64,7 +64,7 @@ version=2
@pokemon.addev(<pokemon.selected>,speed,<storage.get(integer,value)>) @pokemon.addev(<pokemon.selected>,speed,<storage.get(integer,value)>)
@pokemon.calcstats(<pokemon.selected>) @pokemon.calcstats(<pokemon.selected>)
:when:shake :when:shake
@text.show(Give this Colorful Shake to your <pokemon.displayname(<pokemon.selected>)>?) @text.show(Give this Colorful Shake to~your <pokemon.displayname(<pokemon.selected>)>?)
@Options.show(Yes,No) @Options.show(Yes,No)
:when:No :when:No
@text.show(Come again soon!) @text.show(Come again soon!)
@ -74,9 +74,9 @@ version=2
:when:soda :when:soda
:select:<storage.get(integer,value)> :select:<storage.get(integer,value)>
:when:1;2;3 :when:1;2;3
@text.show(Give this Rare Soda <storage.get(integer,value)> to your <pokemon.displayname(<pokemon.selected>)>?) @text.show(Give this Rare Soda <storage.get(integer,value)> to your~<pokemon.displayname(<pokemon.selected>)>?)
:when:4;5 :when:4;5
@text.show(Give this Ultra Rare Soda <storage.get(integer,value)> to your <pokemon.displayname(<pokemon.selected>)>?) @text.show(Give this Ultra Rare Soda <storage.get(integer,value)> to your~<pokemon.displayname(<pokemon.selected>)>?)
:endwhen :endwhen
@Options.show(Yes,No) @Options.show(Yes,No)
:when:No :when:No
@ -85,7 +85,7 @@ version=2
:endwhen :endwhen
@pokemon.addlevel(<pokemon.selected>,<storage.get(integer,value)>) @pokemon.addlevel(<pokemon.selected>,<storage.get(integer,value)>)
:when:soup :when:soup
@text.show(Give this Perilous Soup to your <pokemon.displayname(<pokemon.selected>)>?) @text.show(Give this Perilous Soup to your~<pokemon.displayname(<pokemon.selected>)>?)
@Options.show(Yes,No) @Options.show(Yes,No)
:when:No :when:No
@text.show(Come again soon!) @text.show(Come again soon!)