• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.

Tannecho51

Pokemon Lion's Eye
11
Posts
13
Years
The pokémon that is displayed on the nicknaming screen is dependent on the value stored in variable '0x8004'. Try inserting this right before calling the nicknaming function:

Code:
countpokemon
subvar LASTRESULT 0x1
copyvar 0x8004 LASTRESULT

How would you do that for Ruby?

Also, sort of bumping my last post.

How come the applymovements in the script below don't work? Something I've noted is that one of the person events disappears and the person I'm trying to move's picture is reset to the hero. I have 300 and 4050 in the script box.
The script:
Spoiler:
 

Doom Chaos

I don't have a title
44
Posts
15
Years
Gonna need some help with a script. I want an NPC to give a Pikachu in the player's (empty) party and I want to give around 30 other Pokémon to the PC Box 1. Is there any way I can only give one Pokémon directly while all the others are in the PC Box or do I HAVE to give the player 5 other Pokémon along with Pikachu to work??
 

colcolstyles

Yours truly
1,588
Posts
15
Years
How would you do that for Ruby?

Ruby's nicknaming special works in the same way (in the sense that it uses variable '0x8004'). So that code should work in Ruby as well.

Gonna need some help with a script. I want an NPC to give a Pikachu in the player's (empty) party and I want to give around 30 other Pokémon to the PC Box 1. Is there any way I can only give one Pokémon directly while all the others are in the PC Box or do I HAVE to give the player 5 other Pokémon along with Pikachu to work??

That I know of, there is no "give pokémon to the box" command. I guess you might want to give the player the Pikachu and five other "filler" pokémon. Then you can use 'givepokemon' to put pokémon into the Boxes. When you're done with that, you should use HackMew's take-away-pokémon code to remove the five filler pokémon.
 

Tannecho51

Pokemon Lion's Eye
11
Posts
13
Years
Didn't work for me. Possibly because I tried to name the first pokemon in the party. How would you do that? (still Ruby)
I mean giving a pokemon and nicknaming it in the same script.
 
Last edited:

wingman11

Solo Runner
205
Posts
14
Years
I'm having very odd problems with my script. It is a level script, and I have it going as the very first thing that happens in the game. It's supposed to be a video chat with the professor of the region and when you get your first Pokémon. It works perfectly through the whole thing (although when nicknaming either Treecko or Totodile it shows a ? instead of the correct sprite and says "?'s nickname?"), but at the end, a number of strange things happen. The oddest is that it's never the same thing. Sometimes the character is just frozen and I can't do anything, sometimes I get a repeating line of "qáF", and sometimes it gives me random items, then freezes the character. I've tried opening the map script offset in XSE, but it is blank, even when I check on the Level Script box. At this point, I'm desperate.

Here is the script in question:
Spoiler:


If anyone has any idea on how to fix this, please help. I'd really appreciate it.
 

Teh Blazer

Divider of Zero
776
Posts
15
Years
This script is frustrating me, in the sense that I can't get it to activate. Every time I step on the tile, it doesn't do anything. Here's the script:
Spoiler:
And the things on AdvanceMap:
Spoiler:
 

colcolstyles

Yours truly
1,588
Posts
15
Years
Didn't work for me. Possibly because I tried to name the first pokemon in the party. How would you do that? (still Ruby)
I mean giving a pokemon and nicknaming it in the same script.

The pokémon in the party that the nicknaming special uses is dependent on the value in 0x8004. If it's 0x0, then it'll nickname the first pokémon. If it's 0x1, it'll nickname the second pokémon and so on, so forth.
 

Zeffy

g'day
6,402
Posts
15
Years
  • Age 27
  • Seen Feb 7, 2024
This script is frustrating me, in the sense that I can't get it to activate. Every time I step on the tile, it doesn't do anything. Here's the script:
Spoiler:
And the things on AdvanceMap:
Spoiler:
Have you not considered that you don't have any "end" command in your script?
 

MidnightRave

Working on Pokemon Flare!
5
Posts
13
Years
  • Seen Jul 9, 2014
I need some scripting help, I really want to learn. But reading tutorials that are long often make me forget about most information.
I'm also a more of a hand on learner, I basically need a teacher.

Is anyone willing to be my tutor?
 

theschmizz393

Cleffas will rule!
45
Posts
16
Years
Hey, so I'm stuck on an XSE script. I'm trying to make it so after an event, the people disappear, but when I come back, they still are there. I added a flag so that when I step on the trigger tile, nothing happens, but the people I want to disappear are still there when I come back.

Here is the (compressed) script:
Spoiler:


Thanks!
 
Last edited:

Tannecho51

Pokemon Lion's Eye
11
Posts
13
Years
Hey, so I'm stuck on an XSE script. I'm trying to make it so after an event, the people disappear, but when I come back, they still are there. I added a flag so that when I step on the trigger tile, nothing happens, but the people I want to disappear are still there when I come back.

Here is the (compressed) script:
Spoiler:


Thanks!

Did you try setting the person's Person ID to the flag you're using?

And @colcolstyles, I tried using this code to nickname the pokemon:
__________
#org @naming
fadescreen 0x1
setvar 0x8004 0x0
special 0x166
waitstate
return
___________
It was the first pokemon in the party and it had just been given. It didn't work. What should I do? Should I maybe make the naming a separate script?
 

colcolstyles

Yours truly
1,588
Posts
15
Years
And @colcolstyles, I tried using this code to nickname the pokemon:
__________
#org @naming
fadescreen 0x1
setvar 0x8004 0x0
special 0x166
waitstate
return
___________
It was the first pokemon in the party and it had just been given. It didn't work. What should I do? Should I maybe make the naming a separate script?

I don't know what the special for nicknaming pokémon in Ruby is so you'll just have to observe a preexisting script to figure out how to do it.
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
I need some scripting help, I really want to learn. But reading tutorials that are long often make me forget about most information.
I'm also a more of a hand on learner, I basically need a teacher.

Is anyone willing to be my tutor?

I don't think anyone is willing to be your tutor anytime soon.
With that fact, you can achieve nothing while you are waiting for that certain someone.
Thus, you need to start to learn by yourself.
Scripting may be difficult to learn if you are trying to read and understand an already advance way of scripting.
You need to start from the basic.
 

theschmizz393

Cleffas will rule!
45
Posts
16
Years
Did you try setting the person's Person ID to the flag you're using?

And @colcolstyles, I tried using this code to nickname the pokemon:
__________
#org @naming
fadescreen 0x1
setvar 0x8004 0x0
special 0x166
waitstate
return
___________
It was the first pokemon in the party and it had just been given. It didn't work. What should I do? Should I maybe make the naming a separate script?

I don't think I did, could you give me a quick description of how to do that?
 
2
Posts
13
Years
  • Seen Jun 19, 2012
I have a script that isn't quite working for me.

What I want is to have the script represent the event of picking a starter pokemon (like in any pokemon game).

The game I am hacking is Pokemon Ruby and I have the following script but my problem is that the pokeball won't disappear until I leave the screen then come back. I want it to disappear after it is chosen.

#org $script
lock
faceplayer
checkflag 0x1200

message $question
$question 1 = Would you like Leafeon?
boxset 5
compare 0x800D 0x0001
if 0x01 goto $yes
message $no
$no 1 = Choose wisely!
boxset 6
release
end

#org $yes
message $yes1
$yes1 1 = You received a Leafeon!
boxset 6
givepokemon 161 5 0x00
setmaptile 0x08 0x04 0x0211 0x0
special 0x8E
setflag 0x1200
setflag 0x1201
release
end

Can anyone help me figure out the problem?
 

Bolens

Soul Hacker
359
Posts
14
Years
  • Age 30
  • PA
  • Seen Aug 22, 2016
Code:
#dyn 0x740000
#org @start
checkflag 0x282
if false jump @end
checkflag 0x283
if true jump @end1
lock
disappear 0x3
disappear 0x4
disappear 0x5
reappear 0x3
reappear 0x4
reappear 0x5
setvar 0x8004 0x3
setvar 0x8005 12
setvar 0x8006 12
setvar 0x8007 3
special 0x136
waitspecial
msgbox @talk
callstd MSG_NORMAL
applymovement PLAYER @move
pauseevent 0x0
applymovement 0x5 @move1
pauseevent 0x0
msgbox @2
callstd MSG_NORMAL
message @healmsg
showmsg
waitbutton
fadescreen 1
closemsg
special 0
fadescreen 0
msgbox @bettermsg
callstd MSG_NORMAL
trainerbattle 0x1 0x15D 0x0 @intro @defeat @1

#org @end
release
end

#org @end1
release
end

#org @1
msgbox @talk1
callstd MSG_NORMAL
fadescreen 1
disappear 0x3
disappear 0x4
disappear 0x5
setflag 0x283
fadescreen 0
release
end

#org @healmsg
= Your POKéMON look tired[.]\nYou should give them a rest.

#org @bettermsg
= There. All better now!

#org @2
= To make it a fair competion for\nthe boss match, your Pokemon will\lbe healed.

#org @intro
= Well, you finally caught me in the\nact. I learned that this statue\lheld a key to an immense power,\land now I have come for it. The\learthquake you felt earlier was\ljust a bomb going off. enough\ltalk, now die!

#org @defeat
= Darn you, you always best me!

#org @talk
= Woah... an earthquake? I must go\ninvestigate!

#org @move
m run_right run_right run_right run_right run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_down run_right run_right run_right run_right run_right run_right run_right run_up say_!! end

#org @move1
m look_down say_! end

#org @talk1
= No matter, I still got the key I\nwas looking for. The power will\lsoon be all mine, I will be\lunstoppable. Until next time, Team\lRaven, let's move on out!
Whenever I insert this into ROM it inserts fine, but upon playing game, when reaching map where this script is used in, the game resets itself. Any help would be most appreciated, kinda stumped on this one. :\ BTW, using PKSV, thanks.
 

Tannecho51

Pokemon Lion's Eye
11
Posts
13
Years
I don't think I did, could you give me a quick description of how to do that?

Go to the map in Advance Map. Click on the person you're trying to move. 2 boxes above the "open script" button, there should be a box that says "Person ID" to the right and contains the number "0000." Replace this number with the flag you're using (which I think for you would be 1202). That should make the person completely dissappear.

Also, dstewart, I have 3 suggestions for you that may or may not work:
1. Instead of using setmaptile, try using hidesprite.
2. I don't know if that's a command for Pokescript, so try switching to XSE.
3. Set the Person ID to the flag you're using.
 
Last edited:
5
Posts
13
Years
  • Seen Dec 1, 2010
Game: FireRed
Type: Trigger
Editor: XSE
Script:
Spoiler:

What im trying to do is have it when you step on a tile a rocket guy walks up to you and then tells you to get out of the way, and walks away. and after all that i want him to disappear for good, so i put the flag 2340 as the sprites id in advance map. but what happens is that whenever you step on the tile the game just freezes.
 

mervyn797

What? I'm right here. >D
1,696
Posts
15
Years
  • Seen Nov 28, 2011
Game: FireRed
Type: Trigger
Editor: XSE
Script:
Spoiler:

What im trying to do is have it when you step on a tile a rocket guy walks up to you and then tells you to get out of the way, and walks away. and after all that i want him to disappear for good, so i put the flag 2340 as the sprites id in advance map. but what happens is that whenever you step on the tile the game just freezes.
You need to put in lockall command as well.
I've corrected it for you,
Spoiler:
 
Last edited:
Status
Not open for further replies.
Back
Top