• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Script The Miscellaneous Script Thread (XSE)

#1
Archived Content
This post has been archived from another site. Support is not guranteed if the original poster is not a member. Original poster: Spherical Ice on pokecommunity.com
Welcome to The Miscellaneous (XSE) Script Thread! The purpose of this thread is simple; it is an archive of numerous, pretty random, scripts available for you to use in your hack if you are having difficulties scripting it yourself (or are too lazy. ^.^).​



If you wish to see one of your threads up on this post, please use the following form:

Code:
[noparse][B]Name:
ROM info:
Effect:
Script:
Comments & Bugs:
Credits:[/B][/noparse]


Egg Shop Script:
#dynamic 0x<offset>

#org @start
lock
faceplayer
showmoney 0x0 0x0 0x0
msgbox @msg1 MSG_KEEPOPEN
closeonkeypress
multichoice 0x14 0x1 0x<mcnumber> 0x0
compare 0x800D 0x0
if 0x1 goto @common
compare 0x800D 0x1
if 0x1 goto @uncommon
compare 0x800D 0x2
if 0x1 goto @rare
hidemoney 0x0 0x0
release
end

#org @common
checkmoney 0x1388 0x0
compare 0x800D 0x0
if 0x1 goto @notenough
paymoney 0x1388 0x0
updatemoney 0x0 0x0 0x0
fanfare 0x13E
msgbox @msg3 MSG_KEEPOPEN
closeonkeypress
waitfanfare
hidemoney 0x0 0x0
random 0x5
compare 0x800D 0x0
if 0x1 goto @1
compare 0x800D 0x1
if 0x1 goto @2
compare 0x800D 0x2
if 0x1 goto @3
compare 0x800D 0x3
if 0x1 goto @4
compare 0x800D 0x4
if 0x1 goto @5
release
end

#org @1
giveegg 0x<species>
release
end

#org @2
giveegg 0x<species>
release
end

#org @3
giveegg 0x<species>
release
end

#org @4
giveegg 0x<species>
release
end

#org @5
giveegg 0x<species>
release
end

#org @notenough
hidemoney 0x0 0x0
msgbox @msg2 MSG_KEEPOPEN
closeonkeypress
release
end

#org @uncommon
checkmoney 0x2710 0x0
compare 0x800D 0x0
if 0x1 goto @notenough
paymoney 0x2710 0x0
updatemoney 0x0 0x0 0x0
fanfare 0x13E
msgbox @msg3 MSG_KEEPOPEN
closeonkeypress
waitfanfare
hidemoney 0x0 0x0
random 0x5
compare 0x800D 0x0
if 0x1 goto @k1
compare 0x800D 0x1
if 0x1 goto @k2
compare 0x800D 0x2
if 0x1 goto @k3
compare 0x800D 0x3
if 0x1 goto @k4
compare 0x800D 0x4
if 0x1 goto @k5
release
end

#org @k1
giveegg 0x<species>
release
end

#org @k2
giveegg 0x<species>
release
end

#org @k3
giveegg 0x<species>
release
end

#org @k4
giveegg 0x<species>
release
end

#org @k5
giveegg 0x<species>
release
end

#org @rare
checkmoney 0x61A8
compare 0x800D 0x0
if 0x1 goto @notenough
paymoney 0x61A8 0x0
updatemoney 0x0 0x0 0x0
fanfare 0x13E
msgbox @msg1 MSG_KEEPOPEN
closeonkeypress
waitfanfare
hidemoney 0x0 0x0
random 0x3
compare 0x800D 0x0
if 0x1 goto @rare1
compare 0x800D 0x1
if 0x1 goto @rare2
compare 0x800D 0x2
if 0x1 goto @rare3
release
end

#org @rare1
giveegg 0x<species>
release
end

#org @rare2
giveegg 0x<species>
release
end

#org @rare3
giveegg 0x<species>
release
end

#org @msg1
= Hello, welcome to our Egg Shop!\pWhich kind of Egg would you like?

#org @msg2
= You don't have enough money.

#org @msg3
= [black_fr][player] received a [red_fr]Pokémon Egg[black_fr]!
Comments: Here is an egg shop script. Feel free to change any of the text and any of script. Give credit to Manipulation, okay? The Multichoice box at the top should contain 'Uncommon, Common and Rare'.

Rock Climb (Vine Whip):
From down:
#dynamic 0x800000

#org @1
#raw 0x7C 0x16 0x00
compare 0x800D 0x06
if 0x1 call @end
#raw 0x9D 0x00 0x0D 0x80
message @ha
boxset 5
compare LASTRESULT 0
if 0x1 goto @end
#raw 0x68
#raw 0x9C 0x25 0x00
waitstate
#raw 0x17 0x00 0x80 0x01 0x00
goto @jump
#org @jump
compare 0x8000 0x01
if 0x4 goto @move
release
end
#org @end
release
end
#org @move
applymovement 0xFF @move1
waitmovement 0x0
#raw 0x18 0x00 0x80 0x01 0x00
goto @jump

#org @ha
= It's some climbable rocks!\pWant to use VINE WHIP to\nclimb up them?

#org @move1
#raw 0x1E 0x1E 0x1E 0xFE
From up:
#dynamic 0x800000

#org @1
#raw 0x7C 0x16 0x00
compare 0x800D 0x06
if 0x1 call @end
#raw 0x9D 0x00 0x0D 0x80
message @ha
boxset 5
compare LASTRESULT 0
if 0x1 goto @end
#raw 0x68
#raw 0x9C 0x25 0x00
waitstate
#raw 0x17 0x00 0x80 0x01 0x00
goto @jump
#org @jump
compare 0x8000 0x01
if 0x4 goto @move
release
end
#org @end
release
end
#org @move
applymovement 0xFF @move1
waitmovement 0x0
#raw 0x18 0x00 0x80 0x01 0x00
goto @jump

#org @ha
= It's some climbable rocks!\pWant to use VINE WHIP to\nclimb down them?

#org @move1
#raw 0x1D 0x1D 0x1D 0xFE
Credits: Hiche
Headbutt Trees (Headbutt):
1)
#dynamic 0x800000

#org @headbutt
#raw 0x7C 0x1D 0x00
compare 0x800D 0x06
if 0x1 jump @could
#raw 0x9D 0x00 0x0D 0x80
#raw 0x7F 0x00 0x0D 0x80
#raw 0x82 0x01 0x1D 0x00
message @question
boxset 0x5
compare 0x800D 0x00
if 0x1 jump @end
message @used
boxset 0x6
#raw 0x68
#raw 0x9C 0x25 0x00
waitstate
jump 0x1Be06F

#org @could
message @you
boxset 0x6
release
end

#org @end
release
end

#org @question
= This tree could have a Pokemon\nin it. Use HEADBUTT?

#org @used
= \v\h02 used \v\h03!

#org @you
= This tree could be HEADBUTTed!
Credits: Hiche, Dabomstew

2)
#org @headbutt
lock
checkattack 0x1D
compare 0x800D 0x6
if 0x1 goto @release
bufferpokemon2 0x0 0x800D
bufferattack 0x1 0x1D
message @head
boxset 0x5
compare 0x800D 0x0
if 0x1 goto @release
message @used
boxset 0x4
closeonkeypress
goto @treeshake
end

#org @treeshake
random 0xamount
compare 0x800D 0x0
if 0x1 goto @wildbattle offset
compare 0x800D 0x1
if 0x1 goto @wildbattle offset2
[the random amount is how many different ones you can add]


#org @used
= [buffer1] used HEADBUTT.

#org @head
= Pokemon live in this tree. Using\nHEADBUTT may cause them to come out.\pDo you want to use HEADBUTT?
Credits: Dratii

3)
//-------------------------------------
//Preperations
//-------------------------------------
#dynamic 0x800000
#define cAttack 0x1D //Change this value to use another attack

//-------------------------------------
//Main Script
//-------------------------------------
#org @Main
lockall //Lock everything from moving
checkattack cAttack //Stores the first Pokémon who knows the attack into the variable 0x800D
compare 0x800D 0x06 //Makes sure a Pokémon knows the attack...
if 0x01 goto @NotKnown //If the value is 6 then no Pokémon knows the attack
setanimation 0x00 0x800D //The Pokémon animation is set with the Pokémon who knows the attack
bufferpartypokemon 0x00 0x800D //Puts the Pokémon who knows the attack into [buffer1]
bufferattack 0x01 cAttack //Puts the attack name into [buffer2]
msgbox @Message1 0x05 //A Yes/No box appears with the message
compare 0x800D 0x00 //Checks in "No" was selected
if 0x01 goto @DoNotWant //If it was, quit
msgbox @Message2 0x04 //"[buffer1] used [buffer2]!" >> Keep open
closeonkeypress //Close the msgbox when a key is pressed
doanimation 0x25 //Shows the Pokémon animation
waitstate //Waits for the animation to complete
setvar 0x8004 0x01 //Set up to shake screen
setvar 0x8005 0x01
setvar 0x8006 0x0C
setvar 0x8007 0x02
special 0x136 //Shake screen
pause 0x20 //Wait 1~ second
special 0xAB //Call a random battle from the "Tree" section of wild Pokémon
compare 0x800D 0x00 //Checks if a wild battle happened
if 0x1 goto @DoNotWant //If not, quit
waitstate //Wait for the battle to complete
releaseall //Allow the player to move freely again
end //End the script

//-------------------------------------
//Sub Scripts
//-------------------------------------
#org @NotKnown
msgbox @Message3 0x03
end

#org @DoNotWant
releaseall
end


//-------------------------------------
//Messages
//-------------------------------------
#org @Message1
= This tree may contain a Pokemon.\nUse the move [buffer2]?

#org @Message2
= [buffer1] used [buffer2]!

#org @Message3
= This tree may contain a Pokemon.\nIt may be able to be knocked out.
Credits: Dartharon

Braille Script:
#dynamic 0x[your offset]
#org @start
lock
faceplayer
msgbox @3
boxset MSG_NORMAL 'Must be a msgbox!
braille @4
waitkeypress
release
end

#org @3
= There is something strange on the stone...

#org @4
#braille something 'the braille words
Credits: liuyanghejerry

Move Tutor Script:
#org @Start
lock
faceplayer
checkflag 0x200
compare LASTRESULT 0x1
if 0x1 goto @AlreadyLearnt
msgbox @WantToLearn
boxset 0x5
compare LASTRESULT 0x0
if 0x1 goto @DontWant
setvar 0x8005 0x1 ' 0x[Move number]
special 0x18D
setflag 0x200
release
end
Credits: liuyanghejerry

'Wishing' Well Script
#dynamic 0x800000

#org @start
lock
random 0xA
compare LASTRESULT 0x9
if 0x1 goto @lucky
msgbox @nothing 0x6
release
end

#org @lucky
msgbox @jackpot 0x6
giveitem 0x1A 0x1 0x0
release
end

#org @nothing
= [PLAYER] reeled up the bucket...\p...\pNothing!

#org @jackpot
= [PLAYER] reeled up the bucket...\p...\pJackpot!

Credits: The Master, HackMew (fixing up script)

Bike Stand Script
#dynamic 0x800000

#org @begin
lock
faceplayer
checkitem 0x168 0x1
compare LASTRESULT 0x1
if 0x0 jump @no
message @mount 0x5
compare LASTRESULT 0x0
if 0x1 goto @no
special 0x157
release
end

#org @no
release
end

#org @mount
= Do you want to mount your bike?
Credits: The blob of blobs, HackMew (fixing up script)

Honey Tree Script:
#dynamic 0x0FF5E1

#org @start
lock
checkflag 0x200
compare LASTRESULT 0x1
if 0x1 call @already
msgbox @honeytree MSG_NORMAL
checkitem ITEM_HONEY 0x1
compare LASTRESULT 0x1
if 0x1 call @honey
setflag 0x200
release
end

#org @honey
msgbox @hunny MSG_QUESTION
compare LASTRESULT 0x1
if 0x1 call @ona
return

#org @already
msgbox @pokemon MSG_NORMAL
random 0x0A
compare LASTRESULT 0x0
if 0x1 call @1
compare LASTRESULT 0x1
if 0x1 call @2
compare LASTRESULT 0x2
if 0x1 call @3
compare LASTRESULT 0x3
if 0x1 call @4
compare LASTRESULT 0x4
if 0x1 call @5
compare LASTRESULT 0x5
if 0x1 call @6
compare LASTRESULT 0x6
if 0x1 call @7
compare LASTRESULT 0x7
if 0x1 call @8
compare LASTRESULT 0x8
if 0x1 call @9
compare LASTRESULT 0x9
if 0x1 call @10
clearflag 0x200
release
end

#org @1
wildbattle PKMN_WURMPLE 0x8 0x0
return

#org @2
wildbattle PKMN_COMBEE 0xD 0x0
return

#org @3
wildbattle PKMN_WURMPLE 0x7 0x0
return

#org @4
wildbattle PKMN_WURMPLE 0xA 0x0
return

#org @5
wildbattle PKMN_MUNCHLAX 0xE 0x0
return

#org @6
wildbattle PKMN_HERACROSS 0x8 0x0
return

#org @7
wildbattle PKMN_AIPOM 0x8 0x0
return

#org @8
wildbattle PKMN_COMBEE 0x8 0x0
return

#org @9
wildbattle PKMN_CHERUBI 0x8 0x0
return

#org @10
wildbattle PKMN_CHERUBI 0x8 0x0
return

#org @ona
removeitem ITEM_HONEY 0x1
msgbox @hungry MSG_NORMAL
return

#org @pokemon
= Huh?\pIt looks like there's a POKéMON on\nthe HONEY TREE!

#org @honeytree
= It's a HONEY TREE.

#org @hunny
= Would you like to slather the bark\nwith HONEY?

#org @hungry
= [player] slathered the bark with\nHONEY.

Comments:You need to make a different flag for all the honey trees, unless you want to slather one tree and catch Pokemon on another. If you want, you can replace the Pokémon with ones that you prefer.
Also, you need the item Honey. In the example, Berry Juice has been replaced, but again, it is up to what you prefer.

Credits: Colorful Summer

Random Weather Script:
'---------------
#org 0x(offset)
random 0x0A
compare LASTRESULT 0x0
if 0x1 goto @1
compare LASTRESULT 0x1
if 0x1 goto @2
compare LASTRESULT 0x2
if 0x1 goto @3
compare LASTRESULT 0x3
if 0x1 goto @4
compare LASTRESULT 0x4
if 0x1 goto @5
compare LASTRESULT 0x5
if 0x1 goto @6
compare LASTRESULT 0x6
if 0x1 goto @7
compare LASTRESULT 0x7
if 0x1 goto @8
compare LASTRESULT 0x8
if 0x1 goto @9
compare LASTRESULT 0x9
if 0x1 goto @10

#org @1
setweather 0x1
doweather
end

#org @2
setweather 0x2
doweather
end

#org @3
setweather 0x3
doweather
end

#org @4
setweather 0x4
doweather
end

#org @5
setweather 0x5
doweather
end

#org @6
setweather 0x7
doweather
end

#org @7
setweather 0xb
doweather
end

#org @8
setweather 0xd
doweather
end

#org @9
setweather 0x2
doweather
end

#org @10
setweather 0xb
doweather
end

Credits: Sab

Phonecall Script:
#dynamic 0x800000

#org @start
checkflag 0x1000
if 0x1 goto @nope
random 0x2
compare 0x800D 0x1
if 0x1 goto @nope
compare 0x800D 0x2
if 0x1 goto @yes
release
end

#org @yes
setanimation 0x41 0x27
doanimation 0x41
pause 0x35
msgbox @fonecall 0x6
applymovement 0xFF @?
msgbox @hello? 0x6
setflag 0x1000
release
end

#org @nope
release
end

#org @fonecall
= PHONECALL:Beeep

#org @?
#raw 0x62 0xFE

#org @hello?
= Hello \v\h01 How are you doing.\nPHONE Ending message\pBeep\nBeep\pBeep
Credits:

Rock Jump Script:
#dynamic 0x740000

#org @start
compare 0x800C 0x1
if 0x1 call @T
compare 0x800C 0x2
if 0x1 call @S
compare 0x800C 0x3
if 0x1 call @A
compare 0x800C 0x4
if 0x1 call @D
end

#org @A
release
end

#org @D
release
end

#org @T
checkattack 0x16
Compare LASTRESULT 6
if 0x1 call @no2
#raw 0x9D 0x00 0x0D 0x80
msgbox @rock 0x5
Compare LASTRESULT 1
if 0x0 goto @NOPE
Doanimation 0x25
waitstate
Checkanimation 0x25
compare 0x8000 0x01
applymovement 0xFF @test
waitmovement 0x0
release
end

#org @S
checkattack 0x16
Compare LASTRESULT 6
if 0x1 call @no3
#raw 0x9D 0x00 0x0D 0x80
msgbox @rock2 0x5
Compare LASTRESULT 1
if 0x0 goto @NOPE
doanimation 0x25
waitstate
Checkanimation 0x25
compare 0x8000 0x01
applymovement 0xFF @test2
waitmovement 0x0
release
end

#org @no3
msgbox @noclimb2 0x6
release
end

#org @test2
#raw 0x15 0xFE

#org @rock2
= These rocks look scaly want to\n use vine whip to throw\p yourself up?

#org @nope
release
end

#org @test
#raw 0x14 0xFE

#org @rock
= These rocks look scaly \n Do you want to use\p vine whip to \nthrow yourself Down?

#org @NO2
msgbox @noclimb 0x6
release
end

#org @noclimb
= These rocks look like a pokemons\nMove could scale them.

#org @no
release
end

#org @noclimb2
= These rocks look like a pokemons\nMove could scale them.
Credits: -

Feel free to submit your miscellaneous, XSE scripts!
 
Last edited by a moderator:

Lunos

Well-known member
#2
Tfw I thought that nobody posted this yet.
Welp, whatever, I'm just gonna drop the Randomized Berry Tree Script that I wrote around 5 months ago and leave.

Name: Randomized Berry Tree
ROM info: Pokémon Ruby v1.0 (AXVE) (USA), Pokémon Fire Red v1.0 (BPRE) (USA), Pokémon Emerald (BPEE) (USA)
Effect: May give a random berry to the Player upon interacting with whatever you put the script to.
Script:
Code:
#dynamic 0x800000
#org @inicio
lock
faceplayer
msgbox @1 0x4
closeonkeypress
random 0x10 // Choose a random number between 1 and 10.
compare LASTRESULT 0x9
if 0x3 goto @nothing // If you got a number between 1 and 9, goto @nothing.
if 0x5 goto @berry // If you got a different number (10) goto @berry.

#org @berry
random 0x176 // Choose a random number between 1 and 374, the amount of items in the GBA Pokémon Games.
compare LASTRESULT 0x84 // Checks if you got the Item #132 (Retro Mail)
if 0x3 goto @berry // If it's a Retro Mail or an item before it, roll the dice again.
compare LASTRESULT 0xAF // Checks if you got the Item #175 (Enigma Berry)
if 0x4 goto @berry // If it's an Enigma Berry or an item after it, roll the dice again.
msgbox @2 0x6
giveitem LASTRESULT 0x1 0x0
release
end

#org @nothing
msgbox @3 0x4
closeonkeypress
release
end

#org @1
= It's a weird-looking tree.

#org @2
= Oh! There's a berry on it!

#org @3
= But there's nothing inside it[.]
Comments & Bugs: Insert the script as a signpost in Advance Map.
Having clarified that, the script is working as intended but I'd prolly make it so #org @berry can be executed once per day (if I knew how to do that.. hahaha), in which case, I would also remove or modify the chance of getting a berry in the 8th Line of the script to make it a little bit easier, but that's just me.
Showcase:
 

petuuuhhh

Active member
#3
Name: Item Creation
ROM info: Pokemon Gen III
Effect: Creates items from other items
Script:
#dynamic 0xEB1C4C
#org @start
lock
multichoice 0x0 0x0 0x41 0x0
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto @pokeball
compare 0x8000 0x1
if 0x1 goto @greatball
compare 0x8000 0x2
if 0x1 goto @ultraball
compare 0x8000 0x3
if 0x1 goto @superpotion
compare 0x8000 0x4
if 0x1 goto @hyperpotion
compare 0x8000 0x5
if 0x1 goto @maxpotion
compare 0x8000 0x6
if 0x1 goto @fullrestore
compare 0x8000 0x7
if 0x1 goto @page2
release
end

#org @page2
goto @start
end

#org @pokeball
msgbox @pokeballmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x2F 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x30 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0xC7 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x1E 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x2F 0x5
removeitem 0xC7 0x5
removeitem 0x30 0x5
removeitem 0x1E 0x5
msgbox @received1 0x4
giveitem 0x4 0x5 0x0
closeonkeypress
goto @start
release
end

#org @pokeballmats
= Items Required:\nSHOAL SHELL x5\lRED SHARD x5\lMETAL COAT x5\lENERGY POWDER x5\pCrafting this item will give you\nx5 POKé BALLs.

#org @received1
= \v\h01 crafted 5 POKé BALLs!

#org @greatball
msgbox @greatballmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x2F 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x31 0xA
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0xC7 0xA
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x1E 0xF
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x2F 0x5
removeitem 0x31 0xA
removeitem 0xC7 0xA
removeitem 0x1E 0xF
msgbox @received2 0x4
giveitem 0x3 0x5 0x0
closeonkeypress
goto @start
release
end

#org @greatballmats
= Items Required:\nSHOAL SHELL x5\lBLUE SHARD x10\lMETAL COAT x10\lENERGY POWDER x15\pCrafting this item will give you\nx5 GREAT BALLs.


#org @received2
= \v\h01 crafted 5 GREAT BALLs!

#org @ultraball
msgbox @ultraballmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x2F 0xA
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x32 0xA
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0xC7 0xF
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x1E 0x19
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x2F 0xA
removeitem 0x32 0xA
removeitem 0xC7 0xF
removeitem 0x1E 0x19
msgbox @received3 0x4
giveitem 0x2 0x6 0x0
closeonkeypress
goto @start
release
end

#org @ultraballmats
= Items Required:\nSHOAL SHELL x5\lYELLOW SHARD x15\lMETAL COAT x15\lENERGY POWDER x25\pCrafting this item will give you\nx5 ULTRA BALLs.

#org @received3
= \v\h01 crafted 5 ULTRA BALLs!

#org @superpotion
msgbox @superpotionmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0xD 0x3
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x100 0x1
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0xD 0x3
removeitem 0x100 0x1
msgbox @received4 0x4
giveitem 0x16 0x1 0x0
closeonkeypress
goto @start
release
end

#org @superpotionmats
= Items Required:\nPOTION x3\lMIRACLE SEED x1\pCrafting this item will give you\nx1 SUPER POTION.
#org @received4
= \v\h01 crafted a SUPER POTION!

#org @hyperpotion
msgbox @hyperpotionmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x16 0x2
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x100 0x2
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x16 0x2
removeitem 0x100 0x2
msgbox @received5 0x4
giveitem 0x15 0x1 0x0
closeonkeypress
goto @start
release
end

#org @hyperpotionmats
= Items Required:\nSUPER POTION x2\lMIRACLE SEED x2\lCrafting this item will give you\lx1 HYPER POTION.

#org @received5
= \v\h01 crafted a HYPER POTION!

#org @maxpotion
msgbox @maxpotionmats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x15 0x1
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x16 0x2
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x100 0x3
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x15 0x1
removeitem 0x16 0x2
removeitem 0x100 0x3
msgbox @received6 0x4
giveitem 0x14 0x1 0x0
closeonkeypress
goto @start
release
end

#org @maxpotionmats
= Items Required:\nHYPER POTION x1\lSUPER POTION x2\lMIRACLE SEED x3\pCrafting this item will give you\nx1 MAX POTION.

#org @received6
= \v\h01 crafted a MAX POTION!

#org @fullrestore
msgbox @fullrestoremats 0x6
msgbox @areyousure 0x5
compare LASTRESULT 0x1
if 0x0 goto @page1
checkitem 0x14 0x2
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x100 0x5
compare LASTRESULT 0x1
if 0x0 goto @notenough
checkitem 0x17 0x2
compare LASTRESULT 0x1
if 0x0 goto @notenough
msgbox @crafting1 0x4
closeonkeypress
msgbox @done 0x6
removeitem 0x14 0x2
removeitem 0x100 0x5
removeitem 0x17 0x2
msgbox @received7 0x4
giveitem 0x13 0x1 0x0
closeonkeypress
goto @start
release
end

#org @fullrestoremats
= Items Required:\nMAX POTION x2\lMIRACLE SEED x5\lFULL HEAL x2\pCrafting this item will give you\nx1 FULL RESTORE.

#org @received7
= \v\h01 crafted a FULL RESTORE!


#org @page1
msgbox @page11 0x4
closeonkeypress
goto @start


#org @notenough
msgbox @notenough1 0x4
closeonkeypress
goto @start
end

#org @page11
= Returning to page 1.

#org @notenough1
= You do not have the required\nmaterials to craft this item.

#org @areyousure
= Are you sure you want to craft\nthis item?

#org @crafting1
= Crafting item...

#org @done
= Success!
Comments & Bugs: None that I'm aware of.
Credits: PokeballGO
 

petuuuhhh

Active member
#4
Name: Paristorm Bank
ROM info: Pokemon Fire Red
Effect: Creates a bank
Script:
'---------------
#org 0x814DAD
lock
faceplayer
textcolor 0x0
msgbox 0x8814DF3 MSG_KEEPOPEN '"[blue_fr]Welcome to Paristorm Bank..."
setvar 0x4001 0x2
closeonkeypress
goto 0x8814E73

'---------------
#org 0x814E73
compare 0x406A 0x0
if 0x1 goto 0x8814ECE
compare 0x406A 0x2
if 0x1 goto 0x8815393
compare 0x406A 0x4
if 0x1 goto 0x88153C9
compare 0x406A 0x6
if 0x1 goto 0x881540B
goto 0x88154FB

'---------------
#org 0x814ECE
msgbox 0x8814F2C MSG_KEEPOPEN '"[blue_fr]It appears you do not hav..."
closeonkeypress
msgbox 0x8814F64 MSG_YESNO '"[blue_fr]Would you like to open an..."
compare LASTRESULT 0x0
if 0x1 goto 0x8814F20
msgbox 0x8814FA0 MSG_KEEPOPEN '"[blue_fr]Excellent!\nHere is your ..."
closeonkeypress
additem 0x113 0x1
loadpointer 0x0 0x8814FE9 '"[black_fr][player] received the De..."
giveitem2 0x113 0x1 0x101
msgbox 0x881507B MSG_KEEPOPEN '"[blue_fr]With a Paristorm Bank acc..."
setvar 0x406A 0x1
closeonkeypress
release
end

'---------------
#org 0x815393
msgbox 0x8815A02 MSG_KEEPOPEN '"[blue_fr]Congratulations on your n..."
closeonkeypress
checkitemroom 0xE3 0x1
compare LASTRESULT 0x0
if 0x1 goto 0x88153FF
giveitem 0xE3 0x1 MSG_OBTAIN
msgbox 0x8815A67 MSG_KEEPOPEN '"[blue_fr]The Silver Soul greatly i..."
setvar 0x406A 0x3
closeonkeypress
release
end

'---------------
#org 0x8153C9
msgbox 0x8815B7E MSG_KEEPOPEN '"[blue_fr]Congratulations on your n..."
closeonkeypress
checkitemroom 0xE2 0x1
compare LASTRESULT 0x0
if 0x1 goto 0x88153FF
giveitem 0xE2 0x1 MSG_OBTAIN
msgbox 0x8815BDF MSG_KEEPOPEN '"[blue_fr]The Gold Heart greatly in..."
setvar 0x406A 0x5
closeonkeypress
release
end

'---------------
#org 0x81540B
msgbox 0x8815CF6 MSG_KEEPOPEN '"[blue_fr]Congratulations on your n..."
closeonkeypress
setvar 0x4001 0xCA
givepokemon 0xCA 0x14 0x0 0x0 0x0 0x0
compare LASTRESULT 0x0
if 0x1 goto 0x881544C
compare LASTRESULT 0x1
if 0x1 goto 0x881547D
compare LASTRESULT 0x2
if 0x1 goto 0x88154C5
return

'---------------
#org 0x8154FB
showmoney 0x0 0x0 0x0
compare 0x406B 0x0
if 0x1 goto 0x881551C
compare 0x406B 0x3E8
if 0x1 goto 0x881559C
goto 0x881555A

'---------------
#org 0x814F20
msgbox 0x881501E MSG_KEEPOPEN '"[blue_fr]Oh, alright then.\pPlease..."
closeonkeypress
release
end

'---------------
#org 0x8153FF
msgbox 0x8815E63 MSG_KEEPOPEN '"Make room for your gift and\ncome ..."
closeonkeypress
release
end

'---------------
#org 0x81544C
fanfare 0x101
preparemsg 0x88154D6 '"[player] received Wobbuffet!"
waitmsg
waitfanfare
bufferpokemon 0x0 0xCA
msgbox 0x81A56A7 MSG_YESNO '"Do you want to give a nickname to\..."
compare LASTRESULT 0x0
if 0x1 goto 0x88154B4
call 0x81A8C27
call 0x81A74EB
goto 0x88154B4

'---------------
#org 0x81547D
fanfare 0x101
preparemsg 0x88154D6 '"[player] received Wobbuffet!"
waitmsg
waitfanfare
bufferpokemon 0x0 0xCA
msgbox 0x81A56A7 MSG_YESNO '"Do you want to give a nickname to\..."
compare LASTRESULT 0x0
if 0x1 goto 0x88154A9
call 0x81A8C33
goto 0x88154A9

'---------------
#org 0x8154C5
textcolor 0x3
msgbox 0x81A5E31 MSG_KEEPOPEN '"There's no more room for Pokémon!\..."
goto 0x88154EF

'---------------
#org 0x81551C
preparemsg 0x8815E8C '"What would you like to do today?\n..."
waitmsg
multichoice 0x13 0x5 0x22 0x0
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x8815903
compare 0x8000 0x1
if 0x1 goto 0x88155DA
compare 0x8000 0x2
if 0x1 goto 0x881561A
compare 0x8000 0x7F
if 0x1 goto 0x881561A
end

'---------------
#org 0x81559C
preparemsg 0x8815EEF '"What would you like to do today?\n..."
waitmsg
multichoice 0x13 0x5 0x22 0x0
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x88155FA
compare 0x8000 0x1
if 0x1 goto 0x8815884
compare 0x8000 0x2
if 0x1 goto 0x881561A
compare 0x8000 0x7F
if 0x1 goto 0x881561A
end

'---------------
#org 0x81555A
buffernumber 0x0 0x406B
preparemsg 0x8815EBB '"What would you like to do today?\n..."
waitmsg
multichoice 0x13 0x5 0x22 0x0
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x8815629
compare 0x8000 0x1
if 0x1 goto 0x8815676
compare 0x8000 0x2
if 0x1 goto 0x881561A
compare 0x8000 0x7F
if 0x1 goto 0x881561A
end

'---------------
#org 0x8154B4
msgbox 0x8815D62 MSG_KEEPOPEN '"[blue_fr]Here at Paristorm Bank, w..."
setvar 0x406A 0x7
closeonkeypress
release
end

'---------------
#org 0x1A8C27
countpokemon
subvar LASTRESULT 0x1
copyvar 0x8004 LASTRESULT
return

'---------------
#org 0x1A74EB
fadescreen 0x1
special 0x9E
waitstate
return

'---------------
#org 0x8154A9
call 0x81A8C3C
goto 0x88154B4

'---------------
#org 0x1A8C33
fadescreen 0x1
special 0x166
waitstate
lock
faceplayer
return

'---------------
#org 0x8154EF
msgbox 0x8815E37 MSG_KEEPOPEN '"Make room for this Pokémon and\nco..."
closeonkeypress
release
end

'---------------
#org 0x815903
buffernumber 0x0 0x406B
preparemsg 0x8815950 '"How much will you Deposit?\nBalanc..."
waitmsg
multichoice 0x13 0x5 0x38 0x0
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x88156C3
compare 0x8000 0x1
if 0x1 goto 0x8815708
compare 0x8000 0x2
if 0x1 goto 0x881574D
compare 0x8000 0x3
if 0x1 goto 0x88154FB
compare 0x8000 0x7F
if 0x1 goto 0x88154FB
end

'---------------
#org 0x8155DA
msgbox 0x8815F26 MSG_KEEPOPEN '"Your account balance is zero.\nYou..."
closeonkeypress
goto 0x88154FB

'---------------
#org 0x81561A
hidemoney 0x0 0x0
msgbox 0x8816045 MSG_KEEPOPEN '"We hope to see you again!"
closeonkeypress
release
end

'---------------
#org 0x8155FA
msgbox 0x8815F64 MSG_KEEPOPEN '"Your account balance is at the\non..."
closeonkeypress
goto 0x88154FB

'---------------
#org 0x815884
buffernumber 0x0 0x406B
preparemsg 0x88158D1 '"How much will you Withdraw?\nBalan..."
waitmsg
multichoice 0x13 0x5 0x38 0x0
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x8815979
compare 0x8000 0x1
if 0x1 goto 0x88159A2
compare 0x8000 0x2
if 0x1 goto 0x88159CB
compare 0x8000 0x3
if 0x1 goto 0x88154FB
compare 0x8000 0x7F
if 0x1 goto 0x88154FB
end

'---------------
#org 0x815629
buffernumber 0x0 0x406B
preparemsg 0x8816061 '"How much will you Deposit?\nBalanc..."
waitmsg
multichoice 0x13 0x5 0x38 0x0
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x88156C3
compare 0x8000 0x1
if 0x1 goto 0x8815708
compare 0x8000 0x2
if 0x1 goto 0x881574D
compare 0x8000 0x3
if 0x1 goto 0x88154FB
compare 0x8000 0x7F
if 0x1 goto 0x88154FB
end

'---------------
#org 0x815676
buffernumber 0x0 0x406B
preparemsg 0x881608F '"How much will you Withdraw?\nBalan..."
waitmsg
multichoice 0x13 0x5 0x38 0x0
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x8815979
compare 0x8000 0x1
if 0x1 goto 0x88159A2
compare 0x8000 0x2
if 0x1 goto 0x88159CB
compare 0x8000 0x3
if 0x1 goto 0x88154FB
compare 0x8000 0x7F
if 0x1 goto 0x88154FB
end

'---------------
#org 0x1A8C3C
bufferboxname 0x0 0x4037
bufferpokemon 0x1 0x4001
checkflag 0x834
if 0x0 call 0x81A8C57
checkflag 0x834
if 0x1 call 0x81A8C82
return

'---------------
#org 0x8156C3
compare 0x406B 0x3E8
if 0x1 goto 0x88155FA
checkmoney 0x3E8 0x0
compare LASTRESULT 0x0
if 0x1 goto 0x881560A
sound 0xF8
paymoney 0x3E8 0x0
updatemoney 0x0 0x0 0x0
addvar 0x406B 0x1
call 0x8815792
compare 0x406B 0x3E8
if 0x1 goto 0x88154FB
goto 0x8815629

'---------------
#org 0x815708
compare 0x406B 0x3DF
if 0x4 goto 0x88155FA
checkmoney 0x2710 0x0
compare LASTRESULT 0x0
if 0x1 goto 0x881560A
sound 0xF8
paymoney 0x2710 0x0
updatemoney 0x0 0x0 0x0
addvar 0x406B 0xA
call 0x8815792
compare 0x406B 0x3E8
if 0x1 goto 0x88154FB
goto 0x8815629

'---------------
#org 0x81574D
compare 0x406B 0x385
if 0x4 goto 0x88155FA
checkmoney 0x186A0 0x0
compare LASTRESULT 0x0
if 0x1 goto 0x881560A
sound 0xF8
paymoney 0x186A0 0x0
updatemoney 0x0 0x0 0x0
addvar 0x406B 0x64
call 0x8815792
compare 0x406B 0x3E8
if 0x1 goto 0x88154FB
goto 0x8815629

'---------------
#org 0x815979
compare 0x406B 0x1
if 0x0 goto 0x88155EA
sound 0xF8
givemoney 0x3E8 0x0
updatemoney 0x0 0x0 0x0
subvar 0x406B 0x1
call 0x88159F4
goto 0x8815676

'---------------
#org 0x8159A2
compare 0x406B 0xA
if 0x0 goto 0x88155EA
sound 0xF8
givemoney 0x2710 0x0
updatemoney 0x0 0x0 0x0
subvar 0x406B 0xA
call 0x88159F4
goto 0x8815676

'---------------
#org 0x8159CB
compare 0x406B 0x64
if 0x0 goto 0x88155EA
sound 0xF8
givemoney 0x186A0 0x0
updatemoney 0x0 0x0 0x0
subvar 0x406B 0x64
call 0x88159F4
goto 0x8815676

'---------------
#org 0x1A8C57
special2 LASTRESULT 0x165
compare LASTRESULT 0x1
if 0x1 goto 0x81A8C70
msgbox 0x81A5CF1 MSG_KEEPOPEN '"[buffer2] was transferred to\nSome..."
return

'---------------
#org 0x1A8C82
special2 LASTRESULT 0x165
compare LASTRESULT 0x1
if 0x1 goto 0x81A8C9B
msgbox 0x81A5D31 MSG_KEEPOPEN '"[buffer2] was transferred to\nCabe..."
return

'---------------
#org 0x81560A
msgbox 0x8815FB5 MSG_KEEPOPEN '"You don't have enough money on han..."
closeonkeypress
goto 0x88154FB

'---------------
#org 0x815792
compare 0x406A 0x1
if 0x1 call 0x88157B6
compare 0x406A 0x3
if 0x1 call 0x88157C4
compare 0x406A 0x5
if 0x1 call 0x88157D2
return

'---------------
#org 0x8155EA
msgbox 0x8815FF7 MSG_KEEPOPEN '"You don't have enough money in\nyo..."
closeonkeypress
goto 0x88154FB

'---------------
#org 0x8159F4
compare 0x406B 0x0
if 0x1 goto 0x88154FB
return

'---------------
#org 0x1A8C70
special2 LASTRESULT 0x18A
bufferboxname 0x2 LASTRESULT
msgbox 0x81A5D6E MSG_KEEPOPEN '"Box ["][buffer3]" on\nSomeone's PC..."
return

'---------------
#org 0x1A8C9B
special2 LASTRESULT 0x18A
bufferboxname 0x2 LASTRESULT
msgbox 0x81A5DB1 MSG_KEEPOPEN '"Box ["][buffer3]" on\nCabe'S PC wa..."
return

'---------------
#org 0x8157B6
compare 0x406B 0x64
if 0x4 goto 0x88157E0
return

'---------------
#org 0x8157C4
compare 0x406B 0x1F4
if 0x4 goto 0x8815808
return

'---------------
#org 0x8157D2
compare 0x406B 0x3E8
if 0x4 goto 0x8815830
return

'---------------
#org 0x8157E0
hidemoney 0x0 0x0
checksound
msgbox 0x8815858 MSG_KEEPOPEN '"You have reached a new balance\nmi..."
fanfare 0x13E
waitfanfare
setvar 0x406A 0x2
closeonkeypress
compare 0x4001 0x1
if 0x1 goto 0x8815268
goto 0x8815393

'---------------
#org 0x815808
hidemoney 0x0 0x0
checksound
msgbox 0x8815858 MSG_KEEPOPEN '"You have reached a new balance\nmi..."
fanfare 0x13E
waitfanfare
setvar 0x406A 0x4
closeonkeypress
compare 0x4001 0x1
if 0x1 goto 0x8815302
goto 0x88153C9

'---------------
#org 0x815830
hidemoney 0x0 0x0
checksound
msgbox 0x8815858 MSG_KEEPOPEN '"You have reached a new balance\nmi..."
fanfare 0x13E
waitfanfare
setvar 0x406A 0x6
closeonkeypress
compare 0x4001 0x1
if 0x1 goto 0x8815349
goto 0x881540B

'---------------
#org 0x815268
msgbox 0x881527D MSG_KEEPOPEN '"[blue_fr]Congratulations on your n..."
closeonkeypress
msgbox 0x88152B1 MSG_KEEPOPEN '"[blue_fr]Please visit the clerk at..."
closeonkeypress
release
end

'---------------
#org 0x815302
msgbox 0x8815317 MSG_KEEPOPEN '"[blue_fr]Congratulations on your n..."
closeonkeypress
msgbox 0x88152B1 MSG_KEEPOPEN '"[blue_fr]Please visit the clerk at..."
closeonkeypress
release
end

'---------------
#org 0x815349
msgbox 0x881535E MSG_KEEPOPEN '"[blue_fr]Congratulations on your n..."
closeonkeypress
msgbox 0x88152B1 MSG_KEEPOPEN '"[blue_fr]Please visit the clerk at..."
closeonkeypress
release
end


'---------
' Strings
'---------
#org 0x814DF3
= [blue_fr]Welcome to Paristorm Bank!

#org 0x814F2C
= [blue_fr]It appears you do not have an\naccount with us yet.

#org 0x814F64
= [blue_fr]Would you like to open an\naccount with Paristorm Bank?

#org 0x814FA0
= [blue_fr]Excellent!\nHere is your card, which shows\lyou are a member with us!

#org 0x814FE9
= [black_fr][player] received the Debit Card\nfrom the bank clerk!

#org 0x81507B
= [blue_fr]With a Paristorm Bank account,\nyou can deposit and withdraw\lyour money in fixed, secure\lamounts.\pYou may deposit and withdraw\nhere in person, or visit any one\lof our ATMs here in Centiq.\pAlso, please be aware that the\nmaximum balance we allow members\lto hold is [$]1,000,000.\pAs you deposit more money into\nyour account, you will rise in\lmembership status.\pTo be promoted to Silver\nmembership, you must reach a\lbalance of [$]100,000.\pHappy banking, and thank you\nfor choosing Paristorm Bank!

#org 0x815A02
= [blue_fr]Congratulations on your new\nSilver membership!\pAs a new Silver member, please\naccept this gift!

#org 0x815A67
= [blue_fr]The Silver Soul greatly increases\nthe power of a Pokémon's\lFlying-type moves.\lIt's quite rare!\pAlso, there's merchandise at\nSinishade Dept. Store exclusive\lto Silver members like yourself.\pIf you wish to be promoted to\nGold membership, you must reach\la balance of [$]500,000.

#org 0x815B7E
= [blue_fr]Congratulations on your new\nGold membership!\pAs a new Gold member, please\naccept this gift!

#org 0x815BDF
= [blue_fr]The Gold Heart greatly increases\nthe power of a Pokémon's\lFire-type moves.\lIt's quite rare!\pAlso, there's merchandise at\nSinishade Dept. Store exclusive\lto Gold members like yourself.\pIf you wish to be promoted to\nCrystal membership, you must reach\la balance of [$]1,000,000.

#org 0x815CF6
= [blue_fr]Congratulations on your new\nCrystal membership!\pAs a new Crystal member, please\naccept this Wobbuffet!

#org 0x81501E
= [blue_fr]Oh, alright then.\pPlease consider opening an account\nwith Paristorm Bank in the future!

#org 0x815E63
= Make room for your gift and\ncome back!

#org 0x8154D6
= [player] received Wobbuffet!

#org 0x1A56A7
= Do you want to give a nickname to\nthis [buffer1]?

#org 0x1A5E31
= There's no more room for Pokémon!\pThe Pokémon Boxes are full and\ncan't accept any more!

#org 0x815E8C
= What would you like to do today?\nBalance: [$]0

#org 0x815EEF
= What would you like to do today?\nBalance: [$]1,000,000

#org 0x815EBB
= What would you like to do today?\nBalance: [$][buffer1],000

#org 0x815D62
= [blue_fr]Here at Paristorm Bank, we view\npatience as a virtue.\pThis is why Wobbuffet, the\nPatient Pokémon, is our symbol!\pAlso, there's merchandise at\nSinishade Dept. Store exclusive\lto Crystal members like yourself!

#org 0x815E37
= Make room for this Pokémon and\ncome back!

#org 0x815950
= How much will you Deposit?\nBalance: [$]0

#org 0x815F26
= Your account balance is zero.\nYou cannot make a withdrawal!

#org 0x816045
= We hope to see you again!

#org 0x815F64
= Your account balance is at the\none million maximum.\lYou cannot make a deposit!

#org 0x8158D1
= How much will you Withdraw?\nBalance: [$]1,000,000

#org 0x816061
= How much will you Deposit?\nBalance: [$][buffer1],000

#org 0x81608F
= How much will you Withdraw?\nBalance: [$][buffer1],000

#org 0x1A5CF1
= [buffer2] was transferred to\nSomeone's PC.\pIt was placed in \nBox ["][buffer1]."

#org 0x1A5D31
= [buffer2] was transferred to\nCabe's PC.\pIt was placed in \nBox ["][buffer1]."

#org 0x815FB5
= You don't have enough money on hand.\nYou cannot make a deposit!

#org 0x815FF7
= You don't have enough money in\nyour account.\lYou cannot withdraw that much!

#org 0x1A5D6E
= Box ["][buffer3]" on\nSomeone's PC was full.\p[buffer2] was transferred to\nBox ["][buffer1]."

#org 0x1A5DB1
= Box ["][buffer3]" on\nCabe'S PC was full.\p[buffer2] was transferred to\nBox ["][buffer1]."

#org 0x815858
= You have reached a new balance\nmilestone!

#org 0x81527D
= [blue_fr]Congratulations on your new\nSilver membership!

#org 0x8152B1
= [blue_fr]Please visit the clerk at\nParistorm Bank to redeem your\lcomplimentary gift!

#org 0x815317
= [blue_fr]Congratulations on your new\nGold membership!

#org 0x81535E
= [blue_fr]Congratulations on your new\nCrystal membership!
Comments & Bugs: None that I'm aware of.
Credits: Bela
 
OP
OP
Mystelex
#5
Adding to Lunos' post, here's the script I'm using for berry trees in my hack. It requires the RTC in prime-dialga's DNS tool, so make sure you have it installed.

Name: Berry System
ROM info: Pokémon Ruby v1.0 (AXVE) (USA), Pokémon Fire Red v1.0 (BPRE) (USA), Pokémon Emerald (BPEE) (USA)
Effect: Lets you pick berries once per day. Berries fall off if you don't pick them for a week, and then respawn the day after that.
Script:
Code:
#dynamic 0x906C90

#org @start
comparefarbytetobyte 0x03005541 0x0
if 0x1 goto @sunday
comparefarbytetobyte 0x03005541 0x1
if 0x1 goto @monday
comparefarbytetobyte 0x03005541 0x2
if 0x1 goto @tuesday
comparefarbytetobyte 0x03005541 0x3
if 0x1 goto @wednesday
comparefarbytetobyte 0x03005541 0x4
if 0x1 goto @thursday
comparefarbytetobyte 0x03005541 0x5
if 0x1 goto @friday
comparefarbytetobyte 0x03005541 0x6
if 0x1 goto @saturday
end

#org @sunday
checkflag 0x4B0
if 0x1 goto @done
clearflag 0x4B6
msgbox @berry 0x6 'hey berry
giveitem 0x8B 0x1 MSG_FIND
setflag 0x4B0
release
end

#org @monday
checkflag 0x4B1
if 0x1 goto @done
clearflag 0x4B0
msgbox @berry 0x6 'hey berry
giveitem 0x8B 0x1 MSG_FIND
setflag 0x4B1
release
end

#org @tuesday
checkflag 0x4B2
if 0x1 goto @done
clearflag 0x4B1
msgbox @berry 0x6 'hey berry
giveitem 0x8B 0x1 MSG_FIND
setflag 0x4B2
release
end

#org @wednesday
checkflag 0x4B3
if 0x1 goto @done
clearflag 0x4B2
msgbox @berry 0x6 'hey berry
giveitem 0x8B 0x1 MSG_FIND
setflag 0x4B3
release
end

#org @thursday
checkflag 0x4B4
if 0x1 goto @done
clearflag 0x4B3
msgbox @berry 0x6 'hey berry
giveitem 0x8B 0x1 MSG_FIND
setflag 0x4B4
release
end

#org @friday
checkflag 0x4B5
if 0x1 goto @done
clearflag 0x4B4
msgbox @berry 0x6 'hey berry
giveitem 0x8B 0x1 MSG_FIND
setflag 0x4B5
release
end

#org @saturday
checkflag 0x4B6
if 0x1 goto @done
clearflag 0x4B5
msgbox @berry 0x6 'hey berry
giveitem 0x8B 0x1 MSG_FIND
setflag 0x4B6
release
end

#org @done
msgbox @noberry 0x6
release
end

#org @berry
= It's a fruit-bearing tree.\pHey! It's an ORAN BERRY!

#org @noberry
= It's a fruit-bearing tree.\pThere's nothing here[.]

Since there has been a lot of inaccuracy on comparefarbytetobyte's offset, you have to make sure you're using the right one. To confirm this, open VBA's memory viewer, then type in 0x0300553c.

"

Now you're looking for the offset for the yellow underlined byte which displays the day of the week. So Sunday is 0, Monday is 1 and so on. In this case, it's Wednesday.

So click on it, and the offset you'll use for comparefarbytetobyte will be displayed in the 'Current address' box on the bottom right.

(I'll make a separate post explaining this better)
 
Last edited: