Script Help Thread (DO NOT REQUEST SCRIPTS) Page 174

Started by HackMew December 20th, 2008 5:10 AM
  • 625760 views
  • 9682 replies
Male
somewhere
Seen November 29th, 2016
Posted June 25th, 2013
82 posts
12.9 Years
how to make a script when i step on a place the prof oak say wait i have something for you....then he walks to you and give you a pokemon and then he says take care and dissappear for all times i want that that happens only once....can some1 make that script....i will just make then the movements and what pokemon wil he give..plzz
Age 26
Male
TX ,USA
Seen February 14th, 2011
Posted February 13th, 2011
27 posts
12.9 Years
That error you pointed out in my script Binary... That was just me being stupid and copy-and pasteing the same script twice into there. Oops. I've got one problem though thats preventing me from checking if the variable 4005 actually has a variable assigned to it. I'm unable to decompile any scripts at all that I've compiled to the ROM. I'll click 'View Script' in advance map, and regardless of the script, it will just pull up a blank script page. Also, when using the 'Offset: Type offset here" thing in XSE and pressing decompile, Ill just get #org 0xoffset, followed by nop. What does that mean?
Age 28
Seen April 7th, 2014
Posted April 2nd, 2014
3,977 posts
15.8 Years
right before I posted my script and now most of it is fixed except the give pokemon part, I dont know if this help but its a first pokemon script so the player receives his first pokemon.
Spoiler:
#dynamic 0x800000
#org @start
lock
faceplayer
applymovement 0x03 @move
waitmovement 0x0
msgbox @1 0x6
applymovement 0x03 @move2
applymovement 0xFF @move3
waitmovement 0x0
msgbox @2 0x6
givepokemon 0x118 0x5 0x169 0x0 0x0 0x0
fanfare 0x13E
msgbox @7 0x4
msgbox @8 0x6
applymovement 0x05 @move4
waitmovement 0x0
msgbox @9 0x6
applymovement 0x03 @move5
waitmovement 0x0
msgbox @10 0x6
applymovement 0x02 @move6
applymovement 0x04 @move7
waitmovement 0x0
hidesprite 0x02
hidesprite 0x03
hidesprite 0x04
hidesprite 0x05
setflag 0x200
release
end

#org @move
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0xFE

#org @1
=[PLAYER]c'mon Tom the Researcher is \ngiving out pokemon!

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

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

#org @2
= Tom: Now you two. \nI think I know what Pokemon are right \lfor you.\pMark: Me and Holly have already got \nours I got a Squirtle and holly \lgot a Treeko.\pTom: Now Lunar here is your \npokemon.\p[red_fr]Lunar received an Eevee!\pTom: [PLAYER] it was hard to decide \nwhat pokemon you should have but \leventually I decided.

#org @7
= [red_fr][PLAYER] received a Torchic

#org @8
= Tom: Well good look on your \nAdventures!

#org @move4
#raw 0x1D
#raw 0x1D
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0xFE

#org @9
= Lunar: Well this is it \nI hope we meet up soon \lCya!

#org @move5
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0xFE

#org @10
= Holly: C'mon Mark. \n[PLAYER] we'll be in the next \ltown just off route 1. \l Cya there.

#org @move6
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0xFE

#org @move7
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0xFE
could it be that i added the town map to the pokemon?
Are you sure the following are in hexadecimal?
givepokemon 0x118 0x5 0x169 0x0 0x0 0x0
how to make a script when i step on a place the prof oak say wait i have something for you....then he walks to you and give you a pokemon and then he says take care and dissappear for all times i want that that happens only once....can some1 make that script....i will just make then the movements and what pokemon wil he give..plzz
No script requesting D:
It would be better if you learn't yourself. There are plenty of tutorials.
That error you pointed out in my script Binary... That was just me being stupid and copy-and pasteing the same script twice into there. Oops. I've got one problem though thats preventing me from checking if the variable 4005 actually has a variable assigned to it. I'm unable to decompile any scripts at all that I've compiled to the ROM. I'll click 'View Script' in advance map, and regardless of the script, it will just pull up a blank script page. Also, when using the 'Offset: Type offset here" thing in XSE and pressing decompile, Ill just get #org 0xoffset, followed by nop. What does that mean?
Could it be a rom crash? D:
Or maybe the offsets you've compiled to were not free?

Jonny Buuz

La di da di do di da di dum...

Age 32
Male
Behind you.
Seen February 25th, 2023
Posted November 17th, 2010
56 posts
17.6 Years
Okay, level script help. What am I doing wrong? As soon as I enter the map... nothing happens. Music continues, but the map music, not the playsong music. And the player is frozen.

Heeelllpp.

Spoiler:
#dynamic 0x800000

#org @start
#raw 02
#raw pointer @nextpart
#raw 00

#org @nextpart
#raw word 0x4033
#raw 0x0
#raw pointer @script
#raw 00

#org @script
playsong 0x112 0x0
msgbox @1 0x6
applymovement 0xFF @move
applymovement 0x1 @move1
waitmovement 0x0
msgbox @2 0x6
applymovement 0x1 @move2
waitmovement 0x0
fadesong 0x12C
msgbox @3 0x6
givepokemon 0x85 0x9 0xBD 0x0 0x0 0x0
fanfare 0x13E
msgbox @4 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @5 0x6
setvar 0x4033 0x1
release
end

#org @1
= [red_fr]AAAHHH!\nHEELLLP MEEE!\l[player]! MOM! HEEEELLLPPP!!!

#org @2
= [red_fr]What's going on out there?!\nRACHEL, are you okay?!

#org @3
= [red_fr]Here, [player].\nTake your sister's EEVEE with you.

#org @4
= [player] received RACHEL's EEVEE!

#org @5
= Be careful out there, [player].

#org @move
#raw 0x1D 0x62 0xFE

#org @move1
#raw 0x1D 0x1D 0x2 0x1B 0x1B 0x1B 0x3 0x1B 0x1B 0x1B 0x0 0xFE

#org @move2
#raw 0x20 0x20 0x1E 0x1E 0xFE
Anybody? I've been experimenting with this script for the past few days, and still have gotten nowhere. Any help, speculative or otherwise, is appreciated.
</signature>
Male
Seen July 23rd, 2010
Posted July 21st, 2010
2 posts
12.8 Years
Game: Fire Red
Type: Wild Pokemon Battle
Editor: PokeScript
Script:
Spoiler:
#org $script
lock
faceplayer
cry 0xA1 243
#raw 0x33
pause 0x30
message $bio
$bio 1 = Raikou!!
boxset 6
wildbattle 243 50 0
pause 0x70
fadescreen 1
#raw 0x53 0x0F 0x80
setflag 0x1205
pause 0x10
fadescreen 0
release
end

When you interact with Raikou in this case. It sounds the cry, then you go into battle. After battle, the screen fades and Raikou's sprite disappears. But when you move, it comes back and stays. It was supposed to be removed for good, so you cant get another. Anyone know what the problem is? Sorry if someone already posted this.
Seen March 2nd, 2023
Posted April 5th, 2020
29 posts
13 Years
Game: Fire Red
Type: Wild Pokemon Battle
Editor: PokeScript
Script:
Spoiler:
#org $script
lock
faceplayer
cry 0xA1 243
#raw 0x33
pause 0x30
message $bio
$bio 1 = Raikou!!
boxset 6
wildbattle 243 50 0
pause 0x70
fadescreen 1
#raw 0x53 0x0F 0x80
setflag 0x1205
pause 0x10
fadescreen 0
release
end

When you interact with Raikou in this case. It sounds the cry, then you go into battle. After battle, the screen fades and Raikou's sprite disappears. But when you move, it comes back and stays. It was supposed to be removed for good, so you cant get another. Anyone know what the problem is? Sorry if someone already posted this.
Im guessing you have Raikous flag as 1205 in A-map? I found that I couldnt get a sprite to stay hidden with flags over 1000. Try a flag under 1000. That should do it.
I have a feeling we are destined to cross paths again.
Male
Seen July 23rd, 2010
Posted July 21st, 2010
2 posts
12.8 Years
Im guessing you have Raikous flag as 1205 in A-map? I found that I couldnt get a sprite to stay hidden with flags over 1000. Try a flag under 1000. That should do it.
I tried under 1000(I used 900). It still didnt work, I also set Raikou's Person Id as 900. If that is what you ment, it still didnt work.
Age 36
Male
Seen September 13th, 2021
Posted October 3rd, 2020
42 posts
18.4 Years
So, I was wondering, hypothetically speaking, is there a way (or some kind of flag) for removing the Option & Save menu items (via scripting)? I'm working on a hack to try & recreate the Pokémon Festa 2002 demo (about 75% finished with it, just some mapping left) & I wanted to try & get it as accurate as possible



In the video, only PokéMon, Bag, (Player Name) & Close were in the menu.

Thanks!
Male
Narnia
Seen July 28th, 2010
Posted July 24th, 2010
7 posts
12.8 Years
Hey guys, I'm new here and just wanted to ask a 2questions?

I've searched alot to try and find the answer here but no luck...

My questions are:

1. In Xse, I do everything right, codes etc...follow them strictly step by step.
-----------------------------
#dynamic 0x800000

#org @start
lock
faceplayer
message @1 0x6
release
end

#org @1
= Hello World
--------------------------------

. When I test it, the character simply turns to me but he doesn't talk...Can't seem to figure out whats wrong. Any help would be greatly appreciated guys. ( Also, if I use FSF to find free space and I put it copy it to Xse, when I finish the codes and press compile, a box comes on saying that "THE ROM DOESN'T HAVE ENOUGH SPACE"..And the FSF option within Xse is unclickable , its not highlighted at all. Any tips also?
-----------
2. When I create a new house using a new map on advance map, I can't seem to enter the house when I test it. The screen goes black and the game freezes... All warps are correctly inserted and I've checked it so many times. Do you know what i'm doing wrong?

Thank you Everyone
Age 36
Female
UK
Seen February 24th, 2018
Posted December 26th, 2012
58 posts
18.7 Years
Hi guys, got another script problem! Please see below...
#dynamic 0x800383
#org @start
lock
checkflag 0x202
checkflag 0x237
if 0x1 goto @battle
faceplayer
msgbox @goaway MSG_KEEPOPEN
closeonkeypress
applymovement 0x7 @lkdwn
release
end

#org @battle
faceplayer
msgbox @intro MSG_KEEPOPEN
closeonkeypress
trainerbattle 0x3 0x3 0x0 @defeat
msgbox @outro MSG_KEEPOPEN
closeonkeypress
fadescreen 0x1
hidesprite 0x7
fadescreen 0x0
setflag 0x202
release
end

#org @lkdwn
#raw 0x0
#raw 0xFE

#org @goaway
= JESSICA: ...\pHmph.\pListen, right now, I don't have\ntime for you.\pJust go away, OK?

#org @intro
= JESSICA: Don't you ever give up?\pLook, [player],\pit's nothing personal, I just\ncan't let you go on.\pThis mission is important to me.\pNow leave.\p...\n...\pStubborn as usual, eh?

#org @defeat
= JESSICA: You know [player], this is\ngetting old REALLY fast.

#org @outro
= JESSICA: I've about had it with\nyou.\pYou've even defeated my colleague,\nLeon.\pUGH!\pJust...just.\pHMPH!
applymovement 0x7 @lkdwn
........
@lkdwn
#raw 0x0 'face down
#raw 0xFE 'end movement


At this point, the sprite in question doesn't look down. I've tried it with and without faceplayer but I still get the same issue.


Also, I want to hide a sprite on the map then show it when I walk over a certain spot (eg. Rival) but I'm not sure how you hide the sprite. I checked the header scripts but theres nothing in there. Does having "showsprite" automatically hide the sprite?
Some signature, or something!
Male
Seen August 27th, 2012
Posted August 22nd, 2012
687 posts
13.1 Years
FireFox,

Is this in Ruby/Sapphire/Emerald? If it is, your problem is that you forgot waitmovement 0x7 under your applymovement command.


An easy way to do this is to replace the applymovement command with spriteface 0x7 0x1. 0x7 being the person event number and 0x1 meaning 'face down'.

What's with the two checkflags? I don't know if you can check TWO flags this way. If not, remove the one you don't need.

To hide a sprite, you need to set a flag first and put that flag in the Person ID of the sprite. When you want it to reappear, you clear the flag in a clear flag command (clearflag 0x[flag]) and use showsprite 0x[event number]. Check a tutorial in the Tutorials section for more detailed info.

Chad -
Age 28
Seen April 7th, 2014
Posted April 2nd, 2014
3,977 posts
15.8 Years
Hey guys, I'm new here and just wanted to ask a 2questions?

I've searched alot to try and find the answer here but no luck...

My questions are:

1. In Xse, I do everything right, codes etc...follow them strictly step by step.
-----------------------------
#dynamic 0x800000

#org @start
lock
faceplayer
message @1 0x6
release
end

#org @1
= Hello World
--------------------------------

. When I test it, the character simply turns to me but he doesn't talk...Can't seem to figure out whats wrong. Any help would be greatly appreciated guys. ( Also, if I use FSF to find free space and I put it copy it to Xse, when I finish the codes and press compile, a box comes on saying that "THE ROM DOESN'T HAVE ENOUGH SPACE"..And the FSF option within Xse is unclickable , its not highlighted at all. Any tips also?
-----------
2. When I create a new house using a new map on advance map, I can't seem to enter the house when I test it. The screen goes black and the game freezes... All warps are correctly inserted and I've checked it so many times. Do you know what i'm doing wrong?

Thank you Everyone
1. Copy FSF to the same folder in which XSE is in. Remember to open your rom in XSE. You can open FSF via XSE. Find free space, copy it to "#dynamic 0xoffset", compile, copy the address of the first pointer i.e. in your script, @start. Paste the address in AM in the script offset box. Test it.

2. It would be better if you edited pre-existing maps.
Age 28
Seen April 7th, 2014
Posted April 2nd, 2014
3,977 posts
15.8 Years
how will i create a script for rival?like,he will walk to you then battle you then he will talk again after the battle then he will walk away??help pls.
Well, first of all, you should read a tutorial. Then, make the script yourself C:
Male
Seen August 27th, 2012
Posted August 22nd, 2012
687 posts
13.1 Years
how will i create a script for rival?like,he will walk to you then battle you then he will talk again after the battle then he will walk away??help pls.
You can't request scripts here. De-compile your rival script in FR or RSE or read a tutorial.

Chad -

Co500

Nostalgia Edition

Male
Far Awayyyyyyy
Seen December 14th, 2021
Posted August 23rd, 2015
563 posts
14.9 Years
I know this might sound noobis but what is the part of the script that makes it so if you step on the tile again it doesnt activate? BTW this isnt a script request its just asking for the line
It can't end now. Not like this.


I hope you’ll remember, there is something good in goodbye.



Co500

Nostalgia Edition

Male
Far Awayyyyyyy
Seen December 14th, 2021
Posted August 23rd, 2015
563 posts
14.9 Years
Co500,

You use checkflag (compare 0x[variable] 0x[value] but instead of flags, you use vars).

An example:
#dynamic 0x800000

#org @start
checkflag 0x300
if 0x1 goto @done
msgbox @text 0x6
setflag 0x300
end

#org @done
release
end

#org @text
= You stepped on a tile!
Chad -
ok thanks for that but once ived use setflag/checkflag 300 can I use it again?
It can't end now. Not like this.


I hope you’ll remember, there is something good in goodbye.



Age 36
Female
UK
Seen February 24th, 2018
Posted December 26th, 2012
58 posts
18.7 Years
FireFox,

Is this in Ruby/Sapphire/Emerald? If it is, your problem is that you forgot waitmovement 0x7 under your applymovement command.


An easy way to do this is to replace the applymovement command with spriteface 0x7 0x1. 0x7 being the person event number and 0x1 meaning 'face down'.

What's with the two checkflags? I don't know if you can check TWO flags this way. If not, remove the one you don't need.

To hide a sprite, you need to set a flag first and put that flag in the Person ID of the sprite. When you want it to reappear, you clear the flag in a clear flag command (clearflag 0x[flag]) and use showsprite 0x[event number]. Check a tutorial in the Tutorials section for more detailed info.

Chad -
Sorry Chad, I forgot to say, it's for FireRed.
Also, those 2 checkflags work perfectly togeather. checkflag 0x237 is the flag to say "You've got CUT!" To be honest I wasn't sure if it was gonna work, but I tried it and it worked 1st time without fail!

I'll try the spriteface command later, assuming FireRed can use it.
Some signature, or something!
Age 28
Seen April 7th, 2014
Posted April 2nd, 2014
3,977 posts
15.8 Years
Sorry Chad, I forgot to say, it's for FireRed.
Also, those 2 checkflags work perfectly togeather. checkflag 0x237 is the flag to say "You've got CUT!" To be honest I wasn't sure if it was gonna work, but I tried it and it worked 1st time without fail!

I'll try the spriteface command later, assuming FireRed can use it.
Checkflag 0x237 works only because it has the if 0x1 goto @..... underneath it. Checkflag 0x202 won't work in your script. Also use waitmovement 0x0 after every movement command. You could use waitmovement 0x7 but you'll have to count all the movements making it less convenient.
Also, I'd just use the face down movement if I were you. You can use Spriteface, but bleh....
Age 36
Female
UK
Seen February 24th, 2018
Posted December 26th, 2012
58 posts
18.7 Years
Thanks for your help Chad and Binrary :)

I'm still having issue with hiding sprites. Here's the scoop:
I'm trying to create a rival battle and when the player walks over a specific spot, the rival pops on from the side of the screen. But I don't know how to hide him since you walk past his "spawn point" as it were. I've tried adding a hidesprite in both the header script and new "walkover" scripts but he won't vanish. I have confirmed the person ID is correct.
Some signature, or something!