• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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.
119
Posts
14
Years
Can someone explain me how the appear/disappear value (flag/variable) works with script-tile events. I'm using FR. Should I enter a variable or flag in the "Var number" box, just like People ID with person events? Because when I do that, the script won't appear at all. Besides, I've seen screenshots of people entering 4050 in that box. So, can someone just explain these things to me? Thanks in advance.
 
26
Posts
13
Years
  • Seen Nov 24, 2010
I sort of fixed it, but now its glitching up. Like when I first enter the town, there is a rocket where there shouldn't be one. I know I put in the correct offset, and when I re-enter the town, the rocket is where I put him, but he says something different then he's supposed to do. I really don't know why its screwing up so much....
 

Ooka

[font=Maven Pro][color=#A75EE2]Cosmic[/color][/fon
2,626
Posts
16
Years
I sort of fixed it, but now its glitching up. Like when I first enter the town, there is a rocket where there shouldn't be one. I know I put in the correct offset, and when I re-enter the town, the rocket is where I put him, but he says something different then he's supposed to do. I really don't know why its screwing up so much....

What program are you using to compile the script?
 

masterquestmq

Enthusiastic Rom Hacker
194
Posts
13
Years
  • Seen Nov 19, 2023
need some help with this
when i complie this script and try to test it all i get is the item.... what did i do wrong. and is the command for national dex rite in this script?

#dynamic 0x161600

#org @start
lock
faceplayer
checkflag 0x200
if 0x0 goto @give
if 0x1 goto @gl

#org @give
msgbox @talk1 0x6
givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
giveitem 0x4 0x5 0x0
special 0x16F
fanfare 0x13E
waitfanfare
setflag 0x200
msgbox @yay 0x6
release
end

#org @gl
msgbox @talk2 0x6
end

#org @talk1
= Ah, finaly you are the fifth\ntrainer to leave Pallet Town\ltoday. Fortunately I have Pokemon\lleft. Take it it's yours! Here\lis a Pokedex and some Pokeballs to\lget you started!

#org @yay
= You got an Eevee, Pokedex and 5\nPokeballs!

#org @talk2
= Your journey awaits!
 

Ooka

[font=Maven Pro][color=#A75EE2]Cosmic[/color][/fon
2,626
Posts
16
Years
And the national dex and stuff worked too? o.o

Code:
#dynamic 0x161600

#org @start
lock
faceplayer
checkflag 0x200
if 0x0 goto @give
if 0x1 goto @gl

#org @give
msgbox @talk1 0x6
givepokemon 85 5 0 0 0 0
setflag 0x828
fanfare 0x13E
waitfanfare
giveitem 4 5 0
special 0x16F
setflag 0x829
fanfare 0x13E
waitfanfare
setflag 0x200
msgbox @yay 0x6
release
end

#org @gl
msgbox @talk2 0x6
end

#org @talk1
= Ah, finaly you are the fifth\ntrainer to leave Pallet Town\ltoday. Fortunately I have Pokemon\lleft. Take it it's yours! Here\lis a Pokedex and some Pokeballs to\lget you started!

#org @yay
= You got an Eevee, Pokedex and 5\nPokeballs!

#org @talk2
= Your journey awaits!

This script should work right for everything. Try it if you want. :P
 

masterquestmq

Enthusiastic Rom Hacker
194
Posts
13
Years
  • Seen Nov 19, 2023
Just started XSE so im gonna be here regularly :)

im tryin to make a script where the player will be blocked from leaving the town till he gets his 1st pokemon...
'i went through tutorials and i cant find a command to make the player turn back (unless its an apply movement script ?)

either way i tried making this script
and it didnt really work..
would appreciate some help
thanks


#dynamic 0x161B00

#org @start
lock
faceplayer
checkflag 0x200
if 0x0 goto @stop
if 0x1 goto @proceed

#org @stop
msgbox @talk1 0x6
release
end

#org @proceed
release
end

#org @talk1
= Must not leave without a Pokemon
 

Ooka

[font=Maven Pro][color=#A75EE2]Cosmic[/color][/fon
2,626
Posts
16
Years
That's a lot more difficult to explain. It does involve applymovement so your best bet is reading up on that subject. It involves moving a sprite up to your hero, the sprite talking, then the sprite leaving and you stepping down off the script event (So that when you walk on it again the same script activates unless you've met your condition [i.e. checkflag]).

Example script:

Code:
#dynamic 0x804828

#org @block
checkflag 0x860
if 0x1 goto @done
applymovement 0x01 @move
waitmovement 0x0
applymovement 0xFF @firstmove
waitmovement 0x0
msgbox @cant 0x6
applymovement 0x01 @secmove
waitmovement 0x0
applymovement 0xFF @playermove
waitmovement 0x0
release
end

#org @move
#raw 0x03
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x01
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @firstmove
#raw 0x00
#raw 0x12
#raw 0xFE

#org @cant
= Hey, you can't go up there. \nYou need a Pokemon first.

#org @secmove
#raw 0x02
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x00
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @playermove
#raw 0x00
#raw 0x08
#raw 0x12
#raw 0x12
#raw 0xFE

#org @done
release
end
 
26
Posts
13
Years
  • Seen Nov 24, 2010
I'm using Poketscript. Is there anything maybe wrong with the script I made?
 

Tannecho51

Pokemon Lion's Eye
11
Posts
13
Years
Well, it turns out the script wasn't actually compiled to the ROM I was testing in. Hehe, sorry for your trouble. I got it to work... sort of. This time the script actually does the first msgbox 0x6, but then kinda messes up.
The script again, just for reference:
Spoiler:


When I open the script in Advance Map:
Spoiler:


Thanks.
 

colcolstyles

Yours truly
1,588
Posts
15
Years
Well, it turns out the script wasn't actually compiled to the ROM I was testing in. Hehe, sorry for your trouble. I got it to work... sort of. This time the script actually does the first msgbox 0x6, but then kinda messes up.
The script again, just for reference:
Spoiler:


When I open the script in Advance Map:
Spoiler:


Thanks.

Try replacing "goto @begin" with "goto @treecko" and deleting the whole "#org @begin" segment.
 
26
Posts
13
Years
  • Seen Nov 24, 2010
Can someone please look at the script I made to see if it has any errors? After I put the script in the game the script started screwing up, like with a yes or no question. If you click yes for the first yes or no in the script, it goes to the next yes or no question that it would ask, and if you click no it repeats the line with the yes or no just without it saying yes or no, then it ends fine. I compiled it using Poketscript and its for FireRed. Its supposed to be for a Rocket general that tells you what to do and info about the attack on Viridian. Once you defeat May he gives you an item that allows you to leave Viridian City and then he just says get ready for Pewter. This is my script:

Spoiler:
 

colcolstyles

Yours truly
1,588
Posts
15
Years
Can someone please look at the script I made to see if it has any errors? After I put the script in the game the script started screwing up, like with a yes or no question. If you click yes for the first yes or no in the script, it goes to the next yes or no question that it would ask, and if you click no it repeats the line with the yes or no just without it saying yes or no, then it ends fine. I compiled it using Poketscript and its for FireRed. Its supposed to be for a Rocket general that tells you what to do and info about the attack on Viridian. Once you defeat May he gives you an item that allows you to leave Viridian City and then he just says get ready for Pewter. This is my script:

Spoiler:

I remember that I had a lot of trouble getting PokeScript to work when I was just starting out. Actually, I remember experiencing difficulties with Yes/No textboxes specifically. My advice would be to switch to either XSE or PKSV. PokeScript is pretty much obsolete these days. I'm not quite sure why people still use it.
 
Last edited:
119
Posts
14
Years
Okay, some of my script-tiles aren't working properly. I inserted a variable/flag value in the "Script Value" box, namely 1011. I gave two Overworld a PersonID of that value too, since the OW's and the script have to appear at the same time. Settings of the scripttile event:
script.png

That flag was set in the levelscript of the first map. It was unset in the following script:
Code:
'---------------
#org 0x72001C
setvar 0x7005 0x1
lock
faceplayer
applymovement 0x1 0x816BA66
waitmovement 0x0
msgbox 0x816B893 0x6 '"[blue_fr]blah1"
applymovement 0x1 0x816BA69
waitmovement 0x0
msgbox 0x816B95C 0x6 '"[black_fr]blah2"
applymovement 0xFF 0x816BA6E
waitmovement 0x0
applymovement 0x1 0x816BA72
waitmovement 0x0
applymovement 0xFF 0x816BA75
applymovement 0x1 0x816BA78
waitmovement 0x0
setvar 0x1016 0x1
hidesprite 0x1
clearflag 0x1011
release
end


'---------
' Strings
'---------
#org 0x16B893
= [blue_fr]blah1

#org 0x16B95C
= [black_fr]blah2


'-----------
' Movements
'-----------
#org 0x16BA66
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements

#org 0x16BA69
#raw 0x1 'Face Up
#raw 0x1C 'Delay5
#raw 0x4A 'Face Player
#raw 0xFE 'End of Movements

#org 0x16BA6E
#raw 0x20 'Step Right (Fast)
#raw 0x2 'Face Left
#raw 0xFE 'End of Movements

#org 0x16BA72
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements

#org 0x16BA75
#raw 0x0 'Face Down
#raw 0xFE 'End of Movements

#org 0x16BA78
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements
After this you walk through a warp and you come in the map where the script tiles and OW's are. Now... The OW's do appear, but the scripttiles don't. That's strange, isn't it? I'm using Fire Red JPANs Hacked Engine etc... But why aren't the script tiles appearing? I personally think it is something with messing up flag and variables and that I shouldn't use some "numbers" as a variable, only as flag, or something similar... But I'm confused right now...
 
26
Posts
13
Years
  • Seen Nov 24, 2010
I started XSE and have run into a strange problem. When I try to compile it says "unknown keyword "tle" at line 37, but line 37 is empty, so I don't understand whats wrong...
 
Last edited:

Mortalis

[css-div="background-color:#4e9dda;text-align:cent
345
Posts
13
Years
This has really been bugging me, and it shouldn't be a problem. Alright, so I'm new to hacking roms, and I went to go try out a script to see if I could do it. I made the script like this;

#dynamic 0x900000

#org @start
lock
faceplayer
msgbox @hello 0x6
release
end

#org @hello
= Hello. This is a test.

Once I do that [I'm using XSE], I hit compile and it compiles just fine. I click close, and then save the rom. When I go play it, I approach the person and click 'A', but it just makes a noise and doesn't play the script. I'm very confused.
 
5,256
Posts
16
Years
This has really been bugging me, and it shouldn't be a problem. Alright, so I'm new to hacking roms, and I went to go try out a script to see if I could do it. I made the script like this;

Code:
#dynamic 0x900000

#org @start
lock
faceplayer
msgbox @hello 0x6
release
end

#org @hello
= Hello. This is a test.

Once I do that [I'm using XSE], I hit compile and it compiles just fine. I click close, and then save the rom. When I go play it, I approach the person and click 'A', but it just makes a noise and doesn't play the script. I'm very confused.
Okay, firstly, I'd use 0x800000 for my offset. Not that what you have is unsafe or anything, it's just that you're skipping quite a bit of free space there. Also, it'd probably be better to get rid of lock, faceplayer and release, and simply replace msgbox @hello 0x6 to msgbox @hello 0x2 for a plain NPC script.

Anyway, onto your problem. Are you sure you've pasted the offset you receive from XSE when you hit compile next to the @start box and pasted it into the Script Offset box when you select the person event, and saved afterwards?
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
I started XSE and have run into a strange problem. When I try to compile it says "unknown keyword "tle" at line 37, but line 37 is empty, so I don't understand whats wrong...

Posting your script may help us understand the error better...
 
26
Posts
13
Years
  • Seen Nov 24, 2010
Alright then here's my script:
Spoiler:


How it looks may not be exactly right due to me just copying the script from XSE, but hopefully this is good enough.
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Alright then here's my script:
Spoiler:


How it looks may not be exactly right due to me just copying the script from XSE, but hopefully this is good enough.

Try this script...
Code:
#dynamic 0x18D300

#org @start
lock
faceplayer
checkflag 0x1210
if 0x01 goto @after
textcolor 0x00
msgbox @pie 0x5
if 0x1 goto [COLOR="Red"]@okay[/COLOR]
if 0x0 goto @dont
release
end

#org @pie
= Do you want to know the operation?

#org @dont
textcolor 0x00
msgbox @idk 0x5
if 0x1 goto [COLOR="Red"]@sure[/COLOR]
if 0x0 goto [COLOR="Red"]@out[/COLOR]
release
end

#org @idk
= You already know? Then do you want\nto know how to leave from the\lnorth or east?

[COLOR="Red"]#org @sure
message @well 0x6
release
end[/COLOR]

#org @well
= Well you can't leave from the\neast, but you can leave from the\lnorth if I give you an item to\lshow to the guard.

[COLOR="Red"]#org @out
message @good 0x6
release
end[/COLOR]

#org @good
= Good you know everything. Now get\nback to work soldier!
[COLOR="Red"]
#org @okay
message @op 0x6
release
end[/COLOR]

#org @op
= Our Operation is to invade\nViridian City, but there's this\llittle punk that's stopping us.\lHer name is May and she defended\lagainst Magma and Aqua in Hoenn\land she's ready to defend Kanto.\pBeat her and I will allow you to\nleave this god forsaken place.

#org @after
msgbox @shoes1 0x6
fanfare 0x13E
textcolor 0x01
msgbox @shoes 0x4
waitfanfare
setflag 0x82F
textcolor 0x00
msgbox @sweet 0x2
end

#org @shoes1 
= Good job soldier!\pFor your service, I'll give you\n an item\lto show to the guard. They're\lspecially made from our crafter,\lColonel Raysie!

#org @shoes
= \v\h01 recieved the running shoes!

#org @sweet
= Now get your pokemon ready for\nPumpkin City!
 
Last edited:

Tannecho51

Pokemon Lion's Eye
11
Posts
13
Years
Colcolstyles, thanks for your help. The Y/N questions are now working! But there are still 3 problems:

-Instead of going to the "name" special, it simply freezes.
-The first showpokepic has very weird colors.
-The applymovements don't work.

Here's the script:
Spoiler:


It shows up just how you would expect it to be when I open it up in Advance Map, so I won't post that.
Thanks in advance.
 
Status
Not open for further replies.
Back
Top