Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
i made a givepokemon script and it works, but after i get it and talk to him again, he gives it to me again, and again and i can't get it to work! i want him to say something else after i get it and talk to him again.
Script:
Spoiler:
#dynamic 0x71AA20
#org @start
lock
faceplayer
checkflag 0x829
if 0x0 goto @notyet
if 0x1 goto @give
release
end
#org @notyet
msgbox @sorry 0x6
end
#org @give
givepokemon 0x7E 0x7 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
setflag 0x829
msgbox @yay 0x6
release
end
#org @sorry
= Hello!\pMy name is Teh_PingasYTP!\pYou're in my hack!\pI'll tell you what.\pIf you come back to me\nafter you get the POK\h1BDEX,\pI'll give you something special!
#org @yay
= [player] obtained MAGMAR!\nCongradulations!\pIt's a very rare POK\h1BMON!\nTrain it well!
The script below should work.You set the flag for the pokedex after you get the pokemon.Thats the flag it checks for inorder to give the pokemon.Just a small mistake.
Spoiler:
#dynamic 0x
#org @start
checkflag 0x829
if 0x1 goto @give
msgbox @sorry 0x2
release
end
#org @sorry
= Hello!\pMy name is Teh_PingasYTP!\pYou're in my hack!\pI'll tell you what.\pIf you come back to me\nafter you get the POK\h1BDEX,\pI'll give you something special!
#org @yay
= [player] obtained MAGMAR!\nCongradulations!\pIt's a very rare POK\h1BMON!\nTrain it well!
That's not the way checkitem works.
You do something like this:
Code:
checkitem 0x172 0x1
compare LASTRESULT 0x1
if 0x0 goto @donthave
About the "sprite returning"... that's normal. Hidesprite will hide the sprite only temporarily.
Before the hidesprite command you need to use a setflag, which value is the Person ID you set.
I'm redesining the script for my first Pokemon in my hack... The problem is when the flag has been set. If the flag is not set, the script works fine, but when the flag is set, it automatically goes to the script in which it was not set.
Is this because the flag was set on a different map? Or something else (yes I set person id to 950)?
Ruby Version AXVE Script:
Code:
#dynamic 0x800000
#org @start
checkflag 0x950
if 0x1 goto @done
lock
faceplayer
msgbox @whatsup 0x6
release
end
#org @ponyta
msgbox @give 0x6
givepokemon 0x4D 0xF 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @obtain 0x6
waitfanfare
msgbox @would 0x5
compare LASTRESULT 0x1
if 0x1 call @name
msgbox @call 0x6
setflag 0x800
release
end
#org @done
lock
faceplayer
msgbox @hey 0x5
compare LASTRESULT 0x1
if 0x1 goto @ponyta
msgbox @sorry 0x6
release
end
#org @name
fadescreen 0x1
special 0x9E
waitstate
return
#org @hey
= Hey, [player], what brings you\nhere on my day off?\p... ... ...\n... .... ...\l... ... ...\l... ... ...\pYou can't be serious...\n...Mew?\pWell, if this is true, then\nI guess you will need a POKéMON.
#org @give
= That's a wise choice.\pIt's not often you have\nan encounter with Mew.
#org @obtain
= You got a Ponyta!
#org @would
= Would you like to give a\nnickname to this POKéMON?
#org @call
= Well... we got you a\nPOKéMON.\lNow what?\p... ... ...\n... ... ...\lLord Aspen, eh?\pListen, Aspen is a seasoned POKéMON\nveteran, so with that guy there,\lI doubt you could win.\pHowever.\pIf you must, there is a cavern\nwhere you can train that\lhorse, located in the caves, one level above Aspens.
#org @whatsup
= Hey, [player], what's up?
#org @sorry
= Oh...\nWell, I'm sorry to hear that.
I've asked this before but nobody's answered so here it is again,
In this script everything works 100% except that after the trainerbattle, sprite 0x5 on the screen changes colour. Could somebody tell me the proper settings I should give the sprite?
#org @text2
= [red_fr][Player]:[black_fr] That takes care of him.\nNow for Totodile.
#org @text3
= [red_fr][Player][black_fr] stole the [navyblue_fr]Totodile.[black_fr]
#org @text4
= ???: Hey, you can't take that!
#org @text5
= [orange_fr]Gold:[black_fr] My names Gold, and you're\nthe thief who stole my backpack!\p[red_fr][Player]:[black_fr] What backpack?\p[orange_fr]Gold:[black_fr] Don't act like you don't\nknow!\p[orange_fr]Gold:[black_fr] You'll pay for what you did!
#org @before
= [orange_fr]Gold:[black_fr] Here goes!
#org @no
= Argh, he's strong!
#org @text6
= [orange_fr]Gold:[black_fr] You won't get away with this!
I am having trouble with the script for applying a movement.
Firered
I don't know the script I'm new to applymovement and I REALLy don't know what to put here, I have googled a LOT so i just took a screen cap and hope it works.
I basically need to make oak stop me from going wilderness (indicated by black dots) and make me go to his house. The reason this is difficult is... I moved his house :/
The special used is 0xEA(#234). It is used quite repetitively in this script, but it is the only one in the place checked.
I know the special command calls a 'special event'.
Is there a way to view this 'special event' and see how it works, edit it and such, or make a ASM code based off of it?
I'm still trying to learn ASM so this might be helpful to me to view this kind of stuff.
I'm redesining the script for my first Pokemon in my hack... The problem is when the flag has been set. If the flag is not set, the script works fine, but when the flag is set, it automatically goes to the script in which it was not set.
Is this because the flag was set on a different map? Or something else (yes I set person id to 950)?
[/CODE]
I've asked this before but nobody's answered so here it is again,
In this script everything works 100% except that after the trainerbattle, sprite 0x5 on the screen changes colour. Could somebody tell me the proper settings I should give the sprite?
I am having trouble with the script for applying a movement.
Firered
I don't know the script I'm new to applymovement and I REALLy don't know what to put here, I have googled a LOT so i just took a screen cap and hope it works.
I basically need to make oak stop me from going wilderness (indicated by black dots) and make me go to his house. The reason this is difficult is... I moved his house :/
The special used is 0xEA(#234). It is used quite repetitively in this script, but it is the only one in the place checked.
I know the special command calls a 'special event'.
Is there a way to view this 'special event' and see how it works, edit it and such, or make a ASM code based off of it?
I'm still trying to learn ASM so this might be helpful to me to view this kind of stuff.
I've seen many specials there, actually: 0x28 0x29 0x60 0xEA 0xF5 0xF8. So you should make sure what is used for what. Besides, I think you need something to check if a Pokémon is holding a particular item, right? In that case those special(s) probably won't help since they're only used to check if a Pokémon is not holding any items, as far as I understood.
But what if I want that event to happen only if other said event has happened. I don't want him to give me the pokemon whenever, just after a different event. Is there a way to do this?
#org @text2
= [red_fr][Player]:[black_fr] That takes care of him.\nNow for Totodile.
#org @text3
= [red_fr][Player][black_fr] stole the [navyblue_fr]Totodile.[black_fr]
#org @text4
= ???: Hey, you can't take that!
#org @text5
= [orange_fr]Gold:[black_fr] My names Gold, and you're\nthe thief who stole my backpack!\p[red_fr][Player]:[black_fr] What backpack?\p[orange_fr]Gold:[black_fr] Don't act like you don't\nknow!\p[orange_fr]Gold:[black_fr] You'll pay for what you did!
#org @before
= [orange_fr]Gold:[black_fr] Here goes!
#org @no
= Argh, he's strong!
#org @text6
= [orange_fr]Gold:[black_fr] You won't get away with this!
But what if I want that event to happen only if other said event has happened. I don't want him to give me the pokemon whenever, just after a different event. Is there a way to do this?
You're looking at the wrong spot. The givepokemon part would occur only when flag 950 (which I assume is the flag in another map) is set, so no problem there.
Hackmew meant that to use another flag for the @done part. Without the flag, the person will always ask you if you want a ponyta.
Fixes in bold and red O_o
Code:
#dynamic 0x800000
#org @start
checkflag 0x950
if 0x1 goto @done
lock
faceplayer
msgbox @whatsup 0x6
release
end
#org @ponyta
[COLOR="Red"][B]setflag 0xaaa[/B][/COLOR]
msgbox @give 0x6
givepokemon 0x4D 0xF 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @obtain 0x6
waitfanfare
msgbox @would 0x5
compare LASTRESULT 0x1
if 0x1 call @name
msgbox @call 0x6
setflag 0x800
release
end
#org @done
[COLOR="red"][B]checkflag 0xaaa
if 1 goto @offset[/B][/COLOR]
lock
faceplayer
msgbox @hey 0x5
compare LASTRESULT 0x1
if 0x1 goto @ponyta
msgbox @sorry 0x6
release
end
#org @name
fadescreen 0x1
special 0x9E
waitstate
return
[COLOR="red"][B]#org @offset
lock
faceplayer
message @message 6
release
end
#org @message
= You've got a Ponyta already.[/B][/COLOR]
#org @hey
= Hey, [player], what brings you\nhere on my day off?\p... ... ...\n... .... ...\l... ... ...\l... ... ...\pYou can't be serious...\n...Mew?\pWell, if this is true, then\nI guess you will need a POKéMON.
#org @give
= That's a wise choice.\pIt's not often you have\nan encounter with Mew.
#org @obtain
= You got a Ponyta!
#org @would
= Would you like to give a\nnickname to this POKéMON?
#org @call
= Well... we got you a\nPOKéMON.\lNow what?\p... ... ...\n... ... ...\lLord Aspen, eh?\pListen, Aspen is a seasoned POKéMON\nveteran, so with that guy there,\lI doubt you could win.\pHowever.\pIf you must, there is a cavern\nwhere you can train that\lhorse, located in the caves, one level above Aspens.
#org @whatsup
= Hey, [player], what's up?
#org @sorry
= Oh...\nWell, I'm sorry to hear that.
Just replace aaa with an unused flag. (or flag 800.. well, maybe 800 is better -_-)
Of course, I could have misunderstood you. If you meant that whether or not the flag is set, the person always says @whatsup, then nevermind the above fixes and try using another flag.
#org @text2
= [red_fr][Player]:[black_fr] That takes care of him.\nNow for Totodile.
#org @text3
= [red_fr][Player][black_fr] stole the [navyblue_fr]Totodile.[black_fr]
#org @text4
= ???: Hey, you can't take that!
#org @text5
= [orange_fr]Gold:[black_fr] My names Gold, and you're\nthe thief who stole my backpack!\p[red_fr][Player]:[black_fr] What backpack?\p[orange_fr]Gold:[black_fr] Don't act like you don't\nknow!\p[orange_fr]Gold:[black_fr] You'll pay for what you did!
#org @before
= [orange_fr]Gold:[black_fr] Here goes!
#org @no
= Argh, he's strong!
#org @text6
= [orange_fr]Gold:[black_fr] You won't get away with this!
Well... sprite switch bug is... after a battle, your player's sprite changes (and colors to boot) and you'll have a limited movement. :\ Maybe yours is a similar glitch.. Try deleting the two persons in amap, then creating them again?
#org @1
= [red_fr]Grandma[black_fr]: Good morning sweetie. Did\nyou sleep good? You must've been\ltired from the trip from Orre.\p\v\h01: Yeah grandma. The guest\lroom is really comfortable.\p[red_fr]Grandma[black_fr]: Good, now, before you can\lgo off and play with your cousin,-\p\v\h01: Wait, when do I get my\lpokemon grandma, my parents promised\lme I would get one here.\p[red_fr]Grandma[black_fr]: Okay, since you really\lwant one, go to Dr. Cean's lab up\lnorth of here and tell him that I\lsent you. It should be pretty easy\lto find. But after you're\ldone come back down here to my\lhouse. I have a favor of you.\p\v\h01:Okay grandma, see you\llater!
#org @end
release
end
Wheni come into the room, everything works and such, but when the script is done, there's a textbox, showing random mumbo jumbo and symbols and such.
So any idea on how to stop said problem from happening?
QUESTION: Is there a way to check if a pokemon is holding an item?
It works like this
-When you enter a map, it looks for level scripts
-In Oaks Lab, the script your looking for is #2
-If it is a #2 or 4 script, it looks at the Variable Flag (for this, it is 4055)
-It checks that this Variable for its Value (set previously, default is 0000) and if it isn't equal to the number given in the Map script, it doesn't activate. But if it is equal, it does activate.
(if MAP-VALUE>VAR-VALUE=not activate, if MAP-VALUE<VAR-VALUE=not activate, if MAP-VALUE=VAR-VALUE=activate)
In the script tile that we step on in Pallet Town to activate the script, we see this.
This means the next time we enter the Oaks Lab, the script will activate.
But, why doesn't it activate again?
In the Oaks Lab Level script, we observe this
This make it so you don't see this script again until the Var Value is equal again.
Ive been trying to make a script using this but its just not working. I can enter the area and it does the script,not supposed to do that.If i talk to the person and then warp to it, it doesnt work at all.
First is a person event.
#org @before
= Is this your PIKACHU?\p......\pI see.\nMy POOCHYENA ran off when I ran\linto a bug POKeMON.\pBy the way, my name is SAM. Your\nPIKACHU looks like it wants to\lbattle, how bout it?\p...\pGreat, lets go!
#org @2
= That was a tough battle!\pI only lost because my POOCHYENA\nwent easy on you,heh heh...\pSince it seems to like you so\nmuch, how bout taking him for me?
#org @1
= [red_fr]Grandma[black_fr]: Good morning sweetie. Did\nyou sleep good? You must've been\ltired from the trip from Orre.\p\v\h01: Yeah grandma. The guest\lroom is really comfortable.\p[red_fr]Grandma[black_fr]: Good, now, before you can\lgo off and play with your cousin,-\p\v\h01: Wait, when do I get my\lpokemon grandma, my parents promised\lme I would get one here.\p[red_fr]Grandma[black_fr]: Okay, since you really\lwant one, go to Dr. Cean's lab up\lnorth of here and tell him that I\lsent you. It should be pretty easy\lto find. But after you're\ldone come back down here to my\lhouse. I have a favor of you.\p\v\h01:Okay grandma, see you\llater!
#org @end
release
end
Wheni come into the room, everything works and such, but when the script is done, there's a textbox, showing random mumbo jumbo and symbols and such.
So any idea on how to stop said problem from happening?
Well, maybe its because your not refactoring the script, after you do some edits? Change decompile options to strict and refactorised, then put that in.
Ive been trying to make a script using this but its just not working. I can enter the area and it does the script,not supposed to do that.If i talk to the person and then warp to it, it doesnt work at all.
So the changes in red are the things I assume.
The things I would change are in BOLD
I also assume that the level scripts are #02
Spoiler:
First is a person event.
Spoiler:
#org @start
applymovement 0x8 @m1
msgbox @1 0x6
cry 0x11E 0x0
showsprite 0x9
applymovement 0x9 @m1
waitmovement 0x0
applymovement 0xFF @m2
waitmovement 0x0 setvar 0x7000 0x1--\/
/\--warp 0xF 0x0 0x1 0x0 0x0 '---warp basically ends a script, so don't place anything needed after it
release
end
Second is a level script.
Spoiler:
'--- ADV map settings --- Var Flag-7000;Var Value-00000001 '---this is probably the reason the script activates anyway, and also didn't activate when you used the previous script
#org @start
lockall setvar 0x7001 0x1 '---you don't really need this because you can still use var 7000,
'---I try not to waste variables. even if it is just one.
setvar 0x7000 0x2
applymovement 0x4 @m1
applymovement 0x3 @m1
waitmovement 0x0
applymovement 0xFF @m2
waitmovement 0x0
warp 0x3 0x15 0x0 0x0 0x0 releaseall '--- if you lockall you release all, even if you warped
end
It also continues to a third,which is another level script.
Spoiler:
'--- ADV map settings --- Var Flag-70017000;Var Value-00010002 '---changes explained before
#org @start
...
I am slightly new at this as you can see from my join date, but I think I understand the concept enough. Test it out and give the results, or maybe someone else will tell you a better solution.
#org @1
= [red_fr]Grandma[black_fr]: Good morning sweetie. Did\nyou sleep good? You must've been\ltired from the trip from Orre.\p\v\h01: Yeah grandma. The guest\lroom is really comfortable.\p[red_fr]Grandma[black_fr]: Good, now, before you can\lgo off and play with your cousin,-\p\v\h01: Wait, when do I get my\lpokemon grandma, my parents promised\lme I would get one here.\p[red_fr]Grandma[black_fr]: Okay, since you really\lwant one, go to Dr. Cean's lab up\lnorth of here and tell him that I\lsent you. It should be pretty easy\lto find. But after you're\ldone come back down here to my\lhouse. I have a favor of you.\p\v\h01:Okay grandma, see you\llater!
#org @end
release
end
Wheni come into the room, everything works and such, but when the script is done, there's a textbox, showing random mumbo jumbo and symbols and such.
So any idea on how to stop said problem from happening?
#org @1
= [red_fr]Grandma[black_fr]: Good morning sweetie. Did\nyou sleep good? You must've been\ltired from the trip from Orre.\p\v\h01: Yeah grandma. The guest\lroom is really comfortable.\p[red_fr]Grandma[black_fr]: Good, now, before you can\lgo off and play with your cousin,-\p\v\h01: Wait, when do I get my\lpokemon grandma, my parents promised\lme I would get one here.\p[red_fr]Grandma[black_fr]: Okay, since you really\lwant one, go to Dr. Cean's lab up\lnorth of here and tell him that I\lsent you. It should be pretty easy\lto find. But after you're\ldone come back down here to my\lhouse. I have a favor of you.\p\v\h01:Okay grandma, see you\llater!
#org @end
release
end
Wheni come into the room, everything works and such, but when the script is done, there's a textbox, showing random mumbo jumbo and symbols and such.
So any idea on how to stop said problem from happening?
Well, if the above suggestions don't work, maybe this would help? Dunno... :\
Um, do you have a hex editor?
If so, open it and load the rom. In amap, go to the map with the level script, and then non professional header view.. Select the level script, then note the offset under "Script offset:" and go to that offset in the hex editor. There should be something like "02 70 01 00 XX XX XX 08" where XX is a pointer to the level script itself (the offset of the level script, reversed). Post the next 2 bytes after 08 here.
If not, open that offset (same, non-prof header view, under "Script offset") in xse and post what the decompiled script is. :\
So the changes in red are the things I assume.
The things I would change are in BOLD
I also assume that the level scripts are #02
Spoiler:
First is a person event.
Spoiler:
#org @start
applymovement 0x8 @m1
msgbox @1 0x6
cry 0x11E 0x0
showsprite 0x9
applymovement 0x9 @m1
waitmovement 0x0
applymovement 0xFF @m2
waitmovement 0x0 setvar 0x7000 0x1--\/
/\--warp 0xF 0x0 0x1 0x0 0x0 '---warp basically ends a script, so don't place anything needed after it
release
end
Second is a level script.
Spoiler:
'--- ADV map settings --- Var Flag-7000;Var Value-00000001 '---this is probably the reason the script activates anyway, and also didn't activate when you used the previous script
#org @start
lockall setvar 0x7001 0x1 '---you don't really need this because you can still use var 7000,
'---I try not to waste variables. even if it is just one.
setvar 0x7000 0x2
applymovement 0x4 @m1
applymovement 0x3 @m1
waitmovement 0x0
applymovement 0xFF @m2
waitmovement 0x0
warp 0x3 0x15 0x0 0x0 0x0 releaseall '--- if you lockall you release all, even if you warped
end
It also continues to a third,which is another level script.
Spoiler:
'--- ADV map settings --- Var Flag-70017000;Var Value-00010002 '---changes explained before
#org @start
...
I am slightly new at this as you can see from my join date, but I think I understand the concept enough. Test it out and give the results, or maybe someone else will tell you a better solution.
It could be that you chose the wrong option in a-map, try #2, or #4. or like Kalsard said, the compile process might have been done wrong.