- 7
- Posts
- 11
- Years
- California
- Seen Apr 22, 2017
Posted this on Script Help Thread, didn't get a response, will try here.
Game: Pokemon FireRed
Type: Person event (Scripted Legendary Encounter)
Editor: PKSV-UI by Score_Under (via AdvanceMap 1.95)
Script:
#org 0x83B9410
'-----------------------------------
special INIT_STEPCOUNT
compare LASTRESULT 0x2
if == jump 0x81A7AE0 ' Equal To
special GET_STEPCOUNT
lock
faceplayer
battle ENTEI 50 NONE
checksound
cry ENTEI 0x2
message 0x83B947F ' Brm!
showmsg
waitcry
pause 0xA
playsound 0x2 0x2
waitbutton
setflag 0x807
special BATTLE_PIXELLATE
waitspecial
clearflag 0x807
special2 LASTRESULT 0xB4
compare LASTRESULT 0x1
if == jump 0x824F0F7 ' Equal To
compare LASTRESULT 0x4
if == jump 0x8163824 ' Equal To
compare LASTRESULT 0x5
if == jump 0x8163824 ' Equal To
setflag 0x228
release
end
#org 0x81A7AE0
'-----------------------------------
release
end
#org 0x824F0F7
'-----------------------------------
setflag 0x228
jump 0x81A922D
#org 0x81A922D
'-----------------------------------
fadescreen FADEOUT_BLACK
disappear LASTTALKED
fadescreen FADEIN_BLACK
release
end
#org 0x8163824
'-----------------------------------
setvar 0x8004 0xF4
jump 0x81A9236
#org 0x81A9236
'-----------------------------------
fadescreen FADEOUT_BLACK
disappear LASTTALKED
fadescreen FADEIN_BLACK
storepokemon 0x0 0x8004
msgbox 0x81A63C4 ' The \v\h02 flew away...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end
#org 0x83B947F
= Brm!
#org 0x81A63C4
= The \v\h02 flew away!
The goal for this script: I have all three legendary dogs in a spot. What I want them to do is act like all the other legendary encounters here. I examined other legendary scripts to try to determine how they differed, and then could make my own to do this. Eventually I want to make all of the Gen II legendaries available somewhere. Ultimately I want the game to be a 386 patch (I'll do more stuff beyond this to start making a new game, but I wanted to start simple ) -- and will need to do this for all the legendaries (or at least, the ones with sprites) so figuring out how to make this work is important.
What's actually happening:Catching the Pokemon does nothing. That is, it's still there, available for capture as many times as I want. If I run, the flee message displays, then if I walk away, any of the three that I've already ran from comes back after I take a step. If I make the legendary faint, the message doesn't display, but the pokemon still comes back after the next encounter. From the code examination (I have Entei's in the script, Suicune and Raikou's are similar, just with their own flags and coding) they look to be coded the same way as all the legendaries that work fine (ie: Mewtwo, Zapdos, etc.) but... they don't. So... what am I missing here?
Screenshots and/or videos:
Since I can't post links, apparently, since I'm new here (and this is also my first attempt at hacking), the screencaps aren't available right here... www dot mainstreet52 dot info slash images slash FRIPH slash Dogs1.png is the first image (the others are Dogs2.png and Dogs3.png, and they were taken in numerical order.) I'm not sure how helpful they'll be... this is on fleeing twice. I've fixed the issue where it says ZAPDOS is the one that flees, that was simply fixing the hex var which I hadn't figured out at first.
Game: Pokemon FireRed
Type: Person event (Scripted Legendary Encounter)
Editor: PKSV-UI by Score_Under (via AdvanceMap 1.95)
Script:
Spoiler:
#org 0x83B9410
'-----------------------------------
special INIT_STEPCOUNT
compare LASTRESULT 0x2
if == jump 0x81A7AE0 ' Equal To
special GET_STEPCOUNT
lock
faceplayer
battle ENTEI 50 NONE
checksound
cry ENTEI 0x2
message 0x83B947F ' Brm!
showmsg
waitcry
pause 0xA
playsound 0x2 0x2
waitbutton
setflag 0x807
special BATTLE_PIXELLATE
waitspecial
clearflag 0x807
special2 LASTRESULT 0xB4
compare LASTRESULT 0x1
if == jump 0x824F0F7 ' Equal To
compare LASTRESULT 0x4
if == jump 0x8163824 ' Equal To
compare LASTRESULT 0x5
if == jump 0x8163824 ' Equal To
setflag 0x228
release
end
#org 0x81A7AE0
'-----------------------------------
release
end
#org 0x824F0F7
'-----------------------------------
setflag 0x228
jump 0x81A922D
#org 0x81A922D
'-----------------------------------
fadescreen FADEOUT_BLACK
disappear LASTTALKED
fadescreen FADEIN_BLACK
release
end
#org 0x8163824
'-----------------------------------
setvar 0x8004 0xF4
jump 0x81A9236
#org 0x81A9236
'-----------------------------------
fadescreen FADEOUT_BLACK
disappear LASTTALKED
fadescreen FADEIN_BLACK
storepokemon 0x0 0x8004
msgbox 0x81A63C4 ' The \v\h02 flew away...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end
#org 0x83B947F
= Brm!
#org 0x81A63C4
= The \v\h02 flew away!
The goal for this script: I have all three legendary dogs in a spot. What I want them to do is act like all the other legendary encounters here. I examined other legendary scripts to try to determine how they differed, and then could make my own to do this. Eventually I want to make all of the Gen II legendaries available somewhere. Ultimately I want the game to be a 386 patch (I'll do more stuff beyond this to start making a new game, but I wanted to start simple ) -- and will need to do this for all the legendaries (or at least, the ones with sprites) so figuring out how to make this work is important.
What's actually happening:Catching the Pokemon does nothing. That is, it's still there, available for capture as many times as I want. If I run, the flee message displays, then if I walk away, any of the three that I've already ran from comes back after I take a step. If I make the legendary faint, the message doesn't display, but the pokemon still comes back after the next encounter. From the code examination (I have Entei's in the script, Suicune and Raikou's are similar, just with their own flags and coding) they look to be coded the same way as all the legendaries that work fine (ie: Mewtwo, Zapdos, etc.) but... they don't. So... what am I missing here?
Screenshots and/or videos:
Since I can't post links, apparently, since I'm new here (and this is also my first attempt at hacking), the screencaps aren't available right here... www dot mainstreet52 dot info slash images slash FRIPH slash Dogs1.png is the first image (the others are Dogs2.png and Dogs3.png, and they were taken in numerical order.) I'm not sure how helpful they'll be... this is on fleeing twice. I've fixed the issue where it says ZAPDOS is the one that flees, that was simply fixing the hex var which I hadn't figured out at first.