Script Help Thread (DO NOT REQUEST SCRIPTS) Page 212

Started by HackMew December 20th, 2008 5:10 AM
  • 625760 views
  • 9682 replies
Male
Seen 5 Days Ago
Posted 5 Days Ago
98 posts
12.8 Years

There are many reasons for this.
  1. You have the incorrect offset of the script in A-Map
  2. You are using a bad location in the ROM (Some places get overwritten as the game-play progresses)
  3. You are using movement scripts without setting an unused variable to 0003 in A-Map. 4050 is a good choice
  4. You are not using XSE.
  5. You are pasting the offset to a ROM that you are not using.
I'm guilty of the last one. I tried everything, and then realized that I wasn't testing the ROM I changed. I was testing a completely different ROM. Trust me, it happens. So make sure that you're testing the ROM that you're changing.
[/QUOTE]


Well, I click to add a person event and the person I add is right in front of the house in pallet town(fire red). So I know I'm using the right ROM. I'm using XSE and then batch compiler. Then it finds me an offset and I copy it and paste it into the offset section in Advanced Map on the person event I just added. I save like a millions times and then try it. The person is always there. As many times as I try something different they are always where I put them but they dont' say anything.

Spoiler:

lock
faceplayer
msgbox @talk 0x6
release
end

#org @talk
= (text u wanna insert)


Spoiler:

#dynamic 0x800000
#org @text
lock
faceplayer
msgbox @gls 0x6
release
end

#org @gls


Is something wrong with my scripts?
Age 28
Male
Seen June 3rd, 2013
Posted February 19th, 2012
23 posts
13.1 Years
Okay, here is the issue:

Game: FireRed
Type: Trigger
Editor: AM/XSE
Script:
Spoiler:

'---------------
#org 0x71C1FC
checkflag 0x200
if 0x0 goto 0x871C2FD
release
end

'---------------
#org 0x71C2FD
lock
setflag 0x200
applymovement 0x1 0x871C95C
applymovement MOVE_PLAYER 0x871CF7C
waitmovement 0xFF
waitmovement 0x1
msgbox 0x871CAC8 MSG_NORMAL '"..."
giveitem 0x0 0x1 MSG_OBTAIN
msgbox 0x871CB85 MSG_NORMAL '"..."
applymovement 0x1 0x871CCB4
waitmovement 0x1
release
end


'---------
' Strings
'---------
#org 0x71CAC8
= TEST TEXT 1...

#org 0x71CB85
= TEST TEXT 2...


'-----------
' Movements
'-----------
#org 0x71C95C
...
#raw 0xFE 'End of Movements

#org 0x71CF7C
...
#raw 0xFE 'End of Movements

#org 0x71CCB4
...
#raw 0xFE 'End of Movements


At the end of the script, it freezes the game... I don't know whats wrong.
My Kanto / Johto map. ©MikeMatt15 2011
Male
Cyberspace
Seen June 27th, 2018
Posted December 10th, 2017
104 posts
12.5 Years

There are many reasons for this.
  1. You have the incorrect offset of the script in A-Map
  2. You are using a bad location in the ROM (Some places get overwritten as the game-play progresses)
  3. You are using movement scripts without setting an unused variable to 0003 in A-Map. 4050 is a good choice
  4. You are not using XSE.
  5. You are pasting the offset to a ROM that you are not using.
I'm guilty of the last one. I tried everything, and then realized that I wasn't testing the ROM I changed. I was testing a completely different ROM. Trust me, it happens. So make sure that you're testing the ROM that you're changing.


Well, I click to add a person event and the person I add is right in front of the house in pallet town(fire red). So I know I'm using the right ROM. I'm using XSE and then batch compiler. Then it finds me an offset and I copy it and paste it into the offset section in Advanced Map on the person event I just added. I save like a millions times and then try it. The person is always there. As many times as I try something different they are always where I put them but they dont' say anything.

Spoiler:

#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @talk 0x6
release
end

#org @talk
= (text u wanna insert)


Spoiler:

#dynamic 0x800000
#org @text
lock
faceplayer
msgbox @gls 0x6
release
end

#org @gls
= Text to say


Is something wrong with my scripts?
Indeed. I'm surprised that the scripts compile. I fixed the scripts in the quote. =) In any case, I don't use the batch compiler, I simply use the compile button (The icon on the toolbar with two gears. Saving in XSE does nothing, and in order to see any change, you have to completely close the ROM and open it again, and I'd suggest starting the game from the beginning. If not, at least enter and leave a building, before actually seeing if the code changed.

The only other thing I can see happening is misunderstanding which offset means what. =P

Okay, here is the issue:

Game: FireRed
Type: Trigger
Editor: AM/XSE
Script:
Spoiler:

'---------------
#org 0x71C1FC
checkflag 0x200
if 0x0 goto 0x871C2FD
//release ' You don't need "release" if you didn't use "lock"
end

'---------------
#org 0x71C2FD
lock
setflag 0x200
applymovement 0x1 0x871C95C
applymovement MOVE_PLAYER 0x871CF7C
//waitmovement 0xFF // You only need ONE of these.
//waitmovement 0x1 // Both are not needed.
waitmovement 0x0 // makes sure both movements happen before continuing
msgbox 0x871CAC8 MSG_NORMAL '"..."
giveitem 0x0 0x1 MSG_OBTAIN
msgbox 0x871CB85 MSG_NORMAL '"..."
applymovement 0x1 0x871CCB4
waitmovement 0x0 //While you CAN use 0x1 here, using 0x0 is better.
release
end


'---------
' Strings
'---------
#org 0x71CAC8
= TEST TEXT 1...

#org 0x71CB85
= TEST TEXT 2...


'-----------
' Movements
'-----------
#org 0x71C95C
...
#raw 0xFE 'End of Movements

#org 0x71CF7C
...
#raw 0xFE 'End of Movements

#org 0x71CCB4
...
#raw 0xFE 'End of Movements


At the end of the script, it freezes the game... I don't know whats wrong.
The only problems I saw are changed in RED in the quote. Other than those things, nothing is really wrong with the script. It could freeze for other reasons, such as incorrect movements, invalid movements, etc.
Want my help in PokéScripting? PM me =)
I use XSE v1.1.1 (HackMew = awesome) and Advance Map 1.92.
Thanks to Diego and HackMew for their tutorials, helping me learn how to script!

Hacks I support 100% (MUST SEE!):


Very well made hacks:

My work:
Figuring out scripting in PMD
Entire script map of LeafGreen
PMDSE (Pokémon Mystery Dungeon Script Editor)

redriders180

Mastermind of Pokemon Glazed

Male
Path of Victory, Tunod
Seen December 17th, 2016
Posted November 17th, 2015
314 posts
12.9 Years
Thanks for the help, the script now works!

I just have another question...How do I change where the player starts when the player starts a new game? I'm modifying a Ruby Rom, and it starts by having seperate genders in seperate houses, but I want to change that so both genders start in one house, and in their room instead of outside the house and all that walking, etc.

Also, when you have a script, i think i know what to do, but when you have a person event, and you want them to walk away, do you have to do anything special to make the applymovement command work?

Thanks for the help ^w^
Male
Seen 5 Days Ago
Posted 5 Days Ago
98 posts
12.8 Years


Indeed. I'm surprised that the scripts compile. I fixed the scripts in the quote. =) In any case, I don't use the batch compiler, I simply use the compile button (The icon on the toolbar with two gears. Saving in XSE does nothing, and in order to see any change, you have to completely close the ROM and open it again, and I'd suggest starting the game from the beginning. If not, at least enter and leave a building, before actually seeing if the code changed.

The only other thing I can see happening is misunderstanding which offset means what. =P



The only problems I saw are changed in RED in the quote. Other than those things, nothing is really wrong with the script. It could freeze for other reasons, such as incorrect movements, invalid movements, etc.
Yes I do have to close out of the game to see the new code take effect but I still don't get any messaging. I don't have to start from the very beginning. I think Ill make another video. Maybe someone can point out my mistake. I know I got a script for obtaining the national dex much earlier so all pokemon could evolve but the person who gives it to you is in viridian in my hack and he doesn't say anything. Just a Duh Duh Duh Da music like you got something and thats it.
Male
Seen April 8th, 2011
Posted March 14th, 2011
6 posts
12.3 Years
So, I want Professor Lilac (PKMN. PROF. in my game) to ask the player what type of pokemon they want, and then which pokemon in that category, and if they say no to all, then she starts at the top again. The player starts in the Lab, and the problem is, Prof. Lilac's sprite isnt even there when I start the game! Please help this is my first time scripting and I still havent gotten a nice scrip to work...:'( Its a ruby hack btw


EDIT---Yes she has a person Id



'---------------
#org 0x152D9A
lock
faceplayer
if 0x0 goto 0x86B34D5
release
end

'---------------
#org 0x6B34D5
lock
faceplayer
msgbox 0x86B5624 MSG_YESNO '"PROF. LILAC: Ah, [player]!\pHow wo..."
compare LASTRESULT 0x0
if 0x1 goto 0x86B3510
compare LASTRESULT 0x1
if 0x1 goto 0x86B351B
release
end

'---------------
#org 0x6B3510
msgbox 0x86B5DF0 MSG_KEEPOPEN '"PROF. LILAC: Well alright..."
release
end

'---------------
#org 0x6B351B
lock
faceplayer
msgbox 0x86B64B9 MSG_YESNO '"PROF. LILAC: OK.\pWould you like a..."
compare LASTRESULT 0x0
if 0x1 goto 0x86B353E
compare LASTRESULT 0x1
if 0x1 goto 0x86B3584
release
end

'---------------
#org 0x6B353E
lock
faceplayer
msgbox 0x86B55E3 MSG_YESNO '"Fine.\pDo you want a Water \ntype ..."
compare LASTRESULT 0x0
if 0x1 goto 0x86B3561
compare LASTRESULT 0x1
if 0x1 goto 0x86B4EB4
release
end

'---------------
#org 0x6B3584
lock
faceplayer
msgbox 0x86B559B MSG_YESNO '"Do You want CHARMANDER?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B35A7
compare LASTRESULT 0x1
if 0x1 goto 0x86B36B9
release
end

'---------------
#org 0x6B3561
lock
faceplayer
msgbox 0x86B55B5 MSG_YESNO '"Alright.\pDo You want a Grass\n Ty..."
compare LASTRESULT 0x0
if 0x1 goto 0x86B3561
compare LASTRESULT 0x1
if 0x1 goto 0x86B4FB7
release
end

'---------------
#org 0x6B4EB4
faceplayer
msgbox 0x86B5DC1 MSG_YESNO '"Do you want SQUIRTLE?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B37B5
compare LASTRESULT 0x1
if 0x1 goto 0x86B3776
release
end

'---------------
#org 0x6B35A7
lock
faceplayer
msgbox 0x86B5DD9 MSG_YESNO '"How about CYNDAQUIL?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B4DA3
compare LASTRESULT 0x1
if 0x1 goto 0x86B36F8
release
end

'---------------
#org 0x6B36B9
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5E70 MSG_KEEPOPEN '"(player) received a CHARMANDER!"
waitfanfare
closeonkeypress
setvar 0x4000 0x0
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B4FB7
faceplayer
msgbox 0x86B5E0F MSG_YESNO '"Do you want BULBASAUR?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B4FD9
compare LASTRESULT 0x1
if 0x1 goto 0x86B62FF
release
end

'---------------
#org 0x6B37B5
givepokemon 0x158 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5EF2 MSG_KEEPOPEN '"(player) received a TOTODILE!"
waitfanfare
closeonkeypress
setvar 0x4000 0x4
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B3776
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5ED2 MSG_KEEPOPEN '"(player) received a SQUIRTLE!"
waitfanfare
closeonkeypress
setvar 0x4000 0x3
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B4DA3
lock
faceplayer
msgbox 0x86B560E MSG_YESNO '"What about TORCHIC?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B351B
compare LASTRESULT 0x1
if 0x1 goto 0x86B3737
release
end

'---------------
#org 0x6B36F8
givepokemon 0x155 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5E92 MSG_KEEPOPEN '"(player) received a CYNDAQUIL!"
waitfanfare
closeonkeypress
setvar 0x4000 0x1
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x1A74EB
'---------------
#org 0x6B4FD9
faceplayer
msgbox 0x86B5E3E MSG_YESNO '"How about CHIKORITA?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B5FB4
compare LASTRESULT 0x1
if 0x1 goto 0x86B633E
release
end

'---------------
#org 0x6B62FF
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5F30 MSG_KEEPOPEN '"(player) received a BULBASAUR!"
waitfanfare
closeonkeypress
setvar 0x4000 0x6
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B3737
givepokemon 0x280 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5EB3 MSG_KEEPOPEN '"(player) received a TORCHIC!"
waitfanfare
closeonkeypress
setvar 0x4000 0x2
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B5FB4
faceplayer
msgbox 0x86B5E55 MSG_YESNO '"What about want TREECKO?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B351B
compare LASTRESULT 0x1
if 0x1 goto 0x86B38B1
release
end

'---------------
#org 0x6B633E
givepokemon 0x152 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5F51 MSG_KEEPOPEN '"(player) received a CHIKORITA!"
waitfanfare
closeonkeypress
setvar 0x4000 0x7
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B38B1
givepokemon 0x277 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5F72 MSG_KEEPOPEN '"(player) received a TREECKO!"
waitfanfare
closeonkeypress
setvar 0x4000 0x8
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end


'---------
' Strings
'---------
#org 0x6B5624
= PROF. LILAC: Ah, [player]!\pHow would you like a POKEMON?

#org 0x6B5DF0
= PROF. LILAC: Well alright...

#org 0x6B64B9
= PROF. LILAC: OK.\pWould you like a Fire \nType POKEMON?

#org 0x6B55E3
= Fine.\pDo you want a Water \ntype POKEMON?

#org 0x6B559B
= Do You want CHARMANDER?

#org 0x6B55B5
= Alright.\pDo You want a Grass\n Type POKEMON?

#org 0x6B5DC1
= Do you want SQUIRTLE?

#org 0x6B5DD9
= How about CYNDAQUIL?

#org 0x6B5E70
= (player) received a CHARMANDER!

#org 0x6B5F91
= You should name your\nnew POKEMON.

#org 0x6B38F1
= This is the start\nof your adventure,\n(player)!

#org 0x6B5E0F
= Do you want BULBASAUR?

#org 0x6B5EF2
= (player) received a TOTODILE!

#org 0x6B5ED2
= (player) received a SQUIRTLE!

#org 0x6B560E
= What about TORCHIC?

#org 0x6B5E92
= (player) received a CYNDAQUIL!

#org 0x6B5E3E
= How about CHIKORITA?

#org 0x6B5F30
= (player) received a BULBASAUR!

#org 0x6B5EB3
= (player) received a TORCHIC!

#org 0x6B5E55
= What about want TREECKO?

#org 0x6B5F51
= (player) received a CHIKORITA!

#org 0x6B5F72
= (player) received a TREECKO!

Teh Blazer

Divider of Zero

Age 27
Male
'MERICA
Seen January 18th, 2019
Posted June 19th, 2018
776 posts
14.3 Years
@cand098 : Does the Porfessor have any person ID? (Check it in Advance Map)

Now for my own problem, when I use this level script, I can't seem to get it to work. It works part way, but some of the people I want to "Disappear" don't disappear. It's strange because the others disappear, it's only some few people that don't. They are assigned the Id 47 and I even have setflag 0x47. If that's not enough, they have the event numbers 10, 11, and 12, which I also put in for the hidesprite command. Who knows what i did wrong? Btw, this is in XSE.

'---------------
#org 0x812F83
lock
applymovement 0x3 0x881228E
applymovement 0x9 0x8812294
applymovement 0x8 0x8812294
applymovement 0x7 0x8812294
applymovement 0x6 0x8812294
waitmovement 0x0
hidesprite 0x3
hidesprite 0x6
hidesprite 0x7
hidesprite 0x8
hidesprite 0x9
hidesprite 0x10
hidesprite 0x11
hidesprite 0x12
setflag 0x42
setflag 0x47
setvar 0x7001 0x1
setflag 0x41
release
end
Being a hero is overrated anyways

DrFuji

Heiki Hecchara‌‌

Age 30
Male
Aussie
Seen 4 Days Ago
Posted February 12th, 2021
1,693 posts
13.7 Years
So, I want Professor Lilac (PKMN. PROF. in my game) to ask the player what type of pokemon they want, and then which pokemon in that category, and if they say no to all, then she starts at the top again. The player starts in the Lab, and the problem is, Prof. Lilac's sprite isnt even there when I start the game! Please help this is my first time scripting and I still havent gotten a nice scrip to work...:'( Its a ruby hack btw


EDIT---Yes she has a person Id



Spoiler:

'---------------
#org 0x152D9A
lock
faceplayer
if 0x0 goto 0x86B34D5
release
end

'---------------
#org 0x6B34D5
lock
faceplayer
msgbox 0x86B5624 MSG_YESNO '"PROF. LILAC: Ah, [player]!\pHow wo..."
compare LASTRESULT 0x0
if 0x1 goto 0x86B3510
compare LASTRESULT 0x1
if 0x1 goto 0x86B351B
release
end

'---------------
#org 0x6B3510
msgbox 0x86B5DF0 MSG_KEEPOPEN '"PROF. LILAC: Well alright..."
release
end

'---------------
#org 0x6B351B
lock
faceplayer
msgbox 0x86B64B9 MSG_YESNO '"PROF. LILAC: OK.\pWould you like a..."
compare LASTRESULT 0x0
if 0x1 goto 0x86B353E
compare LASTRESULT 0x1
if 0x1 goto 0x86B3584
release
end

'---------------
#org 0x6B353E
lock
faceplayer
msgbox 0x86B55E3 MSG_YESNO '"Fine.\pDo you want a Water \ntype ..."
compare LASTRESULT 0x0
if 0x1 goto 0x86B3561
compare LASTRESULT 0x1
if 0x1 goto 0x86B4EB4
release
end

'---------------
#org 0x6B3584
lock
faceplayer
msgbox 0x86B559B MSG_YESNO '"Do You want CHARMANDER?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B35A7
compare LASTRESULT 0x1
if 0x1 goto 0x86B36B9
release
end

'---------------
#org 0x6B3561
lock
faceplayer
msgbox 0x86B55B5 MSG_YESNO '"Alright.\pDo You want a Grass\n Ty..."
compare LASTRESULT 0x0
if 0x1 goto 0x86B3561
compare LASTRESULT 0x1
if 0x1 goto 0x86B4FB7
release
end

'---------------
#org 0x6B4EB4
faceplayer
msgbox 0x86B5DC1 MSG_YESNO '"Do you want SQUIRTLE?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B37B5
compare LASTRESULT 0x1
if 0x1 goto 0x86B3776
release
end

'---------------
#org 0x6B35A7
lock
faceplayer
msgbox 0x86B5DD9 MSG_YESNO '"How about CYNDAQUIL?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B4DA3
compare LASTRESULT 0x1
if 0x1 goto 0x86B36F8
release
end

'---------------
#org 0x6B36B9
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5E70 MSG_KEEPOPEN '"(player) received a CHARMANDER!"
waitfanfare
closeonkeypress
setvar 0x4000 0x0
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B4FB7
faceplayer
msgbox 0x86B5E0F MSG_YESNO '"Do you want BULBASAUR?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B4FD9
compare LASTRESULT 0x1
if 0x1 goto 0x86B62FF
release
end

'---------------
#org 0x6B37B5
givepokemon 0x158 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5EF2 MSG_KEEPOPEN '"(player) received a TOTODILE!"
waitfanfare
closeonkeypress
setvar 0x4000 0x4
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B3776
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5ED2 MSG_KEEPOPEN '"(player) received a SQUIRTLE!"
waitfanfare
closeonkeypress
setvar 0x4000 0x3
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B4DA3
lock
faceplayer
msgbox 0x86B560E MSG_YESNO '"What about TORCHIC?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B351B
compare LASTRESULT 0x1
if 0x1 goto 0x86B3737
release
end

'---------------
#org 0x6B36F8
givepokemon 0x155 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5E92 MSG_KEEPOPEN '"(player) received a CYNDAQUIL!"
waitfanfare
closeonkeypress
setvar 0x4000 0x1
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x1A74EB
'---------------
#org 0x6B4FD9
faceplayer
msgbox 0x86B5E3E MSG_YESNO '"How about CHIKORITA?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B5FB4
compare LASTRESULT 0x1
if 0x1 goto 0x86B633E
release
end

'---------------
#org 0x6B62FF
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5F30 MSG_KEEPOPEN '"(player) received a BULBASAUR!"
waitfanfare
closeonkeypress
setvar 0x4000 0x6
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B3737
givepokemon 0x280 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5EB3 MSG_KEEPOPEN '"(player) received a TORCHIC!"
waitfanfare
closeonkeypress
setvar 0x4000 0x2
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B5FB4
faceplayer
msgbox 0x86B5E55 MSG_YESNO '"What about want TREECKO?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B351B
compare LASTRESULT 0x1
if 0x1 goto 0x86B38B1
release
end

'---------------
#org 0x6B633E
givepokemon 0x152 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5F51 MSG_KEEPOPEN '"(player) received a CHIKORITA!"
waitfanfare
closeonkeypress
setvar 0x4000 0x7
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B38B1
givepokemon 0x277 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5F72 MSG_KEEPOPEN '"(player) received a TREECKO!"
waitfanfare
closeonkeypress
setvar 0x4000 0x8
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end


'---------
' Strings
'---------
#org 0x6B5624
= PROF. LILAC: Ah, [player]!\pHow would you like a POKEMON?

#org 0x6B5DF0
= PROF. LILAC: Well alright...

#org 0x6B64B9
= PROF. LILAC: OK.\pWould you like a Fire \nType POKEMON?

#org 0x6B55E3
= Fine.\pDo you want a Water \ntype POKEMON?

#org 0x6B559B
= Do You want CHARMANDER?

#org 0x6B55B5
= Alright.\pDo You want a Grass\n Type POKEMON?

#org 0x6B5DC1
= Do you want SQUIRTLE?

#org 0x6B5DD9
= How about CYNDAQUIL?

#org 0x6B5E70
= (player) received a CHARMANDER!

#org 0x6B5F91
= You should name your\nnew POKEMON.

#org 0x6B38F1
= This is the start\nof your adventure,\n(player)!

#org 0x6B5E0F
= Do you want BULBASAUR?

#org 0x6B5EF2
= (player) received a TOTODILE!

#org 0x6B5ED2
= (player) received a SQUIRTLE!

#org 0x6B560E
= What about TORCHIC?

#org 0x6B5E92
= (player) received a CYNDAQUIL!

#org 0x6B5E3E
= How about CHIKORITA?

#org 0x6B5F30
= (player) received a BULBASAUR!

#org 0x6B5EB3
= (player) received a TORCHIC!

#org 0x6B5E55
= What about want TREECKO?

#org 0x6B5F51
= (player) received a CHIKORITA!

#org 0x6B5F72
= (player) received a TREECKO!
I like your professor's name a lot :3

Since she has a 'Person ID' it is the most likely thing that is causing her to disappear before you even speak to her. If the ID is the same a a flag that was set previously that is why she is disappearing. If you haven't set the flag that is the same as her ID may be because of an old levelscript (If you haven't removed any of the original ones from the map) that utilises the movesprite command.

@cand098 : Does the Porfessor have any person ID? (Check it in Advance Map)

Now for my own problem, when I use this level script, I can't seem to get it to work. It works part way, but some of the people I want to "Disappear" don't disappear. It's strange because the others disappear, it's only some few people that don't. They are assigned the Id 47 and I even have setflag 0x47. If that's not enough, they have the event numbers 10, 11, and 12, which I also put in for the hidesprite command. Who knows what i did wrong? Btw, this is in XSE.

'---------------
#org 0x812F83
lock
applymovement 0x3 0x881228E
applymovement 0x9 0x8812294
applymovement 0x8 0x8812294
applymovement 0x7 0x8812294
applymovement 0x6 0x8812294
waitmovement 0x0
hidesprite 0x3
hidesprite 0x6
hidesprite 0x7
hidesprite 0x8
hidesprite 0x9
hidesprite 0x10
hidesprite 0x11
hidesprite 0x12
setflag 0x42
setflag 0x47
setvar 0x7001 0x1
setflag 0x41
release
end
Use 0xA, 0xB and 0xC instead of 0x10, 0x11 and 0x12 as you are scripting it in terms of HEX. A-Map doesn't translate their event numbers directly into HEX so keep that in mind if you are scripting with anything over 9.
Male
Seen January 22nd, 2012
Posted September 30th, 2011
26 posts
12.4 Years
Probably something simple, but I can't figure it out, total noob me.

The problem I'm having is that when it is suppose to say "Player recieved the Eevee" it displays a blank box and freezes.

Spoiler:
#org $poke
lock
faceplayer
checkflag 0x1200
if 0x1 goto $done
message $1
$1 1 = Prof. Fir: Hello \v\h01!\pYou're here for your first\nPokemon aren't you?\pOh, where is Emily?\pNot feeling well, that's a shame.\nYou can take her Pokemon to her.\pAnyways I only have 2 Pokemon left\nand I promised the Slowpoke to Emily\lso here is your Pokemon.
boxset 6
fanfare 0x13E
message $2
$2 1 = \v\H01 recieved the Eevee.
boxset 4
waitfanfare
pause 0x30
message $3
$3 1 = Prof Fir: Look after it.\pOh yes can I trust you to\ndeliever a Pokedex to Emily?\pThank you, here is yours as well.
boxset 6
fanfare 0x13E
message $4
$4 1 = \v\H01 recieved the Pokedex.
boxset 4
waitfanfare
pause 0x30
givepokemon 133 5 0x00
setflag 0x828
setflag 0x829
setflag 0x82F
special 0x16F
setflag 0x1200
setvar 0x6001 0x1
release
end

#org $done
message $11
$11 1 = Prof Fir: Good Luck on your journey.
release
end


Yes I'm using Pokescript, I just find it easier.
Male
Seen April 8th, 2011
Posted March 14th, 2011
6 posts
12.3 Years
Ok, hopefully the LAST problem with this script, actually 2 problems, Everything works fine, and it acts like the professor gives you the pokemon you chose, but when she ask for a nickname and you say yes, the question asking you to give one stays up and if you push A, it starts the text over again...And if thats not bad enough even after you say no, the pokemon option on the start menu isn't even there! In an xse tutorial I copied the offset for the nickname, but that was fire red and I guess the nickname script is in a diffrent place in Ruby, and I have no idea why there is no pokemon tab... Please help...

'---------------
#org 0x152D9A
lock
faceplayer
msgbox 0x86B5624 MSG_YESNO '"PROF. LILAC: Ah, [player]!\pHow wo..."
compare LASTRESULT 0x0
if 0x1 goto 0x86B3510
compare LASTRESULT 0x1
if 0x1 goto 0x86B351B
release
end

'---------------
#org 0x6B3510
msgbox 0x86B5DF0 MSG_KEEPOPEN '"PROF. LILAC: Well alright..."
release
end

'---------------
#org 0x6B351B
lock
faceplayer
msgbox 0x86B64B9 MSG_YESNO '"PROF. LILAC: OK.\pWould you like a..."
compare LASTRESULT 0x0
if 0x1 goto 0x86B353E
compare LASTRESULT 0x1
if 0x1 goto 0x86B3584
release
end

'---------------
#org 0x6B353E
lock
faceplayer
msgbox 0x86B55E3 MSG_YESNO '"Fine.\pDo you want a Water \ntype ..."
compare LASTRESULT 0x0
if 0x1 goto 0x86B3561
compare LASTRESULT 0x1
if 0x1 goto 0x86B4EB4
release
end

'---------------
#org 0x6B3584
lock
faceplayer
msgbox 0x86B559B MSG_YESNO '"Do You want CHARMANDER?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B35A7
compare LASTRESULT 0x1
if 0x1 goto 0x86B36B9
release
end

'---------------
#org 0x6B3561
lock
faceplayer
msgbox 0x86B55B5 MSG_YESNO '"Alright.\pDo You want a Grass\n Ty..."
compare LASTRESULT 0x0
if 0x1 goto 0x86B3561
compare LASTRESULT 0x1
if 0x1 goto 0x86B4FB7
release
end

'---------------
#org 0x6B4EB4
faceplayer
msgbox 0x86B5DC1 MSG_YESNO '"Do you want SQUIRTLE?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B37B5
compare LASTRESULT 0x1
if 0x1 goto 0x86B3776
release
end

'---------------
#org 0x6B35A7
lock
faceplayer
msgbox 0x86B5DD9 MSG_YESNO '"How about CYNDAQUIL?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B4DA3
compare LASTRESULT 0x1
if 0x1 goto 0x86B36F8
release
end

'---------------
#org 0x6B36B9
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5E70 MSG_KEEPOPEN '"[player] received a CHARMANDER!"
waitfanfare
closeonkeypress
setvar 0x4000 0x0
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B4FB7
faceplayer
msgbox 0x86B5E0F MSG_YESNO '"Do you want BULBASAUR?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B4FD9
compare LASTRESULT 0x1
if 0x1 goto 0x86B62FF
release
end

'---------------
#org 0x6B37B5
givepokemon 0x158 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5EF2 MSG_KEEPOPEN '"[player] received a TOTODILE!"
waitfanfare
closeonkeypress
setvar 0x4000 0x4
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B3776
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5ED2 MSG_KEEPOPEN '"[player] received a SQUIRTLE!"
waitfanfare
closeonkeypress
setvar 0x4000 0x3
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B4DA3
lock
faceplayer
msgbox 0x86B560E MSG_YESNO '"What about TORCHIC?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B351B
compare LASTRESULT 0x1
if 0x1 goto 0x86B3737
release
end

'---------------
#org 0x6B36F8
givepokemon 0x155 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5E92 MSG_KEEPOPEN '"[player] received a CYNDAQUIL!"
waitfanfare
closeonkeypress
setvar 0x4000 0x1
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x1A74EB
'---------------
#org 0x6B4FD9
faceplayer
msgbox 0x86B5E3E MSG_YESNO '"How about CHIKORITA?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B5FB4
compare LASTRESULT 0x1
if 0x1 goto 0x86B633E
release
end

'---------------
#org 0x6B62FF
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5F30 MSG_KEEPOPEN '"[player] received a BULBASAUR!"
waitfanfare
closeonkeypress
setvar 0x4000 0x6
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B3737
givepokemon 0x280 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5EB3 MSG_KEEPOPEN '"[player] received a TORCHIC!"
waitfanfare
closeonkeypress
setvar 0x4000 0x2
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B5FB4
faceplayer
msgbox 0x86B5E55 MSG_YESNO '"What about want TREECKO?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B351B
compare LASTRESULT 0x1
if 0x1 goto 0x86B38B1
release
end

'---------------
#org 0x6B633E
givepokemon 0x152 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5F51 MSG_KEEPOPEN '"[player] received a CHIKORITA!"
waitfanfare
closeonkeypress
setvar 0x4000 0x7
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B38B1
givepokemon 0x277 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5F72 MSG_KEEPOPEN '"[player] received a TREECKO!"
waitfanfare
closeonkeypress
setvar 0x4000 0x8
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end


'---------
' Strings
'---------
#org 0x6B5624
= PROF. LILAC: Ah, [player]!\pHow would you like a POKEMON?

#org 0x6B5DF0
= PROF. LILAC: Well alright...

#org 0x6B64B9
= PROF. LILAC: OK.\pWould you like a Fire \nType POKEMON?

#org 0x6B55E3
= Fine.\pDo you want a Water \ntype POKEMON?

#org 0x6B559B
= Do You want CHARMANDER?

#org 0x6B55B5
= Alright.\pDo You want a Grass\n Type POKEMON?

#org 0x6B5DC1
= Do you want SQUIRTLE?

#org 0x6B5DD9
= How about CYNDAQUIL?

#org 0x6B5E70
= [player] received a CHARMANDER!

#org 0x6B5F91
= You should name your\nnew POKEMON.

#org 0x6B38F1
= This is the start\nof your adventure,\n[player]!

#org 0x6B5E0F
= Do you want BULBASAUR?

#org 0x6B5EF2
= [player] received a TOTODILE!

#org 0x6B5ED2
= [player] received a SQUIRTLE!

#org 0x6B560E
= What about TORCHIC?

#org 0x6B5E92
= [player] received a CYNDAQUIL!

#org 0x6B5E3E
= How about CHIKORITA?

#org 0x6B5F30
= [player] received a BULBASAUR!

#org 0x6B5EB3
= [player] received a TORCHIC!

#org 0x6B5E55
= What about want TREECKO?

#org 0x6B5F51
= [player] received a CHIKORITA!

#org 0x6B5F72
= [player] received a TREECKO!

Bolens

Soul Hacker

Age 29
Male
PA
Seen August 22nd, 2016
Posted March 28th, 2013
359 posts
13.4 Years
Ok, hopefully the LAST problem with this script, actually 2 problems, Everything works fine, and it acts like the professor gives you the pokemon you chose, but when she ask for a nickname and you say yes, the question asking you to give one stays up and if you push A, it starts the text over again...And if thats not bad enough even after you say no, the pokemon option on the start menu isn't even there! In an xse tutorial I copied the offset for the nickname, but that was fire red and I guess the nickname script is in a diffrent place in Ruby, and I have no idea why there is no pokemon tab... Please help...

'---------------
#org 0x152D9A
lock
faceplayer
msgbox 0x86B5624 MSG_YESNO '"PROF. LILAC: Ah, [player]!\pHow wo..."
compare LASTRESULT 0x0
if 0x1 goto 0x86B3510
compare LASTRESULT 0x1
if 0x1 goto 0x86B351B
release
end

'---------------
#org 0x6B3510
msgbox 0x86B5DF0 MSG_KEEPOPEN '"PROF. LILAC: Well alright..."
release
end

'---------------
#org 0x6B351B
lock
faceplayer
msgbox 0x86B64B9 MSG_YESNO '"PROF. LILAC: OK.\pWould you like a..."
compare LASTRESULT 0x0
if 0x1 goto 0x86B353E
compare LASTRESULT 0x1
if 0x1 goto 0x86B3584
release
end

'---------------
#org 0x6B353E
lock
faceplayer
msgbox 0x86B55E3 MSG_YESNO '"Fine.\pDo you want a Water \ntype ..."
compare LASTRESULT 0x0
if 0x1 goto 0x86B3561
compare LASTRESULT 0x1
if 0x1 goto 0x86B4EB4
release
end

'---------------
#org 0x6B3584
lock
faceplayer
msgbox 0x86B559B MSG_YESNO '"Do You want CHARMANDER?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B35A7
compare LASTRESULT 0x1
if 0x1 goto 0x86B36B9
release
end

'---------------
#org 0x6B3561
lock
faceplayer
msgbox 0x86B55B5 MSG_YESNO '"Alright.\pDo You want a Grass\n Ty..."
compare LASTRESULT 0x0
if 0x1 goto 0x86B3561
compare LASTRESULT 0x1
if 0x1 goto 0x86B4FB7
release
end

'---------------
#org 0x6B4EB4
faceplayer
msgbox 0x86B5DC1 MSG_YESNO '"Do you want SQUIRTLE?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B37B5
compare LASTRESULT 0x1
if 0x1 goto 0x86B3776
release
end

'---------------
#org 0x6B35A7
lock
faceplayer
msgbox 0x86B5DD9 MSG_YESNO '"How about CYNDAQUIL?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B4DA3
compare LASTRESULT 0x1
if 0x1 goto 0x86B36F8
release
end

'---------------
#org 0x6B36B9
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5E70 MSG_KEEPOPEN '"[player] received a CHARMANDER!"
waitfanfare
closeonkeypress
setvar 0x4000 0x0
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B4FB7
faceplayer
msgbox 0x86B5E0F MSG_YESNO '"Do you want BULBASAUR?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B4FD9
compare LASTRESULT 0x1
if 0x1 goto 0x86B62FF
release
end

'---------------
#org 0x6B37B5
givepokemon 0x158 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5EF2 MSG_KEEPOPEN '"[player] received a TOTODILE!"
waitfanfare
closeonkeypress
setvar 0x4000 0x4
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B3776
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5ED2 MSG_KEEPOPEN '"[player] received a SQUIRTLE!"
waitfanfare
closeonkeypress
setvar 0x4000 0x3
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B4DA3
lock
faceplayer
msgbox 0x86B560E MSG_YESNO '"What about TORCHIC?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B351B
compare LASTRESULT 0x1
if 0x1 goto 0x86B3737
release
end

'---------------
#org 0x6B36F8
givepokemon 0x155 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5E92 MSG_KEEPOPEN '"[player] received a CYNDAQUIL!"
waitfanfare
closeonkeypress
setvar 0x4000 0x1
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x1A74EB
'---------------
#org 0x6B4FD9
faceplayer
msgbox 0x86B5E3E MSG_YESNO '"How about CHIKORITA?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B5FB4
compare LASTRESULT 0x1
if 0x1 goto 0x86B633E
release
end

'---------------
#org 0x6B62FF
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5F30 MSG_KEEPOPEN '"[player] received a BULBASAUR!"
waitfanfare
closeonkeypress
setvar 0x4000 0x6
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B3737
givepokemon 0x280 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5EB3 MSG_KEEPOPEN '"[player] received a TORCHIC!"
waitfanfare
closeonkeypress
setvar 0x4000 0x2
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B5FB4
faceplayer
msgbox 0x86B5E55 MSG_YESNO '"What about want TREECKO?"
compare LASTRESULT 0x0
if 0x1 goto 0x86B351B
compare LASTRESULT 0x1
if 0x1 goto 0x86B38B1
release
end

'---------------
#org 0x6B633E
givepokemon 0x152 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5F51 MSG_KEEPOPEN '"[player] received a CHIKORITA!"
waitfanfare
closeonkeypress
setvar 0x4000 0x7
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end

'---------------
#org 0x6B38B1
givepokemon 0x277 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x86B5F72 MSG_KEEPOPEN '"[player] received a TREECKO!"
waitfanfare
closeonkeypress
setvar 0x4000 0x8
msgbox 0x86B5F91 MSG_YESNO '"You should name your\nnew POKEMON."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
msgbox 0x86B38F1 MSG_NORMAL '"This is the start\nof your adventu..."
release
end


'---------
' Strings
'---------
#org 0x6B5624
= PROF. LILAC: Ah, [player]!\pHow would you like a POKEMON?

#org 0x6B5DF0
= PROF. LILAC: Well alright...

#org 0x6B64B9
= PROF. LILAC: OK.\pWould you like a Fire \nType POKEMON?

#org 0x6B55E3
= Fine.\pDo you want a Water \ntype POKEMON?

#org 0x6B559B
= Do You want CHARMANDER?

#org 0x6B55B5
= Alright.\pDo You want a Grass\n Type POKEMON?

#org 0x6B5DC1
= Do you want SQUIRTLE?

#org 0x6B5DD9
= How about CYNDAQUIL?

#org 0x6B5E70
= [player] received a CHARMANDER!

#org 0x6B5F91
= You should name your\nnew POKEMON.

#org 0x6B38F1
= This is the start\nof your adventure,\n[player]!

#org 0x6B5E0F
= Do you want BULBASAUR?

#org 0x6B5EF2
= [player] received a TOTODILE!

#org 0x6B5ED2
= [player] received a SQUIRTLE!

#org 0x6B560E
= What about TORCHIC?

#org 0x6B5E92
= [player] received a CYNDAQUIL!

#org 0x6B5E3E
= How about CHIKORITA?

#org 0x6B5F30
= [player] received a BULBASAUR!

#org 0x6B5EB3
= [player] received a TORCHIC!

#org 0x6B5E55
= What about want TREECKO?

#org 0x6B5F51
= [player] received a CHIKORITA!

#org 0x6B5F72
= [player] received a TREECKO!
Well I don't really have too much time to help you, but the Pokemon menu will only appear when you set the flag: setflag POKEMON . That will make the Pokemon menu appear!
Male
Seen April 8th, 2011
Posted March 14th, 2011
6 posts
12.3 Years
Well I don't really have too much time to help you, but the Pokemon menu will only appear when you set the flag: setflag POKEMON . That will make the Pokemon menu appear!
When I type that and compile it says missing #define, what do I put for the '#define'??
Male
Seen January 22nd, 2012
Posted September 30th, 2011
26 posts
12.4 Years
I solved my last 'issue' though I don't know how, but that doesn't matter.

I'm now having another issue

Spoiler:
#org $battle1
jingle
message $1
$1 1 = Hey Loser!
boxset 6
clearflag 0x1211
showsprite 3
applymovement 3 $enter
$enter 1 ; #binary 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0xFE
pausemove 0
message $2
$2 1 = \v\h05: So you finally have a\nPokemon eh?\pDoesn't matter you're still a loser\mand I'll prove it.
boxset 6
trainerbattle 0x09 0x01 $win $lose
$win 1 = Ahh man! You're still a loser!
$lose 1 = I won! I told you you're a loser!
message $after
$after 1 = Doesn't matter anyway!\nI'll beat you one day!
boxset 6
applymovement 3 $leave
$leave 1 ; #binary 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0xFE
pausemove 0
removesprite 3
setflag 1211
setvar 0x6004 0x0001
release
end


The script runs the first line then freezes, I think I know what the problem is, because I can't set the Person ID to 1211, and have a trainer ID?

colcolstyles

Yours truly

Male
The Bay Area
Seen May 18th, 2019
Posted August 13th, 2012
1,588 posts
15 Years
When I type that and compile it says missing #define, what do I put for the '#define'??
It says that because Bolens gave you an incorrect symbol. You should use one of the following, depending on which game you are hacking:

setflag RS_PKMNMENU
setflag FR_PKMNMENU
setflag EM_PKMNMENU

Brother of Vrai
Male
Seen January 22nd, 2012
Posted September 30th, 2011
26 posts
12.4 Years
I've started using XSE now, and well its providing problems for me already.

Spoiler:
#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x2000
if 0x01 goto @done
checkflag 0x2001
if 0x01 goto @done1
msgbox @1 0x6
setvar 0x6000 0x01
release
end

#org @1
= Emily: Hey [player]!\nI'm not feeling too well would you\l please get my Pok\h1bmon from Prof. Fir\lfor me?

#org @done
msgbox @2 0x6
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
clearflag 0x2000
release
end

#org @2
= Emily: Thank you [player]!\nIt's just the Pok\h1bmon I wanted.\p...\pSince you did this for me I'd like to give\nyou these.\lI hope they are useful!

#org @3
= [player] recieved the Running Shoes.

#org @done1
msgbox @4 0x6
release
end

#org @4
= Emily: Hopefully I'll feel better soon!


In the game it only shows the last line, anyone help?

Teh Blazer

Divider of Zero

Age 27
Male
'MERICA
Seen January 18th, 2019
Posted June 19th, 2018
776 posts
14.3 Years
I've just put a level script on the same map as another level script (Is that bad, two level scripts on the same area?). I can get the first to activate no problem, but the second one checks for the Po0kedex flag and activates afetr that. The problem is I can't seem to activate the second one, even after the conditions are set. This is XSE. Here is the second script:

Spoiler:

#dynamic 0x810000

#org @start
lockall
setvar 0x7003 0x1
checkflag 0x829
if 0x0 goto 0x881048D
goto @begin

#org @begin
clearflag 0x47
showsprite 0xA
showsprite 0xB
showsprite 0xC
applymovement 0xFF @Down
msgbox @Mom1 0x6
applymovement 0xA @Up
waitmovement 0x0
fanfare 0x13D
call @newmaps
waitfanfare
hidepokepic
additem 0x169 0x1
loadpointer 0x0 @recieve '"[player] obtained a [blue_fr]Town ..."
giveitem2 0x169 0x1 0x13E
applymovement 0xA @LeftLookUp
waitmovement 0x0
msgbox @Mom2 0x6
msgbox @Ch1 0x6
applymovement 0xA @RightRightLookUp
waitmovement 0x0
msgbox @Mom3 0x6
msgbox @Bel1 0x6
applymovement 0xA @DownLookUp
waitmovement 0x0
msgbox @Mom4 0x6
applymovement 0xA @LeftLookUp
waitmovement 0x0
msgbox @Mom5 0x6
applymovement 0xA 0x881228E
waitmovement 0x0
applymovement 0xB @LookRight
waitmovement 0x0
applymovement 0xFF @LookLeft
applymovement 0xC @LookLeft
waitmovement 0x0
msgbox @Ch2 0x6
applymovement 0xC @StepStepRight
waitmovement 0x0
msgbox @Bel2 0x6
applymovement 0xB @UpRight9Times
applymovement 0xC @Right7Times
applymovement 0xFF @LookRight
waitmovement 0x0
pause 0x40
hidesprite 0xA
hidesprite 0xB
hidesprite 0xC
setflag 0x47
setflag 0x16F
releaseall
end

#org @newmaps
showpokepic 0x2 0x1 0x1
hidebox 0x1 0x1 0xF 0xF
pause 0x1
hidepokepic
showpokepic 0x101 0x2 0x7
hidebox 0x2 0x7 0xE 0xE
return

#org 0x81048D
releaseall
end

Being a hero is overrated anyways
Male
Cyberspace
Seen June 27th, 2018
Posted December 10th, 2017
104 posts
12.5 Years
Thanks for the help, the script now works!

I just have another question...How do I change where the player starts when the player starts a new game? I'm modifying a Ruby Rom, and it starts by having seperate genders in seperate houses, but I want to change that so both genders start in one house, and in their room instead of outside the house and all that walking, etc.

Also, when you have a script, i think i know what to do, but when you have a person event, and you want them to walk away, do you have to do anything special to make the applymovement command work?

Thanks for the help ^w^
In order to change where the player starts, I'd recommend HackMew's Start Map Chooser Advance. (SMCA) I'd like to note, though, it will not get rid of the truck sound, even if you change the map to a different one. (I don't know if that matters, but it's good to know in any case)

As for the applymovement command, yes. The movement of the person in AdvanceMap needs to be set to something OTHER than "No Movement" (If you choose "look down", then also set the movement byte under the dropdown box to "11") Aside from that, you don't need anything special.

Okay I have been testing stuff out, and I concluded that the problem exists because I have it being used as a map load script so when I enter a map.
That would explain things. But then it wouldn't be a "trigger" It would be a Level Script. I'd recommend reading a tutorial on them before progressing. =)

How do I find the choice list ID #s in XSE? I'm trying to edit the Game Corner.

Edit: OK so I found the offset for the multichoices in FireRed but I'm hacking LeafGreen. Is the offset different?
Yes. Virtually all offsets are different between both games. It'd be pretty easy to find, though, with a Hex editor, because they are still in the same order =)

I've just put a level script on the same map as another level script (Is that bad, two level scripts on the same area?). I can get the first to activate no problem, but the second one checks for the Po0kedex flag and activates afetr that. The problem is I can't seem to activate the second one, even after the conditions are set. This is XSE. Here is the second script:

Spoiler:

#dynamic 0x810000

#org @start
lockall
setvar 0x7003 0x1
checkflag 0x828 //Assuming you're using Fire-red, the flag is 0x828, not 0x829
if 0x0 goto 0x881048D
goto @begin

#org @begin
clearflag 0x47
showsprite 0xA
showsprite 0xB
showsprite 0xC
applymovement 0xFF @Down
msgbox @Mom1 0x6
applymovement 0xA @Up
waitmovement 0x0
fanfare 0x13D
call @newmaps
waitfanfare
hidepokepic
additem 0x169 0x1
loadpointer 0x0 @recieve '"[player] obtained a [blue_fr]Town ..."
giveitem2 0x169 0x1 0x13E
applymovement 0xA @LeftLookUp
waitmovement 0x0
msgbox @Mom2 0x6
msgbox @Ch1 0x6
applymovement 0xA @RightRightLookUp
waitmovement 0x0
msgbox @Mom3 0x6
msgbox @Bel1 0x6
applymovement 0xA @DownLookUp
waitmovement 0x0
msgbox @Mom4 0x6
applymovement 0xA @LeftLookUp
waitmovement 0x0
msgbox @Mom5 0x6
applymovement 0xA 0x881228E
waitmovement 0x0
applymovement 0xB @LookRight
waitmovement 0x0
applymovement 0xFF @LookLeft
applymovement 0xC @LookLeft
waitmovement 0x0
msgbox @Ch2 0x6
applymovement 0xC @StepStepRight
waitmovement 0x0
msgbox @Bel2 0x6
applymovement 0xB @UpRight9Times
applymovement 0xC @Right7Times
applymovement 0xFF @LookRight
waitmovement 0x0
pause 0x40
hidesprite 0xA
hidesprite 0xB
hidesprite 0xC
setflag 0x47
setflag 0x16F
releaseall
end

#org @newmaps
showpokepic 0x2 0x1 0x1
hidebox 0x1 0x1 0xF 0xF
pause 0x1
hidepokepic
showpokepic 0x101 0x2 0x7
hidebox 0x2 0x7 0xE 0xE
return

#org 0x81048D
releaseall
end

The Pokémon menu flag is 0x828 for FireRed/LeafGreen. If you're using Ruby or Sapphire, it's different. You'll have to look it up.
Want my help in PokéScripting? PM me =)
I use XSE v1.1.1 (HackMew = awesome) and Advance Map 1.92.
Thanks to Diego and HackMew for their tutorials, helping me learn how to script!

Hacks I support 100% (MUST SEE!):


Very well made hacks:

My work:
Figuring out scripting in PMD
Entire script map of LeafGreen
PMDSE (Pokémon Mystery Dungeon Script Editor)

destinedjagold

You can contact me in PC's discord server...

Age 32
Male
Seen 3 Days Ago
Posted March 24th, 2023
8,579 posts
16 Years
hey maybe some body can help me out here im wondering how i can change the script for when you get your starter i want to ad more then 3 can any tell me how to do that like break down what is what in that script ive tried reading tutorials its all just gibberish to me i cant make seance of it
You'll never learn if you skip through or think those tutorials are gibberish.
Learn from the basics and understand what you're doing.

I've just put a level script on the same map as another level script (Is that bad, two level scripts on the same area?). I can get the first to activate no problem, but the second one checks for the Po0kedex flag and activates afetr that. The problem is I can't seem to activate the second one, even after the conditions are set. This is XSE. Here is the second script:

Spoiler:

#dynamic 0x810000

#org @start
lockall
setvar 0x7003 0x1
checkflag 0x829
if 0x0 goto 0x881048D
goto @begin

#org @begin
clearflag 0x47
showsprite 0xA
showsprite 0xB
showsprite 0xC
applymovement 0xFF @Down
msgbox @Mom1 0x6
applymovement 0xA @Up
waitmovement 0x0
fanfare 0x13D
call @newmaps
waitfanfare
hidepokepic
additem 0x169 0x1
loadpointer 0x0 @recieve '"[player] obtained a [blue_fr]Town ..."
giveitem2 0x169 0x1 0x13E
applymovement 0xA @LeftLookUp
waitmovement 0x0
msgbox @Mom2 0x6
msgbox @Ch1 0x6
applymovement 0xA @RightRightLookUp
waitmovement 0x0
msgbox @Mom3 0x6
msgbox @Bel1 0x6
applymovement 0xA @DownLookUp
waitmovement 0x0
msgbox @Mom4 0x6
applymovement 0xA @LeftLookUp
waitmovement 0x0
msgbox @Mom5 0x6
applymovement 0xA 0x881228E
waitmovement 0x0
applymovement 0xB @LookRight
waitmovement 0x0
applymovement 0xFF @LookLeft
applymovement 0xC @LookLeft
waitmovement 0x0
msgbox @Ch2 0x6
applymovement 0xC @StepStepRight
waitmovement 0x0
msgbox @Bel2 0x6
applymovement 0xB @UpRight9Times
applymovement 0xC @Right7Times
applymovement 0xFF @LookRight
waitmovement 0x0
pause 0x40
hidesprite 0xA
hidesprite 0xB
hidesprite 0xC
setflag 0x47
setflag 0x16F
releaseall
end

#org @newmaps
showpokepic 0x2 0x1 0x1
hidebox 0x1 0x1 0xF 0xF
pause 0x1
hidepokepic
showpokepic 0x101 0x2 0x7
hidebox 0x2 0x7 0xE 0xE
return

#org 0x81048D
releaseall
end

There's nothing wrong with having two or more level scripts in one map, though, as long as both doesn't have the same level Script Type.
If both your level scripts are using the same Script Type, then why not just unify both into one?

I've started using XSE now, and well its providing problems for me already.

Spoiler:
#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x2000
if 0x01 goto @done
checkflag 0x2001
if 0x01 goto @done1
msgbox @1 0x6
setvar 0x6000 0x01
release
end

#org @1
= Emily: Hey [player]!\nI'm not feeling too well would you\l please get my Pok\h1bmon from Prof. Fir\lfor me?

#org @done
msgbox @2 0x6
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
clearflag 0x2000
release
end

#org @2
= Emily: Thank you [player]!\nIt's just the Pok\h1bmon I wanted.\p...\pSince you did this for me I'd like to give\nyou these.\lI hope they are useful!

#org @3
= [player] recieved the Running Shoes.

#org @done1
msgbox @4 0x6
release
end

#org @4
= Emily: Hopefully I'll feel better soon!


In the game it only shows the last line, anyone help?
I see nothing wrong with your script.
But probably something went wrong through setting the flags in some of your other scripts.

Male
Cyberspace
Seen June 27th, 2018
Posted December 10th, 2017
104 posts
12.5 Years
To the person above, I haven't set any other scripts up, except two script boxes which are triggered by the setvar 0x6000 in that script. Could it be because I haven't got those flag set anywhere?
I know I'm not the person you spoke to... but you should be careful with using variables from 0x5000 and up, because unless you're using JPAN's hacked engine, you'll be overwriting Pokémon box data with values higher than 0x4FFF You can see the research and Development thread for more info. Variables are NOT the same as flags. Similar, yes, but different.
Want my help in PokéScripting? PM me =)
I use XSE v1.1.1 (HackMew = awesome) and Advance Map 1.92.
Thanks to Diego and HackMew for their tutorials, helping me learn how to script!

Hacks I support 100% (MUST SEE!):


Very well made hacks:

My work:
Figuring out scripting in PMD
Entire script map of LeafGreen
PMDSE (Pokémon Mystery Dungeon Script Editor)
Male
Seen January 22nd, 2012
Posted September 30th, 2011
26 posts
12.4 Years


I know I'm not the person you spoke to... but you should be careful with using variables from 0x5000 and up, because unless you're using JPAN's hacked engine, you'll be overwriting Pokémon box data with values higher than 0x4FFF You can see the research and Development thread for more info. Variables are NOT the same as flags. Similar, yes, but different.
Thanks, I'll be careful about that in the future, though that doesn't appear to be the issue here.

I've completed all the scripts that are linked and none of them seem to work properly.

Spoiler:
#dynamic 0x800363
#org @start
msgbox @1 0x6
applymovement 0xFF @move
pause 0x30
release
end

#org @1
= [player]: I should go see Emily.

#org @move
#raw 0x11
#raw 0xFE


The above script is attached to 2 script boxes, basically acts as a way of preventing the player from exiting the town before completing an 'event'. This works fine.

Spoiler:
#dynamic 0x800519
#org @start
lock
faceplayer
checkflag 0x2000
if 0x01 goto @done
checkflag 0x2001
if 0x01 goto @done1
msgbox @1 0x6
setvar 0x6000 0x01
release
end

#org @1
= Emily: Hey [player]!\nI'm not feeling too well would you\l please get my Pok\h1bmon from Prof. Fir\lfor me?

#org @done
msgbox @2 0x6
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x82F
clearflag 0x2000
setflag 0x2001
release
end

#org @2
= Emily: Thank you [player]!\nIt's just the Pok\h1bmon I wanted.\p...\pSince you did this for me I'd like to give\nyou these.\lI hope they are useful!

#org @3
= [player] recieved the Running Shoes.

#org @done1
msgbox @4 0x6
release
end

#org @4
= Emily: Hopefully I'll feel better soon!


This one is quite random, I've spoke to the person before and it comes up with either the giving running shoes part, or the hopefully I'll feel better part. I'll then go out and in the house and it'll come up with the first line.

Spoiler:
#dynamic 0x80069B
#org @start
lock
faceplayer
checkflag 0x2002
if 0x1 goto @done
msgbox @1 0x6
givepokemon 133 5 0x00 0x00 0x00 0x00
fanfare 0x13E
msgbox @2 0x6
waitfanfare
pause 0x30
msgbox @3 0x6
setflag 0x828
setflag 0x829
special 0x16F
fanfare 0x13E
msgbox @4 0x6
waitfanfare
pause 0x30
msgbox @5 0x6
setvar 0x6001 0x01
setflag 0x2000
setflag 0x2002
release
end

#org @1
= Prof. Fir: [player], Welcome to my lab\pYou're here for your first Pok\h1bmon aren't you?\pWhere is Emily?\nOh she is not well, that is a shame\lI trust you to take her Pok\h1bmon\lto her.\pI have just one Pok\h1bmon left for you\nhere you go!

#org @2
= [player] recieved an Eevee!

#org @3
= Here is Emily's as well.\pI once had a dream to complete a Pok\h1bdex\nI know I have left it too late now though,\lit would make me happy if you could complete it\lI have a Pok\h1bdex for Emily too.

#org @4
= [player] recieved the Pok\h1bdex!

#org @5
= Take that to Emily, and begin your adventure!

#org @done
msgbox @6 0x6
release
end

#org @6
= Prof. Fir: Good luck on your journey!


This is the receiving starter pokemon script, when I spoke to him all it came up with was the last line.
Seen July 30th, 2012
Posted July 25th, 2012
20 posts
15.3 Years
How can I prevent the roaming legendary from roaming? Any way to break the script without causing damage to other parts of the game would be great. Thank you in advance.
Bump. I've checked the champion battle script and Oak's script, but I can't find the bit of code that activates the roaming pokemon in Leaf Green. I hope someone can give me enough info so I can start. I want to prevent the roaming battle from happening at all, so I'm fine with any way to break that script without breaking other parts of the game.

I hope you guys can help me, thanks.