Script Help Thread (DO NOT REQUEST SCRIPTS) Page 231

Started by HackMew December 20th, 2008 5:10 AM
  • 625760 views
  • 9682 replies
Seen August 12th, 2012
Posted January 5th, 2012
19 posts
11.9 Years
I used this as a level script but, if you DON'T have a Pokemon yet it just freezes.

'-----------------------
#org 0x800337
checkflag 0x1002 [if you have a Pokemon]
if 0x1 goto 0x8800342
end

'-----------------------
#org 0x800342
movesprite2 0x1 0xE 0x7
setvar 0x7001 0x1
end


Also, if you step out of the view of your sister, she goes back to blocking the hole.
Male
Seen August 23rd, 2014
Posted June 23rd, 2011
2 posts
11.9 Years
Hi, I created a VERY simple script, but when i tried to compile it an error popped up that said "file not found or user cancel". I'm not sure what to do to make poketscript work... can i have some help? here is my VERY simple script:

#org $script
lock
faceplayer
message $text
$text 1 = Hello!\nHow are you?\pGoodbye, \v\h01
boxset 6
release
end

destinedjagold

You can contact me in PC's discord server...

Age 32
Male
Seen 3 Days Ago
Posted March 24th, 2023
8,579 posts
16 Years
Hi, I created a VERY simple script, but when i tried to compile it an error popped up that said "file not found or user cancel". I'm not sure what to do to make poketscript work... can i have some help? here is my VERY simple script:

#org $script
lock
faceplayer
message $text
$text 1 = Hello!\nHow are you?\pGoodbye, \v\h01
boxset 6
release
end
While you are early in the field of scripting, may I suggest you switch to using XSE instead of PokeScript?

DrFuji

Heiki Hecchara‌‌

Age 30
Male
Aussie
Seen 4 Days Ago
Posted February 12th, 2021
1,693 posts
13.7 Years
How do I make Prof. Oak give you National Pokedex at beggining instead of regular?
You need to put the command 'special 0x16F' somewhere in the script.
Male
Seen May 5th, 2013
Posted June 25th, 2011
10 posts
12.1 Years
got over the problem of the mew, thank you for help, now i'm into another problem, since in my rom the player is able to obtain all the starter, i was wandering how the script of the lady that teaches you the final move to your starter (such as blast burn for charmender) works, because my goal is make possible to learn all the three moves, but in order to do so i have to understand wich flag trigger the selection between the moves, i mean, if the lady just compare the first pokemon in ur team with one of the 3 starters, i don't need to modify the scripts, switch the pokemon party position will be enough, but if a flag if set in the moment i choose the starter, then it is all a different story... so can anyone help me to figure out how it works and wich flag it trigger?

thank you for reading :D
uppp !! :D can't figure it out, i know, it passed a while, but i'm now having the time thanks to the summer break :D

0m3GA ARS3NAL

Im comin' home...

Age 30
Male
Superjail Penitentiary
Seen February 25th, 2023
Posted September 12th, 2013
1,816 posts
15.3 Years
uppp !! :D can't figure it out, i know, it passed a while, but i'm now having the time thanks to the summer break :D
Simple, just look at the script of the old lady, from there you can see for yourself how the script works, though I think you can bring ANY of the starters.
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>
Male
UK
Seen March 7th, 2015
Posted December 13th, 2011
22 posts
12 Years
Well I asked this in the other thread to no avail.
Basically I'm trying to make a map with cracked floor tiles I can fall through. Took a look at Granite cave and tried to clone it. But I get a strange error in the form of a looping text box upon entering the map which reads "This is a test message. This is a signpost"- which renders me unable to move or do anything else.

Hacking Emerald BPEE.

Here's 1/3 of the level scripts in Granite Cave:

Script Type: Validates values, loads handler to 0x03000EB0 (playback) (02)
'---------------
#org 0x2A8337
lockall
pause 0x14
applymovement MOVE_PLAYER 0x82A8369
waitmovement 0x0
sound 0x2B
pause 0x3C
warphole 0xFF 0xFF
waitstate
end


'-----------
' Movements
'-----------
#org 0x2A8369
#raw 0x54 'Hide
#raw 0xFE 'End of Movements
Note: Sky Pillar uses this same script so I thought using this exactly as it was would be fine. (Ie. same script offset). I also set the flag to the same ($4022) as they were in both Granite Cave and Sky Pillar.
Also something worth mentioning is that I get the error when testing with only this script active.
Also, why are there 2 script offsets for this? I can't edit the first one which is what I'm believing to be the cause at the moment- since they're different to the ones in Granite Cave and Sky Pillar.

The other two scripts on the level would be:

Script type: On entering map/not on menu close [03]
'---------------
#org 0x2A8331
copyvar 0x4022 0x1
end
Note: I'm not sure what it does exactly but I reckon I need it XD

Script Type: On entering map/on menu close [05]
'---------------
#org 0x22DC6E
cmda6 0x7
warp5 0x18 0x6D 0xFF 0x0 0x0
end
Note: Then I have that- which I believe tells us where the warps go to. XSE says cmda6 is under investigation, so I went ahead and left it like that.

That's it really. I hope someone can help D:
Just starting out ^^;

destinedjagold

You can contact me in PC's discord server...

Age 32
Male
Seen 3 Days Ago
Posted March 24th, 2023
8,579 posts
16 Years
How do I make a person ID? So their name will show?
??????????????????????
??????????????????????
??????????????????????
??????????????????????
??????????????????????
??????????????????????

Anyway...
Please read scripting tutorials so you will know.
Person I.D.'s are boxes where we put the "flags" if we want that NPC to appear/disappear after an event/script.

Spherical Ice

Age 25
Leicester, UK
Seen 21 Hours Ago
Posted February 20th, 2022
5,251 posts
15.5 Years
I hate to be a pain, but...

Type: Level Script
ROM: FireRed
Script:
Spoiler:
'---------------
#org @start
lock
special 0x113
applymovement MOVE_CAMERA @move1
waitmovement 0x0
special 0x114
msgbox @string1 MSG_KEEPOPEN '"[blue_fr]PROF. REDWOOD: Adjust the..."
closeonkeypress
waitmovement 0x0
applymovement 0x1 @move2
waitmovement 0x0
special 0x113
applymovement MOVE_CAMERA @move3
applymovement 0x1 @move4
waitmovement 0x0
special 0x114
msgbox @string2 MSG_NORMAL '"[blue_fr]PROF. REDWOOD: Oh! [playe..."
applymovement 0x1 @move5
applymovement MOVE_PLAYER @move6
waitmovement 0x0
msgbox @string3 MSG_NORMAL '"[blue_fr]PROF. REDWOOD: Okay, hand..."
checkitem 0x11E 0x1
if 0x1 goto @snippet1
checkitem 0x11F 0x1
if 0x1 goto @snippet2
release
end

'---------------
#org @snippet1
removeitem 0x11E 0x1
setvar 0x4001 0x184
bufferpokemon 0x0 0x184
givepokemon 0x184 0xA 0x0 0x0 0x0 0x0
goto @snippet3

'---------------
#org @snippet2
removeitem 0x11F 0x1
setvar 0x4001 0x186
bufferpokemon 0x0 0x186
givepokemon 0x186 0xA 0x0 0x0 0x0 0x0
goto @snippet3

'---------------
#org @snippet3
compare LASTRESULT 0x0
if 0x1 goto @snippet4
compare LASTRESULT 0x1
if 0x1 goto @snippet5
compare LASTRESULT 0x2
if 0x1 goto @snippet6
release
end

'---------------
#org @snippet4
fanfare 0x101
preparemsg @string4 '"[blue_fr]PROF. REDWOOD: Oh my[.]it..."
waitmsg
waitfanfare
msgbox @string5 MSG_YESNO '"[black_fr]Do you want to give a ni..."
compare LASTRESULT 0x0
if 0x1 goto @snippet7
call @snippet8
call @snippet9
goto @snippet7

'---------------
#org @snippet5
hidesprite 0x2
fanfare 0x101
preparemsg @string4 '"[blue_fr]PROF. REDWOOD: Oh my[.]it..."
waitmsg
waitfanfare
msgbox @string5 MSG_YESNO '"[black_fr]Do you want to give a ni..."
compare LASTRESULT 0x0
if 0x1 goto @snippet10
call @snippet11
goto @snippet10

'---------------
#org @snippet6
textcolor 0x3
msgbox @string6 MSG_KEEPOPEN '"There's no more room for POKéMON!\..."
release
end

'---------------
#org @snippet7
msgbox @string7 MSG_NORMAL '"[blue_fr]PROF. REDWOOD: You've got..."
setvar 0x7200 0x1
release
end

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

'---------------
#org @snippet9
fadescreen 0x1
special 0x9E
waitstate
return

'---------------
#org @snippet10
call @snippet12
goto @snippet7

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

'---------------
#org @snippet12
bufferboxname 0x0 0x4037
bufferpokemon 0x1 0x4001
checkflag 0x834
if 0x0 call @snippet13
checkflag 0x834
if 0x1 call @snippet14
return

'---------------
#org @snippet13
special2 LASTRESULT 0x165
compare LASTRESULT 0x1
if 0x1 goto @snippet15
msgbox @string8 MSG_KEEPOPEN '"[black_fr][buffer2] was transferre..."
return

'---------------
#org @snippet14
special2 LASTRESULT 0x165
compare LASTRESULT 0x1
if 0x1 goto @snippet16
msgbox @string9 MSG_KEEPOPEN '"[black_fr][buffer2] was transferre..."
return

'---------------
#org @snippet15
special2 LASTRESULT 0x18A
bufferboxname 0x2 LASTRESULT
msgbox @string10 MSG_KEEPOPEN '"[black_fr]BOX ["][buffer3]" on\nSo..."
return

'---------------
#org @snippet16
special2 LASTRESULT 0x18A
bufferboxname 0x2 LASTRESULT
msgbox @string11 MSG_KEEPOPEN '"[black_fr]BOX ["][buffer3]" on\nBI..."
return


'---------
' Strings
'---------
#org @string1
= [blue_fr]PROF. REDWOOD: Adjust the\nwhaddya call it[.]and flick the\lswitch.\lTurn off the what's it's face,\land reverse the polarity and[.]\pSUCCESS!

#org @string2
= [blue_fr]PROF. REDWOOD: Oh! [player]! You made\nit, then?\lSo, welcome to my glorious[.]well,\lto my lab.\lExcuse the mess.\p[blue_fr]PROF. REDWOOD: Hey! Is that a\nFOSSIL?\lCome here, that'll be the perfect\ltest subject for my machine!

#org @string3
= [blue_fr]PROF. REDWOOD: Okay, hand me\nover that FOSSIL. I'm gonna\lrevive it!\lHere's hoping!

#org @string4
= [blue_fr]PROF. REDWOOD: Oh my[.]it\nworked! It's a miracle!\p[black_fr][player] obtained the revived [buffer1]!

#org @string5
= [black_fr]Do you want to give a nickname to\nthis [buffer1]?

#org @string6
= There's no more room for POKéMON!\pThe POKéMON BOXES are full and\ncan't accept any more!

#org @string7
= [blue_fr]PROF. REDWOOD: You've got no\nidea how happy I am!\lYou'd better make good use of\lthat [buffer1], because it's the subject\lof a miracle!\lYay!

#org @string8
= [black_fr][buffer2] was transferred to\nSomeone's PC.\pIt was placed in \nBOX ["][buffer1]."

#org @string9
= [black_fr][buffer2] was transferred to\nBILL'S PC.\pIt was placed in \nBOX ["][buffer1]."

#org @string10
= [black_fr]BOX ["][buffer3]" on\nSomeone's PC was full.\p[buffer2] was transferred to\nBOX ["][buffer1]."

#org @string11
= [black_fr]BOX ["][buffer3]" on\nBILL'S PC was full.\p[buffer2] was transferred to\nBOX ["][buffer1]."


'-----------
' Movements
'-----------
#org @move1
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements

#org @move2
#raw 0x0 'Face Down
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements

#org @move3
#raw 0x10 'Step Down (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x0 'Face Down
#raw 0xFE 'End of Movements

#org @move4
#raw 0x10 'Step Down (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x0 'Face Down
#raw 0xFE 'End of Movements

#org @move5
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements

#org @move6
#raw 0x11 'Step Up (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x2 'Face Left
#raw 0xFE 'End of Movements


Important Segment:
Spoiler:
checkitem 0x11E 0x1
if 0x1 goto @snippet1
checkitem 0x11F 0x1
if 0x1 goto @snippet2
release
end

'---------------
#org @snippet1
removeitem 0x11E 0x1
setvar 0x4001 0x184
bufferpokemon 0x0 0x184
givepokemon 0x184 0xA 0x0 0x0 0x0 0x0
goto @snippet3

'---------------
#org @snippet2
removeitem 0x11F 0x1
setvar 0x4001 0x186
bufferpokemon 0x0 0x186
givepokemon 0x186 0xA 0x0 0x0 0x0 0x0
goto @snippet3


Okay, so, item 0x11E is the root fossil, and 0x11F is the claw fossil.
In another event, the player is given either one of them.
The check is supposed to find out which fossil you have and give you the corresponding Pokémon (Lileep or Anorith) accordingly. However, despite the fact that I have the claw fossil, when this script executes, I receive a Lileep, and the Claw Fossil remains.

Also, an unrelated question, but is there a limit to the amount of buffers in a script?
Male
Seen May 5th, 2013
Posted June 25th, 2011
10 posts
12.1 Years
Simple, just look at the script of the old lady, from there you can see for yourself how the script works, though I think you can bring ANY of the starters.
if i'm asking here, perhaps i've already tried to figure it out by myself, so if you have to answer like that, don't even bother.
her script unfortunatly imply a lot of complex commands and references as i'll post down below:

'---------------
#org 0x1C4DEC
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
special 0x188
lock
faceplayer
checkflag 0x2E1
if 0x1 goto 0x81C4EA1
checkflag 0x2
if 0x1 goto 0x81C4E97
bufferfirstpokemon 0x0
msgbox 0x81A46C6 MSG_KEEPOPEN '"I perfected the ultimate move of\n..."
special2 LASTRESULT 0x1A3
compare LASTRESULT 0x0
if 0x1 goto 0x81C4F26
copyvar 0x8009 0x8005
compare PLAYERFACING 0x2
if 0x1 call 0x81C4EF0
compare PLAYERFACING 0x1
if 0x1 call 0x81C4EFB
compare PLAYERFACING 0x4
if 0x1 call 0x81C4F06
compare PLAYERFACING 0x3
if 0x1 call 0x81C4F11
msgbox 0x81A4751 MSG_YESNO '"Oh! This is the one!\nThis is the ..."
compare LASTRESULT 0x0
if 0x1 goto 0x81C4F1C
call 0x81C4F37
compare LASTRESULT 0x0
if 0x1 goto 0x81C4F1C
msgbox 0x81A4814 MSG_KEEPOPEN '"You will allow it?\pThen, let me c..."
closeonkeypress
fadescreen 0x1
goto 0x81C4EDA

'---------------
#org 0x1A7AE0
release
end

'---------------
#org 0x1C4EA1
msgbox 0x81A4972 MSG_KEEPOPEN '"After I passed on my knowledge to\..."
release
end

'---------------
#org 0x1C4E97
msgbox 0x81A48B3 MSG_KEEPOPEN '"I implore you to make the best\nus..."
release
end

'---------------
#org 0x1C4F26
msgbox 0x81A4737 MSG_KEEPOPEN '"[.]No[.]\nI was just mistaken."
release
end

'---------------
#org 0x1C4EF0
applymovement 0x1 0x81C4F4C
waitmovement 0x0
return

'---------------
#org 0x1C4EFB
applymovement 0x1 0x81C4F4E
waitmovement 0x0
return

'---------------
#org 0x1C4F06
applymovement 0x1 0x81C4F50
waitmovement 0x0
return

'---------------
#org 0x1C4F11
applymovement 0x1 0x81C4F52
waitmovement 0x0
return

'---------------
#org 0x1C4F1C
msgbox 0x81A47E5 MSG_KEEPOPEN '"Gaah! You reject it?\nNo, I won't ..."
release
end

'---------------
#org 0x1C4F37
textcolor 0x3
special 0x171
signmsg
msgbox 0x81A644F MSG_YESNO '"This move can be learned only\nonc..."
normalmsg
call 0x81A6675
return

'---------------
#org 0x1C4EDA
call 0x81C4F30
compare LASTRESULT 0x0
if 0x1 goto 0x81C4F1C
goto 0x81C4EAB

'---------------
#org 0x1A6675
copyvar 0x8012 0x8013
return

'---------------
#org 0x1C4F30
special 0x18D
waitstate
lock
faceplayer
return

'---------------
#org 0x1C4EAB
copyvar 0x8005 0x8009
special2 LASTRESULT 0x1A4
compare LASTRESULT 0x1
if 0x1 goto 0x81C4ECD
msgbox 0x81A4865 MSG_KEEPOPEN '"Gasp, gasp, gasp[.]\pI didn't thin..."
setflag 0x2
release
end

'---------------
#org 0x1C4ECD
msgbox 0x81A48F3 MSG_KEEPOPEN '"Gasp, gasp, gasp[.]\pI have no reg..."
setflag 0x2E1
release
end


'---------
' Strings
'---------
#org 0x1A46C6
= I perfected the ultimate move of\nits type[.]\pBut will no one take it for\nfuture use?\p[.]Hm? Hmmm!\pY-you[.]\nTh-that [buffer1][.]

#org 0x1A4751
= Oh! This is the one!\nThis is the POKéMON!\pThis [buffer1] is worthy of\nlearning my ultimate move!\pWill you allow it?\pWill you allow your [buffer1] to\nlearn my [buffer2]?

#org 0x1A4814
= You will allow it?\pThen, let me confer my ultimate\n[buffer2] on your [buffer1].\pGgggrah-awooo!

#org 0x1A4972
= After I passed on my knowledge to\nyou, I felt so much relief.\pIn fact, I feel rejuvenated,\nas if I were younger again!

#org 0x1A48B3
= I implore you to make the best\nuse of that move and gain power!

#org 0x1A4737
= [.]No[.]\nI was just mistaken.

#org 0x1A47E5
= Gaah! You reject it?\nNo, I won't be dissuaded!

#org 0x1A644F
= This move can be learned only\nonce. Is that okay?

#org 0x1A4865
= Gasp, gasp, gasp[.]\pI didn't think I could teach that\nmove while I still lived[.]

#org 0x1A48F3
= Gasp, gasp, gasp[.]\pI have no regrets now.\nI've passed on everything I know.\pNow I can live out my life knowing\nmy work is done.


'-----------
' Movements
'-----------
#org 0x1C4F4C
#raw 0x52 'Jump in Place (Facing Down)
#raw 0xFE 'End of Movements

#org 0x1C4F4E
#raw 0x53 'Jump in Place (Facing Up)
#raw 0xFE 'End of Movements

#org 0x1C4F50
#raw 0x54 'Jump in Place (Facing Left)
#raw 0xFE 'End of Movements

#org 0x1C4F52
#raw 0x55 'Jump in Place (Facing Right)
#raw 0xFE 'End of Movements
can anyone tell me for exemple what special 0x187 stands for?

thank you for reading :)

destinedjagold

You can contact me in PC's discord server...

Age 32
Male
Seen 3 Days Ago
Posted March 24th, 2023
8,579 posts
16 Years
loadpointer 0x0 0x81923F1 '"[player] received TM47\nfrom MISTY..."

When I change MISTY to CIMEX tand compile and save, I open script and it doesnt change =(
Learn to script from scratch, please.
Refer to this thread here ---> click me~

Spherical Ice

Age 25
Leicester, UK
Seen 21 Hours Ago
Posted February 20th, 2022
5,251 posts
15.5 Years
I hate to be a pain, but...

Type: Level Script
ROM: FireRed
Script:
Spoiler:
'---------------
#org @start
lock
special 0x113
applymovement MOVE_CAMERA @move1
waitmovement 0x0
special 0x114
msgbox @string1 MSG_KEEPOPEN '"[blue_fr]PROF. REDWOOD: Adjust the..."
closeonkeypress
waitmovement 0x0
applymovement 0x1 @move2
waitmovement 0x0
special 0x113
applymovement MOVE_CAMERA @move3
applymovement 0x1 @move4
waitmovement 0x0
special 0x114
msgbox @string2 MSG_NORMAL '"[blue_fr]PROF. REDWOOD: Oh! [playe..."
applymovement 0x1 @move5
applymovement MOVE_PLAYER @move6
waitmovement 0x0
msgbox @string3 MSG_NORMAL '"[blue_fr]PROF. REDWOOD: Okay, hand..."
checkitem 0x11E 0x1
if 0x1 goto @snippet1
checkitem 0x11F 0x1
if 0x1 goto @snippet2
release
end

'---------------
#org @snippet1
removeitem 0x11E 0x1
setvar 0x4001 0x184
bufferpokemon 0x0 0x184
givepokemon 0x184 0xA 0x0 0x0 0x0 0x0
goto @snippet3

'---------------
#org @snippet2
removeitem 0x11F 0x1
setvar 0x4001 0x186
bufferpokemon 0x0 0x186
givepokemon 0x186 0xA 0x0 0x0 0x0 0x0
goto @snippet3

'---------------
#org @snippet3
compare LASTRESULT 0x0
if 0x1 goto @snippet4
compare LASTRESULT 0x1
if 0x1 goto @snippet5
compare LASTRESULT 0x2
if 0x1 goto @snippet6
release
end

'---------------
#org @snippet4
fanfare 0x101
preparemsg @string4 '"[blue_fr]PROF. REDWOOD: Oh my[.]it..."
waitmsg
waitfanfare
msgbox @string5 MSG_YESNO '"[black_fr]Do you want to give a ni..."
compare LASTRESULT 0x0
if 0x1 goto @snippet7
call @snippet8
call @snippet9
goto @snippet7

'---------------
#org @snippet5
hidesprite 0x2
fanfare 0x101
preparemsg @string4 '"[blue_fr]PROF. REDWOOD: Oh my[.]it..."
waitmsg
waitfanfare
msgbox @string5 MSG_YESNO '"[black_fr]Do you want to give a ni..."
compare LASTRESULT 0x0
if 0x1 goto @snippet10
call @snippet11
goto @snippet10

'---------------
#org @snippet6
textcolor 0x3
msgbox @string6 MSG_KEEPOPEN '"There's no more room for POKéMON!\..."
release
end

'---------------
#org @snippet7
msgbox @string7 MSG_NORMAL '"[blue_fr]PROF. REDWOOD: You've got..."
setvar 0x7200 0x1
release
end

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

'---------------
#org @snippet9
fadescreen 0x1
special 0x9E
waitstate
return

'---------------
#org @snippet10
call @snippet12
goto @snippet7

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

'---------------
#org @snippet12
bufferboxname 0x0 0x4037
bufferpokemon 0x1 0x4001
checkflag 0x834
if 0x0 call @snippet13
checkflag 0x834
if 0x1 call @snippet14
return

'---------------
#org @snippet13
special2 LASTRESULT 0x165
compare LASTRESULT 0x1
if 0x1 goto @snippet15
msgbox @string8 MSG_KEEPOPEN '"[black_fr][buffer2] was transferre..."
return

'---------------
#org @snippet14
special2 LASTRESULT 0x165
compare LASTRESULT 0x1
if 0x1 goto @snippet16
msgbox @string9 MSG_KEEPOPEN '"[black_fr][buffer2] was transferre..."
return

'---------------
#org @snippet15
special2 LASTRESULT 0x18A
bufferboxname 0x2 LASTRESULT
msgbox @string10 MSG_KEEPOPEN '"[black_fr]BOX ["][buffer3]" on\nSo..."
return

'---------------
#org @snippet16
special2 LASTRESULT 0x18A
bufferboxname 0x2 LASTRESULT
msgbox @string11 MSG_KEEPOPEN '"[black_fr]BOX ["][buffer3]" on\nBI..."
return


'---------
' Strings
'---------
#org @string1
= [blue_fr]PROF. REDWOOD: Adjust the\nwhaddya call it[.]and flick the\lswitch.\lTurn off the what's it's face,\land reverse the polarity and[.]\pSUCCESS!

#org @string2
= [blue_fr]PROF. REDWOOD: Oh! [player]! You made\nit, then?\lSo, welcome to my glorious[.]well,\lto my lab.\lExcuse the mess.\p[blue_fr]PROF. REDWOOD: Hey! Is that a\nFOSSIL?\lCome here, that'll be the perfect\ltest subject for my machine!

#org @string3
= [blue_fr]PROF. REDWOOD: Okay, hand me\nover that FOSSIL. I'm gonna\lrevive it!\lHere's hoping!

#org @string4
= [blue_fr]PROF. REDWOOD: Oh my[.]it\nworked! It's a miracle!\p[black_fr][player] obtained the revived [buffer1]!

#org @string5
= [black_fr]Do you want to give a nickname to\nthis [buffer1]?

#org @string6
= There's no more room for POKéMON!\pThe POKéMON BOXES are full and\ncan't accept any more!

#org @string7
= [blue_fr]PROF. REDWOOD: You've got no\nidea how happy I am!\lYou'd better make good use of\lthat [buffer1], because it's the subject\lof a miracle!\lYay!

#org @string8
= [black_fr][buffer2] was transferred to\nSomeone's PC.\pIt was placed in \nBOX ["][buffer1]."

#org @string9
= [black_fr][buffer2] was transferred to\nBILL'S PC.\pIt was placed in \nBOX ["][buffer1]."

#org @string10
= [black_fr]BOX ["][buffer3]" on\nSomeone's PC was full.\p[buffer2] was transferred to\nBOX ["][buffer1]."

#org @string11
= [black_fr]BOX ["][buffer3]" on\nBILL'S PC was full.\p[buffer2] was transferred to\nBOX ["][buffer1]."


'-----------
' Movements
'-----------
#org @move1
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements

#org @move2
#raw 0x0 'Face Down
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements

#org @move3
#raw 0x10 'Step Down (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x0 'Face Down
#raw 0xFE 'End of Movements

#org @move4
#raw 0x10 'Step Down (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x0 'Face Down
#raw 0xFE 'End of Movements

#org @move5
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements

#org @move6
#raw 0x11 'Step Up (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x2 'Face Left
#raw 0xFE 'End of Movements


Important Segment:
Spoiler:
checkitem 0x11E 0x1
if 0x1 goto @snippet1
checkitem 0x11F 0x1
if 0x1 goto @snippet2
release
end

'---------------
#org @snippet1
removeitem 0x11E 0x1
setvar 0x4001 0x184
bufferpokemon 0x0 0x184
givepokemon 0x184 0xA 0x0 0x0 0x0 0x0
goto @snippet3

'---------------
#org @snippet2
removeitem 0x11F 0x1
setvar 0x4001 0x186
bufferpokemon 0x0 0x186
givepokemon 0x186 0xA 0x0 0x0 0x0 0x0
goto @snippet3


Okay, so, item 0x11E is the root fossil, and 0x11F is the claw fossil.
In another event, the player is given either one of them.
The check is supposed to find out which fossil you have and give you the corresponding Pokémon (Lileep or Anorith) accordingly. However, despite the fact that I have the claw fossil, when this script executes, I receive a Lileep, and the Claw Fossil remains.

Also, an unrelated question, but is there a limit to the amount of buffers in a script?
This problem is still present. Again, I hate to be a pain, but I can't seem to work this out. ;o;
Male
UK
Seen March 7th, 2015
Posted December 13th, 2011
22 posts
12 Years
This problem is still present. Again, I hate to be a pain, but I can't seem to work this out. ;o;
I think you need a compare line.
Something like:
checkitem 0x11E 0x1
compare LASTRESULT 0x1
if 0x1 goto @snippet1
And the same for the claw fossil. Lemme know if that works :)

On another note, I got the cracked floor warps working just fine- was missing copyvar 0x4022 0x1 in Script offset 1
Just starting out ^^;

redriders180

Mastermind of Pokemon Glazed

Male
Path of Victory, Tunod
Seen December 17th, 2016
Posted November 17th, 2015
314 posts
12.9 Years
Alrighty, maybe one of you can help, because I am thorougly confuzzled.

I'm hacking a FireRed rom. This script is supposed to do something like this:

The player is asked to give 250 dollars for whatever this person has in their bag. if they say yes, the script does this:

Pick a random number from 0 to 9. If 0,1, or 2, give no item. If 3, 4, or 5, give a mediocre item. if 6 or 7, give a somewhat better item. if 8, give a nice item, and if 9, give a TM. The items identity is picked by another random number, then certain things are added, and an item is buffered and the player learns what they got or didnt get.

What it is doing is, instead of saying the player got (insert item here), it's saying player got (insert strange number here). I'd post a snapshot, but not enough posts. Here is my script:

Spoiler:
#dynamic 0x800000
#org 0x806B78
random 0xA
compare LASTRESULT 0x0
if 0x1 goto 0x8806BE6
compare LASTRESULT 0x1
if 0x1 goto 0x8806BE6
compare LASTRESULT 0x2
if 0x1 goto 0x8806BE6
compare LASTRESULT 0x3
if 0x1 goto 0x8806BEF
compare LASTRESULT 0x4
if 0x1 goto 0x8806BEF
compare LASTRESULT 0x5
if 0x1 goto 0x8806BEF
compare LASTRESULT 0x6
if 0x1 goto 0x8806C06
compare LASTRESULT 0x7
if 0x1 goto 0x8806C06
compare LASTRESULT 0x8
if 0x1 goto 0x8806C1D
if 0x0 goto 0x8806C34
end

'---------------
#org 0x806BE6
setflag 0x220
goto 0x8806C4B

'---------------
#org 0x806BEF
random 0x6
copyvar 0x4003 LASTRESULT
addvar 0x4003 0xD
bufferitem 0x1 0x4003
goto 0x8806C4B

'---------------
#org 0x806C06
random 0x9
copyvar 0x4003 LASTRESULT
addvar 0x4003 0x3F
bufferitem 0x1 0x4003
goto 0x8806C4B

'---------------
#org 0x806C1D
random 0x2B
copyvar 0x4003 LASTRESULT
addvar 0x4003 0x85
bufferitem 0x1 0x4003
goto 0x8806C4B

'---------------
#org 0x806C34
random 0x32
copyvar 0x4003 LASTRESULT
addvar 0x4003 0x121
bufferitem 0x1 0x4003
goto 0x8806C4B

'---------------
#org 0x806C4B
showmoney 0x1 0x1 0x0
msgbox 0x8806CDB MSG_YESNO '"Hey, kid! I have to clean up this\..."
compare LASTRESULT 0x1
if 0x1 goto 0x8806C70
hidemoney 0x1 0x1
msgbox 0x8806D59 MSG_FACE '"Hey, I'm no con artist! I\nsometim..."
release
end

'---------------
#org 0x806C70
checkitemroom 0x4003 0x1
compare LASTRESULT 0x0
if 0x1 goto 0x8806CC5
checkmoney 0xFA 0x0
compare LASTRESULT 0x0
if 0x1 goto 0x8806CD0
paymoney 0xFA 0x0
updatemoney 0x1 0x1 0x0
hidemoney 0x1 0x1
checkflag 0x220
if 0x1 goto @nothing
additem 0x4003 0x1
msgbox 0x8806D90 MSG_FACE '"Well, looky here. I've got myself\..."
release
end

'---------------
#org @nothing
msgbox 0x8806DDE MSG_FACE '"Well, sucks for you, I don't have\..."
clearflag 0x220
hidemoney 0x1 0x1
release
end

'---------------
#org 0x806CC5
msgbox 0x8806E2B MSG_FACE '"You don't have any room for any\ni..."
release
end

'---------------
#org 0x806CD0
msgbox 0x8806E6A MSG_FACE '"Hey, don't try to pull one over on..."
release
end


'---------
' Strings
'---------
#org 0x806CDB
= Hey, kid! I have to clean up this\nplace for Community Service. I'll\lcut you a deal. [$]250 for whatever\lI've picked up. Deal?

#org 0x806D59
= Hey, I'm no con artist! I\nsometimes find good items!

#org 0x806D90
= Well, looky here. I've got myself\na [buffer1]. Well, a deal is a deal.\lit's yours.

#org 0x806DDE
= Well, sucks for you, I don't have\nanything. Oh well, thanks for the\lmoney.

#org 0x806E2B
= You don't have any room for any\nitems I may or may not have.

#org 0x806E6A
= Hey, don't try to pull one over on\nme, you don't have enough money.


I'm sorry, I don't have it in Dynamic-offset mode. Thanks :D
Male
Seen August 22nd, 2011
Posted July 10th, 2011
13 posts
13.7 Years
I'm pretty new to hacking, and I want to have a person that's blocking the way give a pokemon once, then move up 1 step. I did some tutorials and got this
Spoiler:

'-----------------------
#org 0x950113
lock
faceplayer
checkflag 0x200
if 0x1 goto 0x8823481
msgbox 0x8950068 '"It's dangerous to go out alone!\nHe..."
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x895009B '"Please take good care\nOf this bulb..."
setflag 0x200
msgbox 0x89500E4 '"Have fun!"
applymovement 0x3 0x895004A
waitmovement 0x0
release
end

'-----------------------
#org 0x823481
msgbox 0x89500C7 '"You will be a hero someday!"
callstd 0x6
nop
release
end


'-----------
' Movements
'-----------
#org 0x95004A
#raw 2 'Face Left
#raw C 'Step Down (Slow)
#raw A4 'movA4
#raw 0 'Face Down
#raw 36 'Slide Up (Normal)
#raw 0 'Face Down
#raw 0 'Face Down
#raw D6 'movD6
#raw DD 'movDD
#raw E2 'movE2
#raw D5 'movD5
#raw E6 'movE6
#raw ED 'movED
#raw 0 'Face Down
#raw 2D 'Face Down (Delayed)
#raw C2 'movC2
#raw A1 'movA1
#raw A5 'movA5
#raw 0 'Face Down
#raw 2D 'Face Down (Delayed)
#raw C2 'movC2
#raw A6 'movA6
#raw A9 'movA9
#raw 0 'Face Down
#raw 2D 'Face Down (Delayed)
#raw C2 'movC2
#raw C0 'movC0
#raw BF 'movBF


'---------
' Strings
'---------
#org 0x950068
= It's dangerous to go out alone!\nHere, take this!

#org 0x95009B
= Please take good care\nOf this bulbasaur

#org 0x9500E4
= Have fun!

#org 0x9500C7
= You will be a hero someday!

But when I try it ingame it gives me the jingle, the person slides upwards out of the screen (really fast) and I'm locked in place with no music or anything
Halp pl0x
xD
PS. When I try to set just 1 step upwards (0x11), compile and open it up again it automatically changes back to this.

Satoshi Ookami

Memento Mori

Age 30
Male
Abyss of Time, Great Seal
Seen August 5th, 2018
Posted July 3rd, 2018
14,253 posts
14.8 Years
Yes, I can see it's really wrong =)
Because there are those horrible not working moves =D
Could you post your original script? (The one with #dynamic)
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List
Male
Seen August 22nd, 2011
Posted July 10th, 2011
13 posts
13.7 Years
Yes, I can see it's really wrong =)
Because there are those horrible not working moves =D
Could you post your original script? (The one with #dynamic)
Sure thing

Spoiler:

'-----------------------
#dyn 0x0950113
#org @start
lock
faceplayer
checkflag 0x200
if 0x1 goto 0x8823481
msgbox 0x8950068 '"It's dangerous to go out alone!\nHe..."
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x895009B '"Please take good care\nOf this bulb..."
setflag 0x200
msgbox 0x89500E4 '"Have fun!"
applymovement 0x3 0x895004A
waitmovement 0x0
release
end

'-----------------------
#org 0x823481
msgbox 0x89500C7 '"You will be a hero someday!"
callstd 0x6
nop
release
end


'-----------
' Movements
'-----------
#org 0x95004A
#raw 0x2
#raw 0x09

'---------
' Strings
'---------
#org 0x950068
= It's dangerous to go out alone!\nHere, take this!

#org 0x95009B
= Please take good care\nOf this bulbasaur!

#org 0x9500E4
= Have fun!

#org 0x9500C7
= You will be a hero someday!
Male
Seen October 8th, 2013
Posted October 8th, 2013
26 posts
12.2 Years
the trainer in cerulean wont appear when I play. I checked A-Map and the script.

Script
'---------------
#org 0x16AB5B
trainerbattle 0x0 0xEA 0x0 0x8192524 0x8192547
setvar 0x8004 0x3
setvar 0x8005 0x2
special 0x173
msgbox 0x8192556 0x6 '"MISTY is a TRAINER who's going to\..."
end


'---------
' Strings
'---------
#org 0x192524
= Splash!\pI'm first up!\nLet's do it!

#org 0x192547
= That can't be!

#org 0x192556
= MISTY is a TRAINER who's going to\nkeep improving.\pShe won't lose to someone like you!




A- Map hes facing left, has normal talking level, movement 11, 3 view radius, offset-0016AB5B

Spherical Ice

Age 25
Leicester, UK
Seen 21 Hours Ago
Posted February 20th, 2022
5,251 posts
15.5 Years
Alrighty, maybe one of you can help, because I am thorougly confuzzled.

I'm hacking a FireRed rom. This script is supposed to do something like this:

The player is asked to give 250 dollars for whatever this person has in their bag. if they say yes, the script does this:

Pick a random number from 0 to 9. If 0,1, or 2, give no item. If 3, 4, or 5, give a mediocre item. if 6 or 7, give a somewhat better item. if 8, give a nice item, and if 9, give a TM. The items identity is picked by another random number, then certain things are added, and an item is buffered and the player learns what they got or didnt get.

What it is doing is, instead of saying the player got (insert item here), it's saying player got (insert strange number here). I'd post a snapshot, but not enough posts. Here is my script:

Spoiler:
#dynamic 0x800000
#org 0x806B78
random 0xA
compare LASTRESULT 0x0
if 0x1 goto 0x8806BE6
compare LASTRESULT 0x1
if 0x1 goto 0x8806BE6
compare LASTRESULT 0x2
if 0x1 goto 0x8806BE6
compare LASTRESULT 0x3
if 0x1 goto 0x8806BEF
compare LASTRESULT 0x4
if 0x1 goto 0x8806BEF
compare LASTRESULT 0x5
if 0x1 goto 0x8806BEF
compare LASTRESULT 0x6
if 0x1 goto 0x8806C06
compare LASTRESULT 0x7
if 0x1 goto 0x8806C06
compare LASTRESULT 0x8
if 0x1 goto 0x8806C1D
if 0x0 goto 0x8806C34
end

'---------------
#org 0x806BE6
setflag 0x220
goto 0x8806C4B

'---------------
#org 0x806BEF
random 0x6
copyvar 0x4003 LASTRESULT
addvar 0x4003 0xD
bufferitem 0x1 0x4003
goto 0x8806C4B

'---------------
#org 0x806C06
random 0x9
copyvar 0x4003 LASTRESULT
addvar 0x4003 0x3F
bufferitem 0x1 0x4003
goto 0x8806C4B

'---------------
#org 0x806C1D
random 0x2B
copyvar 0x4003 LASTRESULT
addvar 0x4003 0x85
bufferitem 0x1 0x4003
goto 0x8806C4B

'---------------
#org 0x806C34
random 0x32
copyvar 0x4003 LASTRESULT
addvar 0x4003 0x121
bufferitem 0x1 0x4003
goto 0x8806C4B

'---------------
#org 0x806C4B
showmoney 0x1 0x1 0x0
msgbox 0x8806CDB MSG_YESNO '"Hey, kid! I have to clean up this\..."
compare LASTRESULT 0x1
if 0x1 goto 0x8806C70
hidemoney 0x1 0x1
msgbox 0x8806D59 MSG_FACE '"Hey, I'm no con artist! I\nsometim..."
release
end

'---------------
#org 0x806C70
checkitemroom 0x4003 0x1
compare LASTRESULT 0x0
if 0x1 goto 0x8806CC5
checkmoney 0xFA 0x0
compare LASTRESULT 0x0
if 0x1 goto 0x8806CD0
paymoney 0xFA 0x0
updatemoney 0x1 0x1 0x0
hidemoney 0x1 0x1
checkflag 0x220
if 0x1 goto @nothing
additem 0x4003 0x1
msgbox 0x8806D90 MSG_FACE '"Well, looky here. I've got myself\..."
release
end

'---------------
#org @nothing
msgbox 0x8806DDE MSG_FACE '"Well, sucks for you, I don't have\..."
clearflag 0x220
hidemoney 0x1 0x1
release
end

'---------------
#org 0x806CC5
msgbox 0x8806E2B MSG_FACE '"You don't have any room for any\ni..."
release
end

'---------------
#org 0x806CD0
msgbox 0x8806E6A MSG_FACE '"Hey, don't try to pull one over on..."
release
end


'---------
' Strings
'---------
#org 0x806CDB
= Hey, kid! I have to clean up this\nplace for Community Service. I'll\lcut you a deal. [$]250 for whatever\lI've picked up. Deal?

#org 0x806D59
= Hey, I'm no con artist! I\nsometimes find good items!

#org 0x806D90
= Well, looky here. I've got myself\na [buffer1]. Well, a deal is a deal.\lit's yours.

#org 0x806DDE
= Well, sucks for you, I don't have\nanything. Oh well, thanks for the\lmoney.

#org 0x806E2B
= You don't have any room for any\nitems I may or may not have.

#org 0x806E6A
= Hey, don't try to pull one over on\nme, you don't have enough money.


I'm sorry, I don't have it in Dynamic-offset mode. Thanks :D
For the bufferitem codes, you need to write "bufferitem 0x0 0x4003" or change the text to say "buffer2".