P3D-Legacy/P3D/Content/Data/Scripts/celadon/vflip/leftshop.dat

57 lines
3.6 KiB
Plaintext

version=2
:if:<register.registered(firstloop)>=false
@register.register(firstloop,bool,false)
:endif
:if:<register.value(firstloop)>=false
@register.change(firstloop,true)
@Text.show(Hello!)
:endif
@text.show(We exchange your coins~for fabulous prizes!)
@options.setcancelindex(4)
@options.show(Dratini 2100C,Mr. Mime 3333C,Eevee 6666C,Porygon 9999C,Cancel)
:when:Dratini 2100C
@storage.set(int,pokenum,147)
@storage.set(int,cost,2100)
:when:Mr. Mime 3333C
@storage.set(int,pokenum,122)
@storage.set(int,cost,3333)
:when:Eevee 6666C
@storage.set(int,pokenum,133)
@storage.set(int,cost,6666)
:when:Porygon 9999C
@storage.set(int,pokenum,137)
@storage.set(int,cost,9999)
:when:Cancel
@text.show(OK. Please save your~coins and come again.)
@storage.clear
@register.unregister(firstloop,bool)
:endscript
:endwhen
:if:<storage.get(int,cost)>><player.coins>
@text.show(I'm sorry, you don't~have enough coins for~that Pokémon.)
:else
@text.show(Would you like <pokedex.getname(<storage.get(int,pokenum)>)>?)
@options.show(Yes,No)
:when:Yes
:if:<system.random(0,<math.floor(<pokemon.mastershinyrate>/2)>)>=0
@storage.set(int,pokeshin,1)
:else
@storage.set(int,pokeshin,0)
:endif
:if:<pokemon.count>>5
@pokemon.addtostorage(<storage.get(int,pokenum)>,15,Purchased from,5,Celadon Game Corner,0,<player.name>,0,<storage.get(int,pokeshin)>)
:else
@pokemon.add(<storage.get(int,pokenum)>,15,Purchased from,5,Celadon Game Corner,0,<player.name>,0,<storage.get(int,pokeshin)>)
:endif
@text.show(Here you go!)
@player.addcoins(-<storage.get(int,cost)>)
@sound.play(buy)
@text.show(<player.name> received~the <pokedex.getname(<storage.get(int,pokenum)>)>!)
:endwhen
:endif
@script.start(celadon\vflip\leftshop)