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

PlatniumPiano

You are now breathing manually
479
Posts
15
Years
Hi,
I wanted to make a Script but it failed xD
Here's my Script
Spoiler:


The person should talk to me and then go 4 steps right and face down and then disappear.
But everytime I'm talking to the person the message "This tree looks like it can be CUT down" appears

What's wrong in my Script??

Hmm. I'm thinking that it may be overwritten by the cut script, like the bytes got intermingled somehow... Try recompiling the script with some more free space, see if that works?
 
18
Posts
14
Years
  • Seen Oct 3, 2016
Call me a noob but what is the script to cut trees? I have only just started scripting. Thanks :)
 

cooley

///Keepin' it simple
1,148
Posts
17
Years
Hmm. I'm thinking that it may be overwritten by the cut script, like the bytes got intermingled somehow... Try recompiling the script with some more free space, see if that works?
No that's not the problem.. He/she's using XSE, and the CUT script is nowhere near the offset he used. He/she probably just forgot to change the script offset of the person. This happens when you change a person's sprite instead of making a new one :p

Call me a noob but what is the script to cut trees? I have only just started scripting. Thanks :)

Directly from the Script Dumps:

Code:
'Person #2
'-----------------------
#org 0x1BDF13
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
lockall
checkflag 0x821
if 0x0 goto 0x81BDF87
checkattack 0xF
compare LASTRESULT 0x6
if 0x1 goto 0x81BDF87
setanimation 0x0 LASTRESULT
bufferpokemon2 0x0 LASTRESULT
bufferattack 0x1 0xF
msgbox 0x81BDF94 '"This tree looks like it can be CUT\..."
callstd 0x5
compare LASTRESULT 0x0
if 0x1 goto 0x81BDF91
msgbox 0x81BDFD7 '"[buffer1] used [buffer2]!"
callstd 0x4
closeonkeypress
doanimation 0x2
waitstate
goto 0x81BDF76
end

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

'-----------------------
#org 0x1BDF87
msgbox 0x81BDFE3 '"This tree looks like it can be CUT\..."
callstd 0x3
releaseall
end

'-----------------------
#org 0x1BDF91
closeonkeypress
releaseall
end

'-----------------------
#org 0x1BDF76
applymovement LASTTALKED 0x81BDF85
waitmovement 0x0
hidesprite LASTTALKED
releaseall
end


'-----------
' Movements
'-----------
#org 0x1BDF85
#raw 69 'mov69
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x1BDF94
= This tree looks like it can be CUT\ndown!\pWould you like to CUT it?

#org 0x1BDFD7
= [buffer1] used [buffer2]!

#org 0x1BDFE3
= This tree looks like it can be CUT\ndown!
 

Doom Chaos

I don't have a title
44
Posts
15
Years
I have a problem (more like a request -_-''). I want to create a script that would work like this:
After I deliver OAK's Parcel to OAK, I leave the town. But as soon as I go to the next map, the rival arrives in front of me for a battle (similar to Pokémon Gold). If I win, he leaves by going to the Route (in this case, he would go 9 spots left than he would go up until he leaves the screen). If I lose, I go back to Pallet Town (so I have to battle him again). How do I do that?

And I don't want OAK to look for me and go to his lab at the beginning of the game. I want OAK to be in the lab already and already ready to let me choose a Pokémon (and this time, without the rival. I would talk to OAK without the rival).

Both are vey similar to Pokémon Gold, so it shouldn't be too hard to understand what I am saying.
 

Doom Chaos

I don't have a title
44
Posts
15
Years
Any script activated at the begging of the player entering a map is a level script.

I tried deleting the OAK script, if I delete it, I can never receive the Pokémon at the lab. If I delete the script, I have to add an event that will allow me to get a Pokémon (if OAK isn't in the lab, I can't take a Pokémon, OAK must be there). How do I do to create a script that will enable me to take one Pokémon?

Sorry for all the problems I've been having recently :S


EDIT: I tried a level script, but it doesn't work the way it should. The rival doesn't appear, only it's textbox (but the battle still occures). I need a script that makes him move right in front of me, talk, battle, talk and leaves (becomes hidden). Dang nothing goes as planned.
 
Last edited:

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
Here is what it should look like...

Code:
#dynamic 0x800000
 
#org @start
lock
faceplayer
msgbox @orange MSG_YESNO
compare LASTRESULT 0x1
if 0x1 goto @warp
release
end
 
#org @warp
warp 0x4 0x1 0xFF 0x2 0x6
 
#org @orange
= Would you like to go to the\nORANGE ISLANDS now?,be aware that\pyou can't come back...

Keep in mind, that's the minimum amount of code for this script to work.
You may want to add another message box if you say no, but that's not neccesary. Also, notice that there is no "end" command after the @warp pointer. This is because a warp always ends a script.
Find some free space in your game, and put that code in your hack. Let me know if it works ^_^

Please Rep For Help

Absolutely wrong. The warp command doesn't end anything. You should always use waitstate and end after it:

Code:
warp 0x4 0x1 0xFF 0x2 0x6
waitstate
end


I tried deleting the OAK script, if I delete it, I can never receive the Pokémon at the lab. If I delete the script, I have to add an event that will allow me to get a Pokémon (if OAK isn't in the lab, I can't take a Pokémon, OAK must be there). How do I do to create a script that will enable me to take one Pokémon?

Sorry for all the problems I've been having recently :S


EDIT: I tried a level script, but it doesn't work the way it should. The rival doesn't appear, only it's textbox (but the battle still occures). I need a script that makes him move right in front of me, talk, battle, talk and leaves (becomes hidden). Dang nothing goes as planned.

You can't just delete the level script. The level script will sure set some vars that are laters checked to let you get your first Pokémon.
 

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
Can anyone help me?
When this script finishes game freeze and I can't continue

Spoiler:
 

Doom Chaos

I don't have a title
44
Posts
15
Years
You can't just delete the level script. The level script will sure set some vars that are laters checked to let you get your first Pokémon.

Yeah, I know I can't just delete it, it's like a chain reaction, I need one to continue with the others. So what do I do to enable the choice of which starter (I want to delete OAK and RIVAL and replace OAK with a different script) just by entering the Lab? Example, in Shiny Gold, all you need to do is walk in the lab and everything is done the way it should, I just don't know how to do that. And for the level script, how do I make sure the RIVAL walks right in front of me and walks away when the battle is over (only his textbox appears, probably missing something in the script)?
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Can anyone help me?
When this script finishes game freeze and I can't continue

Spoiler:

ya forgot #raw 0xFE in your movement list.
;)
 
Last edited:
11
Posts
14
Years
  • Seen May 17, 2010
Game: Pokemon Fire Red
Type: Person Event
Editor: XSE
Script:
Spoiler:



So I wrote this script for the beginning of my game, the only problems are
  • after asking would you like to nickname your pokemon, the person stops talking
  • absol's data is not added to the pokedex after you get him
  • the person does not stay gone, he reappears as soon as I move
could anyone help me fix any of these problems
 

Doom Chaos

I don't have a title
44
Posts
15
Years
Game: Pokemon Fire Red
Type: Person Event
Editor: XSE
Script:
Spoiler:



So I wrote this script for the beginning of my game, the only problems are
  • after asking would you like to nickname your pokemon, the person stops talking
  • absol's data is not added to the pokedex after you get him
  • the person does not stay gone, he reappears as soon as I move
could anyone help me fix any of these problems
For the person does not stay gone thing, give the event a Person ID (I use 01CD, I don't know if it has to be different for every events).
 

onyx79

Red Dead Revolver
488
Posts
15
Years
I've got a script problem:

Spoiler:


this is a script that when you beat the boss he and all of his trainers dissapear,however when I beat him he only gives me the TM,then I talk with him again and he dissapears,but the other tariners do not,what to do?
 
11
Posts
14
Years
  • Seen May 17, 2010
For the person does not stay gone thing, give the event a Person ID (I use 01CD, I don't know if it has to be different for every events).
Thanks, it worked fine (for the disappearing part anyway) after I figured out I had to put special 0x174 in the code.

Edit1:still need help with the other two problems though (not adding pokedex data, and not being able to talk after asking a question).

Edit2: fixed the problem with no pokedex data for the starter, I needed the national dex so I changed my script so that you get it (I feel so stupid). Now all I need to know is how to fix my script so that I can nickname absol if I want when I get it.

Edit3: I completely fixed it on my own. Just in case anyone else wants to make a person who gives you a national dex, and absol, and then disappears (and then you can choose whether or not to nickname it), the code is below

Spoiler:
 
Last edited:
43
Posts
14
Years
Script Help

Game: Fire Red (US)
Type: Person
Editor: Pokescript
Script:
Spoiler:

For some reason, my script, when compiled and burnt into the ROM looks like this when I view it:
Spoiler:


The end result of the script is when I talk to the person (Prof. Oak, in this case), he just walks to the left and faces right, then the game freezes up.

EDIT: D'oh! I forgot the boxset command, so that explains why the text doesnt show up, but why does it turn into things like "showcontestwinner" in the ROM?
 

ckret2

usually pronounced "secret 2"
518
Posts
15
Years
I've been trying for weeks now to make a script that makes it impossible to progress in the game until you battle and defeat a wild Pokémon. The good news is that I succeeded. Yay. The bad news is that it's still possible to catch the Pokémon in battle. So, hypothetically, you could come up to the Pokémon with ten Poké Balls, battle it, catch it, rebattle and recatch it, until you've caught it ten times, and then make it faint and then you'd progress in the game. Which is silly. However, aside from making it impossible to bring any Poké Balls into the battle (which I am more than willing to do, but I'd like a "cleaner" solution if possible), I can't find a way to make it impossible to catch the Pokémon. Any ideas?

It's in a FireRed hack, and made with XSE. Here's the script as it is so far. Well, with extraneous scripting irrelevant to the issue removed and with the dialogue changed, but this is the gist of it:

#dynamic 0xOFFSET
#org @start
lock
faceplayer
wildbattle 0x69 0xB 0x0
special2 0x800D 0xB4
compare 0x800D 0x1
if 0x1 goto @beat
compare 0x800D 0x4
if 0x1 goto @ranaway
msgbox @caughtit 0x6
release
end

#org @ranaway
msgbox @tryagainlater 0x6
release
end

#org @beat
msgbox @youwon 0x6
setflag 0x100
release
end

#org @tryagainlater
= Maybe I'll come back later.

#org @youwon
= Yeah! I beat it!

#org @caughtit
= Well, I guess I caught it, huh?
end

So far as I can tell, I'm the first person to dissect and make use of special2 0xB4 in a script, so here's a mini-tutorial on how it functions and why I set it up like I did. (And if someone HAS figured out special2 0xB4 before me, I apologize for presuming to be the first, although I must mention that I've been all over this site trying to figure out how the heck it works and must humbly ask why the wisdom wasn't shared, as it would have saved me a lot of time.)

Given the above, is there any way to make it impossible to throw a Poké Ball at the Pokémon in battle, apart from a) making Poké Balls unavailable until after the battle, b) inserting a script that throws all your Poké Balls away and/or sends them to the PC, c) making the Pokémon a ghost, or d) making the Pokémon's catch rate 0 and making sure Master Balls aren't available yet? (Speaking of which, I don't actually know if Master Balls work on Pokémon with a catch rate of 0.) Is there some special, some form of wildbattle, something? (I know the original Ghost Marowak script uses wildbattle2 but don't know what that does. I'm afraid it'll just turn the Pokémon into a ghost.)
 

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
Game: Fire Red (US)
Type: Person
Editor: Pokescript
Script:
Spoiler:

For some reason, my script, when compiled and burnt into the ROM looks like this when I view it:
Spoiler:


The end result of the script is when I talk to the person (Prof. Oak, in this case), he just walks to the left and faces right, then the game freezes up.

EDIT: D'oh! I forgot the boxset command, so that explains why the text doesnt show up, but why does it turn into things like "showcontestwinner" in the ROM?

Uhm... may I suggest you using the newest XSE perhaps?

Spoiler:



I've been trying for weeks now to make a script that makes it impossible to progress in the game until you battle and defeat a wild Pokémon. The good news is that I succeeded. Yay. The bad news is that it's still possible to catch the Pokémon in battle. So, hypothetically, you could come up to the Pokémon with ten Poké Balls, battle it, catch it, rebattle and recatch it, until you've caught it ten times, and then make it faint and then you'd progress in the game. Which is silly. However, aside from making it impossible to bring any Poké Balls into the battle (which I am more than willing to do, but I'd like a "cleaner" solution if possible), I can't find a way to make it impossible to catch the Pokémon. Any ideas?

It's in a FireRed hack, and made with XSE. Here's the script as it is so far. Well, with extraneous scripting irrelevant to the issue removed and with the dialogue changed, but this is the gist of it:

[...]

So far as I can tell, I'm the first person to dissect and make use of special2 0xB4 in a script, so here's a mini-tutorial on how it functions and why I set it up like I did. (And if someone HAS figured out special2 0xB4 before me, I apologize for presuming to be the first, although I must mention that I've been all over this site trying to figure out how the heck it works and must humbly ask why the wisdom wasn't shared, as it would have saved me a lot of time.)

Given the above, is there any way to make it impossible to throw a Poké Ball at the Pokémon in battle, apart from a) making Poké Balls unavailable until after the battle, b) inserting a script that throws all your Poké Balls away and/or sends them to the PC, c) making the Pokémon a ghost, or d) making the Pokémon's catch rate 0 and making sure Master Balls aren't available yet? (Speaking of which, I don't actually know if Master Balls work on Pokémon with a catch rate of 0.) Is there some special, some form of wildbattle, something? (I know the original Ghost Marowak script uses wildbattle2 but don't know what that does. I'm afraid it'll just turn the Pokémon into a ghost.)

Tip: avoid using quotes when posting a script. Quoting a quote will make it disappear. Either use
Code:
 for small ones or even better a [spoiler]. I'm sorry but you aren't the first one to figure the 0xB4 special2, he he. Anyway, wildbattle2 is exactly the same as wildbattle except it includes a special. In the Marowak ghost script, you can see:

[code]
wildbattle2 0x69 0x1E 0x0 0x6

That 0x6 stands for special 0x156. In this case, actually, the wildbattle is just fake because the real wildbattle is started by special 0x156. If you want, feel free to change the Pokémon species etc. You will get a Marowak ghost, no matter what. All your possible solutions aren't clean enough though. The first one, will not let the player have Poké Balls before the battle (or any other type of ball), which is not that good if you want to catch some other wild Pokémon midway. The second one is not so good as well, as it would look very weird to have some balls before the battle and then none of them as soon as the battle starts. Not to say the problems you would get counting and removing the exact amount of all the possible balls and then adding them back after the battle. Which might not even work at all, actually. The third one might be good, if the Pokémon wasn't turned into a ghost. The fourth one could be useful if and only if the non-catchable Pokémon isn't available elsewhere in the whole game. Besides that, it's not a clean solution either. So, what's my idea? I reversed the special 0x156 already therefore I would rather make an ASM routine to replicate it but without the ghost collateral effect. That way you can have whatever ball, even a Master Ball, and you wouldn't be able to catch the Pokémon. And it wouldn't be a ghost. For further details, let's continue this conversation via PM.
 
Status
Not open for further replies.
Back
Top