The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

ROM Hacking Hub General discussions about ROM Hacking and Emulation. Not sure where to start? This is the place for you.
Posting links to ROMs is illegal and is not tolerated anywhere on the forum.
New threads in this forum are to be approved by a moderator before they are displayed.


Advertise here

Closed Thread
Click here to go to the first staff post in this thread.  
Thread Tools
  #7026    
Old July 4th, 2012, 01:07 AM
Magic's Avatar
Magic
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male

Advertise here
Quote:
Originally Posted by PunsAreFun View Post
Hey everyone, I'm working on a Fire Red hack and I just gave my character the HM 03 for surf. Realized he needed the Soul Badge to use it so I gave that to him too but even with the badge showing up on the trainer card it still says I need a badge to use surf out of battle. Is there more that I have to do than just setting flag 0x825 ?
Spoiler:

Edit: Here is my code (XSE):
'---------------
#org 0x807BA8
checkflag 0x1036
if 0x1 call 0x8807BCB
setflag 0x1036
setflag 0x825
msgbox 0x8807BD6 MSG_FACE '"Hey there."
giveitem 0x155 0x1 MSG_OBTAIN
msgbox 0x8807D23 MSG_FACE '"Happy hunting!"
release
end

'---------------
#org 0x807BCB
msgbox 0x8807D23 MSG_FACE '"Happy hunting!"
release
end


'---------
' Strings
'---------
#org 0x807BD6
= Hey there.

#org 0x807D23
= Happy hunting!
Are you sure the Soul Badge isn't the 5th badge? Try setflag 0x824 instead.
__________________
  #7027    
Old July 4th, 2012, 07:21 AM
PunsAreFun
Unhatched Egg
 
Join Date: Jul 2012
Quote:
Originally Posted by SwiftSign View Post


Are you sure the Soul Badge isn't the 5th badge? Try setflag 0x824 instead.
I just did setflag 0x824 and it worked! But 0x824 is the 5th badge so I'm not quite sure what's happening but thanks for the fix!
  #7028    
Old July 4th, 2012, 10:30 PM
Nara567's Avatar
Nara567
Unhatched Egg
 
Join Date: Dec 2010
Gender: Male
Nature: Careful
Using JPAN's FR Hacked Engine, I attempted to create a walking script and use special 0x81. However, after reading the manual and searching through the topic, I don't know how to set the number of steps before a text box shows.

Another thing, if I wanted to increase the number of starters, I would give them all the same flag, to prevent the player from getting more than one, correct?
  #7029    
Old July 5th, 2012, 04:52 AM
hinkage's Avatar
hinkage
Go make some new disaster
Community Supporter
 
Join Date: Aug 2010
Age: 19
Quote:
Originally Posted by Nara567 View Post
Another thing, if I wanted to increase the number of starters, I would give them all the same flag, to prevent the player from getting more than one, correct?
Yeah you would. But if it's a starter Pokemon, just use flag 0x828, since also activates the "Pokemon" option on the menu.





Is it possible to give the player a Pokemon with a nickname like in trades?
__________________
(ღ˘⌣˘ღ)
  #7030    
Old July 5th, 2012, 05:07 AM
Magic's Avatar
Magic
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Quote:
Originally Posted by PunsAreFun View Post
I just did setflag 0x824 and it worked! But 0x824 is the 5th badge so I'm not quite sure what's happening but thanks for the fix!
Awesome! Sometimes Kuga/Sabrina get mixed up in order and things, especially in tutorials so, for future reference:

0x820 – Activates First Badge
0x821 - Activates Second Badge
0x822 - Activates Third Badge
0x823 - Activates Fourth Badge
0x824 - Activates Fifth Badge [Kuga]
0x825 - Activates Sixth Badge [Sabrina]
0x826 - Activates Seventh Badge
0x827 - Activates Eighth Badge


Quote:
Originally Posted by hinkage View Post
Is it possible to give the player a Pokemon with a nickname like in trades?
Not possible through normal scripting, as party data is encrypted in FR. It's no doubt doable with ASM though, giving the pokémon then manually inserting a nickname (and owner if needed) onto it.
__________________
  #7031    
Old July 5th, 2012, 06:16 AM
DrFuji's Avatar
DrFuji
Helfen, Wehren, Heilen
 
Join Date: Sep 2009
Location: Upside-downia
Age: 21
Gender: Male
Nature: Jolly
Quote:
Originally Posted by hinkage View Post
Is it possible to give the player a Pokemon with a nickname like in trades?
Yup, you can easily do it through regular scripting using the writebytetooffset command. For instance, if I wanted to change my first party member's nickname to 'SQUIRTLE' then I would just write the following, where every byte is a letter in HEX:

Code:
writebytetooffset 0xCD 0x202428C
writebytetooffset 0xCB 0x202428D
writebytetooffset 0xCF 0x202428E
writebytetooffset 0xC3 0x202428F
writebytetooffset 0xCC 0x2024290
writebytetooffset 0xCE 0x2024291
writebytetooffset 0xC6 0x2024292
writebytetooffset 0xBF 0x2024293
writebytetooffset 0xFF 0x2024294
writebytetooffset 0x00 0x2024295
If you want to rename the second Pokemon in your party then add 0x64 bytes to the offsets provided and then do so again for the third, fourth etc. In addition, if you want a wild Pokemon to have a different name (e.g you're sent on a quest to re-capture a nicknamed Pokemon that was released by its trainer) then you can do the following:

Code:
writebytetooffset 0xCD 0x2024034
writebytetooffset 0xCB 0x2024035
writebytetooffset 0xCF 0x2024036
writebytetooffset 0xC3 0x2024037
writebytetooffset 0xCC 0x2024038
writebytetooffset 0xCE 0x2024039
writebytetooffset 0xC6 0x202403A
writebytetooffset 0xBF 0x202403B
writebytetooffset 0xFF 0x202403C
writebytetooffset 0x00 0x202403D
Just remember that once you've written the nickname that you want to give in HEX you should finish it off with 0xFF and then fill in the remaining spaces with 0x0. If you're giving the Pokemon a nine letter nickname then you don't have to place 0xFF at the end.

Hopefully that helps :D
__________________
  #7032    
Old July 5th, 2012, 07:25 AM
NG55's Avatar
NG55
 
Join Date: Sep 2009
Location: Barrie, Ontario, Canada
Gender: Male
Can someone please give me a trading script for FireRed. Or how you can give a Pokemon away, possibly without trading? PLEASE HELP ME!!!
  #7033    
Old July 5th, 2012, 09:16 AM
DrFuji's Avatar
DrFuji
Helfen, Wehren, Heilen
 
Join Date: Sep 2009
Location: Upside-downia
Age: 21
Gender: Male
Nature: Jolly
Quote:
Originally Posted by NG55 View Post
Can someone please give me a trading script for FireRed. Or how you can give a Pokemon away, possibly without trading? PLEASE HELP ME!!!
Here is a trade script that was taken from in-game and explained in great detail by HackMew - You can see the original explanation by opening XSE's Guide (F2) and going inside the 'Practical Classroom' folder.

Code:
#org 0x16A9B1
lock // locks the sprite movement
faceplayer // sprite faces the player
setvar 0x8008 0x1 // sets value of variable 0x8008 to 0x1
call 0x81A8CAD // calls a branch before returning at 0x1A8CAD
checkflag 0x24A // the script returns and checks flag 0x24A
if 0x1 goto 0x816AA23 // if the flag is enabled goto 0x16AA23
msgbox 0x81A59FE MSG_YESNO '"Hello, there! Do you happen to\nha..." // asks a question - Yes/No
compare LASTRESULT 0x0 // compares LASTRESULT if its value is 0x0 - for No
if 0x1 goto 0x816AA0B // if LASTRESULT is 0x0 - No, the script jumps to 0x16AA0B if Yes then continues
call 0x81A8CBD // the result is Yes and again it jumps to another offset 0x1A8CBD
compare 0x8004 0x6 // compares 0x8004 if its equal to 0x6
if 0x4 goto 0x816AA0B // if the value of 0x8004 is smaller than equal to the script jumps to 0x16AA0B
call 0x81A8CC9 // calls another offset 0x1A8CC9
comparevars2 LASTRESULT 0x8009 // compares if the value LASTRESULT is equal to the value of 0x8009
if 0x5 goto 0x816AA15 // if LASTRESULT's value is not equal to value at 0x8009 script jumps to 0x16AA15
call 0x81A8CD9 // calls another branch of the script at 0x1A8CD9
msgbox 0x81A5A9D MSG_KEEPOPEN '"Thanks!" // displays a Keep Open msg at 0x1A5A9D
setflag 0x24A // sets flag 0x24A
release // sprite resumes movement and the textbox can be closed
end // ends script execution

'---------------
#org 0x1A8CAD
copyvar 0x8004 0x8008 // copies value of 0x8004 to 0x8008
special2 LASTRESULT 0xFC // script uses special2 0xfc to retain a returned value to LASTRESULT
copyvar 0x8009 LASTRESULT // copies value at 0x8009 to LASTRESULT
return // script returns where it was last called

'---------------
#org 0x16AA23
msgbox 0x81A5AA5 MSG_KEEPOPEN '"The [buffer2] that I traded you,\n..." // displays msg at 0x1A5AA5
release // sprite resumes movement and the textbox can be closed
end // ends script execution

'---------------
#org 0x16AA0B
msgbox 0x81A5A4E MSG_KEEPOPEN '"Well, if you don't want to[.]" // displays msg at 0x1A5A4E
release // sprite resumes movement and the textbox can be closed
end // ends script execution

'---------------
#org 0x1A8CBD
special 0x9F // script uses special 0x9f which chooses a pokemon in the party
waitstate // script is in waitstate waiting for the special
lock // locks the sprites movement
faceplayer // sprite faces the player
copyvar 0x800A 0x8004 // copies value at 0x800A to 0x8004
return // script returns where it was last called

'---------------
#org 0x1A8CC9
copyvar 0x8005 0x800A // copies value at 0x8005 to 0x800A
special2 LASTRESULT 0xFF // uses special 0xFF and stores returned value at LASTRESULT
copyvar 0x800B LASTRESULT // copies value at 0x800B to LASTRESULT
return // script returns where it was last called

'---------------
#org 0x16AA15
bufferpokemon 0x0 0x8009 // stores the pokemon name value in 0x8009 to [buffer1]
msgbox 0x81A5A6A MSG_KEEPOPEN '"Hmmm?\nThis isn't a [buffer1].\pTh..." // displays msg at 0x1A5A6A
release // sprite resumes movement and the textbox can be closed
end // ends script execution

'---------------
#org 0x1A8CD9
copyvar 0x8004 0x8008 // copies value at 0x8004 to 0x8008
copyvar 0x8005 0x800A // copies value at 0x8005 to 0x800A
special 0xFD // special 0xFD is used
special 0xFE // special 0xFE is also used
waitstate // script is in waiting state waiting for the specials
lock // locks the sprite
faceplayer // sprite faces the player
return // script returns where it was last called


'---------
' Strings
'---------
#org 0x1A59FE
= Hello, there! Do you happen to\nhave a [buffer1]?\pWould you agree to a trade for\nmy [buffer2]?

#org 0x1A5A9D
= Thanks!

#org 0x1A5AA5
= The [buffer2] that I traded you,\nhas it grown stronger?

#org 0x1A5A4E
= Well, if you don't want to[.]

#org 0x1A5A6A
= Hmmm?\nThis isn't a [buffer1].\pThink of me if you get one.
Its quite complicated, but you can use it a skeleton and just change the flags/ text each time, along with the value in the line 'setvar 0x8008 0x1' as it determines which trade you will be initiating. You can also view and change the Pokemon that are involved with the trade by using ZodiacDaGreat's Trader Advanced.

If you want to take away a Pokemon then you can use HackMew's ASM code or metapod23's script.
__________________
  #7034    
Old July 5th, 2012, 12:44 PM
Renegade's Avatar
Renegade
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
I'm having a problem with the "showsprite" command. In this script, near the middle, there are a bunch of "showsprite" commands. All of them work in game except for the ones above "showsprite 0x10". (Such as: showsprite 0x11, 0x12, 0x13, 0x14, and 0x15) The person event numbers in A-Map are correct and match up with these numbers. (Which are already in hex) Help please?

Code:
#dynamic 0x800180

#org @start
lock
special 0x113
applymovement 0x7F @m1
waitmovement 0x0
special 0x114
textcolor 0x0
message @t1 6
pause 0x10
applymovement 11 @m2
applymovement 12 @m3
waitmovement 0x0
pause 0x10
message @t2 6
special 0x113
applymovement 0x7F @m4
waitmovement 0x0
special 0x114
applymovement 0xFF @m5
waitmovement 0x0
applymovement 12 @m6
waitmovement 0x0
message @t3 6
applymovement 11 @m10
waitmovement 0x0
clearflag 0x502
showsprite 0xD
pause 0x10
applymovement 12 @m15
applymovement 0xFF @m15
waitmovement 0x0
applymovement 11 @m11
waitmovement 0x0
clearflag 0x503
showsprite 0xE
pause 0x10
applymovement 11 @m12
waitmovement 0x0
clearflag 0x504
showsprite 0xF
pause 0x10
applymovement 11 @m11
waitmovement 0x0
clearflag 0x505
showsprite 0x10
pause 0x10
applymovement 11 @m12
waitmovement 0x0
clearflag 0x506
showsprite 0x11
pause 0x10
applymovement 11 @m11
waitmovement 0x0
clearflag 0x507
showsprite 0x12
pause 0x10
applymovement 11 @m12
waitmovement 0x0
clearflag 0x508
showsprite 0x13
pause 0x10
applymovement 11 @m11
waitmovement 0x0
clearflag 0x509
showsprite 0x14
pause 0x10
applymovement 11 @m12
waitmovement 0x0
clearflag 0x510
showsprite 0x15
pause 0x10
applymovement 11 @m14
waitmovement 0x0
applymovement 12 @m16
applymovement 0xFF @m16
waitmovement 0x0
message @t4 6
applymovement 0xFF @m17
waitmovement 0x0
setvar 0x5005 0x1
release
end

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

#org @t4
= Oak: These are Pokèballs. Inside\neach of them are different\lPokèmon. Go ahead and take one.\pYou'll need one for your travel\nto OakWood Town.\p\v\h06: Sweet! You go first,\n\v\h01.

#org @m16
#raw 0x1
#raw 0xFE

#org @m15
#raw 0x3
#raw 0xFE

#org @m14
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x0
#raw 0xFE

#org @m12
#raw 0x13
#raw 0x1
#raw 0xFE

#org @m11
#raw 0x0
#raw 0xFE

#org @m10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x1
#raw 0xFE

#org @m7
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

#org @t3
= Let me start over.\p\v\h06 and \v\h01, I called you\ntwo over here to send you on a\llittle errand to OakWood Town.\p\v\h06: An errand? Uhg...\pOak: I need you two to bring\nback a Pokèball and an Antidote.\pGot it?\p\v\h06: Sure thing, Oak.\pOak: \v\h01, you get the Pokèball\nand \v\h06 can get the Antidote.\pBut first, I have something\nfor you two.

#org @m6
#raw 0x1
#raw 0xFE

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

#org @m4
#raw 0x10
#raw 0x12
#raw 0x10
#raw 0x10
#raw 0xFE

#org @t2
= Oh! \v\h01, please join us.

#org @m3
#raw 0x0
#raw 0xFE

#org @m2
#raw 0x62
#raw 0xFE

#org @t1
= Oak: So what I wanted you to...

#org @m1
#raw 0x11
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0xFE
Thanks.

EDIT: Nevermind, I tried a different method and it worked. Please ignore this post.

Last edited by Renegade; July 5th, 2012 at 03:41 PM.
  #7035    
Old July 5th, 2012, 02:24 PM
Blaziken_rjcf's Avatar
Blaziken_rjcf
Beginning Trainer
 
Join Date: Jul 2009
Gender: Male
I've been trying to get the following script to work (Emerald):
Spoiler:
#dynamic 0x800000
#org @start
lock
faceplayer

msgbox @unown 0x5

compare LASTRESULT 0x1
if 0x1 goto @yes
msgbox @no 0x8
release
end

#raw @unown
= Do you know about the UNOWN?

#raw @yes
= They're pretty powerful, aren't\nthey?

#raw @no
= They're Pokémon that can change\nreality just by thinking it.


When I try to compile it, XSE gives me the following error:
Spoiler:
'Error 13 "Type mismatch" on line 6.
Missing dynamic label.'
(Line 6 is the one I put in bold)

As far as I can tell, it's all there: 0x5 is for yes/no questions, there's the @ for the question itself, and "msgbox". Am I missing something?
  #7036    
Old July 5th, 2012, 02:34 PM
Magic's Avatar
Magic
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Quote:
Originally Posted by Blaziken_rjcf View Post
I've been trying to get the following script to work (Emerald):
Spoiler:
#dynamic 0x800000
#org @start
lock
faceplayer

msgbox @unown 0x5

compare LASTRESULT 0x1
if 0x1 goto @yes
msgbox @no 0x8
release
end

#raw @unown
= Do you know about the UNOWN?

#raw @yes
= They're pretty powerful, aren't\nthey?

#raw @no
= They're Pokémon that can change\nreality just by thinking it.


When I try to compile it, XSE gives me the following error:
Spoiler:
'Error 13 "Type mismatch" on line 6.
Missing dynamic label.'
(Line 6 is the one I put in bold)

As far as I can tell, it's all there: 0x5 is for yes/no questions, there's the @ for the question itself, and "msgbox". Am I missing something?
Your [#raw]s should in fact be [#org]s. Which will be the problem, as the string @unown can't connect properly.
__________________
  #7037    
Old July 5th, 2012, 02:42 PM
Blaziken_rjcf's Avatar
Blaziken_rjcf
Beginning Trainer
 
Join Date: Jul 2009
Gender: Male
Boy, do I feel like an idiot.
However, that's only half my problem. Whenever I compile it, this is what I end up with:
Spoiler:
'---------------
#org 0xA84019
lock
faceplayer
msgbox 0x8A84039 MSG_YESNO '"Do you know about the UNOWN?"
compare LASTRESULT 0x1
if 0x1 goto 0x8A84058
msgbox 0x8A84058 0x8 '"They're pretty powerful, aren't\nt..."
release
end

'---------------
#org 0xA84058
checkobedience 0xD9DC

'---------
' Strings
'---------
#org 0xA84039
= Do you know about the UNOWN?

#org 0xA84058
= They're pretty powerful, aren't\nthey?


Almost forgot: I'm using XSE, version 1.1.1.

Last edited by Blaziken_rjcf; July 5th, 2012 at 03:01 PM. Reason: Additional info
  #7038    
Old July 5th, 2012, 03:23 PM
Magic's Avatar
Magic
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Quote:
Originally Posted by Blaziken_rjcf View Post
Boy, do I feel like an idiot.
However, that's only half my problem. Whenever I compile it, this is what I end up with:
Spoiler:
'---------------
#org 0xA84019
lock
faceplayer
msgbox 0x8A84039 MSG_YESNO '"Do you know about the UNOWN?"
compare LASTRESULT 0x1
if 0x1 goto 0x8A84058
msgbox 0x8A84058 0x8 '"They're pretty powerful, aren't\nt..."
release
end

'---------------
#org 0xA84058
checkobedience 0xD9DC

'---------
' Strings
'---------
#org 0xA84039
= Do you know about the UNOWN?

#org 0xA84058
= They're pretty powerful, aren't\nthey?


Almost forgot: I'm using XSE, version 1.1.1.
(Wow you have a very full rom is you're up to A from using dynamic 0x800000) XD

This kind of thing normally happens when you edit an already compiled script, and then add/remove bytes worth of commands. Try recompiling the script anew, so you get new pointers.
__________________
  #7039    
Old July 5th, 2012, 05:11 PM
NG55's Avatar
NG55
 
Join Date: Sep 2009
Location: Barrie, Ontario, Canada
Gender: Male
Quote:
Originally Posted by DrFuji View Post
Here is a trade script that was taken from in-game and explained in great detail by HackMew - You can see the original explanation by opening XSE's Guide (F2) and going inside the 'Practical Classroom' folder.

Code:
#org 0x16A9B1
lock // locks the sprite movement
faceplayer // sprite faces the player
setvar 0x8008 0x1 // sets value of variable 0x8008 to 0x1
call 0x81A8CAD // calls a branch before returning at 0x1A8CAD
checkflag 0x24A // the script returns and checks flag 0x24A
if 0x1 goto 0x816AA23 // if the flag is enabled goto 0x16AA23
msgbox 0x81A59FE MSG_YESNO '"Hello, there! Do you happen to\nha..." // asks a question - Yes/No
compare LASTRESULT 0x0 // compares LASTRESULT if its value is 0x0 - for No
if 0x1 goto 0x816AA0B // if LASTRESULT is 0x0 - No, the script jumps to 0x16AA0B if Yes then continues
call 0x81A8CBD // the result is Yes and again it jumps to another offset 0x1A8CBD
compare 0x8004 0x6 // compares 0x8004 if its equal to 0x6
if 0x4 goto 0x816AA0B // if the value of 0x8004 is smaller than equal to the script jumps to 0x16AA0B
call 0x81A8CC9 // calls another offset 0x1A8CC9
comparevars2 LASTRESULT 0x8009 // compares if the value LASTRESULT is equal to the value of 0x8009
if 0x5 goto 0x816AA15 // if LASTRESULT's value is not equal to value at 0x8009 script jumps to 0x16AA15
call 0x81A8CD9 // calls another branch of the script at 0x1A8CD9
msgbox 0x81A5A9D MSG_KEEPOPEN '"Thanks!" // displays a Keep Open msg at 0x1A5A9D
setflag 0x24A // sets flag 0x24A
release // sprite resumes movement and the textbox can be closed
end // ends script execution

'---------------
#org 0x1A8CAD
copyvar 0x8004 0x8008 // copies value of 0x8004 to 0x8008
special2 LASTRESULT 0xFC // script uses special2 0xfc to retain a returned value to LASTRESULT
copyvar 0x8009 LASTRESULT // copies value at 0x8009 to LASTRESULT
return // script returns where it was last called

'---------------
#org 0x16AA23
msgbox 0x81A5AA5 MSG_KEEPOPEN '"The [buffer2] that I traded you,\n..." // displays msg at 0x1A5AA5
release // sprite resumes movement and the textbox can be closed
end // ends script execution

'---------------
#org 0x16AA0B
msgbox 0x81A5A4E MSG_KEEPOPEN '"Well, if you don't want to[.]" // displays msg at 0x1A5A4E
release // sprite resumes movement and the textbox can be closed
end // ends script execution

'---------------
#org 0x1A8CBD
special 0x9F // script uses special 0x9f which chooses a pokemon in the party
waitstate // script is in waitstate waiting for the special
lock // locks the sprites movement
faceplayer // sprite faces the player
copyvar 0x800A 0x8004 // copies value at 0x800A to 0x8004
return // script returns where it was last called

'---------------
#org 0x1A8CC9
copyvar 0x8005 0x800A // copies value at 0x8005 to 0x800A
special2 LASTRESULT 0xFF // uses special 0xFF and stores returned value at LASTRESULT
copyvar 0x800B LASTRESULT // copies value at 0x800B to LASTRESULT
return // script returns where it was last called

'---------------
#org 0x16AA15
bufferpokemon 0x0 0x8009 // stores the pokemon name value in 0x8009 to [buffer1]
msgbox 0x81A5A6A MSG_KEEPOPEN '"Hmmm?\nThis isn't a [buffer1].\pTh..." // displays msg at 0x1A5A6A
release // sprite resumes movement and the textbox can be closed
end // ends script execution

'---------------
#org 0x1A8CD9
copyvar 0x8004 0x8008 // copies value at 0x8004 to 0x8008
copyvar 0x8005 0x800A // copies value at 0x8005 to 0x800A
special 0xFD // special 0xFD is used
special 0xFE // special 0xFE is also used
waitstate // script is in waiting state waiting for the specials
lock // locks the sprite
faceplayer // sprite faces the player
return // script returns where it was last called


'---------
' Strings
'---------
#org 0x1A59FE
= Hello, there! Do you happen to\nhave a [buffer1]?\pWould you agree to a trade for\nmy [buffer2]?

#org 0x1A5A9D
= Thanks!

#org 0x1A5AA5
= The [buffer2] that I traded you,\nhas it grown stronger?

#org 0x1A5A4E
= Well, if you don't want to[.]

#org 0x1A5A6A
= Hmmm?\nThis isn't a [buffer1].\pThink of me if you get one.
Its quite complicated, but you can use it a skeleton and just change the flags/ text each time, along with the value in the line 'setvar 0x8008 0x1' as it determines which trade you will be initiating. You can also view and change the Pokemon that are involved with the trade by using ZodiacDaGreat's Trader Advanced.

If you want to take away a Pokemon then you can use HackMew's ASM code or metapod23's script.

Thanks a lot, but that's WAAAY too complicated. I don't need it any more like I told you.
  #7040    
Old July 6th, 2012, 01:06 AM
dt200's Avatar
dt200
Was and will be forever alone.
 
Join Date: Sep 2010
Location: Malaysia
Gender: Male
Nature: Lonely
Hello there! I don't know what went wrong with my script, but when I step on the place where I placed the script box.. nothing happens..

I don't know how to use spoilers.. so I'll post my script normally..

#dynamic 0x800000

#org @start
lock
setvar 0x7000 0x1
message @1 0x6
applymovement 0xFF @2
applymovement 0x0 @3
message @4 0x6
givepokemon 0x19 0x5 0xD0 0x0 0x0 0x0
setflag 0x828
message @5 0x6
giveitem 0x169 0x1 0x0
giveitem 0x16B 0x1 0x0
giveitem 0x16A 0x1 0x0
message @6 0x6
release
end

#org @1
= \v\h01...!

#org @2
#raw 0x62
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11

#org @3
#raw 0x0

#org @4
= Here's a Pikachu, I caught for\nyou.. You don't think I'm an\lexperienced a Pokémon trainer\lright? Dad is training in the\lforest, he'll explain to you\leverything about Pokémon.

#org @5
= /v/h01: Whatelse do you have for me? \nMom: I've just came back from\lshopping.. And look\lwhat I've bought for you? A\lPokégear...\pMom: ... a TunaSocks magazine #2\nand a\lGPS without navigation system.\p\v\h01: So.. how do I use it or\nwhat do I do with it?\pMom: With the Pokégear, you can\ncall trainers nearby to see whether\lthey would like another battle, but\lyour battery needs to be charged\lafter every call. Well, I suppose\lyou know what to do with the\lTunaSocks magazine right? And\lwith the\lGPS, you can see where you are,\lthat's too obvious right?\pI forgot there is something else I\nneed to give you.. This gadget is\lvery expensive, but since you're\lliving in the modern era... Its a\lFame Checker, you can look at\lprofiles of famous people that\lyou've met, don't worry.. it will\lrecord down the info for you\lautomatically... Argh... You are so\llucky I bought this for you, and\lnot your brother...

Thank you.

I use XSE script editor, Firered Rom.
My boxes I filled in the advance map...
Var number-7000
Var value-0001
Unknown(4digit)-0003
Unknown(2digit)-00

If you don't know what unknown(2digit) means, you'll have to have the latest version of advancemap.
__________________
I do something for a reason and the reason is the reason I do it for.


Pokémon games i own:
Pokémon Mystery Dungeon: Red Rescue Team
Pokemon Firered
Pokemon Emerald
Pokemon Crystal
Pokemon Yellow
Pokemon HG/SS
Pokemon Mystery Dungeon: Blue Rescue Team.

75% of Pokemon gamers use cheats and specially made codes to make their pokemon battle-worthy. If you are one of the 25% percent that level their Pokemon up legally, put this in your signature.
-Started by SkittyLover77
  #7041    
Old July 6th, 2012, 01:09 AM
Blaziken_rjcf's Avatar
Blaziken_rjcf
Beginning Trainer
 
Join Date: Jul 2009
Gender: Male
Quote:
Originally Posted by SwiftSign View Post


(Wow you have a very full rom is you're up to A from using dynamic 0x800000) XD

This kind of thing normally happens when you edit an already compiled script, and then add/remove bytes worth of commands. Try recompiling the script anew, so you get new pointers.
I just used the number recommended in a tutorial.
Anyway, I did write the script again, even before you mentioned that. That's what caused the raw/org mistake. It hasn't solved anything.

Last edited by Blaziken_rjcf; July 7th, 2012 at 04:20 AM.
  #7042    
Old July 6th, 2012, 07:03 AM
thanethane98's Avatar
thanethane98
Self Proclaimed Expert
 
Join Date: Jun 2012
Nature: Relaxed
Hey everyone, I'm back again with a problem with another script. Everything with this one seems to work fine, and I can get it working in game. But, after the message is closed, the script ends without any movements being applied to the NPC. I know it probably has something to do with closeonkeypress, but I've been unable to find an acceptable way to fix this issue with the script.

Game: Firered
Type: Trigger
Editor: XSE
Script:
Spoiler:
'---------------
#org 0x7401A2
checkflag 0x200
if 0x1 goto 0x87401CC
lock
applymovement 0x1 0x874027C
pause 0x50
msgbox 0x87401CF MSG_KEEPOPEN '"I can't believe you're leaving\nto..."
closeonkeypress
applymovement 0x1 0x8740281
setflag 0x200
release
end

'---------------
#org 0x7401CC
release
end


'---------
' Strings
'---------
#org 0x7401CF
= I can't believe you're leaving\ntoday, [player].\pI'm going to miss you so much!\pOh, enough about me though!\pMake sure that you go and find Prof.\nOak!\pHe'll get you your Pokemon!


'-----------
' Movements
'-----------
#org 0x74027C
#raw 0xF 'Step Right (Slow)
#raw 0x9 'Step Up (Very Slow)
#raw 0x4A 'Face Player
#raw 0xFE 'End of Movements

#org 0x740281
#raw 0xB 'Step Right (Very Slow)
#raw 0x8 'Step Down (Very Slow)
#raw 0xFE 'End of Movements
__________________
Back and ROM hacking again!
  #7043    
Old July 6th, 2012, 09:14 AM
DrFuji's Avatar
DrFuji
Helfen, Wehren, Heilen
 
Join Date: Sep 2009
Location: Upside-downia
Age: 21
Gender: Male
Nature: Jolly
Quote:
Originally Posted by thanethane98 View Post
Hey everyone, I'm back again with a problem with another script. Everything with this one seems to work fine, and I can get it working in game. But, after the message is closed, the script ends without any movements being applied to the NPC. I know it probably has something to do with closeonkeypress, but I've been unable to find an acceptable way to fix this issue with the script.

Game: Firered
Type: Trigger
Editor: XSE
Script:
Spoiler:
'---------------
#org 0x7401A2
checkflag 0x200
if 0x1 goto 0x87401CC
lock
applymovement 0x1 0x874027C
pause 0x50
msgbox 0x87401CF MSG_KEEPOPEN '"I can't believe you're leaving\nto..."
closeonkeypress
applymovement 0x1 0x8740281
setflag 0x200
release
end

'---------------
#org 0x7401CC
release
end


'---------
' Strings
'---------
#org 0x7401CF
= I can't believe you're leaving\ntoday, [player].\pI'm going to miss you so much!\pOh, enough about me though!\pMake sure that you go and find Prof.\nOak!\pHe'll get you your Pokemon!


'-----------
' Movements
'-----------
#org 0x74027C
#raw 0xF 'Step Right (Slow)
#raw 0x9 'Step Up (Very Slow)
#raw 0x4A 'Face Player
#raw 0xFE 'End of Movements

#org 0x740281
#raw 0xB 'Step Right (Very Slow)
#raw 0x8 'Step Down (Very Slow)
#raw 0xFE 'End of Movements
You haven't given your script the ability to complete the movements before ending - To remedy this put the command 'waitmovement 0x0' after your second applymovement. This will prevent the script from continuing until all of the movements that are taking place have finished.
__________________
  #7044    
Old July 6th, 2012, 01:48 PM
Aowel's Avatar
Aowel
Beginning Trainer
 
Join Date: Jul 2012
Gender: Male
I want the person to turn and say the line, but all he does is turn. The message beep is made, but no text box shows up.
Game: FireRed
Type: Person script
Editor:
v. 1.0.0
Script:
Spoiler:
'-----------------------
#org 0x800022
lock
faceplayer
msgbox 0x880002D '"Hello.\nThis is a test."
release
end


'---------
' Strings
'---------
#org 0x80002D
= Hello.\nThis is a test.

Screenshots and/or videos:
none
Edit: Nevermind, it was the XSE being outdated. I downloaded 1.1.1 and it works fine.
[SOLVED]

Last edited by Aowel; July 6th, 2012 at 02:15 PM. Reason: self solved
  #7045    
Old July 6th, 2012, 02:11 PM
Renegade's Avatar
Renegade
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Quote:
Originally Posted by Aowel View Post
I want the person to turn and say the line, but all he does is turn. The message beep is made, but no text box shows up.
Game: FireRed Type: Person script Editor: v. 1.0.0 Script:
Spoiler:
'-----------------------
#org 0x800022
lock
faceplayer
msgbox 0x880002D '"Hello.\nThis is a test."
release
end


'---------
' Strings
'---------
#org 0x80002D
= Hello.\nThis is a test.
Screenshots and/or videos: none
You are missing a "boxset" command after the msgbox value.

It should look something like this:

Code:
#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @talk 6 <--- That means "boxset 6"
release
end

#org @talk
= Hello.\nThis is a test.
The boxset 6 command tells the game that the script is going to be a "normal message" script where someone is simply saying something. There are other boxset commands for questions and such, but those are in several tutorials in the tutorials section.
  #7046    
Old July 6th, 2012, 08:30 PM
Aowel's Avatar
Aowel
Beginning Trainer
 
Join Date: Jul 2012
Gender: Male
So I've come up with a new problem.

Spoiler:

'---------------
#org 0x800268
checkflag 0x828
if 0x1 goto 0x88002A3
msgbox 0x88002A6 MSG_NORMAL '"Wait! Don't go out!"
playsong 0x12E 0x0
applymovement MOVE_PLAYER 0x88002BC
waitmovement 0x0
applymovement 0x1 0x88002BF
waitmovement 0x0
msgbox 0x88002C8 MSG_NORMAL '"You shouldn't go out without\nPOKÉ..."
warp 0x5 0x1 0x0 0x0 0x0
end

'---------------
#org 0x8002A3
release
end


'---------
' Strings
'---------
#org 0x8002A6
= Wait! Don't go out!

#org 0x8002C8
= You shouldn't go out without\nPOKÉMON for protection.\pI know.\nCome with me.


'-----------
' Movements
'-----------
#org 0x8002BC
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements

#org 0x8002BF
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0xFE 'End of Movements


I get to the script block it is supposed to be executed on, but the music fades and the game freezes. It's supposed to make Oak move to the player and then warp him to the Lab.

EDIT: Taking a look back at the tutorial, I fixed the Unknown and Var number bit. Text and movement works fine, but it freezes before warping.

Last edited by Aowel; July 6th, 2012 at 11:10 PM.
  #7047    
Old July 6th, 2012, 09:27 PM
Nara567's Avatar
Nara567
Unhatched Egg
 
Join Date: Dec 2010
Gender: Male
Nature: Careful
I have two scripts that both freeze upon activating them, one is a regular script event, the other is a level script. Both on FireRed.

For the event:
Spoiler:

#dynamic 0x800000

#org @start
checkflag 0x203
if 0x0 goto @RALLY
release
end

#org @RALLY
lock
msgbox @RALLY1 0x6
setflag 0x202
release
end

#org @RALLY1
= [black_fr]TO: [player]\pOperation R.A.L.L.Y. is being\ninitiated. Head to the auditorium\limmediately.\p~Team Liberty Staff


The level script (this one is rather long; longer than I intended):
Spoiler:

#dynamic 0x740300

#org @start
checkflag 0x202
if 0x1 goto @speech
hidesprite 0x3
hidesprite 0x4
hidesprite 0x5
end

#org @speech
lockall
setvar 0x4033 0x1
applymovement 0xFF @playermove
waitmovement 0x0
special 0x113
applymovement 0x7F @cameramove
waitmovement 0x0
applymovement 0x3 @goldhawk
waitmovement 0x0
msgbox @RALLYspeech 0x6
applymovement 0x3 @goldhawk2
waitmovement 0x0
msgbox @RALLYspeech2 0x6
applymovement 0x5 @bluefalcon
waitmovement 0x0
msgbox @bluefalconintro 0x6
applymovement 0x3 @goldhawk3
waitmovement 0x0
applymovement 0x4 @blackskull
waitmovement 0x0
msgbox @blackskullintro 0x6
applymovement 0x3 @goldhawk4
waitmovement 0x0
msgbox @goldhawkintro 0x6
applymovement 0x3 @goldhawk5
waitmovement 0x0
applymovement 0x3 @goldhawk6
waitmovement 0x0
msgbox @resume1 0x6
applymovement 0x3 @goldhawk7
waitmovement 0x0
msgbox @resume2 0x0
applymovement 0x4 @blackskull2
waitmovement 0x0
msgbox @final 0x6
applymovement 0x7F @camera2
waitmovement 0x0
special 0x114
setflag 0x204
releaseall
end

#org @playermove
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x3
#raw 0x18
#raw 0x2
#raw 0x18
#raw 0x11
#raw 0x12

#org @cameramove
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x11

#org @goldhawk
#raw 0x1A
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x1A

#org @goldhawk2
#raw 0x1C

#org @bluefalcon
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x3

#org @goldhawk3
#raw 0x1
#raw 0x18
#raw 0x3

#org @blackskull
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x3

#org @goldhawk4
#raw 0x0
#raw 0x18

#org @goldhawk5
#raw 0x3

#org @goldhawk6
#raw 0x1C

#org @goldhawk7
#raw 0x1C
#raw 0x1C

#org @blackskull2
#raw 0x1C
#raw 0x13
#raw 0x1
#raw 0x1C
#raw 0x10
#raw 0x12
#raw 0x3

#org @camera2
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10

#org @RALLYspeech
= [orange_fr]Goldhawk: Welcome, everyone.\nI'm glad to see that so many\lof you actually responded to our\lmessage. In all honesty, I didn't\lthink we actually had so many\lremaining members; I'm very glad to\lsee I was wrong on that account.\lNo doubt you're wondering why you're\lhere. You know, of course, that it\lhas to with Operation R.A.L.L.Y.;\lyou do not know what that entails.

#org @RALLYspeech2
= [orange_fr]Goldhawk: As many of you know,\nthe war has been going very...\lbadly, lately.\lIn the past month, Agent Green was\lkilled, Agents Gold and Ruby\ldisappeared, and Agent Silver turned\ltraitor and was imprisoned.\lThat doesn't even account for our\lother losses over the past years:\lour defeats at Mossdeep City and\lPallet Town, for example, and\lthe destruction of our main\lhide-out in the Orange Islands.\lIf we don't do something soon,\lthen we will lose against\lTeam Rocket, and the cycle will\lrepeat.

#org @bluefalconintro
= [orange_fr]Goldhawk: Bluefalcon,

#org @blackskullintro
= [orange_fr]Goldhawk: Blackskull,

#org @goldhawkintro
= [orange_fr]Goldhawk: and I have realized that\nwe need help. Not just from any\lvolunteers, from experienced and\lpowerful trainers, such as the\lvarious Gym Leaders that have been\ldriven into hiding, and Pokemon.\lThis is Operation R.A.L.L.Y.'s goal,\land it is where you come in.

#org @resume1
= [orange_fr]Goldhawk: You will be put into small retrieval\ngroups. These groups will be assigned\lto locate a specific entity, be it a\lGym Leader, Pokemon, or another\ltrainer, and their job will be to\llocate that being and return them to\lthe Alamo. As time goes by,\lwe will hopefully have gathered a\llarge enough force to launch an\lattack at one of the Rocket's main\lbases, defeating the Shadow Admin\land using the technology located\lthere to defeat the other Admins,\land so on.

#org @resume2
= [orange_fr]Goldhawk: It is imperative that you\lsucceed in this mission.\lIf we fail, then not only will each\land every one of you be killed,\lbut the Rockets will continue to\lreign, and all hope of resistance\lcould very well be lost.\pAny questions?

#org @final
= [orange_fr]Goldhawk: You are all dismissed.


Help please?

Last edited by Nara567; July 6th, 2012 at 09:43 PM.
  #7048    
Old July 6th, 2012, 09:53 PM
tajaros's Avatar
tajaros
Hi I'm dawg
 
Join Date: Apr 2012
Location: Philippines
Age: 15
Gender: Male
Nature: Timid
Send a message via Windows Live Messenger to tajaros
Quote:
Originally Posted by Nara567 View Post
I have two scripts that both freeze upon activating them, one is a regular script event, the other is a level script. Both on FireRed.

For the event:
Spoiler:

#dynamic 0x800000

#org @start
checkflag 0x203
if 0x0 goto @RALLY
release
end

#org @RALLY
lock
msgbox @RALLY1 0x6
setflag 0x202
release
end

#org @RALLY1
= [black_fr]TO: [player]\pOperation R.A.L.L.Y. is being\ninitiated. Head to the auditorium\limmediately.\p~Team Liberty Staff


The level script (this one is rather long; longer than I intended):
Spoiler:

#dynamic 0x740300

#org @start
checkflag 0x202
if 0x1 goto @speech
hidesprite 0x3
hidesprite 0x4
hidesprite 0x5
end

#org @speech
lockall
setvar 0x4033 0x1
applymovement 0xFF @playermove
waitmovement 0x0
special 0x113
applymovement 0x7F @cameramove
waitmovement 0x0
applymovement 0x3 @goldhawk
waitmovement 0x0
msgbox @RALLYspeech 0x6
applymovement 0x3 @goldhawk2
waitmovement 0x0
msgbox @RALLYspeech2 0x6
applymovement 0x5 @bluefalcon
waitmovement 0x0
msgbox @bluefalconintro 0x6
applymovement 0x3 @goldhawk3
waitmovement 0x0
applymovement 0x4 @blackskull
waitmovement 0x0
msgbox @blackskullintro 0x6
applymovement 0x3 @goldhawk4
waitmovement 0x0
msgbox @goldhawkintro 0x6
applymovement 0x3 @goldhawk5
waitmovement 0x0
applymovement 0x3 @goldhawk6
waitmovement 0x0
msgbox @resume1 0x6
applymovement 0x3 @goldhawk7
waitmovement 0x0
msgbox @resume2 0x0
applymovement 0x4 @blackskull2
waitmovement 0x0
msgbox @final 0x6
applymovement 0x7F @camera2
waitmovement 0x0
special 0x114
setflag 0x204
releaseall
end

#org @playermove
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x3
#raw 0x18
#raw 0x2
#raw 0x18
#raw 0x11
#raw 0x12

#org @cameramove
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x11

#org @goldhawk
#raw 0x1A
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x1A

#org @goldhawk2
#raw 0x1C

#org @bluefalcon
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x3

#org @goldhawk3
#raw 0x1
#raw 0x18
#raw 0x3

#org @blackskull
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x3

#org @goldhawk4
#raw 0x0
#raw 0x18

#org @goldhawk5
#raw 0x3

#org @goldhawk6
#raw 0x1C

#org @goldhawk7
#raw 0x1C
#raw 0x1C

#org @blackskull2
#raw 0x1C
#raw 0x13
#raw 0x1
#raw 0x1C
#raw 0x10
#raw 0x12
#raw 0x3

#org @camera2
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10

#org @RALLYspeech
= [orange_fr]Goldhawk: Welcome, everyone.\nI'm glad to see that so many\lof you actually responded to our\lmessage. In all honesty, I didn't\lthink we actually had so many\lremaining members; I'm very glad to\lsee I was wrong on that account.\lNo doubt you're wondering why you're\lhere. You know, of course, that it\lhas to with Operation R.A.L.L.Y.;\lyou do not know what that entails.

#org @RALLYspeech2
= [orange_fr]Goldhawk: As many of you know,\nthe war has been going very...\lbadly, lately.\lIn the past month, Agent Green was\lkilled, Agents Gold and Ruby\ldisappeared, and Agent Silver turned\ltraitor and was imprisoned.\lThat doesn't even account for our\lother losses over the past years:\lour defeats at Mossdeep City and\lPallet Town, for example, and\lthe destruction of our main\lhide-out in the Orange Islands.\lIf we don't do something soon,\lthen we will lose against\lTeam Rocket, and the cycle will\lrepeat.

#org @bluefalconintro
= [orange_fr]Goldhawk: Bluefalcon,

#org @blackskullintro
= [orange_fr]Goldhawk: Blackskull,

#org @goldhawkintro
= [orange_fr]Goldhawk: and I have realized that\nwe need help. Not just from any\lvolunteers, from experienced and\lpowerful trainers, such as the\lvarious Gym Leaders that have been\ldriven into hiding, and Pokemon.\lThis is Operation R.A.L.L.Y.'s goal,\land it is where you come in.

#org @resume1
= [orange_fr]Goldhawk: You will be put into small retrieval\ngroups. These groups will be assigned\lto locate a specific entity, be it a\lGym Leader, Pokemon, or another\ltrainer, and their job will be to\llocate that being and return them to\lthe Alamo. As time goes by,\lwe will hopefully have gathered a\llarge enough force to launch an\lattack at one of the Rocket's main\lbases, defeating the Shadow Admin\land using the technology located\lthere to defeat the other Admins,\land so on.

#org @resume2
= [orange_fr]Goldhawk: It is imperative that you\lsucceed in this mission.\lIf we fail, then not only will each\land every one of you be killed,\lbut the Rockets will continue to\lreign, and all hope of resistance\lcould very well be lost.\pAny questions?

#org @final
= [orange_fr]Goldhawk: You are all dismissed.


Help please?
Script #1 doesn't seem to have any problems in it but try to put a "lock" at the beggining of the script or just simply remove the release command here
Quote:
"#org @start
checkflag 0x203
if 0x0 goto @RALLY
release
end"
And for script #2 I bet you used script type #2 in A-map right?

Well it always freezes when using that without setvar and why did you put the setvar at the beggining of the script? try putting them at the end of the script. And those applymovements might be the one causing the problems because you didn't inputed #raw 0xfe at the end always put #raw 0xfe at the end of every applymovement scripts or else they will freeze when doing the script and why did you inputed the script at offset 0x740300 always put a script on an offset higher than 0x800000 for safe scripting...

Hope this helps...
__________________
  #7049    
Old July 7th, 2012, 01:16 AM
supersam2
Beginning Trainer
 
Join Date: Jul 2010
Gender: Male
hello, I'm trying to understand scripts in XSE and so far it's going quite well, but I've come accross a command that I can't find in any scripting tutorial: "spritebehave"
XSE's Help says that there are two parameters, one for the charachter's ID, which I understand, and one for behavior number, and I'd like to know what this actually does.
Thanks for your help
  #7050    
Old July 7th, 2012, 04:17 AM
Magic's Avatar
Magic
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Quote:
Originally Posted by dt200 View Post
Hello there! I don't know what went wrong with my script, but when I step on the place where I placed the script box.. nothing happens..

I don't know how to use spoilers.. so I'll post my script normally..

Spoiler:
#dynamic 0x800000

#org @start
lock
setvar 0x7000 0x1
message @1 0x6
applymovement 0xFF @2
applymovement 0x0 @3
message @4 0x6
givepokemon 0x19 0x5 0xD0 0x0 0x0 0x0
setflag 0x828
message @5 0x6
giveitem 0x169 0x1 0x0
giveitem 0x16B 0x1 0x0
giveitem 0x16A 0x1 0x0
message @6 0x6
release
end

#org @1
= \v\h01...!

#org @2
#raw 0x62
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11

#org @3
#raw 0x0

#org @4
= Here's a Pikachu, I caught for\nyou.. You don't think I'm an\lexperienced a Pokémon trainer\lright? Dad is training in the\lforest, he'll explain to you\leverything about Pokémon.

#org @5
= /v/h01: Whatelse do you have for me? \nMom: I've just came back from\lshopping.. And look\lwhat I've bought for you? A\lPokégear...\pMom: ... a TunaSocks magazine #2\nand a\lGPS without navigation system.\p\v\h01: So.. how do I use it or\nwhat do I do with it?\pMom: With the Pokégear, you can\ncall trainers nearby to see whether\lthey would like another battle, but\lyour battery needs to be charged\lafter every call. Well, I suppose\lyou know what to do with the\lTunaSocks magazine right? And\lwith the\lGPS, you can see where you are,\lthat's too obvious right?\pI forgot there is something else I\nneed to give you.. This gadget is\lvery expensive, but since you're\lliving in the modern era... Its a\lFame Checker, you can look at\lprofiles of famous people that\lyou've met, don't worry.. it will\lrecord down the info for you\lautomatically... Argh... You are so\llucky I bought this for you, and\lnot your brother...


Thank you.

I use XSE script editor, Firered Rom.
My boxes I filled in the advance map...
Var number-7000
Var value-0001
Unknown(4digit)-0003
Unknown(2digit)-00

If you don't know what unknown(2digit) means, you'll have to have the latest version of advancemap.
A few things:

Movement strings need to end in #raw 0xFE.

The reason your script isn't working at all, however, is the fact you have put Var Value = 0001 in Advance Map.

Since your script sets the Variable to 1, I am assuming it is 0 to start with, so you need:

Var number-7000
Var value-0000


Quote:
Originally Posted by Blaziken_rjcf View Post
I just used the number recommended in a script.
Anyway, I did write the script again, even before you mentioned that. That's what caused the raw/org mistake. It hasn't solved anything.
Ergh I'm sorry! I know why now Since I saw the #raws I didn't look at your actual script.

When you use compare, you have your '@yes' string going directly to a line of speech. Unfortunately you can't do that, what you need to do is change @yes to look like this:

Quote:
#org @Yes
msgbox @TalkYes 0x6
release
end

#raw @TalkYes
= They're pretty powerful, aren't\nthey?
Also you seem to be using msgbox 0x8 for your no o.O I'm not sure what you're trying to achieve with that, but 0x6 is probably the best for the job.

Quote:
Originally Posted by Nara567 View Post
I have two scripts that both freeze upon activating them, one is a regular script event, the other is a level script. Both on FireRed.

For the event:
Spoiler:

#dynamic 0x800000

#org @start
checkflag 0x203
if 0x0 goto @RALLY
release
end

#org @RALLY
lock
msgbox @RALLY1 0x6
setflag 0x202
release
end

#org @RALLY1
= [black_fr]TO: [player]\pOperation R.A.L.L.Y. is being\ninitiated. Head to the auditorium\limmediately.\p~Team Liberty Staff
With this one the cause is probably your A-Map data, rather than the script. Edit the Var Number to '4050' and the Unknown to '03'

Quote:
The level script (this one is rather long; longer than I intended):
Spoiler:

#dynamic 0x740300

#org @start
checkflag 0x202
if 0x1 goto @speech
hidesprite 0x3
hidesprite 0x4
hidesprite 0x5
end

#org @speech
lockall
setvar 0x4033 0x1
applymovement 0xFF @playermove
waitmovement 0x0
special 0x113
applymovement 0x7F @cameramove
waitmovement 0x0
applymovement 0x3 @goldhawk
waitmovement 0x0
msgbox @RALLYspeech 0x6
applymovement 0x3 @goldhawk2
waitmovement 0x0
msgbox @RALLYspeech2 0x6
applymovement 0x5 @bluefalcon
waitmovement 0x0
msgbox @bluefalconintro 0x6
applymovement 0x3 @goldhawk3
waitmovement 0x0
applymovement 0x4 @blackskull
waitmovement 0x0
msgbox @blackskullintro 0x6
applymovement 0x3 @goldhawk4
waitmovement 0x0
msgbox @goldhawkintro 0x6
applymovement 0x3 @goldhawk5
waitmovement 0x0
applymovement 0x3 @goldhawk6
waitmovement 0x0
msgbox @resume1 0x6
applymovement 0x3 @goldhawk7
waitmovement 0x0
msgbox @resume2 0x0
applymovement 0x4 @blackskull2
waitmovement 0x0
msgbox @final 0x6
applymovement 0x7F @camera2
waitmovement 0x0
special 0x114
setflag 0x204
releaseall
end

#org @playermove
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x3
#raw 0x18
#raw 0x2
#raw 0x18
#raw 0x11
#raw 0x12

#org @cameramove
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x11

#org @goldhawk
#raw 0x1A
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x1A

#org @goldhawk2
#raw 0x1C

#org @bluefalcon
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x3

#org @goldhawk3
#raw 0x1
#raw 0x18
#raw 0x3

#org @blackskull
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x3

#org @goldhawk4
#raw 0x0
#raw 0x18

#org @goldhawk5
#raw 0x3

#org @goldhawk6
#raw 0x1C

#org @goldhawk7
#raw 0x1C
#raw 0x1C

#org @blackskull2
#raw 0x1C
#raw 0x13
#raw 0x1
#raw 0x1C
#raw 0x10
#raw 0x12
#raw 0x3

#org @camera2
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10

#org @RALLYspeech
= [orange_fr]Goldhawk: Welcome, everyone.\nI'm glad to see that so many\lof you actually responded to our\lmessage. In all honesty, I didn't\lthink we actually had so many\lremaining members; I'm very glad to\lsee I was wrong on that account.\lNo doubt you're wondering why you're\lhere. You know, of course, that it\lhas to with Operation R.A.L.L.Y.;\lyou do not know what that entails.

#org @RALLYspeech2
= [orange_fr]Goldhawk: As many of you know,\nthe war has been going very...\lbadly, lately.\lIn the past month, Agent Green was\lkilled, Agents Gold and Ruby\ldisappeared, and Agent Silver turned\ltraitor and was imprisoned.\lThat doesn't even account for our\lother losses over the past years:\lour defeats at Mossdeep City and\lPallet Town, for example, and\lthe destruction of our main\lhide-out in the Orange Islands.\lIf we don't do something soon,\lthen we will lose against\lTeam Rocket, and the cycle will\lrepeat.

#org @bluefalconintro
= [orange_fr]Goldhawk: Bluefalcon,

#org @blackskullintro
= [orange_fr]Goldhawk: Blackskull,

#org @goldhawkintro
= [orange_fr]Goldhawk: and I have realized that\nwe need help. Not just from any\lvolunteers, from experienced and\lpowerful trainers, such as the\lvarious Gym Leaders that have been\ldriven into hiding, and Pokemon.\lThis is Operation R.A.L.L.Y.'s goal,\land it is where you come in.

#org @resume1
= [orange_fr]Goldhawk: You will be put into small retrieval\ngroups. These groups will be assigned\lto locate a specific entity, be it a\lGym Leader, Pokemon, or another\ltrainer, and their job will be to\llocate that being and return them to\lthe Alamo. As time goes by,\lwe will hopefully have gathered a\llarge enough force to launch an\lattack at one of the Rocket's main\lbases, defeating the Shadow Admin\land using the technology located\lthere to defeat the other Admins,\land so on.

#org @resume2
= [orange_fr]Goldhawk: It is imperative that you\lsucceed in this mission.\lIf we fail, then not only will each\land every one of you be killed,\lbut the Rockets will continue to\lreign, and all hope of resistance\lcould very well be lost.\pAny questions?

#org @final
= [orange_fr]Goldhawk: You are all dismissed.


Help please?
For your level script - firstly it doesn't matter where the setvar goes, as long as you definitely hit it - otherwise the script repeats. Since your first section has no 'lock' values it might not be a problem.

Second, 4033 is very close to some special vars, if I recall correctly, so you might want to bump that up to 5000 instead. Just so it doesn't accidentally get changed.

Third problem I see is that your movements don't end in #raw 0xFE! Which is quite a common problem in scripting, add those on and it should be fine.

Quote:
Originally Posted by supersam2 View Post
hello, I'm trying to understand scripts in XSE and so far it's going quite well, but I've come accross a command that I can't find in any scripting tutorial: "spritebehave"
XSE's Help says that there are two parameters, one for the charachter's ID, which I understand, and one for behavior number, and I'd like to know what this actually does.
Thanks for your help
I've never used this command, but the only thing I can think off is behaviour as in 'look left' 'walk around' 'walk up and down' etc, which are listed on A-Map when you make a person event. I believe the list also has the hex values of the behaviours - give it a go and see!
__________________

Last edited by Magic; July 7th, 2012 at 04:32 AM.
Closed Thread
Quick Reply

Sponsored Links


Advertise here
Thread Tools

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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 10:02 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.