• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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.

[Archive] Script help thread

Status
Not open for further replies.
You've used $ah twice.... And you forgot boxset

Spoiler:

This still does not work. It compiles, but Prof Oak doesn't say anything.
 
This still does not work. It compiles, but Prof Oak doesn't say anything.
try this:
Spoiler:

mistakes I found: you forgot to put a space after the equal sign of the message $1.
I also changed the way the other messages were set.

and my question is still there: How is the special 0x136 (earthquake in FR/LG) used inside a script?
 
#org $start
checkflag 0x82F
if b_true goto $done
setflag 0x82F
applymovement 0x1 $come
pausemove 0
playsound 0x12E
nop
message $1
$1 1 =Good morning honey are you okey? \nHope you Remember its \v\h06 \pBirthday today!
boxset 6
message $2
$2 1 =He's getting his first pokemon today \nand is going to become a \pPokemon Trainer.
boxset 6
message $3
$3 1 =You better go over to his house \nto say goodbye before he leaves.
boxset 6
message $4
$4 1 =Here take this parcel it's \v\h06 \npresent.
boxset 6
giveitem 0x15D 0x1
message $5
$5 1 =On the weather forecast it said \nthere's going to be a thunderstorm \pso get back quickly.
boxset 6
message $6
$6 1 =But before you go \nput on your new shoes.
boxset 6
fadesound 0x12c
nop
fanfare 0x13E
message $7
$7 1 =\v\h01 received Running shoes!
boxset 6
waitfanfaire
applymovement 0x1 $going
pausemove 0
release
end

#org $done
release
end
#org $come
#raw 0x13
#raw 0x13
#raw 0x01
#raw 0xFE

#org $come
$come 1 ; #binary 0x13 0x13 0x01 0xFE
#org $going
#raw 0x12
#raw 0x12
#raw 0xFE
#org $going
$going 1 ; #binary 0x12 0x12 0xFE

It work but the text is not how it should be
 
Code:
#org $start
checkflag 0x82F
if b_true goto $done
setflag 0x82F
applymovement 0x1 $come
pausemove 0
playsound 0x12E
nop
message $1
$1 1 = Good morning honey, are you okay?\nHope you remember its \v\h06's\pbirthday today!
boxset 6
message $2
$2 1 = He's getting his first pokemon today\nand is going to become a \pPokemon Trainer.
boxset 6
message $3
$3 1 = You better go over to his house\nto say goodbye before he leaves.
boxset 6
message $4
$4 1 = Here take this parcel it's \v\h06's\npresent. 
boxset 6
giveitem 0x15D 0x1
message $5
$5 1 = On the weather forecast  it said \nthere's going to be a thunderstorm \pso get back quickly.
boxset 6
message $6
$6 1 = But before you go \nput on your new shoes.
boxset 6
fadesound 0x12c
nop
fanfare 0x13E
message $7
$7 1 = \v\h01 received Running Shoes!
boxset 6
waitfanfaire
applymovement 0x1 $going
pausemove 0
release
end
 
#org $done
release 
end
#org $come
#raw 0x13
#raw 0x13
#raw 0x01
#raw 0xFE
 
#org $come
$come 1 ; #binary 0x13 0x13 0x01 0xFE
#org $going
#raw 0x12
#raw 0x12
#raw 0xFE
#org $going
$going 1 ; #binary 0x12 0x12 0xFE

try it like this ^^

I also fixed some little spelling mistakes ;)
 
Okay… so my goal was to open up PokeScript (which I downloaded from this forum somewhere)…
open my rom, and look at the code. I chronicled my failing in 6 screen-grabs. Someone please tell me what I'm doing wrong, how to fix it, and remind me that I'm an idiot.

Step 1:
[PokeCommunity.com] [Archive] Script help thread


Step 2:
[PokeCommunity.com] [Archive] Script help thread


Step 3:
[PokeCommunity.com] [Archive] Script help thread


Step 4:
[PokeCommunity.com] [Archive] Script help thread


Step 5:
[PokeCommunity.com] [Archive] Script help thread


Step 6:
[PokeCommunity.com] [Archive] Script help thread
 
Script Trouble

In pokemon fire red there is a person that will teach your pokemon 3 moves: Blast Burn, Frenzy Plant and Hydro Cannon. I'm trying to put that script into Emerald. Can somone help me.

when i try to compile thi script:

'-----------------------
#org 0x800000
special 0x187
compare LASTRESULT 0x2
if 0x1 jump 0x800001
special 0x188
lock
faceplayer
checkflag 0x2E1
if 0x1 jump 0x800002
checkflag 0x2
if 0x1 jump 0x800003
#raw 0x7E
nop
msgbox 0x800004 '"I perfected the ulti..."
callstd 0x4
special2 LASTRESULT 0x1A3
compare LASTRESULT 0x0
if 0x1 jump 0x800005
copyvar 0x8009 0x8005
compare 0x800C 0x2
if 0x1 call 0x800006
compare 0x800C 0x1
if 0x1 call 0x800007
compare 0x800C 0x4
if 0x1 call 0x800008
compare 0x800C 0x3
if 0x1 call 0x800009
msgbox 0x80000A '"Oh! This is the one!..."
callstd 0x5
compare LASTRESULT 0x0
if 0x1 jump 0x80000B
call 0x80000C
compare LASTRESULT 0x0
if 0x1 jump 0x80000B
msgbox 0x80000D '"You will allow it?\p..."
callstd 0x4
#raw 0x68
fadescreen 0x1
goto 0x80000E
fadescreen 0x0
goto 0x80000F
end

'-----------------------
#org 0x800001
release
end

'-----------------------
#org 0x800002
msgbox 0x800010 '"After I passed on my..."
callstd 0x4
release
end

'-----------------------
#org 0x800003
msgbox 0x800011 '"I implore you to mak..."
callstd 0x4
release
end

'-----------------------
#org 0x800005
msgbox 0x800012 '"[.]No[.]\nI was just..."
callstd 0x4
release
end

'-----------------------
#org 0x800006
applymovement 0x1 0x800013
pause 0x0
return

'-----------------------
#org 0x800007
applymovement 0x1 0x800014
pause 0x0
return

'-----------------------
#org 0x800008
applymovement 0x1 0x800015
pause 0x0
return

'-----------------------
#org 0x800009
applymovement 0x1 0x800016
pause 0x0
return

'-----------------------
#org 0x80000B
msgbox 0x800017 '"Gaah! You reject it?..."
callstd 0x4
release
end

'-----------------------
#org 0x800018
#raw 0xC7
return

'-----------------------
#org 0x80000B
msgbox 0x800017 '"Gaah! You reject it?..."
callstd 0x4
release
end

'-----------------------
#org 0x800019
call 0x80001A
compare LASTRESULT 0x0
if 0x1 jump 0x80000B
goto 0x80000F
end

'-----------------------
#org 0x80001B
copyvar 0x8005 0x8009
special2 LASTRESULT 0x1A4
compare LASTRESULT 0x1
if 0x1 jump 0x80001C
msgbox 0x80001D '"Gasp, gasp, gasp[.]\..."
callstd 0x4
setflag 0x2
release
end

'-----------------------
#org 0x80001E
special 0x18D
#raw 0x27
lock
faceplayer
return

'-----------------------
#org 0x80000B
msgbox 0x800017 '"Gaah! You reject it?..."
callstd 0x4
release
end

'-----------------------
#org 0x80001C
msgbox 0x80001D '"Gasp, gasp, gasp[.]\..."
callstd 0x4
setflag 0x2E1
release
end


'---------
' Strings
'---------
#org 0x80001E
= I perfected the ultimate move of\nits type[.]\pBut will no one take it for\nfuture use?\p[.]Hm? Hmmm!\pY-you[.]\nTh-that \v\h02[.]
#org 0x80001F
= Oh! This is the one!\nThis is the POKéMON!\pThis \v\h02 is worthy of\nlearning my ultimate move!\pWill you allow it?\pWill you allow your \v\h02 to\nlearn my \v\h03?
#org 0x800020
= You will allow it?\pThen, let me confer my ultimate\n\v\h03 on your \v\h02.\pGgggrah-awooo!
#org 0x800021
= After I passed on my knowledge to\nyou, I felt so much relief.\pIn fact, I feel rejuvenated,\nas if I were younger again!
#org 0x800022
= I implore you to make the best\nuse of that move and gain power!
#org 0x800023
= [.]No[.]\nI was just mistaken.
#org 0x800024
= Gaah! You reject it?\nNo, I won't be dissuaded!
#org 0x800024
= Gaah! You reject it?\nNo, I won't be dissuaded!
#org 0x800025
= Gasp, gasp, gasp[.]\pI didn't think I could teach that\nmove while I still lived[.]
#org 0x800024
= Gaah! You reject it?\nNo, I won't be dissuaded!
#org 0x800026
= Gasp, gasp, gasp[.]\pI have no regrets now.\nI've passed on everything I know.\pNow I can live out my life knowing\nmy work is done.

'-----------
' Movements
'-----------
#raw 52 'mov52
#raw FE 'Exit

#raw 53 'mov53
#raw FE 'Exit

#raw 54 'Hide
#raw FE 'Exit

#raw 55 'Show
#raw FE 'Exit

i get the following message:

Run-time error '457
This key is already associated with an element of this collection.

What does this mean and how do I fix it. I want to put this script into Emerald.
If you can and would like to fix this script please email it to [email protected]
 
As well as getting the offsets for Birch in Ruby, I would also like to know how to remove the whole mom segment in the beginning... I made it so you start in the house, but you are forced back inside as soon as you step out and have to set your clock and such... I dont want that.
 
Hey everybody, I'm new with Scripting. Can anyone tell me whats wrong with this???
Code:
#ORG $ShowText
Lock
Faceplayer
message $Mom
$Mom 1 = Hey, how are you?\n Well look out, theres bad people\1on the news. Go get your PKMN.
boxset 6
release
end
Thanks in advance!
 
Yesterday I finally slove the problem about language.It makes the pokescript woks normally...But today I write a script ,it go to a red screen...

Could any one see it:
Code:
#org $goldroad
lock
faceplayer
checkflag 0x201
if b_true goto $golddone
message $1
$1 1=There are a lot of things inside.\nDo you want to pick them up ?
boxset 5
compare LASTRESULT 0x1
if b_false goto $done
give item 0x1 5
#raw 0x90 0x10 0x27 0x00 0x00 0x00
givepokemon 0x151 0x30 0x200
seflag 0x820
seflag 0x821
seflag 0x822
seflag 0x823
seflag 0x824
seflag 0x825
seflag 0x826
seflag 0x827
seflag 0x828
seflag 0x829
seflag 0x82f
seflag 0x201
goto $golddone

#org $golddone
message $2
$2 1= It is already empty...
boxset 6
release
end
#org $done
message $3
$3 1= Things are still inside...
boxset 6
release
end
 
Hey everybody, I'm new with Scripting. Can anyone tell me whats wrong with this???
Code:
#ORG $ShowText
Lock
Faceplayer
message $Mom
$Mom 1 = Hey, how are you?\n Well look out, theres bad people\1on the news. Go get your PKMN.
boxset 6
release
end
Thanks in advance!

You are not allowed to put a space after a \p, \n or \l

so it has to be like this:
Code:
#ORG $ShowText
Lock
Faceplayer
message $Mom
$Mom 1 = Hey, how are you?[B]\nW[/B]ell look out, theres bad people[B]\lo[/B]n the news. Go get your PKMN.
boxset 6
release
end

okay now to the second one xD:
Yesterday I finally slove the problem about language.It makes the pokescript woks normally...But today I write a script ,it go to a red screen...

Could any one see it:
Code:
#org $goldroad
lock
faceplayer
checkflag 0x201
if b_true goto $golddone
message $1
$1 [B]1 = T[/B]here are a lot of things inside.\nDo you want to pick them up ?
boxset 5
compare LASTRESULT 0x1
if b_false goto $done
giv[B]eit[/B]em 0x1 5
#raw 0x90 0x10 0x27 0x00 0x00 0x00
givepokemon 151 30 200
seflag 0x820
seflag 0x821
seflag 0x822
seflag 0x823
seflag 0x824
seflag 0x825
seflag 0x826
seflag 0x827
seflag 0x828
seflag 0x829
seflag 0x82f
seflag 0x201
message $4
$4 1 = It is already empty...
boxset 6
release
end


#org $golddone
message $2
$2 [B]1 = I[/B]t is already empty...
boxset 6
release
end

#org $done
message $3
$3 [B]1 = T[/B]hings are still inside...
boxset 6
release
end

take care of your spaces ^^

and sometimes a goto after a script doesn't work correctly (at least for me) so I wrote the message as message $4 into the first script too.

It should work now ;)
 
Last edited:
Thanks ill see if it works

You are not allowed to put a space after a \p, \n or \l

so it has to be like this:
Code:
#ORG $ShowText
Lock
Faceplayer
message $Mom
$Mom 1 = Hey, how are you?[B]\[/B]nWell look out, theres bad people[B]\[/B]1on the news. Go get your PKMN.
boxset 6
release
end

Hey, My game still freezes. Can some one help please?
 
Last edited:
#ORG $ShowText
Lock
Faceplayer
message $Mom
boxset 6
release
end

#org $mom
$Mom 1 = Hey, how are you?\nWell look out, theres bad people\lon the news. Go get your PKMN.
That should work. Put the offsets in the end.
 
okay now to the second one xD:


take care of your spaces ^^

and sometimes a goto after a script doesn't work correctly (at least for me) so I wrote the message as message $4 into the first script too.

It should work now ;)
Oh,thank you for help ,but the game still go to a red screen
 
liuyanghejerry-
I redid your script.

#org $goldroad
lock
faceplayer
checkflag 0x201
if b_true goto $golddone
message $1
boxset 5
compare LASTRESULT 0x1
if b_true goto $give
give item 0x1 5
release
end

#org $give
givepokemon 151 30 200
fanfare 0x13E
message $3
boxset 4
wait fanfare
#raw 0x68
setflag 0x201
message $4
boxset 5
compare LASTRESULT 0x1
if b_true gosub $name
message $5
boxset 6
release
end

#org $name
call 0x1A74EB
return

#org $golddone
message $2
release
end

#org $1
$1 1 = There are a lot of things inside.\nDo you want to pick them up ?

#org $2
$2 1 = It is already empty...

#org $3
$3 1 = Your recieved Mew!!

#org $4
$4 1 = Rename Mew?

#org $5
$5 1 = Goodbye!
I also put the rename thing. If you don't want it, take it out.
 
Can anyone help me, this script is supposed to stop me from leaving my house if I dont have a Pokemon.
Code:
#org $start
checkflag 0x828
if b_true goto $done
applymovement 0x01 $mommove
message $1
boxset 6
setflag 0x828
end

#org $done
boxset 6
end

#org $1
$1 1 =Hey sweetie, be safe.

#org $mommove
$mommove 1 ;movements with 0xFE at the end
All she does is tells me,"hey sweetie be safe.
Shes supposed to stop me.
 
Can anyone help me, this script is supposed to stop me from leaving my house if I dont have a Pokemon.
Code:
#org $start
checkflag 0x828
if b_true goto $done
applymovement 0x01 $mommove
message $1
boxset 6
setflag 0x828
end

#org $done
boxset 6
end

#org $1
$1 1 =Hey sweetie, be safe.

#org $mommove
$mommove 1 ;movements with 0xFE at the end
All she does is tells me,"hey sweetie be safe.
Shes supposed to stop me.

LOL!

You're missing a check pokemon command.

:P
 
how do i make this script happen only once

#org $begin
checkflag 0x200
lock
faceplayer
message $lost
$lost 1 =i wonder where i am
boxset 6
setflag 0x200
release


i placed one of those green squares with the yellow S on one of the map of advance map
and put in the offset
and when i play the game and walk over where the script is and it says i wonder where i am
when i walk over i aginit says the same thing
how do i make this only happen once

PLIZ HELP!!

This should work.
Notice what were wrong with your script.
Code:
#org $begin
checkflag 0x200
[B][COLOR="Red"]if b_true goto $done[/COLOR][/B]
message $lost
$lost 1 =i wonder where i am
boxset 6
setflag 0x200
release
[COLOR="red"]end[/COLOR]

[COLOR="red"][B]#org $done
release
end[/B]
[/COLOR]
 
Okay, I have a script that I need to change the text for later, but right now I'm worried about the functionality of it.

It's not working right, You get the POKéMON, get to name it, and then it ends. The $done thing doesnt work, either... you can repeatedly do that.

Here's the code:
Code:
#org $GiveDex
lock
faceplayer
setflag 0x800
setflag 0x801
checkflag 0x203
if b_True gosub $Move1
checkflag 0x204
if b_True gosub $Move2
checkflag 0x205
if b_True gosub $Move3
checkflag 0x200
if B_true goto $done
message $Pokedex
$Pokedex 1 = I hope You like your new pokemon.\pWhile your on your journeys 

I have\la favour to ask you.\pProf OAK and I are trying to make an\lindex 

of everything pokemon.\pTake this pokedex with you and it\lwill log all the 

pokemon you see and catch.\pIt would greatly help our studies!
boxset 6
jingle
givepokemon 132 5 0
namepokemon
message $GotDex
$Gotdex 1 = You got the Pokedex!
setflag0x200
boxset 6
end

#org $Move1
applymovement 0xFF $Ball1Move
pausemove 0
return
#org $Move2
applymovement 0xFF $Ball2Move
pausemove 0
return
#org $Move3
applymovement 0xFF $Ball3Move
pausemove 0
return

#org $done
message $person2
boxset 6
release
end

#org $person2
$person2 = How's your POKéDEX?

#org $Ball3Move
#Binary 0x06
#org $Ball2Move
#Binary 0x06
#org $Ball1Move
#Binary 0x06 0x06 0x06 0x01 0xFE


Any suggestions?
 
how do i make this script happen only once

#org $begin
checkflag 0x200
lock
faceplayer
message $lost
$lost 1 =i wonder where i am
boxset 6
setflag 0x200
release


i placed one of those green squares with the yellow S on one of the map of advance map
and put in the offset
and when i play the game and walk over where the script is and it says i wonder where i am
when i walk over i aginit says the same thing
how do i make this only happen once

PLIZ HELP!!
 
Status
Not open for further replies.
Back
Top