• 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?".
  • 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.

PlatniumPiano

You are now breathing manually
479
Posts
15
Years
Hey everyone, sorry for the noob question. I have been looking all morning and have yet to see a simple answet to this. I change some of the script from the game, then I try to save, but it just makes a new file for that script! Then when I close the script and open it again, it opens the old script. I can open mine, but it opens in a new tab. Even when I go 'compile' it still saves as a new file. Any thoughts on how I can implement my script?


I used to have this exact same problem lol. If you are using XSE, what you do is:
1.Write your script
2.Click on the "show log" button, so it is ON.
3.Hit "Compile" and when you do, a small box should pop up with your script in it.
4. At the bottom of this little box, there are one or many offsets there. If you used, say @start to start your script, you highlight that one and hit the copy button.
5.Once the @start (or whatever the first #org @something was) offset is copied, minimize XSE and paste the new offset into the advance map box where it first said "open script" but don't forget to only paste the Numbers, and to keep the Dollar sign.
6.Hit open script, and you should open a new script similar to what you wrote! ^_^

Any questions, just ask me.




EDIT: I HAVE A SUPER NOOBY PROBLEM:

So when I write a script with a flag, in which one of the first commands is to check for the flag, do the event, then set that flag so it can't happen again. This works when I am in the same building...

HOWEVER when I exit the room or map the script is located in and talk to whatever person I had the script with, It starts up again, like I never set the flag. This happens with every script I do that involves flags.

I.E.

Code:
#dynamic 0x80000
 
#org @start
lock
faceplayer
checkflag 0x901
if 0x0 goto @set
release
end
 
#org @set
msgbox @you 0x6
setflag 0x901
release
end
 
#org @you
= You just set flag 901!

I am guessing that this should work. It does. I go up to this guy for the first time, I talk to him, he says "You just set flag 901!" and I talk to him again and he doesn't say nada. Perfect, right?

This is the part where I leave the building. Just because I feel stupid, I decide to go back in there again. I talk to the guy and what does he say?

"You just set flag 901!"

I'm using Ruby Version with most recent versions of Amap and XSE, so does my rom clear all flags when I leave a map and re-enter? Or am I missing something huge?
 
Last edited:

PlatniumPiano

You are now breathing manually
479
Posts
15
Years
put a flag that the game(ruby)doesn't use and on A-MAP put the flag on person ID I had the same problem but now it works perfectly...

I know that Ruby doesn't use 901, and I set 901 as the person ID, but it still didn't work. Is it because I'm on a custom map?
 

DarkPrince304

Back to Hacking after exams!!!
167
Posts
14
Years
I just made a similar script. Tested and it works.

For the mom, place a script at the entranceway. Give the mom the ID 2c and apply a var number to the script. I used 5050 which works fine. Place the mom sprite in the entranceway. Alter the code below to your liking ... (if you use a different number for the var, change the corresponding number in the code - DON'T change 2C - if you're not hacking Fire Red, though, I'm not sure if it will work). You might be able to put this all into one code.

Code:
'---------------
#org 0x800000
lockall
goto 0x80000c
releaseall
end

'---------------
#org 0x800000
showsprite 0x1
sound 0x9
showsprite 0x1
applymovement MOVE_PLAYER 0x8169B91
applymovement 0x1 0x8169868
waitmovement 0x1
applymovement 0x1 0x81A75E1
textcolor 0x0
msgbox 0x818E272 MSG_KEEPOPEN
closeonkeypress
applymovement 0x1 0x81A75D1
sound 0x9
waitmovement 0x1
hidesprite 0x1
setflag 0x2C
releaseall
end


'---------
' Strings
'---------
#org 0x18E272
= MOM: [player]! Get to bed!\nIt's 11:00! You should be asleep!\pGo to bed and don't forget to\nchange into your pajamas!


'-----------
' Movements
'-----------
#org 0x169B91
#raw 0x10 'Step Down (Normal)
#raw 0x62 'Exclamation Mark (!)
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements

#org 0x169868
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements

#org 0x1A75E1
#raw 0x4A 'Face Player
#raw 0xFE 'End of Movements

#org 0x1A75D1
#raw 0x12 'Step Left (Normal)
#raw 0xFE 'End of Movements

Change the movements to match what you want. In mine the mom comes upstairs, so this works best.

Then apply a signpost to the bed with this sort of code:

Code:
'---------------
#org 0x800057
msgbox 0x818E4CA MSG_KEEPOPEN
closeonkeypress
fadescreen 0x1
pause 0x1E
fadescreen 0x0
hidesprite 0x1
releaseall
end


'---------
' Strings
'---------
#org 0x18E4CA
= [player] went to sleep\nand dreamed of getting your 1st\pPOKéMON!

Any questions please ask. The org#s are what I used for mine. Somebody who's better at scripting might be able to help you more as well with an easier way or something ...

Umm Can you convert the code into XSE?
 

onyx79

Red Dead Revolver
488
Posts
15
Years
I have a huge problem!
I took a map of a pokemon lab and I changed it and put 2 pokemon labs in 1 map.
at the beginning prof elm let's you choose a starter and then when you reach the 2nd reigon you'll get another starter,but when I talk with prof oak to get my 2nd starter he only says:it contains a pokemon caught by prof elm this is my script:

Spoiler:


what is the problem?
 
Last edited by a moderator:

DarkPrince304

Back to Hacking after exams!!!
167
Posts
14
Years
Hey Guys
Here's a script I made

#dynamic 0x821656
#org @start
lock
faceplayer
msgbox @2 0x6
cry 0x19 0x0
fadescreen 0x3
fadescreen 0x2
release
end

#org @2
= \c\h01\h05This Ball Shocked you as you touched it!\p\c\h01\h04[PLAYER]:Better get away from it...

Now here's what I want
I have put a pokeball in a room.And As the player touches the pokeball a bright flash of light is seen(fadescreen). and then some text is seen which you can see...
I tried this script in my game but I can only see the fadescreen effect not the text...So can someone please correct me where am I wrong in the script
 

Pokepal17

More cowbell~
1,519
Posts
15
Years
Hey Guys
Here's a script I made



Now here's what I want
I have put a pokeball in a room.And As the player touches the pokeball a bright flash of light is seen(fadescreen). and then some text is seen which you can see...
I tried this script in my game but I can only see the fadescreen effect not the text...So can someone please correct me where am I wrong in the script
Try this,

#dynamic 0x821656

#org @start
lock
faceplayer
msgbox @2 0x4
cry 0x19 0x0
waitcry
closeonkeypress
fadescreen 0x3
fadescreen 0x2
release
end

#org @2
= \c\h01\h05This Ball Shocked you as you touched it!\p\c\h01\h04[PLAYER]:Better get away from it...
 

DarkPrince304

Back to Hacking after exams!!!
167
Posts
14
Years
Try this,

#dynamic 0x821656

#org @start
lock
faceplayer
msgbox @2 0x4
cry 0x19 0x0
waitcry
closeonkeypress
fadescreen 0x3
fadescreen 0x2
release
end

#org @2
= \c\h01\h05This Ball Shocked you as you touched it!\p\c\h01\h04[PLAYER]:Better get away from it...

Nope still not working :(
 

Samike360

Lover of May
397
Posts
15
Years
So I have this script, and I want it to load after I descend the stairs. However, when I put it on top of the warp tile and warp into the room, the script doesn't load and I have to step off and the back on the tile for it to work. I'm using XSE on a Leaf Green ROM.

Spoiler:
 
11
Posts
14
Years
  • Seen May 31, 2009
applymovement

Thx for the help with the specialheal givepokemon script combo. Have a problem with the next applymovement script. He dosn't go where he needs to go. Th person should go 3 steps up first then 3 steps left and finally 4 steps up before ending up where he should end up.

Here's the script as i compiled it.

Spoiler:





Can you help?
 

PlatniumPiano

You are now breathing manually
479
Posts
15
Years
So I have this script, and I want it to load after I descend the stairs. However, when I put it on top of the warp tile and warp into the room, the script doesn't load and I have to step off and the back on the tile for it to work. I'm using XSE on a Leaf Green ROM.

Spoiler:

Is flag 200 already being used in the game?
 

Samike360

Lover of May
397
Posts
15
Years
Hmm. I'm not sure what to say then. It warps on the tile, correct?

Yeah when you come down stairs it warps onto the tile, but the script won't load until you step off of it and then back on it.

Also, I've been experimenting with level scripts using the "validates value" and the "on entering map" scripts, but none of them seem to work (on one of them, when you enter the map it has random unintelligible speech that you can't get out of).

If someone has a link to a level scripting tutorial, it would be much appreciated.
 

PlatniumPiano

You are now breathing manually
479
Posts
15
Years
Yeah when you come down stairs it warps onto the tile, but the script won't load until you step off of it and then back on it.

Also, I've been experimenting with level scripts using the "validates value" and the "on entering map" scripts, but none of them seem to work (on one of them, when you enter the map it has random unintelligible speech that you can't get out of).

If someone has a link to a level scripting tutorial, it would be much appreciated.

The only thing I can think of is to put the tile one step away from the warp point, so you have to step onto it for it to work. But that's probably not what you want
 

Kolossus

Dialouge Master
5
Posts
14
Years
Hi, I'm brand new to hacking and need a bit of help with a very basic component to scripting.

I've scoured this thread and the guides, but I haven't found an explanation as to how you find the dynamic offset in XSE or in any other program. It says that I can find it with a free space finder and that one of those can be found in Advanced Map, but I'm still clueless as to where exactly the offset finder is and how I can use it in my script.

If it will help anyone help me, this is exactly what I'm trying to do. I have a ROM in which pokemon #152-386 can be obtained before the Elite 4. I need to activate the national dex very early in-game, so I've made a script that gives it to you right after you deliver Oak's Parcel... However, it's filled with holes and I don't know which codes correspond to the right offsets, message and flag.

I would really appriciate help here so I could finally get what I'm doing off the ground.

Here's the script I've made that needs to be fixed up.

Take the $ sign out of your dynamic offest. In advance-map, hit the free space finder tool at the top (the magnifying glass), then for bytes needed put a number between 100 and 300, and then click ok. You can use any one of those as your offset. Just plug it into your script where you have it already
 

Samike360

Lover of May
397
Posts
15
Years
The only thing I can think of is to put the tile one step away from the warp point, so you have to step onto it for it to work. But that's probably not what you want

Yeah it wouldn't make sense for you to take the extra step for your mom to notice that you are there.
 

Xatoku

Game Developer
451
Posts
15
Years
I have seen in some hacks this script that moves the camera without moving the Main Character, could somebod tell me how to do this?
 
Status
Not open for further replies.
Back
Top