fix daily juice giving

This commit is contained in:
darkfire006 2023-12-21 00:09:59 -06:00
parent f655939510
commit 2c14eef239
2 changed files with 42 additions and 20 deletions

View File

@ -9,10 +9,19 @@ version=2
@register.unregister(solddailyjuice<storage.get(integer,juicecount)>)
@storage.set(integer,berry1,<system.random(2000,2066)>)
@storage.set(integer,berry2,<system.random(2000,2066)>)
@storage.set(string,drink,fail)
@storage.set(integer,value,-1)
@script.start(frontier\shops\juice\calc)
:if:<system.random(0,1)>>0
@storage.set(string,drink,<inventory.juicecolor(<storage.get(int,berry1)>)>)
@storage.set(integer,value,<math.int(<inventory.juicegroup(<storage.get(int,berry1)>)>*4)>)
:else
@storage.set(integer,berry2,<system.random(2000,2066)>)
:if:<system.random(0,19)>>18
@storage.set(integer,berry1,<system.random(2058,2066)>)
@storage.set(integer,berry2,<system.random(2058,2066)>)
:endif
@storage.set(string,drink,fail)
@storage.set(integer,value,-1)
@script.start(frontier\shops\juice\calc)
:endif
@register.register(juicetype<storage.get(integer,juicecount)>,str,<storage.get(string,drink)>)
@register.register(juiceval<storage.get(integer,juicecount)>,int,<storage.get(integer,value)>)
@ -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><storage.get(integer,juicecount)>
:if:<register.registered(solddailyjuice<storage.get(integer,juicecount)>)>=false
@storage.set(string,juiceselect,<storage.get(string,juiceselect)><register.value(juicedesc<storage.get(integer,juicecount)>)>,)
:while:6><storage.get(integer,juiceindex)>
:if:<register.registered(solddailyjuice<storage.get(integer,juiceindex)>)>=false
@storage.set(string,juiceselect,<storage.get(string,juiceselect)><register.value(juicedesc<storage.get(integer,juiceindex)>)>,)
@storage.set(integer,juicecount,<math.int(<storage.get(integer,juicecount)>+1)>)
:endif
@storage.set(integer,juicecount,<math.int(<storage.get(integer,juicecount)>+1)>)
@storage.set(integer,juiceindex,<math.int(<storage.get(integer,juiceindex)>+1)>)
:endwhile
@storage.set(string,juiceselect,<storage.get(string,juiceselect)>Exit)
@text.show(Welcome to the Juice Shoppe!*Please take a look~at our daily specials!)
@options.setcancelindex(6)
@options.setcancelindex(<storage.get(integer,juicecount)>)
@options.show(<storage.get(string,juiceselect)>)
:when:Exit
@text.show(Come again soon!)
@ -110,7 +121,8 @@ version=2
:endif
@script.start(frontier\shops\juice\give)
@player.addbp(-<storage.get(integer,cost)>)
@player.addbp(-<register.value(juicecost<storage.get(integer,select)>)>)
@register.register(solddailyjuice<storage.get(integer,select)>)
@text.show(I hope <pokemon.displayname(<pokemon.selected>)>~liked the drink!*Come again soon!)
:end

View File

@ -7,8 +7,9 @@ version=2
@text.show(Give this Purple Juice to your~<pokemon.displayname(<pokemon.selected>)>?)
@Options.show(Yes,No)
:when:No
@text.show(Come again soon!)
@text.show(Come again soon!)
:endscript
:when:Yes
:endwhen
@pokemon.addfriendship(<pokemon.selected>,4)
@pokemon.addev(<pokemon.selected>,hp,<storage.get(integer,value)>)
@ -17,8 +18,9 @@ version=2
@text.show(Give this Red Juice to your~<pokemon.displayname(<pokemon.selected>)>?)
@Options.show(Yes,No)
:when:No
@text.show(Come again soon!)
@text.show(Come again soon!)
:endscript
:when:Yes
:endwhen
@pokemon.addfriendship(<pokemon.selected>,4)
@pokemon.addev(<pokemon.selected>,atk,<storage.get(integer,value)>)
@ -27,8 +29,9 @@ version=2
@text.show(Give this Yellow Juice to your~<pokemon.displayname(<pokemon.selected>)>?)
@Options.show(Yes,No)
:when:No
@text.show(Come again soon!)
@text.show(Come again soon!)
:endscript
:when:Yes
:endwhen
@pokemon.addfriendship(<pokemon.selected>,4)
@pokemon.addev(<pokemon.selected>,def,<storage.get(integer,value)>)
@ -37,8 +40,9 @@ version=2
@text.show(Give this Blue Juice to your~<pokemon.displayname(<pokemon.selected>)>?)
@Options.show(Yes,No)
:when:No
@text.show(Come again soon!)
@text.show(Come again soon!)
:endscript
:when:Yes
:endwhen
@pokemon.addfriendship(<pokemon.selected>,4)
@pokemon.addev(<pokemon.selected>,spatk,<storage.get(integer,value)>)
@ -47,8 +51,9 @@ version=2
@text.show(Give this Green Juice to your~<pokemon.displayname(<pokemon.selected>)>?)
@Options.show(Yes,No)
:when:No
@text.show(Come again soon!)
@text.show(Come again soon!)
:endscript
:when:Yes
:endwhen
@pokemon.addfriendship(<pokemon.selected>,4)
@pokemon.addev(<pokemon.selected>,spdef,<storage.get(integer,value)>)
@ -57,8 +62,9 @@ version=2
@text.show(Give this Pink Juice to your~<pokemon.displayname(<pokemon.selected>)>?)
@Options.show(Yes,No)
:when:No
@text.show(Come again soon!)
@text.show(Come again soon!)
:endscript
:when:Yes
:endwhen
@pokemon.addfriendship(<pokemon.selected>,4)
@pokemon.addev(<pokemon.selected>,speed,<storage.get(integer,value)>)
@ -67,8 +73,9 @@ version=2
@text.show(Give this Colorful Shake to~your <pokemon.displayname(<pokemon.selected>)>?)
@Options.show(Yes,No)
:when:No
@text.show(Come again soon!)
@text.show(Come again soon!)
:endscript
:when:Yes
:endwhen
@pokemon.addfriendship(<pokemon.selected>,<storage.get(integer,value)>)
: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(<pokemon.selected>,<storage.get(integer,value)>)
:when:soup
@text.show(Give this Perilous Soup to your~<pokemon.displayname(<pokemon.selected>)>?)
@Options.show(Yes,No)
:when:No
@text.show(Come again soon!)
@text.show(Come again soon!)
:endscript
:when:Yes
:endwhen
@pokemon.setallevs(<pokemon.selected>,0,0,0,0,0,0)
:endwhen
:endwhen
:end