• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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 Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.

Divider

Grand Master Johto Champion
25
Posts
15
Years
Safari Zone Breakdown:

Anyone have any information regarding this, and how to make a custom safari script?

Please Forward to my inbox or vistor page. Thank you.
 

Herpahermaderp

I liek Mudkipz
66
Posts
11
Years
  • Age 25
  • USA
  • Seen Jan 3, 2017
Does anyone know how to set something to the likeliness of a virtual storage thing? I am trying to implement ATMs and banks, and I was wondering if there was any way to do that. It would use takemoney, then store the money it took at a variable, then when the player wants to take money from it, it would use givemoney, and it would check if there was that amount of cash in the storage, etc.
 

miksy91

Dark Energy is back in action! ;)
1,480
Posts
15
Years
Does anyone know how to set something to the likeliness of a virtual storage thing? I am trying to implement ATMs and banks, and I was wondering if there was any way to do that. It would use takemoney, then store the money it took at a variable, then when the player wants to take money from it, it would use givemoney, and it would check if there was that amount of cash in the storage, etc.
You'll have to know assembly to do that.

Basically, instead of using "takemoney" command, you'll have to call an assembly code which has the similar effect to that command; take xx amount of money but store it somewhere in ram (by increasing this ram area with the amount of deposit (because there could have been money on your account already). Then you could also withdraw money from it by instead of "givemoney", you'd be using assembly code for giving money along with decreasing that amount of money from your account.
Along with the following, there of course have to be checks to see that the amount of money in that ram address cannot "increase to 0" (this is a byte related thing, FF + 1 = 00) and that you always have enough money to take from the account (if you don't, the money would "decrease to bigger numbers" (00 - 1 = FF)).

Not one of the easiest things to be done but if you want to learn how to do things like that, it's very much possible.
 

Renegade

Time for real life...
995
Posts
12
Years
I'm having a problem with my level script. Everything works just fine, but at the end, the text box comes up saying "qAF qAF qAF qAF qAF qAF qAF qAF qAF qAF"........ ect. And yes, I've already changed the script's #raw 0xFFFF to #raw 0x0. Any suggestions?

Thanks in advance!
 

tajaros

Hi I'm dawg
855
Posts
11
Years
I'm having a problem with my level script. Everything works just fine, but at the end, the text box comes up saying "qAF qAF qAF qAF qAF qAF qAF qAF qAF qAF"........ ect. And yes, I've already changed the script's #raw 0xFFFF to #raw 0x0. Any suggestions?

Thanks in advance!

Try deleting the level script. And Insert it again and do that all over again it should work. :) Or maybe you haven't saved it on A-map.:/
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
I'm having a problem with my level script. Everything works just fine, but at the end, the text box comes up saying "qAF qAF qAF qAF qAF qAF qAF qAF qAF qAF"........ ect. And yes, I've already changed the script's #raw 0xFFFF to #raw 0x0. Any suggestions?

Thanks in advance!

Can we see the level script?
 

Renegade

Time for real life...
995
Posts
12
Years
Can we see the level script?

Code:
#dynamic 0x800000

#org @start
lock
settrainerflag 0x2AD
settrainerflag 0x2AC
settrainerflag 0x2AB
settrainerflag 0x2AA
settrainerflag 0x2AE
message @t1 6
pause 0x10
applymovement 0x3 @m1
applymovement 0x4 @m1
applymovement 0xFF @m1
waitmovement 0x0
pause 0x10
message @t2 6
special 0x113
applymovement 0x7F @m2
waitmovement 0x0
special 0x114
message @t3 6
showsprite 0x7
clearflag 0x572
applymovement 0x7 @m3
waitmovement 0x0
pause 0x10
special 0x0
trainerbattle 0x1 0x2AD 0x0 @before1 @after1 @further1
end

#org @further1
fanfare 0x103
message @t4 4
waitfanfare
closeonkeypress
applymovement 0x7 @m4
waitmovement 0x0
hidesprite 0x7
setflag 0x572
pause 0x20
message @t5 6
showsprite 0x8
clearflag 0x573
applymovement 0x8 @m3
waitmovement 0x0
pause 0x10
special 0x0
trainerbattle 0x1 0x2AC 0x0 @before2 @after2 @further2
end

#org @further2
fanfare 0x103
message @t4 4
waitfanfare
closeonkeypress
applymovement 0x8 @m4
waitmovement 0x0
hidesprite 0x8
setflag 0x573
pause 0x20
message @t5 6
showsprite 0x9
clearflag 0x574
applymovement 0x9 @m3
waitmovement 0x0
pause 0x10
special 0x0
trainerbattle 0x1 0x2AB 0x0 @before3 @after3 @further3
end

#org @further3
fanfare 0x103
message @t4 4
waitfanfare
closeonkeypress
applymovement 0x9 @m4
waitmovement 0x0
hidesprite 0x9
setflag 0x574
pause 0x20
message @t5 6
showsprite 0xA
clearflag 0x575
applymovement 0xA @m3
waitmovement 0x0
pause 0x10
special 0x0
trainerbattle 0x1 0x2AA 0x0 @before4 @after4 @further4
end

#org @further4
fanfare 0x103
message @t4 4
waitfanfare
closeonkeypress
applymovement 0xA @m4
waitmovement 0x0
hidesprite 0xA
setflag 0x575
pause 0x20
message @t6 6
showsprite 0xB
clearflag 0x576
applymovement 0xB @m5
waitmovement 0x0
pause 0x10
special 0x0
trainerbattle 0x1 0x2AE 0x0 @before5 @after5 @further5
end

#org @further5
fanfare 0x104
message @t7 6
waitfanfare
closeonkeypress
message @t8 6
special 0x113
applymovement 0xFF @m6
waitmovement 0x0
giveitem 0x44 0x1 MSG_OBTAIN
applymovement 0xFF @m7
waitmovement 0x0
applymovement 0xB @m4
waitmovement 0x0
hidesprite 0xB
setflag 0x576
pause 0x20
message @t9 6
applymovement 0x7F @m8
waitmovement 0x0
special 0x114
special 0x0
setvar 0x5035 0x1
release
end

#org @m8
#raw 0x12
#raw 0x12
#raw 0xFE

#org @t9
= \c\h01\h08MASTER CONGO\c\h01\h02: Thank you all\nfor coming today!\pI hope to see you all in\nthe next tournament!

#org @m7
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x3
#raw 0xFE

#org @m6
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0xFE

#org @t8
= \c\h01\h02\v\h01, come receive your\nreward for winning the SILVER\lRANK POKéMON TOURNAMENT!

#org @t7
= \c\h01\h08MASTER CONGO\c\h01\h02: The winner of this\ntournament is \v\h01!

#org @after5
= So, you had the wits to\nstand up to old HOWARD, huh?

#org @before5
= \c\h01\h08CAPTAIN HOWARD\c\h01\h02: I never thought\nyou would make it this\lfar.\pAs your opponent, I promise\nto give you a battle of\la lifetime!\pThis old sailor still has\nsome battle-spirit left\linside him!

#org @m5
#raw 0xD
#raw 0xD
#raw 0xD
#raw 0xF
#raw 0xF
#raw 0x2
#raw 0xFE

#org @t6
= \c\h01\h02Let's get on with the\nfinal battle!\pWhoever wins this battle will\nbe the champion of the\lSILVER RANK POKéMON TOURNAMENT!\pLet's get this battle underway!

#org @after4
= My powers didn't stop you.\nYou must be fated to\lwin this tournament!

#org @before4
= \c\h01\h04COMPETITOR\c\h01\h02: Everyone has psychic\nabilities, they just need\lto find it in themselves!

#org @after3
= Not only did I lose\nthe battle, but I also\llost some respect as a\lPOKéMON trainer...

#org @before3
= \c\h01\h08COMPETITOR\c\h01\h02: My POKéMON will\nlive up to their potential\lreputation!

#org @after2
= I couldn't defend\nmyself...

#org @before2
= \c\h01\h04COMPETITOR\c\h01\h02: I'll crush you\nlike a bug!\pBring it on!

#org @t5
= \c\h01\h02Let's get on with the\nnext battle!

#org @m4
#raw 0x12
#raw 0x12
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

#org @t4
= \c\h01\h08MASTER CONGO\c\h01\h02: A great victory\nfor \v\h01!

#org @after1
= Oh man!\nYou're tough!

#org @before1
= \c\h01\h08COMPETITOR\c\h01\h02: I have to win\nthis battle!\pI'm doing this for\nmy family!

#org @m3
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x2
#raw 0xFE

#org @t3
= \c\h01\h02Welcome, everyone!\nTo the SILVER RANK POKéMON\lTOURNAMENT!\pI am your host!\nMy name is \c\h01\h08MASTER CONGO\c\h01\h02.\pThis will be a continuous five\nround tournament.\pAfter each battle, all of the\nwinning trainer's POKéMON will be\lcompletely healed.\pThe skilled trainer that wins\nthe competition will receive\la \c\h01\h06RARE CANDY\c\h01\h02 as an\laward!\pNow then, on with the\nfirst battle!

#org @m2
#raw 0x13
#raw 0x13
#raw 0xFE

#org @t2
= \c\h01\h02Thank you.

#org @m1
#raw 0x3
#raw 0xFE

#org @t1
= \c\h01\h08MASTER CONGO\c\h01\h02: Everyone quiet\ndown!
 

itman

Back to ROM hacking. :D
98
Posts
16
Years
  • Age 30
  • Seen Feb 5, 2014
Code:
#dynamic 0x800000

#org @start
lock
settrainerflag 0x2AD
settrainerflag 0x2AC
settrainerflag 0x2AB
settrainerflag 0x2AA
settrainerflag 0x2AE
message @t1 6
pause 0x10
applymovement 0x3 @m1
applymovement 0x4 @m1
applymovement 0xFF @m1
waitmovement 0x0
pause 0x10
message @t2 6
special 0x113
applymovement 0x7F @m2
waitmovement 0x0
special 0x114
message @t3 6
showsprite 0x7
clearflag 0x572
applymovement 0x7 @m3
waitmovement 0x0
pause 0x10
special 0x0
trainerbattle 0x1 0x2AD 0x0 @before1 @after1 @further1
end

#org @further1
fanfare 0x103
message @t4 4
waitfanfare
closeonkeypress
applymovement 0x7 @m4
waitmovement 0x0
hidesprite 0x7
setflag 0x572
pause 0x20
message @t5 6
showsprite 0x8
clearflag 0x573
applymovement 0x8 @m3
waitmovement 0x0
pause 0x10
special 0x0
trainerbattle 0x1 0x2AC 0x0 @before2 @after2 @further2
end

#org @further2
fanfare 0x103
message @t4 4
waitfanfare
closeonkeypress
applymovement 0x8 @m4
waitmovement 0x0
hidesprite 0x8
setflag 0x573
pause 0x20
message @t5 6
showsprite 0x9
clearflag 0x574
applymovement 0x9 @m3
waitmovement 0x0
pause 0x10
special 0x0
trainerbattle 0x1 0x2AB 0x0 @before3 @after3 @further3
end

#org @further3
fanfare 0x103
message @t4 4
waitfanfare
closeonkeypress
applymovement 0x9 @m4
waitmovement 0x0
hidesprite 0x9
setflag 0x574
pause 0x20
message @t5 6
showsprite 0xA
clearflag 0x575
applymovement 0xA @m3
waitmovement 0x0
pause 0x10
special 0x0
trainerbattle 0x1 0x2AA 0x0 @before4 @after4 @further4
end

#org @further4
fanfare 0x103
message @t4 4
waitfanfare
closeonkeypress
applymovement 0xA @m4
waitmovement 0x0
hidesprite 0xA
setflag 0x575
pause 0x20
message @t6 6
showsprite 0xB
clearflag 0x576
applymovement 0xB @m5
waitmovement 0x0
pause 0x10
special 0x0
trainerbattle 0x1 0x2AE 0x0 @before5 @after5 @further5
end

#org @further5
fanfare 0x104
message @t7 6
waitfanfare
closeonkeypress
message @t8 6
special 0x113
applymovement 0xFF @m6
waitmovement 0x0
giveitem 0x44 0x1 MSG_OBTAIN
applymovement 0xFF @m7
waitmovement 0x0
applymovement 0xB @m4
waitmovement 0x0
hidesprite 0xB
setflag 0x576
pause 0x20
message @t9 6
applymovement 0x7F @m8
waitmovement 0x0
special 0x114
special 0x0
setvar 0x5035 0x1
release
end

#org @m8
#raw 0x12
#raw 0x12
#raw 0xFE

#org @t9
= \c\h01\h08MASTER CONGO\c\h01\h02: Thank you all\nfor coming today!\pI hope to see you all in\nthe next tournament!

#org @m7
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x3
#raw 0xFE

#org @m6
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0xFE

#org @t8
= \c\h01\h02\v\h01, come receive your\nreward for winning the SILVER\lRANK POKéMON TOURNAMENT!

#org @t7
= \c\h01\h08MASTER CONGO\c\h01\h02: The winner of this\ntournament is \v\h01!

#org @after5
= So, you had the wits to\nstand up to old HOWARD, huh?

#org @before5
= \c\h01\h08CAPTAIN HOWARD\c\h01\h02: I never thought\nyou would make it this\lfar.\pAs your opponent, I promise\nto give you a battle of\la lifetime!\pThis old sailor still has\nsome battle-spirit left\linside him!

#org @m5
#raw 0xD
#raw 0xD
#raw 0xD
#raw 0xF
#raw 0xF
#raw 0x2
#raw 0xFE

#org @t6
= \c\h01\h02Let's get on with the\nfinal battle!\pWhoever wins this battle will\nbe the champion of the\lSILVER RANK POKéMON TOURNAMENT!\pLet's get this battle underway!

#org @after4
= My powers didn't stop you.\nYou must be fated to\lwin this tournament!

#org @before4
= \c\h01\h04COMPETITOR\c\h01\h02: Everyone has psychic\nabilities, they just need\lto find it in themselves!

#org @after3
= Not only did I lose\nthe battle, but I also\llost some respect as a\lPOKéMON trainer...

#org @before3
= \c\h01\h08COMPETITOR\c\h01\h02: My POKéMON will\nlive up to their potential\lreputation!

#org @after2
= I couldn't defend\nmyself...

#org @before2
= \c\h01\h04COMPETITOR\c\h01\h02: I'll crush you\nlike a bug!\pBring it on!

#org @t5
= \c\h01\h02Let's get on with the\nnext battle!

#org @m4
#raw 0x12
#raw 0x12
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

#org @t4
= \c\h01\h08MASTER CONGO\c\h01\h02: A great victory\nfor \v\h01!

#org @after1
= Oh man!\nYou're tough!

#org @before1
= \c\h01\h08COMPETITOR\c\h01\h02: I have to win\nthis battle!\pI'm doing this for\nmy family!

#org @m3
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x2
#raw 0xFE

#org @t3
= \c\h01\h02Welcome, everyone!\nTo the SILVER RANK POKéMON\lTOURNAMENT!\pI am your host!\nMy name is \c\h01\h08MASTER CONGO\c\h01\h02.\pThis will be a continuous five\nround tournament.\pAfter each battle, all of the\nwinning trainer's POKéMON will be\lcompletely healed.\pThe skilled trainer that wins\nthe competition will receive\la \c\h01\h06RARE CANDY\c\h01\h02 as an\laward!\pNow then, on with the\nfirst battle!

#org @m2
#raw 0x13
#raw 0x13
#raw 0xFE

#org @t2
= \c\h01\h02Thank you.

#org @m1
#raw 0x3
#raw 0xFE

#org @t1
= \c\h01\h08MASTER CONGO\c\h01\h02: Everyone quiet\ndown!

Random things to toy around with that sometimes works:

1. Move the special 0x113 in the further5 to RIGHT before the move camera (applymovement 0x7F).

2. In the last text box (t9), change the colon to the hex version (i forget but it's in Diego's guide). Sometimes in my scripts using the colon screws up my script in certain messages, Idk why.
 

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
You can use Advance Starter if thats wat u mean google it
That's not really it xD As he means in-game ;)

As for the answer.

Assign a special flag to each starter that you will be checking in rival's scripts ;)

I'll give you an example.

Let's have 3 starters: Treecko, Torchic, Mudkip.
In Treecko's giving script you put setflag 0x701
In Torchic's script you put setflag 0x702
And in Mudkip's you put setflag 0x703

And then, once battle with rival is about to happen you use this:

checkflag 0x701
compare 0x800D 0x1
if 0x1 goto @battle1

checkflag 0x702
compare 0x800D 0x1
if 0x1 goto @battle2

checkflag 0x702
compare 0x800D 0x1
if 0x1 goto @battle3

Those @battle will have trainerbattle with the starter that will be strong against player's one.
Of course, rival always need to have 3 versions of one battle.
 

itman

Back to ROM hacking. :D
98
Posts
16
Years
  • Age 30
  • Seen Feb 5, 2014

That's not really it xD As he means in-game ;)

As for the answer.

Assign a special flag to each starter that you will be checking in rival's scripts ;)

I'll give you an example.

Let's have 3 starters: Treecko, Torchic, Mudkip.
In Treecko's giving script you put setflag 0x701
In Torchic's script you put setflag 0x702
And in Mudkip's you put setflag 0x703

And then, once battle with rival is about to happen you use this:

checkflag 0x701
compare 0x800D 0x1
if 0x1 goto @battle1

checkflag 0x702
compare 0x800D 0x1
if 0x1 goto @battle2

checkflag 0x702
compare 0x800D 0x1
if 0x1 goto @battle3

Those @battle will have trainerbattle with the starter that will be strong against player's one.
Of course, rival always need to have 3 versions of one battle.

The "compare 0x800D 0x1" lines are unnecessary and just take up more room, it's best to take them out.
 

Pokedorkus

Zen Darumaka
6
Posts
11
Years
  • Age 26
  • Seen Jan 31, 2013
Help me So i was editing or hacking my map with A map when i opened A trainer to edit trainers and i added trainers and such when i closed it and came back the names of the pokemons were messed up they would have codes with europeen accents and stuff or they would be blank so it would say a wild appered WTF this has happened 2 times on pokemon emerald and i tested it out on saphire and i happened on it as well should i use PET but i need to add new trainers and these codes would affect every thing including in a map it would say the codes? what is happening any advice would be appreciated.
 

Herpahermaderp

I liek Mudkipz
66
Posts
11
Years
  • Age 25
  • USA
  • Seen Jan 3, 2017
Does anybody know the ASM routine for naming the player? I'm making a script for my hack team and they need it so the player doesn't get named at the Prof. intro but later on in the game.
 
72
Posts
12
Years
  • Seen Sep 30, 2017
Hi. So, I made this levelscript:
Code:
#dynamic 0x800000
#org @start
lock
compare 0x7006 0x1
if 0x0 goto @getpokemon
if 0x1 goto @checkgary

#org @checkgary
checkflag 0x828
if 0x1 goto @garystay
if 0x0 goto @end
release
end

#org @end
release
end

#org @garystay
movesprite2 0x02 0x10 0x5
spritebehave 0x02 0x9
setflag 0x903
release
end

#org @getpokemon
applymovement 0x02 @move1
waitmovement 0x0
applymovement 0xFF @move2
waitmovement 0x0
goto @messages

#org @messages
msgbox @1 0x5
compare LASTRESULT 0x0
if 0x1 goto @what
compare LASTRESULT 0x1
if 0x1 goto @getpokemon2
release
end

#org @what
msgbox @2 0x2
goto @getpokemon2
release
end

#org @getpokemon2
msgbox @3 0x2
msgbox @4 0x2
goto @test

#org @test
msgbox @5 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong
msgbox @6 0x5
compare LASTRESULT 0x0
if 0x1 goto @wrong
msgbox @7 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong
msgbox @8 0x5
compare LASTRESULT 0x0
if 0x1 goto @wrong
msgbox @9 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong0
msgbox @10 0x2
setvar 0x7006 0x1
applymovement 0xFF @move3
release
end

#org @wrong
msgbox @wrong1 0x2
goto @test

#org @wrong0
msgbox @wrong2 0x2
goto @test

#org @move1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x2
#raw 0xFE

#org @move2
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @move3
#raw 0x13
#raw 0xFE

#org @1
= Hello there! Did [rival] bring you?

#org @2
= [rival]: He is joking, Professor. I\nbrought him here.

#org @3
= OAK: Ah, that means you want to be\na Pokémon Trainer! Well, that can\lbe arranged. I have three Pokémon\lon this table. You can pick one.\lIf..... you pass my exam!

#org @4
= You see, raising a Pokémon is a\nbig responsibility. You have to\lprove to me you know enough about\lthese great creatures and what to\ldo with them. If you answer the\lfollowing five questions\lcorrectly, you will have passed\lthe exam. So, let's start!

#org @5
= OAK: First question: Your Pokémon\nis poisoned. You should use\lPROTEIN to get rid of this status\lailment. Correct?

#org @6
= OAK: Very good! ANTIDOTE is often\nused to cure a poisoned Pokémon.\lPROTEIN is used to increase the\lAttack Stat of a Pokémon. Question\lnumber two: If most of your\lPokémon fainted, you should try to\lfind a Pokémon Center. Correct?

#org @7
= OAK: Excellent! You could also use\nPOTIONs or other healing items,\lbut healing your Pokémon at a\lPokémon Center is free of charge.\lThird question: Using your Pokémon\lto attack other Pokémon Trainers\lis all fair game in a battle.\lCorrect?

#org @8
= OAK: Great work! Attacking other\nTrainers is strictly forbidden and\lin some cases extremely dangerous.\lYou're almost there! Question\lfour: Even Pokémon without wings\lcan sometimes use FLY. Correct?

#org @9
= OAK: Yeah. That's kind of messed\nup. How can a DODRIO use Fly? Does\lit transforms its three heads into\lsome sort of helicopter rotor? I\ldon't know, it's just weird.\lAnyway, the final question! In\lKanto, there is toooootally a Mew\lbehind the truck at the St. Anne's\lport. Like, totally for sure. I'm\lsuper serial.

#org @wrong1
= I am afraid you are mistaken.\nLet's start at the beginning\lagain, shall we?

#org @wrong2
= OAK: What? What is wrong with you?\nOf course there is no Mew. Idiot.\lBack to the first question with\lyou. Moron. You are worse than\lBatman.

#org @10
= OAK: You did great. You answered\nall my questions correctly. You\lare ready to go on a great\ladventure, accompanied by your\lPokémon. Go ahead, pick one!

It works perfectly at the start, I use 02 Validates Value, but when the script is supposed to finish I get this:
2ak01sp.jpg


And I can't move or do anything. Only press 'A' and I get this message again and again and again and again and again...

What causes this? And how can I make sure I get 'set free' and move around?
 

miksy91

Dark Energy is back in action! ;)
1,480
Posts
15
Years
Hi. So, I made this levelscript:
Code:
#dynamic 0x800000
#org @start
lock
compare 0x7006 0x1
if 0x0 goto @getpokemon
if 0x1 goto @checkgary
 
#org @checkgary
checkflag 0x828
if 0x1 goto @garystay
if 0x0 goto @end
release
end
 
#org @end
release
end
 
#org @garystay
movesprite2 0x02 0x10 0x5
spritebehave 0x02 0x9
setflag 0x903
release
end
 
#org @getpokemon
applymovement 0x02 @move1
waitmovement 0x0
applymovement 0xFF @move2
waitmovement 0x0
goto @messages
 
#org @messages
msgbox @1 0x5
compare LASTRESULT 0x0
if 0x1 goto @what
compare LASTRESULT 0x1
if 0x1 goto @getpokemon2
release
end
 
#org @what
msgbox @2 0x2
goto @getpokemon2
release
end
 
#org @getpokemon2
msgbox @3 0x2
msgbox @4 0x2
goto @test
 
#org @test
msgbox @5 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong
msgbox @6 0x5
compare LASTRESULT 0x0
if 0x1 goto @wrong
msgbox @7 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong
msgbox @8 0x5
compare LASTRESULT 0x0
if 0x1 goto @wrong
msgbox @9 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong0
msgbox @10 0x2
setvar 0x7006 0x1
applymovement 0xFF @move3
release
end
 
#org @wrong
msgbox @wrong1 0x2
goto @test
 
#org @wrong0
msgbox @wrong2 0x2
goto @test
 
#org @move1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x2
#raw 0xFE
 
#org @move2
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE
 
#org @move3
#raw 0x13
#raw 0xFE
 
#org @1
= Hello there! Did [rival] bring you?
 
#org @2
= [rival]: He is joking, Professor. I\nbrought him here.
 
#org @3
= OAK: Ah, that means you want to be\na Pokémon Trainer! Well, that can\lbe arranged. I have three Pokémon\lon this table. You can pick one.\lIf..... you pass my exam!
 
#org @4
= You see, raising a Pokémon is a\nbig responsibility. You have to\lprove to me you know enough about\lthese great creatures and what to\ldo with them. If you answer the\lfollowing five questions\lcorrectly, you will have passed\lthe exam. So, let's start!
 
#org @5
= OAK: First question: Your Pokémon\nis poisoned. You should use\lPROTEIN to get rid of this status\lailment. Correct?
 
#org @6
= OAK: Very good! ANTIDOTE is often\nused to cure a poisoned Pokémon.\lPROTEIN is used to increase the\lAttack Stat of a Pokémon. Question\lnumber two: If most of your\lPokémon fainted, you should try to\lfind a Pokémon Center. Correct?
 
#org @7
= OAK: Excellent! You could also use\nPOTIONs or other healing items,\lbut healing your Pokémon at a\lPokémon Center is free of charge.\lThird question: Using your Pokémon\lto attack other Pokémon Trainers\lis all fair game in a battle.\lCorrect?
 
#org @8
= OAK: Great work! Attacking other\nTrainers is strictly forbidden and\lin some cases extremely dangerous.\lYou're almost there! Question\lfour: Even Pokémon without wings\lcan sometimes use FLY. Correct?
 
#org @9
= OAK: Yeah. That's kind of messed\nup. How can a DODRIO use Fly? Does\lit transforms its three heads into\lsome sort of helicopter rotor? I\ldon't know, it's just weird.\lAnyway, the final question! In\lKanto, there is toooootally a Mew\lbehind the truck at the St. Anne's\lport. Like, totally for sure. I'm\lsuper serial.
 
#org @wrong1
= I am afraid you are mistaken.\nLet's start at the beginning\lagain, shall we?
 
#org @wrong2
= OAK: What? What is wrong with you?\nOf course there is no Mew. Idiot.\lBack to the first question with\lyou. Moron. You are worse than\lBatman.
 
#org @10
= OAK: You did great. You answered\nall my questions correctly. You\lare ready to go on a great\ladventure, accompanied by your\lPokémon. Go ahead, pick one!

It works perfectly at the start, I use 02 Validates Value, but when the script is supposed to finish I get this:
2ak01sp.jpg


And I can't move or do anything. Only press 'A' and I get this message again and again and again and again and again...

What causes this? And how can I make sure I get 'set free' and move around?
It's "impossible" to tell what's causing it but I'd advise you to check out the following:
1) You're using right ending commands (there are different scripting commands for ending level scripts and normal scripts in G/S/C, probably also for Firered).
2) You're calling "right" type of a level script
 

Renegade

Time for real life...
995
Posts
12
Years
Hi. So, I made this levelscript:
Code:
#dynamic 0x800000
#org @start
lock
compare 0x7006 0x1
if 0x0 goto @getpokemon
if 0x1 goto @checkgary

#org @checkgary
checkflag 0x828
if 0x1 goto @garystay
if 0x0 goto @end
release
end

#org @end
release
end

#org @garystay
movesprite2 0x02 0x10 0x5
spritebehave 0x02 0x9
setflag 0x903
release
end

#org @getpokemon
applymovement 0x02 @move1
waitmovement 0x0
applymovement 0xFF @move2
waitmovement 0x0
goto @messages

#org @messages
msgbox @1 0x5
compare LASTRESULT 0x0
if 0x1 goto @what
compare LASTRESULT 0x1
if 0x1 goto @getpokemon2
release
end

#org @what
msgbox @2 0x2
goto @getpokemon2
release
end

#org @getpokemon2
msgbox @3 0x2
msgbox @4 0x2
goto @test

#org @test
msgbox @5 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong
msgbox @6 0x5
compare LASTRESULT 0x0
if 0x1 goto @wrong
msgbox @7 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong
msgbox @8 0x5
compare LASTRESULT 0x0
if 0x1 goto @wrong
msgbox @9 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong0
msgbox @10 0x2
setvar 0x7006 0x1
applymovement 0xFF @move3
release
end

#org @wrong
msgbox @wrong1 0x2
goto @test

#org @wrong0
msgbox @wrong2 0x2
goto @test

#org @move1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x2
#raw 0xFE

#org @move2
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @move3
#raw 0x13
#raw 0xFE

#org @1
= Hello there! Did [rival] bring you?

#org @2
= [rival]: He is joking, Professor. I\nbrought him here.

#org @3
= OAK: Ah, that means you want to be\na Pokémon Trainer! Well, that can\lbe arranged. I have three Pokémon\lon this table. You can pick one.\lIf..... you pass my exam!

#org @4
= You see, raising a Pokémon is a\nbig responsibility. You have to\lprove to me you know enough about\lthese great creatures and what to\ldo with them. If you answer the\lfollowing five questions\lcorrectly, you will have passed\lthe exam. So, let's start!

#org @5
= OAK: First question: Your Pokémon\nis poisoned. You should use\lPROTEIN to get rid of this status\lailment. Correct?

#org @6
= OAK: Very good! ANTIDOTE is often\nused to cure a poisoned Pokémon.\lPROTEIN is used to increase the\lAttack Stat of a Pokémon. Question\lnumber two: If most of your\lPokémon fainted, you should try to\lfind a Pokémon Center. Correct?

#org @7
= OAK: Excellent! You could also use\nPOTIONs or other healing items,\lbut healing your Pokémon at a\lPokémon Center is free of charge.\lThird question: Using your Pokémon\lto attack other Pokémon Trainers\lis all fair game in a battle.\lCorrect?

#org @8
= OAK: Great work! Attacking other\nTrainers is strictly forbidden and\lin some cases extremely dangerous.\lYou're almost there! Question\lfour: Even Pokémon without wings\lcan sometimes use FLY. Correct?

#org @9
= OAK: Yeah. That's kind of messed\nup. How can a DODRIO use Fly? Does\lit transforms its three heads into\lsome sort of helicopter rotor? I\ldon't know, it's just weird.\lAnyway, the final question! In\lKanto, there is toooootally a Mew\lbehind the truck at the St. Anne's\lport. Like, totally for sure. I'm\lsuper serial.

#org @wrong1
= I am afraid you are mistaken.\nLet's start at the beginning\lagain, shall we?

#org @wrong2
= OAK: What? What is wrong with you?\nOf course there is no Mew. Idiot.\lBack to the first question with\lyou. Moron. You are worse than\lBatman.

#org @10
= OAK: You did great. You answered\nall my questions correctly. You\lare ready to go on a great\ladventure, accompanied by your\lPokémon. Go ahead, pick one!

It works perfectly at the start, I use 02 Validates Value, but when the script is supposed to finish I get this:
2ak01sp.jpg


And I can't move or do anything. Only press 'A' and I get this message again and again and again and again and again...

What causes this? And how can I make sure I get 'set free' and move around?

This problem is very common and the way to fix it is in here:

http://www.pokecommunity.com/showthread.php?t=191500&highlight=cooley

Go to the header tab in A-Map, click Ctrl + H, copy the map script offset, paste it into XSE and decompile it with "level script" checked. If you look down from there a few lines, you should see something like this:

#raw 0xFFFF

Change it so that it shows this:

#raw 0x0

From there, click compile and test it out in-game.
 
Status
Not open for further replies.
Back
Top