• 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?".
  • 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.
241
Posts
11
Years
Ok now I have my own question.

I'm editing the Nurse Joy script to make you pay based on how many badges you have. Everything is working, except that the when it checks if you have enough money I think it checks for $0x4001 ($16385) instead of what is stored in that variable...

Or at least, it doesn't think I have enough money when I test it, even though I do.

Any thoughts?

Spoiler:
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Ok now I have my own question.

I'm editing the Nurse Joy script to make you pay based on how many badges you have. Everything is working, except that the when it checks if you have enough money I think it checks for $0x4001 ($16385) instead of what is stored in that variable...

Or at least, it doesn't think I have enough money when I test it, even though I do.

Any thoughts?

Spoiler:

Checkmoney checks if the player has the amount of money specified where you tried to put the var. It works like checkflag does essentially.

So, you would use it to see if the player has enough money to pay for his/her purchase.
 
6
Posts
11
Years
  • Seen Jan 12, 2017
Spoiler:

I've written this script, and it crashes the game if you walk on the scripttile. I've written a couple scripts and the only ones that don't work have applymovement in them, so I think the problem lies there, but i'm not sure. I'm being very ambitious, and try to make scripts while i don't fully understand the language. I try to learn it good though, some help would be appriciated...
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Spoiler:


I've written this script, and it crashes the game if you walk on the scripttile. I've written a couple scripts and the only ones that don't work have applymovement in them, so I think the problem lies there, but i'm not sure. I'm being very ambitious, and try to make scripts while i don't fully understand the language. I try to learn it good though, some help would be appriciated...

With scripts that go on script tiles, they require a var and value correct? Well, the script will only run if that var equals that value, so just use a setvar at the end of your script to disable. Easy and simple, no more flags for these type of scripts.

That being said, there are only two problems that I see:

-verify that message is a command. I'm not sure since I always use msgbox.

-[player} should be [player]

Hope this helps.
 
17
Posts
11
Years
  • Seen Mar 4, 2013
Okay so if I am understanding your suggestions correctly, I should make the warp that goes IN to the houses not be a warp at all, but instead be a script event that acts like a warp. I haven't filled in the warp data for the other warps but I just want to confirm.

Script:
Spoiler:


Also I'll see if there are other applications which I can use this script for :3 (probably for making character-based events that only happen during certain points in the game)

I'm not sure if "else" command works since that's more of a visual basic term (what little VB I know XD) so yeah thought I'd double-check with you guys before I go destroy all the hard work I already have done :P
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Okay so if I am understanding your suggestions correctly, I should make the warp that goes IN to the houses not be a warp at all, but instead be a script event that acts like a warp. I haven't filled in the warp data for the other warps but I just want to confirm.

Script:
Spoiler:


Also I'll see if there are other applications which I can use this script for :3 (probably for making character-based events that only happen during certain points in the game)

I'm not sure if "else" command works since that's more of a visual basic term (what little VB I know XD) so yeah thought I'd double-check with you guys before I go destroy all the hard work I already have done :P

I understand your thoughts, but "else" will not work. If it doesn't jump after the last flag, it will do what your "else" line says, without the "else".
 
241
Posts
11
Years
Checkmoney checks if the player has the amount of money specified where you tried to put the var. It works like checkflag does essentially.

So, you would use it to see if the player has enough money to pay for his/her purchase.

So basically the only way to do it is to have 8 calls that check each amount of money separately? Will checkmoney never understand a var value?
 
241
Posts
11
Years
Thanks.

I added the checks, and now that works as well, however...

Now, once you get a badge, everything goes smoothly until the end of the script, but it repeats the end part of the script about 4 times...I can't find what is causing the loop, or any reason for it to occur 4 times before ending...

Since the checks make this quite a bit longer, I'll show the dynamic script to make following along a little easier.

Spoiler:


Also, is it necessary to have release and/or end at the end of portions of script that will never be completed? Something that sends you to another portion of a script and doesn't come back, for instance...
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Thanks.

I added the checks, and now that works as well, however...

Now, once you get a badge, everything goes smoothly until the end of the script, but it repeats the end part of the script about 4 times...I can't find what is causing the loop, or any reason for it to occur 4 times before ending...

Since the checks make this quite a bit longer, I'll show the dynamic script to make following along a little easier.

Spoiler:


Also, is it necessary to have release and/or end at the end of portions of script that will never be completed? Something that sends you to another portion of a script and doesn't come back, for instance...

Don't use return at the end of @ending, just end the script, other wise it takes you back to what called it, which also has other calls to @ending.
 
416
Posts
11
Years
  • Age 35
  • Seen Feb 10, 2024
so i made an event in Fire Red where the 2 dogs that you dont get roaming, are chilling in various places...

as far as which dog shows up where depending on your starter, it works fine...

BUT after catching the dog, he does not dissapear, only after killing or running...

and when he does dissapear... he takes the other event dog (totally different flags) with him... so you can only get one of them... I DONT GET IT... these 2 new events are unrelated... they are on different maps with different flags, the only similarity is that they work the same way and are turned off and on at the same time (the flags are set in mt moon at the fossils and cleared on One Island)

if anyone thinks they can help I would love you forever

Here are the dog events, if you need any other scripts (map scripts, the setflag or clearflag event scripts or whatever) just ask

Mystical Dog 1:
Spoiler:


Mystical Dog 2:
Spoiler:


UPDATE:
now my Mew event (that used to work properly) is also not dissapearing... :( I havent even worked on mew in a long time...
 
Last edited:

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
so i made an event in Fire Red where the 2 dogs that you dont get roaming, are chilling in various places...

as far as which dog shows up where depending on your starter, it works fine...

BUT after catching the dog, he does not dissapear, only after killing or running...

and when he does dissapear... he takes the other event dog (totally different flags) with him... so you can only get one of them... I DONT GET IT... these 2 new events are unrelated... they are on different maps with different flags, the only similarity is that they work the same way and are turned off and on at the same time (the flags are set in mt moon at the fossils and cleared on One Island)

if anyone thinks they can help I would love you forever

Here are the dog events, if you need any other scripts (map scripts, the setflag or clearflag event scripts or whatever) just ask

Mystical Dog 1:
Spoiler:


Mystical Dog 2:
Spoiler:

Look in JPANs study on specials. Special B4 does not ever return 0x5, I don't know why people think it does. It returns 0x7 for capture.

Could you please post a link of where you learned special b4 from?

I can't fix the other problem off of the top of my head, and I don't have time to look at it right now, but I will download your scripts and look at them in study hall tomorrow.
 
241
Posts
11
Years
Don't use return at the end of @ending, just end the script, other wise it takes you back to what called it, which also has other calls to @ending.

I thought that was it too, and I tried making both @ending and @what finish with "end," but it did nothing. And those are actually there from the original Nurse Joy script, and it doesn't repeat then...
 
416
Posts
11
Years
  • Age 35
  • Seen Feb 10, 2024
Look in JPANs study on specials. Special B4 does not ever return 0x5, I don't know why people think it does. It returns 0x7 for capture.

Could you please post a link of where you learned special b4 from?

I can't fix the other problem off of the top of my head, and I don't have time to look at it right now, but I will download your scripts and look at them in study hall tomorrow.

I know it returns 7 for capture... and that is not used in the script, that is used in the map script (On entering map/on menu close [05])
Spoiler:


I dont know what 5 is... but the reason people put it in their scripts like that is because ALL nintendo events have it exactly like that... 4 and 5 show the same jump offset... im not gonna mess with nintendos plan... they use 5 for something...

I tried putting 0x7 and having it disappear (event number) but it did not work

but I found out why they were not disappearing after yoiu caught them (it was the level script posted above, I forgot it on one of them)

but they are still disapearing together... and idk y... they are not supposed to... meanieheads
 
Last edited:

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
I know it returns 7 for capture... and that is not used in the script, that is used in the map script (On entering map/on menu close [05])
Spoiler:


I dont know what 5 is... but the reason people put it in their scripts like that is because ALL nintendo events have it exactly like that... 4 and 5 show the same jump offset... im not gonna mess with nintendos plan... they use 5 for something...

I tried putting 0x7 and having it disappear (event number) but it did not work

but I found out why they were not disappearing after yoiu caught them (it was the level script posted above, I forgot it on one of them)

but they are still disapearing together... and idk y... they are not supposed to... meanieheads

Either way:

From JPAN's Study or the Special and Special2 commands.
0B4 after battle, ceratin variables are set. b4 reads them and places on a given variable the status at battle end. *key 0x1 = fainted, 0x7 = captured, 0x4 = escaped*

I will look into why they disappear together. Just curious, it is the flags that are 202 and 204 that are set as the person I.D.'s in A-map, correct?
 
416
Posts
11
Years
  • Age 35
  • Seen Feb 10, 2024
no the person ids are as follows:
Spoiler:

ID 1 is the person ID for event 1, and ID 2 is for event 2

202 and 204 are flags for Event 1 and Event 2... its hard to explain

but id say, look at mewtwo... his person id is 81 but his event flag is 2BC

its like person ids are for the sprite, but the event script has its own flag aswell...
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
no the person ids are as follows:
Spoiler:

ID 1 is the person ID for event 1, and ID 2 is for event 2

202 and 204 are flags for Event 1 and Event 2... its hard to explain

but id say, look at mewtwo... his person id is 81 but his event flag is 2BC

its like person ids are for the sprite, but the event script has its own flag aswell...

It doesn't need to be done that way, if the sprite disappears with a flag set, the script obviously won't happen again.
 

Collen

I have returned.
71
Posts
14
Years
  • Seen Jan 1, 2015
I am having some trouble with a green 'S' script. Essentially, this script is supposed to show a message to the player and then have the player - along with an NPC - walk around a table together, at which point a message is displayed and the player is set free. Flag 204 is set, and if the player has not picked up a Pokemon yet they're yelled at and the player steps up, preventing them from leaving.

The only problem is the game freezes when the script is activated. I'm not sure what's wrong with it, so maybe someone could help me?

I'm using XSE.

Spoiler:
 

Blah

Free supporter
1,924
Posts
11
Years
I am having some trouble with a green 'S' script. Essentially, this script is supposed to show a message to the player and then have the player - along with an NPC - walk around a table together, at which point a message is displayed and the player is set free. Flag 204 is set, and if the player has not picked up a Pokemon yet they're yelled at and the player steps up, preventing them from leaving.

The only problem is the game freezes when the script is activated. I'm not sure what's wrong with it, so maybe someone could help me?

I'm using XSE.

Spoiler:

Change the var number to "5240" and the unknown to "03 00", without quotes obviously.
 
Status
Not open for further replies.
Back
Top