• 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.
6
Posts
16
Years
  • Seen Mar 2, 2015
Pokedex give problem.

Hi,
I'm making a hack of leaf green.
This is my (poke)script:

Code:
#org $begin
lock
faceplayer
checkflag 0x299
if b_true goto $alreadygotone
message $wantpoke
$wantpoke 1 =Hey,\nI stole a pokemon from the proffesor\pDo you want it?
boxset 5
compare LASTRESULT 1
if 1 goto $geteevee
message $toobad
$toobad 1 =Fine I will keep this pokemon then!
boxset 6
release
end

#org $geteevee
lock
message $getone
$getone 1 =Quick!\nRun away!\pElse the proffesor might get you!
boxset 6
setflag 0x800
setflag 0x801
givepokemon 0x19 0x5 0x0
message $received
$received 1 =PLAYER received Pickachu!
boxset 6
setflag 0x299
release
end

#org $alreadygotone
lock
faceplayer
message $howsit
$howsit 1 =What are you still doing here?\nRun for the professor!
boxset 6
release
end

It works fine: I get the pokemon, I can see my pokemon party and I get the pokedex.
But Suddenly I'm in safari mode..
And when I quit with the safari mode, I don't have a pokemon party and I don't have a pokedex.
Can anyone help me with this problem.
 
Last edited:

onyx79

Red Dead Revolver
488
Posts
15
Years
this is my script:
'---------------
#org 0x1792BE
lock
faceplayer
msgbox 0x81792E1 MSG_NORMAL '"ZAPDOS: Kyoooooooo!"
cry 0x91 0x0
wildbattle 0x91 0x1E 0x8B
fadescreen 0x1
fadescreen 0x0
hidesprite LASTTALKED
setflag 0x200
release
end

'---------
' Strings
'---------
#org 0x1792E1
= ZAPDOS: Kyoooooooo!

now after I beat zapdos he dissapers,but when I'm entering into an house and then getting out of it,the zapdos comes back....
and his level is 30,how can I make him level 70?
 

Hoshiko Aki

Avatar rules
109
Posts
15
Years
  • Seen Oct 17, 2011
Game: Fire red
Type: Give away
Editor: XSE
Script: see below

Screenshots and/or Videos: None


My script is not complete. er must be a part that er will be a qeustion ( will you have this bagon?) Yes you get him if no you must select yes to go further.
BUt this part of the sript i don't now how to make. can some buddy do this for me?

Script is in the spoiler.
Spoiler:


Can some buddy help me

some buddy can help? i will be very happy if some buddy will help me.
 

Larsie13

Guest
0
Posts
this is my script:
Spoiler:


now after I beat zapdos he dissapers,but when I'm entering into an house and then getting out of it,the zapdos comes back....
and his level is 30,how can I make him level 70?
I don't know about the first problem, but to make it level 70, change the 0x1E after the wildbattle command to 0x46. (or 70, without the 0x)

Hi,
I'm making a hack of leaf green.
This is my (poke)script:
Spoiler:
It works fine: I get the pokemon, I can see my pokemon party and I get the pokedex.
But Suddenly I'm in safari mode..
And when I quit with the safari mode, I don't have a pokemon party and I don't have a pokedex.
Can anyone help me with this problem.
Simple; flags 0x800 and 0x801 do activate the Pokémon and Pokédex menus, but they do so in Ruby and Sapphire. In FR/LG, they need to be 0x828, and 0x829.

some buddy can help? i will be very happy if some buddy will help me.
Spoiler:

Why the flag 0x1019? There's already another flag set in the script, so there's no need for 2. Unless, of course, you need that flag set for another script. Plus, you mixed up hexadecimal and decimal. Pokémon number 0x317 would be number 881, and no such Pokémon exists. Also, and this is a note to everyone who doesn't know: in XSE, always just use #dynamic 0x800000, and no other offset. Because, XSE LOOKS FOR AN OFFSET AUTOMATICALLY. (Starting of course, in this case, at 0x800000.) And also, NEVER use dynamic offsets lower than 0x720000, because you'll risk overwriting important data. A lot of space before 0x720000 looks empty, but is in fact used by songs, etc.
 
20
Posts
14
Years
  • Seen Jan 18, 2014
For legendaries, use wildbattle. It's not that hard. Just look it up on a tutorial. I'm really not sure how to do after Elite 4 things, but you could just use a flag and make him give it to you when it's set.

can a complete beginner lean how to do this quickly?
 
6
Posts
16
Years
  • Seen Mar 2, 2015
pokescript trainer battle problem

Hi,
I've got a little program thats cald: "trainer editor" - by Juan.
Now it works good.
I changed trainer 001, and that works correctly.
Now I've got this (poke)script:

Code:
#org $Trainer1
lock
faceplayer
trainerbattle 0 001 $MadChall $MadDefeat
$MadChall 1 = Hiker: My rock will crush you!
$MadDefeat 1 = Hiker: No!, my onix...
message $MadTalk
$MadTalk 1 = I thought having a stone pokemon\iwould make me stronger.\pI Guess I was wrong.
boxset 6
release
end

Now the trainer talks really weard, it is a bug cather, and it has god a ekans and a sandshrew.
So it is screwed up.
Does anybody know what I'm doing wrong?
 
27
Posts
17
Years
  • Seen Aug 31, 2014
Advance Map Screws With Code

In XSE, when I compile a code, such as:

Code:
#dynamic 0x746750

#org 0x746750
msgbox @message 0x2
release
end

#org @message
= Blah.

and then try to open it (by clicking "Open Script" in Advance Map), it changes the script around a bit, such as:

Code:
'---------------
#org 0x746750
msgbox 0x874677B MSG_FACE '"Blah."
release
end


'---------
' Strings
'---------
#org 0x74677B
= Blah.

Is there any way around this?
 

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
In XSE, when I compile a code, such as:

Code:
#dynamic 0x746750

#org 0x746750
msgbox @message 0x2
release
end

#org @message
= Blah.

and then try to open it (by clicking "Open Script" in Advance Map), it changes the script around a bit, such as:

Code:
#org 0x746750
msgbox 0x874677B MSG_FACE '"Blah."
release
end


#org 0x74677B
= Blah.

Is there any way around this?

This is not a problem with Advance Map, and your script is just fine.
The only differences your script has is the way it is shown... for instance, did you ever think to remove the words?
look in your quote, I removed the words from it and the script looks exactly the same.
(MSG_FACE is 0x2 by the way, so your message command was not changed either.)

You'll also notice that your Dynamic offset it gone, that is because XSE does not compile the dynamic offset onto the rom, that would be pointless, but what it DOES do, is the dynamic offset tells XSE where to start looking for free space.

Finally, your pointer, "message" is gone, because when you compiled it, it went from "message" to where that bit of text is inserted into the ROM.

That thing that showed up

'---------
' Strings
'---------

Is a comment
Comments are very useful to me, like when I am trying to figure out what part of the script is what. only I use
//
To tell me where the comments are, play around with the settings of XSE to see what you like. (There IS a setting to remove these comments from XSE, play around with it, cause I am not going to tell you where, but it is not hard, don't worry.)
 
27
Posts
17
Years
  • Seen Aug 31, 2014
Omega, first of all, thanks for helping. Anyway: I know it is not a problem with Advance Map, I was basically just wondering if there was a way to make it decompile the way I coded it? The main thing that annoys me is the change from @message to 0x######.

Yeah, I already use comments (the example I posted was just a quick one). I also know how to disable comments when decompiling.

So, basically, I just want to know if there is a way to make it appear the same in the code editor as when I first compiled it?
 

RaycrowX

Beginning ROM Hacker
36
Posts
15
Years
Cles:

Could you just recompile your original script? That way it will look exactly as you typed it. If you're just working on getting one script to work, you can use the "#clean" directive at the beginning of your script to undo the results of the last dynamic offset, which most times means that you don't have to re-copy your new offset back into A-map.

Hope this helps.
 
27
Posts
17
Years
  • Seen Aug 31, 2014
Wouldn't that mean I'd have to save my script to my computer each time?
 

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
Wouldn't that mean I'd have to save my script to my computer each time?

Well, you should make backups of all of your scripts in anyways. In case you make a mistake in your ROM, lose track of were you are, or need to reset.

But decompiling-wise, you can not make it look exactly the same as it did before you compiled, since XSE does not keep that info, BUT, you can change the way XSE decompiles the script, and it will show XSE's generic dynamic offsets, instead of the locations the parts of script are located.
Since it can't show YOUR dynamic offsets, because those are not saved to the ROM and decompiled with the script...

(By Generic offsets, I mean it will show things like @message, and @start, depending on what it is pointing to. If the pointer points to some text, it will say, @message, I think, and if it is at the very top of the script, the decompiler will say @start.)
 
860
Posts
17
Years
Alright I got a question,
I am working on my hack again Pokémon Congbu and I want to make an level script but I don't know how I can make it, here's how it goes.

You walk onto a script tile you hear someone screaming you walk to her,

then after you talk you warp to a nearby house.

but then comes the level script and I don't know how to do that because I want that the script continues as soon as you warp in how can I do that? I use XSE.
 

Larsie13

Guest
0
Posts
Alright I got a question,
I am working on my hack again Pokémon Congbu and I want to make an level script but I don't know how I can make it, here's how it goes.

You walk onto a script tile you hear someone screaming you walk to her,

then after you talk you warp to a nearby house.

but then comes the level script and I don't know how to do that because I want that the script continues as soon as you warp in how can I do that? I use XSE.
A level script is made the same way as any other script. (Except you'd always have to use lockall, and not lock.) Check http://www.pokecommunity.com/showthread.php?t=141650 to learn how to make them in more detail. (The second part is about level scripts, so just scroll down a bit.)
 

onyx79

Red Dead Revolver
488
Posts
15
Years
I want to change the lugia event on fire red(at navel rock)I want to replace lugia with kygore,here's the script,but I don't know what to change there in order to replace lugia with kygore...

'---------------
#org 0x165134
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
special 0x188
lock
faceplayer
checksound
pause 0x14
sound 0x4B
setvar 0x8004 0x0
setvar 0x8005 0x3
setvar 0x8006 0x4
setvar 0x8007 0x2
special 0x136
pause 0x1E
sound 0x4B
setvar 0x8004 0x0
setvar 0x8005 0x3
setvar 0x8006 0x4
setvar 0x8007 0x2
special 0x136
pause 0x1E
pause 0x32
checksound
cry 0xF9 0x2
waitcry
pause 0x14
setvar 0x8004 0xF9
setvar 0x8005 0x46
setvar 0x8006 0x0
special 0x1BB
setflag 0x807
special 0x138
waitstate
clearflag 0x807
special2 LASTRESULT 0xB4
compare LASTRESULT 0x1
if 0x1 goto 0x81651D9
compare LASTRESULT 0x4
if 0x1 goto 0x81651E7
compare LASTRESULT 0x5
if 0x1 goto 0x81651E7
setflag 0x2F2
release
end
'---------------
#org 0x1A7AE0
release
end
'---------------
#org 0x1651D9
setflag 0x2F5
setvar 0x8004 0xF9
goto 0x81A9236
'---------------
#org 0x1651E7
setvar 0x8004 0xF9
goto 0x81A9236
'---------------
#org 0x1A9236
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
bufferpokemon 0x0 0x8004
msgbox 0x81A63C4 MSG_KEEPOPEN '"The [buffer1] flew away!"
release
end

'---------
' Strings
'---------
#org 0x1A63C4
= The [buffer1] flew away!

another question:how many bytes do I need for a trainer battle 0x0 and trainer battle 0x1 ?
 
Last edited:
5,256
Posts
16
Years
Editor: XSE
Script Type: ...Mom?
Game Base: FR BPRE
Script:
Spoiler:

Something wrong with line 7.

"compare LASTRESULT 0x1"

I don't know what, though.
 
Last edited:

BlitŻ1

guahh my dog is so cute
472
Posts
15
Years
Game :Base of Fire red
editor :XSE
Script
#dynamic 0x34EB8C
#org @start
checkflag 0x22E
if 0x1 goto @done
setflag 0x22E
playsong 0x15A 0x0
msgbox @6
boxset 0x6
applymovement 0xFF @move4
applymovement 0x01 @move
msgbox @1
boxset 0x5
if 0x1 goto @2
msgbox @3
boxset 0x5
if 0x1 goto @2
if 0x0 goto @2
applymovement 0x01 @move5
applymovement 0x02 @move6
waitmovement 0x0
applymovement 0x03 @move7
msgbox @7
boxset 0x6
applymovement 0x03 @move8
msgbox @8
boxset 0x6
release
fadesong 0x139
end

#org @done
release
end
#org @move
#raw 0x13
#raw 0x13
#raw 0xFE

#org @1
= May: Hey \v\h01!\n Are you ready for the trial?

#org @2
applymovement 0x02 @move2
msgbox @4
boxset 0x6
applymovement 0x02 @move3
msgbox @5
boxset 0x6

#org @move2
#raw 0x12
#raw 0x03
#raw 0xFE

#org @4
= Brendan: Hey May,Cut that out!\nLeave the guy alone.

#org @move3
#raw 0x00
#raw 0xFE
#org @5
= Hey, I have an idea.\pLet's stay partners from\n here on out!\p May: Yeah, that's a good idea!\p\v\h01: Sure,we'll work together.

#org @move4
#raw 0x62
#raw 0xFE

#org @6
= (ZZZZZZZZZ...) POP

#org @move5
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move6
#raw 0x13
#raw 0xFE
#org @7
= You can now enter the Trial room.

#org @move7
#raw 0x10
#raw 0x10
#raw 0xFE

#org @move8
#raw 0x11
#raw 0x11
#raw 0x00
#raw 0xFE

#org @8
= Brendan: Come on \v\h01!\n You go first.

#org @3
= May: Do you know what\nyou are even doing?

Everything works fine until you get after applymovement @6
i'm thinking something wrong with the #org @2 part, or maybe i did some error

and these are also not working

#dynamic 0x71B09A
#org @start
checkflag 0x55E
setflag 0x55E
applymovement 0xFF @move
release
end
#org @move
#raw 0x12
#raw 0xFE

#dynamic 0x71B087
#org @start
checkflag 0x2A4
setflag 0x2A4
applymovement 0xFF @move
release
end
#org @move
#raw 0x13
#raw 0xFE

#dynamic 0x71B06C
#org @start
checkflag 0x27F
setflag 0x27F
applymovement 0xFF @move
release
end
#org @move
#raw 0x11
#raw 0xFE

#dynamic 0x71AC3C
#org @start
checkflag 0x238
setflag 0x238
applymovement 0xFF @move
release
end
#org @move
#raw 0x10
#raw 0xFE

when i step on these tiles,they dont activate,or maybe they do and there's an error

(soory for the big post)
any help is appreciated
 
10,078
Posts
15
Years
  • Age 32
  • UK
  • Seen Oct 17, 2023
Ok, I need a bit of help :)

Using Pokescript : FireRed Rom.

Spoiler:


I am trying to use this to tell when the Player has a Vulpix, a Staryu or a Cacnea. If there is one in the party then the script is meant to go to $Hatched, if not then it is meant to continue.

The problem is it skips straight to $Hatched before the egg has hatched into any of the above Pokemon, are Eggs counted as these Pokemon too or is there an error in the above script? ><

:3 Thanks in advance


----

Nothing wrong with it, there was an error just after it XD My bad.
 
Last edited:

Samike360

Lover of May
397
Posts
15
Years
I have a new problem for my Ruby hack on XSE.

The script works fine, except that when I move the sprite reappears at the original spot and won't go away.

This is my script:

Spoiler:
 
Status
Not open for further replies.
Back
Top