• 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.
190
Posts
14
Years
  • Seen Apr 14, 2016
hi there im having trouble doing a script like when you first meet processor oak i wanna do something like that can you please help

If you mean the event when he stops you and takes you to his lab, this is a movement script. you have to add a script event in Advance map on the spot where the player will be stopped. then you would use applymovement so that you would follow someone. below is a basic example

Spoiler:


basically i locked the player when he steps on a tile, then you see a msgbox that has oak saying to wait. then we see oak moving to the player. the player turns to face oak. then another msgbox from oak. then by making them both follow @move script, it creates a follow-me script, in which is looks like the player is following other OW.
 
108
Posts
13
Years
  • Seen Mar 31, 2024
'-----------------------
#org 0x1634B8
lockall
textcolor 0x2
msgbox 0x817A2F8 '"Be gone[.]\nIntruders[.]"
callstd 0x4
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
wildbattle 0x69 0x1E 0x0 0x0
waitstate
special 0x188
compare LASTRESULT 0x0
if 0x1 goto 0x81634F5
applymovement MOVE_PLAYER 0x8163512
waitmovement 0x0
releaseall
end

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

'-----------------------
#org 0x1634F5
msgbox2 0x817A30C '"The ghost was the restless spirit\n..."
waitmsgbox
checksound
cry 0x69 0x0
waitkeypress
waitcry
msgbox 0x817A342 '"The mother's spirit was calmed.\pIt..."
callstd 0x4
setvar 0x4059 0x1
releaseall
end


'-----------
' Movements
'-----------
#org 0x163512
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x17A2F8
= Be gone[.]\nIntruders[.]

#org 0x17A30C
= The ghost was the restless spirit\nof CUBONE's mother!

#org 0x17A342
= The mother's spirit was calmed.\pIt departed to the afterlife[.]


I guess I'm not as good at scripting as I thought. This is the pokemon battle with marowak at pokemon tower in fire red. How can I change the Marowak to something else?
 

spidermight340

Advanced Trainer
27
Posts
14
Years
  • Age 32
  • Seen Feb 21, 2011
hi does anyone know the script so you can go passed a person event after you beat a certain trainer ?
 
9
Posts
13
Years
  • Seen Sep 29, 2016
There is no takepokemon command. You can add an asm command, such as this designed by HackMew:

But you can't return the Pokemon once it's gone.

Or you can use the built-in Daycare system, using this tutorial:

But then you can't really use the Daycare in-game, or at least have access to it while Pokemon are used to store it as a non-daycare. But that will at least allow you to return the Pokemon once it's taken away, and to choose the specific Pokemon the player gives away.

Thanks for the answer! The last one with the daycare solution sounded like a perfect solution for me(I didn't understand a thing of the asm-thingy :P). However, first I tried to edit the script, adding some stuff, everuthing except the part with the "notthesame" worked. It didn't matter if I chose another pokemon than Pikachu, for instance when I choosed tangela it would remove tangela and say "goodbye pikachu", and not "this is not pikachu".. I can't explain why this is happening cause the script seems to be "right", have any idea?

Oh, and sorry for late reply, have been kind of busy lately, but thanks anyways :)
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
hi does anyone know the script so you can go passed a person event after you beat a certain trainer ?

use the command checktrainerflag...
an example script...
Code:
#dynamic 0x800000

#org @start
checktrainerflag 0x1F
if 0x1 goto @done
message @1 6
release
end

#org @done
message @2 6
release
end

#org @1
= You did not battle the\ntrainer yet!

#org @2
= You defeated him already.\nSo don't bug him anymore.

'-----------------------
Code:
#org 0x1634B8
lockall
textcolor 0x2
msgbox 0x817A2F8 '"Be gone[.]\nIntruders[.]"
callstd 0x4
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
wildbattle [B][COLOR="Red"]0x69[/COLOR][/B] 0x1E 0x0 0x0
waitstate
special 0x188
compare LASTRESULT 0x0
if 0x1 goto 0x81634F5
applymovement MOVE_PLAYER 0x8163512
waitmovement 0x0
releaseall
end

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

'-----------------------
#org 0x1634F5
msgbox2 0x817A30C '"The ghost was the restless spirit\n..."
waitmsgbox
checksound
cry 0x69 0x0
waitkeypress
waitcry
msgbox 0x817A342 '"The mother's spirit was calmed.\pIt..."
callstd 0x4
setvar 0x4059 0x1
releaseall
end


'-----------
' Movements
'-----------
#org 0x163512
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x17A2F8
= Be gone[.]\nIntruders[.]

#org 0x17A30C
= The ghost was the restless spirit\nof CUBONE's mother!

#org 0x17A342
= The mother's spirit was calmed.\pIt departed to the afterlife[.]


I guess I'm not as good at scripting as I thought. This is the pokemon battle with marowak at pokemon tower in fire red. How can I change the Marowak to something else?

please wrap your script with SPOILER or CODE tags next time.
anyway, change the hex value of the PKMN (in red) to the PKMN you want. Remember that hex values and decimal numbers are not the same.
Example, PIKACHU's decimal value is 25, but its hex value is 0x19...
 
108
Posts
13
Years
  • Seen Mar 31, 2024


use the command checktrainerflag...
an example script...
Code:
#dynamic 0x800000

#org @start
checktrainerflag 0x1F
if 0x1 goto @done
message @1 6
release
end

#org @done
message @2 6
release
end

#org @1
= You did not battle the\ntrainer yet!

#org @2
= You defeated him already.\nSo don't bug him anymore.
please wrap your script with SPOILER or CODE tags next time.
anyway, change the hex value of the PKMN (in red) to the PKMN you want. Remember that hex values and decimal numbers are not the same.
Example, PIKACHU's decimal value is 25, but its hex value is 0x19...


How come you can't edit the script through Advanced Map using XSE?
I also did the normal stuff. Saved the file as rbc in word pad. Compiled script, then found my file and found 4 offsets and picked the first one, then assigned and burned. Then copied the offset and pasted into the the offset on advanced map and it doesn't work.
 

deoxys121

White Kyurem Cometh
1,254
Posts
13
Years
Hi, I'm working on a Ruby hack, and I am trying to find the script in the ROM that gives the Pokedex for the first time. If somebody could simply give me the offset of the script that gives the Pokedex, I would really appreciate it. Remember, this is a Pokemon Ruby hack.
 

spidermight340

Advanced Trainer
27
Posts
14
Years
  • Age 32
  • Seen Feb 21, 2011
hi what is a ruby script so a person wont let you through untill you beat a certain trainer
and when you beat that trainer the other person moves left once

hi have this script but doesnt work plz help

Code:
#org 0x8743581
'-----------------------------------
checktrainerflag 0x19E
if true jump 0x874359B ' Flag is set
applymovement LASTTALKED 0x87435FA ' walk_left end
pauseevent 0x0
message 0x87435A2 ' You did not battle t...
release
end

#org 0x874359B
'-----------------------------------
message 0x87435C6 ' You defeated him alr...
release
end


#org 0x87435A2
= You did not battle the\ntrainer yet!

#org 0x87435C6
= You defeated him already.\nSo don't bug him anymore.

#org 0x87435FA
M walk_left end
 
Last edited:
41
Posts
13
Years
  • Seen Jul 17, 2012
help

no matter what I tyr I can't get my XSE to work. So I need help. I have a script, and I was wondering if somebody could put it in the game for me, because I can't get my script editor to work. If you wanna help pm me and I'll give you the script and a download link to the hack. I'll appreciate any help and will give credit on relase.
 

SPG

Pyroblock
88
Posts
13
Years
  • Age 27
  • Seen May 4, 2013
no matter what I tyr I can't get my XSE to work. So I need help. I have a script, and I was wondering if somebody could put it in the game for me, because I can't get my script editor to work. If you wanna help pm me and I'll give you the script and a download link to the hack. I'll appreciate any help and will give credit on relase.
before any one does this for you i recomend updating xse to version 1.1.1
 
41
Posts
13
Years
  • Seen Jul 17, 2012
thats the version I have. I don't understand why its not working. all my other tools work fine (accept unlz gba)
 
7
Posts
13
Years
  • Seen Jul 10, 2012
Okay, I followed diegoisawsome's "GivePokemon" script to the letter... and it works superbly.

However, I have a problem. When I try to name my pokemon(bulbasaur), it has me re-nickname my starter(charmander).

However, when I restart the game, and get Bulbasaur first, and Charmander second... when I receive Charmander, it has me re-nickname Bulbasaur.

Is there a way to fix this?

Also... say I want this pokemon to have a nickname already... would it be possible to give the Bulbasaur a nickname, and not go through the naming process? (like when you trade a pokemon with an NPC or another Player.)

Script
Spoiler:


Also... When I do the hidesprite command, the sprite hides, but only until I step one tile away... which it then re-appears... does anyone know why that happens?
script
Spoiler:
 

spidermight340

Advanced Trainer
27
Posts
14
Years
  • Age 32
  • Seen Feb 21, 2011
pksv help

hi what is a ruby script pksv so a person wont let you through untill you beat a certain trainer
and when you beat that trainer the other person moves left once

i have this script but doesnt work plz help

Code:
#org 0x8743581
'-----------------------------------
checktrainerflag 0x19E
if true jump 0x874359B ' Flag is set
applymovement LASTTALKED 0x87435FA ' walk_left end
pauseevent 0x0
message 0x87435A2 ' You did not battle t...
release
end

#org 0x874359B
'-----------------------------------
message 0x87435C6 ' You defeated him alr...
release
end


#org 0x87435A2
= You did not battle the\ntrainer yet!

#org 0x87435C6
= You defeated him already.\nSo don't bug him anymore.

#org 0x87435FA
M walk_left end
 

spidermight340

Advanced Trainer
27
Posts
14
Years
  • Age 32
  • Seen Feb 21, 2011
pksv help

hi what is a ruby script pksv so a person wont let you through untill you beat a certain trainer
and when you beat that trainer the other person moves left once

i have this script but doesnt work plz help

Code:
#org 0x8743581
'-----------------------------------
checktrainerflag 0x19E
if true jump 0x874359B ' Flag is set
applymovement LASTTALKED 0x87435FA ' walk_left end
pauseevent 0x0
message 0x87435A2 ' You did not battle t...
release
end

#org 0x874359B
'-----------------------------------
message 0x87435C6 ' You defeated him alr...
release
end


#org 0x87435A2
= You did not battle the\ntrainer yet!

#org 0x87435C6
= You defeated him already.\nSo don't bug him anymore.

#org 0x87435FA
M walk_left end
 

spidermight340

Advanced Trainer
27
Posts
14
Years
  • Age 32
  • Seen Feb 21, 2011
hi i have this road closed script but the person wont disappear when he should

here is the pksv script plz help plz

Code:
#dyn 0x740000
#org @start
lockall
checktrainerflag 0x1021
if 0x1 jump @open
message @text
showmsg
waitbutton
releaseall
end

#org @text
= I'm sorry, the road is closed\nuntil You beat pure gym

#org @open
message @opentxt
showmsg
waitbutton
fadescreen 3
closemsg
disappear 0x1
setflag 0x1021
fadescreen 2
releaseall
end
#org @opentxt
= I'm sorry, th-\pOh right!\nYou beat pure gym
 
190
Posts
14
Years
  • Seen Apr 14, 2016
when using applymovements, do sprites stay where they end in there movements? like if you re enter the map, they will be in the location where the movement ends.
 
7
Posts
13
Years
  • Seen Jul 10, 2012
@Blazequaza... that doesn't fix a darned thing... if it is, somehow, suppose to fix it... could you explain what might have gone wrong? (I replaced all pointers and nothing happened... I also replaced the Dynamic Offset (as the 800000 looked more like a "#dynamic 0x800000" (which appears in the example provided, and still, nothing happened...

If anyone could... I still need help...

Okay, I followed diegoisawsome's "GivePokemon" script to the letter... and it works superbly.

However, I have a problem. When I try to name my pokemon(bulbasaur), it has me re-nickname my starter(charmander).

However, when I restart the game, and get Bulbasaur first, and Charmander second... when I receive Charmander, it has me re-nickname Bulbasaur.

Is there a way to fix this?

Also... say I want this pokemon to have a nickname already... would it be possible to give the Bulbasaur a nickname, and not go through the naming process? (like when you trade a pokemon with an NPC or another Player.)

Script
Spoiler:


Also... When I do the hidesprite command, the sprite hides, but only until I step one tile away... which it then re-appears... does anyone know why that happens?
script
Spoiler:
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
when using applymovements, do sprites stay where they end in there movements? like if you re enter the map, they will be in the location where the movement ends.

No, they will go back to their original postion once you leave and re-enter the map. You can set up a simple level script that will utilise the movesprite2 command that will always be activated when you move enter the map so long as you have set a flag (I find the script types 3, 5 and 7 to be best for this).

Spoiler:

Change in red.

Keep in mind that I'm not 100% sure on this, but the Pokemon which is to nicknamed should chosen through the value assigned to the 0x800D variable (Which is generally done through a special that takes you to your party screen at the Name Rater). Since you want a defined party member named you should just need to set the variable to its position. So long as the Pokemon you want to name remains at the top of your party, you'll need to set 0x800D to 0x0 before calling the naming routine (Because it always going to be set to 0x1 when you ask whether it should be named).

As for the hidesprite problem, did you put the flag set (201) in the 'Person ID' field in Advance Map?
 
Status
Not open for further replies.
Back
Top