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

DoesntKnowHowToPlay

Tiny Umbrella with Lots and Lots of Good
265
Posts
12
Years
  • Seen Feb 24, 2024
The game doesn't support having TMs and regular items in the same shop's inventory- notice how the interface used for the TM merchant in the department store is very different from the regular merchant:

aJiCayf.png
f9CXb4D.png


The simplest solution would be to have a separate NPC selling the TMs like the Celadon Department Store does.
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Spoiler:


Edit: I guess I took too long. DoesntKnowHowToPlay beat me to it, i'll put my text in a spoiler then.
 
Last edited:
105
Posts
12
Years
#dynamic 0x800000
setvar 0x8003
#org @start
lock
faceplayer
cry 0x19 0x0
msgbox @roar 0x6
waitcry
wildbattle 0x19 0x5 0xCA
fadescreen 0x0
hidesprite 0x800F
fadescreen 0x1
setflag 0x300
release
end

#org @roar
= PIKACHU: PIKA!

can any1 tell me why this don't let me battle a shiny wild pikachu?
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
#dynamic 0x800000
setvar 0x8003
#org @start
lock
faceplayer
cry 0x19 0x0
msgbox @roar 0x6
waitcry
wildbattle 0x19 0x5 0xCA
fadescreen 0x0
hidesprite 0x800F
fadescreen 0x1
setflag 0x300
release
end

#org @roar
= PIKACHU: PIKA!

can any1 tell me why this don't let me battle a shiny wild pikachu?

Yes, you must set the var 0x8003 to a number, and it must be inside of the @start at least.


So, if you want 1 shiny pikachu:
setvar 0x8003 0x1

If you want the next 2 pokemon shiny:
setvar 0x8003 0x2
and so on and so forth...


And it requires Shinyizer, just for anyone else looking at this.
 

Lord Varion

Guess who's back?
2,642
Posts
15
Years
  • Age 29
  • Seen Jan 6, 2015
I'm trying to script, it's something I've never done before I got this:

#dynamic 0x801E60
#org @start
lock
faceplayer
msgbox @1 0x6
release
end

#org @1
= Hello \v\h01!\nIt sure is a cold day, eh?

When I copy and paste the Offest from XSE's compiler i get;
801EC0

But the game warps me to a strange black room with Celadon City music, and then it crashes. Halp!
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
I'm trying to script, it's something I've never done before I got this:

#dynamic 0x801E60
#org @start
lock
faceplayer
msgbox @1 0x6
release
end

#org @1
= Hello \v\h01!\nIt sure is a cold day, eh?

When I copy and paste the Offest from XSE's compiler i get;
801EC0

But the game warps me to a strange black room with Celadon City music, and then it crashes. Halp!

It looks so simple.... How could this have happened? But I might have your problem. When you compiled it, did you take the @start offset or the @1 offset? The game won't like reading a message without the msgbox command, and will try to execute it as it's own command by instead of reading text, reading the hex numbers as raw commands.

This is what I think happened. Sometimes XSE will auto select other offsets besides @start. It can get confused if you have @start2 or @begin and won't know which one to auto select for copying. Just recompile it and make sure you take the @start offset.
 
241
Posts
11
Years
Thanks Doesnt and karatekid.

But now I'm having one small problem...

I'm copying the original mart text verbatim, only changing the beginning offset and the offset of the mart items (and of course, the mart items themselves). But now, when I test the marts in-game, some of them work and others don't bring up the buy menu, seemingly at random...

Here's an example of one that works:

Code:
'-----------------------
#org 0x8022B2
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
lock
faceplayer
msgbox2 0x81A6211 '"Hi, there!\nMay I help you?"
waitmsgbox
pokemart 0x88022DA
msgbox 0x81A5190 '"Please come again!"
callstd 0x4
release
end

'-----------------------
#org 0x1A7AE0
release
end


'-----------
' MartItems
'-----------
#org 0x8022DA
#raw word 12C
#raw word 14D
#raw word 142
#raw word 148
#raw word 129
#raw word 147
#raw word 0


'---------
' Strings
'---------
#org 0x1A6211
= Hi, there!\nMay I help you?

#org 0x1A5190
= Please come again!
And here is one that doesn't:

Code:
'-----------------------
#org 0x802337
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
lock
faceplayer
msgbox2 0x880236A '"Hi, there!\nMay I help you?"
waitmsgbox
pokemart 0x880235F
msgbox 0x81A5190 '"Please come again!"
callstd 0x4
release
end

'-----------------------
#org 0x1A7AE0
release
end


'-----------
' MartItems
'-----------
#org 0x80235F
#raw word 124
#raw word 128
#raw word 130
#raw word 141
#raw word 0


'---------
' Strings
'---------
#org 0x80236A
= Hi, there!\nMay I help you?

#org 0x1A5190
= Please come again!
 

Lord Varion

Guess who's back?
2,642
Posts
15
Years
  • Age 29
  • Seen Jan 6, 2015
'-----------------------
#org 0x800200
lock
faceplayer
msgbox 0x826D3BD '"Have fun [player]!\nYour mother wil..."
release
end


'---------
' Strings
'---------
#org 0x26D3BD
= Have fun [player]!\nYour mother will wait here at home.

This is a script that's been compiled I made.

Talking to the NPC does nothing.
 
241
Posts
11
Years
You need a callstd 0x__ (probably 4, maybe 6...I forget what each does) after the msgbox.

Or msgbox @whatever 0x__ if you have an updated version...(i think)
 

Lord Varion

Guess who's back?
2,642
Posts
15
Years
  • Age 29
  • Seen Jan 6, 2015
I'm back again.

'-----------------------
#org 0x800300
checkflag 0x7
if 0x1 goto 0x8800338
lock
applymovement 0x1 0x880033B
callstd 0x6
msgbox 0x880033E '"Mum: Oh [player]!\n You're up!"
applymovement 0x1 0x880035C
waitmovement 0x0
msgbox 0x8800361 '"Mum: A letter came for you today.\n..."
applymovement 0x1 0x88004C2
release
end

'-----------------------
#org 0x800338
release
end


'-----------
' Movements
'-----------
#org 0x80033B
#raw 1 'Face Up

#org 0x80035C
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)

#org 0x8004C2
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)


'---------
' Strings
'---------
#org 0x80033E
= Mum: Oh [player]!\n You're up!

#org 0x800361
= Mum: A letter came for you today.\nHere I'll read it:\p''Dear [player],\nWe've recieved a Parcel for you from Maxi,\pplease make haste and collect it\nFrom, Worseth Town PO.\pMum: Hmmm, A parcel huh?\nGo ask Maxi, he might help ya!\pBut ... I guess this means, you'll\nbe leaving on a journey.\pHuh, me?\nOh don't worry, I'll be fine.\pGo have some fun.

just gives me this:

5qVDt.jpg
 
241
Posts
11
Years
I'm not sure if this will fix everything, but callstd should come after the msgbox.

EDIT: and make sure you have another callstd after the second msgbox.
 

Lord Varion

Guess who's back?
2,642
Posts
15
Years
  • Age 29
  • Seen Jan 6, 2015
It sort of work now.

She walks up to the player, talks then stops like planned.
But she does not walk back to her seat, and the script can happen again when re stepped on.

'-----------------------
#org 0x800300
checkflag 0x7
if 0x1 goto 0x8800338
applymovement 0x1 0x880033B
msgbox 0x880033E '"Mum: Oh [player]!\n You're up!"
callstd 0x6
applymovement 0x1 0x880035C
msgbox 0x8800361 '"Mum: A letter came for you today.\n..."
callstd 0x6
applymovement 0x1 0x88004C2
release
end

'-----------------------
#org 0x800338
release
end


'-----------
' Movements
'-----------
#org 0x80033B
#raw 62 'Exclamation Mark (!)
#raw 1 'Face Up
#raw FE 'End of Movements

#org 0x80035C
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 3 'Face Right
#raw FE 'End of Movements

#org 0x8004C2
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 2 'Face Left
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x80033E
= Mum: Oh [player]!\nYou're up!

#org 0x800361
= Mum: A letter came for you today.\nHere I'll read it:\p''Dear [player],\nWe've recieved a Parcel for you from\pMaxi, please make haste and collect it\nFrom, Worseth Town PO.\pMum: Hmmm, A parcel huh?\nGo ask Maxi, he might help ya!\pBut ... I guess this means, you'll\nbe leaving on a journey.\pHuh, me?\nOh don't worry, I'll be fine.\pGo have some fun.
 
241
Posts
11
Years
Assuming you're using a-map, for the script happening again and again, you'll want to set the var # of the script to something unused (like 7000, for ex.) then at the beginning of your script use "setvar 0x7000 0x1". This allows the script to happen only once.

I'm not sure about the movements yet...I'll keep working at it.

EDIT: When she walks up to you, does the message show? Knowing exactly when it stops working would be helpful.
 
Last edited:

Lord Varion

Guess who's back?
2,642
Posts
15
Years
  • Age 29
  • Seen Jan 6, 2015
@Nintendork - In the movements, it points to 0x8004C2. However, you have the applymovement pointing to 0x88004C2 in the actual script. Remove the duplicate "8" up top.

It does that automatically when it compiles.

Assuming you're using a-map, for the script happening again and again, you'll want to set the var # of the script to something unused (like 7000, for ex.) then at the beginning of your script use "setvar 0x7000 0x1". This allows the script to happen only once.

I'm not sure about the movements yet...I'll keep working at it.

EDIT: When she walks up to you, does the message show? Knowing exactly when it stops working would be helpful.

Did nothing ?

Spoiler:
 
241
Posts
11
Years
Really? Are you sure you set the var # and not the var value? If you did, and it's still not working, then idk.

On the movements, try adding waitmovement 0x0 after each? I'm really at the end of my knowledge now...

EDIT: also, it seems you're missing a lock at the beginning. IDK if that will help but since you release at the end it might be confusing it...
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Thanks Doesnt and karatekid.

But now I'm having one small problem...

I'm copying the original mart text verbatim, only changing the beginning offset and the offset of the mart items (and of course, the mart items themselves). But now, when I test the marts in-game, some of them work and others don't bring up the buy menu, seemingly at random...

Here's an example of one that works:

Code:
'-----------------------
#org 0x8022B2
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
lock
faceplayer
msgbox2 0x81A6211 '"Hi, there!\nMay I help you?"
waitmsgbox
pokemart 0x88022DA
msgbox 0x81A5190 '"Please come again!"
callstd 0x4
release
end

'-----------------------
#org 0x1A7AE0
release
end


'-----------
' MartItems
'-----------
#org 0x8022DA
#raw word 12C
#raw word 14D
#raw word 142
#raw word 148
#raw word 129
#raw word 147
#raw word 0


'---------
' Strings
'---------
#org 0x1A6211
= Hi, there!\nMay I help you?

#org 0x1A5190
= Please come again!
And here is one that doesn't:

Code:
'-----------------------
#org 0x802337
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
lock
faceplayer
msgbox2 0x880236A '"Hi, there!\nMay I help you?"
waitmsgbox
pokemart 0x880235F
msgbox 0x81A5190 '"Please come again!"
callstd 0x4
release
end

'-----------------------
#org 0x1A7AE0
release
end


'-----------
' MartItems
'-----------
#org 0x80235F
#raw word 124
#raw word 128
#raw word 130
#raw word 141
#raw word 0


'---------
' Strings
'---------
#org 0x80236A
= Hi, there!\nMay I help you?

#org 0x1A5190
= Please come again!


Whoa, that was weird!!! I compiled your script in XSE 1.0.0 and, just like you said, it didn't work. However, then I compiled it in XSE 1.1.1, making the small syntax changes it required, such as shifting the callstd to an inline command and changing waitmsgbox to waitmsg and..... It worked perfectly. All I did was change syntax, the exact same basic structure was there. I honestly don't get it. I'm going to look at the hex value differences and see what I can find.
 
241
Posts
11
Years
Whoa, that was weird!!! I compiled your script in XSE 1.0.0 and, just like you said, it didn't work. However, then I compiled it in XSE 1.1.1, making the small syntax changes it required, such as shifting the callstd to an inline command and changing waitmsgbox to waitmsg and..... It worked perfectly. All I did was change syntax, the exact same basic structure was there. I honestly don't get it. I'm going to look at the hex value differences and see what I can find.

Well, if it works in 1.1.1, then I guess I should upgrade...thanks for checking into it. It totally baffled me!
 
Status
Not open for further replies.
Back
Top