The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Help Thread (DO NOT REQUEST SCRIPTS)

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Closed Thread
 
Thread Tools
  #3351   Link to this post, but load the entire thread.  
Old March 29th, 2010 (4:04 PM).
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
Quote:
Originally Posted by PeregrineFig View Post
Sure is.

special 0x113
applymovement 0x7F @move
waitmovement 0x0
special 0x114

You use regular movement commands to move the camera around, and those specials have to be there. Make sure you move the camera back to its starting position afterwards.
Ah thank you :) *runs off to complete script*
__________________
  #3352   Link to this post, but load the entire thread.  
Old March 31st, 2010 (10:05 AM).
cormac cormac is offline
 
Join Date: Jul 2007
Nature: Adamant
Posts: 6
How do you unlock the "pokemon" option in the pause menu?
I've given my player a pokemon, but I can't check them using the menu.
  #3353   Link to this post, but load the entire thread.  
Old March 31st, 2010 (10:17 AM).
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
Quote:
Originally Posted by cormac View Post
How do you unlock the "pokemon" option in the pause menu?
I've given my player a pokemon, but I can't check them using the menu.
If you are using a FR ROM base you have to use 'setflag 0x828' for the Pokémon menu.

Ruby Sapphire it's 0x800
Emerald is 0x860

You can find more about special flags here
__________________
  #3354   Link to this post, but load the entire thread.  
Old March 31st, 2010 (11:55 AM).
Anselection's Avatar
Anselection Anselection is offline
Malicious Mapper
 
Join Date: Jul 2009
Gender: Male
Posts: 174
Can anyone tell me why this script freezes the whole game?

Spoiler:

#dynamic 0x800000
#org @start
checkflag 0x82F
If 0x1 goto @Hey
msgbox @hey 0x2
msgbox @lets 0x6
Applymovement 0x1 @go
waitmovement 0x0
Setflag 0x82F
end
#org @hey
= Hey, sweetie.\lI think Prof. John is looking for you.
#org @lets
= Hey [PLAYER]. Your running shoes came in\lthe mail. Here, put them on.
#org @go
#raw 0x11 0x13
#org @done
end
__________________
  #3355   Link to this post, but load the entire thread.  
Old March 31st, 2010 (12:01 PM).
PeregrineFig's Avatar
PeregrineFig PeregrineFig is offline
Starting Pokémon Obsidian
 
Join Date: Feb 2010
Location: Michigan, USA
Age: 28
Gender: Male
Nature: Hardy
Posts: 202
I can only think of two things: 1) Add lock and release commands to it, then test it again. 2) There's no pointer to the @done label, so you should just remove that.
__________________
Current Projects:
POKéMON AQUA SAPPHIRE
POKéMON OBSIDIAN

  #3356   Link to this post, but load the entire thread.  
Old March 31st, 2010 (12:03 PM). Edited March 31st, 2010 by Mana.
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
Quote:
Originally Posted by Anselection View Post
Can anyone tell me why this script freezes the whole game?

Spoiler:

#dynamic 0x800000
#org @start
checkflag 0x82F
If 0x1 goto @Hey
msgbox @hey 0x2
msgbox @lets 0x6
Applymovement 0x1 @go
waitmovement 0x0
Setflag 0x82F
end
#org @hey
= Hey, sweetie.\lI think Prof. John is looking for you.
#org @lets
= Hey [PLAYER]. Your running shoes came in\lthe mail. Here, put them on.
#org @go
#raw 0x11 0x13
#org @done
end
Because it is really fractured, try this:

Spoiler:

#dynamic 0x800000

#org @start
checkflag 0x82F
If 0x1 goto @Hey
msgbox @hey 0x2
msgbox @lets 0x6
Applymovement 0x1 @go
waitmovement 0x0
Setflag 0x82F
end

#org @hey
msgbox @HeySweetie 0x2
end

#org @Heysweetie
= Hey, sweetie.\lI think Prof. John is looking for you.

#org @lets
= Hey [PLAYER]. Your running shoes came in\lthe mail. Here, put them on.

#org @go
#raw 0x11
#raw 0x13
#raw 0xFE

#org @done
end




Changes in bold / Crossed out.

You'll probably want lock+faceplayer at the beginning and release at before both ends too.
__________________
  #3357   Link to this post, but load the entire thread.  
Old March 31st, 2010 (12:17 PM).
Anselection's Avatar
Anselection Anselection is offline
Malicious Mapper
 
Join Date: Jul 2009
Gender: Male
Posts: 174
@Swiftsign - I tried that and your suggestions, it still freezes when I step on the script tile.
__________________
  #3358   Link to this post, but load the entire thread.  
Old March 31st, 2010 (12:31 PM).
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
Have you set the tile values correctly?

Set the Unknown value to 0003 and the Var Number to 4050.

See if that works.
__________________
  #3359   Link to this post, but load the entire thread.  
Old March 31st, 2010 (1:06 PM).
Anselection's Avatar
Anselection Anselection is offline
Malicious Mapper
 
Join Date: Jul 2009
Gender: Male
Posts: 174
Thank you. That worked. So does it always have to be 4050?
__________________
  #3360   Link to this post, but load the entire thread.  
Old March 31st, 2010 (1:13 PM).
ShinyBill ShinyBill is offline
 
Join Date: Feb 2010
Gender: Male
Nature: Hardy
Posts: 62
Why is does my script stop right before the red part?

Code:
#org $start
lockall
special 0x8F
checkattack 0x1D
compare 0x800D 0x06
if 0x01 goto $dontknow
storepokemon2 0x00 0x800D
setanimation 0x00 0x800D
message $message1
$message1 1 = It's some climable rocks.\pDo you want to use ROCK CLIMB\nto climb them?
boxset 5
compare 0x800D 0x00
if 0x01 goto $dontwant
doanimation 0x25
waitstate
setvar 0x800C 0x0
copybyte 0x020370D4 0x02036E58
compare 0x800C 0x1
if 0x01 goto $down
compare 0x800C 0x2
if 0x01 goto $up
compare 0x800C 0x3
if 0x01 goto $left
compare 0x800C 0x4
if 0x01 goto $right

#org $down
addvar 0x8005 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepdown
compare 0x8005 0x008D
if 0x00 goto $endingstepdown
end

#org $up
subvar 0x8005 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepup
compare 0x8005 0x008D
if 0x00 goto $endingstepup
end

#org $left
subvar 0x8004 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepleft
compare 0x8005 0x008D
if 0x00 goto $endingstepleft
end

#org $right
addvar 0x8004 0x1
special 0x7F
compare 0x8005 0x008D
if 0x01 goto $stepright
compare 0x8005 0x008D
if 0x00 goto $endingstepright
end

#org $stepdown
applymovement $1down
goto $down

#org $stepup
applymovement $1up
goto $up

#org $stepleft
applymovement $1left
goto $left

#org $stepright
applymovement $1right
goto $right

#org $endingstepdown
applymovement $1down
$1down 1 ; #binary 0x10 0xFE
pausemove 0
releaseall
end

#org $endingstepup
applymovement $1up
$1up 1 ; #binary 0x11 0xFE
pausemove 0
releaseall
end

#org $endingstepleft
applymovement $1left
$1left 1 ; #binary 0x12 0xFE
pausemove 0
releaseall
end

#org $endingstepright
applymovement $1right
$1right 1 ; #binary 0x13 0xFE
pausemove 0
releaseall
end

#org $dontknow
message $message3
$message3 1 = A Pokémon could climb them.
boxset 6
releaseall
end

#org $dontwant
releaseall
end
In case you're asking, I know i'm using HEADBUTT as the attack for the ROCK CLIMB. And yes all my ROCK CLIMB tiles have behavior byte 8D.

PS: Oh, I forgot to tell you, I'm using JPAN's hacked engine and pokescript.
  #3361   Link to this post, but load the entire thread.  
Old March 31st, 2010 (2:02 PM).
Anselection's Avatar
Anselection Anselection is offline
Malicious Mapper
 
Join Date: Jul 2009
Gender: Male
Posts: 174
Can someone help, again?
Spoiler:

#dynamic 0x800000
#org @start
checkflag 0x82F
Applymovement 0x1 @go
waitmovement 0x0
msgbox @lets 0x6
Setflag 0x82F
Applymovement 0x1 @go2
Waitmovement 0x0
end
#org @lets
= Hey [PLAYER]. Your running shoes came in\lthe mail. Here, put them on.\p [PLAYER] obtained the Running Shoes!
#org @go
#raw 0x11
#raw 0x11
#raw 0x03
#raw 0xFE
#org @go2
#raw 0x10
#raw 0x10
#raw 0x02
end


Whenever I do this, it'll run the script, but after it's over, it freezes the game.
please help?
__________________
  #3362   Link to this post, but load the entire thread.  
Old March 31st, 2010 (2:03 PM).
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
Quote:
Originally Posted by Anselection View Post
Can someone help, again?
Spoiler:

#dynamic 0x800000
#org @start
checkflag 0x82F
Applymovement 0x1 @go
waitmovement 0x0
msgbox @lets 0x6
Setflag 0x82F
Applymovement 0x1 @go2
Waitmovement 0x0
end
#org @lets
= Hey [PLAYER]. Your running shoes came in\lthe mail. Here, put them on.\p [PLAYER] obtained the Running Shoes!
#org @go
#raw 0x11
#raw 0x11
#raw 0x03
#raw 0xFE
#org @go2
#raw 0x10
#raw 0x10
#raw 0x02
end


Whenever I do this, it'll run the script, but after it's over, it freezes the game.
please help?
The second movement needs #raw 0xFE at the end
__________________
  #3363   Link to this post, but load the entire thread.  
Old March 31st, 2010 (2:30 PM).
Anselection's Avatar
Anselection Anselection is offline
Malicious Mapper
 
Join Date: Jul 2009
Gender: Male
Posts: 174
Okay, now, I know me posting is getting annoying, but I just have one more teeny weeny problem.

The script works fine, yes. However, whenever I step on that spot again, the whole script replays. Is there a way around that?
__________________
  #3364   Link to this post, but load the entire thread.  
Old March 31st, 2010 (2:40 PM).
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
Quote:
Originally Posted by Anselection View Post
Okay, now, I know me posting is getting annoying, but I just have one more teeny weeny problem.

The script works fine, yes. However, whenever I step on that spot again, the whole script replays. Is there a way around that?
You need another checkflag in there somewhere

checkflag 0xYYYY
if 0x1 goto @End


#org @End
end

Then at the end of the script (after the movements) put a setflag 0xYYYY.

This means once the script has run once a flag has been set, and the beginning of the script checks to see if it has already run.

It's recommended to use flags 1000 and up, and remember not to reuse flags for future scripts :)
__________________
  #3365   Link to this post, but load the entire thread.  
Old March 31st, 2010 (3:44 PM).
rockman0's Avatar
rockman0 rockman0 is offline
I still claim Luxray!
 
Join Date: Sep 2009
Location: at home
Gender: Male
Nature: Hasty
Posts: 549
I'm having trouble with the script below. I set it to talk to someone and they give you a Pokemon, however, everytime I get the Pokemon, only one line of text is displayed and the Pokemon I gain is a question with no attacks. Anyone know what I'm doing wrong?

P.S. I'm using XSE and followed diegoisawesome's tutorial. Thanks!
This is what Advance Map changed it to. This isn't my original script. Thanks again!!

Quote:
-----------------------
#org 0x71A450
checkflag 0x828
if 0x1 goto 0x871A4B2
msgbox 0x871A4BA '"What's up? \nHappy Birthday, [playe..."
compare LASTRESULT 0x1
if 0x0 goto 0x871A473
msgbox 0x871A4F0 '"Dude. \nEmpty your pockets!"
release
end

'-----------------------
#org 0x71A4B2
msgbox 0x871A7B9 '"Yo! /nHow's Zangoose doing?"
release

'-----------------------
#org 0x71A473
callstd 0x6

'---------
' Strings
'---------
#org 0x71A4BA
= What's up? \nHappy Birthday, [player]!\nHere's a gift!

#org 0x71A4F0
= Dude. \nEmpty your pockets!

#org 0x71A7B9
= Yo! /nHow's Zangoose doing?
__________________


"From now on, live in the past, and fight for the future."
  #3366   Link to this post, but load the entire thread.  
Old March 31st, 2010 (3:52 PM).
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
Quote:
Originally Posted by rockman0 View Post
I'm having trouble with the script below. I set it to talk to someone and they give you a Pokemon, however, everytime I get the Pokemon, only one line of text is displayed and the Pokemon I gain is a question with no attacks. Anyone know what I'm doing wrong?

P.S. I'm using XSE and followed diegoisawesome's tutorial. Thanks!
This is what Advance Map changed it to. This isn't my original script. Thanks again!!

There is no givepokemon command in your script.
__________________
  #3367   Link to this post, but load the entire thread.  
Old March 31st, 2010 (6:46 PM).
rockman0's Avatar
rockman0 rockman0 is offline
I still claim Luxray!
 
Join Date: Sep 2009
Location: at home
Gender: Male
Nature: Hasty
Posts: 549
Quote:
Originally Posted by SwiftSign View Post
There is no givepokemon command in your script.
Thanks for the reply. I just noticed that. My original script did have the givepokemon command. For some reason, when I enter it into AdvanceMap, it changes it to what I just posted. Any idea what I could be doing wrong?
__________________


"From now on, live in the past, and fight for the future."
  #3368   Link to this post, but load the entire thread.  
Old March 31st, 2010 (6:49 PM). Edited March 31st, 2010 by PeregrineFig.
PeregrineFig's Avatar
PeregrineFig PeregrineFig is offline
Starting Pokémon Obsidian
 
Join Date: Feb 2010
Location: Michigan, USA
Age: 28
Gender: Male
Nature: Hardy
Posts: 202
When you decompile it and get that, it's showing you the offsets used. The changes in how the script looks make absolutely no difference on the effects of your script. I don't see a reason why the givepokemon command would be disappearing, make sure you're setting it up as givepokemon 0x(species) 0x(level) 0x(item) 0x0 0x0 0x0, with the species, level, and item values in hex, of course.

EDIT: I just noticed an important flaw, you're missing a parameter on your msgbox commands. It should go msgbox (offset) (msg type), meaning for a yes/no question msgbox @offset 0x5, and for a normal one, msgbox @offset 0x6. Callstd is no longer used (so make sure you have the latest version of XSE). Remove that part entirely, and add msgbox types to your msgbox commands.

One more thing I just noticed, you forgot to start the script with a lock command.

No offense, but your script is a bit of a mess. I rewrote it for you, try this:

Spoiler:

#dynamic 0x740000
#org @start
lock
faceplayer
checkflag 0x828
if 0x1 goto @flagset
msgbox @text1 0x6
countpokemon
compare 0x800D 0x6
if 0x1 goto @noroom
givepokemon 0x17C 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
preparemsg @text3
waitmsg
waitfanfare
setflag 0x828
release
end

#org @flagset
msgbox @text4 0x6
release
end

#org @noroom
msgbox @text2 0x6
release
end

#org @text1
= What's up?\nHappy birthday, \v\h01!\lHere's a gift!

#org @text2
= Dude.\nEmpty your pockets!

#org @text3
= \v\h01 received a Zangoose!

#org @text4
= Yo!\nHow's Zangoose doing?


Try looking at how that's written and it should help you out.
__________________
Current Projects:
POKéMON AQUA SAPPHIRE
POKéMON OBSIDIAN

  #3369   Link to this post, but load the entire thread.  
Old March 31st, 2010 (8:54 PM).
rockman0's Avatar
rockman0 rockman0 is offline
I still claim Luxray!
 
Join Date: Sep 2009
Location: at home
Gender: Male
Nature: Hasty
Posts: 549
All right, that's much clearer. Thanks for the help.

And no offense taken, considering this is my first day at scripting...

Thanks again. ^^
__________________


"From now on, live in the past, and fight for the future."
  #3370   Link to this post, but load the entire thread.  
Old April 1st, 2010 (2:30 AM).
Sky93's Avatar
Sky93 Sky93 is offline
 
Join Date: Dec 2007
Location: GA, USA
Gender: Male
Nature: Relaxed
Posts: 72
Quote:
Originally Posted by Sky93 View Post
How would you go about making a list of choose-able items, similar to Pokémon (Old) White, where there is a list for starter pokemon, and you can pick whichever.

Here is a screenshot:
Spoiler:

Any help for my question?
__________________



ROMs I Support:
  #3371   Link to this post, but load the entire thread.  
Old April 1st, 2010 (4:08 AM).
ShinyBill ShinyBill is offline
 
Join Date: Feb 2010
Gender: Male
Nature: Hardy
Posts: 62
You have to use the multi command. And then, either you create you own or change the text.
  #3372   Link to this post, but load the entire thread.  
Old April 1st, 2010 (12:07 PM).
Reygok's Avatar
Reygok Reygok is offline
Beginning Hacker
 
Join Date: Sep 2009
Gender: Male
Posts: 60
Hi, I have a big problem with all the Flags I set. Always when I leave the map an return, my flags are unset again. Always. I tried many Flags between up from 1000, 5000, 8000, whatever I choose, my flags get cleared as soon as I change the map in the game. What am I doing wrong?
I'm Hacking a german Sapphire
  #3373   Link to this post, but load the entire thread.  
Old April 1st, 2010 (12:11 PM).
PeregrineFig's Avatar
PeregrineFig PeregrineFig is offline
Starting Pokémon Obsidian
 
Join Date: Feb 2010
Location: Michigan, USA
Age: 28
Gender: Male
Nature: Hardy
Posts: 202
I think you're setting flags way too high, and with those numbers there's no data to keep the set value saved. If you're completely remaking the game just start using flags from around 200, but if you're leaving old scripts intact, carefully choose what flags to use. I don't suggest using flags over 800 for those types of things, as those are often either temporary or important flags.
__________________
Current Projects:
POKéMON AQUA SAPPHIRE
POKéMON OBSIDIAN

  #3374   Link to this post, but load the entire thread.  
Old April 1st, 2010 (12:19 PM).
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
Quote:
Originally Posted by Reygok View Post
Hi, I have a big problem with all the Flags I set. Always when I leave the map an return, my flags are unset again. Always. I tried many Flags between up from 1000, 5000, 8000, whatever I choose, my flags get cleared as soon as I change the map in the game. What am I doing wrong?
I'm Hacking a german Sapphire
Are you sure they are being set properly in the first place? I don't know about 5000 and 8000 but flags around 1000 are usually safe.

The fact they are resetting themselves is a bit weird o.O It might be a problem with the ROM I suppose but not entirely sure what's causing this.
__________________
  #3375   Link to this post, but load the entire thread.  
Old April 1st, 2010 (4:28 PM).
The Noob Hacker's Avatar
The Noob Hacker The Noob Hacker is offline
Praise the sun.
 
Join Date: Feb 2010
Gender: Male
Nature: Calm
Posts: 559
Can somebody tell me what is wrong with this script? For some reason the script stops at $go. If it makes any difference I'm not using XSE, I am writing these in Notepad and compiling them with Pocket Script.

Spoiler:

#org $script
jingle
message $1
$1 1 = It is time.
boxset 6
applymovement 1 $walk
$walk 1 ; #binary 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0x13 0xFE
pausemove 0
applymovement 0xFF $look
$look 1 ; #binary 0x02 0xFE
pausemove 0
message $2
$2 1 = The leader is ready.
boxset 6
applymovement 1 $go
$go 1 ; #binary 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0x12 0xFE
applymovement 0xFF $go
applymovement 1 $go2
$go2 1 ; #binary 0x12 0x12 0x12 0x12 0x12 0x11 0x11 0xFE
applymovement 0xFF $go2
pausemove 0
setflag 1200
setvar 0x6000 0x0001
release
end
Closed Thread

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 2:24 AM.