• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
I used your script as a base then tried adding things so it would do what I needed it to do, but its a fail. Lol. The Player is supposed to talk to a person in his house, that person is supposed to give him the running shoes, a Pokemon(activate the Pokemon menu along with it), walk over to the Player's Mom and make a ^_^ face at her, then leave the house. All the walking and the face looks fine, but I can't get the person to leave the house, he just turns invisible on the space in-front of the door. Also the menu account gets all pixelated and see through. Since I can't request a script can you or someone tell me what's wrong with this one?
Spoiler:

I don't know if it'll help anyone help me fix the problem but when the person is talked to he's supposed to give you the stuff, then walk down two, over three, up one, pause, ^_^ face, down two, 4 left, down one and then either out of the building or just disappear completely(as in not being able to be seen or bumped into).

Gah, I feel like such a noob. Lol.

you really can't make an NPC leave a map. in scripting, you're only supposed to make it seem like the NPC leaves a map.
by the way, with your script, you should put the flag 1200 on the NPC's Person ID to make it disappear forever(not unless you clear the flag 1200) after the script is over...
Spoiler:
 
1
Posts
13
Years
  • Seen Jan 8, 2011
I've got a problem, I'm also still very new to scripting but I know the basics I think.

I've been trying to make a simple rival battle script for the last couple hours, winging it along the way, and taking my best guess at it. After following a few tutorials and youtube videos I had a script that somewhat worked.

It would have the rival walk over and talk and everything, go into the battle, but then after the battle it would go back to the map and you couldn't move or talk and it pretty much froze. I was using trainerbattle 0x0 then.

So I tried switching to trainerbattle 0x3 and now it won't work at all.

I just wan't to know what I did wrong, how I could fix it, and how to avoid this issue in the future.

Thank you :)

Here is the code I was left with at the end:

Spoiler:
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
I've got a problem, I'm also still very new to scripting but I know the basics I think.

I've been trying to make a simple rival battle script for the last couple hours, winging it along the way, and taking my best guess at it. After following a few tutorials and youtube videos I had a script that somewhat worked.

It would have the rival walk over and talk and everything, go into the battle, but then after the battle it would go back to the map and you couldn't move or talk and it pretty much froze. I was using trainerbattle 0x0 then.

So I tried switching to trainerbattle 0x3 and now it won't work at all.

I just wan't to know what I did wrong, how I could fix it, and how to avoid this issue in the future.

Thank you :)

Here is the code I was left with at the end:

Spoiler:

The script is for FireRed, if I am not mistaken...
I am not really an FR hacker, but try this. Remember to back-up your ROM.
Spoiler:
 

Django136

Epic Pro Baller
10
Posts
13
Years
  • Seen Jun 8, 2016
I'm somewhat new to scripting and I'm working on a script for what happens after you walk out of your house at the beginning of the game. This is a level script, and it all runs fine except for the movesprite. It just acts like that line isn't there. Am I using it right? Also, it's a hack of Fire Red.
Spoiler:
 

Silent the Lucario

Novice Mapper
27
Posts
13
Years
I don't know how to do spoilers :( anyway this is supposed to give you Pikachu and Abra one time but you can get it way more than once :(

#include stditems.rbh
#include stdpoke.rbh

//---------------
#org 0x800000
checkflag 0x1000
if 0x1 goto 0x880003C
msgbox 0x880005B MSG_FACE //"Take this pokemon and go you\nanno..."
setflag 0x828
givepokemon PKMN_ABRA 0x10 ITEM_NONE 0x0 0x0 0x0
msgbox 0x880008A MSG_FACE //"You want another one!? Whatever\nj..."
givepokemon PKMN_PIKACHU 0x10 ITEM_LIGHTBALL 0x0 0x0 0x0
end

//---------------
#org 0x80003C
hidecoins 0xD9 0xE8
nop

//---------
// Strings
//---------
#org 0x80005B
= Take this pokemon and go you\nannoying twerp!

#org 0x80008A
= You want another one!? Whatever\njust don't complain if it's not\lwhat you want!
 
228
Posts
13
Years
If you're trying to mimic the Mr. Briney script, then you probably should have taken a look at that script. They (the programmers) used the 'spriteinvisible' command to hide the player. I recommend that you use it as well.

PKSV said it uses 'call', and then there were some setvar and copyvar things, but I couldn't find any movement data at all. I'll just do that with XSE, then. Thanks for the help :)
 
9
Posts
13
Years
  • Seen May 23, 2011
I think this post belongs here. I'm having trouble compiling (using pksv) and i was wondering if anyone could tell me what I'm doing wrong. SO! this is my first time writing the script (minus the asm (thanks hackmew)) and when I compiled it and then opened PKSV up again at the offset I got nothing but meaningless crud. It'd have lines and lines saying #raw 0xE2 etc. each value was different unlike when the area is free space. and occasionally lines of script were present but not script I had written.

Here's the script I wrote:
Spoiler:

Again this is my first time so if you could look over the validity of the script that'd be great.
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
I'm somewhat new to scripting and I'm working on a script for what happens after you walk out of your house at the beginning of the game. This is a level script, and it all runs fine except for the movesprite. It just acts like that line isn't there. Am I using it right? Also, it's a hack of Fire Red.
Spoiler:

Try the movesprite2 command. A lot of times that works better for me.

Also, why is the dynamic # 0x34839C? It should be, at the lowest, 0x700000, to be safe.


I don't know how to do spoilers :( anyway this is supposed to give you Pikachu and Abra one time but you can get it way more than once :(

Spoiler:

The gist of what you need to do in bold.
 

Silent the Lucario

Novice Mapper
27
Posts
13
Years
Try the movesprite2 command. A lot of times that works better for me.

Also, why is the dynamic # 0x34839C? It should be, at the lowest, 0x700000, to be safe.




The gist of what you need to do in bold.

Thanks dude :D i figured out the other flag thing but i still couldn't get the after message to work so thank you also could you help me to make it that this person talks to you after you do more stuff like for example get all eight badges or something :D anyway here are some more scripts that i need help with

Spoiler:


I'll send rest later (i have like 10 or 15 more :D)
 
Last edited by a moderator:

Binary

え?
3,977
Posts
16
Years
  • Age 29
  • Seen Apr 7, 2014
@Silent the Lucario:
Is everything in the spoiler a single script? If not, I suggest you separate them since it would make things easier.
I can see 3 different scripts, and you haven't really mentioned the problems you're facing with them.
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Thanks dude :D i figured out the other flag thing but i still couldn't get the after message to work so thank you also could you help me to make it that this person talks to you after you do more stuff like for example get all eight badges or something :D[/spoiler]

The eighth badge is activated by setting flag 0x827, so just use checkflag 0x827 and have it go to the script you want if it's set.

anyway here are some more scripts that i need help with

Spoiler:


I'll send rest later (i have like 10 or 15 more :D)

As Binary said, not sure what all the problems are with the scripts you have, you have to say what you're having trouble with. The first one, with the hidesprite, you might need to put a flag number in the person's ID and put setflag 0x(flag number in person's ID) in the script to make the sprite permanently hidden.
 
12
Posts
13
Years
Major edit, I missed the post by Binary. Thank you both.
Yes, I am working on a FireRed hack, sorry I forgot to mention that.

Would there be any problems by activating both the PokéDex and National Dex at the same time?
 
Last edited:

Binary

え?
3,977
Posts
16
Years
  • Age 29
  • Seen Apr 7, 2014
Major edit, I missed the post by Binary. Thank you both.
Yes, I am working on a FireRed hack, sorry I forgot to mention that.

Would there be any problems by activating both the PokéDex and National Dex at the same time?
None that I know of. There shouldn't be any problems.
Haven't really tried though.
 
228
Posts
13
Years
Major edit, I missed the post by Binary. Thank you both.
Yes, I am working on a FireRed hack, sorry I forgot to mention that.

Would there be any problems by activating both the PokéDex and National Dex at the same time?

There shouldn't be any problems since the PokéDex is active once you start your game, but it isn't visible in the menu until you use the setflag command to make it visible in the menu.
 

Silent the Lucario

Novice Mapper
27
Posts
13
Years
I don't need any help with those scipts anymore :D their useless now :P

Edit: I need help with this script

Spoiler:


It keeps on going to a part of the script that only happens when you get the eighth gym badge and when the champion activates a flag :( and i don't have the eighth gym badge nor did I even put the champion script in the game yet :(
 
Last edited:
4
Posts
13
Years
  • Seen Jun 14, 2011
need xse script help

when ever i try this script the chareter just freezes in spot.
It is supposed to make a sprite move to the right, trainer battle and then give a item


Game: ruby
Type: script
Editor: xse
[/spoiler]
#dynamic 0x291403
'---------------
#org @start
lock
checkflag 0x7
if 0x0 goto @snippet1
release
end
'---------------
#org @snippet1
msgbox @string1 0x6 '"Beat it! i'm working hear."
applymovement 0x1 @move1
waitmovement 0x0
trainerbattle 0x0 0x8 0x0 @string2 @string3
msgbox @string4 0x6 '"How could my virus pokemon fail i\..."
giveitem 0x1 0xA 0x0
setflag 0x7
release
end

'---------
' Strings
'---------
#org @string1
= Beat it! i'm working hear.
#org @string2
= Go! my virus pokemon.
#org @string3
= Time for me to escape.
#org @string4
= How could my virus pokemon fail i\nhave to retreat for now.\pPOKEDEX: he dropped something.

'-----------
' Movements
'-----------
#org @move1
#raw 0x24 'Step on the Spot Right (Faster)
#raw 0x24 'Step on the Spot Right (Faster)
#raw 0x24 'Step on the Spot Right (Faster)
#raw 0x24 'Step on the Spot Right (Faster)
#raw 0x24 'Step on the Spot Right (Faster)
#raw 0x24 'Step on the Spot Right (Faster)
#raw 0xFE 'End of Movements
 
Last edited:

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
I don't need any help with those scipts anymore :D their useless now :P

Edit: I need help with this script

Spoiler:


It keeps on going to a part of the script that only happens when you get the eighth gym badge and when the champion activates a flag :( and i don't have the eighth gym badge nor did I even put the champion script in the game yet :(

Some changes in bold - not sure why you're setting three flags (0x1000, 0x828, and 0x829) and needing to check all three of them. Whatever it's for, you probably only need to check flag 0x1000 at the beginning of the script, anyway.

If you need the @stealbadges script to activate only when both flags (0x827 and 0x1000) are active, it would have to be like this:

Code:
[b]checkflag 0x827
if 0x1 goto @check2
......

#org @check2
checkflag 0x1000
if 0x1 goto @stealbadges
(rest of script)[/b]
 
Status
Not open for further replies.
Back
Top