Is it the 19th map? If so you need to use the hex, 0x13.
It's Route 1. (3.19)
Is it the 19th map? If so you need to use the hex, 0x13.
It keeps bringing me to the wrong map!
Spoiler:Code:#dynamic 0x800000 #org @start lock faceplayer msgbox @1 0x6 fadescreen 0x1 warp 0x3 0x19 0xFF 0x0A 0x24 fadescreen 0x0 release end #org @1 = This one looks good!\n
>Byte - Bank # to warp to
>Byte - Map # to warp to
>Byte - Exit # to warp to
>Word - X coordinate
>Word - Y coordinate
It's Route 1. (3.19)
Spoiler:Well first off, you don't need that second fadescreen, but you should replace it with a waitstate then end. No release.
Secondly, the correct syntax for warp is:
Code:>Byte - Bank # to warp to >Byte - Map # to warp to >Byte - Exit # to warp to >Word - X coordinate >Word - Y coordinate
You shouldn't have an exit number that is 0xFF
Make sure that you're using decimal numbers since map editors use decimal. 0x19 or 19, make sure you can distinguish the correct one
#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @1 0x6
fadescreen 0x1
warp 0x3 0x25 0xFF 0x0A 0x24
waitstate
end
#org @1
= This one looks good!\n
Like this?
Spoiler:Code:#dynamic 0x800000 #org @start lock faceplayer msgbox @1 0x6 fadescreen 0x1 warp 0x3 0x25 0xFF 0x0A 0x24 waitstate end #org @1 = This one looks good!\n
Again, why are you using a warp number with 0xFF?
How did you get from 0x19 to 0x25 when your map number is simply 19?
#dynamic 0x800000
#org @start
comparefarbytetobyte 0x3005542 0x6 /6am
if 0x4 goto @snippet1
comparefarbytetobyte 0x3005542 0x12 /6pm
if 0x4 goto @snippet2
release
end
#org @snippet1
setmaptile 0xA 0x5 0x2D5 0x0
special 0x8E
release
end
#org @snippet2
setmaptile 0xA 0x5 0x2D4 0x0
special 0x8E
release
end
Again, why are you using a warp number with 0xFF?
So I am having trouble trying to get setmaptile to work for FR...
This is my script:
Code:#dynamic 0x800000 #org @start comparefarbytetobyte 0x3005542 0x6 /6am if 0x4 goto @snippet1 comparefarbytetobyte 0x3005542 0x12 /6pm if 0x4 goto @snippet2 release end #org @snippet1 setmaptile 0xA 0x5 0x2D5 0x0 special 0x8E release end #org @snippet2 setmaptile 0xA 0x5 0x2D4 0x0 special 0x8E release end
I am simply trying to have lights turn on at 6pm an then turn off at 6am...
Using the RTC from DNS of course...
Also I can't figure out what level script type I am supposed to use....
I'm pretty sure he wants to put that in a level script. As for the question...What happens when you step on the tile? Does it freeze? Do you just walk over it?
For the script, try swapping the checks. What you're doing now is checking if it's later than 6:00 and if it is you're going to another part of the script. The second check (if it's later than 18:00) will be never run because it can never be later than 18:00 and sooner than 6:00. I might be derping hard, but I'm pretty sure that might fix it (actually, I don't know if that's the problem if there is one as I don't know what tile is what). As for the type, you should use "01 "setmaptile" script". That's what GameFreak use when they want to set map tiles in a level script.So I am having trouble trying to get setmaptile to work for FR...
This is my script:
--CUT--
I am simply trying to have lights turn on at 6pm an then turn off at 6am...
Using the RTC from DNS of course...
Also I can't figure out what level script type I am supposed to use....
Trainerbattle 0x3 is the kind of battle that will continue after the battle, and obviously it is in Ruby because it's used in that script right there. I think destinedjagold got that one wrong, so try it out.Thanks your your suggestion, I've found the main script but it looks a bit confusing.
This is the main part:
Spoiler:'---------------
#org 0x14EB92
lockall
checkgender
compare LASTRESULT 0x0
if 0x1 goto 0x814EBAB
compare LASTRESULT 0x1
if 0x1 goto 0x814EC04
end
'---------------
#org 0x14EBAB
msgbox 0x816D57A MSG_KEEPOPEN '"MAY: Let's see... The POKéMON foun..."
playsong 0x19F 0x1
applymovement 0x2 0x81A0839
waitmovement 0x0
applymovement 0x2 0x81A0833
waitmovement 0x0
applymovement 0x2 0x81A0835
waitmovement 0x0
msgbox 0x816D5B6 MSG_KEEPOPEN '"Oh, hi, [player]\v\h05!\p...Oh, I ..."
copyvar 0x8000 0x4023
compare 0x8000 0x0
if 0x1 goto 0x814EC5D
compare 0x8000 0x1
if 0x1 goto 0x814EC6D
compare 0x8000 0x2
if 0x1 goto 0x814EC7D
end
'---------------
#org 0x14EC04
msgbox 0x816D762 MSG_KEEPOPEN '"BRENDAN: Okay, so it's this one an..."
playsong 0x1A5 0x1
applymovement 0x2 0x81A0839
waitmovement 0x0
applymovement 0x2 0x81A0833
waitmovement 0x0
applymovement 0x2 0x81A0835
waitmovement 0x0
msgbox 0x816D7A9 MSG_KEEPOPEN '"Hey, it's [player]!\p...Oh, yeah, ..."
copyvar 0x8000 0x4023
compare 0x8000 0x0
if 0x1 goto 0x814EC8D
compare 0x8000 0x1
if 0x1 goto 0x814EC9D
compare 0x8000 0x2
if 0x1 goto 0x814ECAD
end
'---------------
#org 0x14EC5D
trainerbattle 0x3 0x214 0x0 0x816D65B
goto 0x814ECBD
'---------------
#org 0x14EC6D
trainerbattle 0x3 0x217 0x0 0x816D65B
goto 0x814ECBD
'---------------
#org 0x14EC7D
trainerbattle 0x3 0x211 0x0 0x816D65B
goto 0x814ECBD
'---------------
#org 0x14EC8D
trainerbattle 0x3 0x20B 0x0 0x816D836
goto 0x814ECCB
'---------------
#org 0x14EC9D
trainerbattle 0x3 0x20E 0x0 0x816D836
goto 0x814ECCB
'---------------
#org 0x14ECAD
trainerbattle 0x3 0x208 0x0 0x816D836
goto 0x814ECCB
'---------------
#org 0x14ECBD
msgbox 0x816D688 MSG_KEEPOPEN '"MAY: I think I know why my dad has..."
goto 0x814ECD9
'---------------
#org 0x14ECCB
msgbox 0x816D856 MSG_KEEPOPEN '"BRENDAN: I think I get it.\nI thin..."
goto 0x814ECD9
'---------------
#org 0x14ECD9
closeonkeypress
copyvar 0x8000 PLAYERFACING
compare 0x8000 0x1
if 0x1 goto 0x814ED29
compare 0x8000 0x2
if 0x1 goto 0x814ED0C
compare 0x8000 0x3
if 0x1 goto 0x814ED29
compare 0x8000 0x4
if 0x1 goto 0x814ED29
end
'---------------
#org 0x14ED29
applymovement 0x2 0x814ED71
waitmovement 0x0
sound 0xA
applymovement 0x2 0x814ED74
waitmovement 0x0
goto 0x814ED46
'---------------
#org 0x14ED0C
applymovement 0x2 0x814ED67
waitmovement 0x0
sound 0xA
applymovement 0x2 0x814ED6B
waitmovement 0x0
goto 0x814ED46
'---------------
#org 0x14ED46
hidesprite 0x2
setvar 0x4062 0x1
setvar 0x4084 0x4
clearflag 0x379
setflag 0x82
setvar 0x40C7 0x1
clearflag 0x3D3
playsong2 0x0
fadedefault
releaseall
end
There are a couple standard trainerbattles like "trainerbattle 0x3 0x214 0x0 0x816D65B" but it doesn't show any specials/callasm or anything strange.
i may have misunderstood his original post. see the quote below.Trainerbattle 0x3 is the kind of battle that will continue after the battle, and obviously it is in Ruby because it's used in that script right there. I think destinedjagold got that one wrong, so try it out.
trainerbattle 0x3 only has the challenge pointer, and not a defeat pointer, so keep that in mind.
Hi there, quick question!
Is there any way to make a script continue after a trainer battle is lost in a ruby/emerald rom?
Hey there! I am hacking FireRed. I've hit a snag on a script I'm trying to complete.
In this script, you're supposed to run into the rival and a group of other people, talk a bit, and then fight the rival. After you beat the rival, those people talk a bit more, and then over time everyone should walk away and disappear. At the end, flag 201 is set. This is the person id of all the npcs.
When you beat the rival, the script plays exactly how I'd like it to. However, when you lose to the rival, you don't get to try again. When you walk back to where you were, all of the people are gone, even though you shouldn't have finished the script and activated flag 0x201 because you lost.
Why is this happening, and what can I do to fix this? I am using PKSV-UI. Here is my script. I bolded where the trainer battles are.
Spoiler:
#dyn 0x740000
#org @start
checkflag 0x201
if true jump @nothing
jump @begin
#org @begin
lock
faceplayer
textcolor RED
msgbox @text
callstd MSG_NORMAL
release
textcolor BLUE
msgbox @text2
callstd MSG_NORMAL
release
applymovement 0xC @mafreak
applymovement 0xB @lookdown
applymovement 0xA @lookleft
applymovement 0xE @lookright
textcolor RED
msgbox @text3
callstd MSG_NORMAL
release
pause 0x35
applymovement 0xA @walkup
applymovement 0xE @walkup
textcolor BLUE
msgbox @text4
callstd MSG_NORMAL
release
applymovement 0xA @lookleft
applymovement 0xE @lookright
showpokepic 0xBF 0x0A 0x03
msgbox @text5
callstd MSG_NORMAL
release
cry 0xBF 0x2
hidepokepic
applymovement 0xA @lookup
applymovement 0xE @lookup
applymovement 0xC @lookdown
applymovement 0x11 @lookdown
msgbox @text6
callstd MSG_NORMAL
release
msgbox @text7
callstd MSG_NORMAL
release
msgbox @text8
callstd MSG_NORMAL
release
pause 0xA
disappear 0xE
applymovement 0x11 @lookright
msgbox @text9
callstd MSG_NORMAL
release
applymovement 0xC @lookleft
textcolor RED
msgbox @text10
callstd MSG_NORMAL
release
applymovement 0x11 @lookdown
textcolor BLUE
msgbox @text11
callstd MSG_NORMAL
release
applymovement 0x11 @notice
msgbox @text12
callstd MSG_NORMAL
release
applymovement 0x11 @lookright
applymovement PLAYER @tristenwalk
applymovement 0xA @lookleft
checkgender
compare LASTRESULT BOY
if == call @boy
compare LASTRESULT 0x1
if == call @girl
end
#org @boy
textcolor BLUE
msgbox @text13
callstd MSG_NORMAL
release
jump @next
#org @girl
textcolor BLUE
msgbox @text13girl
callstd MSG_NORMAL
release
jump @next
#org @next
applymovement 0x11 @lookdown
applymovement PLAYER @lookup
textcolor BLUE
msgbox @text14
callstd MSG_YESNO ' Yes/No message
compare LASTRESULT YES
if == jump @yes ' Equal To
jump @no
#org @no
msgbox @saidno
callstd MSG_YESNO ' Yes/No message
compare LASTRESULT YES
if == jump @yes ' Equal To
jump @no
#org @yes
textcolor BLUE
msgbox @text15
callstd MSG_NORMAL
release
compare 0x4031 0x2
if == call @pickedpoliwag
compare 0x4031 0x1
if == call @pickedMareep
compare 0x4031 0x0
if == call @pickedPhanpy
jump @next3
#org @pickedpoliwag
special 0x3B
playsound 0x109 0x109
trainerbattle 0x1 0x14c 0x0 @text16 @text17 @next3
return
#org @pickedmareep
special 0x3B
playsound 0x109 0x109
trainerbattle 0x1 0x14d 0x0 @text16 @text17 @next3
return
#org @pickedphanpy
special 0x3B
playsound 0x109 0x109
trainerbattle 0x1 0x14e 0x0 @text16 @text17 @next3
return
#org @next3
textcolor RED
msgbox @text18
callstd MSG_NORMAL
release
applymovement 0x11 @suprise
applymovement PLAYER @lookright
applymovement 0xA @lookup
textcolor BLUE
msgbox @text19
callstd MSG_NORMAL
release
textcolor RED
msgbox @text20
callstd MSG_NORMAL
release
checkgender
compare LASTRESULT BOY
if == call @boy2
compare LASTRESULT 0x1
if == call @girl2
end
#org @boy2
applymovement 0xC @lookdown
textcolor BLUE
msgbox @text21
callstd MSG_NORMAL
release
jump @next4
#org @girl2
applymovement 0xC @lookdown
textcolor BLUE
msgbox @text21g
callstd MSG_NORMAL
release
jump @next4
#org @next4
applymovement 0xC @lookleft
applymovement 0xA @lookleft
textcolor RED
msgbox @text22
callstd MSG_NORMAL
release
applymovement 0x11 @excite
textcolor BLUE
msgbox @text23
callstd MSG_NORMAL
release
applymovement 0x11 @lookdown
msgbox @text24
callstd MSG_NORMAL
release
applymovement 0xB @paup
applymovement 0x11 @lookright
applymovement 0xA @lookright
applymovement PLAYER @lookright
applymovement 0xC @lookright
msgbox @text25
callstd MSG_NORMAL
release
textcolor RED
msgbox @text26
callstd MSG_NORMAL
release
applymovement 0xB @lookdown
textcolor BLUE
msgbox @text27
callstd MSG_NORMAL
release
applymovement 0xC @gouplookdown
applymovement 0xB @walkleft
msgbox @text28
callstd MSG_NORMAL
release
msgbox @text29
callstd MSG_NORMAL
release
msgbox @text30
callstd MSG_NORMAL
release
applymovement 0xC @walkrightlookleft
applymovement 0xB @gouplookdown
applymovement 0x11 @walkrightlookup
applymovement PLAYER @lookup
applymovement 0xA @lookup
msgbox @text31
callstd MSG_NORMAL
release
applymovement 0xB @lookup
pause 0xF
applymovement 0xB @walkup
pause 0x8
disappear 0xB
pause 0x1F
applymovement 0xC @walkleftlookdown
textcolor RED
msgbox @text32
callstd MSG_NORMAL
release
applymovement 0xC @walkup
pause 0x8
disappear 0xC
pause 0x1F
applymovement 0xA @Beatwalksupmore
applymovement 0x11 @lookright
applymovement PLAYER @lookright
textcolor BLUE
msgbox @text33
callstd MSG_NORMAL
release
applymovement 0x11 @excitebike
msgbox @text34
callstd MSG_NORMAL
release
applymovement 0x11 @lookdown
applymovement 0xA @Beatwalksdown1
msgbox @text35
callstd MSG_NORMAL
release
applymovement 0xA @Beatwalksdown2
pause 0x1F
msgbox @text36
callstd MSG_NORMAL
release
applymovement 0xA @Beatleave
pause 0x1F
applymovement PLAYER @tristwalkrightandup
pause 0xA
applymovement 0x11 @lookright
msgbox @text37
callstd MSG_NORMAL
release
applymovement 0x11 @lookdown
msgbox @text38
callstd MSG_NORMAL
release
pause 0x2F
applymovement 0x11 @lookright
msgbox @text39
callstd MSG_NORMAL
release
applymovement 0xD @lookerdown
pause 0x5F
applymovement PLAYER @lookright
msgbox @text40
callstd MSG_NORMAL
release
applymovement 0xD @lookerleave
pause 0x3F
applymovement PLAYER @lookdown
textcolor GRAY
msgbox @text41
callstd MSG_YESNO ' Yes/No message
compare LASTRESULT YES
if == jump @yes2 ' Equal To
jump @no2
#org @no2
msgbox @text41no
callstd MSG_YESNO ' Yes/No message
compare LASTRESULT YES
if == jump @yes2 ' Equal To
jump @no3
#org @no2
msgbox @text41no2
callstd MSG_NORMAL
release
jump @yes2
#org @yes2
msgbox @text42
callstd MSG_YESNO
compare LASTRESULT YES
if == jump @yes2 ' Equal To
jump @next5
#org @next5
textcolor BLUE
msgbox @text43
callstd MSG_NORMAL
release
applymovement PLAYER @lookleft
textcolor GRAY
msgbox @text44
callstd MSG_NORMAL
release
applymovement 0x11 @lookdown
textcolor BLUE
msgbox @text45
callstd MSG_NORMAL
release
applymovement 0x11 @lookright
msgbox @text46
callstd MSG_NORMAL
release
applymovement 0x11 @victorleave
pause 0x1F
applymovement PLAYER @lookright
pause 0x3F
applymovement PLAYER @lookdown
textcolor GRAY
msgbox @text47
callstd MSG_NORMAL
release
setflag 0x201
setflag 0x223
setvar 0x401A 0x1
disappear 0xA
disappear 0x11
disappear 0xD
end
#org @nothing
end
Thank you for any help.
Odd. From a quick look at your script I can't see any problems, but what I would do is run some tests, see if the flag is getting set when you lose somehow, see if it gets set too when you win. I solved a similar problem with my hack just by trial and error, I pinpointed a specific part of my script where for some reason it was activating a flag.
i may have misunderstood his original post. see the quote below.
from what i understood, he was asking if there was a way for the script to continue even after you lost to a trainerbattle.
but if i understood it wrong, then NewDenverCity's suggestion is the way to go.
Herpderp, my fault. Try trainerbattle 0x9, that's what FR uses for the first rival battle, but I wouldn't bet on it working. But it couldn't hurt to try. If it doesn't work, then you'll have to access the trainerbattle routine and edit it yourself.Yes that's exactly my problem there. I'm gonna have the main character lose an impossible battle and immediately follow up with the script (without whiteouts or Pokécenters).
Herpderp, my fault. Try trainerbattle 0x9, that's what FR uses for the first rival battle, but I wouldn't bet on it working. But it couldn't hurt to try. If it doesn't work, then you'll have to access the trainerbattle routine and edit it yourself.
Hey, I'm currently learning how to use givepokemon scripts in conjunction with 0x5 message boxes. However, if I choose yes when asked whether or not I want to nickname my Pokémon, the game freezes. Similarly, if I choose "no", the text box fails to disappear from the screen and when I talk to the NPC, the game freezes.
Spoiler:
#dynamic 0x71ABE4
#org @start
checkflag 0x666
if 0x1 goto @greedy
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @givepokemon
msgbox @2 0x6
release
end
#org @2
= Oh okay then. Prick.
#org @greedy
= DON'T BE GREEDY YOU\nLITTLE ♥♥♥♥.
#org @nickname
= \c\h01\h07Would you like to give\nArceus a nickname?
#org @name
call 0x1474EB
setflag 0x828
setflag 0x829
#org @5
= Take good care of my chai-I mean\nArceus...\p...\p...
#org @3
= \c\h01\h02You just got a free Magi-\nI mean Arceus!
#org @6
= As a bonus take these random shoes I stole!
setflag 0x82F
#org @1
= \ch01\h04Hey kid, want some dru-\pI mean a Pokemon?
#org @givepokemon
givepokemon 0x81 0x99 0x44 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
setflag 0x666
msgbox @nickname 0x5
if 0x1 call @name
msgbox @5 0x6
msgbox @6 0x6
release
end
Throw in a return at the end of your @name string and a compare LASTRESULT 0x1 after your msgbox @nickname and let me know if that solves your problem :). You also have a floating setflag between some of the messages.