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

Wobbu

bunger bunger bunger bunger
2,794
Posts
12
Years
Are you asking why your CUT script isn't working? If so, then post your script in this thread so we can see it and help you out.
As an alternative, copy the offset of one of the other CUT scripts (like the one in Viridian City) and paste it in your new CUT person event offset. Don't forget to give the event a Person ID of 11 (or something close to that number, I'm going by memory).
Sorry I can't show you pictures, I'm hundreds of miles away from my PC...
 
3
Posts
10
Years
  • Seen Aug 17, 2013
Thanks for taking time to try and help. Unfortunately, even after doing everything you said, the game refuses to save when I try to. I keep getting the pop up called "Frage" asking me to save my game, and pressing yes achieves nothing.

This is the script which I used from Viridian City. I'm using XSE.
Spoiler:
 

Wobbu

bunger bunger bunger bunger
2,794
Posts
12
Years
If I'm understanding everything correctly, the problem is coming from your map editor or ROM. Are you using Advance Map v1.9x?
Try this official link.
If the problem persists, try finding a different ROM (Google is your friend) and try to insert the script again.
 
3
Posts
10
Years
  • Seen Aug 17, 2013
Again, I really appreciate the help. I have been using the most up-to-date version. Curiously, I tried doing the script again in a Fire Red ROM, and everything worked perfectly.

Thanks for the help, I'm gonna work on it myself and maybe just transfer the maps over, luckily I wasn't far into it.
 
53
Posts
11
Years
  • Seen Feb 1, 2014
Hi,

i've two scripts. The first one works fine, if player is facing up the movement apply is different. This is the code:

compare PLAYERFACING UP
if == jump 0x8153B49 ' Equal To
jump 0x8153B59
The second one does not. It enter in LEFT block although player is facing up. This is the code:

compare PLAYERFACING LEFT
if == jump 0x874238A ' Equal To
compare PLAYERFACING RIGHT
if == jump 0x874237B ' Equal To
jump 0x8742399
The only difference is in the first case is a person event (so you have to talk with a person for start the script) while in the second is a script event associated with a tile block.

I'm using PKSV, can anyone help me?

NB. during test in the second case i have also added a faceplayer before but nothing change.

Thanks a lot
I up my old question, wish anyone can help me :)

EDIT: alternatively i simply need to a temporary variable where to store something. Cause depending of player position the start script is different, so i can set a different value to that variable and after check it. The problem is i don't know the number of a variable i can use as temporary...0x8000? or what other?

thanks a lot
 
Last edited:

NaughtyBeaver

Pokemon Master
16
Posts
10
Years
  • Age 24
  • VA
  • Seen Dec 7, 2014
In XSE how would I make a givestarter script. I have tried the givepokemon script. That didn't work. SO know I come to the script help thread.
 
7
Posts
10
Years
  • Seen Feb 23, 2015
I've made a map script and I want it to execute as the game starts.. The point is to hide a npc for a while.

#dyn 0x740000
#org @start
setflag 0x25
disappear 0x1
setvar 0x4500 0x1
end
I have tried it in every map script type but all seem to work when I exit and enter the place not as soon as the game starts.. Is it even possible to execute a script when game starts?

EDIT: I don't know why but now it works.. :S
 

Wobbu

bunger bunger bunger bunger
2,794
Posts
12
Years
I up my old question, wish anyone can help me :)

EDIT: alternatively i simply need to a temporary variable where to store something. Cause depending of player position the start script is different, so i can set a different value to that variable and after check it. The problem is i don't know the number of a variable i can use as temporary...0x8000? or what other?

thanks a lot

Sorry, not familiar with PKSV. :(

In XSE how would I make a givestarter script. I have tried the givepokemon script. That didn't work. SO know I come to the script help thread.

Just a very basic example:
Code:
#dynamic 0xE40000
#org @example
givepokemon 0x169 0x5 0x01 0x0 0x0 0x0
fanfare 0x13E
msgbox @msg 0x4
waitfanfare
closeonkeypress
end

#org @msg
=[player] received a DUSKULL!
The givepokemon parameters explained:
0x169 will give you a Duskull (0x169 is Duskull's number in hex).
0x5 means that the Duskull will be at level 5 (also in hex, 0xA = level 10).
0x01 means that the Duskull will be holding a Potion (0x0 means that it won't be holding an item).
The next three 0x0s are buffers, which are always zeros (or at least I think they're always zeros).
If you have any questions about the commands, feel free to ask.
 
Last edited:

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
I up my old question, wish anyone can help me :)

EDIT: alternatively i simply need to a temporary variable where to store something. Cause depending of player position the start script is different, so i can set a different value to that variable and after check it. The problem is i don't know the number of a variable i can use as temporary...0x8000? or what other?

thanks a lot

0x800D is very good, as long as you don't ask any questions or such. If not, try 0x8012. That one isn't used too often.
 
1,309
Posts
12
Years
  • Age 31
  • Seen Nov 24, 2023
Back again. wanted to say a proper thanks to you guys who helped me out before. I was wondering if one of you could take the time to look at one of my scripts and try and correct me where im wrong.


Spoiler:


The script is supposed to make a message appear, then move the camera to the right, then show tow gym leaders arguing then going back into their gyms, then moving the camera back to the left at its original position. The moving camera part surprisingly doesn't work, the message boxes appear but nothing moves. I got it to work once where it moved the camera, I cant remember how i did it it wassomething to do with specials but i forgot to save it - even then the actual people sprites didn't move, or disappear. the people id's in a-map are correct and I set the unknowns to 3, and put the offset in the level script header menu, which ive heard you need to do so I don't know what else it could be.


I'm still new to scripting and know i should probably stick to beginner stuff right now but im determined to master these kinds of script early as I want to include a lot of scenes in my hack.

Thanks to anyone who can help
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Back again. wanted to say a proper thanks to you guys who helped me out before. I was wondering if one of you could take the time to look at one of my scripts and try and correct me where im wrong.


Spoiler:


The script is supposed to make a message appear, then move the camera to the right, then show tow gym leaders arguing then going back into their gyms, then moving the camera back to the left at its original position. The moving camera part surprisingly doesn't work, the message boxes appear but nothing moves. I got it to work once where it moved the camera, I cant remember how i did it it wassomething to do with specials but i forgot to save it - even then the actual people sprites didn't move, or disappear. the people id's in a-map are correct and I set the unknowns to 3, and put the offset in the level script header menu, which ive heard you need to do so I don't know what else it could be.


I'm still new to scripting and know i should probably stick to beginner stuff right now but im determined to master these kinds of script early as I want to include a lot of scenes in my hack.

Thanks to anyone who can help

Code:
special 0x113
that line of code unlocks the camera from following the player.
put that line before the camera's applymovement.

after that...
Code:
special 0x114
place that code when you want to return the camera to follow the player once again.
preferably, put that line after the last applymovement of the camera.
 
5
Posts
12
Years
  • Seen Dec 14, 2018
So I am trying to edit the Oak script to add a textbox and change the movements, but after I've compiled and I close xse to test the script the movements change. Any way to fix this?

Correct Script
Spoiler:


Script with added movements:
Spoiler:
 

Wobbu

bunger bunger bunger bunger
2,794
Posts
12
Years
Spoiler:
Spoiler:
Ignore this spoiler ^

Ok, so when adding any amount of new data to a script that's already in the game, you have to repoint the part that was changed.
Spoiler:
 
5
Posts
12
Years
  • Seen Dec 14, 2018
Ok, so when adding any amount of new data to a script that's already in the game, you have to repoint the part that was changed.
Spoiler:


Thank you so much! I can finally actually start doing something with my hack!

EDIT: Okay so it's fixed, but it's not warping to the right location now. I think something's wrong with the warp command, but everytime I change it, it will change back.

Spoiler:
 
Last edited:

Wobbu

bunger bunger bunger bunger
2,794
Posts
12
Years
Thank you so much! I can finally actually start doing something with my hack!

Okay so it's fixed, but it's not warping to the right location now.

All of the warp parameters look right... What is the map bank and map number that you're trying to warp to and the x and y coordinates where you want to warp to on that map?

After looking at your edit above, I saw all kinds of nonsense in your script. You overwrote some of the data from Oak's original script when you changed the movements without repointing. You'll have to do the repointing thing again, but this time you'll be repointing the main part of the script.

Spoiler:
 
Last edited:
5
Posts
12
Years
  • Seen Dec 14, 2018
Okay I've fixed that. I can't seem to get the giveitem command to work now though. :/

Spoiler:
 

Wobbu

bunger bunger bunger bunger
2,794
Posts
12
Years
Try doing this:
Code:
#dynamic 0x71A899
#org @start
lock
faceplayer
[size="4"][B]giveitem 0xE 0x1 0x0[/B][/size][SUP]1[/SUP]
[size="4"][B]setflag 0x902[/B][/size][SUP]2[/SUP]
release
end

1 - The message "Player received the _____!" will automatically display.
2 - Setting flags over 900 is dangerous because they can overwrite variables. More info here.
 
7
Posts
10
Years
  • Seen Feb 23, 2015
Is it possible to increase the value of variable? I mean that if you have a variable x which has a value of 0x2, can I increase it's value by one so it is 0x3?

And I don't want to start making scripts where I check the value of the variable and then change it to one bigger manually.
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
Is it possible to increase the value of variable? I mean that if you have a variable x which has a value of 0x2, can I increase it's value by one so it is 0x3?

And I don't want to start making scripts where I check the value of the variable and then change it to one bigger manually.

You can just simply use the command 'addvar 0xYYYY 0xZZZZ' where 0xYYYY is the variable you want to change and 0xZZZZ is the value you're adding to it.
 
Status
Not open for further replies.
Back
Top