• 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 Trading Card Game 2 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.
What trouble are you having with it?

Well, add 0x0 0x0 givepokemon section.
You should add a fanfare and a goto for nicknaming.

I copied this section from thethethethe's tutorial and changed it to be XSE-compatible.
If you want, I'll write a complete script.

Code:
fanfare 0x13E
message @pointer (You got Totodile!)
boxset 4
waitfanfare
#raw 0x68
setflag 0x828
message @nickname (Would you like to give it a nickname)
boxset 5
compare LASTRESULT 0x1
if b_true gosub @name
message @care (Take care of Totodile!)
boxset 6

#org @name
call 0x1A74EB
return
 
Ok, it works (for the most part) now, but afterwards, I don't have an Eevee.-


Code:
 #Dynamic 0x26D429

#ORG @begin
Lock
FacePlayer
checkflag 0x200
If B_TRUE goto @done
message @starter
boxset 6
message @Ok
BoxSet 5
compare LASTRESULT 1
If B_false goto @comeon
message @good
BoxSet 6
#define givepokemon 133 5 0 0x0 0x0 0x0
setflag 0x200
setflag 0x828
message @gotit
boxset 6
message @namepok
boxset 5
compare LASTRESULT 1
If B_false goto @done
message @done
Release
End

message @comeon
BoxSet 0x6
goto @Ok

message @done
BoxSet 6
Release
End

#ORG @starter
= Prof. Maple: Ah my dear boy, I've\nbeen looking for \pyou. I have a favor to ask of you.\nI want you to have a pokemon,\pand make a complete list of\nPokemon for me using a poke dex.\pI will give you a\nPokemon for a partner.

#ORG @Ok
= How about it?

#ORG @good
= Wonderful!

#ORG @comeon
= Oh?\p Don't you want to follow in your\nfather's footsteps?

#ORG @done
= Go out and make us all proud

#ORG @gotit
=You received the Eevee!

#ORG @namepok
= Would you like to give a name to\n your new Eevee?
 
Hah!
I did the same thing!
Well, you don't have the nicknaming thing...and stuff...let's see....

If you want the Eevee, you have to put it's dex number into hex. I had to learn that the hard way...xD Anyway, XSE has a hex/decimal calculator. Type a number into it. Click on Hex and it will convert it. :)

You need #org before the parts you go to after checkflag and lastresult.

Hmmmm...
You don't need setflag 200, just use 828....

Also, add this part after the give pokemon...

Code:
fanfare 0x13E (The got a Pokemon music)
message @gotit (points to You got the Eevee!)
boxset 4
waitfanfare
#raw 0x68
setflag 0x828

Then, make the LASTRESULT "if B_true" gosub @name

And add this after the script:

Code:
#org @name
call 0x1A74EB
return
 
Great.
I added it, repointed it, but it ends after the trainer battle...

I have a question, if you use flags to hide sprites, are those flags set forever? (If you want the guy to stay hidden forever, that is)

Hmm...I shouldn't trust FSF anymore... -opens Cygnus Hex Editor-
Sorry didn't see that you had another question.
To continue after a trainer battle you need:
Code:
trainerbattle 0x1 0x[trainer] 0x0 ...

How can I change font text in Ruby?
You have to change it in TLP or TileMolestor. Try PMing Diggeh I think he knows the offsets.

(As the title cleary states). I wanted to make a script where somebody gives you a totodile. Tell me what's wrong.

#Dynamic 0x3B4EB4

#org @start
lock
faceplayer
checkflag 0x201
if b_true goto @done
message @1
boxset 5
compare LASTRESULT 0x1
if b_true goto @take
message @2
boxset 6
release
end

#org @done
message @3
boxset 6
release
end

#org @take
givepokemon 0x4 0x5 0x0
message @3
boxset 6
setflag 0x201
release
end

#org @1
= Hello \v\h01!\nI'd like you to do something for me.\pWill you do it?

#org @2
= That's okay.\pMaybe I can find someone\nelse to do it.

#org @3
= Sorry.\nThat was my last pokemon!
Not sure if dark Lakitu answered this but I just noticed that you need 0x0 0x0 0x0 after the givepokemon.

Ok, it works (for the most part) now, but afterwards, I don't have an Eevee.-


Code:
 #Dynamic 0x26D429

#ORG @begin
Lock
FacePlayer
checkflag 0x200
If B_TRUE goto @done
message @starter
boxset 6
message @Ok
BoxSet 5
compare LASTRESULT 1
If B_false goto @comeon
message @good
BoxSet 6
[B]#define[/B] givepokemon 133 5 0 0x0 0x0 0x0
setflag 0x200
setflag 0x828
message @gotit
boxset 6
message @namepok
boxset 5
compare LASTRESULT 1
If B_false goto @done
message @done
Release
End

message @comeon
BoxSet 0x6
goto @Ok

message @done
BoxSet 6
Release
End

#ORG @starter
= Prof. Maple: Ah my dear boy, I've\nbeen looking for \pyou. I have a favor to ask of you.\nI want you to have a pokemon,\pand make a complete list of\nPokemon for me using a poke dex.\pI will give you a\nPokemon for a partner.

#ORG @Ok
= How about it?

#ORG @good
= Wonderful!

#ORG @comeon
= Oh?\p Don't you want to follow in your\nfather's footsteps?

#ORG @done
= Go out and make us all proud

#ORG @gotit
=You received the Eevee!

#ORG @namepok
= Would you like to give a name to\n your new Eevee?
What is that define for? You need to delete it.
 
Dark Latiku, I took your advice. but it still won't compile. What did I do wrong this time?

#dynamic 0x3B4EEF

#org @start
lock
faceplayer
checkflag 0x828
if b_true goto @done
message @1
boxset 5
compare LASTRESULT 0x1
if b_true goto @take
message @2
boxset 6
release
end
#org @done
message @3
boxset 6
release
end
#org @take
givepokemon 0x9D 0x0 0x0
fanfare 0x13E
message @pointer
boxset 4
waitfanfare
#raw 0x68
setflag 0x828
message @nickname
boxset 5
compare LASTRESULT 0x1
if b_true gosub @name
message @care
boxset 6
end

#org @1
= I can't take care of\nthis rowdy TOTODILE.\pWould you like it?

#org @2
= Thank you so much!

#org @pointer
= You got a Totodile!

#org @name
call 0x1A74EB
return

#org @care
= Take good care of him!
 
Hi guys this is my first post so please try to help me
i got this script for pokescript straight from Irish Witch's tutorial


#org $StartChik
checkflag 0x800
if B_True goto $NoBall
message $Chick
$Chick 1 = Chikorita!\lThe Fire Bird.\pTake the Chikorita?
boxset 5
compare LASTRESULT 1
if B_False goto $PutBack
givepokemon 152 5 0
jingle
message $GotChick
$GotChick 1 = You Recieved a Chikorita
boxset 6
message $NameChick
$NameChick 1 = Would You like to give Chikorita a name?
boxset 5
compare LASTRESULT 1
if b_False goto $GiveDex
Namepokemon
setflag 0x203
goto $GiveDex

#org $StartShrew
checkflag 0x800
if B_True goto $NoBall
message $Shrew
$Shrew 1 = SandShrew!\lDesert Mole.\pTake the Sandshrew?
boxset 5
compare LASTRESULT 1
if B_False goto $PutBack
givepokemon 27 5 0
jingle
message $GotChick
$GotShrew 1 = You Recieved a Sandshrew
boxset 6
message $NameShrew
$NameShrew 1 = Would You like to give Sandshrew a name?
boxset 5
compare LASTRESULT 1
if b_False goto $GiveDex
Namepokemon
setflag 0x204
goto $GiveDex

#org $StartWing
checkflag 0x800
if B_True goto $NoBall
message $Chick
$Wing 1 = Wingull!\lThe Ocean Bird.\pTake the Wingull?
boxset 5
compare LASTRESULT 1
if B_False goto $PutBack
givepokemon 152 5 0
jingle
message $GotGull
$GotGull 1 = You Recieved a Wingull
boxset 6
message $NameGull
$NameGull 1 = Would You like to give Wingull a name?
boxset 5
compare LASTRESULT 1
if b_False goto $GiveDex
Namepokemon
setflag 0x205
goto $GiveDex

#org $GiveDex
setflag 0x800
setflag 0x801
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
message $GotDex
$Gotdex 1 = You got the Pokedex!
boxset 6
end

#org $PutBack
message $PutBack
$PutBack 1 = You put the pokeball back.
boxset 6
end

#org $NoBall
message $Lastball
$Lastball 1 = You already have your pokemon.\nDont be so greedy!
boxset 6




I'm sure I've done everything Irish Witch said to do, after compiling i Gave the right offset and ID to each pokeball

When I play it on VBA:
The first pokeball offers a chikorita. If you enter yes, you get a chikorita and pokedex, but when you're done, the game thinks you're in the pokemon safari zone. If you enter no the game freezes.

The Second pokeball offers a sandshrew. When you click yes, it says you you have recieved Chikorita. If you rename it, it becomes ???????? instead. In the end, you leave with no pokemon.

The third pokeball offers chikorita and says gives a wingull, with the same result as the second pokeball.



It seems to be that this particular script is messed up or I am doing something wrong. Please look through the script for errors and help me fix them- thanks in advance
 
Last edited:
Dark Latiku, I took your advice. but it still won't compile. What did I do wrong this time?

#dynamic 0x3B4EEF

#org @start
lock
faceplayer
checkflag 0x828
if b_true goto @done
message @1
boxset 5
compare LASTRESULT 0x1
if b_true goto @take
message @2
boxset 6
release
end
#org @done
message @3
boxset 6
release
end
#org @take
givepokemon 0x9D 0x0 0x0
fanfare 0x13E
message @pointer
boxset 4
waitfanfare
#raw 0x68
setflag 0x828
message @nickname
boxset 5
compare LASTRESULT 0x1
if b_true gosub @name
message @care
boxset 6
end

#org @1
= I can't take care of\nthis rowdy TOTODILE.\pWould you like it?

#org @2
= Thank you so much!

#org @pointer
= You got a Totodile!

#org @name
call 0x1A74EB
return

#org @care
= Take good care of him!

Where does it say it's wrong? Cos on XSE, it'll tell you the line that has the problem...
Uh...replace the givepokemon line with:

givepokemon 0x9D 0x5 0x0 0x0 0x0.
Remember, the second one is it's level. You do NOT want to get a lv0 Totodile as a starter.
Then, it's items.
After that, it's just space it needs to take up.
 
Hi guys this is my first post so please try to help me
i got this script for pokescript straight from Irish Witch's tutorial


#org $StartChik
checkflag 0x800
if B_True goto $NoBall
message $Chick
$Chick 1 = Chikorita!\lThe Fire Bird.\pTake the Chikorita?
boxset 5
compare LASTRESULT 1
if B_False goto $PutBack
givepokemon 152 5 0
nop
nop

fanfare 0x13a
message $GotChick
$GotChick 1 = You Recieved a Chikorita
boxset 4
waitfanfare
#raw 68

setflag 0x800
message $NameChick
$NameChick 1 = Would You like to give Chikorita a name?
boxset 5
compare LASTRESULT 1
if b_False goto $GiveDex
Namepokemon
setflag 0x203
goto $GiveDex
end

#org $StartShrew
checkflag 0x800
if B_True goto $NoBall
message $Shrew
$Shrew 1 = SandShrew!\lDesert Mole.\pTake the Sandshrew?
boxset 5
compare LASTRESULT 1
if B_False goto $PutBack
givepokemon 27 5 0
nop
nop
fanfare 0x13a

message $GotChick
$GotShrew 1 = You Recieved a Sandshrew
boxset 4
waitfanfare
#raw 68

setflag 0x800
message $NameShrew
$NameShrew 1 = Would You like to give Sandshrew a name?
boxset 5
compare LASTRESULT 1
if b_False goto $GiveDex
Namepokemon
setflag 0x204
goto $GiveDex
end

#org $StartWing
checkflag 0x800
if B_True goto $NoBall
message $Wing
$Wing 1 = Wingull!\lThe Ocean Bird.\pTake the Wingull?
boxset 5
compare LASTRESULT 1
if B_False goto $PutBack
givepokemon 152 5 0
nop
nop
fanfare 0x13a

message $GotGull
$GotGull 1 = You Recieved a Wingull
boxset 4
waitfanfare
#raw 68

setflag 0x800
message $NameGull
$NameGull 1 = Would You like to give Wingull a name?
boxset 5
compare LASTRESULT 1
if b_False goto $GiveDex
Namepokemon
setflag 0x205
goto $GiveDex
end

#org $GiveDex
setflag 0x801
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
fanfare 0x13a
message $GotDex
$Gotdex 1 = You got the Pokedex!
boxset 4
waitfanfare
#raw 68

end

#org $PutBack
message $PutBack
$PutBack 1 = You put the pokeball back.
boxset 6
end

#org $NoBall
message $Lastball
$Lastball 1 = You already have your pokemon.\nDont be so greedy!
boxset 6




I'm sure I've done everything Irish Witch said to do, after compiling i Gave the right offset and ID to each pokeball

When I play it on VBA:
The first pokeball offers a chikorita. If you enter yes, you get a chikorita and pokedex, but when you're done, the game thinks you're in the pokemon safari zone. If you enter no the game freezes.

The Second pokeball offers a sandshrew. When you click yes, it says you you have recieved Chikorita. If you rename it, it becomes ???????? instead. In the end, you leave with no pokemon.

The third pokeball offers chikorita and says gives a wingull, with the same result as the second pokeball.

It seems to be that this particular script is messed up or I am doing something wrong. Please look through the script for errors and help me fix them- thanks in advance
There might be some more errors, I'm not sure its a late. Try it for now.
 
dshayabusa, thanks a bunch, the script is quite a bit better, but still not completely working.

After I go to each pokeball, it offers the correct pokemon. However, if I refuse and enter no, the Game freezes. If I enter yes, everything works fine and I get my pokemon. However, I seem to enter "Safari Mode" with a box in the left hand corner telling me how much time and balls I have left, with an option to "Retire" in the start menu. Also, after i pick up the pokeball it refuses to disappear. If i click a pokeball again after I get my pokemon, It says the right text "You already have your pokemon, don't be greedy" then freezes in a purple screen

Here's the script, if any one can see any further errors in it

#org $StartChik
checkflag 0x800
if B_True goto $NoBall
message $Chick
$Chick 1 = Chikorita!\lThe Fire Bird.\pTake the Chikorita?
boxset 5
compare LASTRESULT 1
if B_False goto $PutBack
givepokemon 152 5 0
nop
nop
fanfare 0x13a
message $GotChick
$GotChick 1 = You Recieved a Chikorita
boxset 4
waitfanfare
#raw 68
setflag 0x800
message $NameChick
$NameChick 1 = Would You like to give Chikorita a name?
boxset 5
compare LASTRESULT 1
if b_False goto $GiveDex
Namepokemon
setflag 0x203
goto $GiveDex
end

#org $StartShrew
checkflag 0x800
if B_True goto $NoBall
message $Shrew
$Shrew 1 = SandShrew!\lDesert Mole.\pTake the Sandshrew?
boxset 5
compare LASTRESULT 1
if B_False goto $PutBack
givepokemon 27 5 0
nop
nop
fanfare 0x13a
message $GotChick
$GotShrew 1 = You Recieved a Sandshrew
boxset 4
waitfanfare
#raw 68
setflag 0x800
message $NameShrew
$NameShrew 1 = Would You like to give Sandshrew a name?
boxset 5
compare LASTRESULT 1
if b_False goto $GiveDex
Namepokemon
setflag 0x204
goto $GiveDex
end

#org $StartWing
checkflag 0x800
if B_True goto $NoBall
message $Wing
$Wing 1 = Wingull!\lThe Ocean Bird.\pTake the Wingull?
boxset 5
compare LASTRESULT 1
if B_False goto $PutBack
givepokemon 152 5 0
nop
nop
fanfare 0x13a
message $GotGull
$GotGull 1 = You Recieved a Wingull
boxset 4
waitfanfare
#raw 68
setflag 0x800
message $NameGull
$NameGull 1 = Would You like to give Wingull a name?
boxset 5
compare LASTRESULT 1
if b_False goto $GiveDex
Namepokemon
setflag 0x205
goto $GiveDex
end

#org $GiveDex
setflag 0x801
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
fanfare 0x13a
message $GotDex
$Gotdex 1 = You got the Pokedex!
boxset 4
waitfanfare
#raw 68
end

#org $PutBack
message $PutBack
$PutBack 1 = You put the pokeball back.
boxset 6
end

#org $NoBall
message $Lastball
$Lastball 1 = You already have your pokemon.\nDont be so greedy!
boxset 6


Now just in case I'm doing anything wrong I'll tell you what I did and please check if there are any mistakes

1. compiled script, burned it to rom etc
2. under Advance Map I put in the offset values. For each pokeball I gave the numver next to the start value- there was $startchick, $startshrew, and $startwing
3. For the vanishing sprite I gave each pokeball an ID number; 203, 204, 205


That's the script and what I did, so if you see any errors in here, please let me know.
- Thanks in advance


 
I have a problem myself....
Code:
'-----------------------
#org 0x328427
checkflag 0x200
if 0x1 goto 0x832847A
msgbox 0x83284EA '"Get out of my way!"
callstd 0x6
applymovement MOVE_PLAYER 0x83284DD
applymovement 0x3 0x83284E1
waitmovement 0x0
setflag 0x200
trainerbattle 0x1 0x35 0x1 0x83284FE 0x8328532 0x832865C
end

'-----------------------
#org 0x32847A
end

'-----------------------
#org 0x32865C
msgbox 0x8328759 '"Grr..."
fadescreen 0x1
hidesprite 0x3
setflag 0x201
fadescreen 0x0
msgbox 0x832860F '"What's this? \n He must have droppe..."
end


'-----------
' Movements
'-----------
#org 0x3284DD
#raw 53 'Jump in Place (Facing Up)
#raw 0 'Face Down
#raw FE 'End of Movements

#org 0x3284E1
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x3284EA
= Get out of my way!

#org 0x3284FE
= Move it! \nHuh? \pYou want to stop me? \pBuahaha!!

#org 0x328532
= Argh! You beat me!

#org 0x328759
= Grr...

#org 0x32860F
= What's this? \n He must have dropped it... \pI better take it to April.

It never shows "Grr" and, when it disappears, he reappears where he was!
 
Last edited:
I have a problem myself....
Code:
'-----------------------
#org 0x328427
checkflag 0x200
if 0x1 goto 0x832847A
msgbox 0x83284EA '"Get out of my way!"
callstd 0x6
applymovement MOVE_PLAYER 0x83284DD
applymovement 0x3 0x83284E1
waitmovement 0x0
setflag 0x200
trainerbattle 0x1 0x35 0x1 0x83284FE 0x8328532 0x832865C
end

'-----------------------
#org 0x32847A
end

'-----------------------
#org 0x32865C
msgbox 0x8328759 '"Grr..."
fadescreen 0x1
hidesprite 0x3
setflag 0x201
fadescreen 0x0
msgbox 0x832860F '"What's this? \n He must have droppe..."
end


'-----------
' Movements
'-----------
#org 0x3284DD
#raw 53 'Jump in Place (Facing Up)
#raw 0 'Face Down
#raw FE 'End of Movements

#org 0x3284E1
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x3284EA
= Get out of my way!

#org 0x3284FE
= Move it! \nHuh? \pYou want to stop me? \pBuahaha!!

#org 0x328532
= Argh! You beat me!

#org 0x328759
= Grr...

#org 0x32860F
= What's this? \n He must have dropped it... \pI better take it to April.
It never shows "Grr" and, when it disappears, he reappears where he was!
Make sure you have set his Person ID (just under Script Offset in Advancemap) to 0201.
 
dshayabusa, thanks a bunch, the script is quite a bit better, but still not completely working.

After I go to each pokeball, it offers the correct pokemon. However, if I refuse and enter no, the Game freezes. If I enter yes, everything works fine and I get my pokemon. However, I seem to enter "Safari Mode" with a box in the left hand corner telling me how much time and balls I have left, with an option to "Retire" in the start menu. Also, after i pick up the pokeball it refuses to disappear. If i click a pokeball again after I get my pokemon, It says the right text "You already have your pokemon, don't be greedy" then freezes in a purple screen

Here's the script, if any one can see any further errors in it

#org $StartChik
checkflag 0x800
if B_True goto $NoBall
message $Chick
$Chick 1 = Chikorita!\lThe Fire Bird.\pTake the Chikorita?
boxset 5
compare LASTRESULT 1
if B_False goto $PutBack
givepokemon 152 5 0
nop
nop
fanfare 0x13a
message $GotChick
$GotChick 1 = You Recieved a Chikorita
boxset 4
waitfanfare
#raw 68
setflag 0x800
setflag 0x203
message $NameChick
$NameChick 1 = Would You like to give Chikorita a name?
boxset 5
compare LASTRESULT 0x1
if 0x0 goto $GiveDex
compare LASTRESULT 0x1
if 0x1 goto $name

end

#org $name
namepokemon
goto $GiveDex
end

#org $StartShrew
checkflag 0x800
if B_True goto $NoBall
message $Shrew
$Shrew 1 = SandShrew!\lDesert Mole.\pTake the Sandshrew?
boxset 5
compare LASTRESULT 1
if B_False goto $PutBack
givepokemon 27 5 0
nop
nop
fanfare 0x13a
message $GotChick
$GotShrew 1 = You Recieved a Sandshrew
boxset 4
waitfanfare
#raw 68
setflag 0x800
setflag 0x204
message $NameShrew
$NameShrew 1 = Would You like to give Sandshrew a name?
boxset 5
compare LASTRESULT 0x1
if 0x0 goto $GiveDex
compare LASTRESULT 0x1
if 0x1 goto $name

end

#org $StartWing
checkflag 0x800
if B_True goto $NoBall
message $Wing
$Wing 1 = Wingull!\lThe Ocean Bird.\pTake the Wingull?
boxset 5
compare LASTRESULT 1
if B_False goto $PutBack
givepokemon 152 5 0
nop
nop
fanfare 0x13a
message $GotGull
$GotGull 1 = You Recieved a Wingull
boxset 4
waitfanfare
#raw 68
setflag 0x800
setflag 0x205
message $NameGull
$NameGull 1 = Would You like to give Wingull a name?
boxset 5
compare LASTRESULT 1
if b_False goto $GiveDex
compare LASTRESULT 0x1
if 0x0 goto $GiveDex
compare LASTRESULT 0x1
if 0x1 goto $name

end

#org $GiveDex
setflag 0x801
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
fanfare 0x13a
message $GotDex
$Gotdex 1 = You got the Pokedex!
boxset 4
waitfanfare
#raw 68
end

#org $PutBack
message $PutBack
$PutBack 1 = You put the pokeball back.
boxset 6
end

#org $NoBall
message $Lastball
$Lastball 1 = You already have your pokemon.\nDont be so greedy!
boxset 6
end


Now just in case I'm doing anything wrong I'll tell you what I did and please check if there are any mistakes

1. compiled script, burned it to rom etc
2. under Advance Map I put in the offset values. For each pokeball I gave the numver next to the start value- there was $startchick, $startshrew, and $startwing
3. For the vanishing sprite I gave each pokeball an ID number; 203, 204, 205


That's the script and what I did, so if you see any errors in here, please let me know.
- Thanks in advance
*grumble* hates first pokemon scripts *grumble*

All right, lets see...
That should be all your problems fixed except the safari one. I have no idea what could be causing that. Try using a different script editor like PKSV or XSE.

I have a problem myself....
Code:
'-----------------------
#org 0x328427
checkflag 0x200
if 0x1 goto 0x832847A
msgbox 0x83284EA '"Get out of my way!"
callstd 0x6
applymovement MOVE_PLAYER 0x83284DD
applymovement 0x3 0x83284E1
waitmovement 0x0
setflag 0x200
trainerbattle 0x1 0x35 0x1 0x83284FE 0x8328532 0x832865C
end

'-----------------------
#org 0x32847A
end

'-----------------------
#org 0x32865C
msgbox 0x8328759 '"Grr..."
fadescreen 0x1
hidesprite 0x3
setflag 0x201
fadescreen 0x0
msgbox 0x832860F '"What's this? \n He must have droppe..."
end


'-----------
' Movements
'-----------
#org 0x3284DD
#raw 53 'Jump in Place (Facing Up)
#raw 0 'Face Down
#raw FE 'End of Movements

#org 0x3284E1
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x3284EA
= Get out of my way!

#org 0x3284FE
= Move it! \nHuh? \pYou want to stop me? \pBuahaha!!

#org 0x328532
= Argh! You beat me!

#org 0x328759
= Grr...

#org 0x32860F
= What's this? \n He must have dropped it... \pI better take it to April.

It never shows "Grr" and, when it disappears, he reappears where he was!
Uhhh... I think his problem is that he doesn't have boxset 6 after the message.
 
this is so close to working...
I figured out how to change the Safari thing, I had to change the corresponding checkflag and setflags to 0X828

However, if I refuse the offer to take a pokemon, the game freezes

If I answer yes to "Would you like to give a name to your pokemon", the nickname does not work and I do not get a Pokedex.

Also I'm not sure how to make the vanishing scripts work, I put 203, 204, 205 For the Person ID of each corresponding pokeball

Script

#org $StartChik
checkflag 0x828
if B_True goto $NoBall
message $Chick
$Chick 1 = Charmander!\lThe Lizard Pokemon\pTake the Charmander?
boxset 5
compare LASTRESULT 0x0
if B_False goto $PutBack
givepokemon 4 5 0
nop
nop
fanfare 0x13a
message $GotChick
$GotChick 1 = You Recieved a Charmander!
boxset 4
waitfanfare
#raw 68
setflag 0x828
setflag 0x203
message $NameChick
$NameChick 1 = Would You like to give \pCharmander a name?
boxset 5
compare LASTRESULT 0x1
if 0x0 goto $GiveDex
compare LASTRESULT 0x1
if 0x1 goto $name
end

#org $name
call 0x1A74EB
goto $GiveDex
end

#org $StartShrew
checkflag 0x828
if B_True goto $NoBall
message $Shrew
$Shrew 1 = Squirtle!\lThe Turtle Pokemon\pTake the Squirtle?
boxset 5
compare LASTRESULT 0x0
if B_False goto $PutBack
givepokemon 7 5 0
nop
nop
fanfare 0x13a
message $GotChick
$GotShrew 1 = You Recieved a Squirtle!
boxset 4
waitfanfare
#raw 68
setflag 0x828
setflag 0x204
message $NameShrew
$NameShrew 1 = Would You like to give \pSquirtle a name?
boxset 5
compare LASTRESULT 0x1
if 0x0 goto $GiveDex
compare LASTRESULT 0x1
if 0x1 goto $name
end

#org $StartWing
checkflag 0x828
if B_True goto $NoBall
message $Wing
$Wing 1 = Bulbasaur!\lThe Seed Pokemon\pTake the Bulbasaur?
boxset 5
compare LASTRESULT 0x0
if B_False goto $PutBack
givepokemon 1 5 0
nop
nop
fanfare 0x13a
message $GotGull
$GotGull 1 = You Recieved a Bulbasaur!
boxset 4
waitfanfare
#raw 68
setflag 0x828
setflag 0x205
message $NameGull
$NameGull 1 = Would You like to give \pBulbasaur a name?
boxset 5
compare LASTRESULT 1
if b_False goto $GiveDex
compare LASTRESULT 0x1
if 0x0 goto $GiveDex
compare LASTRESULT 0x1
if 0x1 goto $name
end

#org $GiveDex
setflag 0x829
message $Pokedex
$Pokedex 1 = I hope You like your new pokemon!\pWhile your on your journeys I have\la favour to ask you.\pWe 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
fanfare 0x13a
message $GotDex
$Gotdex 1 = You got the Pokedex!
boxset 4
waitfanfare
#raw 68
end

#org $PutBack
message $PutBack
$PutBack 1 = You put the pokeball back.
boxset 6
end

#org $NoBall
message $Lastball
$Lastball 1 = You already have your pokemon.\nDont be so greedy!
boxset 6
end



 
Last edited:
this is so close to working...
I figured out how to change the Safari thing, I had to change the corresponding checkflag and setflags to 0X828

However, if I refuse the offer to take a pokemon, the game freezes

If I answer yes to "Would you like to give a name to your pokemon", the nickname does not work and I do not get a Pokedex.

Also I'm not sure how to make the vanishing scripts work, I put 203, 204, 205 For the Person ID of each corresponding pokeball

Script

#org $StartChik
checkflag 0x828
if B_True goto $NoBall
message $Chick
$Chick 1 = Charmander!\lThe Lizard Pokemon\pTake the Charmander?
boxset 5
compare LASTRESULT 0x0
if 0x1 gosub $PutBack
givepokemon 4 5 0
nop
nop
fanfare 0x13a
message $GotChick
$GotChick 1 = You Recieved a Charmander!
boxset 4
waitfanfare
#raw 68
setflag 0x828
setflag 0x203
message $NameChick
$NameChick 1 = Would You like to give \pCharmander a name?
boxset 5
compare LASTRESULT 0x1
if 0x0 gosub $GiveDex
compare LASTRESULT 0x1
if 0x1 gosub $name
end

#org $name
call 0x1A74EB
goto $GiveDex
end

#org $StartShrew
checkflag 0x828
if B_True goto $NoBall
message $Shrew
$Shrew 1 = Squirtle!\lThe Turtle Pokemon\pTake the Squirtle?
boxset 5
compare LASTRESULT 0x0
if 0x1 gosub $PutBack
givepokemon 7 5 0
nop
nop
fanfare 0x13a
message $GotChick
$GotShrew 1 = You Recieved a Squirtle!
boxset 4
waitfanfare
#raw 68
setflag 0x828
setflag 0x204
message $NameShrew
$NameShrew 1 = Would You like to give \pSquirtle a name?
boxset 5
compare LASTRESULT 0x1
if 0x0 gosub $GiveDex
compare LASTRESULT 0x1
if 0x1 gosub $name
end

#org $StartWing
checkflag 0x828
if B_True goto $NoBall
message $Wing
$Wing 1 = Bulbasaur!\lThe Seed Pokemon\pTake the Bulbasaur?
boxset 5
compare LASTRESULT 0x0
if B_False gosub $PutBack
givepokemon 1 5 0
nop
nop
fanfare 0x13a
message $GotGull
$GotGull 1 = You Recieved a Bulbasaur!
boxset 4
waitfanfare
#raw 68
setflag 0x828
setflag 0x205
message $NameGull
$NameGull 1 = Would You like to give \pBulbasaur a name?
boxset 5
compare LASTRESULT 1
if b_False goto $GiveDex
compare LASTRESULT 0x1
if 0x0 gosub $GiveDex
compare LASTRESULT 0x1
if 0x1 gosub $name
end

#org $GiveDex
setflag 0x829
message $Pokedex
$Pokedex 1 = I hope You like your new pokemon!\pWhile your on your journeys I have\la favour to ask you.\pWe 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
fanfare 0x13a
message $GotDex
$Gotdex 1 = You got the Pokedex!
boxset 4
waitfanfare
#raw 68
end

#org $PutBack
message $PutBack
$PutBack 1 = You put the pokeball back.
boxset 6
end

#org $NoBall
message $Lastball
$Lastball 1 = You already have your pokemon.\nDont be so greedy!
boxset 6
end



Ahh I see I thought you were hacking R/S. I used to have a problem with goto so I started using gosub instead and it worked for me. It might work for you as well. gosub is pretty much the same as goto the only difference being that you can return from it (like call).

can someone make a script where u dont have to capture a pokemon to complete a pokedex entry, you only have to meet it in battle.
I've come across this before but I'm not 100% sure what it is. I believe you have to set a variable the number of a pokemon then use a special. I have no idea what they are though, sorry.
 
I decided to make a custom pokemon Center script, where the nurse checks to see if you have pokemon, then she takes them, heals them, gives them back, and does the "^_^" face. The script works up until the animation of the ^_^ face, I think I have to make sure the script points at her, but I dont know what to put...

.......................Here
applymovement 0x0 @XXXXXX

I try making it the same person event # as her (she is the first person on the map, so 0x1, right? this is my problem... help?)

Where is my whole script, it is for starting towns with pokemon centers in them, you can use it if you give me, 0m3GA ARS3NAL, credit in the credits of your hack. (Change the Dynamic offset of course, hehe!

Spoiler:
 
Last edited:
alright! everything is working except for vanishing sprites....they only vanish after i exit the room and enter again....
 
Hey i am making a script using the Setmaptile command how do you get the map to reset, i used the special 0x8E, i think that is just for FR, i need this for a script in Emerald. Is the "special" value for reset different for emerald, and if so what is it? I tried searching for a setmaptile script already in the game(like in the elite 4 rooms) but i dont see any special command, does anyone know what it is?
 
It keeps saying "unknown keyword &h1 at line 13"

can anyone help?



Code:
#dynamic 0x6B0FD7

#org @main
lock
faceplayer
checkflag 0x800
#define if b_true goto @done
message @welcome
boxset 6
message @starter
boxset 5
compare LASTRESULT 0x1
if b_true goto @good
message @comeon
boxset 6
release
end


#org @good
givepokemon 133 5 0
fanfare 0x13E
message @received
boxset 4
waitfanfare
#raw 0x68
setflag 800
setflag 801
message @newname
compare LASTRESULT 0x1
if b_true gosub @name
message @go 
boxset 6
release
end


#org @welcome
= Hello v\01! good of you to show up.\nI have a favor to ask you.\pI will give you a pokemon of your\nown only if you promise to\pfill up a pokedex, defeat your\nfather and carry on the family legacy.

#org @starter
= Will you help me? 

#org @comeon
= Oh don't be like that!\n come back if you change your mind.

#org @received 
= you received an Eevee\nand a Pokedex!

#org @newname
= Would you like to name\nyour Eevee?

#org @name
call 0x1A74EB
return

#org @go
= Ok, get out there and make\n a name for yourself.

#org @done
message @bye
boxset 6
release
end

#org @bye
= You still here?
 
I decided to make a custom pokemon Center script, where the nurse checks to see if you have pokemon, then she takes them, heals them, gives them back, and does the "^_^" face. The script works up until the animation of the ^_^ face, I think I have to make sure the script points at her, but I dont know what to put...

.......................Here
applymovement 0x0 @XXXXXX

I try making it the same person event # as her (she is the first person on the map, so 0x1, right? this is my problem... help?)

Where is my whole script, it is for starting towns with pokemon centers in them, you can use it if you give me, 0m3GA ARS3NAL, credit in the credits of your hack. (Change the Dynamic offset of course, hehe!

Spoiler:
You're supposed to put in here People Number.
This script is missing a lot. Wheres the animation, healing place, sound etc.

alright! everything is working except for vanishing sprites....they only vanish after i exit the room and enter again....
You need to set the Person ID to the corresponding flags. So the ball that sets the flag 0x200 will have an ID of 0200

Hey i am making a script using the Setmaptile command how do you get the map to reset, i used the special 0x8E, i think that is just for FR, i need this for a script in Emerald. Is the "special" value for reset different for emerald, and if so what is it? I tried searching for a setmaptile script already in the game(like in the elite 4 rooms) but i dont see any special command, does anyone know what it is?
I think it is special 0x91.

It keeps saying "unknown keyword &h1 at line 13"
can anyone help?
Code:
#dynamic 0x6B0FD7

#org @main
lock
faceplayer
checkflag 0x800
[B]#define [/B]if b_true goto @done
message @welcome
boxset 6
message @starter
boxset 5
compare LASTRESULT 0x1
if b_true goto @good
message @comeon
boxset 6
release
end


#org @good
givepokemon 133 5 0
fanfare 0x13E
message @received
boxset 4
waitfanfare
#raw 0x68
setflag 800
setflag 801
message @newname
compare LASTRESULT 0x1
if b_true gosub @name
message @go 
boxset 6
release
end


#org @welcome
= Hello v\01! good of you to show up.\nI have a favor to ask you.\pI will give you a pokemon of your\nown only if you promise to\pfill up a pokedex, defeat your\nfather and carry on the family legacy.

#org @starter
= Will you help me? 

#org @comeon
= Oh don't be like that!\n come back if you change your mind.

#org @received 
= you received an Eevee\nand a Pokedex!

#org @newname
= Would you like to name\nyour Eevee?

#org @name
call 0x1A74EB
return

#org @go
= Ok, get out there and make\n a name for yourself.

#org @done
message @bye
boxset 6
release
end

#org @bye
= You still here?
Why do you have a define? You need to delete that.
 
Status
Not open for further replies.
Back
Top