Script Help Thread (DO NOT REQUEST SCRIPTS) Page 233

Started by HackMew December 20th, 2008 5:10 AM
  • 625760 views
  • 9682 replies
Male
Poland
Seen March 26th, 2023
Posted May 28th, 2019
69 posts
14.9 Years
Thanks, but there's another problem.
After the script, map turns into this:

This is the script:
Spoiler:
#dynamic 0x800200
#org @start
lock
faceplayer
applymovement 0x03 @move
waitmovement 0x0
msgbox @1 0x6
call 0x1B6A9B
msgbox @2 0x6
fanfare 0x13E
msgbox @3 0x6
setflag 0x860
waitfanfare
fanfare 0x13E
msgbox @4 0x6
setflag 0x801
waitfanfare
msgbox @5 0x6
setflag 0x201
fadescreen 0x1
hidesprite 0x800F
fadescreen 0x0
release
end

#org @1
= ???: Oh! I-i'm sorry. Am i\nblocking your way? Im so sorry!\l...\lOh, well. Can you tell me what\ltime is it?

#org @move
#raw 0x56
#raw 0xFE

#org @2
= ???: Thank you very much! Visit me\nat my lab!...\lAh! I forgot!\lHere, take that package. It has\lRunning Shoes and Pokedex!

#org @3
= \v\h01 got Running Shoes!

#org @4
= \v\h01 got a Pokedex!

#org @5
= ???: I hope it will be useful!\nSee ya!


What is the reason? Maybe it's too close to the another map?(just two steps)
Or i failed somewhere in script, as always?
And after setting the time, Prof. turns back to me or turns into green brendan.

Oh, and smaller problem...
What is command to make pokemon shiny? I think it was setvar or something...
Male
Rome, Italy
Seen November 21st, 2016
Posted July 10th, 2011
4 posts
11.9 Years
I've a problem. I use Pokemon Ruby and I tried to change player's ow in game. I found the offset that tells the rom where to

load the overworld sprite and then I compiled this script:
Spoiler:
#org @start
lock
faceplayer
msgbox @1 0x2
writebytetooffset 0x98 0x2020010
writebytetooffset 0xE3 0x2020011
writebytetooffset 0x36 0x2020012
writebytetooffset 0x8 0x2020013
release
end

#org @1
= Change!

When I open the rom with VBA, player's ow change, but not the palettes.
Is it normal? How can I fix that?
Male
florida, thats all I'm saying xD
Seen July 25th, 2012
Posted July 8th, 2011
2 posts
12.2 Years
hi um, I'm have a couple problems with a level script I created.
its
Spoiler:
#dynamic 0x801900
#org @start
setvar 0x7002 0x1
applymovement 0x03 @moverival
waitmovement 0x0
msgbox @thereuare 0x6
applymovement 0xFF @heromovement
applymovement 0x03 @moverival1
waitmovement 0x0
checkflag 0x82F
if 0x1 goto @done
if 0x0 goto @notdone
release
end
#org @moverival
#raw 0x01
#raw 0x62
#raw 0xFE
#org @thereuare
= There you are! I've been waiting\nfor you!
#org @heromovement
#raw 0x3
#raw 0xFE
#org @moverival1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE
#org @notdone
msgbox @waitcrap 0x6
applymovement 0x03 @gobackinside
msgbox @GobackinsideIsaid 0x6
applymovement 0xFF @insideugo
applymovement 0x03 @pushyouinside
waitmovement 0x0
release
end
#org @waitcrap
= Well lets-
#org @gobackinside
#raw 0x62
#raw 0xFE
#org @GobackinsideIsaid
= Hey wait a second! Where are your\nrunning shoes!? It'll take twice\las long to get there then without\lthem! Go back and get them! The\llast place I saw you had them was\lon your desk...nice and clean too.
#org @insideugo
#raw 0x11
#raw 0xFE
#org @pushyouinside
#raw 0x12
#raw 0x13
#raw 0xFE
#org @done
msgbox @greatletsgo 0x6
applymovement 3 @rivalgoesbye
release
end
#org @greatletsgo
= Finally, you're ready! I'll be\nwaiting for you at route 1's\lentrance on the left of the town!
#org @rivalgoesbye
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x60
#raw 0xFE


the script is supposed to check of you have the running shoes flag set. if you don't, he's supposed to push you back inside since this script box is literally the tile outside your house's door, but I (the player) just gets stuck ontop of the door. and I can't go anywhere. problem with movements? Dx

and if you DO have it set, it plays through it normaly, until the end. at the end he tells you that he will wait for you at the routes entrance, and then he's "supposed" to walk away as it says in the script.
...but he doesn't. he just stays where he is, and If I walk over where the level script was it freezes. I don't understand why he won't walk and dissappear like he's supposed to, the script looks fine to me :/ thoughts possibly?

PS this is my first level script...so sorry if the problems are obvious Dx

esperance

Age 26
Male
OH
Seen October 8th, 2022
Posted January 11th, 2022
3,830 posts
13.1 Years
Spoiler:
#dynamic 0x801900
#org @start
setvar 0x7002 0x1
applymovement 0x03 @moverival
waitmovement 0x0
msgbox @thereuare 0x6
applymovement 0xFF @heromovement
applymovement 0x03 @moverival1
waitmovement 0x0
checkflag 0x82F
if 0x1 goto @done
if 0x0 goto @notdone
release
end
#org @moverival
#raw 0x01
#raw 0x62
#raw 0xFE
#org @thereuare
= There you are! I've been waiting\nfor you!
#org @heromovement
#raw 0x3
#raw 0xFE
#org @moverival1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE
#org @notdone
msgbox @waitcrap 0x6
applymovement 0x03 @gobackinside
msgbox @GobackinsideIsaid 0x6
applymovement 0xFF @insideugo
applymovement 0x03 @pushyouinside
waitmovement 0x0
release
end
#org @waitcrap
= Well lets-
#org @gobackinside
#raw 0x62
#raw 0xFE
#org @GobackinsideIsaid
= Hey wait a second! Where are your\nrunning shoes!? It'll take twice\las long to get there then without\lthem! Go back and get them! The\llast place I saw you had them was\lon your desk...nice and clean too.
#org @insideugo
#raw 0x11
#raw 0xFE
#org @pushyouinside
#raw 0x12
#raw 0x13
#raw 0xFE
#org @done
msgbox @greatletsgo 0x6
applymovement 3 @rivalgoesbye
release
end
#org @greatletsgo
= Finally, you're ready! I'll be\nwaiting for you at route 1's\lentrance on the left of the town!
#org @rivalgoesbye
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x60
#raw 0xFE


the script is supposed to check of you have the running shoes flag set. if you don't, he's supposed to push you back inside since this script box is literally the tile outside your house's door, but I (the player) just gets stuck ontop of the door. and I can't go anywhere. problem with movements? Dx

and if you DO have it set, it plays through it normaly, until the end. at the end he tells you that he will wait for you at the routes entrance, and then he's "supposed" to walk away as it says in the script.
...but he doesn't. he just stays where he is, and If I walk over where the level script was it freezes. I don't understand why he won't walk and dissappear like he's supposed to, the script looks fine to me :/ thoughts possibly?
Let's see...
1. You need to add the "warp" command, or you won't go inside. In a script, if the player is moved over a warp, they won't warp.
2. You need to add "waitmovement 0x0" under the applymovement.
What are you so afraid of?

Satoshi Ookami

Memento Mori

Age 30
Male
Abyss of Time, Great Seal
Seen August 5th, 2018
Posted July 3rd, 2018
14,253 posts
14.8 Years
Oh, and smaller problem...
What is command to make pokemon shiny? I think it was setvar or something...
You need to patch your ROM with Shinyzer and then the command is setvar 0x8003 0x1 (I think at least... feel free to correct me guys)
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List
Age 30
Male
Maryland
Seen April 15th, 2013
Posted May 7th, 2012
24 posts
13.6 Years
Hello everyone. I apologize if some one has asked a similar question before but I'm having two problems. The first one involves my script, and the problem is when I go to talk to the person to start the event no text box shows up but I hear the sound effect when you talk to some one. Here is my script:

Game: Fire Red
Type: Yes/No script with a battle and movement afterwards.
Tool: XSE
Spoiler:
#dynamic 820000

#org @start
lock
faceplayer
msgbox @test 0x5
compare LASTRESULT 0x1
if 0x1 goto @battle
release
end

#org @test
= YOU MUST PASS A TEST!

#org @battle
trainerbattle 0x0 0x02A 0x0 @before @after
applymovement 0x04 @move
waitmovement 0x0
msgbox @beaten 0x2
release
end

#org @before
= YES!

#org @after
= NICE MUSCLES!

#org @move
#raw 0x12
#raw 0x12
#raw 0xFE

#org @beaten
= YOU HAVE PASSED THE TEST!

When the player says yes a battle will start and if the player wins the guy moves. Again the problem is when I go to initiate the event, nothing happens. All the event data in advance map seems correct. Am I supposed to use a certain unknown or something?

For the second problem, sometimes after after a wild battle or exiting a menu, my player disappears. This is hard to describe but I can still move around but my overworld is invisible. I believe this has something to do with a bad ROM, but it does not happen all the time and I am more concerned with the first issue. Thanks in advance!

Spherical Ice

Age 25
Leicester, UK
Seen 21 Hours Ago
Posted February 20th, 2022
5,251 posts
15.5 Years
For the first one, I don't quite understand what the problem is, though for a script to continue after a battle, you should set it out like this:
...
#org @battle
trainerbattle 0x0 0x02A 0x1 @before @after @later
release
end

#org @later
lock
applymovement 0x04 @move
waitmovement 0x0
msgbox @beaten 0x2
release
end
...
As for the second one, if any person events on the map are set to "Look Down," set it to "No Movement." Look Down tends to be somewhat glitchy, so just stick to No Movement, as it has the same effect. :3

DuoRyan

Hack'in as usual, it seem.

Age 26
Male
Somewhere.
Seen January 7th, 2017
Posted October 12th, 2014
335 posts
13.5 Years
For the first one, I don't quite understand what the problem is, though for a script to continue after a battle, you should set it out like this:
...
#org @battle
trainerbattle 0x0 0x02A 0x1 @before @after @later
release
end

#org @later
lock
applymovement 0x04 @move
waitmovement 0x0
msgbox @beaten 0x2
release
end
...
As for the second one, if any person events on the map are set to "Look Down," set it to "No Movement." Look Down tends to be somewhat glitchy, so just stick to No Movement, as it has the same effect. :3
If I remember correctly you used trainerbattle 0x1 to continue
Pokemon Treasure.
Progress: Planning.

Spherical Ice

Age 25
Leicester, UK
Seen 21 Hours Ago
Posted February 20th, 2022
5,251 posts
15.5 Years
If I remember correctly you used trainerbattle 0x1 to continue
Ah yes, I put the 0x1 in the wrong place. It should be the first 0x0, not the second.
Male
Seen July 10th, 2011
Posted July 10th, 2011
7 posts
11.9 Years
as in this thread I working on a starter pokemon script,

here is my new code

#dynamic 0x800000

#org @start
lock
faceplayer
setflag 0x828
setflag 0x291
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
hidesprite LASTTALKED
setflag 0x999
bufferpokemon 0x0 0x7
preparemsg @talk1
fanfare 0x13E
waitfanfare
release
end

#org @talk1
= [player] found a BADEGG!

with the set flag 0x999 (PERSON ID) I got the poke ball diapear, it does disapear, but if i leave to a different area and come back, it reapears!
Male
Seen July 10th, 2011
Posted July 10th, 2011
7 posts
11.9 Years
That shouldn't be happening...are you sure the person ID is 999?
Yes that what i set it to, with out that code it reapears after the first step so it works, but when I leave pallet town, and come back It reapears!

When I try to make a script that gives the very first pokemon, you receive the pokemon, but it doesn't show up, what am I doing wrong?
Sorry that I'm posting this again, but I really need help...
thats because you need
setflag 0x828
setflag 0x291

Satoshi Ookami

Memento Mori

Age 30
Male
Abyss of Time, Great Seal
Seen August 5th, 2018
Posted July 3rd, 2018
14,253 posts
14.8 Years
---
---
---
What version of XSE do you use?
You see... if you're using 1.1.1 then it's okay, but if you're using older version msgbox commands needs callstd command.
So instead of msgbox @test 0x5
It should be like this:
msgbox @test
callstd 0x5
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List

Spherical Ice

Age 25
Leicester, UK
Seen 21 Hours Ago
Posted February 20th, 2022
5,251 posts
15.5 Years
Can someone plaese tell me how to write a script for pokemon sapphire
otherwise I can't continue my pokemon hack and iv'e got an image in my head on what my hack will look like also to be presise i am gonna need to know how to write a wild battle script first, becase theres alot of them.
Try reading diegoisawesome's XSE tutorial.
Male
Seen May 31st, 2012
Posted July 21st, 2011
16 posts
11.9 Years
#org 0x71C7CC
lockall
setvar 0x7001 0x0
goto 0x71C830
end

'-----------------------
#org 0x1C830
textcolor 0x0
msgbox 0x71CBB0 '"come here message."
callstd 0x4
closeonkeypress
playsong 0x110 0x0
compare 0x7001 0x0
if 0x1 call 0x71CC2C
compare 0x7001 0x1
if 0x1 call 0x8C458C
compare 0x7001 0x2
if 0x1 call 0x8C45F0
msgbox 0x93788C 'going to boat msg
callstd 0x4
closeonkeypress
applymovement 0x5 0x937760 ‘disappear off screen sequence
waitmovement 0x0
fadedefault
clearflag 0x9000
releaseall
end

'-----------------------
#org 0x1CC2C ‘nearest tile
applymovement MOVE_PLAYER 0x7200B0 ‘player move
waitmovement 0x0
return

'-----------------------
#org 0xC458C ‘2 nearest tile
applymovement MOVE_PLAYER 0x8C4654 ‘move player
waitmovement 0x0
return

'-----------------------
#org 0xC45F0 ‘3 tile away
applymovement MOVE_PLAYER 0x8C471C ‘move player
waitmovement 0x0
return


'-----------
' Movements
#org 0x37760 ‘diasapear
#raw 12 'Step Left (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw FE 'End of Movements

#org 0x200B0 '1 tile
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0xC4654 '2 tile
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements


#org 0xC471C '3 tile
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements
'---------
' Messages
#org 0x1CBB0
= Hello v\h01, come quick.

#org 0x3788C
= I’m heading to the boat now.

This script I wrote isn't working at all, I have tried to make the player as soon as he enters the building to go up and see prof OAK. But when ever he steps on the green scripting tiles I have set with this code on them the game freezes. I am using XSE version 1.0.0 and AdvancedMap 1.95(Latest version) and running the Rom for testing on VisualBoyAdvanced version 1.72. Please help I have watched several videos, read loads of tutorials but still it doesn't work. I have also analyzed in-game scripts and tried to adapt them but with no success, I would be very, very grateful for any help, and thanks in advance.
Male
Seen August 22nd, 2011
Posted July 10th, 2011
13 posts
13.7 Years
Yes that what i set it to, with out that code it reapears after the first step so it works, but when I leave pallet town, and come back It reapears!



thats because you need
setflag 0x828
setflag 0x291
Alright, I got the give pokemon part working, but now whichever script I make, the text boxes don't show up.
I made this real quick:
Spoiler:

#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x800
if 0x1 goto @done
msgbox @1 0x4
closeonkeypress
release
end

#org @done
= I see you already have\nyour first very own Pokemon!

#org @1
= You should get your first\nPokemon from that man\nover there!

Any idea what I'm doing wrong?
Male
Rome, Italy
Seen November 21st, 2016
Posted July 10th, 2011
4 posts
11.9 Years
Alright, I got the give pokemon part working, but now whichever script I make, the text boxes don't show up.
I made this real quick:
Spoiler:

#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x800
if 0x1 goto @done
msgbox @1 0x4
closeonkeypress
release
end

#org @done
= I see you already have\nyour first very own Pokemon!

#org @1
= You should get your first\nPokemon from that man\nover there!

Any idea what I'm doing wrong?
You must insert the command 'waitmsg' after the msgbox.

DrFuji

Heiki Hecchara‌‌

Age 30
Male
Aussie
Seen 4 Days Ago
Posted February 12th, 2021
1,693 posts
13.7 Years
#org 0x71C7CC
lockall
setvar 0x7001 0x0
goto 0x71C830
end

'-----------------------
#org 0x1C830
textcolor 0x0
msgbox 0x71CBB0 '"come here message."
callstd 0x4
closeonkeypress
playsong 0x110 0x0
compare 0x7001 0x0
if 0x1 call 0x71CC2C
compare 0x7001 0x1
if 0x1 call 0x8C458C
compare 0x7001 0x2
if 0x1 call 0x8C45F0
msgbox 0x93788C 'going to boat msg
callstd 0x4
closeonkeypress
applymovement 0x5 0x937760 ‘disappear off screen sequence
waitmovement 0x0
fadedefault
clearflag 0x9000
releaseall
end

'-----------------------
#org 0x1CC2C ‘nearest tile
applymovement MOVE_PLAYER 0x7200B0 ‘player move
waitmovement 0x0
return

'-----------------------
#org 0xC458C ‘2 nearest tile
applymovement MOVE_PLAYER 0x8C4654 ‘move player
waitmovement 0x0
return

'-----------------------
#org 0xC45F0 ‘3 tile away
applymovement MOVE_PLAYER 0x8C471C ‘move player
waitmovement 0x0
return


'-----------
' Movements
#org 0x37760 ‘diasapear
#raw 12 'Step Left (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw FE 'End of Movements

#org 0x200B0 '1 tile
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0xC4654 '2 tile
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements


#org 0xC471C '3 tile
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements
'---------
' Messages
#org 0x1CBB0
= Hello v\h01, come quick.

#org 0x3788C
= I’m heading to the boat now.

This script I wrote isn't working at all, I have tried to make the player as soon as he enters the building to go up and see prof OAK. But when ever he steps on the green scripting tiles I have set with this code on them the game freezes. I am using XSE version 1.0.0 and AdvancedMap 1.95(Latest version) and running the Rom for testing on VisualBoyAdvanced version 1.72. Please help I have watched several videos, read loads of tutorials but still it doesn't work. I have also analyzed in-game scripts and tried to adapt them but with no success, I would be very, very grateful for any help, and thanks in advance.
Select the green script tile and make sure that the Unknown and Variable Number are set to these: