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

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Hi all,

very important problem cause is a part mandatory in my hack rom:

i need to check if player have enough money for buying something.

Using pksv (according to the tutorial):



It seems to be okay but the problem is when compiling it became this:



Obviously an error script. Another way is to use integer value to check instad of hex. So using a command like this:



But it not solve the problem.

Anyone can help me in some way? Is really important.

Thanks a lot!

@gogojjtech: How could he possibly be overwriting data if he compiles dynamically? Please read the post first.:)


Try compiling the same script in XSE. Then tell us what happens.

Also, unless it is the raw text for a message, ALWAYS use END. So:

Code:
#dynamic 0x740000
#org @main
lock
faceplayer
checkmoney 0x96 0x0 0x0
compare LASTRESULT 0x1
if == jump @canhave ' Equal To
jump @canthave
END

#org @canhave
'-----------------------------------
'put some code here
release
end

#org @canthave
'-----------------------------------
'put some code here
release
end

And, hex is an integer. It is just a different base. Same exact number, just a different way of writing it. The choice is yours which base to use and will not make a single difference.
 
215
Posts
11
Years
  • Seen Jul 14, 2020
Same sintax between pksv and xse?

I don't understand your question, but I am going to say this now.

I strongly suggest if you are using PKSV to stop and try to learn XSE.
XSE is so much easier and there are less bugs with XSE. Trsut me, go download XSE 1.1.1 right now and get to learning!
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Same sintax between pksv and xse?

In gamer2020's toolbox there lies the newest version of XSE.

How can you guys not tell that he spelled syntax wrong?:p

No, the syntax between the two is not the same. It is close, but a lot of the commands have different (but very similar) names. For example, in XSE you have the hidesprite command. In PSKV that same command is called disappear.
 

Le pug

Creator of Pokémon: Discovery / Fat Kid
870
Posts
10
Years
I'm trying to create a script to where, by default, the map is running with rainy weather for my ruby hack. I have these set to the entrances of the maps to have it to where after you get your POKeMON menu option (0x800) the zones are sunny and not rainy. However, it'll work... but once I cross maps and go back.. it'll play the rainy sound for like half a second and the box that says what map you went into you goes away after like half a second... and then when I step on a new script tile with different flags and what not and then cross maps, it starts raining again. Any help?

#org @event
checkflag 0x800
if 0x1 goto @newweather
setvar 0x4014 0x0
release
end

#org @newweather
setweather 0x2
doweather
setvar 0x4014 0x0
release
end
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
I'm trying to create a script to where, by default, the map is running with rainy weather for my ruby hack. I have these set to the entrances of the maps to have it to where after you get your POKeMON menu option (0x800) the zones are sunny and not rainy. However, it'll work... but once I cross maps and go back.. it'll play the rainy sound for like half a second and the box that says what map you went into you goes away after like half a second... and then when I step on a new script tile with different flags and what not and then cross maps, it starts raining again. Any help?

#org @event
checkflag 0x800
if 0x1 goto @newweather
setvar 0x4014 0x0
release
end

#org @newweather
setweather 0x2
doweather
setvar 0x4014 0x0
release
end

It could be because you used flag 800 in many scripts, giving you errors as it may be resetting and not resetting. Also, the name is going to go away if you step on a script event tile. Plus you should use it as a level script, so you don't waste space with tons of script tiles.
 

Le pug

Creator of Pokémon: Discovery / Fat Kid
870
Posts
10
Years
It could be because you used flag 800 in many scripts, giving you errors as it may be resetting and not resetting. Also, the name is going to go away if you step on a script event tile. Plus you should use it as a level script, so you don't waste space with tons of script tiles.

It's actually the first script with 800 flag in it and when I do a level script, it won't allow me to move my character and if I just put the level script in the next map over and I move my character into that map, nothing happens and the script runs as normal.
 
215
Posts
11
Years
  • Seen Jul 14, 2020
It's actually the first script with 800 flag in it and when I do a level script, it won't allow me to move my character and if I just put the level script in the next map over and I move my character into that map, nothing happens and the script runs as normal.

This could just be me, but when doing level scripts, I think you have to use a variable, not a flag.
 

Orifiel

Priestess
413
Posts
10
Years
It's actually the first script with 800 flag in it and when I do a level script, it won't allow me to move my character and if I just put the level script in the next map over and I move my character into that map, nothing happens and the script runs as normal.

You need the variable numbers. You don't need to use flags.
I think it's better you know the basics first and continue to the
higher level that won't make give you confusions.
 

Le pug

Creator of Pokémon: Discovery / Fat Kid
870
Posts
10
Years
This could just be me, but when doing level scripts, I think you have to use a variable, not a flag.

#org @event
checkflag 0x800
if 0x1 goto @newweather
setvar 0x4014 0x0
release
end

#org @newweather
setweather 0x2
doweather
setvar 0x4014 0x0
release
End

I am using variables. But I'm using flags too.


You need the variable numbers. You don't need to use flags.
I think it's better you know the basics first and continue to the
higher level that won't make give you confusions.

I know a lot more than a lot of beginners and I've progressed well into my hack already, tediously making sure of no glitches or errors in anything before continuing on. This is the script help thread and I'm posting exactly for that so you telling me you think I need a higher level of basics that won't "make give" me confusion is irrelevant and I'd consider it unnecessary. Either post something helpful or don't post at all. If you're looking to throw out opinions, I'd suggest going to Discussions and Debates
 
Last edited:

Wobbu

bunger bunger bunger bunger
2,794
Posts
12
Years
I'm trying to create a script to where, by default, the map is running with rainy weather for my ruby hack. I have these set to the entrances of the maps to have it to where after you get your POKeMON menu option (0x800) the zones are sunny and not rainy.

If the map will be sunny after you set the 800 flag, then you should have it sunny by default. I'm assuming that you'll have the flag set for the rest of the game, correct? Just do a script like this:
Code:
#org @example
checkflag 0x800
if 0x1 goto @reset
setweather 0x3
doweather
release
end

#org @reset
resetweather
doweather
release
end
 

Le pug

Creator of Pokémon: Discovery / Fat Kid
870
Posts
10
Years
If the map will be sunny after you set the 800 flag, then you should have it sunny by default. I'm assuming that you'll have the flag set for the rest of the game, correct? Just do a script like this:
Code:
#org @example
checkflag 0x800
if 0x1 goto @reset
setweather 0x3
doweather
release
end

#org @reset
resetweather
doweather
release
end

This is just what I needed, thank you.
 

Danny0317

Fluorite's back, brah
1,067
Posts
10
Years
  • Age 24
  • Seen Nov 19, 2023
This is my script for Sapphire that is not working....
Spoiler:


The guy says the dialogue, but he doesn't move... can anyone help? Thanks in advance :)
 
Last edited by a moderator:

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
This is my script for Sapphire that is not working....
Spoiler:


The guy says the dialogue, but he doesn't move... can anyone help? Thanks in advance :)

First, you need to add a forward slash (/) on your ending spoiler tag.
HTML:
[spoiler] -insert contents here- [/spoiler]
;)

Anyway, methinks you got confused with hex and decimal values.
Your NPC is probably Person number 12, correct.
Therefore, 0x12(hex) and 12(decimal) are not the same.
Either type applymovement 12 @move or applymovement 0xC @move .

:3
 

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
2,475
Posts
11
Years
First, you need to add a forward slash (/) on your ending spoiler tag.
HTML:
[spoiler] -insert contents here- [/spoiler]
;)

Anyway, methinks you got confused with hex and decimal values.
Your NPC is probably Person number 12, correct.
Therefore, 0x12(hex) and 12(decimal) are not the same.
Either type applymovement 12 @move or applymovement 0xC @move .

:3

Plus, You won't get far hacking Sapphire...
 
13
Posts
10
Years
  • Age 37
  • Seen Oct 5, 2019
Game: Emerald
Type: Person Script
Editor: XSE 1.1.1
Script: Givepokemon

I followed tajaros' tutorial pretty closely (with a little bit of insight from looking at other givepokemon scripts in the game), and I have this down pretty well, but I can't get the nicknaming screen to work properly. It just gives me a picture of a yellow Bulbasaur and a species name of ??????????. I know that this is fixed with bufferpokemon, but wherever I try to put it in the script, it just leads to the game going to an eternal black screen with the sounds still playing once you hit YES on the nicknaming question. Maybe this whole script is just a giant mess and I'm terrible, but I was pretty confident that I was getting it down. Help would be very much appreciated.

Spoiler:


Stuff like this would be much easier if there was a single XSE tutorial out there that was for Emerald. Or even just not for FireRed.
 

Wobbu

bunger bunger bunger bunger
2,794
Posts
12
Years
Spoiler:


Changes are in red. I'm pretty sure your script will run fine now. When you learn the syntax, the best way to learn is by looking at scripts that are already compiled in the game.
 

Rezordaxx

Asks many questions!
290
Posts
10
Years
Game: FireRed (U)
Editor: XSE

Spoiler:


i get error 13 type mismatch no #define on line 6.

can someone help?
 
7
Posts
10
Years
  • Age 33
  • Seen Apr 9, 2020
If I may ask:

How do I make my trainer start somewhere other than in his house?

Thanks :)
 
Status
Not open for further replies.
Back
Top