• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best places on the 'net to talk Pokémon and more! Community members will not see the bottom screen advertisements.
  • Want to share your adventures playing Pokémon?
    Check out our new Travel Journals forum for sharing playthroughs of ROM Hacks, Fan Games, and other Pokémon content!
  • IMPORTANT: Following a takedown request, the following hacks have been delisted from PokéCommunity:

    • Pokémon Glazed
    • Pokémon: Giratina Strikes Back
    • Pokémon Flora Sky
    • Pokémon Stranded
    The downloads and discussion threads for these hacks will no longer be accessible, and staff will be unable to return questions regarding accessing this content.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.

Quickster

Dream or Drop?
351
Posts
16
Years
  • Seen Apr 4, 2016
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:


I am using XSE.

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:
 
29
Posts
16
Years
  • Seen Oct 1, 2010
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.

Oh that got it working. Thank you so much!
 

PlatniumPiano

You are now breathing manually
479
Posts
15
Years
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.
 

Xatoku

Game Developer
451
Posts
15
Years
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?

Spoiler:
 

StrickeN

The mighty force will Strike
384
Posts
16
Years
  • Age 31
  • Seen Oct 7, 2010
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 :/

Spoiler:

Please help. Thank you
 

PI Hudson

Can be random for hugs> PIE!!!
33
Posts
14
Years
Oh, I was wondering because the Battle Pyramid can check for hold items, since it doesn't allow them.
Did you check the scripts there? I'm pretty sure some specials are used.
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.
 

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
Oh that got it working. Thank you so much!

You're welcome.


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]

Yes, that's the problem. You can't use a flag for different things. Use another flag.


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?

Instead of asking again (which isn't allowed at all), why don't you post your current settings?


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 :/

Spoiler:

Please help. Thank you

There are tutorials about how to make movements, so just check them out.


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.
 

PlatniumPiano

You are now breathing manually
479
Posts
15
Years
Yes, that's the problem. You can't use a flag for different things. Use another flag.

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?
 

Xatoku

Game Developer
451
Posts
15
Years
Instead of asking again (which isn't allowed at all), why don't you post your current settings?

Well 0x5 has Unkown 03, Movement 11 and Person ID 002c

Spoiler:
 
248
Posts
15
Years
  • Seen Nov 22, 2014
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.

Well 0x5 has Unkown 03, Movement 11 and Person ID 002c

Spoiler:

Could that be the sprite switch bug?

Probably not :\
 
Last edited:
248
Posts
15
Years
  • Seen Nov 22, 2014
In this glitch, do 2 sprites on screen switch colour? Because that seems to be what's happening.

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?
 

BlitŻ1

guahh my dog is so cute
472
Posts
15
Years
Hack of fire red
I'm using XSE
And here's my scipt. Btw its a level sciprt
Spoiler:


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?
 

Quickster

Dream or Drop?
351
Posts
16
Years
  • Seen Apr 4, 2016
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.

People kind of act the same way, but with flags.




Your welcome.


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.
Spoiler:

Second is a level script.
Spoiler:

It also continues to a third,which is another level script.
Spoiler:
 

Kalsard

Looking for time travellers.
95
Posts
14
Years
Spoiler:

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.
 

PI Hudson

Can be random for hugs> PIE!!!
33
Posts
14
Years
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:
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.



Hack of fire red
I'm using XSE
And here's my scipt. Btw its a level sciprt
Spoiler:


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?
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.
 
248
Posts
15
Years
  • Seen Nov 22, 2014
Hack of fire red
I'm using XSE
And here's my scipt. Btw its a level sciprt
Spoiler:


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. :\
 

Quickster

Dream or Drop?
351
Posts
16
Years
  • Seen Apr 4, 2016
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:
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.


Thank you very much! I {have pretty much understood this now.I had no value in a map,so nothing happened.
 
Status
Not open for further replies.
Back
Top