• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.
i need some help with a script. the scripthas 2 battles in it. the problem is is that if i win the firstbattle then lose the second the first one doesnt happen again.

if anybody can help thanks in advance
link

poke-roy: why dont you just use the original script?
 
Can anyone check this it doesn't work properly it's a yes/no script with a pokemart script but when I choose yes or no it days the same...
Code:
#org $StartMarket
lock
faceplayer
if B_TRUE goto $yes
message $buy
$buy 1 =Do you want to buy anything?
boxset 5
if B_False goto $no
release
end

#org $yes
$yes 1 =Alright this is what I got.
pokemart $marketValues
message $nice
$nice 1 =Thanks!\nHave a nice day!

#org $no
lock
faceplayer
message $no1
$no1 1 =Alright see you next time!
boxset 6
release
end

#org $marketValues
#binary int 0x4 0xD 0x11 0x12 0xE 0x56 0x1B 0x22

and this one to please it just stops the games and then doesn't do anyrthing else and you can't move...
Code:
#org $begin
checkflag 0x342
if B_true goto $done
applymovement 0x1 $aha
pausemove 0
message $meowthtalk
$meowthtalk 1 =Hey it's the little brat again!\nYou wait there!\pI'm gonna call Jessy and James.\nYou won't survive!
boxset 6
applymovement 0x1 $jump
pausemove 0
applymovement 0xFF $jumpback
pausemove 0
applymovement 0x2 $jamesrun
pausemove 0
applymovement 0x2 $jamesrun3
pausemove 0
applymovement 0x3 $jessyrun
pausemove 0
applymovement 0x3 $jessyrun3
pausemove 0
message $trap
$trap 1 =HA!\nOur trap has worked!\pWe will fight you and take your pokémon!\nLet's battle!
boxset 6
trainerbattle 0 161 $rocketchall $rocketdefeat
$rocketchall 1 =We are Team Rocket!\nWe are unbeatable!
$rocketdefeat 1 =James...\nMeowth...\pYes Jessy?\n...\p...\nRuuuunn!!
boxset 6
applymovement 0x1 $meowthrun
pausemove 0
applymovement 0x3 $jessyrun2
pausemove 0
applymovement 0x2 $jamesrun2
pausemove 0
release
end

#org $aha
$aha 1 ; #binary 0x62 0xFE

#org $jump
$jump 1 ; #binary 0x16 0xFE

#org $jumpback
$jumpback 1 ; #binary 0x50 0xFE

#org $jamesrun
$jamesrun 1 ; #binary 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0xFE

#org $jamesrun3
$jamesrun3 1 ; #binary 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x09 0x04 0xFE

#org $jessyrun
$jessyrun 1 ; #binary 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0xFE

#org $jessyrun3
$jessyrun3 1 ; #binary 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0xFE

#org $meowthrun
$meowthrun 1 ; #binary 0x1E 0x1E 0x1E 0x1E 0x1F 0x1F 0x1E 0x1F 0x1E 0x1E 0x20 0x20 0x20 0x60 0xFE

#org $jessyrun2
$jessyrun2 1 ; #binary 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x60 0xFE

#org $jamesrun2
$jamesrun2 1 ; #binary 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x60 0xFE

#org $done
release
end
 
Last edited:
Can anyone check this it doesn't work properly it's a yes/no script with a pokemart script but when I choose yes or no it days the same...
Code:
#org $StartMarket
lock
faceplayer
if B_TRUE goto $yes
message $buy
$buy 1 =Do you want to buy anything?
boxset 5
if B_False goto $no
release
end

#org $yes
$yes 1 =Alright this is what I got.
pokemart $marketValues
message $nice
$nice 1 =Thanks!\nHave a nice day!

#org $no
lock
faceplayer
message $no1
$no1 1 =Alright see you next time!
boxset 6
release
end

#org $marketValues
#binary int 0x4 0xD 0x11 0x12 0xE 0x56 0x1B 0x22

Lots of mistakes.

#org $StartMarket
lock
faceplayer
message $buy
$buy 1 =Do you want to buy anything?
boxset 5
compare lastresult 1
if B_TRUE goto $yes
message $no
$no 1 =Alright see you next time!
boxset 6

release
end

#org $yes
message $yesmes
$yesmes
1 =Alright this is what I got.
boxset 6
pokemart $marketValues
message $nice
$nice 1 =Thanks!\nHave a nice day!
boxset 6
release
end


#org $marketValues
#binary int 0x4 0xD 0x11 0x12 0xE 0x56 0x1B 0x22
 
Lots of mistakes.

#org $StartMarket
lock
faceplayer
message $buy
$buy 1 =Do you want to buy anything?
boxset 5
compare lastresult 1
if B_TRUE goto $yes
message $no
$no 1 =Alright see you next time!
boxset 6

release
end

#org $yes
message $yesmes
$yesmes
1 =Alright this is what I got.
boxset 6
pokemart $marketValues
message $nice
$nice 1 =Thanks!\nHave a nice day!
boxset 6
release
end


#org $marketValues
#binary int 0x4 0xD 0x11 0x12 0xE 0x56 0x1B 0x22

Thanks I'm not to good at yes/no scripts..XD
but now it goes till yes but then came another problem it doesn't open any pokemart window so you can choose a item or something..
please help
 
I just tried this script for FireRed and 2 things happened. When you click yes for the first Question, It acts as no and when you click no, it acts as yes but the screen goes red. Anyone know why?

Code:
#org $begin
checkflag 0x200
if B_true goto $done
message $it
boxset 6
release
end

#org $it
$it 1 = It's a pokeball.

#org $done
message $do
boxset 5
compare LASTRESULT 1
if B_true goto $end
givepoke 280 5 0
setflag 0x828
setflag 0x203
message $gotpoke
boxset 6
message $namepoke
boxset 5
compare LASTRESULT 1
if B_true goto $continue
goto $namepoked

#org $namepoked
namepokemon
goto $continue

#org $end
message $putback
boxset 6
release
end

#org $putback
$putback 1 = You put the pokeball back.

#org $do
$do 1 = Do you want to take\nthe Chick Pokemon Torchic?

#org $gotpoke
$gotpoke 1 = You obtained a Torchic!

#org $namepoke
$namepoke 1 = Would you like to nickname Torchic?

#org $continue
applymovement 8 $mw1
pausemove 0
setflag 0x204
message $finally
boxset 6
clearflag 0x206
applymovement 1 $mw2
pausemove 0
message $mine
boxset 6
setflag 0x205
message $who
boxset 6
message $thanks
boxset 6
applymovement 1 $mw3
pausemove 0
setflag 0x206
message $wait
boxset 6
applymovement 8 $mw4
applymovement 0xFF $mw4
pausemove 0
message $now
boxset 6
applymovement 4 $mw5
pausemove 0
setflag 0x207
applymovement 4 $mw6
pausemove 0
setflag 0x829
message $pokedex
boxset 6
release
end

#org $mw1
$mw1 1 ; #binary 0x13 0x13 0x10 0x10 0x13 0x13 0x11 0x11 0xFE

#org $finally
$finally 1 = Finally I get my pokemon!\nI'll take this one,\pIt has to be stronger.

#org $mw2
$mw2 1 ; #binary 0x11 0x11 0x11 0x11 0x11 0x13 0x13 0x13 0x11 0xFE

#org $mine
$mine 1 = ????: Ok, then this one is mine!

#org $who
$who 1 = PROF. MAGNOLIA: You must\nbe the other trainer\pthat I was expecting.\nYou're finally here.\pYou can have that pokemon,\nfor it is the only one left.

#org $thanks
$thanks 1 = ????: Thanks, now I gotta go!  Bye!

#org $mw3
$mw3 1 ; #binary 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0x10 0xFE

#org $wait
$wait 1 = PROF. MAGNOLIA: Wait!\n..Oh nevermind.\pYou two, come here.

#org $mw4
$mw4 1 ; #binary 0x12 0x12 0x11 0x11 0xFE

#org $now
$now 1 = Now, there's one thing that I\nhave to give the two of you.

#org $mw5
$mw5 1 ; #binary 0x12 0x11 0xFE

#org $mw6
$mw6 1 ; #binary 0x10 0x13 0x4A 0xFE

#org $pokedex
$pokedex 1 = You got the Pokedex!
 
Lots of mistakes.

#org $StartMarket
lock
faceplayer
message $buy
$buy 1 =Do you want to buy anything?
boxset 5
compare lastresult 1
if B_TRUE goto $yes
message $no
$no 1 =Alright see you next time!
boxset 6
release
end

#org $yes
message $yesmes
$yesmes 1 =Alright this is what I got.
boxset 6
pokemart $marketValues
message $nice
$nice 1 =Thanks!\nHave a nice day!
boxset 6
release
end

#org $marketValues
#binary int 0x4 0xD 0x11 0x12 0xE 0x56 0x1B 0x22 0x0

You missed one problem EV. THe end of the Pokemart line. The Pokemart values need to end with 0x0.
 
Code:
#org $CantGo
message $CantGo
$WCantGo 1 = You need a Pokemon\nto go in there!\nHere, take this Absol!
boxset 6
givepokemon 359 5 0
jingle
message $GotAbsol
$GotChick 1 = You Recieved a Absol
boxset 6
message $NameAbsol
$NameChick 1 = Would You like to give Absol a name?
boxset 5
compare LASTRESULT 1
if b_False goto $GiveDex
Namepokemon
setflag 0x203
goto $GiveDex

#org $GiveDex
setflag 0x800
setflag 0x801
message $Pokedex
$Pokedex 1 = I hope you like it!
boxset 6
jingle
message $GotDex
$Gotdex 1 = You got the Pokedex!
boxset 6
end
Is it allright? All it need some changes?
 
Code:
#org $CantGo
message $CantGo
[B]$CantGo [/B]1 = You need a Pokemon\nto go in there!\[B]l[/B]Here, take this Absol!
boxset 6
givepokemon 359 5 0
jingle
message $GotAbsol
[B]$GotAbsol[b] 1 = You Recieved a[b]n[/b] Absol
boxset 6
message $NameAbsol
[b]$NameAbsol[/b] 1 = Would You like to give Absol a name?
boxset 5
compare LASTRESULT 1
if b_False goto $GiveDex
Namepokemon
setflag 0x203
goto $GiveDex

#org $GiveDex
setflag 0x800
setflag 0x801
message $Pokedex
$Pokedex 1 = I hope you like it!
boxset 6
jingle
message $GotDex
$Gotdex 1 = You got the Pokedex!
boxset 6
end
Is it allright? All it need some changes?

I changed some things. They're in bold.

Okay, it's been a while since I posted a problem here. I'm not sure if this should be in simple questions or here, since it's level scripts, I posted it here.
I got the idea from Crashlink(seen on previous page), how he wants to make the weather change from dark to light, with scripting. That gave me an idea of trying to involve random weather. So I started thinking of ways to do it. I didn't want to do it with lots of little scripts lying around. I wanted to alter the level scripts.
Here's what I did. Sorry, if it's a little confusing.
I went to the level script of pallet town and it led me to 0x16545A.
So I opened it in a hex editor and it led me to this.
03 65 54 16 08 02 CE 54 16 08.
Working with the second pointer I looked at 1654CE and changed...
50 40 02 00 D8 54 16 08
to...
98 40 01 00 0D 02 80 08
which was where my script was.
If it's important this is the script it pointed to.
Spoiler:
So I wrote another script that would setvar 0x4098 0x1.
In hope that it would activate the level script.
When I went into the game and spoke to the person the set the variable, the game froze.
I went to back to the hex editor and changed
02 CE 54 16 08.
to this
00 CE 54 16 08.
Now the game no longer freezes but the level script won't activate.
So I'm wondering, does anybody know the problem?
Would it work if I changed the first byte to something else? What other bytes could I use?
If you think you know what the problem is, I'd love to know.
I know that the problem isn't the script that the level script points to, I tested it in a normal manner and it worked fine.
 
Last edited:
OK, i really suck at scripting so if someone could, could they explain how to use it for noobs and where do i get script ed?? if someone could tell me then thank you sooooooooooo much.(they'll become my new bestfriend)
could someone please help me with this please i really need some help!!!!
 
Guys please dont laugh at me because I am new. Well my prob is I typed my first script and I gave the offset as 0x800000 and then when I tried to make the second I gave the offset as 0x800100 and then I tried to play the game but it keeps getting hanged. And sometimes the message what I have given to the first guy gets mixed up with the message of the 2nd guy. The message becomes something like 'can I get your Beware of pokemon'. So please help me.
 
Could you show us your script?
The only other things I can suggest is you compiled wrong or did two scripts in one?
I'm sought of confused by whats going on, thats never happened before...

thethethethe:

You'll have to ask Teh Baro, not many of us know many level scripts.
Sometimes the simplest answer is a typo, I really don't know.
Try looking through the whole thing over.
 
thethethethe:

You'll have to ask Teh Baro, not many of us know many level scripts.
Sometimes the simplest answer is a typo, I really don't know.
Try looking through the whole thing over.

I already searched the log, to look for a typo, but yeah, it doesn't matter.
I probably should have asked Teh Baro from the start but it's a bit late for that now, I just figured it out on my own. Thanks anyway.
 
I just tried this script for FireRed and 2 things happened. When you click yes for the first Question, It acts as no and when you click no, it acts as yes but the screen goes red. Anyone know why?

Code:
#org $begin
checkflag 0x200
if B_true goto $done
message $it
boxset 6
release
end

#org $it
$it 1 = It's a pokeball.

#org $done
message $do
boxset 5
compare LASTRESULT 1
if B_true goto $end
givepoke 280 5 0
setflag 0x828
setflag 0x203
message $gotpoke
boxset 6
message $namepoke
boxset 5
compare LASTRESULT 1
if B_true goto $continue
goto $namepoked

#org $namepoked
namepokemon
goto $continue

#org $end
message $putback
boxset 6
release
end

#org $putback
$putback 1 = You put the pokeball back.

#org $do
$do 1 = Do you want to take\nthe Chick Pokemon Torchic?

#org $gotpoke
$gotpoke 1 = You obtained a Torchic!

#org $namepoke
$namepoke 1 = Would you like to nickname Torchic?

#org $continue
applymovement 8 $mw1
pausemove 0
setflag 0x204
message $finally
boxset 6
clearflag 0x206
applymovement 1 $mw2
pausemove 0
message $mine
boxset 6
setflag 0x205
message $who
boxset 6
message $thanks
boxset 6
applymovement 1 $mw3
pausemove 0
setflag 0x206
message $wait
boxset 6
applymovement 8 $mw4
applymovement 0xFF $mw4
pausemove 0
message $now
boxset 6
applymovement 4 $mw5
pausemove 0
setflag 0x207
applymovement 4 $mw6
pausemove 0
setflag 0x829
message $pokedex
boxset 6
release
end

#org $mw1
$mw1 1 ; #binary 0x13 0x13 0x10 0x10 0x13 0x13 0x11 0x11 0xFE

#org $finally
$finally 1 = Finally I get my pokemon!\nI'll take this one,\pIt has to be stronger.

#org $mw2
$mw2 1 ; #binary 0x11 0x11 0x11 0x11 0x11 0x13 0x13 0x13 0x11 0xFE

#org $mine
$mine 1 = ????: Ok, then this one is mine!

#org $who
$who 1 = PROF. MAGNOLIA: You must\nbe the other trainer\pthat I was expecting.\nYou're finally here.\pYou can have that pokemon,\nfor it is the only one left.

#org $thanks
$thanks 1 = ????: Thanks, now I gotta go!  Bye!

#org $mw3
$mw3 1 ; #binary 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0x10 0xFE

#org $wait
$wait 1 = PROF. MAGNOLIA: Wait!\n..Oh nevermind.\pYou two, come here.

#org $mw4
$mw4 1 ; #binary 0x12 0x12 0x11 0x11 0xFE

#org $now
$now 1 = Now, there's one thing that I\nhave to give the two of you.

#org $mw5
$mw5 1 ; #binary 0x12 0x11 0xFE

#org $mw6
$mw6 1 ; #binary 0x10 0x13 0x4A 0xFE

#org $pokedex
$pokedex 1 = You got the Pokedex!

Did anyone notice my post? I can't understand what's wrong and why it does this.
 
#org $begin
checkflag 0x200
if B_true goto $done
message $it
boxset 6
release
end

#org $it
$it 1 = It's a pokeball.

#org $done
message $do
boxset 5
compare LASTRESULT B_TRUE
if B_FALSE goto $end
givepokemon 280 5 0
setflag 0x828
setflag 0x203
message $gotpoke
boxset 6
message $namepoke
boxset 5
compare LASTRESULT B_TRUE
if B_FALSE goto $continue
goto $namepoked
release
end


#org $namepoked
namepokemon
goto $continue
release
end


#org $end
message $putback
boxset 6
release
end

#org $putback
$putback 1 = You put the pokeball back.

#org $do
$do 1 = Do you want to take\nthe Chick Pokemon Torchic?

#org $gotpoke
$gotpoke 1 = You obtained a Torchic!

#org $namepoke
$namepoke 1 = Would you like to nickname Torchic?

#org $continue
applymovement 8 $mw1
pausemove 0
setflag 0x204
message $finally
boxset 6
clearflag 0x206
applymovement 1 $mw2
pausemove 0
message $mine
boxset 6
setflag 0x205
message $who
boxset 6
message $thanks
boxset 6
applymovement 1 $mw3
pausemove 0
setflag 0x206
message $wait
boxset 6
applymovement 8 $mw4
applymovement 0xFF $mw4
pausemove 0
message $now
boxset 6
applymovement 4 $mw5
pausemove 0
setflag 0x207
applymovement 4 $mw6
pausemove 0
setflag 0x829
message $pokedex
boxset 6
release
end

#org $mw1
$mw1 1 ; #binary 0x13 0x13 0x10 0x10 0x13 0x13 0x11 0x11 0xFE

#org $finally
$finally 1 = Finally I get my pokemon!\nI'll take this one,\pIt has to be stronger.

#org $mw2
$mw2 1 ; #binary 0x11 0x11 0x11 0x11 0x11 0x13 0x13 0x13 0x11 0xFE

#org $mine
$mine 1 = ????: Ok, then this one is mine!

#org $who
$who 1 = PROF. MAGNOLIA: You must\nbe the other trainer\pthat I was expecting.\nYou're finally here.\pYou can have that pokemon,\nfor it is the only one left.

#org $thanks
$thanks 1 = ????: Thanks, now I gotta go! Bye!

#org $mw3
$mw3 1 ; #binary 0x10 0x10 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0x10 0xFE

#org $wait
$wait 1 = PROF. MAGNOLIA: Wait!\n..Oh nevermind.\pYou two, come here.

#org $mw4
$mw4 1 ; #binary 0x12 0x12 0x11 0x11 0xFE

#org $now
$now 1 = Now, there's one thing that I\nhave to give the two of you.

#org $mw5
$mw5 1 ; #binary 0x12 0x11 0xFE

#org $mw6
$mw6 1 ; #binary 0x10 0x13 0x4A 0xFE

#org $pokedex
$pokedex 1 = You got the Pokedex!



~*Pikafan*~:try that. it should work but i havent tested it

hope it helps
link
 
Well, that worked...Sorta. It works like that, but first of all, the pokeball doesn't disappear, even though I put Setflag and the number of the flag.

Now I'll list all of the errors in the script and I don't know how to fix them.

-The pokeball doesn't disappear
-If you nickname it, the script won't continue
-The Rival goes 1 step too far Fixed
-The person with the flag 206 in their ID doesn't appear, even after I cleared the flag.
-None of the pokeballs disappear
-You and your rival move one step too far Fixed
-The pokedexes don't disappear
-The script keeps happening even after it ends. You can get infinate Pokemon because of that.
 
Hey Crashink here is the script-
This is the first script which I typed in a notepad and then loaded it into script Ed and compiled it etc..
#org 0x800000
lock
faceplayer
message 0x800100
boxset 0x02
end
#org 0x800100
= Hello.\n ha!\p Aren't you \v\h01!\p Wow its a great plessure\n to meet you.\p Could I get your autograph\n \v\h01!\p Well, we have many things in common\n like.....\p our face meet.\n The other thing is \p Even I am a new trainer.\p Well by the way\n I am mathew and \p This is my best friend\n Pikachu\p Well I call it sparkie.
release
end

And here is the second script which I typed in another notepad and loaded it into another script Ed and then compiled it and here it is-
#org 0x800101
message 0x800200
boxset 0x02
end
#org 0x800200
= Beware of pokemon.

Well the problem is the guy instead of could I get your autograph he says Could I get your beware of pokemon.
 
Well, that worked...Sorta. It works like that, but first of all, the pokeball doesn't disappear, even though I put Setflag and the number of the flag.

Now I'll list all of the errors in the script and I don't know how to fix them.

-The pokeball doesn't disappear
-If you nickname it, the script won't continue
-The Rival goes 1 step too far Fixed
-The person with the flag 206 in their ID doesn't appear, even after I cleared the flag.
-None of the pokeballs disappear
-You and your rival move one step too far Fixed
-The pokedexes don't disappear
-The script keeps happening even after it ends. You can get infinate Pokemon because of that.


the thing with the pokeballs and dexes to dissapear is you need to put this in the script where you want that sprite to dissapear:

setflag 0x(people id)
#raw 0x53
#raw 0x(people no.)
#raw 0x00

i think the script keeps going because the pokeballs are still there so if there not then it should work.

hope it helpped
link
 
It works now, but there are 2 more problems.

1. You still can't nickname your pokemon. Actually you can but the script ends.

2. the clearflag doesn't work.
 
Status
Not open for further replies.
Back
Top