• 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.

Skara

THIS. IS. SEMPITERNAL.
350
Posts
15
Years
You should probably reread whatever scripting tutorial you read (and more thoroughly this time) because your 'msgbox' commands are lacking the second parameter, something that is explained in any recent scripting tutorial. You also need to brush up on some basic concepts of hacking, like pointers and addresses, because your use of two "@text"s is faulty.
No tutorial, just PKSV generated.
 
10,078
Posts
15
Years
  • Age 32
  • UK
  • Seen Oct 17, 2023
Can anyone see why the text in this level script would not show? I've just started hacking again and it's thrown me off.

The script is implemented properly, it does start, move the sprites, then finish but no messages are shown.


From A-Map:
Spoiler:


Original:
Spoiler:
 

Nerketur

PokéScripter
104
Posts
13
Years
Can anyone see why the text in this level script would not show? I've just started hacking again and it's thrown me off.

The script is implemented properly, it does start, move the sprites, then finish but no messages are shown.


From A-Map:
Spoiler:


Original:
Spoiler:

The original is fine, Compiled version is NOT. Try compiling it, then replacing the script offset in Advance Map with the script offset that you get when you compile in XSE. Or, if you want to save space, at the very top of the script put "#removeall <oldoffset>" So, in your case, it would be "#removeall 0x800000" This works, because "removeall" basically COMPLETELY deletes (All movements, scripts, strings, and items involved) the script that was previously at that offset. (Assuming it has an "end" at the end of it.) Of course, this only works if you're using XSE, and it's only guaranteed to work if you're using the latest version of XSE.
 
10,078
Posts
15
Years
  • Age 32
  • UK
  • Seen Oct 17, 2023


The original is fine, Compiled version is NOT. Try compiling it, then replacing the script offset in Advance Map with the script offset that you get when you compile in XSE. Or, if you want to save space, at the very top of the script put "#removeall <oldoffset>" So, in your case, it would be "#removeall 0x800000" This works, because "removeall" basically COMPLETELY deletes (All movements, scripts, strings, and items involved) the script that was previously at that offset. (Assuming it has an "end" at the end of it.) Of course, this only works if you're using XSE, and it's only guaranteed to work if you're using the latest version of XSE.

Actually, that script offset is right, as clicking 'open script' makes it show the version before converting to the level script, which I did correctly.

Turns out the version of XSE I have rejects 'msgbox' and will only show 'message' commands instead. :S Problem solved.
 

Nerketur

PokéScripter
104
Posts
13
Years
AAAAAAAAAAAHHHHHH I WANT TO SCREAM!!!!

I made this script, and since it doesn't want to do anything I assume this isn't correct?
Spoiler:


I need help like, now. My hack can't progress otherwise.

No tutorial, just PKSV generated.

If that was from PKSV, then PKSV sucks. Hardcore. There are so many errors, it would not compile in XSE unbless you did this (Changed to be a bit more efficient):

Code:
#include stdpoke.rbh
#include stditem.rbh

#org @start
lock
faceplayer
msgbox @text [color="red"]MSG_NORMAL[/color] ' Hm? oh, hey. Sorry, I closed my lab down.
checkflag 0x0828
if 0x1 [COLOR="Red"]goto @end[/COLOR]
countpokemon
compare LASTRESULT 6
if [COLOR="Red"]B_== goto[/COLOR] @noroom
addpokemon [COLOR="Red"]PKMN_CATERPIE[/COLOR] 0x5 [COLOR="Red"]ITEM_ORANBERRY[/COLOR] 0 0 0
setflag [COLOR="Red"]0x828[/COLOR]
[COLOR="Red"]hidesprite <Person event number of Professor>[/COLOR] 
storepokemon 0 PKMN_CATERPIE [COLOR="Red"]// Not sure about this command[/COLOR]
[COLOR="Red"]msgbox[/COLOR] @getmsg [COLOR="Red"]MSG_KEEPOPEN[/COLOR]
fanfare 0x101
waitfanfare
[COLOR="Red"]closeonkeypress[/COLOR]
release
end

#org @end
release
end

#org @noroom
msgbox @noroommsg [COLOR="Red"]MSG_KEEPOPEN //Where is this message?[/COLOR]
release
end

#org @text
= Hm? oh, hey. Sorry, I closed my lab down./pYou can still have a POKéMON though, here.

#org @getmsg
= You got a \v\h02!/pAnd here's your POKéDEX.../pI'm Carp by the way, Professor Arty Carp/pWell, I'm out.

[COLOR="Red"]#org @noroommsg
= You don't have room for this![/COLOR]

Then, set the professor person ID to 0x828, and he/she will disappear for good after the event.

Now, if you want the shortest possible script? You don't need to check when you get your first pokemon, and checking if it's run is pointless if they disappear. So the script becomes

Code:
#include stdpoke.rbh
#include stditem.rbh

#org @start
lock
faceplayer
msgbox @text [color="red"]MSG_NORMAL[/color] ' Hm? oh, hey. Sorry, I closed my lab down.
addpokemon [COLOR="Red"]PKMN_CATERPIE[/COLOR] 0x5 [COLOR="Red"]ITEM_ORANBERRY[/COLOR] 0 0 0
setflag [COLOR="Red"]0x828[/COLOR]
[COLOR="Red"]hidesprite <Person event number of Professor>[/COLOR] 
storepokemon 0 PKMN_CATERPIE [COLOR="Red"]// Not sure about this command[/COLOR]
[COLOR="Red"]msgbox[/COLOR] @getmsg [COLOR="Red"]MSG_KEEPOPEN[/COLOR]
fanfare 0x101
waitfanfare
[COLOR="Red"]closeonkeypress[/COLOR]
release
end

#org @end
release
end

#org @text
= Hm? oh, hey. Sorry, I closed my lab down./pYou can still have a POKéMON though, here.

#org @getmsg
= You got a \v\h02!/pAnd here's your POKéDEX.../pI'm Carp by the way, Professor Arty Carp/pWell, I'm out.

All the RED is changed areas. If it doesn't do what you want, then you fix the rest =) I hope I helped. Next time, learn XSE before trying to do anything. xD
 
3
Posts
13
Years
  • Seen May 15, 2011
ok every time i try to put in a script to a event it never works, like i wanted to add another event to pallet town which i changed name to Birchwood Town it has a park and there was a boy that is gonna complain but thats not it when i open rom and go to that boy and talk to it the rom freezes HALP!
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
ok every time i try to put in a script to a event it never works, like i wanted to add another event to pallet town which i changed name to Birchwood Town it has a park and there was a boy that is gonna complain but thats not it when i open rom and go to that boy and talk to it the rom freezes HALP!

It would be helpful if you included your script in your post.
 
3
Posts
13
Years
  • Seen May 15, 2011
ok ill show my script its on XSE so....
Code:
'-----------------------
#org 0x900000
faceplayer
faceplayer
msgbox 0x899001C '"Whiney Boy: My mom won't let me go ..."
callstd 0x6
release
end


'---------
' Strings
'---------
#org 0x99001C
= Whiney Boy: My mom won't let me go to the park!
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
The setvar stuff is the result of me using part of someone elses script and my lack of understanding. I'd rather not destroy the Daycare...What I want to do seems simple enough and I feel like I shouldn't have to re-write part of the game just to remove two pokemon from the game.

I just wanted to say that I (finally) understand how to do this with HackMew's routine :)

I added it to my previous tutorial for releasing Pokemon with the daycare script:

http://www.pokecommunity.com/showthread.php?p=5599198#asm

^ It's a much better way to release Pokemon you have no intention of having returned to you. I hadn't realized that special 0x9f stores the Pokemon's slot # in your party in the correct variable for HackMew's routine to work :embarrass

(Thanks to JPAN's study on the special commands for helping me with this :))
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
ok ill show my script its on XSE so....
Code:
'-----------------------
#org 0x900000
faceplayer
faceplayer
msgbox 0x899001C '"Whiney Boy: My mom won't let me go ..."
callstd 0x6
release
end
 
 
'---------
' Strings
'---------
#org 0x99001C
= Whiney Boy: My mom won't let me go to the park!

I'd suggest that you reread XSE's guide and this tutorial because there are a few problems in the way you constructed this script. Try this instead:

Code:
#org 0x[COLOR=red]8[/COLOR]00000
[COLOR=red]lock[/COLOR]
faceplayer
msgbox @talk [COLOR=red]0x6[/COLOR]
release
end
 
#org @talk
= Whiney Boy: My mom won't let me[COLOR=red]\n[/COLOR]go to the park!

Changes in red.
 

masterquestmq

Enthusiastic Rom Hacker
194
Posts
13
Years
  • Seen Nov 19, 2023
2 questions I've checked many tutorials but some of them are rather different to each other.

1) When making a giveitem script do we always need have to set a flag so the player wont be given the same item again if he/she talks to the person?

2)msgbox 0x5

#dynamic 0x800000

#org @start
msgbox @question 0x5
end

#org @questoin
= Will you go?

In the scipt above how do i continue it, for example when the player says yes the person will then say thank you. do we need to do the command like this: if 0x0 goto @thankyou etc?


appreciate the clarification
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
2 questions I've checked many tutorials but some of them are rather different to each other.

1) When making a giveitem script do we always need have to set a flag so the player wont be given the same item again if he/she talks to the person?

2)msgbox 0x5

#dynamic 0x800000

#org @start
msgbox @question 0x5
end

#org @questoin
= Will you go?

In the scipt above how do i continue it, for example when the player says yes the person will then say thank you. do we need to do the command like this: if 0x0 goto @thankyou etc?


appreciate the clarification

1. yes.
2. msgbox 0x5 is a command wherein it checks the PLAYER's response to the Yes/No options. An example...
Code:
#dynamic 0x800000

#org @start
faceplayer
[COLOR="Blue"]msgbox @1 0x5[/COLOR]
[COLOR="Red"]compare lastresult 0x1[/COLOR]
[COLOR="DarkOrange"]if 0x1 goto @yes[/COLOR]
goto @no
end

#org @1
= Will you go?

#org @yes
message @2 0x6
release
end

#org @no
release
end

#org @2
= Thank you!

The msgbox 0x5 will ask the PLAYER a question. This will also automatically tell the ROM to pop-up the Yes/No options.
The compare lastresult are commands to tell the ROM if the PLAYER selected yes/0x1 or no/0x0...
The if 0x1 goto @yes will confirm if the PLAYER's input was a yes, and if it is, then it'll proceed to the @yes address. If not, then it'll move to the next line of the script.
 

pizzaz007

Why not?
44
Posts
13
Years
I really don't get all this #define stuff, or call, or @blah, because i've learned to just Write it down on notepad. like, i dont know why, but i think it is a lot easier to do it that way, than to use XSE, or whatever. Like here, here is a script that I quickly put together for my game.


Game: Pokemon W.I.P (fire red)
Editor: Notepad (lol)
Script:


Spoiler:


I know, it seems humongus, but i find it easier than using a script editor like XSE. And if anyone didn't know what all that meant, it's basically a give pokedex and pokemon script, running shoes, and a mudkip. Does anyone else use this method? If not, them im going to need to learn how to use XSE...

quick edit: Every time it says 'end' There should be a space there, but on here, i guess they're not shown.
 
Last edited:

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023

So, why are you posting this again?
Is there a problem with your script? Are you asking someone to rewrite it to XSE format? Or were you just asking if someone else is using this scripting format?
 

pizzaz007

Why not?
44
Posts
13
Years
Well, what i was trying to say was just: How do you use XSE mostly. I included something that i typed up using notepad and pokescript, compiled, and put into my game. But you are all using commands like #define, #dynamic, msgbox, and i'm getting confused because i only use the notepad. So how do you use, say, XSE, or any script editor for that reason.
 
Status
Not open for further replies.
Back
Top