• 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.
23
Posts
16
Years
I got my script that gives the player the Poliwhirl working but the script that tells the player that they forgot the Poliwhirl isn't. The player is just walking through the script box stopping for about half a second then nothing happens.

Heres the script in PKSV if you want it.

Code:
#org 0x880084D
'-----------------------------------
lockall
msgbox 0x880087C ' Oops!\nI forgot my P...
applymovement 0x1 0x880087A ' say_! end
pauseevent 0x0
cleartrainerflag 0x7070
release
addpokemon 0x6F6D 118 0x6D65 0x6F 0x3120746E 0x6F6D2420
hidepokepic
spritebehave 0x2032 0x51
nop0 ' #raw 0x0
nop0 ' #raw 0x0
release
end


#org 0x880087C
= Oops!\nI forgot my POLIWHIRL on the\ltable.

#org 0x880087A
M say_! end
 
Last edited:

deoxys121

White Kyurem Cometh
1,254
Posts
13
Years
Pokemon Ruby Nat'l Dex Script

I found out how to create a script that will give you the National Pokedex. And it works. It's all thanks to this YouTube video:



Here's the script I came up with from this video I found. I take no credit for writing the script, I'm simply sharing it to help fellow hackers.

Code:
#org 0x<offset>
lock
faceplayer
checkflag 0x<flag>
writebytetooffset 0x2 0x2026B00
writebytetooffset 0x3 0x2026B01
writebytetooffset 0xDA 0x2024EBE
writebytetooffset 0x67 0x2026A5A
clearflag 0x<flag>
release
end
 

The Noob Hacker

Praise the sun.
559
Posts
14
Years
  • Seen Jul 16, 2016
i am using the same pokemon centers for my game i used the hacked engine for my game which i think deletes all scripts in the game because the original joys arn't there i make nurse joys and copy the original scripts to my pokemon centers in my hack yet the pokemon centers still do not work they will heal but when you run out of usable pokemon you dont go to the last pokemon center for two of them only one of them works any ideas?

I'm not entirely sure, as I have yet to experiment with that type of thing, but I believe it has something to do with the "sethealingplace" command, if there is one. You might want to try looking over that area in the readme tutorial or whatever it was that came with the engine.
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
i am using the same pokemon centers for my game i used the hacked engine for my game which i think deletes all scripts in the game because the original joys arn't there i make nurse joys and copy the original scripts to my pokemon centers in my hack yet the pokemon centers still do not work they will heal but when you run out of usable pokemon you dont go to the last pokemon center for two of them only one of them works any ideas?

As TheNoobHacker mentioned, you must have activated only one sethealing place. You know, those 'F' tiles on every town. Those are flight positions where you'll appear if you fly to the place, or if you got white out.
 
69
Posts
13
Years
  • Seen Jan 8, 2012
As TheNoobHacker mentioned, you must have activated only one sethealing place. You know, those 'F' tiles on every town. Those are flight positions where you'll appear if you fly to the place, or if you got white out.

very informative for a newbie (my thing still says im a newb too lolz) but yeah i saw in research and developement that its sethealing place in the map script yet two of my pokemon centers will not work :\

what relevence do the flight position exactly have?
 
10
Posts
13
Years
  • Seen May 5, 2013
I hope you have a level script in the same map, tied with the flags you made on this script. You can check the ones in the original Mew event for an example.

Also, be aware that the flags are also tied with the ID Number of the object in A-Map [I can see only the flag 0x9 referring to Mew in your script, check if the Mew object has the ID # of "0009". Otherwise, you're setting a flag that has nothing to do with the event, being it pointless]

what is a level script????
 
69
Posts
13
Years
  • Seen Jan 8, 2012
i was trying to add an extra flag so i can have a rival battle checkflag to see what starter you have in my game and for some reason this shows up out of nowhere idk why eihter :\

the extra flag i added is in red and the warp that i didn't even script and cannot get rid of is in red i need to get rid of this dumb warp


'---------------
#org 0x800300
checkflag 0x828
if 0x1 goto 0x8800327
lock
faceplayer
showpokepic 0x188 0x3 0x3
msgbox 0x880034D MSG_YESNO '"Would you like RALTS, the\nPSYCHIC..."
compare LASTRESULT 0x1
if 0x1 goto 0x880032A
hidepokepic
release
end
'---------------
#org 0x800327
release
end
'---------------
#org 0x80032A
hidepokepic
givepokemon 0x188 0x6 0x0 0x0 0x0 0x0
hidesprite 0x1
fanfare 0x13E
preparemsg 0x880037F '"[player] recieved RALTS!"
waitmsg
waitfanfare
setflag 0x828
setflag 0x8C5
warpteleport2 0xE3 0xE9 0xE0 0xD8 0xE3ED
'---------
' Strings
'---------
#org 0x80034D
= Would you like RALTS, the\nPSYCHIC-TYPE POKéMON?
#org 0x80037F
= [player] recieved RALTS!
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
what relevence do the flight position exactly have?

Flight Positions are used to set the PLAYER where he/she will appear in case he/she whites out.
Flight Positions are also used to let the PLAYER fly to an already visited town.
Flight Positions can only be used if you set them.

what is a level script????

Level Scripts are map scripts that you put on the Header tab of Advance Map.
It automatically loads the script you inserted if the PLAYER entered the map with the level script.

i was trying to add an extra flag so i can have a rival battle checkflag to see what starter you have in my game and for some reason this shows up out of nowhere idk why eihter :\

the extra flag i added is in red and the warp that i didn't even script and cannot get rid of is in red i need to get rid of this dumb warp


Spoiler:

Try rescripting your script into another offset of your ROM.
Sometimes, if you compiled your script, and then decided to open it again through XSE to add more stuff, it ends up adding other sets of commands.
 

deoxys121

White Kyurem Cometh
1,254
Posts
13
Years
Is there any way to add a command in a script that would put a certain Pokemon's data in your Pokedex that would show up if you had seen the Pokemon? The main reason I want to do this in my hack is to facilitate the tracking of Latios. Or, in the case of my hack, Meloetta. I have tried using a "showpokepic" command, but there are a couple issues. 1. It does not put the information in the Pokedex. 2. The picture that pops up uses the wrong palette. 3. The picture does not disappear. Any help would be appreciated. Thanks!
 

Varin

Storm'd at with shot and shell
25
Posts
13
Years
  • Age 38
  • Seen Mar 24, 2013
Can someone confirm this script is okay? And if not, what the problem is?

//---------------
#org 0x1A0000
lockall
msgbox 0x81A000F MSG_NORMAL //"Hi.\nTake this EGG."
giveegg 0x246
releaseall
end


//---------
// Strings
//---------
#org 0x1A000F
= Hi.\nTake this EGG.


It's a "my first script" sort of thing. It's intention is for the player to walk onto the block where the script is, the message "Hi. Take this EGG." to pop up, and for the player to receive a Larvitar egg. However, for some reason it doesn't even appear to exist in the game - you can walk over it, do whatever you want, and there is no response.

I am using JPAN's modified engine.

Is the problem the script itself? Or something to do with the placement using Advance Map? Or some feature of JPAN's engine I am not aware of?
 

Nerketur

PokéScripter
104
Posts
13
Years

Try rescripting your script into another offset of your ROM.
Sometimes, if you compiled your script, and then decided to open it again through XSE to add more stuff, it ends up adding other sets of commands.

This is true, but it only does this when you try to edit the compiled script to make it bigger.

i was trying to add an extra flag so i can have a rival battle checkflag to see what starter you have in my game and for some reason this shows up out of nowhere idk why eihter :\

the extra flag i added is in red and the warp that i didn't even script and cannot get rid of is in red i need to get rid of this dumb warp
You can't get rid of the warp because you changed the compiled script too much.

If you want a detailed explanation, look in the spoiler. The simple explanation is as follows: NEVER change compiled code. Always change the dynamic offset code and then recompile, then put the new offsent in A-Map. (Or, to save space, at the top of your dynamic code, put "#removeall <compiled offset>" That way, it always ALWAYS puts the code in the same block, which saves space. (Of course, if your new code doesn't fit in the space provided, it will use the next available one.))

Spoiler:
Can someone confirm this script is okay? And if not, what the problem is?

Code:
//---------------
#org 0x1A0000
lockall
msgbox 0x81A000F MSG_NORMAL //"Hi.\nTake this EGG."
giveegg 0x246
releaseall
end


//---------
// Strings
//---------
#org 0x1A000F
= Hi.\nTake this EGG.
The issue is with settings in A-Map. You need an unused variable, and the value 3.

Put the variable of choice in "the "var number" box, and put 0003 in the box directly above it, and below the position.

Also, this will cause your script to run an infinite number of times. To prevent it from running again, just use
Code:
setvar <variable you used> 0x1

One last thing. You DO know that '0x246' is HEX, right? It will give you Pokémon #582. If you wanted Pokémon #246, you'd have to convert to hex first (0xF6), or just say 'giveegg 246'.
 
Last edited:

Varin

Storm'd at with shot and shell
25
Posts
13
Years
  • Age 38
  • Seen Mar 24, 2013
The variable of choice? Uh... which do I choose? Any number at all, or between a certain range?
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Is there any way to add a command in a script that would put a certain Pokemon's data in your Pokedex that would show up if you had seen the Pokemon? The main reason I want to do this in my hack is to facilitate the tracking of Latios. Or, in the case of my hack, Meloetta. I have tried using a "showpokepic" command, but there are a couple issues. 1. It does not put the information in the Pokedex. 2. The picture that pops up uses the wrong palette. 3. The picture does not disappear. Any help would be appreciated. Thanks!

This is from thethethethe's scripting tutorial...

Spoiler:
 

deoxys121

White Kyurem Cometh
1,254
Posts
13
Years


This is from thethethethe's scripting tutorial...

Spoiler:

OK, so for Latios (replaced with Meloetta in my hack), I would include the following in my script:
Code:
setvar 0x8004 0x198
special 0x163
Is that correct?
 

Nerketur

PokéScripter
104
Posts
13
Years
The variable of choice? Uh... which do I choose? Any number at all, or between a certain range?

Since you're using JPAN's engine, you are free to use any variable from 0x4000 on up. Normally, though, because of issues that JPAN found, on a clean original FireRed rom, if you tried to use variables above 0x4777 you would be overwriting box data, or Party data.

Some people SWEAR that you HAVE to use variable 0x4030. But that is not true. You only have to use a variable that isn't used anywhere else. (Unless you want the event to happen only after another event or something.)
 
Last edited:
10
Posts
13
Years
  • Seen May 5, 2013
got over the problem of the mew, thank you for help, now i'm into another problem, since in my rom the player is able to obtain all the starter, i was wandering how the script of the lady that teaches you the final move to your starter (such as blast burn for charmender) works, because my goal is make possible to learn all the three moves, but in order to do so i have to understand wich flag trigger the selection between the moves, i mean, if the lady just compare the first pokemon in ur team with one of the 3 starters, i don't need to modify the scripts, switch the pokemon party position will be enough, but if a flag if set in the moment i choose the starter, then it is all a different story... so can anyone help me to figure out how it works and wich flag it trigger?

thank you for reading :D
 
69
Posts
13
Years
  • Seen Jan 8, 2012
so i finally found out what the bug was its not a bug or glitch i added the fire red hacked rom engine does anybody know how to make a set healing place script for the pokemon centers or can somebody give me an example and explain it to me?
 

deoxys121

White Kyurem Cometh
1,254
Posts
13
Years
so i finally found out what the bug was its not a bug or glitch i added the fire red hacked rom engine does anybody know how to make a set healing place script for the pokemon centers or can somebody give me an example and explain it to me?

I would suggest simply setting the same script that you would normally find in a Pokemon Center to a person event using AdvanceMap. Just check any other Pokemon Center for the script offset, and set that offset to the person event. That's the simplest way I can think of.
 
69
Posts
13
Years
  • Seen Jan 8, 2012
I would suggest simply setting the same script that you would normally find in a Pokemon Center to a person event using AdvanceMap. Just check any other Pokemon Center for the script offset, and set that offset to the person event. That's the simplest way I can think of.


you cannot the fire red hacked engines pokemon center table has been modified to where instead of have 20 pokemon centers you can have unlimited and what i mean by that is that when you die the game orignally limited it to twenty but the hacked engine unlocked that limitation so when i die i can have unlmited amount of pokemon centers to go to heal for example random houses that heal you on a route camp sites in forests stuff like that thus makes the old map scripts not really work at all
 

totodile493

Person
11
Posts
13
Years
  • Seen Jan 22, 2021
Probably yet another n00b question, but...

Spoiler:


When I try to compile, it says:

Error 13 "Type mismatch" on line 10
Missing #define

Line 10 is
"setwildbattle PKMN_SKARMORY 0x14 ITEM_NONE".

I got that script from ZAPDOS, deleted some things I thought were unnecessary, changed the flags, and edited it to be like PMD Blue.

By the way, that script worked with MEW.
 
Last edited:
Status
Not open for further replies.
Back
Top