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

TweenyTodd

Quitting cuz i got a job
95
Posts
11
Years
By the way, all you had to do to make your XSE work was go into your Settings.ini file and change the AutoUpdateCheck setting to "0" instead of "1".
A lot of downloads don't come with the settings.ini file. That may have been the problem.

talking to her triggers a glitchy shop, or a slot machine. I'm starting to wonder if this is caused by deleting events in the town, but I wouldn't have thought such a thing would be possible.
I've gotten the same problem except with a level script. Did you find a fix to it? (or a cause)
I also deleted events inside the town.
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Now it doesn't work AT ALL. I'm thinking something is wrong with my script. Here is what I wrote.
Spoiler:

I want you to try something:

Insert this script and tell me if it works:

Code:
#dynamic 0x800000
#org @start
checkgender
compare 0x800D 0x1
if 0x1 goto @female
checkgender
compare 0x800D 0x0
if 0x1 goto @male
 
#org @female
fadescreen 0x1
hidesprite 0x1
fadescreen 0x0
setflag 0x900
fadescreen 0x1
hidesprite 0x4
fadescreen 0x0
setflag 0x901
 
#org @male
fadescreen 0x1
hidesprite 0x3
fadescreen 0x0
setflag 0x902
fadescreen 0x1
hidesprite 0x5
fadescreen 0x0
setflag 0x903
 

TweenyTodd

Quitting cuz i got a job
95
Posts
11
Years
I want you to try something:

Insert this script and tell me if it works:

Code:
#dynamic 0x800000
#org @start
checkgender
compare 0x800D 0x1
if 0x1 goto @female
checkgender
compare 0x800D 0x0
if 0x1 goto @male
 
#org @female
fadescreen 0x1
hidesprite 0x1
fadescreen 0x0
setflag 0x900
fadescreen 0x1
hidesprite 0x4
fadescreen 0x0
setflag 0x901
 
#org @male
fadescreen 0x1
hidesprite 0x3
fadescreen 0x0
setflag 0x902
fadescreen 0x1
hidesprite 0x5
fadescreen 0x0
setflag 0x903
I set it up like that except using smaller flags. It still showed all the persons, instead of the ones I wanted to.

Lemme explain the point of this script. It is to permanently hide 2 sprites according to gender the second they walk into a room. I don't understand what I'm doing wrong, but I got another idea. I will set the flags BEFORE I walk into the room, maybe at the time gender is picked. Can I do that?
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
I set it up like that except using smaller flags. It still showed all the persons, instead of the ones I wanted to.

Lemme explain the point of this script. It is to permanently hide 2 sprites according to gender the second they walk into a room. I don't understand what I'm doing wrong, but I got another idea. I will set the flags BEFORE I walk into the room, maybe at the time gender is picked. Can I do that?

Yes, in fact, set a flag, one if it is a boy, one if it is a girl. Then, place those flags as the person ID's for the people you want to disappear if it is the wrong gender. That would only use 2 flags and you can use them throughout the game.
 

TweenyTodd

Quitting cuz i got a job
95
Posts
11
Years
I'm searching the forums for the Introduction script with Oak because I have no clue where its at.
Got it: 0x1C5A04
 
Last edited:

ProfessorBeeching

Professor Of Fail
20
Posts
11
Years
Provide more information in your request. We don't know why nothing is working, there could be many problems. If you've re-downloaded the programs and such, it's safe to assume the problem lies with your computer. What operation system are you running? and do you have the correct prerequisite files downloaded? Check these.

I run Windows 7, 64-bit. I can't say I've heard of prerequisite files before either. I did learn about the Ini thing, but the download I had didn't come with it for some reason.
Argh, this is so annoying and strange.
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Apparantly, this offset is just the TEXT of the intro.
Anyone know how I can set the flag when gender is picked?



Thats a shame =(. Where do I put the flags then?

Put the flags in a map script in the players room. Map scripts which are set up properly will run right as soon as the player appears in his/her room for the very first time. In fact, one of them is what causes the player to face a certain direction.
 

TweenyTodd

Quitting cuz i got a job
95
Posts
11
Years
Black screen after intro ends... This is REALLY getting on my nerves.
Spoiler:


Should I stick the script somewhere else? Hmm... I didn't add that return or that end after the setflags... Which one should it be?
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Black screen after intro ends... This is REALLY getting on my nerves.
Spoiler:


Should I stick the script somewhere else? Hmm... I didn't add that return or that end after the setflags... Which one should it be?

I'm going to clean this up:

Code:
 '---------------
#org @start
spriteface 0xFF 0x3
setvar 0x4056 0x1
checkgender
compare 0x800D 0x1
if 0x1 goto @girl
compare 0x800D 0x0
if 0x1 goto @boy
end

'---------------
#org @girl
setflag 0x800
end

'---------------
#org @boy
setflag 0x801
end

Now, compile this into your rom. Then, take the offset of @start and put it in the box for Script Offset 2: of map script number 1 in the player's bedroom. Don't change any other settings. Also, find the original script that was map script 0 and restore it to its original place and condition. You were trying to change the wrong one.
 

Reb0rn

Son of a Plunder
33
Posts
11
Years
Code:
'---------------
#org 0x8005D5
msgbox 0x88005F5 MSG_YESNO '"Do you want to jump down?"
compare LASTRESULT 0x1
if 0x1 goto 0x8800894
compare LASTRESULT 0x0
if 0x0 goto 0x8800998
gotostd 0xFF
'---------------
#org 0x800894
msgbox 0x88008BE MSG_NORMAL '"[player]: Dear lord yes!"
applymovement MOVE_PLAYER 0x88008D3
waitmovement 0x0
fadescreen 0x1
sound 0xA
sound 0x25
sound 0xC0
fadescreen 0x0
release
end
'---------------
#org 0x800998
msgbox 0x8800A18 MSG_NORMAL '"[player]: No thank you."
applymovement MOVE_PLAYER 0x8800A2C
waitmovement 0x0
release
end
 
'---------
' Strings
'---------
#org 0x8005F5
= Do you want to jump down?
#org 0x8008BE
= [player]: Dear lord yes!
#org 0x800A18
= [player]: No thank you.
 
'-----------
' Movements
'-----------
#org 0x8008D3
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0xFE 'End of Movements
#org 0x800A2C
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements
Why doesn't this work? All it does is freeze the character.
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Code:
'---------------
#org 0x8005D5
msgbox 0x88005F5 MSG_YESNO '"Do you want to jump down?"
compare LASTRESULT 0x1
if 0x1 goto 0x8800894
compare LASTRESULT 0x0
if 0x0 goto 0x8800998
gotostd 0xFF
'---------------
#org 0x800894
msgbox 0x88008BE MSG_NORMAL '"[player]: Dear lord yes!"
applymovement MOVE_PLAYER 0x88008D3
waitmovement 0x0
fadescreen 0x1
sound 0xA
sound 0x25
sound 0xC0
fadescreen 0x0
release
end
'---------------
#org 0x800998
msgbox 0x8800A18 MSG_NORMAL '"[player]: No thank you."
applymovement MOVE_PLAYER 0x8800A2C
waitmovement 0x0
release
end
 
'---------
' Strings
'---------
#org 0x8005F5
= Do you want to jump down?
#org 0x8008BE
= [player]: Dear lord yes!
#org 0x800A18
= [player]: No thank you.
 
'-----------
' Movements
'-----------
#org 0x8008D3
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0xFE 'End of Movements
#org 0x800A2C
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements
Why doesn't this work? All it does is freeze the character.

From what I can see, you aren't locking. Also, what are the circumstances of this script? Is it a map script, is it an NPC, or is it an s-tile? If it is an s-tile or map script, a screen shot of the settings in A-map would be very much appreciated.

Since I don't know what this is for, I have one question: you are asking the player to jump, why isn't he jumping?:p
 

Reb0rn

Son of a Plunder
33
Posts
11
Years
From what I can see, you aren't locking. Also, what are the circumstances of this script? Is it a map script, is it an NPC, or is it an s-tile? If it is an s-tile or map script, a screen shot of the settings in A-map would be very much appreciated.

Since I don't know what this is for, I have one question: you are asking the player to jump, why isn't he jumping?:p

It's a script tile, I haven't touched any of the settings( I haven't the slightest on what they do)
And he isn't jumping because I didn't know you could do that.
Also, that's the second instance of the script. Lemme get the first.
Code:
'---------------
#org 0x8005D5
lock
msgbox 0x88005F5 MSG_YESNO '"Do you want to jump down?"
compare LASTRESULT 0x1
if 0x1 goto 0x8800894
compare LASTRESULT 0x0
if 0x0 goto 0x8800998
gotostd 0xFF
'---------------
#org 0x800894
msgbox 0x88008BE MSG_NORMAL '"[player]: Dear lord yes!"
applymovement MOVE_PLAYER 0x88008D3
waitmovement 0x0
fadescreen 0x1
sound 0xA
sound 0x25
sound 0xC0
warpmuted 0x3 0x38 0x1 0x0 0x0
fadescreen 0x0
release
end
'---------------
#org 0x800998
msgbox 0x8800A18 MSG_NORMAL '"[player]: No thank you."
applymovement MOVE_PLAYER 0x8800A2C
waitmovement 0x0
release
end

'---------
' Strings
'---------
#org 0x8005F5
= Do you want to jump down?
#org 0x8008BE
= [player]: Dear lord yes!
#org 0x800A18
= [player]: No thank you.

'-----------
' Movements
'-----------
#org 0x8008D3
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0xFE 'End of Movements
#org 0x800A2C
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements
See, I thought the locking in the beginning was screwing me over.
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
It's a script tile, I haven't touched any of the settings( I haven't the slightest on what they do)
And he isn't jumping because I didn't know you could do that.
Also, that's the second instance of the script. Lemme get the first.
Code:
'---------------
#org 0x8005D5
lock
msgbox 0x88005F5 MSG_YESNO '"Do you want to jump down?"
compare LASTRESULT 0x1
if 0x1 goto 0x8800894
compare LASTRESULT 0x0
if 0x0 goto 0x8800998
gotostd 0xFF
'---------------
#org 0x800894
msgbox 0x88008BE MSG_NORMAL '"[player]: Dear lord yes!"
applymovement MOVE_PLAYER 0x88008D3
waitmovement 0x0
fadescreen 0x1
sound 0xA
sound 0x25
sound 0xC0
warpmuted 0x3 0x38 0x1 0x0 0x0
fadescreen 0x0
release
end
'---------------
#org 0x800998
msgbox 0x8800A18 MSG_NORMAL '"[player]: No thank you."
applymovement MOVE_PLAYER 0x8800A2C
waitmovement 0x0
release
end

'---------
' Strings
'---------
#org 0x8005F5
= Do you want to jump down?
#org 0x8008BE
= [player]: Dear lord yes!
#org 0x800A18
= [player]: No thank you.

'-----------
' Movements
'-----------
#org 0x8008D3
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0xFE 'End of Movements
#org 0x800A2C
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements
See, I thought the locking in the beginning was screwing me over.

And your problem lies in the settings of your tile. Script tiles require that the var in their A-map settings be over 4000 (preferably unused) and equal to the value in the box below it.

Also, there is a movement command for jump. Look through the scripting tuts for a list of movements.
 

Reb0rn

Son of a Plunder
33
Posts
11
Years
And your problem lies in the settings of your tile. Script tiles require that the var in their A-map settings be over 4000 (preferably unused) and equal to the value in the box below it.

And if I have three instances of the same script? Do they all get the same var?

Oh and which var? the var number or the var value?
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
And if I have three instances of the same script? Do they all get the same var?

The script will run when the var equals the value. So, it is your choice. Vars can be used more than once, but if you are playing with the values, then don't use them again. The best and safest vars are 4000-40FF unless you hack them:p.

 
9
Posts
11
Years
  • Seen Mar 4, 2021
I cannot make the most simple script work. I compiled it and inserted it to a character, but when I interatct with the sprite, it makes the clicking sound and nothing happens.
The game does not freeze. The rom is clean.

Here is the script:
Spoiler:

As you may have seen, it is exactly the script Spherical Ice posted, but with my own text.

Here is also the compiling log:
Spoiler:
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
I cannot make the most simple script work. I compiled it and inserted it to a character, but when I interatct with the sprite, it makes the clicking sound and nothing happens.
The game does not freeze. The rom is clean.

Here is the script:
Spoiler:

As you may have seen, it is exactly the script Spherical Ice posted, but with my own text.

Here is also the compiling log:
Spoiler:

When you attached it to a character, did the script offset box say this exactly: $800000 ?
 

Renegade

Time for real life...
995
Posts
12
Years
I cannot make the most simple script work. I compiled it and inserted it to a character, but when I interatct with the sprite, it makes the clicking sound and nothing happens.
The game does not freeze. The rom is clean.

Here is the script:
Spoiler:

As you may have seen, it is exactly the script Spherical Ice posted, but with my own text.

Here is also the compiling log:
Spoiler:

You are using "message @string1 0x2". Make sure you use "message @string1 0x6". 0x6 is a simple talking command and it never fails. You also need to add in a "lock" and a "faceplayer" command. So, your revised script should look something like this:

Code:
#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @string1 0x6
release
end

#org @string1
= Am I talking?
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
You are using "message @string1 0x2". Make sure you use "message @string1 0x6". 0x6 is a simple talking command and it never fails. You also need to add in a "lock" and a "faceplayer" command. So, your revised script should look something like this:

Code:
#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @string1 0x6
release
end

#org @string1
= Am I talking?

Actually, message @string1 0x2 will work just fine without lock and faceplayer, because that is what message type 0x02 does; it forces LASTTALKED to face you and locks. 0x06 is just a standard message box with nothing special. Though, you can still use lock & faceplayer with 0x02. I do just out of habit, but it isn't required:p.

Edit: here is what each msgbox type does:
[00] - Obtained item
[01] - Found Item
[02] - Standard (built in faceplayer and lock. Is released when the message disappears.)
[03] - Signpost
[04] - Does not close
[05] - Yes/No
[06] - Normal (nothing special)
 
Last edited:
Status
Not open for further replies.
Back
Top