• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.
One of my first scripts, and it isn't working. Saying that shows that I know nothing about scripting, but I tried, and since I'm here, failed. Help?

Spoiler:
 
running shoes help

I put "setflag 0x82f" in the script for the player's sister, which is supposed to activate the running shoes. But when I try to use them, the running shoes don't work (even though i set the flag). Is it 'cause I'm in a cave?

Thanks
 
I put "setflag 0x82f" in the script for the player's sister, which is supposed to activate the running shoes. But when I try to use them, the running shoes don't work (even though i set the flag). Is it 'cause I'm in a cave?
Could be. Simplest way to test is to leave the cave and try to run, or perhaps change the map type in AdvanceMap to one that would allow running.
 
First Rival Battle

Alright. Basically I have started a Fire Red hack. It is about defeating Team Rocket. I am still working on the title but I have hit a problem at the beginning. In the first rival battle, the tutorial guy that tells you what to do is stopping the fight because I deleted the lines for him to say. Is there a way to bypass him talking using advanced text? I understand the script pretty well so if you can just point me in the right direction as to what scripting event it is under I would appreciate it.
 
Alright. Basically I have started a Fire Red hack. It is about defeating Team Rocket. I am still working on the title but I have hit a problem at the beginning. In the first rival battle, the tutorial guy that tells you what to do is stopping the fight because I deleted the lines for him to say. Is there a way to bypass him talking using advanced text? I understand the script pretty well so if you can just point me in the right direction as to what scripting event it is under I would appreciate it.
Uh, there might be an easier way... I'm pretty sure that the tutorial battle is one of the battle types you can specify with XSE's "trainerbattle" command. If I'm right, then you'd just change that command to use a normal battle type, rather than the tutorial battle. That way, you don't need to do any text editing -- the text simply won't be used.
 
I've written the first script (well actually edited a peice from deiegosareawsome's tutorial) for a 'get your starter' thing. It works without a problem to the first comparison, then if you select 'no' there it does excactly what its meant to, but if you select 'yes' it just freezes. If anyone could help me understanding why this happens it would be great. (btw Pompip is the name of my starter and I've written him over Treecko so he is #277).

#dynamic 0x6B482C
#org @start
checkflag 0x800
if 0x1 goto @done
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x6
release
end
#org @take
givepokemon 0x277 0x5 0x0 0x0 0x0 0x0
msgbox @3 0x6
setflag 0x800
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
release
end
#org @name
call 0x1A74EB
return
#org @done
msgbox @6 0x6
release
end
#org @1
= This Pokemon is powerful, but \nhard to gain the trust of. Would you \plike to pick Pompip?
#org @2
= Have a look at the othere two \npokemon.
#org @3
= [black_fr]You received a Pompip!
#org @4
= [black_fr]Would you like to give a\nnickname to Pompip?
#org @5
= Take care of Pompip.
#org @6
= This pokeball is empty.
 
I will try that. I am using something different but I can change the trainer like you said with it so I bet it would work. Thanks!

Uh, there might be an easier way... I'm pretty sure that the tutorial battle is one of the battle types you can specify with XSE's "trainerbattle" command. If I'm right, then you'd just change that command to use a normal battle type, rather than the tutorial battle. That way, you don't need to do any text editing -- the text simply won't be used.

Ummm.... Unless I am doing it wrong... Which I dont think so... That did not work. Anymore suggestions? I changed the trainer idea but gave him the same sprite, pokemon, and name but I think it is the event itself with a built in script...
 
Last edited:
I've written the first script (well actually edited a peice from deiegosareawsome's tutorial) for a 'get your starter' thing. It works without a problem to the first comparison, then if you select 'no' there it does excactly what its meant to, but if you select 'yes' it just freezes. If anyone could help me understanding why this happens it would be great. (btw Pompip is the name of my starter and I've written him over Treecko so he is #277).

#dynamic 0x6B482C
#org @start
checkflag 0x800
if 0x1 goto @done
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x6
release
end

#org @take
givepokemon 0x277 0x5 0x0 0x0 0x0 0x0
msgbox @3 0x6
setflag 0x800
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
release
end
#org @name
call 0x1A74EB
return
#org @done
msgbox @6 0x6
release
end
#org @1
= This Pokemon is powerful, but \nhard to gain the trust of. Would you \plike to pick Pompip?
#org @2
= Have a look at the othere two \npokemon.
#org @3
= [black_fr]You received a Pompip!
#org @4
= [black_fr]Would you like to give a\nnickname to Pompip?
#org @5
= Take care of Pompip.
#org @6
= This pokeball is empty.

Spoiler:
It was in your givepokemon command. You wrote 0x277, which is bascially saying "Pokémon Number 631", because the "0x" indicates your using hex, so hex 277 is decimal (what we ordinarily use for counting) 631.
 
new problem

I fixed the starting battle to where its a normal battle the problem comes after it. Instead of him saying goodbye he just stands there like a normal trainer. When you walk out and walk back in to the trigger, he says where are you goin lets battle walks to the wrong part of the screen and then walks out. How do I fix it to where he walks out like normal after being beaten? Should I make another trigger event that does the same thing the other is not doing?
 
I fixed the starting battle to where its a normal battle the problem comes after it. Instead of him saying goodbye he just stands there like a normal trainer. When you walk out and walk back in to the trigger, he says where are you goin lets battle walks to the wrong part of the screen and then walks out. How do I fix it to where he walks out like normal after being beaten? Should I make another trigger event that does the same thing the other is not doing?
Well you need applymovement =)
That person needs to move after battle =)

So you do it this way:
commands
.
.
.
.
trainerbattle 0x1 0xnumber @before @battle @after

And the after string must be new one =)
#org @after
some commands if you need...
applymovement 0x(number of person in hex - that number can be checked in A-Map) @movement
waitmovement 0x0
For understanding the movements I recommend using diegoisawesome's scripting tutorial =)
 

Well you need applymovement =)
That person needs to move after battle =)

So you do it this way:
commands
.
.
.
.
trainerbattle 0x1 0xnumber @before @battle @after

And the after string must be new one =)
#org @after
some commands if you need...
applymovement 0x(number of person in hex - that number can be checked in A-Map) @movement
waitmovement 0x0
For understanding the movements I recommend using diegoisawesome's scripting tutorial =)

I still have the original movement for after the battle. The problem comes from me changing the battle (Earlier post tells you what battle I changed.) All I changed was the 0x9 (tutorial battle I guess) in trainerbattle 0x9 0x147 0x3 @begin @after; to trainerbattle 0x0 0x147 0x3 @begin @after. What does the "0x3" mean?
 
You need to make the trainerbattle command like so: trainerbattle 0x1 0x 0x0 @challenge @defeat @after. The "0x" bit should be the trainer id. @challenge is the text string before the battle, @defeat is the text string when the trainer sprite appears at the end and after is the rest of your script.
 
Last edited:
This is my script for skipping the tutorial battle. The part that it isnt jumping to is bolded:

Spoiler:
 
Last edited by a moderator:
I'm using Pokéscript :D
Spoiler:


The whole script works up until the line:
Spoiler:


Then a wierd box appears in the top right-hand corner. It looks like a text box, except smaller. If I keep pressing A, I hear a few beeps and then I'm at the line:
Spoiler:

It all continues as normal from there!

I'm using a LeafGreen ROM, Pokéscript, and it's a person script.
 
Last edited:
This is my script for skipping the tutorial battle. The part that it isnt jumping to is bolded:

Spoiler:

Spoiler:
Fixed in bold.
 
I'm using Pokéscript :D
Spoiler:


The whole script works up until the line:
Spoiler:


Then a wierd box appears in the top right-hand corner. It looks like a text box, except smaller. If I keep pressing A, I hear a few beeps and then I'm at the line:
Spoiler:

It all continues as normal from there!

I'm using a LeafGreen ROM, Pokéscript, and it's a person script.

Script seems fine, try removing the \v\h01 and the \c\h01\.
I know it sounds weird but I also got some problems with the text line with it and without it I did not have those weird boxes.
But I haven't figured out why it happens and how to solve it.
 
I fixed the starting battle to where its a normal battle the problem comes after it. Instead of him saying goodbye he just stands there like a normal trainer. When you walk out and walk back in to the trigger, he says where are you goin lets battle walks to the wrong part of the screen and then walks out. How do I fix it to where he walks out like normal after being beaten? Should I make another trigger event that does the same thing the other is not doing?

In my experience, if you want the tutorial battle, you change the third parameter to 0x3. If you want the script to continue after the battle, change the first parameter to 0x9. For example:
-beginning of script-
Trainerbattle 0x9 0x1 0x0 @before @end
Goto @continue
Release
End

#org @continue
-end of script-

For me the trainerbattle 0x 0x 0x @before @end @continue doesn't work, I think it did once, but after that I got an XSE error saying I used too kuch parameters.
 
In my experience, if you want the tutorial battle, you change the third parameter to 0x3. If you want the script to continue after the battle, change the first parameter to 0x9. For example:
-beginning of script-
Trainerbattle 0x9 0x1 0x0 @before @end
Goto @continue
Release
End

#org @continue
-end of script-

For me the trainerbattle 0x 0x 0x @before @end @continue doesn't work, I think it did once, but after that I got an XSE error saying I used too kuch parameters.
If you use trainerbattle 0x1 you can continue after the battle as well, but only if you win, and this is how Gym Leaders are done... I think there's also one to continue if you lost... although I'm not sure...
 
If you use trainerbattle 0x1 you can continue after the battle as well, but only if you win, and this is how Gym Leaders are done... I think there's also one to continue if you lost... although I'm not sure...

Trainerbattle 0x03 continues script after battle by default.

Trainerbattle 0x09 is the one that displays text win you win or lose.
 
Last edited:
Trainerbattle 0x03 continues script after battle by default.

Trainerbattle 0x09 is the one that displays text win you win or lose.

Yup, just found 0x09 out, and posted it in one of the tutorial threads, but 0x03? don't you mean trainerbattle 0x09 0xtrainerID 0x03 @win @lose ?

Alright, so I have quite an interesting set of bugs with the following script. It's a level script I made for the heck of it to test out this. That's an instant move camera for RS. But if you combine it with some ASM posted 5 posts down, you can use it in FR as well. So that's what I did.

Here's my script:
Spoiler:

So here's what goes wrong: Nothing actually ^^
The whole script works fine, but... once it ends, I can't move. After a few seconds it says. [player] received the ????????? item. THen it comes up with the coin menu, 0 coins. Then a message box comes up with a repeating word. qÁF qÁF qÁF qÁF qÁF qÁF
Which goes on forever...

I'm not sure why this happens at all, but it seems that someone else in this thread has the same problem, so that's why I'm relating it to the instant move camera part of my script...

I know this is quite hard to solve, but if anyone has any insight into how to fix this, or any slight ideas on what it may be, help would be appreciated!
 
Last edited:
Status
Not open for further replies.
Back
Top