• 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.
32
Posts
13
Years
  • Seen Dec 5, 2023
So, until I find the offset for var x800D in ruby, this is the script I want to use to check the level of a player's pokemon; the script should then go to different pointers depending on the level of the pokemon.

...
#org @start
lock
faceplayer
checkflag 0x6C
if 0x1 goto @other
comparefarbytetobyte 0x30043B4 0x5
if 0x1 goto @weak
comparefarbytetobyte 0x30043B4 0x7
if 0x1 goto @strong
msgbox @2 '"Hey, we should battle sometime!"
release
end
...

When I assign this script to a person event on the map, nothing happens. The NPC looks at me, but it then goes right to the "release, end".
 
275
Posts
13
Years
  • Seen Oct 9, 2019
So, until I find the offset for var x800D in ruby, this is the script I want to use to check the level of a player's pokemon; the script should then go to different pointers depending on the level of the pokemon.

...
#org @start
lock
faceplayer
checkflag 0x6C
if 0x1 goto @other
comparefarbytetobyte 0x30043B4 0x5
if 0x1 goto @weak
comparefarbytetobyte 0x30043B4 0x7
if 0x1 goto @strong
msgbox @2 '"Hey, we should battle sometime!"
release
end
...

When I assign this script to a person event on the map, nothing happens. The NPC looks at me, but it then goes right to the "release, end".
The number you pass to "if" determines what sign you're using

0 <
1 =
2 >
3 ≤
4 ≥
5 ≠

Your script, as it is currently written, only checks if the level is exactly equal to 5 or exactly equal to 7. You also seem to have specified a string pointer, but not a message type, for "msgbox"; that needs fixing as well. (Normal message type is 0x2 IIRC.)
 
32
Posts
13
Years
  • Seen Dec 5, 2023
The number you pass to "if" determines what sign you're using

0 <
1 =
2 >
3 ≤
4 ≥
5 ≠
Thanks, good to know.
I actually think the problem is with my XSE, though, because even with pokemon at lvl 5 (and the msgbox corrected) nothing happened.
Edit: Yep, XSE and antivirus were not getting along. Script works like a dream.
 
Last edited:
124
Posts
12
Years

Well pokecries' numbers are the same as their pokedex number.
And how to do it...? The best way is to decompile some standing legendary script and you will see it for yourself =)

Unfortunately, that's only for Pokemon up to Celebi. I want to get the cry's for the Hoenn Pokemon...
There's 25-26 (can't remember) used cries after celebi which are for the Unown I believe, then after that, the Hoenn cries are all jumbled =/
 
32
Posts
12
Years
  • Seen Jul 15, 2013
How do you make a time based event? I just put in a day and night system if fire red so how could you put in a clock too? Oh and I'm using XSE
 
124
Posts
12
Years
How can I make a message appear once the screen has faded from normal to black?
Also, I don't know why my warp isn't working.
The A-Map are coordinates are:
Bank: 1
Map: 1
X: $0001
Y: $0004
XSE won't let me put 0x01 and 0x04 and I believe that is how they should be...
Pokemon Ruby if you need to know.


Spoiler:
 
Last edited:

hinkage

Everyone currently in an argument with this member
382
Posts
13
Years
  • Age 28
  • Seen Mar 24, 2024
How can I make a message appear once the screen has faded from normal to black?
Also, I don't know why my warp isn't working.
The A-Map are coordinates are:
Bank: 1
Map: 1
X: $0001
Y: $0004
XSE won't let me put 0x01 and 0x04 and I believe that is how they should be...
Pokemon Ruby if you need to know.


Spoiler:

It looks fine... I mean, I've written messages while fadescreen'd and it works. And your warp is fine too.

Is that the whole script, or just a part? If none of it is working, the problem's probably with your XSE version or something. (I use PKSV, which, by the way, is better.)
 
124
Posts
12
Years
It looks fine... I mean, I've written messages while fadescreen'd and it works. And your warp is fine too.

Is that the whole script, or just a part? If none of it is working, the problem's probably with your XSE version or something. (I use PKSV, which, by the way, is better.)

It's just part, The rest of the script works perfectly but the last message and warp don't. It makes the warp sound but doesn't warp the character.

I was recently using PKSV but you can't use it as the script viewer in A-MAP and XSE and PKSV don't get on so I now use XSE.
More control, and I like it.

My XSE version is the latest 1.1(.1?). I just can't figure it out... =/
 

Epitaph93

Intermediate Digidestined
120
Posts
12
Years
I'm trying to create an event that won't allow you to go down your staircase until you've checked your computer. When you step on the tile before the warp, I want a message to appear, then have the character step back.

When the player steps on the tile, the game freezes. I figure this has something to do with advance map, as it was working as a signpost, but not as a script. Although, as a signpost it would display the text, the character would walk down a tile, then the game would freeze.

Spoiler:
 
124
Posts
12
Years

Then something might be wrong with your script...
Could you post complete script instead of part of it?

Here's the full script.
Also, For some reason, my warp doesn't function either.
Could that be because of the fadescreen?

I checked through the original Ruby scripts and when a message box appears over a fadescreen, they used 0x2. Still doesn't make a difference though =/


Spoiler:

I'm trying to create an event that won't allow you to go down your staircase until you've checked your computer. When you step on the tile before the warp, I want a message to appear, then have the character step back.

When the player steps on the tile, the game freezes. I figure this has something to do with advance map, as it was working as a signpost, but not as a script. Although, as a signpost it would display the text, the character would walk down a tile, then the game would freeze.

Spoiler:

This is because you need a setvar for a trigger script.

Example:
Code:
#org @start
checkflag 0x258
if 0x0 goto @snippet1
end

'---------------
#org @snippet1
lock
[B]setvar 0x???? 0x0[/B]
msgbox @string1 MSG_NORMAL '"Wait, you need to check the\ncompu..."
goto @snippet2

Also, you forgot to put #raw 0xFE at your movement commands which is also another possible cause to a crashing script.
 
Last edited:

Epitaph93

Intermediate Digidestined
120
Posts
12
Years
This is because you need a setvar for a trigger script.

Also, you forgot to put #raw 0xFE at your movement commands which is also another possible cause to a crashing script.

I changed it a bit and it's still the same exact problem.

EDIT: Never mind. I had to edit the var in advance map. Thanks for the help.

Spoiler:
 
Last edited:
124
Posts
12
Years
I changed it a bit and it's still the same exact problem.

EDIT: Never mind. I had to edit the var in advance map. Thanks for the help.

Spoiler:

In A-Map, Have you changed the Var Number to the same Setvar Value in your script?
And also have you changed the Unknown Value to $03?
 
19
Posts
12
Years
  • Seen Dec 28, 2011
help: make you drive cars

does anyone know how you could change your player's sprite using a script? because i have a car sprite and i want your player to drive it all i need is a change of the player's sprite i have the rest of the script already



EDIT: i figured it out don't need help
 
Last edited:
124
Posts
12
Years
does anyone know how you could change your player's sprite using a script? because i have a car sprite and i want your player to drive it all i need is a change of the player's sprite i have the rest of the script already



EDIT: i figured it out don't need help

That's ASM hacking isn't it?
Or is it possible without ASM?
 

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years


Here's the full script.
Also, For some reason, my warp doesn't function either.
Could that be because of the fadescreen?

I checked through the original Ruby scripts and when a message box appears over a fadescreen, they used 0x2. Still doesn't make a difference though =/


Spoiler:
[/FONT]
Have you tried making this with "warp" instead of warpmuted command?
 
Status
Not open for further replies.
Back
Top