• 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.
Code:
#ORG $begin
checkflag 0x200
if B_true goto $done
applymovement 0x01 $momwalk
pausemove 0
message $momtalk
boxset 6
setflag 0x200
release
end

#ORG $done
release
end

#ORG $momwalk
$momwalk 1 ; #binary 0x62 0x11 0x13 0x13 0x13 0x13 0x4A 0xFE

#ORG $momtalk
$momtalk 1 = Oh! Hello honey!\nThe proffesor called a bit ago...\phe said to meet him at his lab.

Is there anything wrong with this script? I compiled it to Fire Red and it froze...

Go to the properties of your script (click it and look to the right)

Look for:

Unknown 00 00
Var numbers 00 00

Make them:

Unknown 00 03
Var numbers 52 40
 
I'm using this Script in Emerald - Littleroot town.

#org $Wildbatt
lock
faceplayer
cry 409
message $truck
$truck 1 = This person seems to have\nmany Jirachi with him...\pOh no! It's the........\n........\pJirachi Making Robot!
boxset 6
wildbattle 409 70 0
release
end

When I press A on the person, the person locks all other people except the playing char. Then, sometimes if I talk to another NPC the game hangs.

Doesn't initiate a wildbatle.
 
Last edited:
Okay, I'm using this example script now:

#org $battle
lock
faceplayer
message $roar
boxset 6
wildbattle 1 5 0
release
end

#org $roar
$roar 1 = Bulba!

But somehow, it skips the 'wildbattle' command and goes right to release, end.

HEY, anyone gonna help!?
 
Last edited:
409 is Jirachi.

0 is grass, my friend.

Doesn't work. It does the message then halts.
 
Last edited:
AngelSL-
#org $battle
message $roar
boxset 6
wildbattle 1 5 0
fadescreen 0
#raw 53
#raw <ppl nr>
#raw 00
setflag 0x200
release
end

#org $roar
$roar 1 = Bulba!


That should probably work(help by kristian)

~C3LEBI
 
I wonder...

As there's a error when I do this script, I guess I have done something wrong... The setflag won't work and som boxes come up when I finish it... The battle, movement and the text does work though.. What's wrong ?

#org $begin
checkflag 0x203
if B_true goto $gone
applymovement 0X07 $gruntwalk
trainerbattle 1 0x059 $before $after $further
release
end

#org $before
$before 1 = Hand over you Pokemon!
release
end

#org $further
message $beaten
boxset 6
applymovement 0x07 $getaway
setflag 0x203
release
end

#org $gone
release
end

#org $gruntwalk
$gruntwalk 1 ; #binary 0x10 0x10 0x10 0x10 0xFE

#org $after
$after 1 = Huh?

#org $beaten
$beaten 1 = I knew your POKEMON was\nstrong!\pAnyway, I'm out of here.

#org $getaway
$getaway 1 ; #binary 0x13 0x10 0x10 0x12 0x10 0x10 0x10 0x10 0x13 0x60 0xFE

EDIT: The setflag worked after all, It's the boxes that bothers me....
 
Last edited:
You probably shouldn't change the #orgs for a trainer battle, they should be $1 $2 and $3 as far as I kow.
It's also possible they're existing #orgs.
 
You probably shouldn't change the #orgs for a trainer battle, they should be $1 $2 and $3 as far as I kow.
It's also possible they're existing #orgs.

If you are right with the #orgs for the trainer battles - then I know what's the problem of my trainer test script :

#org $battletrainer
trainerbattle 1 0x253 $challenge $defeated
message $afterdefead
boxset 6
release
end

#org $challenge
$challenge 1 = You would like to go to PETALBURG CITY, right?\pThen you gotta beat me first!

#org $defeated
$defeated 1 = Nooooo! That isn't fair!\pHow could you beat me!?

#org $afterdefead
$afterdefead 1 = One day I will beat you!

The game freezes after the battle. And there is no Trainer Encounter Music (the music when the trainer see you, come to you and challenge you).
 
no, I don't think that's the problem... Btw, Piplup-trainer.... You shouldn't write message beneath the Trainerbattle, try like this:

trainerbattle 1 0x253 $challenge $defeat $afterdefead

Or maybe it's the orgs... But I don't think so... Anyway... I used the fadescreencommand, and it worked...
 
Last edited:
no, I don't think that's the problem... Btw, Piplup-trainer.... You shouldn't write message beneath the Trainerbattle, try like this:

trainerbattle 1 0x253 $challenge $defeat $afterdefead

Or maybe it's the orgs... But I don't think so... Anyway... I used the fadescreencommand, and it worked...

Okay.
This time the game doesn't freeze after the battle.
But if I talk to him after the Battle then a pink-violet color appears --> the game freeze.
Where must I put the fadescreen-command and how it looks like?
 
#org $battletrainer
trainerbattle 1 0x253 $challenge $defeated
fadescreen <-------------------------------------------
message $afterdefead
boxset 6
release
end

#org $challenge
$challenge 1 = You would like to go to PETALBURG CITY, right?\pThen you gotta beat me first!

#org $defeated
$defeated 1 = Nooooo! That isn't fair!\pHow could you beat me!?

#org $afterdefead
$afterdefead 1 = One day I will beat you!

The game freezes when I ask the guy after the battle (this time without the pink color).
Can it be that fadescreen is a command for FireRed?
If yes, then it wouldn't help me very much because I use a Ruby Rom to hack.
 
try this one then...
Code:
#org $battletrainer
lock
faceplayer
trainerbattle 1 0x253 $challenge $defeated $then
release
end

#org $then
message $afterdefead
boxset 6
fadescreen 0
release
end

#org $challenge
$challenge 1 = You would like to go to PETALBURG CITY, right?\pThen you gotta beat me first!

#org $defeated
$defeated 1 = Nooooo! That isn't fair!\pHow could you beat me!?

#org $afterdefead
$afterdefead 1 = One day I will beat you!
 
Now the music works when he sees me.
But there is still the next problem :
After he goes to you, the game freezes.
And the pink-violet background cames back '^^

EDIT :
But when I go to him and press A, then the battle starts.
After the battle he says "One day I will defeat you!".
Then the "!" appears over him again and then comes the weird background.
 
Last edited:
If this is what you want... (requires that the flag isn't taken) You can also take a different flag

#org $battletrainer
checkflag 0x222
if B_true goto $afterdefead
trainerbattle 1 0x253 $challenge $defeated
setflag 0x222
release
end

#org $afterdefead
lock
faceplayer
message $afterdefeat
release
end

#org $challenge
$challenge 1 = You would like to go to PETALBURG CITY, right?\pThen you gotta beat me first!

#org $defeated
$defeated 1 = Nooooo! That isn't fair!\pHow could you beat me!?

#org $aferdefeat
$afterdefeat 1 = One day I will beat you!
 
If this is what you want... (requires that the flag isn't taken) You can also take a different flag

#org $battletrainer
checkflag 0x222
if B_true goto $afterdefead
trainerbattle 1 0x253 $challenge $defeated
setflag 0x222
release
end

#org $afterdefead
lock
faceplayer
message $afterdefeat
release
end

#org $challenge
$challenge 1 = You would like to go to PETALBURG CITY, right?\pThen you gotta beat me first!

#org $defeated
$defeated 1 = Nooooo! That isn't fair!\pHow could you beat me!?

#org $aferdefeat
$afterdefeat 1 = One day I will beat you!

But how can I see the flag in AdvanceMap (or anywhere else)?
 
What do you mean about "see the flag"?
btw did it work?
 
I didn't burned it yet because I don't understand the thing with the flag.
How can I find/get the flag from a person?
 
Status
Not open for further replies.
Back
Top