• 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.
9
Posts
15
Years
  • Seen Oct 4, 2009
Code:
#dynamic 0x18DFBB

#org @start
lock
faceplayer
checkflag 0x200
if 0x1 goto @done
msgbox @1 0x5
compare 0x800D 0x1
if 0x1 goto @take
msgbox @2 0x6
release
end

#org @done
msgbox @3 0x6
release
end

#org @take
giveitem 0x8B 0x1 0x0
msgbox @3 0x6
setflag 0x200
release
end

#org @1
= Hi! I just recently moved here from\nthe Hoenn region.\n\nI'm here to help new trainers by\ngiving them berries and teaching\nthem how to use them.

#org @2
= It's alright. I'm sure someone else\nwould like the berry.

#org @3
= You can use berries from the BAG menu\nduring battle or out of battle.\n\nIf you give it to a Pokemon before battle,\nit will use it at the right moment.\n\nI can't give you anymore berries,\nbut you can plant them in patches of\nsoil and pick them when they're ripe.

It's okay now, but the script won't save when I compile it. Any ideas?
 
Last edited:

Attilas

Anime-paradise.info Owner.
19
Posts
15
Years
  • Age 30
  • Seen Jun 1, 2011
change the offset to something hight than 0x8000 ?
 

Xatoku

Game Developer
451
Posts
15
Years
Does anybody know how I could make the game start in a script instead of being able to move around right at the begining?
 
788
Posts
17
Years
  • Age 29
  • Seen today
Code:
...
hidesprite 0x02
setflag 0x200
givepokemon 0x9B 0x5 0x8B 0x0 0x0 0x0
msgbox @C 0x6
fanfare 0x13E
msgbox @N 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @O 0x5
compare 0x800D 0x1
if 0x1 gosub @NameGame
...

Obviously, there's more to this in the script. But, this is the only part of any relevence. After it gives you Cyndaquil, the fanfare will start to play, then the colors will mess up and the game does nothing. Why?
 

onyx79

Red Dead Revolver
488
Posts
15
Years
finally started to learn how those scripts works....
OK I've opened FSF to find some free space then I took the offset he gave me and I've put on a-map then I used this script:

#dynamic 0x800000

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

#org @1
= CHARIZARD: Raaarrgghh!

this is for charizard but I will change it into zapdos,anyway then I've clicked X and it asked me if I want to save,I've pressed yes and then when I've clicked open script all the script was deleted and I saw only that
'---------------
#org 0x1792BE

it always happends what to do?
 

Xela

Do you believe in yourself?
349
Posts
16
Years
  • Age 27
  • Seen Feb 18, 2024
finally started to learn how those scripts works....
OK I've opened FSF to find some free space then I took the offset he gave me and I've put on a-map then I used this script:

#dynamic 0x800000

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

#org @1
= CHARIZARD: Raaarrgghh!

this is for charizard but I will change it into zapdos,anyway then I've clicked X and it asked me if I want to save,I've pressed yes and then when I've clicked open script all the script was deleted and I saw only that
'---------------
#org 0x1792BE

it always happends what to do?

"#dynamic 0x800000" This is supposed to be the offset you found in Free Space Finder.
Also you need also to copy the same offset you foind in FSF into the "Script Offset" box in Advance Map. Or it won't work.

Also i don't use an old version of Advance Map. I use the lastest 1.92 Advance Map release and still i need to use 0300 Unknown and not 3. Maybe i don't have lastest version, I don't really know.
 

onyx79

Red Dead Revolver
488
Posts
15
Years
"#dynamic 0x800000" This is supposed to be the offset you found in Free Space Finder.
Also you need also to copy the same offset you foind in FSF into the "Script Offset" box in Advance Map. Or it won't work.

Also i don't use an old version of Advance Map. I use the lastest 1.92 Advance Map release and still i need to use 0300 Unknown and not 3. Maybe i don't have lastest version, I don't really know.
I put the offset,so I need to replace the 8000000 with my offset or what?,thanks anyway(it still delets the scripts)
 
788
Posts
17
Years
  • Age 29
  • Seen today
I put the offset,so I need to replace the 8000000 with my offset or what?,thanks anyway(it still delets the scripts)
Well, do you have the level script button clicked in XSE? Below the menu, there are a few icons, the one on the far right is clicked for level scripts. If it is, in fact, checked, uncheck it.
 

onyx79

Red Dead Revolver
488
Posts
15
Years
still delets....
ok that's what I'm doing,I found the script offset on FSF then I've inserted it on advance map ($1792BE) now I click open the script,this is what I see:

'---------------
#org 0x1792BE

now I put this script

'---------------
#org 0x1792BE
#org @start
lock
faceplayer
msgbox @1 0x6
cry 0x6 0x0
wildbattle 0x6 0x1E 0x8B
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x200
release
end
#org @1
= CHARIZARD: Raaarrgghh!

then I'm clicking X,it asks me if I want to save,I save as rbc and give it a name that I want,now I open the script again and I see this:

'---------------
#org 0x1792BE


this happendes everytime....now what?
 

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
still delets....
ok that's what I'm doing,I found the script offset on FSF then I've inserted it on advance map ($1792BE) now I click open the script,this is what I see:

'---------------
#org 0x1792BE

now I put this script

'---------------
#org 0x1792BE
#org @start
lock
faceplayer
msgbox @1 0x6
cry 0x6 0x0
wildbattle 0x6 0x1E 0x8B
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x200
release
end
#org @1
= CHARIZARD: Raaarrgghh!

then I'm clicking X,it asks me if I want to save,I save as rbc and give it a name that I want,now I open the script again and I see this:

'---------------
#org 0x1792BE


this happendes everytime....now what?

Try copying it all to a text document.
Seriously, text documents, ( .TXT ) are the same as .rbc, just with a different file extension.
If you save the file into a .txt, you can't get this problem because you are saving it into an external program... Gotta think OUTSIDE the box.
 

iTeruri

iAm
277
Posts
17
Years
Before I start on quite a long script, I need some help. Although I don't think it's possible, you ever know.

Is there a way to set a variable and use that in a trainerbattle command? I'm using XSE.
Example:
Code:
servar 0x7000 0xA
trainerbattle 0x0 0x7000 0x0 @fight1 @fight2

So instead of starting a battle with trainer 28672 it starts a battle with trainer 10, the value of the var I set before the battle starts.

When you use it this way, it seems pretty useless, but I need one script to battle a lot of different trainers.
I really hope this would work, but if not I just need to make one pretty large script.

(Don't say: asm could do this easily, I never tried ASM before)
 

Sierraffinity

Desperately trying to retire from ROM hacking
1,069
Posts
16
Years
still delets....
ok that's what I'm doing,I found the script offset on FSF then I've inserted it on advance map ($1792BE) now I click open the script,this is what I see:

'---------------
#org 0x1792BE

now I put this script

'---------------
#dynamic 0x1792BE

#org @start
lock
faceplayer
msgbox @1 0x6
cry 0x6 0x0
wildbattle 0x6 0x1E 0x8B
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x200
release
end
#org @1
= CHARIZARD: Raaarrgghh!

then I'm clicking X,it asks me if I want to save,I save as rbc and give it a name that I want,now I open the script again and I see this:

'---------------
#org 0x1792BE


this happendes everytime....now what?
Copy and paste that script, then click the compile button (the two gears next to the bug).
 

Samike360

Lover of May
397
Posts
15
Years
I need help with this script, for Ruby rom:

'---------------
#org 0x8026DC
lock
faceplayer
checkflag 0x209
if 0x1 goto 0x8800270
applymovement 0x12 0x880028F
waitmovement 0x0
msgbox 0x88003CB MSG_FACE '"Hey, I'm new to the neighborhood!"
setflag 0x209
release
end

'---------------
#org 0x800270
release
end


'---------
' Strings
'---------
#org 0x8003CB
= Hey, I'm new to the neighborhood!


'-----------
' Movements
'-----------
#org 0x80028F
#raw 0x56 'Exclamation Mark (!)
#raw 0x6 'Step Left (Slow)
#raw 0x6 'Step Left (Slow)
#raw 0x6 'Step Left (Slow)
#raw 0xFE 'End of Movements
--------------
I will add to it later, but when I walk on the tile the message appears but no movement occurs, the sprite is person number 12 like in the script.
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
I need help with this script, for Ruby rom:

Spoiler:

I will add to it later, but when I walk on the tile the message appears but no movement occurs, the sprite is person number 12 like in the script.

Wrap your script around the SPOILER tags next time.

COMMENT: You said that the person event number is 12, right? Then why did you put in your script 0x12? 12 is a decimal number, hence 0x12 is a hex number...
SOLUTION: Change your script command to applymovement 12 or applymovement 0xC...
SUGGESTION: Don't confuse yourself with hex and decimal. Use MS Calculator or XSE's calculator...
 
10,078
Posts
15
Years
  • Age 32
  • UK
  • Seen Oct 17, 2023
Ok here is my script. (For my FireRed based hack).

Spoiler:


Summary:
Would you like egg? Yes/No
Yes -> You receive an egg, Egg overworld disappears.

The last bit is just for my entertainment << as its not meant to happen but it does, as the overworld just wont disappear.

The command works to some extent as the sprite momentarily disappears, however any movement brings it back. I heard setting a flag after stops this but it doesn't seem to work... any help? :)
 
Last edited:

Quickster

Dream or Drop?
351
Posts
16
Years
  • Seen Apr 4, 2016
Ok here is my script. (For my FireRed based hack).

Spoiler:


Summary:
Would you like egg? Yes/No
Yes -> You receive an egg, Egg overworld disappears.

The last bit is just for my entertainment << as its not meant to happen but it does, as the overworld just wont disappear.

The command works to some extent as the sprite momentarily disappears, however any movement brings it back. I heard setting a flag after stops this but it doesn't seem to work... any help? :)

To make the egg dissapear you do have to set a flag,but you have to give the overworld a person id.For example,egg has person id 0311,in the script you would set flag 0x311,but be sure to add a movement that makes it dissapear too.
 
Status
Not open for further replies.
Back
Top