• 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.

droomph

weeb
4,285
Posts
12
Years
In a hex editor, try filling the data until 0x1000000 bytes. It should run then.

If not, try getting a new one. To stop this from happening again, you'll...well, have to be more careful, I guess.
 
28
Posts
11
Years
  • Seen May 1, 2022
...forgot to mention, super noob here

how would I change the bytes... download a hex editor and open a rom in it...
 

Glitched Hacker

Beginning Hacker
7
Posts
11
Years
  • Seen May 7, 2012
When I try to make a yes/no script it says Error 13 "type mismatch" on line 7. Missing #define. Can someone please help me?

Here's my script:

Spoiler:


I didn't press enter to go down a line in the script of what the characters are saying, its just the limited amount of space that PokeCommunity gives me in this reply box. The string of words that the characters say is actually one straight line in XSE.

Oh, and the beginning offset is an offset I found in Free Space Finder.
FYI, I'm compiling this script into Pokemon Fire Red.
 
Last edited:
5,256
Posts
16
Years
Hm, seems your copy of XSE is missing the std.rbh file. Replace "LASTRESULT" with 0x800D or add this file to the folder XSE is in.

Also, with the dynamic offset, DON'T use FSF to find offsets. Simply put "#dynamic 0x800000" at the beginning. When it's compiled, XSE will automatically compile it to free space. You just copy the offset it gives you and use that.
 

Glitched Hacker

Beginning Hacker
7
Posts
11
Years
  • Seen May 7, 2012
Thanks! That worked, but i have just one last question.

How do I make that same script so that when the player says yes this script won't come up again, it will be something else? You guys might tell me to use flags, and that's what I have a question about. I know how to use flags for a regular message, but not a yes or no message.
Basically I don't know where to put checkflag, setflag, or clearflag in my yes/no script.


Thanks in advance!
 
Last edited:

Cyru

-
47
Posts
11
Years
#org $va
jingle
showsprite 5
applymovement 5 $walk
$walk 1 ; #binary 0x0B 0x0B 0x0B 0x0B 0x0B 0x0B 0x0B 0xFE
pausemove 0
applymovement 5 $gogo
$gogo 1 ; #binary 0x0D 0x0D 0x0D 0x0D 0x0D 0xFE
pausemove 0
clearflag 0x1215
message $stop
$stop 1 = Hey! How many POKEMON do you have?\pONE? when you're in this dangerous world,\nyou need at least two POKEMON\pTo keep you safe!
boxset 6
message $bat
$bat 1 = You know what? i'll give you a POKEMON\nif you can beat me...\pbut this is only for loan,\nuntil you catch your own..
boxset 6
trainerbattle 0x03 0x02 $win
$win 1 = Wow! you're strong!
message $after
$after 1 = wow! you're really strong!\pIt was a pleasure to battle you!\pHere, take my HOUNDOUR!
boxset 6
message $yay
$yay 1 = \v\h01 Received a GROWLITHE!\pNow, i need to get back..\pSeeya!
fanfare 0x13E
boxset 6
givepokemon 228 5 0x8D
fadescreen 1
removesprite 5
fadescreen 0
setflag 0x1215
setvar 0x6000 0x0002
release
end
Does anybody know what's wrong with this? i mean the var value and number are in the right place on advance map so .. ?
 

Cyru

-
47
Posts
11
Years
I contemplated using XSE but it seems really overcomplicated and it seems to me pokescript is easier
 
48
Posts
11
Years
  • Seen Jul 30, 2012
Hey there everybody, I started scripting on PKSV a couple of days ago and I was wondering if anybody could answer these questions;
  • Is there an existing script to following a character when you walk over a script spot, as on Pokémon Firered and Pokémon Leafgreen, after leaving home and heading north; Professor Oak leads you to his lab to receive one of the three starters.
  • What is a 'Flag Skeleton 1' and a 'Flag Skeleton 2'?
  • What are the flag values used for (0x200 - 0x1000 etc.)?
  • Oh, and a quick one for Advance Map 1.92; I've put a warp point inside and outside of the cave, when I walk into the cave I'm facing the exit, bit I should be facing the other way. + when I try to exit the cave I just hover above the exit.
Help appreciated!
 

Glitched Hacker

Beginning Hacker
7
Posts
11
Years
  • Seen May 7, 2012
Thanks! That worked, but i have just one last question.

How do I make that same script so that when the player says yes this script won't come up again, it will be something else? You guys might tell me to use flags, and that's what I have a question about. I know how to use flags for a regular message, but not a yes or no message.
Basically I don't know where to put checkflag, setflag, or clearflag in my yes/no script.


Thanks in advance!

Can someone plese answer this question?
 

Glitched Hacker

Beginning Hacker
7
Posts
11
Years
  • Seen May 7, 2012
I ran into another problem, but with a different script. I am trying to make an appplymovement script but the character I try to make move does not go anywhere. Is there something wrong with my script?

Here it is:

Spoiler:


I got the sprite number from Advance Map in the first image.

Do I need to use this? (second image)
 
10,078
Posts
15
Years
  • Age 32
  • UK
  • Seen Oct 17, 2023
I ran into another problem, but with a different script. I am trying to make an appplymovement script but the character I try to make move does not go anywhere. Is there something wrong with my script?

Here it is:

Spoiler:


I got the sprite number from Advance Map in the first image.

Do I need to use this? (second image)

10 is Decimal :) You want 0xA (0x9->0xA)

To your previous problem you want to use flags, use 'setflag 0xNUMBER' on one part, and have a 'checkflag 0xNUMBER' on the next part, like this.

#org @start
lock
checkflag 0x1000
if 0x1 goto @DONE
msgbox @Talk1 0x6
setflag 0x1000
release
end

#org @DONE
msgbox @Talk2 0x6
release
end

#org @Talk1
= Flag is clear, setting the flag.

#org @Talk2
= Now the flag is set!
 

Glitched Hacker

Beginning Hacker
7
Posts
11
Years
  • Seen May 7, 2012
Thanks SwiftSign! I spaced out and forgot about how "10" doesn't work.

And for the yes/no script, I'm sorry, I don't mean to be annoying, but when I press "No", it still switches to the other script. Is there a way so it can only switch to the other script if I press "Yes"?

This is my script so far:

Spoiler:


Again, I don't meant to be annoying and buggy, but I would please like some help on this.

Actually, I just tested the script again and it only goes to the new script when I press "NO", when I press "YES" it still gives me the same script again. Did i put the setflag in the wrong spot?


__________________________________________________________________________________________



OMG!!! I do what all the tutorials say and I still have some sort of problem!

I am trying to make a giveitem script, but when I compile it it says "Error 13 'Type mismatch' on line 7. Missing dynamic label". What is wrong?

This is my script:

Spoiler:


I'm sorry for all the problems. I'm new at scripting.
 
Last edited:
30
Posts
14
Years
  • Seen Jul 27, 2012
Alrighty, so I've been searching everwhere for how to do this, and this is my last resort.

So I know there's a way to do this, I'm just not quite sure how to do it in XSE.

How to I move the camera without moving the player.

Simple, I just need the command and how it works.

Thanks everyone!

Thanks SwiftSign!


OMG!!! I do what all the tutorials say and I still have some sort of problem!

I am trying to make a giveitem script, but when I compile it it says "Error 13 'Type mismatch' on line 7. Missing dynamic label". What is wrong?

I'm sorry for all the problems. I'm new at scripting.

Well if you look at line 7, it is this line:
Code:
if 0x1 goto @none
It's basically saying it can't find the label. So let's find your "none" label

Code:
#org #none

If you look carefully, you'll notice you used a hash tag (#) instead of an at symbol (@)

Fix that, and your script will be able to find your "none" label, and should compile.
 
Last edited:

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
Thanks SwiftSign! I spaced out and forgot about how "10" doesn't work.

And for the yes/no script, I'm sorry, I don't mean to be annoying, but when I press "No", it still switches to the other script. Is there a way so it can only switch to the other script if I press "Yes"?

This is my script so far:

Spoiler:


Again, I don't meant to be annoying and buggy, but I would please like some help on this.

Actually, I just tested the script again and it only goes to the new script when I press "NO", when I press "YES" it still gives me the same script again. Did i put the setflag in the wrong spot?


__________________________________________________________________________________________



OMG!!! I do what all the tutorials say and I still have some sort of problem!

I am trying to make a giveitem script, but when I compile it it says "Error 13 'Type mismatch' on line 7. Missing dynamic label". What is wrong?

This is my script:

Spoiler:


I'm sorry for all the problems. I'm new at scripting.

Yeah, your setflag command is in the wrong place. Since you want the roles to be reversed just remove the setflag command from where it is right now and place it in the '@yespart' pointer.

As for your second problem, it is simply because you have incorrectly labelled your '@none' pointer as '#org #none'. Its just a simple typo so once you change that you shouldn't have any more messages unless there is something else that is wrong XP

Alrighty, so I've been searching everwhere for how to do this, and this is my last resort.

So I know there's a way to do this, I'm just not quite sure how to do it in XSE.

How to I move the camera without moving the player.

Simple, I just need the command and how it works.

Thanks everyone!

You need to use two specials in order to separate the camera from the player - Specials 0x113 and 0x114. You use them like this:

Code:
#dynamic 0x800000

#org @Start
msgbox @Talk 0x2
special 0x113 // Detatches camera from the player
applymovement 0x7F @MoveCamera // 0x7F is the entity that you have apply the movements to for the camera to move
waitmovement 0x0
special 0x114 // Reattaches camera to the player
release
end

#org @Talk
= I'm going to shake your camera!

#org @MoveCamera
#raw 0x13
#raw 0x12
#raw 0x12
#raw 0x13
#raw 0xFE

Here is a thread that can tell you a bit more about moving cameras. Just be sure to move the camera back to the spot where your player is before the script ends otherwise things will look pretty wonky :P
 

Glitched Hacker

Beginning Hacker
7
Posts
11
Years
  • Seen May 7, 2012
Oops! I must have overlooked that.
And thanks for helping me find out where to put my flag.

________________________________________________________________


Is there a way to script what Professor Oak says when you start the game? (when he asks you your gender and name and rival's name)

Also is there a way to script the first three slides? ( the pokemon storyboards, like the "press A and let your adventure begin".

Is there a way to edit both of those?
Thanks in advance!
 
10,078
Posts
15
Years
  • Age 32
  • UK
  • Seen Oct 17, 2023
Oops! I must have overlooked that.
And thanks for helping me find out where to put my flag.

________________________________________________________________


Is there a way to script what Professor Oak says when you start the game? (when he asks you your gender and name and rival's name)

Also is there a way to script the first three slides? ( the pokemon storyboards, like the "press A and let your adventure begin".

Is there a way to edit both of those?
Thanks in advance!

Either the Advance Text tool(A-Text), hex editing the words, or repointing the data to a new text string. The first is easiest if you can find a link to A-Text, it should be in the toolbox somewhere?

For hex-editing and such there are a few tutorials in the appropriate section.
 
30
Posts
14
Years
  • Seen Jul 27, 2012
You need to use two specials in order to separate the camera from the player - Specials 0x113 and 0x114. You use them like this:

Code:
#dynamic 0x800000

#org @Start
msgbox @Talk 0x2
special 0x113 // Detatches camera from the player
applymovement 0x7F @MoveCamera // 0x7F is the entity that you have apply the movements to for the camera to move
waitmovement 0x0
special 0x114 // Reattaches camera to the player
release
end

#org @Talk
= I'm going to shake your camera!

#org @MoveCamera
#raw 0x13
#raw 0x12
#raw 0x12
#raw 0x13
#raw 0xFE

Here is a thread that can tell you a bit more about moving cameras. Just be sure to move the camera back to the spot where your player is before the script ends otherwise things will look pretty wonky :P

Hey thanks a bunch! I had a feeling it was something along the lines of an apply movement script applied to the camera!

This shall help me do the event I need for my hack, which I hope you'll all check out when I release a beta soon!

Hey just out of curiosity, if you use the apply movement script without detaching the camera, what happens? does it just move the player too?

Alright, so I'm having a bit of an issue with my camera movement script.
So I have the main character standing somewhere with another character.
I pan the camera up to view a conversation, but when I bring the camera back to my player, the character he was with has disappeared. I do have a hidesprite in the code, but it seems to be activating way to soon.

I thought maybe when the camera was moving, the sprites got reset to there original area, so I added a movesprite in there, and stille the guy is no where to be seen.

The rest of the script goes on fine, except for the fact that he is either invisible, or nowhere to be found.

Here's my code.

Code:
#dynamic 0x2B9292

#org @start
lock
checkflag 0x1013
if 0x1 goto @done
msgbox @1 0x6
applymovement 0xFF @move
waitmovement 0x0
msgbox @2 0x6
applymovement 0x08 @move1
applymovement 0xFF @move2
waitmovement 0x0
msgbox @3 0x6
applymovement 0x08 @move3
applymovement 0xFF @move4
waitmovement 0x0
special 0x113
applymovement 0x7F @MoveCamera
waitmovement 0x0
msgbox @grunt1 0x6
msgbox @grunt2 0x6
msgbox @grunt3 0x6
msgbox @grunt4 0x6
msgbox @grunt5 0x6
msgbox @grunt6 0x6
movesprite 0x8 0x1D 0x25
applymovement 0x7F @MoveCamera2
waitmovement 0x0
special 0x114
hidesprite 0x01
setflag 0x1015
hidesprite 0x02
setflag 0x1014
msgbox @4 0x6
msgbox @5 0x6
applymovement 0x08 @move7
waitmovement 0x0
hidesprite 0x08
setflag 0x1013
release
end

#org @done
release
end

#org @1
= [rival]: [player]!\nOver here!

#org @2
= [rival]: There are some\nshady people up ahead,\land I think I heard one of\lthem mention the ship you\lwere on!\pCome on, let's see if we can\nhear what they're saying.

#org @3
= [rival]: Let's hide behind\nthis arch and see if we can\lsee them.

#org @grunt1
= [red_fr]Grunt 1: A tree? How did this\nget here?\pDo you have a pokemon that\nknows Cut with you?

#org @grunt2
= Grunt 2: Why would I bring\na pokemon with Cut?\pHey, did you hear that our\nboss was able to control a\lTentacruel?

#org @grunt3
= [red_fr]Grunt 1: I heard he got it to\nsink some kind of passenger\lship. 

#org @grunt4
= Grunt 2: Sounds like he may\nbe able to carry out our plan\lafter all.

#org @grunt5
= [red_fr]Grunt 1: Don't get too ahead\nof yourself.\pThe technology may not be\nstrong enough to control\llegendaries.
 
#org @grunt6
= Grunt 2: Well it's a step\nin the right direction.\pCome on, let's get to the\npower plant.

#org @4
= [rival]: Wow, I think that may\nhave been that Team Rocket\lthat my Grandfather used to\ltell me stories about.\pDecades ago they tried to\nsteal and control powerful\lpokemon.\pA young boy made their leader\ndisappear.\pThree years later, they tried\lagain.\pA different boy stopped them\nthat time.\pI wonder what prompted the\ngang to reassemble...  

#org @5
= [rival]: Anyway, we don't\nneed to worry about it.\pThe first gym is just up\nahead, and I can't wait to get\lmy first badge!

#org @move
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @move1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x3
#raw 0xFE

#org @move2
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x11
#raw 0x2
#raw 0xFE

#org @move3
#raw 0x12
#raw 0x3
#raw 0xFE

#org @move4
#raw 0x13
#raw 0x2
#raw 0xFE

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

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

#org @move7
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE
 
Last edited:
Status
Not open for further replies.
Back
Top