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

Ho-oh 112

Advance Scripter
311
Posts
13
Years
  • Age 28
  • Seen Mar 8, 2014
Hey, could someone look at my script?

Spoiler:


Seems to pulling out an ultra ball everytime instead of being random...

EDIT: I forgot to say I'm using XSE and it was a fire red rom.
 
Last edited:

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
Hey, could someone look at my script?

Spoiler:


Seems to pulling out an ultra ball everytime instead of being random...

EDIT: I forgot to say I'm using XSE and it was a fire red rom.

You're using the values in the 'compare' and 'if' commands incorrectly - You had scripted so it would only check if the last result was 0 or not (0x0 or 0x1), rather than checking all the values it could hold.

Changes in red.
 
5
Posts
13
Years
  • Age 31
  • Seen Jun 29, 2011
Heyo. I sort of decided to be brave and try to make a script or two myself before I went around asking other people to get involved with that aspect of my hack. Unfortunately, it didn't go too well; a red-screen a musical stutter resulted. (After this gets resolved I'll probably just make a topic here and ask for scripting help, seeing as how I managed to wreck this XD)

I composed a script which activates upon stepping on a tile (in this case, one of two next door to Viridian Gym)

Code:
#org $start
lockall
checkflag 0x500
if b_false goto 0x800000
release
end

In theory this script should have activated the one below after checking to see if flag 500 is set. (Which it shouldn't be at this point)

Code:
#org $start
#raw 0xAC 0x24 0x00 0x0A 0x00
#raw 0xAE
#raw 0x55 0x00 0x05
applymovement 0x500 $move
pausemove 0
#raw 0XAD 0x24 0x00 0x0A 0x00
#raw 0xAE
lock
message $talk
boxset 6
playsound 0x112
nop
fadescreen 0
#raw 0x53 0x0F 0x80
setflag 0x500
playsound 0x13A
nop
release
end

#org $move
#raw 0x10 0x4A 0x62 0xFE

#org $talk
$talk 1 = Eh?\nI'm sorry.\pI can't accept your\nchallenge at the moment.\pBusiness matters you see.\pYou've seen too much as/nalready is.\pConsider it an honor you\ngot to meet the great\lGYM LEADER GIOVANNI!\pI can see it in your eyes...\pYou will become a powerful trainer!\pLet us meet again soon.\pWhen I am not so busy.\pI am eager to challenge you.\pFarewell for now, great one!

This script, on paper was supposed to activate a simple cutscene in which Giovanni emerges from the gym, talks to the player, and then vanishes when the screen fades out, with a different music track called to play for the duration of the event.

None of that happened; instead I was greeted with a red screen when I stepped on the tile. I'm not quite sure where it went wrong.

Also of note is that Giovanni's sprite was not invisible, which made it appear as though he were stuck in the closed door, but this is relatively minor compared to the above; once the script starts functioning properly I'll worry about how to set up the NPC visibility.
 
8
Posts
15
Years
  • Seen Mar 17, 2014
Spoiler:


Ok a few problems here
1.It doesnt show the preview (i guess you can call it that)
2.When rival chooses his pokemon it say RIVAL HAS CHOSEN ?????????? and his pokeball doesn't disappear
3.After i do the first battle when i leave the lab and come back if i choose the pokeball again i have to do the battle over gagain and then the pokeball will disappear for good
4.I can choose gastly before the professor makes you follow him

Help would be greatly appreciated
 
8
Posts
13
Years
  • Seen Sep 3, 2016
yes/no command doesn't work?!?!

It seems that the YES/NO function script doesn't work for me when I use XSE....

So here is a script I copy pasted from one of the guides

Spoiler:


Here is what I get when I view my script through "Advance Map" 's OPEN SCRIPT.

Spoiler:


Obviously the two functions above the String of Yes or NO are supposedly the other pointers that should have been the other strings. I did test it in my Fire red ROM and I ended up with a fail. Oh and it's a fresh rom that hasn't been tampered with.
 
Last edited:

EDB

7
Posts
13
Years
  • Seen Sep 9, 2015
It seems that the YES/NO function script doesn't work for me when I use XSE....

So here is a script I copy pasted from one of the guides

Spoiler:


Here is what I get when I view my script through "Advance Map" 's OPEN SCRIPT.

Spoiler:


Obviously the two functions above the String of Yes or NO are supposedly the other pointers that should have been the other strings. I did test it in my Fire red ROM and I ended up with a fail. Oh and it's a fresh rom that hasn't been tampered with.

Open XSE, press Ctrl + D and make sure Decompile mode is set to Enhanced. Then repost what you get when you open the script.
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
It seems that the YES/NO function script doesn't work for me when I use XSE....

So here is a script I copy pasted from one of the guides

Code:
#dynamic 0x80000[B][U][COLOR="Red"]0[/COLOR][/U][/B]
 
#org @start
lock
faceplayer
msgbox @yesno 0x5
if 0x1 goto @yes
if 0x0 goto @no
release
end
 
#org @yesno
= Yes or no?
 
#org @yes
= You pressed Yes!
 
#org @no
= You pressed No.

Here is what I get when I view my script through "Advance Map" 's OPEN SCRIPT.

Spoiler:


Obviously the two functions above the String of Yes or NO are supposedly the other pointers that should have been the other strings. I did test it in my Fire red ROM and I ended up with a fail. Oh and it's a fresh rom that hasn't been tampered with.

Try adding another zero in your dynamic offset.
(Indicated in red)
 
8
Posts
13
Years
  • Seen Sep 3, 2016
Still doesn't work yes/no function :(



Try adding another zero in your dynamic offset.
(Indicated in red)

Same results :(. I still get the braille2
even if I added another 0 to my dynamic offset and did the Ctrl+D enhanced for the next try

This might help you guys find the solution. Here's the Compiler Output
Spoiler:


I think that it's a problem of "IF" here
 
Last edited:

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Then try this then...

Code:
#dynamic 0x80000[B][COLOR="Red"]0[/COLOR][/B]
 
#org @start
lock
faceplayer
msgbox @yesno 0x5
if 0x1 goto @yes
if 0x0 goto @no
release
end
 
#org @yesno
= Yes or no?
 
#org @yes[COLOR="red"]
msgbox @pyes 0x6
release
end

#org @pyes[/COLOR]
= You pressed Yes!
 
#org @no[COLOR="red"]
msgbox @pno 0x6
release
end[/COLOR]

[COLOR="red"]#org @pno[/COLOR]
= You pressed No.

Corrections in red...
 
8
Posts
13
Years
  • Seen Sep 3, 2016
Now it works though it can't differentiate

Through this I've made my script more complex thank you very much for helping.

The Yes/No function now says its script and follows through... though there is one more problem...

When I speak to the sprite and pick either YES or NO both go to the NO FUNCTION then when I speak to the sprite again and pick either YES or NO both now go to the YES FUNCTION.

Here's my script

Spoiler:


This is my ideal flow

Dialogue->Yes/no question-If yes, goes to Yes' reply while if no, goes to No's reply--> =Multichoice--> END

 
Last edited:

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Through this I've made my script more complex thank you very much for helping.

The Yes/No function now says its script and follows through... though there is one more problem...

When I speak to the sprite and pick either YES or NO both go to the NO FUNCTION then when I speak to the sprite again and pick either YES or NO both now go to the YES FUNCTION.

Here's my script

Spoiler:


This is my ideal flow

Dialogue->Yes/no question-If yes, goes to Yes' reply while if no, goes to No's reply--> =Multichoice--> END


You need the "compare" command - change in bold ^

Also, not a good idea to use 0x654321 as your dynamic offset. You should use 0x800000 to avoid the possibility of overwriting any crucial data in the game.

... And not sure what this part of the script is there for:

Code:
msgbox @string2 MSG_KEEPOPEN
goto @snippet1

since it's literally impossible for the script to access that part of the script - if you select the back button, it will be the same as choosing no, so there's no way to get to that part of the script once you bring the up the yesno message.
 

pidizz

ludicolo Will defeat anything!
6
Posts
13
Years
Hi, i'm having a problem with compiling my script in xse,
Can anyone tell me what's wrong with this script ?
PS: My error is error 13 'type mismatch' on line 19.
Missing #define or parameter.
Line: wildbattle 0x410 0x1E 0x0
Here's the script:

Spoiler:
 
Last edited:
8
Posts
13
Years
  • Seen Sep 3, 2016
Thanks again guys. The whole script now totally works and ugghh there's another problem -_-....


It is this script.

Spoiler:


This script really works when I enter the cell for it to be activated. The only problem is that once I talk to the sprite with the multichoice ( also the one with the yes/no function that was recently) the script for this is deactivated. And yes, I intend no one to ever pass.

@pidizz

I'm not sure about your problem but when something like that happens to me it's because your line "wildbattle 0x410 0x1E 0x0" . Is not connected to anything in your script. I'm obviously still a noob but I hope this could have helped in some way.
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
Hi, i'm having a problem with compiling my script in xse,
Can anyone tell me what's wrong with this script ?
PS: My error is error 13 'type mismatch' on line 19.
Missing #define or parameter.
Line: wildbattle 0x410 0x1E 0x0
Here's the script:

Spoiler:

As you thought, the problem is with the wildbattle line - Remember that you are scripting in HEX, rather than decimal. I assume that you want Deoxys (The 410th Pokemon in terms of how the data is ordered) who is actually 0x19A rather than 1040 (0x410).
 

pidizz

ludicolo Will defeat anything!
6
Posts
13
Years
As you thought, the problem is with the wildbattle line - Remember that you are scripting in HEX, rather than decimal. I assume that you want Deoxys (The 410th Pokemon in terms of how the data is ordered) who is actually 0x19A rather than 1040 (0x410).

Thank you, i tried that but it didn't work, it still says that it's some kind of problem in line 19 (wildbattle).
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Hi, i'm having a problem with compiling my script in xse,
Can anyone tell me what's wrong with this script ?
PS: My error is error 13 'type mismatch' on line 19.
Missing #define or parameter.
Line: wildbattle 0x410 0x1E 0x0
Here's the script:

Spoiler:

First, I don't understand why there's a blank line in the middle of your script.
Second, aren't you supposed to use a safer offset for your scripts, e.g. 0x800000...?

Try this script that I tested and worked fine.
Code:
#dynamic 0x800000

#org @start
lock
checkflag 0x828
if 0x1 goto @done
setvar 0x8004 0xF
setvar 0x8005 0xF
setvar 0x8006 0xF
setvar 0x8007 0xF
special 0x136
applymovement 0xFF @move
waitmovement 0x0
applymovement 0x03 @move2
waitmovement 0x0
msgbox @1 0x6
cry 410 0x0
wildbattle 410 0x1E 0x0
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x200
release
end

#org @done
release
end

#org @move
#raw 0x62
#raw 0xFE

#org @move2
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0xFE

#org @1
= Rrrrr...

And proof that it works...



 

pidizz

ludicolo Will defeat anything!
6
Posts
13
Years


First, I don't understand why there's a blank line in the middle of your script.
Second, aren't you supposed to use a safer offset for your scripts, e.g. 0x800000...?

Try this script that I tested and worked fine.
Code:
#dynamic 0x800000

#org @start
lock
checkflag 0x828
if 0x1 goto @done
setvar 0x8004 0xF
setvar 0x8005 0xF
setvar 0x8006 0xF
setvar 0x8007 0xF
special 0x136
applymovement 0xFF @move
waitmovement 0x0
applymovement 0x03 @move2
waitmovement 0x0
msgbox @1 0x6
cry 410 0x0
wildbattle 410 0x1E 0x0
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x200
release
end

#org @done
release
end

#org @move
#raw 0x62
#raw 0xFE

#org @move2
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0x8
#raw 0xFE

#org @1
= Rrrrr...
And proof that it works...



Thanks man, really appreciate that, but it still does the same thing when i'm compiling the script! Same line and all..
 
Last edited:

Mr Zero

You can call me... GOD.
3
Posts
19
Years
Hello! I am having some trouble designing my game. I made a script for a sign (basic talking) but when I put it in my game, it doesn't work. (Pressing A does nothing) I used PokeScript. Meaning I
1. Made a script on notepad and made it into a .rbc
2. Compiled the script, clicked the book to find my fire red rom, then clicked the torch.
3. Clicked the torch (flashlight?) and clicked the first offset and assigned it
4. Went File -> Burn on Buf Rite, and got the offset from the offset tab
5. Wrote down the FIRST offset.
6. Inserted the first offset into Advance Map, onto the sign where the script is placed on top.

What did I do wrong? (I can post Screenies)

Code:
#org $Showtext
lock
faceplayer
message $Hello
$Hello 1 = Mr. Zero's House\pDon't try the back door!
boxset6
release
end
 

Ho-oh 112

Advance Scripter
311
Posts
13
Years
  • Age 28
  • Seen Mar 8, 2014
Hello! I am having some trouble designing my game. I made a script for a sign (basic talking) but when I put it in my game, it doesn't work. (Pressing A does nothing) I used PokeScript. Meaning I
1. Made a script on notepad and made it into a .rbc
2. Compiled the script, clicked the book to find my fire red rom, then clicked the torch.
3. Clicked the torch (flashlight?) and clicked the first offset and assigned it
4. Went File -> Burn on Buf Rite, and got the offset from the offset tab
5. Wrote down the FIRST offset.
6. Inserted the first offset into Advance Map, onto the sign where the script is placed on top.

What did I do wrong? (I can post Screenies)

Code:

#dynamic 0x800000

#org @Showtext
lock
faceplayer
message @Hello
@Hello 1 = Mr. Zero's House\pDon't try the back door!
boxset6
release
end


Fixed it and edits are in red.

#dynamic 0x800000

#org @Showtext
lock
faceplayer
message @Hello
@Hello1
boxset 0x3
release
end

#org @Hello1
= Mr. Zero's House\pDon't try the back door!
 
Last edited:
Status
Not open for further replies.
Back
Top