Script Help Thread (DO NOT REQUEST SCRIPTS) Page 383

Started by HackMew December 20th, 2008 5:10 AM
  • 625717 views
  • 9682 replies

Kurapika

Male
Lavendar Town
Seen 16 Hours Ago
Posted April 6th, 2023
943 posts
10.3 Years
The thing is that i want to edit the current TV scripts.
It's easy to do. Which rom is it?
G3T - GEN 3 TOOLS ( Windows / Android )


Renegade

Time for real life...

Male
United States
Seen January 8th, 2015
Posted December 31st, 2014
995 posts
11.5 Years
Hello, Interwebers...~

I'm having a weird problem here:
message @t8 6
special 0x113
hidesprite 0xFF
pause 0x20
showsprite 0xFF
pause 0x20
hidesprite 0xFF
pause 0x20
showsprite 0xFF
fadescreen 0x1
pause 0x20
fadescreen 0x0
message @t9 6
This is just a small part of a script. The problem here is that in game, when the player sprite is supposed to disappear then reappear a few times, he only disappears once and then never reappears at all after that. Any idea why this might be happening? Btw, after he disappears once, the game takes some time (as if it were executing the showsprite commands) and then continues with the script with the player's sprite gone.
Male
Seen September 8th, 2014
Posted April 2nd, 2014
2 posts
9.5 Years
Hey guys, Im pretty new at scripting and all, so Im trying to make a person that sells specific items (Sun stones and Moon stones). I put the code in, and it worked great, except that even though i changed the items to be sold, it still sold the Pokeball, Potion, Antidote, and Parlyz heal. Can anyone see what im doing wrong? Or is it the fact that I pulled the script off of the Veridian City pokemart vendor?

My version:
Spoiler:
#dynamic 0x8053B0

#org @start
lock
faceplayer
special 0x187
compare 0x800D 0x2
if 0x1 goto @snippet2
preparemsg @string1 '"Hi, there!\nMay I help you?"
waitmsg
pokemart @mart1
msgbox @string2 0x4 '"Please come again!"
release
end

#org @snippet2
release
end

#org @string1
= Hi, there!\nMay I help you?

#org @string2
= Please come again!

#org @mart1
#raw word 0x5E
#raw word 0x5D
#raw word 0x0


Normal Version:
Spoiler:
#org @start
lock
faceplayer
compare 0x4057 0x1
if 0x1 goto @snippet1
special 0x187
compare 0x800D 0x2
if 0x1 goto @snippet2
preparemsg @string1 '"Hi, there!\nMay I help you?"
waitmsg
pokemart @mart1
msgbox @string2 0x4 '"Please come again!"
release
end

#org @snippet1
msgbox @string3 0x4 '"Okay, thanks! Please say hi to\nPR..."
release
end

#org @snippet2
release
end

#org @string1
= Hi, there!\nMay I help you?

#org @string2
= Please come again!

#org @string3
= Okay, thanks! Please say hi to\nPROF. OAK for me, too.

#org @mart1
#raw word 0x4
#raw word 0xD
#raw word 0xE
#raw word 0x12
#raw word 0x0
Male
Seen September 29th, 2016
Posted April 2nd, 2014
12 posts
9.2 Years
In my game you get three starter Pokemon. On your way out, your rival battles you. However, when you switch out a Pokemon, that Pokemon's battle sprite does not appear. I am using trainerbattle 0x9 ; but I don't know what's up. Here's my script:

Spoiler:
#dynamic 0x800000

#org @start
lockall
compare 0x4052 0x2
if 0x1 goto @start2
releaseall
end

#org @start2
compare 0x4050 0x5
if 0x1 goto @shroomishscyther
compare 0x4050 0x6
if 0x1 goto @shroomishscraggy
compare 0x4050 0x7
if 0x1 goto @houndourscyther
compare 0x4050 0x8
if 0x1 goto @houndourscraggy
releaseall
end

#org @shroomishscyther
sound 0x15
applymovement 0x7 @walk1
waitmovement 0x7
msgbox @talk1 0x6
sound 0x15
applymovement 0xFF @walk4
waitmovement 0xFF
playsong 0x13B 0x0
applymovement 0x7 @walk2
waitmovement 0x7
msgbox @talk2 0x6
trainerbattle 0x9 0x148 0x3 @win @lose
special 0x0
playsong 0x13C 0x0
msgbox @afterbattle 0x6
applymovement 0x7 @leave
waitmovement 0x7
hidesprite 0x7
sound 0x9
fadedefault
setvar 0x4055 0x1
setflag 0x258
releaseall
end

#org @houndourscraggy
sound 0x15
applymovement 0x7 @walk1
waitmovement 0x7
msgbox @talk1 0x6
sound 0x15
applymovement 0xFF @walk4
waitmovement 0xFF
playsong 0x13B 0x0
applymovement 0x7 @walk2
waitmovement 0x7
msgbox @talk2 0x6
trainerbattle 0x9 0x145 0x3 @win @lose
special 0x0
playsong 0x13C 0x0
msgbox @afterbattle 0x6
applymovement 0x7 @leave
waitmovement 0x7
hidesprite 0x7
sound 0x9
fadedefault
setvar 0x4055 0x1
setflag 0x258
releaseall
end


#org @shroomishscraggy
sound 0x15
applymovement 0x7 @walk1
waitmovement 0x7
msgbox @talk1 0x6
sound 0x15
applymovement 0xFF @walk4
waitmovement 0xFF
playsong 0x13B 0x0
applymovement 0x7 @walk3
waitmovement 0x7
msgbox @talk2 0x6
trainerbattle 0x9 0x147 0x3 @win @lose
special 0x0
playsong 0x13C 0x0
msgbox @afterbattle 0x6
applymovement 0x7 @leave
waitmovement 0x7
hidesprite 0x7
sound 0x9
fadedefault
setvar 0x4055 0x1
setflag 0x258
releaseall
end

#org @houndourscyther
sound 0x15
applymovement 0x7 @walk1
waitmovement 0x7
msgbox @talk1 0x6
sound 0x15
applymovement 0xFF @walk4
waitmovement 0xFF
playsong 0x13B 0x0
applymovement 0x7 @walk3
waitmovement 0x7
msgbox @talk2 0x6
trainerbattle 0x9 0x146 0x3 @win @lose
special 0x0
playsong 0x13C 0x0
msgbox @afterbattle 0x6
applymovement 0x7 @leave
waitmovement 0x7
hidesprite 0x7
sound 0x9
fadedefault
setvar 0x4055 0x1
setflag 0x258
releaseall
end

#org @talk1
= [blue_fr][rival]: Wait [player]!

#org @talk2
= [blue_fr][rival]: Let me defeat you in a\nbattle before you leave!

#org @win
= [rival]: No way, I lost?!

#org @lose
= [rival]: I'm not surprised that I\nwon!

#org @afterbattle
= [blue_fr][rival]: Good battle [player], but that was\njust a small taste of what's to\lcome!\pI'll see you later, I've got\nbetter things to do than talk to\lyou.

#org @walk1
#raw 0x62
#raw 0x0
#raw 0xFE

#org @walk2
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x10
#raw 0x10
#raw 0xFE

#org @walk3
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x10
#raw 0x10
#raw 0xFE

#org @walk4
#raw 0x62
#raw 0x1
#raw 0xFE

#org @leave
#raw 0x12
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE
Male
Seen April 22nd, 2014
Posted April 4th, 2014
7 posts
9.1 Years
So, what I want to do is making four people walk the same path together until they go so far you can't see them on the screen, then they disappear. The only problem is that as soon as I move they respawn back in the starting place. The "msgbox" commands are there to check if there's a problem between the other commands:
Spoiler:
'---------------
#dynamic 0x37F7AC

#org @start
lock
faceplayer
msgbox @1 0x6
applymovement 0x01 @move
applymovement 0x02 @move
applymovement 0x03 @move
applymovement 0x04 @move
msgbox @2 0x6
applymovement 0x01 @move2
applymovement 0x02 @move2
applymovement 0x03 @move2
applymovement 0x04 @move2
hidesprite 0x01
hidesprite 0x02
hidesprite 0x03
hidesprite 0x04
release
end

#org @done
release
end

#org @move
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08

#org @move2
#raw 0xFE

#org @1
= Sample1

#org @2
= Sample2


EDIT: This is the part in the "On entering map/on menu close" script:
Spoiler:
'---------------
#dynamic 0x37FAA6

#org @1
checkflag 0x200
if 0x1 goto @done
end

#org @done
hidesprite 0x1
hidesprite 0x2
hidesprite 0x3
hidesprite 0x4
end
Male
Seen September 8th, 2014
Posted April 2nd, 2014
2 posts
9.5 Years
So, what I want to do is making four people walk the same path together until they go so far you can't see them on the screen, then they disappear. The only problem is that as soon as I move they respawn back in the starting place.
Now, Im no expert, but perhaps it would work if you removed the hidesprite commands in the 2nd spoiler. Try just making the checkflag in the first part of the code, and dont use the second half. It may be that the "hidesprite" is just being toggled, and thats why they are respawning.

Joexv

ManMadeOfGouda
joexv.github.io

Age 25
Male
Oregon
Seen January 26th, 2023
Posted April 8th, 2022
1,035 posts
10.6 Years
So, what I want to do is making four people walk the same path together until they go so far you can't see them on the screen, then they disappear. The only problem is that as soon as I move they respawn back in the starting place. The "msgbox" commands are there to check if there's a problem between the other commands:
Spoiler:
'---------------
#dynamic 0x37F7AC

#org @start
lock
faceplayer
msgbox @1 0x6
applymovement 0x01 @move
applymovement 0x02 @move
applymovement 0x03 @move
applymovement 0x04 @move
msgbox @2 0x6
applymovement 0x01 @move2
applymovement 0x02 @move2
applymovement 0x03 @move2
applymovement 0x04 @move2
hidesprite 0x01
hidesprite 0x02
hidesprite 0x03
hidesprite 0x04
release
end

#org @done
release
end

#org @move
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08

#org @move2
#raw 0xFE

#org @1
= Sample1

#org @2
= Sample2


EDIT: This is the part in the "On entering map/on menu close" script:
Spoiler:
'---------------
#dynamic 0x37FAA6

#org @1
checkflag 0x200
if 0x1 goto @done
end

#org @done
hidesprite 0x1
hidesprite 0x2
hidesprite 0x3
hidesprite 0x4
end
You have to put a setflag script right after the hidesprites.
Then in a-map put the flag you used and type it into all 4 of the person id.
Once you put the setflag you can get rid of the level script.
New living flesh vessel who dis?

CyanCerulean

Adorables

Male
Coloradder
Seen April 12th, 2015
Posted August 13th, 2014
56 posts
9.2 Years
Okay, so here's my problem: This whole script works perfectly fine, I mean, it's not exactly complicated, but it looks like it never sets the flag to warp you into the ship... any help appreciated!
Spoiler:
#dynamic 0x74009B
#org @start
checkflag 0x1000
if 0x1 goto @done
checkgender
compare 0x800D 0x0
if 0x1 goto @solar
compare 0x800D 0x1
if 0x1 goto @arial
setflag 0x1000
end

#org @solar
msgbox @1 0x3
msgbox @3 0x4
closeonkeypress
end

#org @arial
msgbox @2 0x3
msgbox @3 0x4
closeonkeypress
end

#org @done
warp 0x1 0x5 0x7 0x0 0x0
end

#org @1
= Hello! Welcome aboard the U.S.S.\nFirefly!\pYou may have noticed that your\lPOK\h1BMON have disappeared!\pWell, there is a\lvery good reason for this. We\lare TEAM SOLAR, and we have\lstolen your POK\h1BMON!\pWe hope you won't miss them,\lthank you for your donation!

#org @2
= Hello! Welcome aboard the U.S.S.\nFirefly!\pYou may have noticed that your\lPOK\h1BMON have disappeared!\pWell, there is a\lvery good reason for this. We\lare TEAM ARIAL, and we have\lstolen your POK\h1BMON!\pWe hope you won't miss them,\lthank you for your donation!

#org @3
= What?!?\pThey stole my POK\hB1MON?\lI can't believe this!\lI guess I'll have to hope that\lthere are some POK\hB1MON on board\lthat I can borrow until I get my\lold ones back.
Tom Baker was the best one.


ROM Hacks I've worked on:

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
Okay, so here's my problem: This whole script works perfectly fine, I mean, it's not exactly complicated, but it looks like it never sets the flag to warp you into the ship... any help appreciated!
Spoiler:
#dynamic 0x74009B
#org @start
checkflag 0x1000
if 0x1 goto @done
checkgender
compare 0x800D 0x0
if 0x1 goto @solar
compare 0x800D 0x1
if 0x1 goto @arial
setflag 0x1000
end

#org @solar
msgbox @1 0x3
msgbox @3 0x4
closeonkeypress
end

#org @arial
msgbox @2 0x3
msgbox @3 0x4
closeonkeypress
end

#org @done
warp 0x1 0x5 0x7 0x0 0x0
end

#org @1
= Hello! Welcome aboard the U.S.S.\nFirefly!\pYou may have noticed that your\lPOK\h1BMON have disappeared!\pWell, there is a\lvery good reason for this. We\lare TEAM SOLAR, and we have\lstolen your POK\h1BMON!\pWe hope you won't miss them,\lthank you for your donation!

#org @2
= Hello! Welcome aboard the U.S.S.\nFirefly!\pYou may have noticed that your\lPOK\h1BMON have disappeared!\pWell, there is a\lvery good reason for this. We\lare TEAM ARIAL, and we have\lstolen your POK\h1BMON!\pWe hope you won't miss them,\lthank you for your donation!

#org @3
= What?!?\pThey stole my POK\hB1MON?\lI can't believe this!\lI guess I'll have to hope that\lthere are some POK\hB1MON on board\lthat I can borrow until I get my\lold ones back.
That is because your script jumped to the other addresses of your code. Your script is unable to reach your "setflag" command because you used "goto", meaning, it'll not return anymore.
I suggest you try this one...

#dynamic 0x74009B
#org @start
checkflag 0x1000
if 0x1 goto @done
checkgender
compare 0x800D 0x0
if 0x1 call @solar
compare 0x800D 0x1
if 0x1 call @arial
setflag 0x1000
end

#org @solar
msgbox @1 0x3
msgbox @3 0x4
closeonkeypress
return

#org @arial
msgbox @2 0x3
msgbox @3 0x4
closeonkeypress
return

#org @done
warp 0x1 0x5 0x7 0x0 0x0
end

#org @1
= Hello! Welcome aboard the U.S.S.\nFirefly!\pYou may have noticed that your\lPOK\h1BMON have disappeared!\pWell, there is a\lvery good reason for this. We\lare TEAM SOLAR, and we have\lstolen your POK\h1BMON!\pWe hope you won't miss them,\lthank you for your donation!

#org @2
= Hello! Welcome aboard the U.S.S.\nFirefly!\pYou may have noticed that your\lPOK\h1BMON have disappeared!\pWell, there is a\lvery good reason for this. We\lare TEAM ARIAL, and we have\lstolen your POK\h1BMON!\pWe hope you won't miss them,\lthank you for your donation!

#org @3
= What?!?\pThey stole my POK\hB1MON?\lI can't believe this!\lI guess I'll have to hope that\lthere are some POK\hB1MON on board\lthat I can borrow until I get my\lold ones back.

CyanCerulean

Adorables

Male
Coloradder
Seen April 12th, 2015
Posted August 13th, 2014
56 posts
9.2 Years
That is because your script jumped to the other addresses of your code. Your script is unable to reach your "setflag" command because you used "goto", meaning, it'll not return anymore.
I suggest you try this one
thank you!^^ I knew I must have been missing something!
Tom Baker was the best one.


ROM Hacks I've worked on:

Male
Seen April 22nd, 2014
Posted April 4th, 2014
7 posts
9.1 Years
You have to put a setflag script right after the hidesprites.
Then in a-map put the flag you used and type it into all 4 of the person id.
Once you put the setflag you can get rid of the level script.
About the setflag command, I accidentally pasted the un-edited script in which I didn't put checkflag and setflag (you can se a random #org @done which was the label I needed for when the flag was set).
And it looks like the problem was that I didn't type the flag into the person IDs. Thank you!
Male
Seen October 18th, 2014
Posted October 17th, 2014
55 posts
9.2 Years
So I made this script today, a basic item giveaway. Long story short, after some item managing, I'm going to have mega stones. Can anybody check my work to see if I made a mistake or not? Or to see if I can shorten this up? Here's my first draft:

#dynamic 0x[offset]

#org @start
lock
faceplayer
checkflag 0x[flag]
msgbox @starters
compare 0x800D 0x1
if 0x1 goto @yes
compare 0x800D 0x0
if 0x0 goto @who
end

#org @yes
msgbox @bulba 0x5
compare 0x800D 0x1
if 0x1 goto @yes1
compare 0x800D 0x0
if 0x0 goto @no1
end

#org @yes1
msgbox @bulba1 0x6
giveitem 0x[item1] 0x1 0x0
release
end

#org @no1
msgbox @char 0x5
compare 0x800D 0x1
if 0x1 goto @yes2
compare 0x800D 0x0
if 0x0 goto @no2

#org @yes2
msgbox @char1 0x6
compare 0x800D 0x1
if 0x1 goto @yes3
compare 0x800D 0x0
if 0x0 goto @no3

#org @yes3
msgbox @charX 0x6
giveitem 0x[item2X] 0x1 0x0
release
end

#org @no3
msgbox @charY 0x6
giveitem 0x[item2Y] 0x1 0x0
release
end

#org @no2
msgbox @squir 0x5
compare 0x800D 0x1
if 0x1 goto @yes3
compare 0x800D 0x0
if 0x0 goto @no3

#org @yes3
msgbox @squir1 0x6
giveitem 0x[item3] 0x1 0x0
release
end

#org @no3
msgbox @who 0x6
release
end

#org @starters
= Would you tell me who your starter was?

#org @bulba
= Was Bulbasaur your starter?

#org @bulba1
= Have fun with that Venusaurite!

#org @char
= No? So you chose Charmander?

#org @charX
= Do you want a Charizardite X?

#org @charY
= Do you want a Charizardite Y?

#org @char1
= Have fun with that Charizardite!

#org @squir
= No? So you chose Squirtle?

#org @squir1
= Have fun with that Blastoisite!

#org @who
= You’re not going to tell me your starter? Shame on you!

Teh Blazer

Divider of Zero

Age 27
Male
'MERICA
Seen January 18th, 2019
Posted June 19th, 2018
776 posts
14.3 Years
So I made this script today, a basic item giveaway. Long story short, after some item managing, I'm going to have mega stones. Can anybody check my work to see if I made a mistake or not? Or to see if I can shorten this up? Here's my first draft:
I think you could actually do quote a bit to clean it up, but it's by no means a bad script. But here are some ideas:

-You could move the "msgbox @starters" to before the checkflag.
-You need a place to go to after you check the flag in the beginning.
-You don't need the "compare 0x800D 0x0/if 0x0 goto @no1" because if you say yes, the game will just go to the next command and instead of creating an entire new command, since no is the only other option you can just use the "goto" command and save one whole line.
-You forgot the "setflag" command to make sure the player can't loop the script forever.
-And there's no way to check that the player actually got [insert starter here] as their starter and nothing in your script refrains them from getting a Venesaurite when they chose Squirtle as their starter. A remedy for this would be to set a var when they receive their pokemon in the beginning and then check for that var in this script to confirm that the var is the same as the starter they claim to have. If you're clever enough, you only need one var to do it all. :P
Being a hero is overrated anyways
Male
Seen January 29th, 2017
Posted August 22nd, 2016
10 posts
9.2 Years
My friends and I are making our first hack (FireRed base), and we need to edit the speeches the Gym Leaders give when you talk to them.
However, the scripts refuse to compile, picking up something that probably shouldn't be an error as an error, usually a "Type Mismatch" involving "compare"

We're using XSE and only editing what they say.

I apologize if this is a really basic problem, but I've gone through a couple tutorials and failed to find a solution. Thanks for any help!

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
My friends and I are making our first hack (FireRed base), and we need to edit the speeches the Gym Leaders give when you talk to them.
However, the scripts refuse to compile, picking up something that probably shouldn't be an error as an error, usually a "Type Mismatch" involving "compare"

We're using XSE and only editing what they say.

I apologize if this is a really basic problem, but I've gone through a couple tutorials and failed to find a solution. Thanks for any help!
Post your script here so we can see what is wrong.
Wrap your script around the [CODE][/CODE] tags as well.

Male
Seen October 18th, 2014
Posted October 17th, 2014
55 posts
9.2 Years
My friends and I are making our first hack (FireRed base), and we need to edit the speeches the Gym Leaders give when you talk to them.
However, the scripts refuse to compile, picking up something that probably shouldn't be an error as an error, usually a "Type Mismatch" involving "compare"

We're using XSE and only editing what they say.

I apologize if this is a really basic problem, but I've gone through a couple tutorials and failed to find a solution. Thanks for any help!
Well if you're only editing the text and nothing else, you should use A-Text. It's a lot less complicated than doing the XSE method, plus it tells you when the in-game text box ends.
Male
Seen October 18th, 2014
Posted October 17th, 2014
55 posts
9.2 Years
I think you could actually do quote a bit to clean it up, but it's by no means a bad script. But here are some ideas:

-You could move the "msgbox @starters" to before the checkflag.
-You need a place to go to after you check the flag in the beginning.
-You don't need the "compare 0x800D 0x0/if 0x0 goto @no1" because if you say yes, the game will just go to the next command and instead of creating an entire new command, since no is the only other option you can just use the "goto" command and save one whole line.
-You forgot the "setflag" command to make sure the player can't loop the script forever.
-And there's no way to check that the player actually got [insert starter here] as their starter and nothing in your script refrains them from getting a Venesaurite when they chose Squirtle as their starter. A remedy for this would be to set a var when they receive their pokemon in the beginning and then check for that var in this script to confirm that the var is the same as the starter they claim to have. If you're clever enough, you only need one var to do it all. :P
This was my first script ever, and you saying that it wasn't bad was really boosting to my confidence in my game. Now onto the serious stuff.

With the first four things you listed, should the opening of the script look like this instead? I changed some stuff to make it less confusing for myself.
#dynamic 0xFFFFFF

#org @start
lock
faceplayer
checkflag 0x1
if 0x1 goto @starters
msgbox @1 0x6
setflag 0x1
release
end
Now for the variable, I haven't figured out to do that yet. Can you give me an example of the "check starter" variable? I'm sure I could adapt that to my own script in no time if I just knew what I was doing. If you wanna see the entire Draft 2 script, with ALOT of changing and it's not fully complete, here it is below:
#dynamic 0xFFFFFF

#org @start
lock
faceplayer
checkflag 0x1
if 0x1 goto @starters
msgbox @1 0x6
setflag 0x1
release
end

#org @starters
msgbox @[talks about starter] 0x6
clearflag 0x1
release
end

#org @item <---That is AFTER it reads the starter and you choose “YES.”
giveitem 0x[item] 0x[amount] MSG_OBTAIN

#org @1
= Mind if I check your starter?
Feel free to add whatever is needed, preferably in a different color, to help check a starter and then give a specific item to specific Pokemon. (Ex. Bulbasaur gets the Miracle Seed, Charmander gets Charcoal, etc.)
Male
Seen April 22nd, 2014
Posted April 4th, 2014
7 posts
9.1 Years
Can you tell me why every time I use applymovement on the main character I can't move him anymore after the end of the animation? For example:
Spoiler:
'---------------
#dynamic 0x6B518C

#org @1
lock
checkflag 0x9
if 0x1 goto @done
msgbox @2 0x4
closeonkeypress
applymovement 0xFF @move
waitmovement 0xFF
applymovement 0xFF @move2
waitmovement 0xFF
release
end

#org @done
release
end

#org @2
= Come back! You still haven't\ntalked with PAUL!

#org @move
#raw 0x09

#org @move2
#raw 0xFE

EDIT: Solved. I don't know why, but looks like multiple waitmovement commands interferred with the script, so I only put one applymovement and one waitmovement like this:
Spoiler:
'---------------
#dynamic 0x6B518C

#org @1
lock
checkflag 0x9
if 0x1 goto @done
msgbox @2 0x4
closeonkeypress
applymovement 0xFF @move
waitmovement 0xFF
release
end

#org @done
release
end

#org @2
= Come back! You still haven't\ntalked with PAUL!

#org @move
#raw 0x09
#raw 0xFE

C me

Creator of Pokemon League Of Legends

Age 26
Male
Seen April 9th, 2021
Posted September 9th, 2018
681 posts
9.3 Years
The following is the script for the Ho-oh battle in pokemon gold. How can I change this so I can have the same script for the other gen 1 and 2 legendaries? What numbers do I change and what are the numbers? I don't want to replace the Ho-oh script by the way.

Thank you for your help

Spoiler:
#org 0x16E913
'-----------------------------------
faceplayer
loadfont
2writetext 0x693B ' 0x16E93B
cry 0xFA
pause 0xF
loadmovesprites
setbit1 0x317
checkver
if true 0x6930 ' 0x16E930
writecode 0x3 0xA
loadpokedata 0xFA 0x28
startbattle
disappear 0x2
returnafterbattle
end

#org 0x16E930
'-----------------------------------
writecode 0x3 0xA
loadpokedata 0xFA 0x46
startbattle
disappear 0x2
returnafterbattle
end


#org 0x16E93B
= Shaoooh!\e



P.S I use PKSV for editing scripts and Translhextion for a lot of stuff.

Teh Blazer

Divider of Zero

Age 27
Male
'MERICA
Seen January 18th, 2019
Posted June 19th, 2018
776 posts
14.3 Years
This was my first script ever, and you saying that it wasn't bad was really boosting to my confidence in my game. Now onto the serious stuff.

With the first four things you listed, should the opening of the script look like this instead? I changed some stuff to make it less confusing for myself.


Now for the variable, I haven't figured out to do that yet. Can you give me an example of the "check starter" variable? I'm sure I could adapt that to my own script in no time if I just knew what I was doing. If you wanna see the entire Draft 2 script, with ALOT of changing and it's not fully complete, here it is below:

Feel free to add whatever is needed, preferably in a different color, to help check a starter and then give a specific item to specific Pokemon. (Ex. Bulbasaur gets the Miracle Seed, Charmander gets Charcoal, etc.)
Well people tend to give less credit than what they're do and your script was waaay better than my first script by far. :P

Before I go into details, I'd like to point you to this thread (http://www.pokecommunity.com/showthread.php?t=302347) as it is very helpful in showing new hackers what flags are safe to use and what flags the game uses beforehand so messing with them would be catastrophic to the game.

Second, I know you know that when you ask a yes or no question, you're going to be using the "msgbox @[blahblah] 0x5" command, not the 0x6 one. Since yo're using the 0x5 command, you know that you're gonna have to be using the "compare 0x800D 0x1/if 0x1 goto @yes" thing for at least one of the answers (if you still don't understand why you don't need it the second time, feel free to ask).

Thirdly, the dynamic at the top is where the game starts to find free space to put your script in and so when you put "dynamic 0xFFFFFF" you're telling XSE to start insterting your script starting at the space "0xFFFFFF" which is at the very end of the ROM. Free space starts at 0x800000 for Fire Red, so you can just use that instead.

Fourthly, you placed the setflag 0x1 so that when you activate the script in-game, the NPC will face you, the game will check that the flag was set and since it wasn't it won't do the "goto", the NPC will ask the question, then the game will set the flag and then the script will end. Then once you talk to the NPC again, it will read the flag that you set and then do the goto, but clearly that's not optimal.

Fifthly, and finally, the setvar for the starters is a bit of a complicated thing because it requires two scripts to get it done, but easy once you see how simple it is. The link I showed you also provided a list of the variables that can be used safely with a few exceptions, so for this demonstration I'll use the first safe var, 4012. Say the player picks a Bulbasaur, then after you do the givepokemon command write "setvar 0x4012 0x1" so now you know that the variable 4012 has been given the number 1 because of the Bulbasaur. If they chose Charmander, then use "setvar 0x4012 0x2" so the number 2 is associated with Charmander. Same with Squirtle, "setvar 0x4012 0x3" right after the givepokemon command and know in your mind that if 4012 is 3 if and only if Squirtle was chosen--as the number would be different for every pokemon.

(Sorry, had to break this into two paragraphs because one big chunk can be daunting to read)
Now right after the NPC asks the player what pokemon they got in your script right now, If the player chooses yes (compare 0x800D 0x1/if 0x1 goto @yes) then at the beginning of your new "org @yes" string put the "compare 0x4012 0x1 (or whatever it is, depending on the pokemon the player claims of having) and the "if 0x0 goto @lying" where the "#org @lying" string is the NPC saying they don't believe the player and ending the script. I know I'm not the best at explaining, so I went ahead and fixed the first part of your script for you, but only for Bulbasaur so you can get a feel.

#dynamic 0xFFFFFF0x800000

#org @start
lock
faceplayer
checkflag 0x1(anything here that is safe on the thread I showed you)
if 0x1 goto @starters@finished
msgbox @1 0x60x5
setflag 0x1
compare 0x800D 0x1
if 0x1 goto @yes

msgbox @no 0x6
release
end

#org @starters@finished
msgbox @[talks about you already got your item] 0x6
clearflag 0x1
release
end

#org @item@yes
giveitem 0x[item] 0x[amount] MSG_OBTAIN
msgbox @bulbasaur 0x5
compare 0x800D 0x1
if 0x1 goto @yesbulba

...(These are the same for
...Charmander and Squirtle)
goto @yes (This makes sure that if the player said no to all of them, the script would loop back to the beginning so they'd have to answer yes sometime)
end

#org @yesbulba
compare 0x4012 0x1
if 0x0 goto @notbulba
giveitem 0x[item] 0x1 MSG_OBTAIN
msgbox @1 0x6
setflag 0x(Whatever flag you plan to use, just make sure it's the same one you check in the beginning)
release
end


#org @notbulba
msgbox @bulbanotstarter 0x6
release
end


#org @1
= Mind if I check your starter?

#org @6
= You’re not going to tell me your starter? Shame on you!


#org @bulbasaur
= Was Bulbasaur your starter?


#org @1
= Enjoy your (insert item here)!


#org @bulbanotstarter
= Wait a second, I don't think Bulbasaur was your starter. Go away! I have no time for liars!
Now this edit combined most of what I was talking about, including the right starter check. Things could be done differently, but hopefully you'll understand through all that chaos. One final note I'd like to leave is that the game won't automatically fit your text into the textboxes and if your line is too long it will just run through the text box and look unprofessional. There is a text box adjuster or something like that in XSE that you can put in your words and it will automatically add in the necessary commands to make the words fit in the box, so I'd recommend using that. As usual, if you have any questions, don't hesitate to respond to this thread! Happy hacking!
Being a hero is overrated anyways
Male
Seen October 18th, 2014
Posted October 17th, 2014
55 posts
9.2 Years
Well people tend to give less credit than what they're do and your script was waaay better than my first script by far. :P

Before I go into details, I'd like to point you to this thread (http://www.pokecommunity.com/showthread.php?t=302347) as it is very helpful in showing new hackers what flags are safe to use and what flags the game uses beforehand so messing with them would be catastrophic to the game.

Second, I know you know that when you ask a yes or no question, you're going to be using the "msgbox @[blahblah] 0x5" command, not the 0x6 one. Since yo're using the 0x5 command, you know that you're gonna have to be using the "compare 0x800D 0x1/if 0x1 goto @yes" thing for at least one of the answers (if you still don't understand why you don't need it the second time, feel free to ask).

Thirdly, the dynamic at the top is where the game starts to find free space to put your script in and so when you put "dynamic 0xFFFFFF" you're telling XSE to start insterting your script starting at the space "0xFFFFFF" which is at the very end of the ROM. Free space starts at 0x800000 for Fire Red, so you can just use that instead.

Fourthly, you placed the setflag 0x1 so that when you activate the script in-game, the NPC will face you, the game will check that the flag was set and since it wasn't it won't do the "goto", the NPC will ask the question, then the game will set the flag and then the script will end. Then once you talk to the NPC again, it will read the flag that you set and then do the goto, but clearly that's not optimal.

Fifthly, and finally, the setvar for the starters is a bit of a complicated thing because it requires two scripts to get it done, but easy once you see how simple it is. The link I showed you also provided a list of the variables that can be used safely with a few exceptions, so for this demonstration I'll use the first safe var, 4012. Say the player picks a Bulbasaur, then after you do the givepokemon command write "setvar 0x4012 0x1" so now you know that the variable 4012 has been given the number 1 because of the Bulbasaur. If they chose Charmander, then use "setvar 0x4012 0x2" so the number 2 is associated with Charmander. Same with Squirtle, "setvar 0x4012 0x3" right after the givepokemon command and know in your mind that if 4012 is 3 if and only if Squirtle was chosen--as the number would be different for every pokemon.

(Sorry, had to break this into two paragraphs because one big chunk can be daunting to read)
Now right after the NPC asks the player what pokemon they got in your script right now, If the player chooses yes (compare 0x800D 0x1/if 0x1 goto @yes) then at the beginning of your new "org @yes" string put the "compare 0x4012 0x1 (or whatever it is, depending on the pokemon the player claims of having) and the "if 0x0 goto @lying" where the "#org @lying" string is the NPC saying they don't believe the player and ending the script. I know I'm not the best at explaining, so I went ahead and fixed the first part of your script for you, but only for Bulbasaur so you can get a feel.



Now this edit combined most of what I was talking about, including the right starter check. Things could be done differently, but hopefully you'll understand through all that chaos. One final note I'd like to leave is that the game won't automatically fit your text into the textboxes and if your line is too long it will just run through the text box and look unprofessional. There is a text box adjuster or something like that in XSE that you can put in your words and it will automatically add in the necessary commands to make the words fit in the box, so I'd recommend using that. As usual, if you have any questions, don't hesitate to respond to this thread! Happy hacking!
Thank you so much for a correct script! So at pointer @yes, do I create multiple versions of them, each being for a different starter?

TheUltimateG.J

Age 24
Male
Bihar,Darbhanga
Seen September 30th, 2014
Posted May 10th, 2014
105 posts
11.6 Years
Hello friends I am making a script such that when i step on a tile my brother[in game] comes and asks me if i m going to start my journey if i say yes it should give me pokeballs if no he will return to his place but when i compile it it says something in a wierd language here is the original script

#dynamic 0x800000

#org @start
lock
checkflag 0x1300 
if 0x1 goto @apologize
applymovement 0x1 @move
waitmovement 0x0
msgbox @are 0x5
compare 0x800D 0x1
if 0x1 goto @yes
compare 0x800D 0x0
if 0x1 goto @no
setflag 0x1300
end

#org @yes
msgbox @yes 0x6
giveitem 0x4 0xA 0x0
msgbox @go 0x6
applymovement 0x1 @moving
waitmovement 0x0
release
end

#org @no
msgbox @no 0x6
applymovement 0x1 @moved
waitmovement 0x0
release
end

#org @apologize
release
end

#org @are
= SAM: Hi bro DAD told me you are\ngoing to start your journey?

#org @blurry
= SAM: Here is a present for you\nthese ten poke'balls will help you\lon your journey.

#org @go
= SAM: I am going now.See you!!!

#org @alien
= SAM: I will be waiting for you\npicking this present.

#org @move
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @moving
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x60
#raw 0x11 
#raw 0xFE

#org @moved
#raw 0xC
#raw 0xC
#raw 0xC
#raw 0xFE
and here is the compiled script

[CODE]

'---------------
#org 0x80045C
lock
checkflag 0x1300
if 0x1 goto 0x88004D1
applymovement 0x1 0x88005C0
waitmovement 0x0
msgbox 0x88004D4 MSG_YESNO '"SAM: Hi bro DAD told me you are\ng..."
compare LASTRESULT 0x1
if 0x1 goto 0x8800493
compare LASTRESULT 0x0
if 0x1 goto 0x88004BC
setflag 0x1300
end

'---------------
#org 0x8004D1
release
end

'---------------
#org 0x800493
msgbox 0x8800493 MSG_NORMAL '"Ô \h93Ç\h80ËÌÉè \h80Ç èÀ\h80\h0A Ì..."
giveitem 0x4 0xA MSG_OBTAIN
msgbox 0x8800568 MSG_NORMAL '"SAM: I am going now.See you!!!"
applymovement 0x1 0x88005C5
waitmovement 0x0
release
end

'---------------
#org 0x8004BC
msgbox 0x88004BC MSG_NORMAL '"Ô BÇ\h80ËÌÉ\h4FÀ RÈ\h80Ë¿ \h6CÁ"
applymovement 0x1 0x88005CC
waitmovement 0x0
release
end


'---------
' Strings
'---------
#org 0x8004D4
= SAM: Hi bro DAD told me you are\ngoing to start your journey?

#org 0x800493
= Ô \h93Ç\h80ËÌÉè \h80Ç èÀ\h80\h0A Ì Ô âÈ\h80ËÌÉ\h4FÀ KÈ\h80Ë¿ \h6CÁ

#org 0x800568
= SAM: I am going now.See you!!!

#org 0x8004BC
= Ô BÇ\h80ËÌÉ\h4FÀ RÈ\h80Ë¿ \h6CÁ


'-----------
' Movements
'-----------
#org 0x8005C0
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements

#org 0x8005C5
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x60 'Hide
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements

#org 0x8005CC
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xFE 'End of Movements

[CODE/]


A lover of Pokemon and their Hacks this is no other than?

Only he can be----->G.J

DaisukE

Just feel it burning ^^

Male
Somewhere in this empty eternity
Seen July 27th, 2017
Posted July 26th, 2017
113 posts
10 Years
Hello friends I am making a script such that when i step on a tile my brother[in game] comes and asks me if i m going to start my journey if i say yes it should give me pokeballs if no he will return to his place but when i compile it it says something in a wierd language here is the original script

#dynamic 0x800000

#org @start
lock
checkflag 0x1300 
if 0x1 goto @apologize
applymovement 0x1 @move
waitmovement 0x0
msgbox @are 0x5
compare 0x800D 0x1
if 0x1 goto @yes
compare 0x800D 0x0
if 0x1 goto @no
setflag 0x1300
end

#org @yes
msgbox @yes 0x6
giveitem 0x4 0xA 0x0
msgbox @go 0x6
applymovement 0x1 @moving
waitmovement 0x0
release
end

#org @no
msgbox @no 0x6
applymovement 0x1 @moved
waitmovement 0x0
release
end

#org @apologize
release
end

#org @are
= SAM: Hi bro DAD told me you are\ngoing to start your journey?

#org @blurry
= SAM: Here is a present for you\nthese ten poke'balls will help you\lon your journey.

#org @go
= SAM: I am going now.See you!!!

#org @alien
= SAM: I will be waiting for you\npicking this present.

#org @move
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @moving
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x60
#raw 0x11 
#raw 0xFE

#org @moved
#raw 0xC
#raw 0xC
#raw 0xC
#raw 0xFE
and here is the compiled script

[CODE]

'---------------
#org 0x80045C
lock
checkflag 0x1300
if 0x1 goto 0x88004D1
applymovement 0x1 0x88005C0
waitmovement 0x0
msgbox 0x88004D4 MSG_YESNO '"SAM: Hi bro DAD told me you are\ng..."
compare LASTRESULT 0x1
if 0x1 goto 0x8800493
compare LASTRESULT 0x0
if 0x1 goto 0x88004BC
setflag 0x1300
end

'---------------
#org 0x8004D1
release
end

'---------------
#org 0x800493
msgbox 0x8800493 MSG_NORMAL '"Ô \h93Ç\h80ËÌÉè \h80Ç èÀ\h80\h0A Ì..."
giveitem 0x4 0xA MSG_OBTAIN
msgbox 0x8800568 MSG_NORMAL '"SAM: I am going now.See you!!!"
applymovement 0x1 0x88005C5
waitmovement 0x0
release
end

'---------------
#org 0x8004BC
msgbox 0x88004BC MSG_NORMAL '"Ô BÇ\h80ËÌÉ\h4FÀ RÈ\h80Ë¿ \h6CÁ"
applymovement 0x1 0x88005CC
waitmovement 0x0
release
end


'---------
' Strings
'---------
#org 0x8004D4
= SAM: Hi bro DAD told me you are\ngoing to start your journey?

#org 0x800493
= Ô \h93Ç\h80ËÌÉè \h80Ç èÀ\h80\h0A Ì Ô âÈ\h80ËÌÉ\h4FÀ KÈ\h80Ë¿ \h6CÁ

#org 0x800568
= SAM: I am going now.See you!!!

#org 0x8004BC
= Ô BÇ\h80ËÌÉ\h4FÀ RÈ\h80Ë¿ \h6CÁ


'-----------
' Movements
'-----------
#org 0x8005C0
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements

#org 0x8005C5
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x60 'Hide
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements

#org 0x8005CC
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xFE 'End of Movements

[CODE/]
how come u use blurry and alien there in your script???And you have kept pointers to two place like of yes there are two pointers......In a script there could never be two pointers at a time.

Your mistakes corrected are in bold


Spoiler:


#dynamic 0x71A3AC

#org @start
lock
checkflag 0x1300
if 0x1 goto @apologize
applymovement 0x1 @move
waitmovement 0x0
msgbox @are 0x5
compare 0x800D 0x1
if 0x1 goto @yes
compare 0x800D 0x0
if 0x1 goto @no
setflag 0x1300
end

#org @yes
msgbox @yes1 0x6
giveitem 0x4 0xA 0x0
msgbox @go 0x6
applymovement 0x1 @moving
waitmovement 0x0
release
end

#org @no
msgbox @no1 0x6
applymovement 0x1 @moved
waitmovement 0x0
release
end

#org @apologize
release
end

#org @are
= SAM: Hi bro DAD told me you are\ngoing to start your journey?

#org @yes1
= SAM: Here is a present for you\nthese ten poke'balls will help you\lon your journey.

#org @go
= SAM: I am going now.See you!!!

#org @no1
= SAM: I will be waiting for you\npicking this present.

#org @move
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @moving
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x60
#raw 0x11
#raw 0xFE

#org @moved
#raw 0xC
#raw 0xC
#raw 0xC
#raw 0xFE


Once again asking do anyone know how to bring those images of both the opponent and player like during the elite four matches....plz help