colcolstyles
Yours truly
- 1,588
- Posts
- 16
- Years
- The Bay Area
- Seen May 19, 2019
Alright guys, gonna need an advance scripter here pronto. This isnt recomended for lightweights.
Heres the problem. when I use this script here, after it has been executed when I leave the current building, everything is black. Can someone tell me what is wrong with this script that would make it do something like that?
Spoiler:Code:#dynamic 0x800000 #org @start applymovement MOVE_PLAYER @move1 textcolor 0x1 msgbox @msg1 0x6 textcolor 0x0 msgbox @msg2 0x6 textcolor 0x1 msgbox @msg3 0x6 textcolor 0x0 msgbox @msg4 0x6 textcolor 0x1 msgbox @msg5 0x6 textcolor 0x0 msgbox @msg6 0x6 sound 0x15 applymovement MOVE_PLAYER @move2 waitmovement 0x0 checkflag 0xBBE if 0x1 goto @suicune checkflag 0xBBD if 0x1 goto @entei checkflag 0xBBC if 0x1 goto @raikou end #org @entei showsprite 0x9 fadeout 0x1 cry 0xF4 0x0 waitcry sound 0x15 applymovement 0x3 @move3 waitmovement 0x0 textcolor 0x1 msgbox @msg18 0x6 applymovement 0x9 @move4 waitmovement 0x0 sound 0x15 applymovement 0x9 @move5 msgbox @msg8 0x6 waitmsg waitmovement 0x9 applymovement 0x9 @move6 waitmovement 0x9 sound 0x15 applymovement 0x9 @move5 waitmovement 0x9 msgbox @msg9 0x6 waitmsg applymovement 0x9 @move7 waitmovement 0x9 applymovement MOVE_PLAYER @move8 applymovement 0x3 @move8 waitmovement 0x0 textcolor 0x2 preparemsg @msg17 textcolor 0x0 msgbox @msg11 0x6 waitmsg cry 0xF4 0x0 waitcry hidesprite 0x9 applymovement MOVE_PLAYER @move9 waitmovement 0x0 fadedefault textcolor 0x1 msgbox @msg12 0x6 waitmsg applymovement 0x3 @move10 waitmovement 0x3 msgbox @msg13 0x6 hidesprite 0xA applymovement 0x3 @move11 msgbox @msg14 0x6 setflag 0x829 special 0x16F textcolor 0x0 msgbox @msg15 0x6 textcolor 0x1 msgbox @msg16 0x6 release setvar 0x5002 0x1 end #org @raikou showsprite 0x8 fadeout 0x1 cry 0xF4 0x0 waitcry sound 0x15 applymovement 0x3 @move3 waitmovement 0x0 textcolor 0x1 msgbox @msg20 0x6 applymovement 0x8 @move4 waitmovement 0x0 sound 0x15 applymovement 0x8 @move5 msgbox @msg8 0x6 waitmsg waitmovement 0x8 applymovement 0x8 @move6 waitmovement 0x8 sound 0x15 applymovement 0x8 @move5 waitmovement 0x8 msgbox @msg9 0x6 waitmsg applymovement 0x8 @move7 waitmovement 0x8 applymovement MOVE_PLAYER @move8 applymovement 0x3 @move8 waitmovement 0x0 textcolor 0x2 preparemsg @msg19 textcolor 0x0 msgbox @msg11 0x6 waitmsg cry 0xF3 0x0 waitcry hidesprite 0x8 applymovement MOVE_PLAYER @move9 waitmovement 0x0 fadedefault textcolor 0x1 msgbox @msg12 0x6 waitmsg applymovement 0x3 @move10 waitmovement 0x3 msgbox @msg13 0x6 hidesprite 0xA applymovement 0x3 @move11 msgbox @msg14 0x6 setflag 0x829 special 0x16F textcolor 0x0 msgbox @msg15 0x6 textcolor 0x1 msgbox @msg16 0x6 release setvar 0x5002 0x1 end #org @suicune showsprite 0x7 fadeout 0x1 cry 0xF5 0x0 waitcry sound 0x15 applymovement 0x3 @move3 waitmovement 0x0 textcolor 0x1 msgbox @msg7 0x6 applymovement 0x7 @move4 waitmovement 0x0 sound 0x15 applymovement 0x7 @move5 msgbox @msg8 0x6 waitmsg waitmovement 0x7 applymovement 0x7 @move6 waitmovement 0x7 sound 0x15 applymovement 0x7 @move5 waitmovement 0x7 msgbox @msg9 0x6 waitmsg applymovement 0x7 @move7 waitmovement 0x7 applymovement MOVE_PLAYER @move8 applymovement 0x3 @move8 waitmovement 0x0 textcolor 0x2 preparemsg @msg10 textcolor 0x0 msgbox @msg11 0x6 waitmsg cry 0xF5 0x0 waitcry hidesprite 0x7 applymovement MOVE_PLAYER @move9 waitmovement 0x0 fadedefault textcolor 0x1 msgbox @msg12 0x6 waitmsg applymovement 0x3 @move10 waitmovement 0x3 msgbox @msg13 0x6 hidesprite 0xA applymovement 0x3 @move11 msgbox @msg14 0x6 setflag 0x829 special 0x16F textcolor 0x0 msgbox @msg15 0x6 textcolor 0x1 msgbox @msg16 0x6 release setvar 0x5002 0x1 end #org @msg1 = Prof Mizuke: Sigh...\nYour late #org @msg2 = [player]: Uhh... I had a dream\nand overslept.. #org @msg3 = Prof Mizuke: Well thats a shame,\nall of the starter pokemon were\ltaken while you were dreaming. #org @msg4 = [player]: No...\nThats... Impossible! #org @msg5 = Prof Mizuke: I'm sorry [player]\nbut the rules state its impossible\lfor someone to become a trainer\lwithout at least one pokemon...\pYou'll have to come back\nnext season... #org @msg6 = [player]: Why... Its just\nnot fair...\pAll that waitin- #org @msg7 = Prof Mizuke: W-why thats the\nlegendary pokemon Suicune! #org @msg8 = Prof Mizuke: I never thought\nI'd live long enough to see\lthis pokemon... #org @msg9 = Prof Mizuke: So young and\ncurious too! #org @msg10 = Suicune gently nudges an item on\nyour belt.\pAfter close inspection,\nit appears to be some kind\lof pokeball! #org @msg11 = [player]: What the..\nWhen did this get here?\pUhm.. Uhh..\nSuicune, return!? #org @msg12 = Prof Mizuke: Truly remarkable..\p...\pWell [player], looks like you\nhave your pokemon.\lLucky for you, I have another\lPokedex to spare... #org @msg13 = Prof Mizuke: I'll just change\nthis...\pPress that..\p...\pThere! All done.\nIts now registered to [player]. #org @msg14 = Prof Mizuke: Here you go [player].\nYou are now an official trainer! #org @msg15 = [player]: Thank you professor!\pI can't believe I'm finally\na trainer... #org @msg16 = Prof Mizuke: You've come a\nlong way [player]...\pNow run along. [rival]'s already\nway ahead!\pOh yes, before you start your\njourney, go visit your father.\pHe has something to give you. #org @msg17 = Entei gently nudges an item on\nyour belt.\pAfter close inspection,\nit appears to be some kind\lof pokeball! #org @msg18 = Prof Mizuke: W-why thats the\nlegendary pokemon Entei! #org @msg19 = Raikou gently nudges an item on\nyour belt.\pAfter close inspection,\nit appears to be some kind\lof pokeball! #org @msg20 = Prof Mizuke: W-why thats the\nlegendary pokemon Raikou! #org @move1 #raw 0x11 //Step Up (Normal) #raw 0x11 //Step Up (Normal) #raw 0x11 //Step Up (Normal) #raw 0x11 //Step Up (Normal) #raw 0xFE //End of Movements #org @move2 #raw 0x62 //Exclamation Mark (!) #raw 0x3 //Face Right #raw 0xFE //End of Movements #org @move3 #raw 0x62 //Exclamation Mark (!) #raw 0x3 //Face Right #raw 0xFE //End of Movements #org @move4 #raw 0xD //Step Up (Slow) #raw 0x2 //Face Left #raw 0xFE //End of Movements #org @move5 #raw 0x63 //Question Mark (?) #raw 0xFE //End of Movements #org @move6 #raw 0x1 //Face Up #raw 0x17 //Jump2 Right #raw 0x17 //Jump2 Right #raw 0xFE //End of Movements #org @move7 #raw 0x1D //Step Down (Fast) #raw 0x1D //Step Down (Fast) #raw 0x1D //Step Down (Fast) #raw 0x1F //Step Left (Fast) #raw 0x1F //Step Left (Fast) #raw 0x1F //Step Left (Fast) #raw 0x1F //Step Left (Fast) #raw 0x1F //Step Left (Fast) #raw 0x1E //Step Up (Fast) #raw 0xFE //End of Movements #org @move8 #raw 0x2D //Face Down (Delayed) #raw 0xFE //End of Movements #org @move9 #raw 0x1 //Face Up #raw 0xFE //End of Movements #org @move10 #raw 0x12 //Step Left (Normal) #raw 0x11 //Step Up (Normal) #raw 0xFE //End of Movements #org @move11 #raw 0x13 //Step Right (Normal) #raw 0x10 //Step Down (Normal) #raw 0xFE //End of Movements
I'm guessing my script was so epic it broke the game?
I am not exaggerating when I say that that script is quite possibly the biggest waste of space I've ever seen. My God. What if you realized that there was an error in Entei's? You'd have to edit Suicune and Raikou's script to make whatever change you made in Entei's. It might seem manageable now but when you're dealing with more than just 3 scripts and you find yourself having to make tweaks dozens of times, it's going to get annoying. It seems to me that the only differences between each the legendary dogs' scripts are the cries, the Person ID of the OW to apply the movements to, and the text that is displayed. All of those can be replaced with variables except for the texts which you can use buffers for. One of the scripting tutorials seriously needs to add a section on space efficiency because this is just ridiculous.
Anyways, the script itself looks fine (by your standards, at least) so you're right in that its execution isn't causing the problem. Yet obviously something about it is messing things up. Perhaps by setting variable 0x5002 you're activating a level script on the map outside the Professor's lab which is faulty? Or maybe those flags, though I doubt it. It would seem to me that the problem lies more in the map outside the lab than this script. If I were you, I would check that map's scripts and see if you can't dig anything up.
edit: So I went through and improved your script. The new version takes up about 2/3 of the space that your old one did. I couldn't fully debug it because I don't have the map that the script is supposed to take place on but I did my best. If anything doesn't work, too freaking bad.
Spoiler:
Code:
#include stdpoke.rbh
#erase 0x800000 0x1000
#dynamic 0x800000
#define V_POKE 0x7000
// 0x7000 will be set to either 0x00F3, 0x00F4, or 0x00F5
// for Raikou, Entei, and Suicune respectively
#define MOVE_POKE 0x7001
// Used for 'showsprite' & 'hidesprite' and pokemon 'applymovement's
#define MOVE_PROF 0x0003
// Person ID of the Professor, I presume
#org @start
applymovement MOVE_PLAYER @move1
msgbox @msg1 0x6
sound 0x15
applymovement MOVE_PLAYER @move2
waitmovement 0x0
checkflag 0xBBE
if 0x1 call @suicune
checkflag 0xBBD
if 0x1 call @entei
checkflag 0xBBC
if 0x1 call @raikou
bufferpokemon 0x00 V_POKE
showsprite MOVE_POKE
fadeout 0x1
cry V_POKE 0x0000
waitcry
sound 0x15
applymovement MOVE_PROF @move2
waitmovement 0x0
msgbox @msg18 0x6
applymovement MOVE_POKE @move4
waitmovement 0x0
sound 0x15
applymovement MOVE_POKE @move5
msgbox @msg8 0x6
waitmovement MOVE_POKE
applymovement MOVE_POKE @move6
waitmovement MOVE_POKE
sound 0x15
applymovement MOVE_POKE @move5
waitmovement MOVE_POKE
msgbox @msg9 0x6
applymovement MOVE_POKE @move7
waitmovement MOVE_POKE
applymovement MOVE_PLAYER @move8
applymovement MOVE_PROF @move8
waitmovement 0x0
msgbox @msg17 0x6
cry V_POKE 0x0000
waitcry
hidesprite MOVE_POKE
applymovement MOVE_PLAYER @move9
waitmovement 0x0
fadedefault
msgbox @msg12 0x6
applymovement MOVE_PROF @move10
waitmovement MOVE_PROF
msgbox @msg13 0x6
hidesprite 0xA
applymovement MOVE_PROF @move11
msgbox @msg14 0x6
setflag 0x829
special 0x16F
msgbox @msg15 0x6
release
setvar 0x5002 0x1
end
#org @suicune
setvar V_POKE PKMN_SUICUNE
setvar MOVE_POKE 0x0007
return
#org @entei
setvar V_POKE PKMN_ENTEI
setvar MOVE_POKE 0x0009
return
#org @raikou
setvar V_POKE PKMN_RAIKOU
setvar MOVE_POKE 0x0008
return
#org @msg1
= [red_fr]Prof Mizuke: Sigh...\nYour late\p[blue_fr][player]: Uhh... I had a dream\nand overslept..\p[red_fr]Prof Mizuke: Well thats a shame,\nall of the starter pokemon were\ltaken while you were dreaming.\p[blue_fr][player]: No...\nThats... Impossible!\p[red_fr]Prof Mizuke: I'm sorry [player]\nbut the rules state its impossible\lfor someone to become a trainer\lwithout at least one pokemon...\pYou'll have to come back\nnext season...\p[blue_fr][player]: Why... Its just\nnot fair...\pAll that waitin-
#org @msg8
= [red_fr]Prof Mizuke: I never thought\nI'd live long enough to see\lthis pokemon...
#org @msg9
= [red_fr]Prof Mizuke: So young and\ncurious too!
#org @msg12
= [red_fr]Prof Mizuke: Truly remarkable..\p...\pWell [player], looks like you\nhave your pokemon.\lLucky for you, I have another\lPokedex to spare...
#org @msg13
= [red_fr]Prof Mizuke: I'll just change\nthis...\pPress that..\p...\pThere! All done.\nIts now registered to [player].
#org @msg14
= [red_fr]Prof Mizuke: Here you go [player].\nYou are now an official trainer!
#org @msg15
= [blue_fr][player]: Thank you professor!\pI can't believe I'm finally\na trainer...\p[red_fr]Prof Mizuke: You've come a\nlong way [player]...\pNow run along. [rival]'s already\nway ahead!\pOh yes, before you start your\njourney, go visit your father.\pHe has something to give you.
#org @msg17
= [buffer1] gently nudges an item on\nyour belt.\pAfter close inspection,\nit appears to be some kind\lof pokeball!\p[blue_fr][player]: What the..\nWhen did this get here?\pUhm.. Uhh..\n[buffer1], return!?
#org @msg18
= [red_fr]Prof Mizuke: W-why thats the\nlegendary pokemon [buffer1]!
#org @move1
#raw 0x11 //Step Up (Normal)
#raw 0x11 //Step Up (Normal)
#raw 0x11 //Step Up (Normal)
#raw 0x11 //Step Up (Normal)
#raw 0xFE //End of Movements
#org @move2
#raw 0x62 //Exclamation Mark (!)
#raw 0x3 //Face Right
#raw 0xFE //End of Movements
#org @move4
#raw 0xD //Step Up (Slow)
#raw 0x2 //Face Left
#raw 0xFE //End of Movements
#org @move5
#raw 0x63 //Question Mark (?)
#raw 0xFE //End of Movements
#org @move6
#raw 0x1 //Face Up
#raw 0x17 //Jump2 Right
#raw 0x17 //Jump2 Right
#raw 0xFE //End of Movements
#org @move7
#raw 0x1D //Step Down (Fast)
#raw 0x1D //Step Down (Fast)
#raw 0x1D //Step Down (Fast)
#raw 0x1F //Step Left (Fast)
#raw 0x1F //Step Left (Fast)
#raw 0x1F //Step Left (Fast)
#raw 0x1F //Step Left (Fast)
#raw 0x1F //Step Left (Fast)
#raw 0x1E //Step Up (Fast)
#raw 0xFE //End of Movements
#org @move8
#raw 0x2D //Face Down (Delayed)
#raw 0xFE //End of Movements
#org @move9
#raw 0x1 //Face Up
#raw 0xFE //End of Movements
#org @move10
#raw 0x12 //Step Left (Normal)
#raw 0x11 //Step Up (Normal)
#raw 0xFE //End of Movements
#org @move11
#raw 0x13 //Step Right (Normal)
#raw 0x10 //Step Down (Normal)
#raw 0xFE //End of Movements
Last edited: