Sierra's MEGA-HUGE XSE Scripting Tutorial Page 19

Started by Sierraffinity December 26th, 2008 6:55 PM
  • 776138 views
  • 1232 replies
Male
Seen August 27th, 2014
Posted October 24th, 2013
79 posts
12.9 Years
I have a lot of events in my hack and i was wondering how to make on script after another specific one. i have my game so far starting in kanto and you get your starter and the pokedex like normal but i want my script for oaks aide to give you the national dex exactly after you get the pokedex in oaks lab if somebody could help with this i would be very grateful!

heres the script

#dynamic offset

#org @start
applymovement 0x1 @move
waitmovement 0x0
applymovement 0x1 @move2
waitmovement 0x0
pause 0x10
applymovement 0xFF @move3
waitmovement 0x0
checkflag 0x10A
if 1 jump @talk
special 0x16F
setflag 0x10A
fanfare 0x13E
msgbox @talk2 0x6
waitfanfare
release
end

#org @talk
msgbox @talk3
boxset 0x6
release
end

#org @talk3
= Like your new pokedex?

#org @talk2
= Your pokedex was upgraded!
Age 28
Male
PA
Seen December 10th, 2017
Posted August 17th, 2010
175 posts
18.3 Years
I'm having trouble with my script.

Spoiler:
#dynamic 0x800000

#org @start
checkflag 0x200
if 0x1 goto @last
lock
faceplayer
showpokepic 0x115 0xA 0x3
msgbox @treecko 0x5
compare lastresult 0x1
if 0x1 goto @recieve
compare lastresult 0x0
if 0x0 goto @end
release
end

#org @last
msgbox @last2 0x6

#org @treecko
= This is Treecko, a grass type.\nDo you want it?

#org @recieve
hidepokepic
hidesprite lasttalked
msgbox @strong 0x4
setflag 0x828
setflag 0x291
givepokemon 0x115 0x5 0x0 0x0 0x0 0x0
bufferpokemon 0x0 0x115
preparemsg @treecko2
waitmsg
fanfare 0x13E
waitfanfare
msgbox @nickname 0x5
compare lastresult 0x1
if 0x1 goto @nickname2
compare lastresult 0x0
if 0x1 goto @rivalrecieve
end

#org @nickname2
call @nickname3
goto @rivalrecieve

#org @rivalrecieve
applymovement 0x01 @rivalmove
msgbox @rival2 0x6
hidesprite 0x05
textcolor 0x3
bufferpokemon 0x0 0x4
preparemsg @rivalpokemon
waitmsg
fanfare 0x13E
waitfanfare
applymovement 0x02 @maplemove
waitmovement 0x0
msgbox @maple 0x6
msgbox @rivallate 0x6
msgbox @maple2 0x6
msgbox @rivalyes 0x6
msgbox @maple3 0x6
setflag 0x200
setflag 0x201
release
end

#org @end
hidepokepic
release
end

#org @treecko2
= [player] recieved [buffer1].

#org @strong
= This Pokemon seems strong.

#org @nickname
= Do you want to nickname this Pokemon\hAC

#org @nickname3
fadescreen 0x1
special 0x9e
waitstate
return

#org @rivalmove
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0xFE

#org @rival2
= I'll take this one then.

#org @rivalpokemon
= [rival] recieved [buffer1].

#org @maplemove
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x0
#raw 0xFE

#org @maple
= You're late.\nSo late that I went to Dunkin'.

#org @rivallate
= S\hAESorry, it was [player]'s fault.

#org @maple2
= Yeah, whatever kid.\nYou get your Pokemon already\hAC

#org @rivalyes
= Yes sir\hAB Right here.

#org @maple3
= Well what the hell you waitin' for\hAC\nLets get some battlin' up\lin here.

#org @last2
= This Professor Maple's last Pokemon\hAB


I'm having trouble with the hidesprite, whenever I move away from the Pokeball after the whole script is done, it appears again. What's wrong?

0m3GA ARS3NAL

Im comin' home...

Age 30
Male
Superjail Penitentiary
Seen February 25th, 2023
Posted September 12th, 2013
1,816 posts
15.3 Years
I'm having trouble with my script.

Spoiler:
#dynamic 0x800000

#org @start
checkflag 0x200
if 0x1 goto @last
lock
faceplayer
showpokepic 0x115 0xA 0x3
msgbox @treecko 0x5
compare lastresult 0x1
if 0x1 goto @recieve
compare lastresult 0x0
if 0x0 goto @end
release
end

#org @last
msgbox @last2 0x6

#org @treecko
= This is Treecko, a grass type.\nDo you want it?

#org @recieve
hidepokepic
hidesprite lasttalked
msgbox @strong 0x4
setflag 0x828
setflag 0x291
givepokemon 0x115 0x5 0x0 0x0 0x0 0x0
bufferpokemon 0x0 0x115
preparemsg @treecko2
waitmsg
fanfare 0x13E
waitfanfare
msgbox @nickname 0x5
compare lastresult 0x1
if 0x1 goto @nickname2
compare lastresult 0x0
if 0x1 goto @rivalrecieve
end

#org @nickname2
call @nickname3
goto @rivalrecieve

#org @rivalrecieve
applymovement 0x01 @rivalmove
msgbox @rival2 0x6
hidesprite 0x05
textcolor 0x3
bufferpokemon 0x0 0x4
preparemsg @rivalpokemon
waitmsg
fanfare 0x13E
waitfanfare
applymovement 0x02 @maplemove
waitmovement 0x0
msgbox @maple 0x6
msgbox @rivallate 0x6
msgbox @maple2 0x6
msgbox @rivalyes 0x6
msgbox @maple3 0x6
setflag 0x200
setflag 0x201
release
end

#org @end
hidepokepic
release
end

#org @treecko2
= [player] recieved [buffer1].

#org @strong
= This Pokemon seems strong.

#org @nickname
= Do you want to nickname this Pokemon\hAC

#org @nickname3
fadescreen 0x1
special 0x9e
waitstate
return

#org @rivalmove
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0xFE

#org @rival2
= I'll take this one then.

#org @rivalpokemon
= [rival] recieved [buffer1].

#org @maplemove
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x0
#raw 0xFE

#org @maple
= You're late.\nSo late that I went to Dunkin'.

#org @rivallate
= S\hAESorry, it was [player]'s fault.

#org @maple2
= Yeah, whatever kid.\nYou get your Pokemon already\hAC

#org @rivalyes
= Yes sir\hAB Right here.

#org @maple3
= Well what the hell you waitin' for\hAC\nLets get some battlin' up\lin here.

#org @last2
= This Professor Maple's last Pokemon\hAB


I'm having trouble with the hidesprite, whenever I move away from the Pokeball after the whole script is done, it appears again. What's wrong?
Set a flag before the hidesprite that is the same as the ID of the sprite you wanna make disappear.
>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
Seen August 27th, 2014
Posted October 24th, 2013
79 posts
12.9 Years
I have a lot of events in my hack and i was wondering how to make on script after another specific one. i have my game so far starting in kanto and you get your starter and the pokedex like normal but i want my script for oaks aide to give you the national dex exactly after you get the pokedex in oaks lab if somebody could help with this i would be very grateful!

heres the script

#dynamic offset

#org @start
applymovement 0x1 @move
waitmovement 0x0
applymovement 0x1 @move2
waitmovement 0x0
pause 0x10
applymovement 0xFF @move3
waitmovement 0x0
checkflag 0x10A
if 1 jump @talk
special 0x16F
setflag 0x10A
fanfare 0x13E
msgbox @talk2 0x6
waitfanfare
release
end

#org @talk
msgbox @talk3
boxset 0x6
release
end

#org @talk3
= Like your new pokedex?

#org @talk2
= Your pokedex was upgraded!

Can anybody help me with my script somebody told me to hex edit it do i just use xse and find the offset to the script but then what do i do?

Drithlan

Self Proclaimed Cartographer

Male
California
Seen August 30th, 2010
Posted August 16th, 2010
47 posts
12.8 Years
This helped big time! Thanks man!
(@-.-)[email protected] VS Q('_'Q)
GET IT ON!

I am willing to take requests for maps.
But before you go PMing me I want to let you know that I am still learning how to map.
Here (http://s894.photobucket.com/albums/ac144/Drithlan/ROM%20Hacks/) is a link to My album Feel free to review and/or comment my work before requesting.

Echidna

i don't care what's in your hair

Age 28
Male
Illinois
Seen April 27th, 2021
Posted May 22nd, 2019
2,077 posts
12.8 Years
Hey guys. I'm new and i'v been reading this tutorial from the start. I understood everything but it won't work. I input the code 100% like it says in the tuorial, but i think i'm doing the compiling wrong.please someone give me a list of all steps after writing the code from openning the rom to compiling and saving the offset.

OH and when i open advance map and choose xse as my script editor via "settings" "choose script editor" it says "are offsets seperated from the rom name by ":" (default) or " " in the preffered script editor?? => Yes for ":" : No for " "." WHAT IS THIS??????? WHAT DO I CHOOSE AND HOW DOES THIS AFFECT MY SCRIPTING ???? PLEASE HELP ME!!!!!!!!

SOMEONE HELP ME QUICK !!!!!! I"M WORKING ON ONE OF THE BEST HACKS EVER. I MADE A LONG GAME WHICH BY THE WAY ISN'T BORING AND I PROMISE EVERYONE HERE WILL GET THE COMPLETE VERION WHICH DOESN'T EVEN LOOK LIKE A HACK (BECAUSE OF MY EXP. IN MAKING A COOL MAP) BUT THE EVENTS WON'T WORK AND SCRIPTING IS MY PROBLEM.I NEED THE INFO I REQUESTED. OH AND MY TALKING SCRIPT WORKED BUT THE PERSON JUST KEEPS TALKING AND DOESN'T WAIT FOR ME TO PRESS A. WHY ??????? HELP ME BY ANSWERING MY QUESTIONS SO I CAN GO BACK TO WORKING ON MY HACK WHICH IS BY THE WAY "TITANIUM VERSION" !!!!!!!! WICKED GAME.

I'M GOING TO LUNCH. PLEASE SOMEONE ANSWER MY QUESTION UNTILL I COME BACK. ANYONE. IT DOESN'T MATTER AS LONG AS IT WORKS.
Male
Ireland
Seen November 5th, 2013
Posted October 12th, 2013
10 posts
13.1 Years
#dynamic 0x2DD0F8
#org @start
lock
Faceplayer
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x6
release
end

#org @take
checkflag 0x829
if 0x0 goto @pokedex
msgbox @after 0x6
cry 0x32 0x0
wildbattle 0x32 0x5 0x0
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x200
release
end

#org @pokedex
setflag 0x829
setflag 0x82F
setflag 0x828
givepokemon 0x32 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
special 0x16F
msgbox @3 0x6
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x201
release
end

#org @3
= You obtained a Pokedex,\nNidoran(m), and\lrunning shoes!

#org @2
= Everything was left\nthe way it was

#org @1
= There is a pokeball with\nNidoran(m) and other stuff\lTake it?

#org @after
= Nidoran(m) appeared from\nthe pokeball\lHe appears to be\nangry.


This is my first script and i compiled it but when i go to the item i get a diglett and i have another one with nidoran female and it gives me a zubat. Also when it fades out it fades but when i walk over where it was, it reappears. anyone know whats wrong?
O and ^post, you need to have free space finder in the same folder as xse, and your rom ran out of space. Try a Rom expander?


i dont know about the fading out thing but about the pokemon ( the nidorans ) did you convert there pokedex number to hex...ie nidoran(m) is 32 i think and that converted to hex is...20 do the same for any other pokemon in your hack as XSE comes with a dec to hex calculator on the right... hope this helps a little

Well about on of my scripts I have a little problem...

Its the opening script in my hack where you recieve a Pichu and all the main characters are introduced...

My problem is that out of the 5 characters in the script only Prof.Oak, PLAYER and Melissa appear whereas RIVAL and your mum dont appear for their part. Everything else goes smoothly other then that. Heres the script:

Spoiler:
#dynamic 0x71B658
#org @begins1
lock
faceplayer
checkflag 0x828
if 0x0 goto @getstapok
if 0x1 goto @endoscr
release
end
#org @getstapok
lock
faceplayer
msgbox @oaktalk1s1 0x6
givepokemon 0xAC 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @urecevapok 0x4
waitfanfare
msgbox @oaktalk2s1 0x6
applymovement 0x03 @oakmove1
applymovement 0xFF @playermove1
waitmovement 0x0
applymovement 0x09 @melmove1
waitmovement 0x0
msgbox @oaktalk3s1 0x6
msgbox @meltalk1s1 0x6
msgbox @oaktalk4s1 0x6
applymovement 0x11 @garymove1
waitmovement 0x0
applymovement 0x03 @oakmove2
applymovement 0xFF @playermove2
applymovement 0x09 @melmove2
waitmovement 0x0
msgbox @oaktalk5s1 0x6
msgbox @garytalk1s1 0x6
msgbox @oaktalk6s1 0x6
applymovement 0xA @mummove1
waitmovement 0x0
applymovement 0xB @garymove2
applymovement 0x03 @oakmove3
applymovement 0xFF @playermove3
applymovement 0x09 @melmove3
waitmovement 0x0
msgbox @mumtalk1s1 0x6
msgbox @oaktalk7s1 0x6
msgbox @garytalk2s1 0x6
applymovement 0xB @garymove3
waitmovement 0x0
msgbox @meltalk2s1 0x6
applymovement 0x09 @melmove4
waitmovement 0x0
applymovement 0xA @mummove2
waitmovement 0x0
msgbox @mumtalk2s1 0x6
giveitem 0xD 0x3 0x0
fanfare 0x13E
waitfanfare
msgbox @mumtalk3s1 0x6
applymovement 0xA @mummove3
waitmovement 0x0
applymovement 0x03 @oakmove4
applymovement 0xFF @playermove4
waitmovement 0x0
msgbox @oaktalk8s1 0x6
applymovement 0x03 @oakmove5
waitmovement 0x0
hidesprite 0x03
hidesprite 0x09
hidesprite 0xA
hidesprite 0xB
setflag 0x828
release
end
#org @oaktalk1s1
= Oak: Hi [PLAYER]!\nWelcome to the cosey, Covey Town!\lJust moved here from HOENN i see.\lYour mum told me when you got\lyour first pokemon you wanted to\ltrain here and challenge \lthe pokemon league!\lWell here is a pokemon to get\lyou started!
#org @urecevapok
= You recieved a Pichu!
#org @oaktalk2s1
= Oak: That is the electric mouse\npokemon, Pichu.\lIt's very energetic!\lNow come with me.\lI've got something to show you and\lyour friends.
#org @oakmove1
#raw 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x62 0xFE
#org @playermove1
#raw 0x10 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x10 0x10 0x13 0x10 0x62 0xFE
#org @melmove1
#raw 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0xFE
#org @oaktalk3s1
= Oak: Oh, hello Melissa!\nHow is your Chikorita doing?\lI trust he's doing well?
#org @meltalk1s1
= Melissa: He's loving this stroll\nright now!\lHi neighbour! I see you have a\lpokemon aswell! That Pichu\lseems to like you!
#org @oaktalk4s1
= Oak: Good your Chikorita is doing\nfine! I actually need to talk to\lyou both. And [RIVAL], but he's no-\lwhere to be seen.\lAnyway, read this:\lLETTER:\lNew technology has been made,\land can only be given to the ready.\lThis technology, the Pokedex.\lIt can record pokemon data and help\luncover the unknown phenomonons of\lthe pokemon world.\lOnly the most resilient of trainers \lcan recieve a pokedex.\lOak: If only we could get some \lpokedexs. You guys could all have \lone.\lHmmmmm...
#org @garymove1
#raw 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x11 0x11 0x11 0x11 0x11 0x11 0xFE
#org @oakmove2
#raw 0x62 0xFE
#org @playermove2
#raw 0x62 0xFE
#org @melmove2
#raw 0x62 0xFE
#org @oaktalk5s1
= Oak: [RIVAL], hi, we were wondering\lwhere you were.
#org @garytalk1s1
= [RIVAL]: Well wonder no more,\nI saw you all from the lab.\lHey whats this.....\l.....\l.....\lWow! Do you have any of these\lpokedex's Proffesor? Because if\lyou do you know who you'd give\lone to don't you, hint [RIVAl]?
#org @oaktalk6s1
= Oak: Well [RIVAL], not that i do\nhave any but if i did, you'd\leach have to prove your ready,\lbut you all seemingly are.
#org @garymove2
#raw 0x62 0xFE
#org @oakmove3
#raw 0x62 0xFE
#org @playermove3
#raw 0x62 0xFE
#org @melmove3
#raw 0x62 0xFE
#org @mummove1
#raw 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x11 0x11 0x11 0x11 0x11 0xFE
#org @mumtalk1s1
= Mum: Proffesor!\nProffesor!\lYour assistant just rang your\lwife and I came here to pass\lon the news! Hes got pokedexs\lnow! 5 of them.
#org @oaktalk7s1
= Oak: Oh excellent! This we'll\nreally help our studies! And you\l3 can all go get one from my\lassistant in Route 301! You\lshould pass through his study lab.
#org @garytalk2s1
= [RIVAL]: I'm on my way!
#org @garymove3
#raw 0x20 0x1E 0x1E 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0xFE
#org @meltalk2s1
= Melissa: I best be on my way too.\nThanks for the help everyone.
#org @melmove4
#raw 0x13 0x13 0x11 0x11 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0xFE
#org @mummove2
#raw 0x13 0x13 0x01 0xFE
#org @mumtalk2s1
= Mum: This will help you honey!
#org @mumtalk3s1
= Mum: They will help you on\nyour journey honey!\lGood luck!
#org @mummove3
#raw 0x13 0x11 0x11 0x11 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0xFE
#org @oakmove4
#raw 0x03 0xFE
#org @playermove4
#raw 0x02 0xFE
#org @oaktalk8s1
= Oak: Well, guess you better\nbe going if you don't want to\lfall behind.\lGood Luck.
#org @oakmove5
#raw 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0xFE
#org @endoscr
release
end


anyhelp is appreciated :D thanks :)
Seen March 2nd, 2013
Posted August 8th, 2010
24 posts
14.2 Years
I'm getting very frustrated now.
Everytime you figure something out a new problem arises.

'-----------------------
#org 0x8000F5
lock
faceplayer
msgbox 0x880010B '"Don't you think the water is\nbeaut..."
if 0x1 goto 0x8800135
msgbox 0x880016E '"Children these days just do not\nap..."
end
'-----------------------
#org 0x800135
cmdC3 0xE8
givecoins 0xE7


'---------
' Strings
'---------
#org 0x80010B
= Don't you think the water is\nbeautiful?
#org 0x80016E
= Children these days just do not\nappreciate nature...\lIt makes me sad.

The bit highlighted just appeared from no where!
I am trying a simple Yes/No question but this appears in the midst of my script :(

Please help.
Male
Seen April 6th, 2013
Posted August 20th, 2012
28 posts
12.8 Years
OH and when i open advance map and choose xse as my script editor via "settings" "choose script editor" it says "are offsets seperated from the rom name by ":" (default) or " " in the preffered script editor?? => Yes for ":" : No for " "." WHAT IS THIS??????? WHAT DO I CHOOSE AND HOW DOES THIS AFFECT MY SCRIPTING ???? PLEASE HELP ME!!!!!!!!
Don't worry about that, it just means that anything to the right of those marks is a comment in the script meaning when the script editor compiles the scripts it will pass over it. XSE recognizes both of those, so it doesn't matter which one you use.

can someone tell me what i did wrong im trying to enter a city & then have a pokemon notice me run away from me.
The question has already kinda been answered but here is what I would do. "%" will stand in for any numbers or flags that you would use. Also obvious stuff like offsets are omitted. For the applymovement commands 0x1 will be the pokemon and obviously the hero would be 0xFF:
checkflag %
if 0x1 goto @done
applymovement 0x1 @move1
applymovement 0xFF @move2 'if there is anything you want the hero to do like look at the pokemon
waitmovement 0x0
msgbox 'if you want anything to be said
setflag %
release
end

#org @move1
#raw 0x% 'direction of the player for the pokemon to look
#raw 0x62 'makes "!" thought bubble appear over pokemon, 0x65 is "!!"
#raw 'here you would put whatever movements required to make the pokemon flee
#raw 0xFE 'ends movement

#org @move2
#raw 0x% 'direction hero looks if you want
#raw 0xFE 'ends movement
Add the msg if you want a message to display but you really don't need it.

What should happen is when you step on the tile the script is assigned to the pokemon should look at you (and you at him if you assign the player a movement), a thought bubble should appear over the pokemon, and then it will flee. You could tweak it a bit, for instance move the fleeing movements to after the waitmovement so that it isn't an instant movement.

If you need the movement hex codes they are in the help document for XSE although I am sure you could find them somewhere in these forums, maybe even this thread. I didn't check this script because I am working on my own scripts right now.

Hope this helps a bit. There may be a better way to do this but this should work well enough.
---------------------
You also mentioned message box problems. I don't know what type of message box you are using but try 0x6, that at least works for me. It may be a bit long and boring but the help document I mentioned earlier might help a bit with the more simple commands. I know it took me a while to force myself to read it.
---------------------
Wow this is turning into quite the post I am separating all of my help requests from my help offerings

I guess I have a question of my own as well. In my hack of FR I want to have a Mew in the overworld but the sprite for Mew apparently isn't meant for walking, when I applymovement it doesn't turn in the direction of movement, it just moves. That's fine for me, to get around that I need to know a way I can get it to blink before disappearing (like it was teleporting). I was hoping there was an easier way than sequencing some hidesprite/showsprite commands. If anybody knows the offset for the teleport script in FireRed that should suffice.

Okay I have continued working on the above script, using a simple hidesprite as a placeholder until I figure out what to do with Mew. I have run into a strange problem though. In an effort to avoid having to keep changing the offset every time I compile a new version of my script I compiled it once and used the Open Script button in AdvanceMap to edit the compiled script. However when I open the script the end of my script is replaced with this
applymovement 0xC2BD 0xC3CAC7BB
cmdc9
cmdc8
The sprite I am trying to move is 0xD and that is the longest offset I have ever seen (aren't they only 6 digits?). I don't even know what the cmdc commands are supposed to be. Also the movement I am trying to apply to 0xD is removed from the script as is the ending of the script. Help would be just grand.
Male
Seen August 19th, 2010
Posted August 17th, 2010
3 posts
13.7 Years
Good day. I have a some problem with this script :

#dynamic 0x800000

#org @start
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x06
applymovement 0x4 @move1
waitmovement 0x0
applymovement 0x4 @move2
pause 0x30
msgbox @2 0x06
givepokemon 0x14C 0x5 0x0
msgbox @3 0x06
applymovement 0xFF @move3
waitmovement 0x0
msgbox @4 0x06
applymovement 0xFF @move4
fadescreen 0x1
hidesprite 0x4
fadescreen 0x0
setflag 0x828
release
end

#org @done
release
end

#org @move1
#raw 0x2
#raw 0x3
#raw 0x2
#raw 0x0
#raw 0x62
#raw 0xFE

#org @move2
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

#org @move3
#raw 0x63
#raw 0xFE

#org @move4
#raw 0x65
#raw 0xFE

#org @1
= ???: ...

#org @2
= ???: Hmmm... \nSorry, but can you take care of my friend ?

#org @3
= You received Trapinch from ???.

#org @4
= I will be assume that you agree...

When it started, text not displayed, movement were working, sprite of ??? is "hided", but, when i go up or down for "S" on the Advance map, sprite of ??? is show, and when i step again on the "S" or talking with showen sprite of ??? game crashed.
Please, somebody help me.

0m3GA ARS3NAL

Im comin' home...

Age 30
Male
Superjail Penitentiary
Seen February 25th, 2023
Posted September 12th, 2013
1,816 posts
15.3 Years
Good day. I have a some problem with this script :

#dynamic 0x800000

#org @start
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x06
applymovement 0x4 @move1
waitmovement 0x0
applymovement 0x4 @move2
waitmovement 0x0
pause 0x30
msgbox @2 0x06
givepokemon 0x14C 0x5 0x0
msgbox @3 0x06
applymovement 0xFF @move3
waitmovement 0x0
msgbox @4 0x06
applymovement 0xFF @move4
fadescreen 0x1
setflag 0x???
hidesprite 0x4
fadescreen 0x0
setflag 0x828
release
end

#org @done
release
end

#org @move1
#raw 0x2
#raw 0x3
#raw 0x2
#raw 0x0
#raw 0x62
#raw 0xFE

#org @move2
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

#org @move3
#raw 0x63
#raw 0xFE

#org @move4
#raw 0x65
#raw 0xFE

#org @1
= ???: ...

#org @2
= ???: Hmmm... \nSorry, but can you take care of my friend ?

#org @3
= You received Trapinch from ???.

#org @4
= I will be assume that you agree...

When it started, text not displayed, movement were working, sprite of ??? is "hided", but, when i go up or down for "S" on the Advance map, sprite of ??? is show, and when i step again on the "S" or talking with showen sprite of ??? game crashed.
Please, somebody help me.
Changes are in BOLD RED.
You forgot 1 Waitmovement
Also, if you want the sprite of ??? to remain hidden, you need to replace the extra 'setflag 0x???' to the flag number of the sprites ID, then it'll stay hidden.

One more small thing, I don't mean to be rude, but your grammar seems to be a bit... bad...
>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
Seen August 28th, 2013
Posted February 2nd, 2011
5 posts
13.4 Years
Hey, ive got a problem...ive tried to change R/S event with poochyena, u know this one at the start...well i tried to change it into treecko, but i dont know where to find a line to change in scripts... :S seriously i need help, please ? .w.
bump ? i srsly need help, guyyysss .ww.
Male
Kiev, Ukraine
Seen July 2nd, 2012
Posted August 20th, 2010
4 posts
12.7 Years
Welcome from Ukraine. I started create my hack of Fire Red, and everything was fine, before appeared one problem with script for National PokeDex. This is it:

#dynamic 0x800000

#org @start
checkflag 0x700
if 0x1 goto @done
msgbox @1
boxset 0x6
applymovement 0x2 @move1
waitmovement 0x0
msgbox @2
boxset 0x6
~The game frozen~
setflag 0x829
special 0x16F
waitstate
msgbox @3
boxset 0x6
giveitem 0x4 0x5 0x1 MSG_OBTAIN
msgbox @4
boxset 0x6
fadescreen 0x1
setflag 0x0123
hidesprite 0x2
fadescreen 0x0
setflag 0x700
release
end

#org @done
release
end

#org @move1
#raw 0x10
#raw 0x10
#raw 0x62
#raw 0x10
#raw 0x10
#raw 0xFE

#org @1
= Devidson: "[player] !

#org @2
= Devidson: Welcome to the Arhus. \pI'm Prof.Devidson. \nI see that you have partner pokemon. \pYou also must have a pokedex. \nThis pokedex...

#org @3
= [player] obtained PokeDex \nfrom Prof.Devidson

#org @4
= Good luck, [player].

I will be glad for any help.
Sorry for my grammar, i'm Ukrainian.

Sierraffinity

Retiring from Pokémon ROM hacking

Age 26
she/her
Somewhere the rains of Africa can be blessed
Seen January 8th, 2023
Posted December 26th, 2022
1,071 posts
15.4 Years
Welcome from Ukraine. I started create my hack of Fire Red, and everything was fine, before appeared one problem with script for National PokeDex. This is it:

#dynamic 0x800000

#org @start
checkflag 0x700
if 0x1 goto @done
msgbox @1
boxset 0x6
applymovement 0x2 @move1
waitmovement 0x0
msgbox @2
boxset 0x6
setflag 0x829
special 0x16F
waitstate ~Actually, the game froze here~
msgbox @3
boxset 0x6
giveitem 0x4 0x5 0x1 MSG_OBTAIN
msgbox @4
boxset 0x6
fadescreen 0x1
setflag 0x0123
hidesprite 0x2
fadescreen 0x0
setflag 0x700
release
end

#org @done
release
end

#org @move1
#raw 0x10
#raw 0x10
#raw 0x62
#raw 0x10
#raw 0x10
#raw 0xFE

#org @1
= Devidson: "[player] !

#org @2
= Devidson: Welcome to the Arhus. \pI'm Prof.Devidson. \nI see that you have partner pokemon. \pYou also must have a pokedex. \nThis pokedex...

#org @3
= [player] obtained PokeDex \nfrom Prof.Devidson

#org @4
= Good luck, [player].

I will be glad for any help.
You're not supposed to put waitstate after EVERY special, and special 0x16F is one that doesn't need it.
Remove that, recompile, and test it out.
Restarted and revamped.

Public alpha out now!
Male
Seen August 28th, 2013
Posted February 2nd, 2011
5 posts
13.4 Years
Hey, ive got a problem...ive tried to change R/S event with poochyena, u know this one at the start...well i tried to change it into treecko, but i dont know where to find a line to change in scripts... :S seriously i need help, please ? .w.
.

bump ? i srsly need help, guyyysss .ww.
bump [2] Guys... ? :S
Male
Seen April 6th, 2013
Posted August 20th, 2012
28 posts
12.8 Years
Anybody know how to make an overworld sprite/npc blink before disappearing? I'm thinking of the reverse of how Keckleon (or however you spell it) appears in R/S/E.

Also, if anyone knows where to change the map that the opening points to, where you start out, that would be great as well.

PiaCRT

Dragon Slave!!!

Age 27
Male
Pummelo Island
Seen 3 Days Ago
Posted April 10th, 2023
923 posts
12.8 Years
hmm...when I write the player's name as [PLAYER] it ends up a PLAYERR. Is that meant to be Pokescript?

colcolstyles

Yours truly

Male
The Bay Area
Seen May 18th, 2019
Posted August 13th, 2012
1,588 posts
15 Years
hmm...when I write the player's name as [PLAYER] it ends up a PLAYERR. Is that meant to be Pokescript?
If it shows up as "PLAYERR", then you probably accidentally typed "[PLAYERR]" into XSE. Try removing that second 'R'.

Brother of Vrai
Male
Seen July 19th, 2011
Posted September 3rd, 2010
6 posts
12.7 Years
Hello, I'm new here, and literally just got into this a couple of days ago. I've been looking around at some tutorials and stuff, especially for scripting, and this tutorial was very helpful. I have a question about a script in my game's first town.

This is my script:
Spoiler:

'---------------
#org 0x800800
lock
faceplayer
checkflag 0x7
if 0x1 goto 0x8800819
msgbox 0x8800824 MSG_NORMAL '"You see that documentary on TV,\n[..."
setflag 0x7
release
end

'---------------
#org 0x800819
msgbox 0x880091C MSG_NORMAL '"Good luck, [player]. Have fun, and..."
release
end


'---------
' Strings
'---------
#org 0x800824
= You see that documentary on TV,\n[player]?\p...\pI was on that ship when it went\ndown. JIRACHI saved my life.\lPeople think I'm crazy to say\lthat, but I know what it was. If\lyou're going traveling, [player], maybe\lyou can help me prove that JIRACHI\llives here.

#org 0x80091C
= Good luck, [player]. Have fun, and\ntreat your Pokémon well!


This script is used when the player is talking to their father, and I want him to say the first part the first time the player talks to him. Every time after, the second part should be said.

It works alright except that when you exit and re-enter the house, the flag is reset, so he tells you the bit about Jirachi again. How can I make it so that he tells you this once, then switches to the good luck message for the rest of the game rather than just until you leave the house?

I've looked at the scripts for other events in game that only happen once for clues, but can't find anything. I also tried to search for it, but can't find anything. I'm sure it's something stupid that I just can't find, but there will likely be a lot of one-time only events in my game and I need to know how to make the flags stick.. so any help would be appreciated, please and thank you.

colcolstyles

Yours truly

Male
The Bay Area
Seen May 18th, 2019
Posted August 13th, 2012
1,588 posts
15 Years
If I had to guess, I'd say that the problem occurs because of the flag that you are using. I'm not 100% sure about 0x7 but I know that flags like 0x12 are cleared upon changing maps. This is because they are assigned to Cut trees and Rock Smash rocks. If you use a different flag (I think one in the 0x200s will do), it should work as intended.

Brother of Vrai