• 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.
53
Posts
15
Years
  • Age 27
  • Seen May 14, 2010
Hi, I can't seem to get this script working. It's my main one to set it. But everytime I click on the overworld sprite of the person thats meant to be doing the script it freezes. And the script is meant to disappear after It's finished as well as the overworld. But I can't get ANYTHING to work.

Code:
#dynamic 0x740000
#org @start
checkflag 0x1001
if 0x1 goto @done
applymovement 0x02 @move
msgbox @1 0x6
waitmovement 0x0
pause 0x30
playsong 0x13E 0x0
applymovement 0x02 @move2
applymovement 0xFF @move3
waitmovement 0x0
msgbox @2 0x6
applymovement 0x02 @move4
waitmovement 0x0
fadesong 0x12C
setflag 0x1001
release
end

#org @done
release
end

#org @move
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move2
#raw 0x11
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @move3
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @move4
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0xFE

#org @1
= DON'T GO ANYWHERE... YET! COME\nWITH ME!\lQUICKLY!!
#org @2
= So? How do you like it?\n...\l...\lWhat do you mean you don't see\lit?! It's right in FRONT of you!!\lOh, and you should come back with\lme to the lab. There's 3\l
POK\h1BMON left, so let's go\lbefore they run out!\l...\l...\lOH MY GOSH!! Your so useless\lsometimes. Come! I'll show you\lwhere it is!\pOh bother, I forgot! Mum needs me!\nGotta run!
 

colcolstyles

Yours truly
1,588
Posts
15
Years
Question: How do I make it so that dynamic offsets are what is read by the A-map offset thing? 'Cause I put in a dynamic offset, and can never find the offset (even re-loading the same one) for the script. Any help?!?!

This belongs in the Simple Questions Thread but I'll help you out anyways.

When you put an offset after the "#dynamic", XSE searches for the next block of free space after that offset that is big enough to put your script in. If you put "#dynamic 0x800000" and there was nothing at that offset, then the script would compile to 0x800000. However, if you previously compiled a script to 0x800000 and you try to compile a script that has a "#dynamic 0x800000" in it, XSE will check that offset and find that there's already a script there. Seeing that, it will skip to the end of that script where there is more free space and then insert your script there. So even if you put a "#dynamic 0x800000", your script could very likely be located somewhere else. "So where did my script end up?" you might be asking yourself. Well, after you press the compile button, a window should pop up with a bunch of gibberish that you don't understand. However, this is very important. At the bottom of that window is a box with the header "Dynamic Offsets" that has the names of the labels (e.g., "@main", "@done") that you used in the script. You will want to locate "@main" and copy the offset that shows up next to it because that offset is where the script got stored. You can then paste that offset into whatever script offset box you want in AdvanceMap.

Hope that helps.
 
32
Posts
14
Years
  • Age 38
  • Seen Dec 16, 2010
I posted this already, but I deleted that post. I feel this would be a better place for my question, anywho. I need help with my warp scripts. I am trying to hack FR and when I try to go into my warp it just leads me to a black screen. I'm using pokescript still, but I have tried it in XSE also and the same thing happened. I've been looking everywhere for the past two days for an answer and I just can't get it.

#org $start
warp 0x3 0x41 0xff
#raw 0x1A 0x00 0x04 0x00
release
end

That's one of my scripts, just in case the error is in my script. Please help me.
 

Darkest Shade of Light

Pokémon Midnight Sun
298
Posts
14
Years
This belongs in the Simple Questions Thread but I'll help you out anyways.

When you put an offset after the "#dynamic", XSE searches for the next block of free space after that offset that is big enough to put your script in. If you put "#dynamic 0x800000" and there was nothing at that offset, then the script would compile to 0x800000. However, if you previously compiled a script to 0x800000 and you try to compile a script that has a "#dynamic 0x800000" in it, XSE will check that offset and find that there's already a script there. Seeing that, it will skip to the end of that script where there is more free space and then insert your script there. So even if you put a "#dynamic 0x800000", your script could very likely be located somewhere else. "So where did my script end up?" you might be asking yourself. Well, after you press the compile button, a window should pop up with a bunch of gibberish that you don't understand. However, this is very important. At the bottom of that window is a box with the header "Dynamic Offsets" that has the names of the labels (e.g., "@main", "@done") that you used in the script. You will want to locate "@main" and copy the offset that shows up next to it because that offset is where the script got stored. You can then paste that offset into whatever script offset box you want in AdvanceMap.

Hope that helps.
Thank you. @belonging in simple questions: I figured since this had to do with scripting, it'd go here... Soo, since my FSF says there is free space at 0x800000, I can write my script there? I'm sorry for being a complete failure here, but I REALLY want to learn scripting for Darkest Shadows
 

ryolo

talking meowth
5
Posts
14
Years
  • Seen Sep 3, 2010
thanks for trying to help Evilcrizpy but the problem still remains
this is the updated version

#Dynamic 0x6B09F8

#org @start
lock
checkflag 0x200
if 0x1 goto @done
checkflag 0x201
if 0x1 goto @done
applymovement 0x07 @girl
waitmovement 0x0
msgbox @girltalk 0x6
applymovement 0xFF @turn1
waitmovement 0x0
applymovement 0x08 @prof
waitmovement 0x0
applymovement 0xFF @turn2
waitmovement 0x0
msgbox @away 0x6
special 0x9F
cry 0x84 0x0
wildbattle 0x84 0x5 0x8B
fadescreen 0x3
fadescreen 0x2
setflag 0x200
applymovement 0x07 @run
waitmovement 0x0
msgbox @thanks 0x6
warp 0x1 0x4 0xFF 0x05 0x06
end

#org @done
release
end

#org @turn1
#raw 0x03

#org @girl
#raw 0x56
#raw 0x30
#raw 0x30
#raw 0x30

#org @girltalk
= Hai therrr!

#org @prof
#raw 0x0B
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x01

#org @turn2
#raw 0x04

#org @away
= WAIT THATS NOT A GIRL!\pTHATS A ROGUE DITTO!\nplease take one of these\lIcan't fight it so please help!

#org @run
#raw 0x81
#raw 0x81
#raw 0x81
#raw 0x81
#raw 0x81
#raw 0x81
#raw 0x81
#raw 0x81
#raw 0x81
#raw 0x81
#raw 0x81
#raw 0x81
#raw 0x81

#org @thanks
= dam!/nit got away/lsorry, we were experimenting on a ditto/lto change it into more than just pokemon/pplease come to my lab.
 
53
Posts
15
Years
  • Age 27
  • Seen May 14, 2010
Hi, I can't seem to get this script working. It's my main one to set it. But everytime I click on the overworld sprite of the person thats meant to be doing the script it freezes. And the script is meant to disappear after It's finished as well as the overworld. But I can't get ANYTHING to work.

Code:
#dynamic 0x740000
#org @start
checkflag 0x1001
if 0x1 goto @done
applymovement 0x02 @move
msgbox @1 0x6
waitmovement 0x0
pause 0x30
playsong 0x13E 0x0
applymovement 0x02 @move2
applymovement 0xFF @move3
waitmovement 0x0
msgbox @2 0x6
applymovement 0x02 @move4
waitmovement 0x0
fadesong 0x12C
setflag 0x1001
release
end

#org @done
release
end

#org @move
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move2
#raw 0x11
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @move3
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @move4
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0xFE

#org @1
= DON'T GO ANYWHERE... YET! COME\nWITH ME!\lQUICKLY!!
#org @2
= So? How do you like it?\n...\l...\lWhat do you mean you don't see\lit?! It's right in FRONT of you!!\lOh, and you should come back with\lme to the lab. There's 3\l
POK\h1BMON left, so let's go\lbefore they run out!\l...\l...\lOH MY GOSH!! Your so useless\lsometimes. Come! I'll show you\lwhere it is!\pOh bother, I forgot! Mum needs me!\nGotta run!

I really need help with this. Can someone please tell me where i went wrong?
 
20
Posts
14
Years
  • Seen Apr 24, 2010
There are 2 ways to do it. One is still a mystery to me as to how it works, the other uses more bytes but is easier to understand. Type 1:

There's no setflag command in the script, but it appears to set one anyway, basing it off the person ID in AdvanceMap, but I believe only certain flags work. 01C0 and up can be used, but I don't know where these end and the regular flags begin. Just set the flag to Person ID of the Pokeball.
Spoiler:


Now, the standard script, uses many more bytes but makes sense. Set whatever flag you used to the Pokeball's person ID.
Spoiler:

If you aren't at that point of scripting yet, the var stores the number of the item you want, and the commands later using 0x4000 read that var. The bufferitem stores the value of 0x4000 as an item name to buffer \v\h02. So, if you set 0x4000 to 0xD, the script will add a potion and display "(name) found one POTION!" I did it this way so all you have to do is copy/paste the script and change the value of a var and flag to use other items. Set the pokeball's person ID to whatever flag you used (200 in this case) to make it vanish after the script.


Pokeball not Vanish ... Disappears only when I go and disappear from sight. I do not know why: (And I'd wanted to do so that disappeared after taking it.
 
Last edited:

Paper Mario

Ace Trainer
16
Posts
14
Years
  • Age 31
  • Home
  • Seen Mar 22, 2022
Pokeball not Vanish ... Disappears only when I go and disappear from sight. I do not know why: (And I'd wanted to do so that disappeared after taking it.
Try adding a special 0x8E to the script, it will reset the map, changing screen without the need of leaving the area
 
72
Posts
16
Years
Im attempting to make a custom multichoice box using JPAN's Hacked ROM, but I cannot get my test result to come out right. So far, I get the box to come up, and whichever I hit, it sends both of them to @option3. Could someone tell me what im doing wrong?

Spoiler:
 
Last edited:
7
Posts
14
Years
  • Seen Apr 11, 2010
Hey guys, im kinda new but i got a problem with a flag im making for running shoes. When the main character steps on any of the 3 script tiles, a guy on the left gets an exclamation mark, goes to the player, and gives him the shoes but the problem is that it freezes whenever i go on the script tile. Here's the code:


Spoiler:
 

Binary

え?
3,977
Posts
16
Years
  • Age 29
  • Seen Apr 7, 2014
Spoiler:


I think that should do the trick.
 
13
Posts
14
Years
  • Seen Jan 2, 2016
more than likely this is extremely simple, but im a noob. say I added a legendary pokemon script, when i talk to it, i'll engage the battle. I've got that bit cracked, but it doesnt disappear after i defeat it, how do i make it disappear?
 

Tropical Sunlight

The Faltine
3,476
Posts
16
Years
more than likely this is extremely simple, but im a noob. say I added a legendary pokemon script, when i talk to it, i'll engage the battle. I've got that bit cracked, but it doesnt disappear after i defeat it, how do i make it disappear?
In A-Map, where on that legendary Pokemon OW says Person ID, write a flag there. For example, 1500.

And you have to use the "hidesprite [Person event no.]" in the script.
 
13
Posts
14
Years
  • Seen Jan 2, 2016
In A-Map, where on that legendary Pokemon OW says Person ID, write a flag there. For example, 1500.

And you have to use the "hidesprite [Person event no.]" in the script.

ok i followed the instructions, but it didn't work, so obviously i'm doing something wrong.
this time, the sprite doesnt turn up at all! can you have a look at this screenshot and see whats wrong?
 
13
Posts
14
Years
  • Seen Jan 2, 2016
i thought that was what you meant by hide sprite, what do you actually mean? yes i know, i'm a noob... :(
 

Tropical Sunlight

The Faltine
3,476
Posts
16
Years
i thought that was what you meant by hide sprite, what do you actually mean? yes i know, i'm a noob... :(
Don't worry, it took me a year to learn scripting XD

Open up the script of your Lugia in XSE. Because there's no hidesprite command there, you need to re-script it. You did script it by yourself, right? Well, add this to the end of your script.

script said:
...
fadescreen 0x1
hidesprite LASTTALKED
setflag 0x1500
fadescreen 0x0
release
end
 
Status
Not open for further replies.
Back
Top