Script Help Thread (DO NOT REQUEST SCRIPTS) Page 213

Started by HackMew December 20th, 2008 5:10 AM
  • 625760 views
  • 9682 replies
Age 29
Male
Seen August 15th, 2012
Posted April 15th, 2011
17 posts
12.4 Years
OK, so I'm using JPAN's tutorial to add new multichoice boxes. I'm editing the Game Corner, and now my problem is: how do I make the coin cost align to the right, like in the game? In my hex editor, I see the bytes "FF BB BC CC BB FC 13 55 FC 06 00 00 A2 A3 A1 00 BD C9 C3 C8 CD" This says "ABRA (align to the right) 120 COINS". I'm using XSE to input my new values, which are "BULBASAUR (align to the right) 4,000 COINS". How do I input the align to the right part? I'm kind of a noob at this.

redriders180

Mastermind of Pokemon Glazed

Male
Path of Victory, Tunod
Seen December 17th, 2016
Posted November 17th, 2015
314 posts
12.9 Years
Ok guys, thanks a ton for everything, and I only have a few more questions.

First, I want to change around the puzzle in Fortree Gym so its bigger and more challenging. I went into the gym on advance map, and the spinny bars aren't on the map, and when i went into the map header code, it only has a code for a special event, and i assume its this special event that makes the spinny bars spin. Is there a way to edit this?

Also, I tried to find a tutorial on inserting homemade Pokemon in the space between Celebi and Treecko, but the only tutorial i found is in another language, which uses programs in another language too. are there any tutorials or programs in English for this task?
Seen March 17th, 2014
Posted March 7th, 2011
8 posts
14.2 Years


You'll never learn if you skip through or think those tutorials are gibberish.
Learn from the basics and understand what you're doing.
Ok so i reread the tutorials i even read the same one 3 times but its still just not making sense and since i no this isn't a request thread maybe someone can point me in the direction of one
Male
Seen January 31st, 2023
Posted September 26th, 2022
55 posts
13.8 Years
I'm trying to write a script that generates a random trainer battle. Naturally, this involves using the random command. My code:
Spoiler:

#org @trainer
random 0x2B5 'random trainer
trainerbattle 0x1 LASTRESULT 0x0 @talk @talk @finish
end

The problem is that instead of using the random number, I think XSE uses 0x800D, the variable that random assigns to. And there is no trainer # 0x800D.
Is there a way to fix this?
Male
Germany
Seen September 30th, 2013
Posted April 21st, 2013
56 posts
13 Years
@blakcat: Well, most commands can handle variables as parameters. Those commands related to Flags do NOT support this. It's not a very nice solution (it takes tons of free space...), but it is the only possible solution I can think of:

#dynamic 0x800000

#org @main
random 0x2b5
compare LASTRESULT 0x0
if 0x1 goto @trainer1
compare LASTRESULT 0x1
if 0x1 goto @trainer2
...
compare LASTRESULT 0x2b4
if 0x1 goto @trainer2b5

#org @trainer1
trainerbattle 0x1 0x0 @talk @talk @finish
end

#org @trainer2
trainerbattle 0x1 0x1 @talk @talk @finish
end

Skara

THIS. IS. SEMPITERNAL.

Age 27
Male
Manchester, England
Seen May 13th, 2013
Posted April 29th, 2013
350 posts
14.5 Years
Ok, I'm obviously doing something wrong here...
Spoiler:

lock
faceplayer
msgbox @text ' I need a good Trainer for this SQUIRTLE. /nIt's been causing a lot of trouble
callstd MSG_NORMAL
release
end

#org @text
= I need a good Trainer for this SQUIRTLE. /nIt's been causing a lot of trouble

checkflag 0x0000
#org @text
= Ah! you have this town's GYM BADGE! /nI'll give this SQUIRTLE to you!
if 0x1 jump :end
setflag FR_POKEMON
countpokemon
compare LASTRESULT 6
if == jump @noroom
addpokemon SQUIRTLE 0x5 ORANBERRY 0 0 0
setflag 0x0000
storepokemon 0 SQUIRTLE
message @get-msg
fanfare 0x101
showmsg
waitfanfare
waitbutton
:end
release
end

#org @noroom
msgbox @noroom-msg
callstd MSG_NOCLOSE
release
end

#org @noroom-msg
= You don't have enough room in your party.

#org @get-msg
= You got a \v\h02!

#org @text
= Take good care of SQUIRTLE!


I'm about to code the setflag into Surge's Gym Battle.
For some reason, that full script doesn't come up when I open it on AMap.
I'VE LEFT THIS ACCOUNT. Here is my new profile
Male
Seen January 31st, 2023
Posted September 26th, 2022
55 posts
13.8 Years
@TheDarkShark: Thanks a ton! I'm gonna take a guess and say that since trainerbattle is essentially a flag, variables won't work as a parameter. I had thought of trying to explicity account for all the trainers, but I'm really hoping there's another way to do it.

@Skara: I'm using a different script editor (XSE), so I might be waaaayy off, but I think you may be doing a few things wrong:
1) #org @text is used twice
2) I don't think your second part (see spoiler) ever gets called. 'release' 'end' are directly above it so it seems there is no way for it to run (again, correct me if I'm wrong)
Spoiler:

checkflag 0x0000
#org @text
= Ah! you have this town's GYM BADGE! /nI'll give this SQUIRTLE to you!
if 0x1 jump :end
setflag FR_POKEMON
countpokemon
compare LASTRESULT 6
if == jump @noroom
addpokemon SQUIRTLE 0x5 ORANBERRY 0 0 0
setflag 0x0000
storepokemon 0 SQUIRTLE
message @get-msg
fanfare 0x101
showmsg
waitfanfare
waitbutton
:end
release
end

3) I've never seen "if 0x1 jump :end" before. I'm relatively new to scripting so that doesn't mean that much, but potentially it could be the problem (although it probably isn't)

I would recommend putting the second part in its own function and make sure the first part calls it so it's sure to run. But like I said, I use a different script editor.

colcolstyles

Yours truly

Male
The Bay Area
Seen May 18th, 2019
Posted August 13th, 2012
1,588 posts
15 Years
I'm trying to write a script that generates a random trainer battle. Naturally, this involves using the random command. My code:
Spoiler:

#org @trainer
random 0x2B5 'random trainer
trainerbattle 0x1 LASTRESULT 0x0 @talk @talk @finish
end

The problem is that instead of using the random number, I think XSE uses 0x800D, the variable that random assigns to. And there is no trainer # 0x800D.
Is there a way to fix this?
If you only want a small number of available trainers, then TheDarkShark's method will be perfectly manageable. However, if you're looking for a more general solution, you'll have to disassemble the routines associated with the 'trainerbattle' command and edit them so that if the second parameter is a variable, the game will load the value stored in that variable. It's not too hard if you know what you're doing but if you don't, it's most likely impossible.

Brother of Vrai

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
i guess we aren't allowed to request scripts, so how about a yes or no question..
can i make it so that when i get the Badge that allows me to use Cut outside of battle, all of the trees disappear?
i want to make a game where HM's aren't needed.
set a flag after you get the badge.
put that said flag on all the trees so they'll disappear.

Skara

THIS. IS. SEMPITERNAL.

Age 27
Male
Manchester, England
Seen May 13th, 2013
Posted April 29th, 2013
350 posts
14.5 Years
@TheDarkShark: Thanks a ton! I'm gonna take a guess and say that since trainerbattle is essentially a flag, variables won't work as a parameter. I had thought of trying to explicity account for all the trainers, but I'm really hoping there's another way to do it.

@Skara: I'm using a different script editor (XSE), so I might be waaaayy off, but I think you may be doing a few things wrong:
1) #org @text is used twice
2) I don't think your second part (see spoiler) ever gets called. 'release' 'end' are directly above it so it seems there is no way for it to run (again, correct me if I'm wrong)
Spoiler:

checkflag 0x0000
#org @text
= Ah! you have this town's GYM BADGE! /nI'll give this SQUIRTLE to you!
if 0x1 jump :end
setflag FR_POKEMON
countpokemon
compare LASTRESULT 6
if == jump @noroom
addpokemon SQUIRTLE 0x5 ORANBERRY 0 0 0
setflag 0x0000
storepokemon 0 SQUIRTLE
message @get-msg
fanfare 0x101
showmsg
waitfanfare
waitbutton
:end
release
end

3) I've never seen "if 0x1 jump :end" before. I'm relatively new to scripting so that doesn't mean that much, but potentially it could be the problem (although it probably isn't)

I would recommend putting the second part in its own function and make sure the first part calls it so it's sure to run. But like I said, I use a different script editor.
Cheers, I'll try that out. If it still doesn't show up full I'll have to resort to screaming.
I'VE LEFT THIS ACCOUNT. Here is my new profile
Male
Seen January 31st, 2023
Posted September 26th, 2022
55 posts
13.8 Years
i guess we aren't allowed to request scripts, so how about a yes or no question..
can i make it so that when i get the Badge that allows me to use Cut outside of battle, all of the trees disappear?
i want to make a game where HM's aren't needed.
set a flag after you get the badge.
put that said flag on all the trees so they'll disappear.
That would indeed work, but I believe that since the badges themselves are flags, you could simply put their flags on the trees and you wouldn't need extra flags.

Spoiler:

Ruby/Sapphire:

0x807 - Activates First Badge
0x808 - Activates Second Badge
0x809 - Activates Third Badge
0x80A - Activates Fourth Badge
0x80B - Activates Fifth Badge
0x80C - Activates Sixth Badge
0x80D - Activates Seventh Badge
0x80E - Activates Eighth Badge
(look under the "flags" section for others)


I'm trying to write a script that generates a random trainer battle. Naturally, this involves using the random command. My code:

Spoiler:

#org @trainer
random 0x2B5 'random trainer
trainerbattle 0x1 LASTRESULT 0x0 @talk @talk @finish
end


The problem is that instead of using the random number, I think XSE uses 0x800D, the variable that random assigns to. And there is no trainer # 0x800D.
Is there a way to fix this?
If you only want a small number of available trainers, then TheDarkShark's method will be perfectly manageable. However, if you're looking for a more general solution, you'll have to disassemble the routines associated with the 'trainerbattle' command and edit them so that if the second parameter is a variable, the game will load the value stored in that variable. It's not too hard if you know what you're doing but if you don't, it's most likely impossible.
I actually wanted to use all the available trainers in Ruby, so it would be a little ridiculous to use TheDarkShark's method for 200+ trainers. And I don't know how to edit the 'trainerbattle' routines, but I could probaby pick it up pretty easy if you could refer me to a tutorial or PM me or something.
Male
Seen April 2nd, 2011
Posted March 29th, 2011
4 posts
12.2 Years
Sorry if this has been posted before but I ran a search and couldn't really find anything on it.


Game: Sapphire
Type: Person
Editor: Notepad / PKSV
Script: Choose Pokemon
Spoiler:
#org $choose
lock
faceplayer
checkflag 0x1008
if b_true goto $gotit
message $ready
$ready 1 =Let's choose your\nfirst Pokemon!
special 0x9C
waitspecial
release
end

#org $gotit
message $how
$how 1 =Your new Pokemon really\nseems to like you!
release
end


img.photobucket.com/albums/v237/cloudy789/eh.png
img.photobucket.com/albums/v237/cloudy789/eh2.png
I'm not allowed to post urls.


I want to pull up the r/s choose pokemon menu so that I can choose my starter, but when I run this script that first image pops up.
Then when I hit A, I'm suddenly the green glitch guy and not myself anymore.

I have no clue why the second part happens. As for the special, maybe I'm not setting a flag that I need to?

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

I was sort of answered in the sense that I can't have two level scripts of the same type on the same map, but I don't know what to do.

I have two level scripts (Type 02) that I want to activate at different times. Of course the first one works but when the requirements for the second one are activated, the second one doesn't activate. In fact, when I enter the map to activate it, the screen just goes black and doesn't respond.

How do i fix this/ combine the two scripts into one?
Being a hero is overrated anyways

esperance

Age 26
Male
OH
Seen October 8th, 2022
Posted January 11th, 2022
3,830 posts
13.1 Years
Okay, I consider myself a pretty good scripter, but I've run into a problem. For some reason, whenever I've been writing a script, and I compile it, it will either malfunction, or the game will reset that has the said script.

I've tried two different scripters (XSE and PKSV), but the errors happen regardless. Am I doing something wrong, or do both have some bug I haven't heard about.
What are you so afraid of?

0m3GA ARS3NAL

Im comin' home...

Age 30
Male
Superjail Penitentiary
Seen February 25th, 2023
Posted September 12th, 2013
1,816 posts
15.3 Years
Okay, I consider myself a pretty good scripter, but I've run into a problem. For some reason, whenever I've been writing a script, and I compile it, it will either malfunction, or the game will reset that has the said script.

I've tried two different scripters (XSE and PKSV), but the errors happen regardless. Am I doing something wrong, or do both have some bug I haven't heard about.
Mind posting your script?
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>

esperance

Age 26
Male
OH
Seen October 8th, 2022
Posted January 11th, 2022
3,830 posts
13.1 Years
Mind posting your script?
Well, this is what it looks like, compiled.

#org 0x8740454
'-----------------------------------
lockall
checkflag FR_POKEMON
if true jump 0x8740472 ' Flag is set
msgbox 0x8740474 ' Wait, I need to spea...
callstd MSG_LOCK ' Built-in lock command
applymovement PLAYER 0x87404A6 ' walk_down end
pauseevent 0x0
releaseall
end

#org 0x8740472
'-----------------------------------
releaseall
end


#org 0x8740474
= Wait, I need to speak with\nPROFESSOR LITTLE first!

#org 0x87404A6
M walk_down end
(From PKSV)
What are you so afraid of?

0m3GA ARS3NAL

Im comin' home...

Age 30
Male
Superjail Penitentiary
Seen February 25th, 2023
Posted September 12th, 2013
1,816 posts
15.3 Years
IDK, what did you put in person settings in A-Map?
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>
Male
Cyberspace
Seen June 27th, 2018
Posted December 10th, 2017
104 posts
12.5 Years
Okay, I consider myself a pretty good scripter, but I've run into a problem. For some reason, whenever I've been writing a script, and I compile it, it will either malfunction, or the game will reset that has the said script.

I've tried two different scripters (XSE and PKSV), but the errors happen regardless. Am I doing something wrong, or do both have some bug I haven't heard about.
I don't know about PKSV, but I do know that a script causing the ROM to reset is not a usual occurrence unless you use Pokescript.

If this just randomly started happening, I'd say the ROM could have gotten corrupted. If it happened from the first time you started, I'd say you used a bad ROM. Try doing the script in a new, clean ROM, and see what happens.

If that doesn't work... then it's probably the script. But, looking at the script, it doesn't "seem" to be bad. I'd recommend posting what XSE sees it as, because I don't know how PKSV works.

Malfunctions happen when your script is incorrect. So, those are easily fixable. =)
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)

esperance

Age 26
Male
OH
Seen October 8th, 2022
Posted January 11th, 2022
3,830 posts
13.1 Years
IDK, what did you put in person settings in A-Map?
Well, the script is to move the player, so I don't know what you mean by person settings...
What are you so afraid of?
Age 27
Male
Seen March 8th, 2014
Posted March 8th, 2014
311 posts
12.2 Years
Hey, could someone look at my script?

Spoiler:
'---------------
#org 0x800460
lock
msgbox 0x88007C5 MSG_YESNO '"Would you like to mine this rock?"
compare LASTRESULT 0x1
if 0x1 goto 0x88006AC
release
end
'---------------
#org 0x8006AC
lock
random 0x9
compare LASTRESULT 0x0
if 0x0 goto 0x8800721
compare LASTRESULT 0x0
if 0x1 goto 0x8800735
compare LASTRESULT 0x0
if 0x2 goto 0x8800745
compare LASTRESULT 0x0
if 0x3 goto 0x8800755
compare LASTRESULT 0x0
if 0x4 goto 0x8800765
compare LASTRESULT 0x0
if 0x5 goto 0x8800775
compare LASTRESULT 0x0
if 0x6 goto 0x8800785
compare LASTRESULT 0x0
if 0x7 goto 0x8800795
compare LASTRESULT 0x0
if 0x8 goto 0x88007A5
compare LASTRESULT 0x0
if 0x9 goto 0x88007B5
release
end
'---------------
#org 0x800721
lock
msgbox 0x88007E9 MSG_NORMAL '"The wall crumbled..."
warp 0x1 0x1 0x1 0x1 0x1
release
end
'---------------
#org 0x800735
lock
giveitem 0x1 0x1 MSG_FIND
release
end
'---------------
#org 0x800745
lock
giveitem 0x2 0x1 MSG_FIND
release
end
'---------------
#org 0x800755
lock
giveitem 0x3 0x1 MSG_FIND
release
end
'---------------
#org 0x800765
lock
giveitem 0x4 0x1 MSG_FIND
release
end
'---------------
#org 0x800775
lock
giveitem 0x5 0x1 MSG_FIND
release
end
'---------------
#org 0x800785
lock
giveitem 0x6 0x1 MSG_FIND
release
end
'---------------
#org 0x800795
lock
giveitem 0x7 0x1 MSG_FIND
release
end
'---------------
#org 0x8007A5
lock
giveitem 0x8 0x1 MSG_FIND
release
end
'---------------
#org 0x8007B5
lock
giveitem 0x9 0x1 MSG_FIND
release
end

'---------
' Strings
'---------
#org 0x8007C5
= Would you like to mine this rock?
#org 0x8007E9
= The wall crumbled...


Seems to pulling out an ultra ball everytime instead of being random...

EDIT: I forgot to say I'm using XSE and it was a fire red rom.

DrFuji

Heiki Hecchara‌‌

Age 30
Male
Aussie
Seen 4 Days Ago
Posted February 12th, 2021
1,693 posts
13.7 Years
Hey, could someone look at my script?

Spoiler:
'---------------
#org 0x800460
lock
msgbox 0x88007C5 MSG_YESNO '"Would you like to mine this rock?"
compare LASTRESULT 0x1
if 0x1 goto 0x88006AC
release
end
'---------------
#org 0x8006AC
lock
random 0x9
compare LASTRESULT 0x0
if 0x1 goto 0x8800721
compare LASTRESULT 0x1
if 0x1 goto 0x8800735
compare LASTRESULT 0x2
if 0x1 goto 0x8800745
compare LASTRESULT 0x3
if 0x1 goto 0x8800755
compare LASTRESULT 0x4
if 0x1 goto 0x8800765
compare LASTRESULT 0x5
if 0x1 goto 0x8800775
compare LASTRESULT 0x6
if 0x1 goto 0x8800785
compare LASTRESULT 0x7
if 0x1 goto 0x8800795
compare LASTRESULT 0x8
if 0x1 goto 0x88007A5
compare LASTRESULT 0x9
if 0x1 goto 0x88007B5
release
end
'---------------
#org 0x800721
lock
msgbox 0x88007E9 MSG_NORMAL '"The wall crumbled..."
warp 0x1 0x1 0x1 0x1 0x1
release
end
'---------------
#org 0x800735
lock
giveitem 0x1 0x1 MSG_FIND
release
end
'---------------
#org 0x800745
lock
giveitem 0x2 0x1 MSG_FIND
release
end
'---------------
#org 0x800755
lock
giveitem 0x3 0x1 MSG_FIND
release
end
'---------------
#org 0x800765
lock
giveitem 0x4 0x1 MSG_FIND
release
end
'---------------
#org 0x800775
lock
giveitem 0x5 0x1 MSG_FIND
release
end
'---------------
#org 0x800785
lock
giveitem 0x6 0x1 MSG_FIND
release
end
'---------------
#org 0x800795
lock
giveitem 0x7 0x1 MSG_FIND
release
end
'---------------
#org 0x8007A5
lock
giveitem 0x8 0x1 MSG_FIND
release
end
'---------------
#org 0x8007B5
lock
giveitem 0x9 0x1 MSG_FIND
release
end

'---------
' Strings
'---------
#org 0x8007C5
= Would you like to mine this rock?
#org 0x8007E9
= The wall crumbled...


Seems to pulling out an ultra ball everytime instead of being random...

EDIT: I forgot to say I'm using XSE and it was a fire red rom.
You're using the values in the 'compare' and 'if' commands incorrectly - You had scripted so it would only check if the last result was 0 or not (0x0 or 0x1), rather than checking all the values it could hold.

Changes in red.
Male
Seen June 29th, 2011
Posted March 3rd, 2011
5 posts
12.2 Years
Heyo. I sort of decided to be brave and try to make a script or two myself before I went around asking other people to get involved with that aspect of my hack. Unfortunately, it didn't go too well; a red-screen a musical stutter resulted. (After this gets resolved I'll probably just make a topic here and ask for scripting help, seeing as how I managed to wreck this XD)

I composed a script which activates upon stepping on a tile (in this case, one of two next door to Viridian Gym)

#org $start
lockall
checkflag 0x500
if b_false goto 0x800000
release
end
In theory this script should have activated the one below after checking to see if flag 500 is set. (Which it shouldn't be at this point)

#org $start
#raw 0xAC 0x24 0x00 0x0A 0x00
#raw 0xAE
#raw 0x55 0x00 0x05
applymovement 0x500 $move
pausemove 0
#raw 0XAD 0x24 0x00 0x0A 0x00
#raw 0xAE
lock
message $talk
boxset 6
playsound 0x112
nop
fadescreen 0
#raw 0x53 0x0F 0x80
setflag 0x500
playsound 0x13A
nop
release
end

#org $move
#raw 0x10 0x4A 0x62 0xFE

#org $talk
$talk 1 = Eh?\nI'm sorry.\pI can't accept your\nchallenge at the moment.\pBusiness matters you see.\pYou've seen too much as/nalready is.\pConsider it an honor you\ngot to meet the great\lGYM LEADER GIOVANNI!\pI can see it in your eyes...\pYou will become a powerful trainer!\pLet us meet again soon.\pWhen I am not so busy.\pI am eager to challenge you.\pFarewell for now, great one!
This script, on paper was supposed to activate a simple cutscene in which Giovanni emerges from the gym, talks to the player, and then vanishes when the screen fades out, with a different music track called to play for the duration of the event.

None of that happened; instead I was greeted with a red screen when I stepped on the tile. I'm not quite sure where it went wrong.

Also of note is that Giovanni's sprite was not invisible, which made it appear as though he were stuck in the closed door, but this is relatively minor compared to the above; once the script starts functioning properly I'll worry about how to set up the NPC visibility.
Seen March 17th, 2014
Posted March 7th, 2011
8 posts
14.2 Years
Spoiler:
#org 0x8169BE1
'-----------------------------------
applymovement 0x4 0x81A75EF ' look_right end
pauseevent 0x0
showpokepic 0x4002 0xA 0x3
textcolor BLUE
compare 0x4001 0x0
if == jump 0x8169C14 ' Equal To
compare 0x4001 0x1
if == jump 0x8169C33 ' Equal To
compare 0x4001 0x2
if == jump 0x8169C52 ' Equal To
compare 0x4001 0x3
if == jump 0x7400000
end[/S]

#org 0x87400D5
'-----------------------------------
hidepokepic
setflag 0x1000
disappear LASTTALKED
msgbox 0x818E2E5 ' This POK\eMON is rea...
callstd MSG_NOCLOSE ' Non-closing message
call 0x81A6675
setflag FR_POKEMON
setflag 0x291
addpokemon GASTLY 5 NONE 0x0 0x0 0x0
copyvar 0x4031 0x4001
storepokemon 0x0 GASTLY
message 0x871CAB1 ' \v\h01 received the ...
showmsg
fanfare 0x13E
waitfanfare
msgbox 0x81A56A7 ' Do you want to give ...
callstd MSG_YESNO ' Yes/No message
compare LASTRESULT YES
if == jump 0x8169CCC ' Equal To
compare LASTRESULT 0x0
if == jump 0x8169CDC ' Equal To
end

#org 0x81A6675
'-----------------------------------
copyvar 0x8012 0x8013
return

#org 0x7400000
'-----------------------------------
msgbox 0x871BCF2 ' Ah! CHARMANDER.\nNow...
callstd MSG_YESNO ' Yes/No message
compare LASTRESULT YES
if == jump 0x8169C74 ' Equal To
compare LASTRESULT 0x0
if == jump 0x8169C71 ' Equal To
end


Ok a few problems here
1.It doesnt show the preview (i guess you can call it that)
2.When rival chooses his pokemon it say RIVAL HAS CHOSEN ?????????? and his pokeball doesn't disappear
3.After i do the first battle when i leave the lab and come back if i choose the pokeball again i have to do the battle over gagain and then the pokeball will disappear for good
4.I can choose gastly before the professor makes you follow him

Help would be greatly appreciated