Thanks a lot I am new i n scripting that my this happen some time and its my third scriptAll your msgboxs are the wrong way around.
msgbox @pointer 0xWHATEVER
Silly me for not spotting that the first time.
I'm making a script for choosing a pokemon from a ball, but this script does not remove the ball sprite:
Spoiler:#dyn 0x740000
#org @start
checkflag FR_POKEMON
if true jump :end
lock
faceplayer
message @First
callstd MSG_YESNO
compare LASTRESULT YES
if == jump @pushedyes
jump @pushedno
#org @pushedyes
message @Yes
callstd MSG_NORMAL
addpokemon PICHU 5 NONE 0 0 0
setflag FR_POKEDEX
setflag FR_POKEMON
special FR_NATIONAL_DEX
sethealingplace 1
setflag FR_RUNNING_SHOES
fadescreen 1
removesprite 8
setflag 0x1200
fadescreen 0
release
end
#org @pushedno
message @No
callstd MSG_NORMAL
release
end
#org @First
= Do you want Pichu?
#org @Yes
= \v\h01 obtained Pichu.
:end
end
I am choosing the correct person event number in advance map and setting the person id to the flag name. Any ideas how to fix?
Whenever I compile this script
Spoiler:#dynamic 0x804100
#org @main
lock
applymovement 2 @lookdown
waitmovement 0
msgbox @1 MSG_YESNO
compare LASTRESULT 0x0
if 0x1 call @no
compare LASTRESULT 0x1
if 0x1 call @yes
msgbox @2 0x6
applymovement 2 @godown
waitmovement 0
hidesprite 2
setflag 0x360
setvar 0x403B 0x1
release
end
and then decompile it, it comes out as this:
Spoiler:#org 0x80469F
lock
applymovement 0x2 0x8804861
waitmovement 0x0
msgbox 0x88046FC MSG_YESNO '"[blue_fr][rival]: Hey, [player]!\n..."
compare LASTRESULT 0x0
#raw 0x7
#raw pointer 0x8046E801
gotostd 0x21
It cuts off the rest of the script. Is there a reason it does this? Is it something I'm doing or is it a bug? It's happened to me before but now I can't fix it. Any help would be appreciated
I tried a different flag with no luck, and I tried different event numbers as well. This may seem a bit nooby, but what's an OW and what do you mean by a duplicate OW? If you mean whether or not I have another event on the same tile, the answer is no. Also, I have been compiling this script many times while testing and the problem persisted in all attempts.
As for the decimal shortcut, I've been grabbing script from a few different sources since I've just started, so that's why there's some inconsistencies with which I use xD
EDIT: After reading how the game normally treats the starter pokeballs, using disappear LASTTALKED worked instead of removesprite.
hey guys in editing level script we put script 2nd offset but from where the 2nd offset of script come?
IDK what it could be, I took your script and edited it to be XSE and then I inserted it and this happened:
Here's the modified XSE script:
Spoiler:#dynamic 0x107F1D1
#org @start
checkflag 0x1200
if 0x1 goto @end
lock
faceplayer
message @First 0x5
compare LASTRESULT 1
if 0x1 goto @pushedyes
message @No 0x6
release
end
#org @pushedyes
message @Yes 0x6
givepokemon 172 5 0 0 0 0
setflag 0x861
setflag 0x860
special 0x1F3
sethealingplace 1
setflag 0x8C0
fadescreen 1
setflag 0x1200
hidesprite 15
applymovement 15 @hide
waitmovement 0x0
fadescreen 0
release
end
#org @hide
#raw 0x54
#raw 0xFE
#org @First
= Do you want Pichu?
#org @Yes
= [PLAYER] obtained Pichu.
#org @No
= [PLAYER] didn't obtain Pichu.
#org @end
release
end
Take out the applymovement and our scripts are exactly the same in terms of commands ... I always include applymovement to hide the sprite that way also just to make sure the bugger is really hidden xD Can you take a picture of the OW (which means Overworld ... shortened for Overworld Sprite aka those person events are sprites in the overworld of the game). Yeah just take a picture of the OW being selected in Advancemap so I can see what you have inputted into the OW. If you wouldn't mind, you could also just PM me an IPS patch of your ROM and I'll fix it and tell you what the problem was.
all your base are belong to us?
I don't understand what you're asking, your English is fragmented on top of you not providing that many details as to what you're looking for. Since your Engrish is bad, try taking screenshots of the problem and uploading to https://snag.gy and share the image here in LINK FORM or through a spoiler. Don't paste the image in tags without a spoiler.[/QUOTE]
I just want to ask that to add level script in advance map we need to add the 2nd offset .and I don't know which is second offset of script and what I put there
I just want to ask that to add level script in advance map we need to add the 2nd offset .and I don't know which is second offset of script and what I put there
#dynamic 0x6C4340
#org @start
checkflag 0x8d5
if 0x1 goto @nevermind
setflag 0x8e0
setflag 0x8d6
setflag 0x8d5
release
end
#org @nevermind
release
end
So, I've been hacking Emerald recently just to add stuff into the game (Unobtainable legendaries, rebattle-able trainers, etc.)
I've added The Old Sea Map and Mystic Ticket but neither of them work! Upon further research, I found out you need to set flags. So of course, I made a script to set these flags:
Unfortunately, they still don't work. I only have the options to go to the other ferry city and the Battle Frontier. What else do I need to do to make this possible?Code:#dynamic 0x6C4340 #org @start checkflag 0x8d5 if 0x1 goto @nevermind setflag 0x8e0 setflag 0x8d6 setflag 0x8d5 release end #org @nevermind release end
you have to give the item as well as set the flag :)
So, I've been hacking Emerald recently just to add stuff into the game (Unobtainable legendaries, rebattle-able trainers, etc.)
I've added The Old Sea Map and Mystic Ticket but neither of them work! Upon further research, I found out you need to set flags. So of course, I made a script to set these flags:
Unfortunately, they still don't work. I only have the options to go to the other ferry city and the Battle Frontier. What else do I need to do to make this possible?Code:#dynamic 0x6C4340 #org @start checkflag 0x8d5 if 0x1 goto @nevermind setflag 0x8e0 setflag 0x8d6 setflag 0x8d5 release end #org @nevermind release end
#dynamic 0x800000
#org @NationalDex
msgbox @talk1 0x6
applymovement 1 @walk1
waitmovement 10
applymovement 0xFF @surprise
waitmovement 0xFF
msgbox @talk2 0x6
special 0x16F
fanfare 0x13E
msgbox @talk3 0x6
waitfanfare
msgbox @talk4 0x6
applymovement 10 @walk2
waitmovement 10
hidesprite 10
setvar 0x2000 0x1
setflag 0x1206
release
end
#org @talk1
= Wait!
#org @talk2
= I forgot to upgrade your\nPokedex...
#org @talk3
= \v\h01's Pokedex was upgraded to the\nNational Pokedex!
#org @talk4
= There ya go!\nGood luck on your journey!
#org @walk1
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE
#org @surprise
#raw 0x62
#raw 0x0
#raw 0xFE
#org @walk2
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE
I'm trying to make it so that Oak, from his lab, goes up to you on the final tile of Pallet Town, and upgrade your Pokedex to the National Pokedex. I know I'm missing at least one or two things, but I haven't found an appropriate tutorial (though PokemonXSE101 helped for the majority of it).
Code:#dynamic 0x800000 #org @NationalDex msgbox @talk1 0x6 applymovement 1 @walk1 waitmovement 10 applymovement 0xFF @surprise waitmovement 0xFF msgbox @talk2 0x6 special 0x16F fanfare 0x13E msgbox @talk3 0x6 waitfanfare msgbox @talk4 0x6 applymovement 10 @walk2 waitmovement 10 hidesprite 10 setvar 0x2000 0x1 setflag 0x1206 release end #org @talk1 = Wait! #org @talk2 = I forgot to upgrade your\nPokedex... #org @talk3 = \v\h01's Pokedex was upgraded to the\nNational Pokedex! #org @talk4 = There ya go!\nGood luck on your journey! #org @walk1 #raw 0x12 #raw 0x12 #raw 0x12 #raw 0x12 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0xFE #org @surprise #raw 0x62 #raw 0x0 #raw 0xFE #org @walk2 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0xFE
applymovement 0x1 <---- Don't forget 0x
Change all waitmovements to waitmovement 0x0
Use 0x2 for your msgbox instead of 0x6. Read XSE guide as to why.
#dynamic 0x800000
#org @NationalDex
msgbox @talk1 0x2
applymovement 0x1 @walk1
waitmovement 0x0
applymovement 0x1 @surprise
waitmovement 0x0
msgbox @talk2 0x2
special 0x16F
fanfare 0x13E
msgbox @talk3 0x2
waitfanfare
applymovement 0x1 @walk2
waitmovement 0x0
hidesprite 10
setvar 0x2000 0x1
setflag 0x1206
release
end
#org @talk1
= Wait!
#org @talk2
= Allow me to quickly upgrade your\nPokedex...
#org @talk3
= Good luck on your journey!
#org @walk1
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE
#org @surprise
#raw 0x62
#raw 0x0
#raw 0xFE
#org @walk2
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE
Alright. It should be fixed, but still waiting on the "activated if I have the Pokedex" command for FRLG.
Code:#dynamic 0x800000 #org @NationalDex msgbox @talk1 0x2 applymovement 0x1 @walk1 waitmovement 0x0 applymovement 0x1 @surprise waitmovement 0x0 msgbox @talk2 0x2 special 0x16F fanfare 0x13E msgbox @talk3 0x2 waitfanfare applymovement 0x1 @walk2 waitmovement 0x0 hidesprite 10 setvar 0x2000 0x1 setflag 0x1206 release end #org @talk1 = Wait! #org @talk2 = Allow me to quickly upgrade your\nPokedex... #org @talk3 = Good luck on your journey! #org @walk1 #raw 0x12 #raw 0x12 #raw 0x12 #raw 0x12 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0xFE #org @surprise #raw 0x62 #raw 0x0 #raw 0xFE #org @walk2 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x10 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0xFE
checkflag 0x829
if 0x1 goto @getnational
special 0x16f
#org @start
lock
checkflag 0x829 <----- Check to see if you have Pokedex.
if 0x1 goto @getnational <----- If you have a Pokedex, it will start your script.
release <------ If you don't have a pokedex, it will
end <------ just ignore your script and end.
#org @getnational
special 0x16f <-----Unlock national dex
release
end
This should work.Ok, so you're saying you want this script to run ONLY if you have the Pokedex?
If that's the case, the flag for the Pokedex (I'm assuming you're hacking Fire Red) is 0x829. So you want to check for that flag
Code:checkflag 0x829
Next, tell it what to do when that flag is set or not set.
This will tell it to go run your script if you DO have a Pokedex already:
Code:if 0x1 goto @getnational
Then, it's as simple as special 0x16f
This 'special' code will activate National dex:
Code:special 0x16f
Put it all together:
Code:#org @start lock checkflag 0x829 <----- Check to see if you have Pokedex. if 0x1 goto @getnational <----- If you have a Pokedex, it will start your script. release <------ If you don't have a pokedex, it will end <------ just ignore your script and end. #org @getnational special 0x16f <-----Unlock national dex release end
See if you can combine it with your code.
#dynamic 0x800000
#org @check
checkflag 0x829
if 0x1 goto @NationalDex
release
end
#org @NationalDex
lock
msgbox @talk1 0x2
applymovement 0x1 @walk1
waitmovement 0x0
applymovement 0x1 @surprise
waitmovement 0x0
msgbox @talk2 0x2
special 0x16F
fanfare 0x13E
msgbox @talk3 0x2
waitfanfare
applymovement 0x1 @walk2
waitmovement 0x0
hidesprite 10
setvar 0x2000 0x1
setflag 0x1206
release
end
#org @talk1
= Wait!
#org @talk2
= Allow me to quickly upgrade your\nPokedex...
#org @talk3
= Good luck on your journey!
#org @walk1
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE
#org @surprise
#raw 0x62
#raw 0x0
#raw 0xFE
#org @walk2
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE
The map headers generated by Advance Map create stub scripts that call your main script via the "second pointer." I don't particularly see the reason why you find this information relevant, but you asked so I answered.hey guys in editing level script we put script 2nd offset but from where the 2nd offset of script come?