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

Legendary Silke

[I][B]You like dragons?[/B][/I]
5,925
Posts
13
Years
  • Age 30
  • Seen Dec 23, 2021
This is weird. I can't even give the player a preset Pokémon. It just crashes the game. Did I mess up somewhere?
Code:
#include stdpoke.rbh
#include stditems.rbh
#dynamic 0x9C1BEC

#org @givepkmn
checkflag 0x1019
if 0x1 call @skip
msgbox @startmsg 0x6
givepokemon PKMN_EEVEE 0xA ITEM_SITRUSBERRY 0x0 0x0 0x0
setflag 0x1019
setflag 0x860
end

#org @startmsg
= (Where am I?)\p(Oh, better check my Pokémon.)\p(I still have that Eevee. That's\ngood.)

#org @skip
end
 
228
Posts
13
Years
This is weird. I can't even give the player a preset Pokémon. It just crashes the game. Did I mess up somewhere?
Code:
#include stdpoke.rbh
#include stditems.rbh
#dynamic 0x9C1BEC
 
#org @givepkmn
checkflag 0x1019
if 0x1 call @skip
msgbox @startmsg 0x6
givepokemon PKMN_EEVEE 0xA ITEM_SITRUSBERRY 0x0 0x0 0x0
setflag 0x1019
setflag 0x860
end
 
#org @startmsg
= (Where am I?)\p(Oh, better check my Pokémon.)\p(I still have that Eevee. That's\ngood.)
 
#org @skip
end

I am not sure but you could change 'call @skip' into 'jump @skip' if that command exists in your script editor.
 

Legendary Silke

[I][B]You like dragons?[/B][/I]
5,925
Posts
13
Years
  • Age 30
  • Seen Dec 23, 2021
Huh. Deleting the message fixed the problem. Hmm... maybe I should make the message appear sometime else.
 

adhdguitar

Newbie Pokémon Hacker
210
Posts
13
Years
  • Seen Jan 16, 2015
I think for waitmovements you don't need the 0x[Person Id], what you really need there is waitmovement 0x0 (If you're using XSE)

If not, then show us the other parts you filled out in Advance Map (Like the Var Number and such).
The Var Number and Var value were both zero, since I'm not using a variable in the script. Maybe that's the problem?

Edit: I put a random variable there (5000) even though it isn't utilized and whatdaya know, it worked. :D
 
Last edited:
182
Posts
13
Years
  • Seen May 16, 2014
I'm not new to scripting(Pokesav user here), but I'm new to doing it via XSE, and I'm having a bit of trouble adjusting. I need to know how to combine two scripts in XSE, or just make a Multiscript? I don't know what the wording word be. I need to combine the Activate Running Shoes script and the Give Pokemon script, is it really as simple as just writing one under the other or do I need to do something special? I've looked at the tutorials, and its just not helping.
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
I'm not new to scripting(Pokesav user here), but I'm new to doing it via XSE, and I'm having a bit of trouble adjusting. I need to know how to combine two scripts in XSE, or just make a Multiscript? I don't know what the wording word be. I need to combine the Activate Running Shoes script and the Give Pokemon script, is it really as simple as just writing one under the other or do I need to do something special? I've looked at the tutorials, and its just not helping.

you can simply write those in one simple script.
#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x1000
if 0x1 goto @done
message @1 6
setflag 0x860
message @2 6
givepokemon 0x19 0x5 0x0 0x0 0x0 0x0
setflag 0x1000
release
end

#org @done
message @3 6
release
end

#org @1
= Hi. These are for you!

#org @2
= Those are RUNNING SHOES.\nAnd here. A PIKACHU for you!

#org @3
= Take care!

Script is for Ruby, but you get the idea.
You can combine different commands in a script to your liking.
 
54
Posts
15
Years
  • Seen May 21, 2011
Hey, I've got a couple of problems, and I can't honestly see what I've done wrong with these scripts...

Problem 1: A level script, when I enter the Professor's lab, a level script activates, then afterwords, it's supposed to deactivate and not repeat. I've set the var with a 0x1 command, but that doesn't seem to work... Could it have something to do with going inside a building rather than outside?

Here's the script:

Spoiler:



Problem 2: This next one is a very basic problem I'm sure, I couldn't find a tutorial for script events though... Anyway, I want my player to walk on the script tile, have a message pop up, then have them walk back, effectively blocking them until the flag is activated. If I set the var number in Advance Map, the player completely ignores the script tile as if it isn't there, yet if I remove the number, the game freezes when I step on it...

Script:
Spoiler:


I don't know if it has to do with setting vars in the script, but I'll try that next anyway.


Any help with these questions would be greatly appreciated.
 
9
Posts
13
Years
  • Seen May 23, 2011
Despite the face that indeed I am requesting a script my request for a new thread was denied and I was directed here. First the specs:
Game: Fire red
Type: US
Script editor: PKSV
What I want my script to accomplish: I am trying to make it so that when the player has two particular Pokemon in their party and talks to a particular character, that character will offer to combine them and create a new Pokemon.
Similar scripts I've been trying to use: I realize that in actuality this script would be very similar to in-game trading, however I can't make heads or tails of the script despite the fact that many other scripts make sense to me. I'm just stumped when I look at it. (In particular I've been looking at the bald guy's script in cerulean city):
Spoiler:

So for me this is a bust. I break it down into what I want to happen. Remove 2 pokemon and add one. It is at this point I discover ASM. I understand ASM less than I do greek and I understand ASM tutorials less than I do ASM. But I happen upon this thread pokecommunity.com/showthread.php?t=167889 and figure I can use it but again I am stuck I have no idea how to make sure that the player is choosing the correct pokemon to trade (I replaced rattata and raticate). So of two options it comes down to me not understanding the code... If anyone can offer ANY help I would GREATLY appreciate it. THANKS IN ADVANCED! And I'm sorry if this is not within the scope of this thread, as I said the moderator would not let me make my own thread.
 
182
Posts
13
Years
  • Seen May 16, 2014


you can simply write those in one simple script.


Script is for Ruby, but you get the idea.
You can combine different commands in a script to your liking.

Thank you very much! I fiddled around and got it, after much trial and error. I even added a fanfare and fadescreen. Lol. Is it possible to combine any scripts though. I need to make a script where someone would give you a Pokemon, then walk out of the room. I can make the Give Pokemon script fine, and the Apply Movement one, but I don't know how to put them together. Would it be kind of like what you showed me? Ugh, more trial and error.
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Hey, I've got a couple of problems, and I can't honestly see what I've done wrong with these scripts...

Problem 1: A level script, when I enter the Professor's lab, a level script activates, then afterwords, it's supposed to deactivate and not repeat. I've set the var with a 0x1 command, but that doesn't seem to work... Could it have something to do with going inside a building rather than outside?

Here's the script:

Spoiler:

In the Header, where you've set up your level script, you placed 4001 as the Flag and 0000 as the Value?


Problem 2: This next one is a very basic problem I'm sure, I couldn't find a tutorial for script events though... Anyway, I want my player to walk on the script tile, have a message pop up, then have them walk back, effectively blocking them until the flag is activated. If I set the var number in Advance Map, the player completely ignores the script tile as if it isn't there, yet if I remove the number, the game freezes when I step on it...

Script:
Spoiler:


I don't know if it has to do with setting vars in the script, but I'll try that next anyway.


Any help with these questions would be greatly appreciated.

Which "var number" are you using for this script? If it's, say, 4002, an easier way would probably be to just use variables than flags. Whatever script you're using to set flag 0x1010, try changing it to setvar 0x4002 0x1 (in place of setflag 0x1010).

Then just have the script you want for blocking the player to be var number 4002 and var value 0000. (You can have the variable be whatever you want though - 4002 is just an example).

Then you can just remove the:

Code:
checkflag 0x1010
if 0x1 goto 0x88145A8

part from the script altogether.
 
228
Posts
13
Years
Despite the face that indeed I am requesting a script my request for a new thread was denied and I was directed here. First the specs:
Game: Fire red
Type: US
Script editor: PKSV
What I want my script to accomplish: I am trying to make it so that when the player has two particular Pokemon in their party and talks to a particular character, that character will offer to combine them and create a new Pokemon.
Similar scripts I've been trying to use: I realize that in actuality this script would be very similar to in-game trading, however I can't make heads or tails of the script despite the fact that many other scripts make sense to me. I'm just stumped when I look at it. (In particular I've been looking at the bald guy's script in cerulean city):
Spoiler:

So for me this is a bust. I break it down into what I want to happen. Remove 2 pokemon and add one. It is at this point I discover ASM. I understand ASM less than I do greek and I understand ASM tutorials less than I do ASM. But I happen upon this thread pokecommunity.com/showthread.php?t=167889 and figure I can use it but again I am stuck I have no idea how to make sure that the player is choosing the correct pokemon to trade (I replaced rattata and raticate). So of two options it comes down to me not understanding the code... If anyone can offer ANY help I would GREATLY appreciate it. THANKS IN ADVANCED! And I'm sorry if this is not within the scope of this thread, as I said the moderator would not let me make my own thread.

If I'm right, then there's a command called checkpokemon. You could first check or the 2 Pokemon are in the party, then use HackMews script do take them away, and then use addpokemon to give the player a new Pokemon.
 
54
Posts
15
Years
  • Seen May 21, 2011
In the Header, where you've set up your level script, you placed 4001 as the Flag and 0000 as the Value?




Which "var number" are you using for this script? If it's, say, 4002, an easier way would probably be to just use variables than flags. Whatever script you're using to set flag 0x1010, try changing it to setvar 0x4002 0x1 (in place of setflag 0x1010).

Then just have the script you want for blocking the player to be var number 4002 and var value 0000. (You can have the variable be whatever you want though - 4002 is just an example).

Then you can just remove the:

Code:
checkflag 0x1010
if 0x1 goto 0x88145A8
part from the script altogether.



Thanks for the help. As for the first problem, the flag is set to 4001 and value at 0000 in the header. It's a 02 script type, I don't know if that might be the problem...?
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Thanks for the help. As for the first problem, the flag is set to 4001 and value at 0000 in the header. It's a 02 script type, I don't know if that might be the problem...?

You haven't used variable 4001 in the game before, right?
Try a different variable in the script, and make it's the same as the flag in the Header.
Maybe even try moving the setvar command to the top of the script, to make sure it gets set as soon as the script starts.
 
54
Posts
15
Years
  • Seen May 21, 2011
You haven't used variable 4001 in the game before, right?
Try a different variable in the script, and make it's the same as the flag in the Header.
Maybe even try moving the setvar command to the top of the script, to make sure it gets set as soon as the script starts.

Alright, finally got it to work, I think it had to do with an in-use var.

Thanks alot for all the help.
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Thank you very much! I fiddled around and got it, after much trial and error. I even added a fanfare and fadescreen. Lol. Is it possible to combine any scripts though. I need to make a script where someone would give you a Pokemon, then walk out of the room. I can make the Give Pokemon script fine, and the Apply Movement one, but I don't know how to put them together. Would it be kind of like what you showed me? Ugh, more trial and error.

yah, you can make a script with all commands, except for the warp command.
the warp command always ends the script, even though your script still has other commands following the warp...

anyway...

Code:
#dynamic 0x800000

#org @start
lock
faceplayer
message @1 6
givepokemon 0x16 0x5 0x0 0x0 0x0 0x0
message @2 6
applymovement 0x2 @m1
waitmovement 0x2
setflag 0x1001
release
end

#org @1
= You! This POKéMON!\nTake it, now!

#org @2
= Take care of it!\nGoodbye!

#org @m1
#raw 0x05 0x05 0x05 0x54 0xFE

I don't have the movement list, but you get the idea. You can combine any commands, except for the warp command, in one script. ;)
There are tutorials on how to properly use the applymovement command, though.
 
182
Posts
13
Years
  • Seen May 16, 2014


I don't have the movement list, but you get the idea. You can combine any commands, except for the warp command, in one script. ;)
There are tutorials on how to properly use the applymovement command, though.

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.
 
228
Posts
13
Years
I've a problem. I tried to make a script similair to the script where Mr. Briney and the player enter the boat, both disappear, and then the boat moves. However, upon making the player disappear, I suddenly gain control of an NPC, which is the sailor that disappeared too which suddenly reappears. The tilesets glitch up too. Here's the script, and if you want, then I can upload a video showing the effect. By the way, this is for PKSV, but 'disappear' has the same effect as 'hidesprite' if I'm right.
Spoiler:


Any help would be appreciated. And I'm still not done, after disappear 0xFF which makes the player disappears is coming an applymovement for the sailer, the player and the boat.
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
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 need to hide the NPC you are trying to remove once they have finished their movements. Use the command 'hidesprite' which is constructed in this way:
Code:
hidesprite [Person's HEX number]

As for the pixilated menu, I believe you have overwritten some free space that was actually being used. Have a look at this post to restore it, but keep in mind that you will have to redo the thing that you inserted at that spot.

I've a problem. I tried to make a script similair to the script where Mr. Briney and the player enter the boat, both disappear, and then the boat moves. However, upon making the player disappear, I suddenly gain control of an NPC, which is the sailor that disappeared too which suddenly reappears. The tilesets glitch up too. Here's the script, and if you want, then I can upload a video showing the effect. By the way, this is for PKSV, but 'disappear' has the same effect as 'hidesprite' if I'm right.
Spoiler:


Any help would be appreciated. And I'm still not done, after disappear 0xFF which makes the player disappears is coming an applymovement for the sailer, the player and the boat.

You shouldn't be disappearing the player :<

You could split the script into two pieces - Keep the this part the same, but instead of disappearing the player you warp them to the same place you were going to arrive. Make a level script for when the boat has docked, you have arrived and continue the script on from there. This would make it similar to the script when you're moving between the Sevii Isles.
 

colcolstyles

Yours truly
1,588
Posts
15
Years
I've a problem. I tried to make a script similair to the script where Mr. Briney and the player enter the boat, both disappear, and then the boat moves. However, upon making the player disappear, I suddenly gain control of an NPC, which is the sailor that disappeared too which suddenly reappears. The tilesets glitch up too. Here's the script, and if you want, then I can upload a video showing the effect. By the way, this is for PKSV, but 'disappear' has the same effect as 'hidesprite' if I'm right.
Spoiler:


Any help would be appreciated. And I'm still not done, after disappear 0xFF which makes the player disappears is coming an applymovement for the sailer, the player and the boat.

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.
 
Status
Not open for further replies.
Back
Top