Script Help Thread (DO NOT REQUEST SCRIPTS) Page 284

Started by HackMew December 20th, 2008 5:10 AM
  • 625717 views
  • 9682 replies

Renegade

Time for real life...

Male
United States
Seen January 8th, 2015
Posted December 31st, 2014
995 posts
11.5 Years
Hello, I have another question. This script was working as intended, but now I'm using the command "movesprite2" instead of "movesprite".

#dynamic 0x800260

#org @start
lock
applymovement 0xFF @m1
waitmovement 0x0
applymovement 11 @m2
applymovement 12 @m3
applymovement 0xFF @m4
waitmovement 0x0
pause 0x20
textcolor 0x0
message @t1 6
applymovement 11 @m5
waitmovement 0x0
movesprite2 0x16 0x8 0x3
pause 0x05
applymovement 11 @m6
waitmovement 0x0
movesprite2 0xE 0x8 0x5
pause 0x05
applymovement 11 @m7
waitmovement 0x0
movesprite2 0xF 0x9 0x3
pause 0x05
applymovement 11 @m6
waitmovement 0x0
movesprite2 0x10 0x9 0x5
pause 0x05
applymovement 11 @m7
waitmovement 0x0
movesprite2 0x11 0xA 0x3
pause 0x05
applymovement 11 @m6
waitmovement 0x0
movesprite2 0x12 0xA 0x5
pause 0x05
applymovement 11 @m7
waitmovement 0x0
movesprite2 0x13 0xB 0x3
pause 0x05
applymovement 11 @m6
waitmovement 0x0
movesprite2 0x14 0xB 0x5
pause 0x05
applymovement 11 @m7
waitmovement 0x0
movesprite2 0x15 0xC 0x3
pause 0x05
applymovement 11 @m8
waitmovement 0x0
message @t2 6
applymovement 0xFF @m9
applymovement 12 @m10
waitmovement 0x0
message @t3 6
applymovement 0xFF @m11
waitmovement 0x0
setvar 0x5012 0x1
release
end

#org @m11
#raw 0x11
#raw 0x13
#raw 0x11
#raw 0x13
#raw 0xFE

#org @t3
= \v\h06: You go first, \v\h01.

#org @m10
#raw 0x3
#raw 0xFE

#org @m9
#raw 0x2
#raw 0xFE

#org @t2
= OAK: You may chose a POKéMON now.

#org @m8
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x0
#raw 0xFE

#org @m7
#raw 0x13
#raw 0x1
#raw 0xFE

#org @m6
#raw 0x0
#raw 0xFE

#org @m5
#raw 0x13
#raw 0x13
#raw 0x1
#raw 0xFE

#org @t1
= OAK: Okay, I have nine POKéMON\nhere and you can have one of them.\pI will lay them out for you two.

#org @m4
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @m3
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x1
#raw 0xFE

#org @m2
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x0
#raw 0xFE

#org @m1
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x11
#raw 0xFE
The problem is at the beginning. The sprites that I want to move permanently don't move at all. It's very strange... I inserted this script a while back with the "movesprite" command, and it worked. Then, I recompiled it using the "movesprite2" command, and it stopped working. Once I saw that it stopped working, I switched back to "movesprite" and it still wouldn't work... I'm starting to wonder if maybe now I have too many person events on my map at once? Help please?

EDIT: Oaky, I tried changing the map so there were only 11 people on it and the "movesprite" command still isn't working... I've gone to another map and made a "movesprite" script there (just to make sure that "movesprite" isn't somehow broken or something...) but the "movesprite" command wouldn't work... It seems like it's broken or somthing weird. It was working when I began my hack, but after a while it just... died. I'm trying a different method now, but any information on this problem would be appreciated, as I can no longer use that command as far as I know...

zid_sen

The Sacred Thunder of Aselis

Male
Indonesia
Seen July 1st, 2013
Posted June 11th, 2013
61 posts
11 Years


Sounds like a compiling problem or something, recompile the script and double check you're assigning (and saving) it to the right sprite. Sounds stupid I know but I've done that before!

Not it,
i want it to be a event script!
It be Erika Heart Event.....
So if it to a script,
is something wrong on my script?

Thanks to Rambagos in Pokemon Stars
For The Signature

Mana

Age 31
Male
UK
Seen March 25th, 2023
Posted August 18th, 2021
10,075 posts
14.3 Years
Hello, I have another question. This script was working as intended, but now I'm using the command "movesprite2" instead of "movesprite".

#dynamic 0x800260

#org @start
lock
applymovement 0xFF @m1
waitmovement 0x0
applymovement 11 @m2
applymovement 12 @m3
applymovement 0xFF @m4
waitmovement 0x0
pause 0x20
textcolor 0x0
message @t1 6
applymovement 11 @m5
waitmovement 0x0
movesprite2 0x16 0x8 0x3
pause 0x05
applymovement 11 @m6
waitmovement 0x0
movesprite2 0xE 0x8 0x5
pause 0x05
applymovement 11 @m7
waitmovement 0x0
movesprite2 0xF 0x9 0x3
pause 0x05
applymovement 11 @m6
waitmovement 0x0
movesprite2 0x10 0x9 0x5
pause 0x05
applymovement 11 @m7
waitmovement 0x0
movesprite2 0x11 0xA 0x3
pause 0x05
applymovement 11 @m6
waitmovement 0x0
movesprite2 0x12 0xA 0x5
pause 0x05
applymovement 11 @m7
waitmovement 0x0
movesprite2 0x13 0xB 0x3
pause 0x05
applymovement 11 @m6
waitmovement 0x0
movesprite2 0x14 0xB 0x5
pause 0x05
applymovement 11 @m7
waitmovement 0x0
movesprite2 0x15 0xC 0x3
pause 0x05
applymovement 11 @m8
waitmovement 0x0
message @t2 6
applymovement 0xFF @m9
applymovement 12 @m10
waitmovement 0x0
message @t3 6
applymovement 0xFF @m11
waitmovement 0x0
setvar 0x5012 0x1
release
end

#org @m11
#raw 0x11
#raw 0x13
#raw 0x11
#raw 0x13
#raw 0xFE

#org @t3
= \v\h06: You go first, \v\h01.

#org @m10
#raw 0x3
#raw 0xFE

#org @m9
#raw 0x2
#raw 0xFE

#org @t2
= OAK: You may chose a POKéMON now.

#org @m8
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x0
#raw 0xFE

#org @m7
#raw 0x13
#raw 0x1
#raw 0xFE

#org @m6
#raw 0x0
#raw 0xFE

#org @m5
#raw 0x13
#raw 0x13
#raw 0x1
#raw 0xFE

#org @t1
= OAK: Okay, I have nine POKéMON\nhere and you can have one of them.\pI will lay them out for you two.

#org @m4
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @m3
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x1
#raw 0xFE

#org @m2
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x0
#raw 0xFE

#org @m1
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x11
#raw 0xFE
The problem is at the beginning. The sprites that I want to move permanently don't move at all. It's very strange... I inserted this script a while back with the "movesprite" command, and it worked. Then, I recompiled it using the "movesprite2" command, and it stopped working. Once I saw that it stopped working, I switched back to "movesprite" and it still wouldn't work... I'm starting to wonder if maybe now I have too many person events on my map at once? Help please?

EDIT: Oaky, I tried changing the map so there were only 11 people on it and the "movesprite" command still isn't working... I've gone to another map and made a "movesprite" script there (just to make sure that "movesprite" isn't somehow broken or something...) but the "movesprite" command wouldn't work... It seems like it's broken or somthing weird. It was working when I began my hack, but after a while it just... died. I'm trying a different method now, but any information on this problem would be appreciated, as I can no longer use that command as far as I know...
Have you tried recompiling this from scratch? Rather than editing a compiled script?

Also are you sure you're not mixing up your hex and decimal numbers? Considering your applymovements are in decimal and your movesprites are in hex X__x, it's a very confusing way to write a script.

NarutoActor

The rocks cry out to me

Age 29
Female
Brooklyn/Marlboro
Seen April 2nd, 2016
Posted March 22nd, 2016
1,974 posts
14.4 Years
movesprite is for moving the spirte's current position, and movesprite2 too is for perminitaly moving that spirte. So both the commands should be used in conjunction; Hope that helps.
~NarutoActor
~There are those people who understand hex, F the rest
Male
Seen September 12th, 2015
Posted July 30th, 2014
24 posts
13.8 Years
Hello, I have just recently started rom hacking and i'm new to scripting and advance map and all that good stuff. Naturally, i'd find some tutorials on how to make my people say different things and I found Diego's tutorial for a basic message saying hello.

#dynamic 0x(FSF Offset)
#org @start
lock
faceplayer
msgbox @1 0x6
release
end

#org @1
= Hi.\nMy name is Diego.
However, when I put this exact code into XSE and use the free space offset for my person, my rom either freezes or does nothing when I talk to them. Why is this? Do I need to have a specific amount of free bytes in my offset? Is there something special I need to do with my coding? I'm not trying something super advanced here I just want my person to say hello. I've tried many other tutorials as well and haven't had any luck. Help would be appreciated as I don't know where else to turn to. :/

Renegade

Time for real life...

Male
United States
Seen January 8th, 2015
Posted December 31st, 2014
995 posts
11.5 Years
Hello, I have just recently started rom hacking and i'm new to scripting and advance map and all that good stuff. Naturally, i'd find some tutorials on how to make my people say different things and I found Diego's tutorial for a basic message saying hello.



However, when I put this exact code into XSE and use the free space offset for my person, my rom either freezes or does nothing when I talk to them. Why is this? Do I need to have a specific amount of free bytes in my offset? Is there something special I need to do with my coding? I'm not trying something super advanced here I just want my person to say hello. I've tried many other tutorials as well and haven't had any luck. Help would be appreciated as I don't know where else to turn to. :/
Your "#dynamic 0x (FSF Offset)" command can just be 0x800000 for all of your scripts. You don't need to put in any other offset.

Also, did you compile your script and insert it into the game?
Click Tools --> Batch Compiler --> Checkmark your script that you want to insert --> Click Compile --> Click the copy button. (That will copy the offset that XSE gives you.

Next, go into A-Map. Go to the person event that you want to give the script to. To the right, there should be a bunch of boxes. Near the bottom, there should be a box called "Script Offset". Get rid of the $000000 and change it to the offset that XSE gave you. (The one that you copied) Save it. Then check in game.

blue

gucci

Male
United Kingdom
Seen September 26th, 2021
Posted August 7th, 2019
21,056 posts
15.4 Years
Just wondering what is wrong with the following:
Spoiler:
#dynamic 0x800000

#org @start
lockall
applymovement 0x0A @move
waitmovement 0x0
msgbox @msg1 0x6
trainerbattle 0x3 0x2 0x0 @defeat
msgbox @msg2 0x6
applymovement 0x0A @move2
waitmovement 0x0
setflag 0x1245
setvar 0x5051 0x1
hidesprite 0xA
releaseall
end

#org @move
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

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

#org @msg1
= Hey [player], long time no see!\nWait, you have the Boulder Badge\ltoo? We must battle... [player] I\lchallenge you!

#org @msg2
= Well [player] I still can't manage to\nbeat you! I'm off to Cerulean\lCity, hopefully Misty will teach\lme some tips on how to become a\lbetter trainer. Catch you later!

#org @defeat
= I thought we had you this time!


I got it right the first time, this is the second script.
SetVar = 5051
Person ID = 1245
Person Event Number = 10

I'm not sure whether I've got the Hex/Dec mixed up but basically what happens is when the player walks on the Script tile, it activates but instead of the OW walking upto the player then opening up with the speech, it just opens the speech and battles without any Sprite walking on screen.

Also, I'm not sure whether the Setvar should stay the same considering the last Setvar was 5050, it's been a while since I've done this.

johnr754

I am JOHN, heck yeah!

Male
California, USA! USA!
Seen August 2nd, 2015
Posted June 24th, 2013
78 posts
13.5 Years
I tried to make a wild battle script in XSE, and it half-worked. There was no battle. Instead, the cry was made, and it left. Makes it sound like a roaming Pokémon.

Spoiler:
#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @1 0x6
cry 0x90 0x0
wildbattle 0x90 0x1E 0x0 0x0 0x0 0x0
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x200
release
end

#org @1
= ARTICUNO: Gaoooh!
---

Renegade

Time for real life...

Male
United States
Seen January 8th, 2015
Posted December 31st, 2014
995 posts
11.5 Years
Just wondering what is wrong with the following:
Spoiler:
#dynamic 0x800000

#org @start
lockall
applymovement 0x0A @move
waitmovement 0x0
msgbox @msg1 0x6
trainerbattle 0x3 0x2 0x0 @defeat
msgbox @msg2 0x6
applymovement 0x0A @move2
waitmovement 0x0
setflag 0x1245
setvar 0x5051 0x1
hidesprite 0xA
releaseall
end

#org @move
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

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

#org @msg1
= Hey [player], long time no see!\nWait, you have the Boulder Badge\ltoo? We must battle... [player] I\lchallenge you!

#org @msg2
= Well [player] I still can't manage to\nbeat you! I'm off to Cerulean\lCity, hopefully Misty will teach\lme some tips on how to become a\lbetter trainer. Catch you later!

#org @defeat
= I thought we had you this time!


I got it right the first time, this is the second script.
SetVar = 5051
Person ID = 1245
Person Event Number = 10

I'm not sure whether I've got the Hex/Dec mixed up but basically what happens is when the player walks on the Script tile, it activates but instead of the OW walking upto the player then opening up with the speech, it just opens the speech and battles without any Sprite walking on screen.

Also, I'm not sure whether the Setvar should stay the same considering the last Setvar was 5050, it's been a while since I've done this.
Does the OW Sprite start off screen? If so, then you need to have the OW exactly one tile away from being able to be seen by the player. Also, you might need a "showsprite 0x0A" command before the "applymovement 0x0A @move" command.

I tried to make a wild battle script in XSE, and it half-worked. There was no battle. Instead, the cry was made, and it left. Makes it sound like a roaming Pokémon.

Spoiler:
#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @1 0x6
cry 0x90 0x0
wildbattle 0x90 0x1E 0x0 0x0 0x0 0x0
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x200
release
end

#org @1
= ARTICUNO: Gaoooh!
I'm not sure why you have the additional 0x0 0x0 0x0 at the end of the "wildbattle" command, but they are not needed. Try getting rid of them and see if that works. Also, if the Pokemon is not holding an item, you don't need the first 0x0 either. Just "wildbattle 0x90 0x1E".

johnr754

I am JOHN, heck yeah!

Male
California, USA! USA!
Seen August 2nd, 2015
Posted June 24th, 2013
78 posts
13.5 Years
I'm not sure why you have the additional 0x0 0x0 0x0 at the end of the "wildbattle" command, but they are not needed. Try getting rid of them and see if that works. Also, if the Pokemon is not holding an item, you don't need the first 0x0 either. Just "wildbattle 0x90 0x1E".
I tried doing that; it said I was missing #define or #parameter on line 8. Also, I'm doing this for Pokémon Emerald Version.
---
Male
Seen September 12th, 2015
Posted July 30th, 2014
24 posts
13.8 Years
Your "#dynamic 0x (FSF Offset)" command can just be 0x800000 for all of your scripts. You don't need to put in any other offset.

Also, did you compile your script and insert it into the game?
Click Tools --> Batch Compiler --> Checkmark your script that you want to insert --> Click Compile --> Click the copy button. (That will copy the offset that XSE gives you.

Next, go into A-Map. Go to the person event that you want to give the script to. To the right, there should be a bunch of boxes. Near the bottom, there should be a box called "Script Offset". Get rid of the $000000 and change it to the offset that XSE gave you. (The one that you copied) Save it. Then check in game.
You did help me get the message box to appear, but the hiker uses text belonging to someone else instead of the text I assigned to him. He says "I tripped over a rocky pokemon geodude" Instead of what I wanted him to say "Hey! No barging in my house!" I followed all your steps and I made sure I put in the offset XSE gave me the 2nd time.

Complier Output
Spoiler:
eXtreme Script Editor v1.0.0
-------------------------------------
Opening output --> E:\Pokemon Programs\Pokemon - Fire Red.gba...
Processing input script...
1 - DYNAMIC
> lDynamicStart = 0x800000
2 - ORG
> lNewOffset = 0x800028
3 - (6A) - LOCK
4 - (5A) - FACEPLAYER
5 - (0F) MSGBOX (native)
> pText = 0x8800033
6 - (6C) - RELEASE
7 - (02) - END
9 - ORG
> lNewOffset = 0x800033
10 - RAW TEXT
> sText = "Hey! No barging in my house!"
-------------------------------
DYNAMIC_OFFSET 1
> sLabel = @1
> lOffset = 0x800033
DYNAMIC_OFFSET 2
> sLabel = @start
> lOffset = 0x800028
-------------------------------
Cleaning up...
Closing output...
Finished processing input in 0.125 seconds.

Renegade

Time for real life...

Male
United States
Seen January 8th, 2015
Posted December 31st, 2014
995 posts
11.5 Years
You did help me get the message box to appear, but the hiker uses text belonging to someone else instead of the text I assigned to him. He says "I tripped over a rocky pokemon geodude" Instead of what I wanted him to say "Hey! No barging in my house!" I followed all your steps and I made sure I put in the offset XSE gave me the 2nd time.

Complier Output
Spoiler:
eXtreme Script Editor v1.0.0
-------------------------------------
Opening output --> E:\Pokemon Programs\Pokemon - Fire Red.gba...
Processing input script...
1 - DYNAMIC
> lDynamicStart = 0x800000
2 - ORG
> lNewOffset = 0x800028
3 - (6A) - LOCK
4 - (5A) - FACEPLAYER
5 - (0F) MSGBOX (native)
> pText = 0x8800033
6 - (6C) - RELEASE
7 - (02) - END
9 - ORG
> lNewOffset = 0x800033
10 - RAW TEXT
> sText = "Hey! No barging in my house!"
-------------------------------
DYNAMIC_OFFSET 1
> sLabel = @1
> lOffset = 0x800033
DYNAMIC_OFFSET 2
> sLabel = @start
> lOffset = 0x800028
-------------------------------
Cleaning up...
Closing output...
Finished processing input in 0.125 seconds.
Did you delete any of the original events that were already in the game?
Male
Seen September 12th, 2015
Posted July 30th, 2014
24 posts
13.8 Years
Did you delete any of the original events that were already in the game?
No, I've been good about moving the npcs I don't need out of bounds. Just to make sure, I even got an original firered rom untouched and I didn't do anything except add 1 person and followed the steps you told me to do before again. The person still doesn't say anything. I've pretty much lost hope in scripting since my anti-virus software got rid of XSE for having a trojan. Thanks for trying to help me at least :/

Renegade

Time for real life...

Male
United States
Seen January 8th, 2015
Posted December 31st, 2014
995 posts
11.5 Years
Hello, I have a problem with this script:

#dynamic 0x800000

#org @start
lock
special 0x113
applymovement 0x7F @m1
waitmovement 0x0
special 0x114
textcolor 0x0
message @t1 6
applymovement 0x2 @m2
applymovement 0x3 @m2
waitmovement 0x0
message @t2 6
applymovement 0x1 @m3
waitmovement 0x0
message @t3 6
special 0x113
applymovement 0x1 @m4
applymovement 0x7F @m15
waitmovement 0x0
special 0x114
message @t4 6
playsong 0x0000 0x0
special 0x113
applymovement 0x7F @m5
waitmovement 0x0
special 0x114
applymovement 0xFF @m3
waitmovement 0x0
pause 0x20
applymovement 0xFF @m6
waitmovement 0x0
clearflag 0x531
showsprite 0x4
pause 0x15
applymovement 0x4 @m7
waitmovement 0x0
message @t5 6
applymovement 0xFF @m8
applymovement 0x4 @m8
waitmovement 0x0
message @t6 6
special 0x113
applymovement 0x7F @m9
waitmovement 0x0
special 0x114
fadedefault
message @t7 6
special 0x113
applymovement 0x1 @m10
applymovement 0x7F @m10
waitmovement 0x0
special 0x114
trainerbattle 0x1 0x2DF 0x0 @before @after @further
end

#org @further
message @t8 6
applymovement 0x2 @m11
applymovement 0x3 @m11
waitmovement 0x0
message @t9 6
applymovement 0x2 @m11
applymovement 0x3 @m11
waitmovement 0x0
message @t10 6
fadescreen 0x1
hidesprite 0x1
setflag 0x532
hidesprite 0x2
setflag 0x533
hidesprite 0x3
setflag 0x534
hidesprite 0x5
setflag 0x535
special 0x113
applymovement 0x7F @m12
waitmovement 0x0
special 0x114
special 0x0
fadescreen 0x0
pause 0x10
applymovement 0x4 @m7
applymovement 0xFF @m13
waitmovement 0x0
message @t11 6
applymovement 0x4 @m14
applymovement 0xFF @m14
waitmovement 0x0
message @t12 6
applymovement 0x4 @m7
applymovement 0xFF @m13
waitmovement 0x0
message @t13 6
applymovement 0x4 @m16
waitmovement 0x0
hidesprite 0x4
setflag 0x531
setvar 0x5027 0x1
release
end

#org @m15
#raw 0x10
#raw 0x10
#raw 0xFE

#org @m16
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

#org @t13
= Anyways, I'm going to OLIVETREE\nCITY. I'm going to collect all of\lthe gym badges and complete the\lPOKéDEX.\pI'm not sure what you or \v\h06\nwill do, but remember this, I'll\lalways be close by!\pSee ya!

#org @t12
= The LAPRAS is gone. Oh well.

#org @m14
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @t11
= LUKE: \v\h01, I was going to ask\nyou if you wanted to battle...\pBut man, that was weird. I guess\nthose were the same black suits\lthat we saw at OAKWOOD TOWN.\pThey call themselves TEAM SHADOW.\nWhat do they even want, anyways?\pOh, look!

#org @m13
#raw 0x3
#raw 0xFE

#org @m12
#raw 0x10
#raw 0x12
#raw 0xFE

#org @t10
= GRUNTS: SIR!

#org @t9
= GRUNTS: SIR!\pVALANCE: Let us departure at once!\nWe'll find another POKéMON to get\lus to MONATIOUS ISLAND...

#org @m11
#raw 0x21
#raw 0x21
#raw 0xFE

#org @t8
= VALANCE: What? Why are you getting\nin our way? Err..\pGRUNTS!

#org @after
= Err.. How..?

#org @before
= Prepare to battle!

#org @m10
#raw 0x10
#raw 0xFE

#org @t7
= I am done playing games with you.

#org @m9
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0xFE

#org @t6
= VALANCE: Okay, you are done.

#org @m8
#raw 0x1
#raw 0xFE

#org @t5
= LUKE: \v\h01! I was going to tell\nyou that I am going on a POKéMON\ljourney but then I ran into some\lof these black suits...

#org @m7
#raw 0x2
#raw 0xFE

#org @m6
#raw 0x12
#raw 0x3
#raw 0xFE

#org @m5
#raw 0x10
#raw 0x10
#raw 0xFE

#org @t4
= Who do we have here?\pGRUNTS: This is the boy we were\ntalking about. He is getting in\lthe way of our plans.\pVALANCE: Hmm. You dare to disturb\nthe plans of TEAM SHADOW?\pPrepare to...\pHuh?

#org @m4
#raw 0x8
#raw 0xFE

#org @t3
= VALANCE: Hmm?

#org @m3
#raw 0x0
#raw 0xFE

#org @t2
= GRUNTS: B..B..Boss!

#org @m2
#raw 0x0
#raw 0x62
#raw 0xFE

#org @t1
= VALANCE: Ah, yes. LAPRAS.\nYou will come with me. I need\lyour surfing abilities so I can\lfinally get to MONATIOUS ISLAND.

#org @m1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE
Everything works out great, but at the end of the script, the player freezes and can't move... Help please?

miksy91

Dark Energy is back in action! ;)

Male
Finland
Seen September 21st, 2022
Posted September 21st, 2022
1,480 posts
14.6 Years
Hello, I have a problem with this script:

special 0x114
trainerbattle 0x1 0x2DF 0x0 @before @after @further
end
Everything works out great, but at the end of the script, the player freezes and can't move... Help please?
What's specifically this "end" of the script?
Anyway, I haven't been keeping an eye an FR's scripting system that much but as far as I remember, when executing trainerbattle, these "@before, @after, @further" are pointers used when looking for text data to show.

I couldn't find @before & @after at all so perhaps those work but @further points to script data instead. Currently, the game looks for text to display but instead, you're trying to use a message -code. Basically, it tries to display text through that script data in @further.
Pokémon Dark Energy
Some ROM hacking related stuff

johnr754

I am JOHN, heck yeah!

Male
California, USA! USA!
Seen August 2nd, 2015
Posted June 24th, 2013
78 posts
13.5 Years
I'm not sure why you have the additional 0x0 0x0 0x0 at the end of the "wildbattle" command, but they are not needed. Try getting rid of them and see if that works. Also, if the Pokemon is not holding an item, you don't need the first 0x0 either. Just "wildbattle 0x90 0x1E".
I tried doing that; it said I was missing #define or #parameter on line 8. Also, I'm doing this for Pokémon Emerald Version.
They were once one post, but can anyone help?
---

Renegade

Time for real life...

Male
United States
Seen January 8th, 2015
Posted December 31st, 2014
995 posts
11.5 Years
What's specifically this "end" of the script?
Anyway, I haven't been keeping an eye an FR's scripting system that much but as far as I remember, when executing trainerbattle, these "@before, @after, @further" are pointers used when looking for text data to show.

I couldn't find @before & @after at all so perhaps those work but @further points to script data instead. Currently, the game looks for text to display but instead, you're trying to use a message -code. Basically, it tries to display text through that script data in @further.
Na, my script was correct. I just needed to put something extra in it. But thanks anyways.

johnr754

I am JOHN, heck yeah!

Male
California, USA! USA!
Seen August 2nd, 2015
Posted June 24th, 2013
78 posts
13.5 Years
Again, can anyone help me with this? Whenever I try to compile it, it says that I have to add define or parameter in line 8. Here is the script:

Spoiler:
#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @1 0x6
cry 0x90 0x0
wildbattle 0x90 0x1E
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x200
release
end

#org @1
= ARTICUNO: Gaoooh!
---

blue

gucci

Male
United Kingdom
Seen September 26th, 2021
Posted August 7th, 2019
21,056 posts
15.4 Years
Again, can anyone help me with this? Whenever I try to compile it, it says that I have to add define or parameter in line 8. Here is the script:

Spoiler:
#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @1 0x6
cry 0x90 0x0
wildbattle 0x90 0x1E
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x200
release
end

#org @1
= ARTICUNO: Gaoooh!
Try compiling this, it works fine for me (Make sure you set the Person ID to the flag number which I've put as 1261)
Spoiler:

#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @1 0x6
cry 0x90 0x0
wildbattle 0x90 0x1E 0x0
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x1261
release
end

#org @1
= ARTICUNO: Gaoooh!


Also, could someone help me with this? Rather than giving the Pokemon it skips to the given text.
Spoiler:

#dynamic 0x800000

#org @start
checkflag 0x828
if 0x1 call @Given
msgbox @need 0x2
fanfare 0x172
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
waitfanfare
setflag 0x828
end

#org @Given
msgbox @how 0x2
end

#org @need
= I just caught a Squirtle that was\nalways getting into mischief.\lI think it needs a good trainer to\lset it straight. You look like a\lgood trainer to take care of it!

#org @how
= Is Squirtle doing okay? I hope\nit's not causing more mischief!

johnr754

I am JOHN, heck yeah!

Male
California, USA! USA!
Seen August 2nd, 2015
Posted June 24th, 2013
78 posts
13.5 Years


Try compiling this, it works fine for me (Make sure you set the Person ID to the flag number which I've put as 1261)
Spoiler:

#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @1 0x6
cry 0x90 0x0
wildbattle 0x90 0x1E 0x0
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x1261
release
end

#org @1
= ARTICUNO: Gaoooh!
That did not work. It said the same message. Missing #define or parameter.

It's for Pokémon Emerald, if you were wondering. I'm also using XSE 1.1.1.
---

machomuu

Stuck in Hot Girl Summer

She/Her
Take a left, turn right at the next stop, bear left for a few mil
Seen March 4th, 2023
Posted April 26th, 2022
10,505 posts
15.1 Years
Also, could someone help me with this? Rather than giving the Pokemon it skips to the given text.
Spoiler:

#dynamic 0x800000

#org @start
checkflag 0x828
if 0x1 call @Given
msgbox @need 0x2
fanfare 0x172
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
waitfanfare
setflag 0x828
end

#org @Given
msgbox @how 0x2
end

#org @need
= I just caught a Squirtle that was\nalways getting into mischief.\lI think it needs a good trainer to\lset it straight. You look like a\lgood trainer to take care of it!

#org @how
= Is Squirtle doing okay? I hope\nit's not causing more mischief!
Sounds like Flag 0x828 is already activated.

blue

gucci

Male
United Kingdom
Seen September 26th, 2021
Posted August 7th, 2019
21,056 posts
15.4 Years
Sounds like Flag 0x828 is already activated.
By what exactly? This is a clean FR ROM where I have only used Flags 1200+

miksy91

Dark Energy is back in action! ;)

Male
Finland
Seen September 21st, 2022
Posted September 21st, 2022
1,480 posts
14.6 Years

By what exactly? This is a clean FR ROM where I have only used Flags 1200+
Depends on what flag no. 828 stands for in the original rom file. For example, the flag of old man, in Viridian City who teaches you how to catch a pokemon, is originally set (1) when the "game starts" (or you'll arrive at your house and can move) and is cleared (0) at the event when Pokedex is gotten.
*Of course it could have been programmed otherwise but I think this is how Gamefreak wants to do the stuff

So I'd assume flag 828 is set during the intro sequence (along with some other flags).
Pokémon Dark Energy
Some ROM hacking related stuff

blue

gucci

Male
United Kingdom
Seen September 26th, 2021
Posted August 7th, 2019
21,056 posts
15.4 Years
Depends on what flag no. 828 stands for in the original rom file. For example, the flag of old man, in Viridian City who teaches you how to catch a pokemon, is originally set (1) when the "game starts" (or you'll arrive at your house and can move) and is cleared (0) at the event when Pokedex is gotten.
*Of course it could have been programmed otherwise but I think this is how Gamefreak wants to do the stuff

So I'd assume flag 828 is set during the intro sequence (along with some other flags).
Ah right, Okay well it's fine now, I've fixed it so thanks.

machomuu

Stuck in Hot Girl Summer

She/Her
Take a left, turn right at the next stop, bear left for a few mil
Seen March 4th, 2023
Posted April 26th, 2022
10,505 posts
15.1 Years


Ah right, Okay well it's fine now, I've fixed it so thanks.
How did you end up fixing it?