• 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 fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.
119
Posts
14
Years
Thanks for your reply! :embarrass I am really sorry for my stupidity, but the problem was (again!) the hex/dec number. I really can't believe I made the same mistake again :nervous:
hehe, so I entered 11 as a hex number, since I thought until 15 hex and dec were the same (I didn't think, I know). What I should have entered (and have entered by now) is 'B' (hex) instead of '11' (dec).
So there was actually nothing wrong with my script (which relieves me:cheeky:) but only with my common sense (hmm)

Anyway, thanks again!

PS: LASTTALKED also worked!
 

Pokepal17

More cowbell~
1,519
Posts
15
Years
Thanks for your reply! :embarrass I am really sorry for my stupidity, but the problem was (again!) the hex/dec number. I really can't believe I made the same mistake again :nervous:
hehe, so I entered 11 as a hex number, since I thought until 15 hex and dec were the same (I didn't think, I know). What I should have entered (and have entered by now) is 'B' (hex) instead of '11' (dec).
So there was actually nothing wrong with my script (which relieves me:cheeky:) but only with my common sense (hmm)

Anyway, thanks again!

PS: LASTTALKED also worked!

I thought you might have used the wrong hex number. And LASTTALKED will work because if our interacting with a peron and that peron is moving, LASTTALKED can replace their event number because whenever you talk to a person event, LASTTALKED get's assigned the event number as a value.
 

Shukumei

Teh Haxxorz
27
Posts
14
Years
I'm new to scripting and I'm hacking FR. I'm using XSE and advancemap. I searched this thread but didn't find anything that helped. My issue is for variables and flags. I did a little debugging on my own and it seems that the game is assigning new values to variables I use outside of my own scripts. I need a method to figure out what memory address I can safely store variables and flags in without fear of them being overwritten. Any help? Also, on a side note I was wondering if any experianced hackers would be willing to twitter back and forth with me so I don't have to go to the library every time I have a question. Thanks in advance.
 
860
Posts
17
Years
I got a question i'm working on a hack but it needs 2 different hiro ow's the one with a normal palette and one with a darker palette, and I need them to change while playing.

So my question is: is it possible to make a script that changes the OW while entering a map?
 

Pokepal17

More cowbell~
1,519
Posts
15
Years
I got a question i'm working on a hack but it needs 2 different hiro ow's the one with a normal palette and one with a darker palette, and I need them to change while playing.

So my question is: is it possible to make a script that changes the OW while entering a map?

Writebytetooffset would make change it as long as you know the location of the memory address. However, the change won't be permanent and will go back to normal after you warp or go to somewhere in the menu. So ASM would be the best way to do it. :P
 

NarutoActor

The rocks cry out to me
1,974
Posts
15
Years
Writebytetooffset would make change it as long as you know the location of the memory address. However, the change won't be permanent and will go back to normal after you warp or go to somewhere in the menu. So ASM would be the best way to do it. :P
but, can't you use a level script for every map.
 
860
Posts
17
Years
Writebytetooffset would make change it as long as you know the location of the memory address. However, the change won't be permanent and will go back to normal after you warp or go to somewhere in the menu. So ASM would be the best way to do it. :P

Alright thanks..
That means I have to go and learn ASM :P
 

colcolstyles

Yours truly
1,588
Posts
15
Years
What about when you open and go into the menu. The type of level script you need won't work there. Take my word - ASM is your best solution.
But a 0x07 type level script ("On entering map/on menu close") with those 'writebytetooffset' commands will activate when you return from the Bag or something like that.
 
16
Posts
15
Years
  • Seen Feb 12, 2011
I've just begun scripting a while ago, so I'm sorry if I missed something obvious x.x
Spoiler:


I have a few questions on this. (The first isn't actually related to THIS script, more like scripting in general: How do you turn a number into hex? None of the tutorials seem to mention it )

Okay, on to this script. It's on a Firered ROM, I'm using XSE, and the script is *supposed* to give you a Growlithe. When I try to compile it, I get the error shown in the attachment (Error 13 "Type mismatch" on line 7. Missing #define.)


Presuming I get this problem fixed, my next order of business is to make the growlithe sprite disappear after you receive the Pokemon. I know you would do this using either a 'setflag' or a 'hidesprite' but I don't know how to put those in.

Can anyone with any of these issues?
 

NarutoActor

The rocks cry out to me
1,974
Posts
15
Years
its supose to be 0x0 and you need two of them. one for yes and no. compare lastresult 0x0 if 0x0 goto @yes, compare lastresult 0x0 if 0x1 goto @no
 

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
I have a few questions on this. (The first isn't actually related to THIS script, more like scripting in general: How do you turn a number into hex? None of the tutorials seem to mention it )
Use calculator which is part of XSE.

I have a few questions on this. (The first isn't actually related to THIS script, more like scripting in general: How do you turn a number into hex? None of the tutorials seem to mention it ) Presuming I get this problem fixed, my next order of business is to make the growlithe sprite disappear after you receive the Pokemon. I know you would do this using either a 'setflag' or a 'hidesprite' but I don't know how to put those in.
Use setflag after player receives pokemon and put the number of flag to person's ID in A-Map. And to make it disappear when the script is progressing you should use
applymovement 0x(number of person in hex) @(something)
waitmovement 0x0
 
117
Posts
18
Years
  • Age 33
  • USA
  • Seen Aug 26, 2015
im hacking fire red. and i wanted to know how i could get rid of the script that professor oak gives you the national pokedex in, and just have him give you the national pokedex in the beginning.
 
80
Posts
14
Years
  • Seen Dec 27, 2010
lock
faceplayer
checkflag 0x1300
if 0x01 goto $done
message $talk
$talk 1 =Mommy won't let me keep Fluffy...\nPlease take it...
givepokemon 360 5 0
boxset 6
setflag 0x1300
release
end

#org $done
message $go
$go 1 =How is Fluffy doing?
boxset 6
release
end

The script is meant to display the first text. give the Pokemon and then whenever you talk to the person again it should display the second amount of text.

At the moment what it does is just display the second script. This also triggers a change in another script.

I use pokescript.
 
119
Posts
14
Years
Hi, I've got two issues:

- On route 7, as a test, I added two person events. When I entered the map, only one person event was present. Walking all the way up the map, made the other person event appear. However, the script was the same for both events (namely the script of the first dude). What is happening here? (To be clear; route 7 didn't had any person events before I added these.) what the heck, doesn't matter actually
On other maps however I didn't have this problem yet, so it isn't very urgent.

- I am trying to make persons appear and disappear. Can I insert any random Person ID nr. into the Person-ID-nr.-box in Amap? Or should it be an empty flag/variable/thingy?
 
Last edited:
Status
Not open for further replies.
Back
Top