Welcome to the PokéCommunity!

Hi there! Thanks for visiting PokéCommunity. We’re a group of Pokémon fans dedicated to providing the best place on the Internet for discussing ideas and sharing fan-made content. Welcome! We’re glad you’re here.

In order to join our community we need you to create an account with us. Doing so will allow you to make posts, submit and view fan art and fan fiction, download fan-made games, and much more. It’s quick and easy; just click here and follow the instructions.

Though there are some great script tutorial,some advanced script skills are still unknown to some people.Now I'd like to share some of mine with you.
These scripts require that you have already mastered basic script knowledge.

1.Some addon about 0m3GA ARS3NAL's DAY-CARE Script[FR/LG]
Since 0m3GA ARS3NAL has explain the taken part well,I'm just going to say the retaken part which give back your Pokemon to party
And besides,I don't know ASM,so I can't research the pay script and can only make this free retaken script.

In fact,this is a basic part.Remove anything will destroey the retaken function.
Sorry,I haven' gotten through what these special2s exacly do.But for now,we don't have to know this.Our point is how to make this work well in our hacks.
So,let's make it "fat".

Spoiler:

Code:

special2 LASTRESULT 0x83

This a good command to check how many Pokemons in your party and store the quantity to LASTRESULT.
So we use it like this:

Spoiler:

Code:

special2 LASTRESULT 0x83
compare LASTRESULT 0x6
if 0x1 goto @if_full

Now we have made our check function,and let's plant it into our basic retaken part:

Spoiler:

Code:

#org @start
lock
faceplayer
special2 LASTRESULT 0x83
compare LASTRESULT 0x6
if 0x1 goto @if_full 'jump to the part to tell player that party is full
special2 LASTRESULT 0xB6
setvar 0x8004 0x0
special2 LASTRESULT 0xC0
special 0xC6
release
end

Now we can ensure wheather your party is full,but what if you didn' save any Pokemons?The result is nothing will happen,but it's not perfect for a hack.

Code:

special2 LASTRESULT 0xB6

This special2 will get what day-care state you are and save the number to LASTRESULT.
This is a list of numbers and states:

Spoiler:

0x1 - Egg is out(this part is at the end of this tutorial )
0x2 - You have just saved only one Pokemon
0x3 - You have saved two Pokemons

Hehe,do you know how to use "special2 LASTRESULT 0xB6" now?
An example:

I heve droped some commands which I think it's useless from the original day-care script,so if there's anything wrong please let me know,thanks.

2.Button Script[FR/LG]
Have you ever noticed these interesting buttons?If you walk on them,they will make some change in the map.Fun,huh?
Actully,these interesting button working only relying this command:setmaptile.
Setmaptile is a simple command that has explained by some tutorials,but how to use it now?

Most tutorial didn't explain it well,but if research it yourself,you'll find out the truth.
When we want to create a button script,we should set a green "S" script icon in the AM.In this green "S",we must set the "Unknown" value to 0003 and set the Var value to 0063.As for the var,it depends on you,just a free one is ok.

"lockall" and "releaseall" are the developed version of "lock" and "release".They ensure that nobody can move when script works.
There is a "new" way of command "compare".You must have seen "compare LASTRESULT 0x1",and this is the same way.All what I do is replace the LASTRESULT with another variable.
In this script,when 0x5000 is 0x63,the "setmaptile" cammand will work.
If you want a free variable,just check the new guide.chm which included in the XSE zip.
Now it's clear ,isn't it?
To make it perfect,let's add a effect:

Well,you may noticed that when you leave this map,what script has done will be cancelled.How can we keep this change?
Now we need some "level script".
If you have read Cooley's tutorial,it's easy for you.
Let's see this script:

Spoiler:

Code:

@org @start
compare 0x5000 0x64
if 0x1 goto @keep
end
#org @keep
setmaptile 0xC 0xE 0x2D1 0x0'this should be the one you used before
setmaptile 0xC 0xF 0x2E1 0x0'this should be the one you used before
special 0x8E
end

I don't think there are anything need to explain.
So just complie it and get our offset~
Now open your AM ,go to the map and turn to the "head" page.
Add a script and select "setmaptile" and put the offset that we just got.
Save the change in AM.
Hehe,now our work is done~

3.About eggs in DAY-CARE Script[FR/LG]
When the Spcial2 LASTRESULT 0xB6 returns 0x1,it means you hava an egg.But what should we do next?

Code:

clearflag 0x266
special 0xB7

This is the basic script of reciving an egg.
The clearflag will tell the system,the egg has been given and the spcial 0xB7 will give the egg to the player.
But we should check if your party is full.

Code:

special2 LASTRESULT 0x83
compare LASTRESULT 0x6
if 0x5 goto @full

Just like what I said before,special2 LASTRESULT 0x83 will do it well.
And of course,you can add more subs in this script,such as "Do you like eggs?" before this give egg function.
Now,let's see how to insert our give egg function in to our retaken script.

4.Make Scripts Work
For not being understood,what I talk in fact is this kind of scripts:

Spoiler:

Maybe you have the experience that though you had already write a good script in a green "S" icon,the script wouldn't work.
Yes, that's what I faced days ago...
In fact all what we should do is:
(1) Set a free var in AM,such as 5000
(2) Set a number in Var value,such as 0000(I can't test all values,so I prefer to put 0000)
(3) Set the Unknown value to 0003(Seems must be)

Just like what I did in the picture above
(3) Add these kind of scripts in your script:

Spoiler:

Code:

#org @1
lockall
compare 5000 0x1' 5000 is what you set before,but 0x1 is a number other than what you set(0x0 in my example)
if 0x1 goto @2 'If this script has happened
message @3 0x2'This what you want your script do ,message is just an example
setvar 5000 0x1' This keeps your script not working again
releaseall
end
#org @2
releaseall
end
#org @3
= See,it works!

5.DAY-CARE script in R/S [load part]
Maybe because FR/LG is based on R/S,the DAY-CARE script is almost the same.
But there is one thing different :

As you can see,when the var's value is other than what you set in AM,script won't work;If the var's value is what you set in AM, script will work.
That's it ,easy~
All these things for R/S is coming...
Anyway, sorry for my really bad English and this semi-finished product, I'll make it better as soon as possible.

I did something that really bad.But made all Chinese can hack Pokemon, too.If you guys hate me, I totally understand,but cannot do anything but force to keep everything.
If there must be someone to undertake all spit and curse, it must be me.

I did something that really bad.But made all Chinese can hack Pokemon, too.If you guys hate me, I totally understand,but cannot do anything but force to keep everything.
If there must be someone to undertake all spit and curse, it must be me.

I did something that really bad.But made all Chinese can hack Pokemon, too.If you guys hate me, I totally understand,but cannot do anything but force to keep everything.
If there must be someone to undertake all spit and curse, it must be me.

The PokéCommunity

Meta

Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, or The Pokémon Company International. We just love Pokémon.