• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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 Requests/Sharing/Discussion

Status
Not open for further replies.
For you to check the script don't i need to upload the ROM?
Thanks for the help Zel :D

In fact, you could just write the script (if you are writing it from scratch) in a text editor (wordpad?), before you attempt to compile it, and we could see if there could be a problem.
If you are editing an existing script (using the shift+click combo on an event in Elite Map), then just copy/paste it in a text editor, add your extra stuff there, and post it and we could see if there could be problems (but as I said before, the way EMap shows up scripts is not one of my favourite things... :P)
 
Right Zel, the problem has been resolved!

But now for my next set of questions :P

I need some tags, colour codes and codes for Pokemon

The tags I need are:

The basic colours, blue, red, green, yellow, orange etc.
The code for the Players pokemon.
The code for the foes pokemon.
The code for the oppenent, person not pokemon.

That's it so far, but i may add to it later.

Also how do you end a colour in a piece of text?
I need one part in blue and the rest to be normal, how is this done?

And what is the script for cutting down a bush?
Thanks :D
 
Last edited:
I have a scripting question:
How do you make a multi box?
eg.
What are you doing here?
Code:
-Nothing
-Becomming a trainer
-Winning Badges


It doesn't need to be even close to that, it just needs to be the same set up as that.
Another example is in FR\LG, the sailor that asks you which island to go to, or the elevators in places.
Thanks.
Also, weather commands don't really work for me, I use pokescript.
 
I kinda need help in scripting in my hacking. Whenever I try to make a script of giving stuff, I apply a Yes/No command, but when I say no, I receive the item, just like if I say Yes to my script!
Can anyone help me?
Please email me at [email protected]
Thanks in advance!

after your yes or no, put
Code:
compare lastresult 1
if B_true [S]*or false*[/S] goto $nextscript
That part that's crossed isn't needed. Don't put it. Only compare one thing. True or false.
 
Right Zel, the problem has been resolved!

But now for my next set of questions :P

I need some tags, colour codes and codes for Pokemon

The tags I need are:

The basic colours, blue, red, green, yellow, orange etc.
The code for the Players pokemon.
The code for the foes pokemon.
The code for the oppenent, person not pokemon.

That's it so far, but i may add to it later.

Also how do you end a colour in a piece of text?
I need one part in blue and the rest to be normal, how is this done?

And what is the script for cutting down a bush?
Thanks :D

Well, there are a few non-scripting related questions, and those should be done in the Simple Questions thread (besides I did not understand what you mean by tags or codes). Also, I haven't played with colours in texts, so another person should help you for that (I have seen others doing colour changes)

And the script for cutting down a bush is 1BDF13, unless you meant to write the full script, which is something I will not do (just open the rom with Scripted and search for the address 1BDF13 if you want to see how it is done internally)

I have a scripting question:
How do you make a multi box?
eg.
What are you doing here?
Code:
-Nothing
-Becomming a trainer
-Winning Badges


It doesn't need to be even close to that, it just needs to be the same set up as that.
Another example is in FR\LG, the sailor that asks you which island to go to, or the elevators in places.
Thanks.
Also, weather commands don't really work for me, I use pokescript.

Scripted explanation, as always (Irish, I need your confirmation, as always... :P)

Basically the multi commands works like this:

multi 0xHorizPosition 0xVertiPosition 0xId 0xCancel 0x19 (Not quite sure what 19 does...)

Where HorizPosition goes between 0 and F, with E as a good value for right position and 0 a good value for left position.
Where VertiPosition goes between 0 and F, with 0 as a good value for up position and I wouldn't move it from that position, to have space for the options.
Cancel is just the value 0 or 1, if it is 0 then user can cancel using the B button.

And the Id is just a value from the following list (If you find a "nada" that means "nothing", sorry I wrote the list in Spanish)

FR's Multi Options List
Spoiler:


So, basically, if you want to have other options, then you'd need to change the text in the options in one of the Ids in the list (BUT, Remember that these options, specially the common ones, will be used frequently in the game, so be careful with that)

Now, to make the multi command do something, here is how it should be used... Maybe some parts aren't necessary.

multi 0xE 0x0 0x1F 0x0 0x19
callstd 0x80
killscript
#raw 0x80
compare LASTRESULT 0x0
if 0x1 jump 0xFirstOptionPicked
compare LASTRESULT 0x1
if 0x1 jump 0xSecondOptionPicked
...(it depends on how many options your multi has)
compare LASTRESULT 0x5
if 0x1 jump 0xLastOptionPicked
compare LASTRESULT 0x7F (not needed if player can't cancel using the B button)
if 0x1 jump 0xCancelPressed


Hope this helps, because it took me a while to figure it out... XD
 
In R/S, how would I make a script like the rival battles, where the Pokemon they use depends on your starter Pokemon?

EDIT: Now I just looked at a rival battle script in ScriptEd, and I think I found out that you have to put in this:

copyvar 0x8000 0x4023
compare LASTRESULT 0x8000 0x0
if 0x1 goto (offset1)
compare LASTRESULT 0x8000 0x1
if 0x1 goto (offset2)
compare LASTRESULT 0x8000 0x2
if 0x1 goto (offset3)

And for offset 1, you put in the trainerbattle for the rival who uses the grass starter, and so on.

Now the problem is, I tried that in this script:

#org 0xE00000
checkflag 0x101
if 0x1 goto 0xE00010
checkgender
compare LASTRESULT 0x0
if 0x1 goto 0xE00020
compare LASTRESULT 0x1
if 0x1 goto 0xE00030
end

#org 0xE00020
applymovement 0xE00040
pause 0x10
playsound 0x19F
nop
applymovement 0xE00050
pause 0x20
copyvar 0x8000 0x4023
compare LASTRESULT 0x8000 0x0
if 0x1 goto 0xE00070
compare LASTRESULT 0x8000 0x1
if 0x1 goto 0xE00080
compare LASTRESULT 0x8000 0x2
if 0x1 goto 0xE00090
end

#org 0xE00030
applymovement 0xE00040
pause 0x10
playsound 0x1A5
nop
applymovement 0xE00050
pause 0x20
copyvar 0x8000 0x4023
compare LASTRESULT 0x8000 0x0
if 0x1 goto 0xE000B0
compare LASTRESULT 0x8000 0x1
if 0x1 goto 0xE000C0
compare LASTRESULT 0x8000 0x2
if 0x1 goto 0xE000D0
end

#org 0xE00070
trainerbattle 0x00 0x211 0xE00060 0xE000E0
message 0xE000F0
boxset 0x6
applymovement 0xFF 0xE00100
pause 0x20
applymovement 0x1 0xE00110
pause 0x80
#raw 0x53
call 0x40C71600
release
setflag 0x101
end

#org 0xE00080
trainerbattle 0x00 0x214 0xE00060 0xE000E0
message 0xE000F0
boxset 0x6
applymovement 0xFF 0xE00100
pause 0x20
applymovement 0x1 0xE00110
pause 0x80
#raw 0x53
call 0x40C71600
release
setflag 0x101
end

#org 0xE00090
trainerbattle 0x00 0x217 0xE00060 0xE000E0
message 0xE000F0
boxset 0x6
applymovement 0xFF 0xE00100
pause 0x20
applymovement 0x1 0xE00110
pause 0x80
#raw 0x53
call 0x40C71600
release
setflag 0x101
end

#org 0xE000B0
trainerbattle 0x00 0x208 0xE00120 0xE00130
message 0xE00140
boxset 0x6
applymovement 0xFF 0xE00100
pause 0x20
applymovement 0x1 0xE00110
pause 0x80
#raw 0x53
call 0x40C71600
release
setflag 0x101
end

#org 0xE000C0
trainerbattle 0x00 0x20A 0xE00120 0xE00130
message 0xE00140
boxset 0x6
applymovement 0xFF 0xE00100
pause 0x20
applymovement 0x1 0xE00110
pause 0x80
#raw 0x53
call 0x40C71600
release
setflag 0x101
end

#org 0xE000D0
trainerbattle 0x00 0x20E 0xE00120 0xE00130
message 0xE00140
boxset 0x6
applymovement 0xFF 0xE00100
pause 0x20
applymovement 0x1 0xE00110
pause 0x80
#raw 0x53
call 0x40C71600
release
setflag 0x101
end

#org 0xE00010
end

#org 0xE00040
#raw 0x56
#raw 0xFE

#org 0xE00050
#raw 0x0A
#raw 0x0A
#raw 0xFE

#org 0xE00060
= I knew I'd see you here, \v\h01.\nLet's have a quick POKéMON battle!

#org 0xE000E0
= At least my POKéMON put up a\ngreat fight!

#org 0xE000F0
= \v\h01, I'm going back to the LAB.\nYou should go there, too.\pSee ya!

#org 0xE00100
#raw 0x05
#raw 0x00
#raw 0xFE

#org 0xE00110
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0xFE

#org 0xE00120
= \v\h01, I thought you'd come here.\nWanna battle?

#org 0xE00130
= Well, you win.\nAnd that's that.

#org 0xE00140
= I'm gonna head back to the LAB.\nYou oughta come with.\pCatch ya later!

And when I compiled it with Diamond Cutter, I got this message:

Runtime error 6
Overflow

And to test out for the problem, I cut out #org 0xE00020 all the down to #org 0xE000D0, and it did work, so the problem must be somewhere in that part of the script.
 
Last edited:
Can I have a little help here? I have this applymovement script and... I just can't get it working. I get the traditional overflow error when I try to compile it, but I simply don't see what's wrong. Can anyone take a look?

Spoiler:
 
TO BLAZIKEN626

Quite a few problems there: First you are overwriting your own scripts, check out all your #orgs, you're almost not giving space!

Second, there are a few applymovement commands without the correct format, which is applymovement 0xSprite 0xOffsetWithMovement

Third, you are also doing the trainerbattle command wrong, that should be trainerbattle 0xType 0xPETId 0x0 0xText1 0xText2

Fourth, just in case the flags end up not getting setted, maybe the correct order would be setflag then release.

But the serious problem is the overwriting one. Even if you manage to compile it, you'll face a lot of problems because of that. Give more room to your orgs...

TO DEOKISHISU

You also missed the 0xSprite in your applymovement command at #org 0x71DB68

And, by the way using the callstd 0x5 after the msgbox will pop up the yes/no option, if you want a normal box, just use callstd 0x4
 
Last edited:
I have never gotten how you script, how do you figure it out?
PS if that a tut thing in the quote up there it didn't make sense to me.
 
Last edited:
Anybody know which flags are not used in Ruby/Sapphire/Emerald.
Like, which numbers I could use, which won't intercept the game.
Aka, flags that aren't already used by the game.
 
can someone make an event where someone steals your starter pokemon and you have to get it back please.? im hacking Ruby.
 
My question is concerning weather. Whenever I try using Setweather or Doweather, they never work. I've already asked Irish Witch, I'm just wondering if anyone here knows how I can do it in Pokescript. Or, I could try using diamond cutter....
 
I have never gotten how you script, how do you figure it out?
PS if that a tut thing in the quote up there it didn't make sense to me.

Have you read Christos' tutorial in the Documents section? That may give you the basics to understand some of the commands (reading the commands.html file in the Elite Map package also helps)

And, I really can't answer the next questions. Because: It is hard to figure out the flags that are not important and can be used, so I just guess; because there is no way to remove a pokemon from your party, but you could try disabling the "Pokemon" option, which, if it's for Ruby, I don't know the flag; and because I haven't used the weather command, and since you use Pokescript...
 
Problem, with Overflow. I isolated the problem, help?
ScriptED.
Spoiler:


The problem part, is in bold.
Thanks.
 
Last edited:
Third, you are also doing the trainerbattle command wrong, that should be trainerbattle 0xType 0xPETId 0x0 0xText1 0xText2

It doesn't hurt to read the stuff I write for other people, because sometimes it may help others as well ;P
 
I've compiled a script that should make one of my NPCs warp from the top left of the map(29, 0 or 0x1D 0x0) to an area at the bottom, near the player (11, 16 or 0xB 0x10) but it just ignores the entire script in game.

Spoiler:


I have the event set up right in AdvancedMap.

Are there any errors in there?

EDIT: Using PokeScript btw.
 
I've compiled a script that should make one of my NPCs warp from the top left of the map(29, 0 or 0x1D 0x0) to an area at the bottom, near the player (11, 16 or 0xB 0x10) but it just ignores the entire script in game.

Spoiler:


I have the event set up right in AdvancedMap.

Are there any errors in there?

EDIT: Using PokeScript btw.

You may wish to try getting rid of the 'lock'. I don't exactly use movesprite, so I wouldn't know, but I guess that's the problem.


Also, I have a question. I don't know if you want to tell me until you complete the beta 4 zel, but how exactly do I create a shiny wild battle? Like the red gyarados? Again, if you want to wait until you release the beta 4 to tell me, that's fine.
 
I've compiled a script that should make one of my NPCs warp from the top left of the map(29, 0 or 0x1D 0x0) to an area at the bottom, near the player (11, 16 or 0xB 0x10) but it just ignores the entire script in game.

If it ignores the script, I could guess the flag you used has been setted on before. Perhaps? (Do some tests with other flags and check what happens)
 
Ok, I have a problem:

This script, whenever I run it, freezes the game:

'-----------------------
#autobank off
#org 0x1E40CF
lock
faceplayer
writebytetooffset 0x1 0x02024EAC
setflag 0x2F6
clearflag 0x2F7
setflag 0x311
clearflag 0x310
checkflag 0x2D2
compare LASTRESULT 0x0
if 0x1 0x081E4190
release
end
nop
nop
nop
nop
nop
nop
nop
nop

#org 0x1E4190
clearflag 0x2F8
setflag 0x2D2
release
end



If I comment out the compare/if sequence, it works, but I need those in there for it to work correctly.

Anyone know what's wrong?

It's in Ruby version, btw.
 
Last edited:
Status
Not open for further replies.
Back
Top