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

Script Requests/Sharing/Discussion

Status
Not open for further replies.
Okay, I finally got it to work, but now I have another problem. I can't make the text box that says would you like to give Piplup a name disappear.

#org $pick
checkflag 0x200
if b_true goto $end
checkflag 0x201
if b_true goto $end
checkflag 0x202
if b_true goto $end
#raw 75
#raw 07
#raw 00
#raw 0A
#raw 03
message $piplup
$piplup 1 = Do you want the water\npenguin Piplup?
boxset 5
compare LASTRESULT 1
if b_true goto $yes
#raw 76
message $back
$back 1 = Placed the Piplup back.
boxset 6
end

#org $yes
#raw 76
givepokemon 7 5 0x8B
setflag 0x200
jingle
message $recieve
$recieve 1 = You recieved Piplup!
boxset 6
message $nick
$nick 1 = Would You like to give\nPIPLUP a name?
boxset 5
compare LASTRESULT 1
if b_False goto $end
Namepokemon
end

#org $end
end
 
Last edited:
Yeah, it did help some but now I have 2 problems, nicknaming my pokemon freezes the screen and I still can't get rid of the name pokemon box.

#org $pick
checkflag 0x200
if b_true goto $end
checkflag 0x201
if b_true goto $end
checkflag 0x202
if b_true goto $end
#raw 75
#raw 07
#raw 00
#raw 0A
#raw 03
message $piplup
$piplup 1 = Do you want the water\npenguin Piplup?
boxset 5
compare LASTRESULT 1
if b_true goto $yes
#raw 76
message $back
$back 1 = Placed the Piplup back.
boxset 6
end

#org $yes
#raw 76
givepokemon 7 5 0x8B
#raw 53
#raw 1
#raw 00
setflag 0x200
jingle
message $recieve
$recieve 1 = You recieved Piplup!
boxset 6
setflag 0x828
message $nick
$nick 1 = Would You like to give\nPIPLUP a name?
boxset 5
compare LASTRESULT 2
if b_False goto $end
Namepokemon
end

#org $end
end
 
No, unfortunatly, I'm not. Well, I figured out the frozen screen so now the only problem is the little text box that says do you want to rename this pokemon won't go away.
 
Well I see you have two #raw 76's could that be the problem?

Yeah, it did help some but now I have 2 problems, nicknaming my pokemon freezes the screen and I still can't get rid of the name pokemon box.

#org $pick
checkflag 0x200
if b_true goto $end
checkflag 0x201
if b_true goto $end
checkflag 0x202
if b_true goto $end
#raw 75
#raw 07
#raw 00
#raw 0A
#raw 03
message $piplup
$piplup 1 = Do you want the water\npenguin Piplup?
boxset 5
compare LASTRESULT 1
if b_true goto $yes
#raw 76
message $back
$back 1 = Placed the Piplup back.
boxset 6
end

#org $yes
#raw 76
givepokemon 7 5 0x8B
#raw 53
#raw 1
#raw 00
setflag 0x200
jingle
message $recieve
$recieve 1 = You recieved Piplup!
boxset 6
setflag 0x828
message $nick
$nick 1 = Would You like to give\nPIPLUP a name?
boxset 5
compare LASTRESULT 1
if b_true goto $name
goto $end


#org $name
nampokemon
return


#org $end
release
end

I Think It'll Work Now. Try it
 
Last edited:
1. Is there a way to do random scripts? For example, I've made a script to rob something, and I'd like to make a way that it randomizes what you find by robbing.

EDIT: Here is the script:
Code:
#org $Stealscript
checkflag 0x200
if B_TRUE goto $Nothing
message $Steal
$Steal 1 = There is good things in this\nhouse. Rob it?
boxset 5
compare LASTRESULT B_TRUE
if B_False goto $Nosteal
message $Nowsteal
$Nowsteal 1 = /v/H01/ robbed the house.\nThey found a lot of useful\pthings in there.
boxset 6
giveitem 0x4 0x1
setflag 0x200
release
end

#org $Nothing
$Nothing 1 = You stole it all before!\lThere is nothing left!
release
end

#org $Nosteal
$Nosteal 1 = Decided against doing an\nunlawful act.
release
end

2. Can someone plz give me an example script for answers E.G somebody says "What type of POKEMON do you like?" And you have choices from Grass, Fire or Water, in a box that looks like this:
_______
|Fire |
|Water|
|Grass|
-------
 
Last edited:
I don't think you can randomise items. If you know of an event like that in your game, decompile the script.

As for the fire, water and grass thing, I cant script that well ;x.
 
Yeah, thanks, I'll try decompiling Celio's script, since it is completely random what he will say. I'll also decompile the guy at the ports for the fire water grass thing ^^. If I figure it out, I'll post the results ^^

EDIT: What the hell? Maybe I should use scriptDEC to decompile???? :\

EDIT2: God dammit! This thing never works properly!
#%#^%&*(*)&*()*^&$@@#@#@$%!!!!!!!

Can somebody just show me? It be REALLY handy if somebody like Irish witch, or Semele, or Zel, cam along. :\
 
Last edited:
Yeah, thanks, I'll try decompiling Celio's script, since it is completely random what he will say. I'll also decompile the guy at the ports for the fire water grass thing ^^. If I figure it out, I'll post the results ^^

EDIT: What the hell? Maybe I should use scriptDEC to decompile???? :\
Randomization can be done with the hex command 8F. Decompile the script of the girl and her Slowbro in Cerulean city for an example of its usage.

Selecting in a box is done with a multi command (6F) obviously, but you'll have to change the text of the options of one of the multi-boxes as there is no set of choices fire/water/grass by default. This reference may help (mostly notes, but it's possible you could figure it out):
Dabomstew @ another forum said:
The "multi-table" starts at 0x3e04b0

format of each multi entry:
offset (4bytes) number of options (1Byte?) 00 00 00

The above Offset points to the list of options of the multi, like this for each option:
offset (4bytes) 00 00 00 00

Offset above is a pointer. to text.
The options data is actually stored directly before the actual multi-table for some reason.

there are 65 multi's - 0x00 to 0x40

We can change the amount of choices to each multi with data/text ptrs placed in free space, so we can change a multi with only 2 choices to have 5 or 6 if needed.

There are a couple of pointers in the ROM which point to the start of the "multi-table", so it might be possible to relocate the whole thing and subsequently increase the number of available multi boxes. (like what can be done with the music table)
 
Code:
'-----------------------
#org 0x1667DD
lock
#raw [B]0x8F[/B]
call 0x80081900 
killscript
#raw 0x80
compare 0x8008 0x0
if 0x1 call 0x166814
compare 0x8008 0x1
if 0x1 call 0x16681D
compare 0x8008 0x2
if 0x1 call 0x166826
compare 0x8008 0x3
if 0x1 call 0x16682F
release
end

'-----------------------

I've put that part in bold, but I don't understand exactly what to do after that.
 
Code:
'-----------------------
#org 0x1667DD
lock
#raw [B]0x8F[/B]
call 0x80081900 
killscript
#raw 0x80
compare 0x8008 0x0
if 0x1 call 0x166814
compare 0x8008 0x1
if 0x1 call 0x16681D
compare 0x8008 0x2
if 0x1 call 0x166826
compare 0x8008 0x3
if 0x1 call 0x16682F
release
end

'-----------------------

I've put that part in bold, but I don't understand exactly what to do after that.
The random command (8F) takes a two-byte-long number as its argument, representing the size of the number you want generated. If you put 4 as the argument, it will generate 0,1,2, or 3. Similarly if you were to put 8 it would be 0,1,2,3,4,5,6 or 7. You can't see this as the script decompiler is interpreting the 4 that is the command's argument as a call command. Really the script is like this:
Code:
#org 0x1667DD
lock
#raw 0x8F
#raw 0x04 0x00
copyvar 0x8008 0x800D
compare 0x8008 0x0
if 0x1 call 0x166814
compare 0x8008 0x1
if 0x1 call 0x16681D
compare 0x8008 0x2
if 0x1 call 0x166826
compare 0x8008 0x3
if 0x1 call 0x16682F
release
end

'-----------------------
The 04 00 bit is the argument (4) for the random command, in swapped-hex. The copyvar takes the random number that was placed in LASTRESULT (0x800D) by the random command and puts it in variable 0x8008.
 
Hmm, i'll try make it for you.

Code:
#org 0x1667DD
lock
[b]faceplayer[/b]
#raw 0x8F
call 0x80081900 
killscript
#raw 0x80
compare 0x8008 0x0
if 0x1 call 0x166814
compare 0x8008 0x1
if 0x1 call 0x16681D
compare 0x8008 0x2
if 0x1 call 0x166826
compare 0x8008 0x3
if 0x1 call 0x16682F
release
end

#org call 0x166814
giveitem 0x45 0x1
0x166814 = You received a random item!
release
end

#org call 0x16681D
giveitem 0x45 0x1
0x16681D = You received a random item!
release
end

#org call 0x166826
giveitem 0x45 0x1
0x166826 = You received a random item!
release
end

#org call 0x16682F
giveitem 0x45 0x1
0x16682F = You received a random item!
release
end

I don't beleive i've done it right, use a completely different rom before doing it on yours, just to make sure...
Someone fix this if it doesn't work...
 
Hey, I have a problem. My scripts work now, but the /n things I put in the messages don't work.
 
Omg stupid me...Thank you.

Edit: now, is there some type of pause for a wildbattle? When the screen flashs when going into the battle I see it is still showing the text that happens after the battle. And the pokemon does not disappear after I set the flag and fadescreen.
 
Last edited:
Thanx Dabomstew! That thing helped! :) And thanks ♠εx

Coin3: I'm guessing you want to make the SPEAROW disappear. Try this: #raw 0x53 0x<people No.> 0x00. Or try making a script that shows the spearow running away from ASH. How I know that you want a spearow... I just know lol!

EDIT: Haven't tested it yet, but here is the steal item script!!!
Spoiler:

I'm sure it works!
 
Last edited:
So can I get some help with this one? I know I come here a lot, but I was dazed when I was writing this one so I don't know what I forgot to put in.
Code:
#org $dex
lock
faceplayer
checkflag 0x205
if b_true goto $hey
message $give
$give 1 = Hey \v\h01, so this\nis your birthday? Well, Sam said \pyou would be by to pick up your\npokemon. First take this,
boxset 6
setflag 0x829
setflag 0x828
special 0x16F
message $recieved
$recieved 1 = You recieved the Pokedex!!
boxset 6
message $follow
$follow 1 = Now for your Pokemon,\nfollow me.
boxset 6
applymovement $Walk1
$Walk1 1 ; #Binary 0x01 0x09 0x09 0x04
pausemove 0
message $pick
$pick 1 = Pick one of these Pokemon\nand take it to Viridian,\pSam said he wanted you to\ncome to Agatha's house.
setflag 0x205
release
end


#org $hey
checkflag 0x200
compare lastresult 1
if b_true goto $alright
checkflag 0x201
compare lastresult 1
if b_true goto $alright
checkflag ox202
compare lastresult 1
if b_true goto $alright
lock 
faceplayer
message $hey1
$hey1 1 = So have you went to see Sam yet?
boxset 6
release
end

#org $alright
lock
faceplayer
message $alright1
$alright1 1 = So do you like your Pokemon?
boxset 6
release
end

Oh, and a basic text script is:

#org $text
lock
faceplayer
$text 1 = Hello
boxset 6(not %100 sure that you need that)
release
end
 
Last edited:
Status
Not open for further replies.
Back
Top