Some little advanced scripts [Updated 02.14]
Some little advanced scripts
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".
This a good command to check how many Pokemons in your party and store the quantity to LASTRESULT.
So we use it like this:
Now we have made our check function,and let's plant it into our basic retaken part:
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.
This is a list of numbers and states:
Hehe,do you know how to use "special2 LASTRESULT 0xB6" now?
Phew...little big ,isn't it?
Our script is going to complete,but why don't we add some interesting thing?
Before we use the "load" function,we can add this:
So,let's see our finil fat script:
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.
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.
Having known this,we can make a simple script to test our thought:
"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:
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?
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.
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:
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:
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 :
Our full script for R/S:
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.
Thanks for reading.
I like the button-setmaptile explanation. Setamptile is the only script I can make :)
Update a little~
Yes,I'd say my English is really poor,so if there's anything you couldn't recognise ,just tell me .
And if there's anything wrong,please let me know,because I don't mean to mislead people.
By the way,these are for FR/LG, and the scripts for R/S are coming soon~
I can't believe no-one will post here!
There are some grammatical errors, but it's OK.
XD maybe what I said in tutorial is already common sense...
And I'd love to correct my grammatical errors ,if you can point it out...
Updated~~Add a section to talk about DAY-CARE script in R/S~
And the eggs thingy is coming soon~~
|All times are GMT -8. The time now is 11:41 PM.|
© 2002 - 2015 The PokéCommunity™, pokecommunity.com.
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, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2015.