The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page [Archive] Script help thread

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
  #2526   Link to this post, but load the entire thread.  
Old December 4th, 2008 (12:43 AM).
wasteaway wasteaway is offline
RomMapper
 
Join Date: Jan 2008
Gender:
Posts: 12
Hello I would like some help with a script that allows standard battle mode into Safari mode for Firered. At the Very beginning of my game I want to allow players to capture their first pokemon. I have tried figuring out the script myself but I have no clue what to do or what I am doing. I have Advanced map, pksv, and pokewitch.

Heres how I want the script to go.

  1. When you enter the lab your character walks up to the professor
  2. Professor says "Hello \v\h01. \pI would like you \nto do an experiment \nfor me. \p I would you to use \nthis pokedex. \pI recently ordered in \nfrom kanto.
  3. Player Receives pokedex
  4. Professor says "Please exit through \nthe back to capture \nyour first pokemon.
  5. At that point the pokedex is activated and the safari battle mode is too.
  6. The player exits the lab into a small field where you can catch all 6 starters.
  7. You only have one pokeball though and it can catch any of the pokemon.
  8. once you have captured one you are teleported back into the lab.
  9. in the lab the professor congratulates you and your journey begins.
  10. Each time you try to go back to the small field the professor stops you by saying "I'm sorry[...] \pbut I can't let you go \nback there right now...
I have tried figuring it out my self but I have had no success. I am fairly new to scripting.

More info:
If your wondering about the rock and feed pokemon thing I want that to stay. I know it probably can't be changed anyways but I want that to be there on purpose because in the first episode of pokemon ash, since pikachu wasn't listening, had to use a rock to attempt trying to catch a pokemon and hits a spearow instead making it upset and yeahh you know the story from there.
__________________

  #2527   Link to this post, but load the entire thread.  
Old December 4th, 2008 (1:32 AM).
Ninja Caterpie's Avatar
Ninja Caterpie Ninja Caterpie is offline
AAAAAAAAAAAAA
 
Join Date: Mar 2008
Location: Best City OCE
Age: 27
Gender: Male
Nature: Relaxed
Posts: 5,978
Humdiddlydoodah. It's not a request thread.

Well, decompile the Safari Zone entrance script, and we can work from there.
__________________
Everything ends,
and that's always sad.
But everything begins again, too,
and that's always happy.
  #2528   Link to this post, but load the entire thread.  
Old December 4th, 2008 (2:08 AM). Edited December 4th, 2008 by wasteaway.
wasteaway wasteaway is offline
RomMapper
 
Join Date: Jan 2008
Gender:
Posts: 12
Heres the script I can't really figure out what is making the battle mode so that the trainer is just fighting himself?

Repeat of what I want the script to do
Spoiler:
Heres how I want the script to go.

  1. When you enter the lab your character walks up to the professor
  2. Professor says "Hello \v\h01. \pI would like you \nto do an experiment \nfor me. \p I would you to use \nthis pokedex. \pI recently ordered in \nfrom kanto.
  3. Player Receives pokedex
  4. Professor says "Please exit through \nthe back to capture \nyour first pokemon.
  5. At that point the pokedex is activated and the safari battle mode is too.
  6. The player exits the lab into a small field where you can catch all 6 starters.
  7. You only have one pokeball though and it can catch any of the pokemon.
  8. once you have captured one you are teleported back into the lab.
  9. in the lab the professor congratulates you and your journey begins.
  10. Each time you try to go back to the small field the professor stops you by saying "I'm sorry[...] \pbut I can't let you go \nback there right now...


Directly from the Safari zone building
Code:
#org 0x816D36D
'-----------------------------------
lockall
setvar 0x4002 0x0
jump 0x816D391

#org 0x816D391
'-----------------------------------
textcolor 0x0 'Sets text color (Fire Red).
msgbox 0x8197C6B ' Welcome to the SAFARI ZONE!
callstd MSG_NOCLOSE ' Non-closing msg
applymovement PLAYER 0x81A75EB ' raw_30 end 
pauseevent 0x0
showmoney 0x0 0x0
msgbox 0x8197C87 ' For just [p]500, you can play the\nSAFARI GAME.\pYou can roam the wide-open safari\nand catch what you like.\pWould you like to play?
callstd MSG_YESNO ' Yes/No msg
compare LASTRESULT 0x1
if 0x1 jump 0x816D3CA ' Equal To
msgbox 0x8197DE9 ' Okay.\nPlease come again!
callstd MSG_NOCLOSE ' Non-closing msg
jump 0x816D49A

#org 0x816D3CA
'-----------------------------------
call 0x816D462
checkmoney 0x1F4 0x0 0xD21
storeitem 0x0 0x600
nop1 ' #raw 0x1
startcontest
storeitems 0x16 0x9108 0x1F4
nop0 ' #raw 0x0
updatemoney 0x0 0x0 0x0
msgbox 0x8197D07 ' That'll be [p]500, please!\pWe only use a special kind of \nPOKé BALLS here.
callstd MSG_NOCLOSE ' Non-closing msg
textcolor 0x3 'Sets text color (Fire Red).
fanfare 0x101
message 0x8197D50 ' \v\h01 received 30 SAFARI BALLS\nfrom the attendant.
waitfanfare
call 0x81A6675
msgbox 0x8197D80 ' We'll call you on the PA when you\nrun out of time or SAFARI BALLS.\pWell, I'll wish you the best of\nluck!
callstd MSG_NOCLOSE ' Non-closing msg
closemsg
hidemoney 0x0 0x0
compare 0x4002 0x0
if 0x1 call 0x816D44C ' Equal To
compare 0x4002 0x1
if 0x1 call 0x816D441 ' Equal To
compare 0x4002 0x2
if 0x1 call 0x816D457 ' Equal To
special 0xCD
setvar 0x406E 0x2
warp 0x1 0x3F 0xFF 0x1A 0x1E
waitspecial
end

#org 0x816D462
'-----------------------------------
countpokemon
compare LASTRESULT 0x6
if 0x5 jump 0x81A77A9 ' Not Equal To
special2 0x800D 0x130
compare LASTRESULT 0x1
if 0x1 jump 0x81A77A9 ' Equal To
msgbox 0x81BFEAC ' Excuse me!\nYour PC BOX is full.
callstd MSG_NOCLOSE ' Non-closing msg
jump 0x816D49A

#org 0x81A77A9
'-----------------------------------
return

#org 0x816D49A
'-----------------------------------
closemsg
hidemoney 0x0 0x0
applymovement PLAYER 0x816D4AA ' walk_down end 
pauseevent 0x0
releaseall
end

#org 0x81A6675
'-----------------------------------
copyvar 0x8012 0x8013
return

#org 0x816D44C
'-----------------------------------
applymovement PLAYER 0x816D4AC ' walk_up walk_up end 
pauseevent 0x0
return

#org 0x816D441
'-----------------------------------
applymovement PLAYER 0x816D4AF ' walk_up walk_left walk_up end 
pauseevent 0x0
return

#org 0x816D457
'-----------------------------------
applymovement PLAYER 0x816D4B3 ' walk_up walk_right walk_up end 
pauseevent 0x0
return


#org 0x8197C6B
= Welcome to the SAFARI ZONE!

#org 0x8197C87
= For just [p]500, you can play the\nSAFARI GAME.\pYou can roam the wide-open safari\nand catch what you like.\pWould you like to play?

#org 0x8197DE9
= Okay.\nPlease come again!

#org 0x8197D07
= That'll be [p]500, please!\pWe only use a special kind of \nPOKé BALLS here.

#org 0x8197D50
= \v\h01 received 30 SAFARI BALLS\nfrom the attendant.

#org 0x8197D80
= We'll call you on the PA when you\nrun out of time or SAFARI BALLS.\pWell, I'll wish you the best of\nluck!

#org 0x81BFEAC
= Excuse me!\nYour PC BOX is full.

#org 0x81A75EB
M raw_30 end 

#org 0x816D4AA
M walk_down end 

#org 0x816D4AC
M walk_up walk_up end 

#org 0x816D4AF
M walk_up walk_left walk_up end 

#org 0x816D4B3
M walk_up walk_right walk_up end
Now I know its a request but actually I need help because I don't think anyone has done this? If this is done it can open doors to many new possibilities for other projects. I can't figure out where the hell is the switch for switching it from normal battle mode to safari catch mode? Anybody know what to put or what is the safari script input?
__________________

  #2529   Link to this post, but load the entire thread.  
Old December 4th, 2008 (2:32 AM).
Ninja Caterpie's Avatar
Ninja Caterpie Ninja Caterpie is offline
AAAAAAAAAAAAA
 
Join Date: Mar 2008
Location: Best City OCE
Age: 27
Gender: Male
Nature: Relaxed
Posts: 5,978
Uh...copy that script, except remove the paying parts...I guess? Lazyness, I know. And add setflag 0x829. :P
__________________
Everything ends,
and that's always sad.
But everything begins again, too,
and that's always happy.
  #2530   Link to this post, but load the entire thread.  
Old December 4th, 2008 (3:53 PM). Edited December 4th, 2008 by wasteaway.
wasteaway wasteaway is offline
RomMapper
 
Join Date: Jan 2008
Gender:
Posts: 12
I finally put the script together.
The thing I need help with is how to catch one pokemon with out fail and then warp back into the lab and switch it back to normal battle mod?

Code:
#org 0x871C5C0
'-----------------------------------
call 0x816D462
checkflag 0x1003
if 0x1 call 0x871C5F0 ' Equal To
compare 0x4055 0x3
if 0x1 call 0x871C5F0 ' Equal To
applymovement PLAYER 0x871C600 ' walk_up walk_up walk_up walk_up walk_up walk_up walk_up look_up end 
pause 0x80
msgbox 0x871C610 ' ELM: \v\h01!\nThere you are!\pI needed to ask you a favor.\pI have an acquaintance called\nMR.POKéMON.\pHe keeps finding weird things and\nraving about his discoveries.\pAnyway, I just got an e-mail from him\nsaying that this time it's real.\pIt is intriguing, but we're busy with\nour POKéMON research.\pCould you look into it for us?\pI'll give you a POKéMON for a partner.\pThey're all in the back that we just\nfound.\lGo on. Pick one!
callstd MSG_NORMAL ' Normal msg
special 0xCD
setvar 0x406E 0x2
setflag 0x1003
setvar 0x6C55 0x2
end

#org 0x816D462
'-----------------------------------
countpokemon
compare LASTRESULT 0x6
if 0x5 jump 0x81A77A9 ' Not Equal To
special2 0x800D 0x130
compare LASTRESULT 0x1
if 0x1 jump 0x81A77A9 ' Equal To
msgbox 0x81BFEAC ' Excuse me!\nYour PC BOX is full.
callstd MSG_NOCLOSE ' Non-closing msg
jump 0x816D49A

#org 0x81A77A9
'-----------------------------------
return

#org 0x871C5F0
'-----------------------------------
release
end

#org 0x816D49A
'-----------------------------------
closemsg
hidemoney 0x0 0x0
applymovement PLAYER 0x816D4AA ' walk_down end 
pauseevent 0x0
releaseall
end


#org 0x871C610
= ELM: \v\h01!\nThere you are!\pI needed to ask you a favor.\pI have an acquaintance called\nMR.POKéMON.\pHe keeps finding weird things and\nraving about his discoveries.\pAnyway, I just got an e-mail from him\nsaying that this time it's real.\pIt is intriguing, but we're busy with\nour POKéMON research.\pCould you look into it for us?\pI'll give you a POKéMON for a partner.\pThey're all in the back that we just\nfound.\lGo on. Pick one!

#org 0x81BFEAC
= Excuse me!\nYour PC BOX is full.

#org 0x871C600
M walk_up walk_up walk_up walk_up walk_up walk_up walk_up look_up end 

#org 0x816D4AA
M walk_down end
__________________

  #2531   Link to this post, but load the entire thread.  
Old December 4th, 2008 (4:29 PM).
Vrai's Avatar
Vrai Vrai is offline
can you feel my heart?
 
Join Date: Jun 2008
Age: 28
Gender: Male
Nature: Adamant
Posts: 2,896
Still need help on my script, up above. Thanks all who help. ^^
__________________
  #2532   Link to this post, but load the entire thread.  
Old December 5th, 2008 (2:34 AM).
Ninja Caterpie's Avatar
Ninja Caterpie Ninja Caterpie is offline
AAAAAAAAAAAAA
 
Join Date: Mar 2008
Location: Best City OCE
Age: 27
Gender: Male
Nature: Relaxed
Posts: 5,978
What's it meant to do?
What DOES it do?
__________________
Everything ends,
and that's always sad.
But everything begins again, too,
and that's always happy.
  #2533   Link to this post, but load the entire thread.  
Old December 5th, 2008 (2:58 AM).
Vrai's Avatar
Vrai Vrai is offline
can you feel my heart?
 
Join Date: Jun 2008
Age: 28
Gender: Male
Nature: Adamant
Posts: 2,896
Quote:
Originally Posted by Vrai View Post

Okay, I really don't understand level scripts at all. I've got this script, with comments in at certain places. Hiche said that would require level scripting, but I'm not sure how to implement them, nor how to move the camera to a different map. (I know how to move the camera normally, just not how to warp it to another map.)

Keep in mind, that this script hasn't been tested yet.

Also, if anyone's confused, this is what the script's supposed to do:

Spoiler:
The first part of the script will be placed by the stairway, preventing the player from exiting the map until the script is complete. The next part is set to the bed, and when the player enters the bed, the screen fades, and a msgbox is placed. The screen returns (hopefully) to another map, where the player witnesses a robbery. Then, the screen fades again, and the camera returns back to the player, after which, displays another msgbox. The flag is then set and the player is free to roam about the room.
Quote from myself on last page, where I said you could go to find out what the script does. Also, I haven't tested it yet because I wanted to see if I had any errors and such, as this is my first time using level scripts. Ignore the first paragraph, too.
__________________
  #2534   Link to this post, but load the entire thread.  
Old December 5th, 2008 (3:13 AM).
Ninja Caterpie's Avatar
Ninja Caterpie Ninja Caterpie is offline
AAAAAAAAAAAAA
 
Join Date: Mar 2008
Location: Best City OCE
Age: 27
Gender: Male
Nature: Relaxed
Posts: 5,978
Hm.
Shouldn't you test it first...?

Oh, and just make the script warp to someplace. Then, that someplace has a level script. And that warps you back to the room. Which has a level script. That displays a message.

Test it, and see if there's any trouble...?
__________________
Everything ends,
and that's always sad.
But everything begins again, too,
and that's always happy.
  #2535   Link to this post, but load the entire thread.  
Old December 5th, 2008 (3:19 AM).
Vrai's Avatar
Vrai Vrai is offline
can you feel my heart?
 
Join Date: Jun 2008
Age: 28
Gender: Male
Nature: Adamant
Posts: 2,896
Quote:
Originally Posted by Ninja Caterpie View Post
Hm.
Shouldn't you test it first...?

Oh, and just make the script warp to someplace. Then, that someplace has a level script. And that warps you back to the room. Which has a level script. That displays a message.

Test it, and see if there's any trouble...?
Mmkay. I'll get back to here later on it. Thanks anyway, NC.
__________________
  #2536   Link to this post, but load the entire thread.  
Old December 5th, 2008 (7:11 AM).
chrisdurer's Avatar
chrisdurer chrisdurer is offline
 
Join Date: Apr 2008
Age: 31
Gender:
Nature: Quiet
Posts: 31
I need some help. I wanted to make a script in fire red for oak. exactly like the one when you first have to try and leave the town and he comes running to you. But the problem is that i have no idea how to do that. can anyone help me?
  #2537   Link to this post, but load the entire thread.  
Old December 5th, 2008 (7:17 AM).
Hiche.. Hiche.. is offline
 
 
Join Date: Apr 2008
Posts: 979
Quote:
Originally Posted by chrisdurer View Post
I need some help. I wanted to make a script in fire red for oak. exactly like the one when you first have to try and leave the town and he comes running to you. But the problem is that i have no idea how to do that. can anyone help me?
Try reading some tutorials. Refer to one of the tutorials listed below;

Thethethethe's Pokescript Tutorial

Seth the rom master XSE Tutorial
Or:
XSE Tutorial

Read one of them (thethethethe's tutorial is preferable), and try to make a script on your own. Hope that helps.
  #2538   Link to this post, but load the entire thread.  
Old December 5th, 2008 (7:29 AM). Edited December 5th, 2008 by chrisdurer.
chrisdurer's Avatar
chrisdurer chrisdurer is offline
 
Join Date: Apr 2008
Age: 31
Gender:
Nature: Quiet
Posts: 31
Thank you soo much. lol that was exactly wat i was looking for.

ok well this is my script that i am trying to get to work. it the give pokemon script. when the person asks me if i would like to take it and i say no, the message stays at the bottom of the window??

Quote:
#dynamic 0x800000
'-----------------------
#org @start
lock
faceplayer
checkflag 0x200
if 0x1 goto 0x8800028
msgbox 0x880005F '"I Cant take \n care of my \n BULBASAU..."
callstd 0x5
compare LASTRESULT 1
if 1 goto 0x8800032
if 0 goto 0x8000C8
msgbox 0x88000C8 '"Im sure somebody else would\nlik..."
callstd 0x6
release
end
'-----------------------
#org 0x800028
msgbox 0x8800095 '"Hows my Bulbasuar doing?"
callstd 0x6
release
end
'-----------------------
#org 0x800032
copyvar 0x8004 LASTRESULT
givepokemon 0x1 0x5 0x0 0x0 0x0 0x7D
copyvar 0x0 0x0
fanfare 0x13E
msgbox 0x88000AE '"You received a Bulbasaur."
callstd 0x6
waitfanfare
setflag 0x200
release
end

'---------
' Strings
'---------
#org 0x80005F
= I dont want my\nBULBASAUR\pIf you want you\ncan have it.
#org 0x8000C8
= Im sure somebody else would\nlike to have it.
#org 0x800095
= Hows my Bulbasuar doing?
#org 0x8000AE
= You received a Bulbasaur.
never mind i got it.
  #2539   Link to this post, but load the entire thread.  
Old December 6th, 2008 (7:22 AM). Edited December 6th, 2008 by Shaded.
Shaded's Avatar
Shaded Shaded is offline
 
Join Date: Nov 2008
Gender:
Posts: 43
Code:
#dynamic 0x900132

#org 0x9002FA
lock
faceplayer
checkflag 0x1032
if 0x1 goto 0x8900312
setflag 0x1032
msgbox 0x8900320 '"Set!"
callstd 0x4
release
end

'-----------------------
#org 0x900312
message @choose
boxset 5
compare LASTRESULT 1
if b_true goto @yes
compare LASTRESULT 2
if b_true goto @no
release
end

#org @yes
givepokemon 0x92 0x5 0x0 0x0 0x0 
message @yay
setflag 0x800
fanfare 0x13E
waitfanfare
release 
end


#org @no
message @next
boxset 5
compare LASTRESULT 1
if b_true goto @yes1
compare LASTRESULT 0
if b_true goto @no1
release 
end

#org @yes1
givepokemon 0x88 0x5 0x0 0x0 0x0
message @nay
setflag 0x800
fanfare 0x13E
waitfanfare
release
end

#org @no1
message @Bad
callstd 0x4
release
end

'---------
' Strings
'---------
#org 0x900320
= Hello, you look like you\nwant a pokemon.\pI have an extra just talk\nto me again.

#org @choose
= Do you want a Ghastly?

#org @next
= Well,then do you\n want a Grimer?

#org @bad
= Well, talk to me\nagain if you\pchange your mind!

#org @yay
= [player] recieved a\n Ghastly!

#org @nay
= [player] recieved a\n Grimer!
Umm, when I try to compile it gives me a mismatch on givepokemon, all though I do not know what is wrong with it. I took the part with givepokemon out, and it compiled, but it cut out huge chunks of the script, which messed the game up.

If anyone knows how to fix may you please help me.

The code turns into this when I take the givepokemon out and compile
Code:
'-----------------------
#org 0x9002FA
lock
faceplayer
checkflag 0x1032
if 0x1 goto 0x8900312
setflag 0x1032
msgbox 0x8900320 '"Hello, you look like you\nwant a po..."
callstd 0x4
release
end

'-----------------------
#org 0x900312
msgbox 0x8900BCC '"Do you want a Ghastly?"
callstd 0x5
compare LASTRESULT 0x1
if 0xC2 goto 0xE3E0E0D9
setvirtualaddress 0xE9E3ED00
nop


'---------
' Strings
'---------
#org 0x900320
= Hello, you look like you\nwant a pokemon.\pI have an extra just talk\nto me again.

#org 0x900BCC
= Do you want a Ghastly?
This is bad because it cut off like 6 of my strings and when I talk to the sprite, and the person says Do you want a ghastly, if you press yes or no she says the same thing again, and the message doesnt dissapear, I would just like to know whats wrong :( . Im using XSE, with Ruby All help greatly appreciated.
  #2540   Link to this post, but load the entire thread.  
Old December 6th, 2008 (7:30 AM).
Hiche.. Hiche.. is offline
 
 
Join Date: Apr 2008
Posts: 979
Quote:
Originally Posted by Shaded View Post
Code:
#dynamic 0x900132

#org 0x9002FA
lock
faceplayer
checkflag 0x1032
if 0x1 goto 0x8900312
setflag 0x1032
msgbox 0x8900320 '"Set!"
callstd 0x4
release
end

'-----------------------
#org 0x900312
message @choose
boxset 5
compare LASTRESULT 1
if b_true goto @yes
compare LASTRESULT 2
if b_true goto @no
release
end

#org @yes
givepokemon 0x92 0x5 0x0 0x0 0x0  0x0
message @yay
setflag 0x800
fanfare 0x13E
waitfanfare
release 
end


#org @no
message @next
boxset 5
compare LASTRESULT 1
if b_true goto @yes1
compare LASTRESULT 0
if b_true goto @no1
release 
end

#org @yes1
givepokemon 0x88 0x5 0x0 0x0 0x0 0x0
message @nay
setflag 0x800
fanfare 0x13E
waitfanfare
release
end

#org @no1
message @Bad
callstd 0x4
release
end

'---------
' Strings
'---------
#org 0x900320
= Hello, you look like you\nwant a pokemon.\pI have an extra just talk\nto me again.

#org @choose
= Do you want a Ghastly?

#org @next
= Well,then do you\n want a Grimer?

#org @bad
= Well, talk to me\nagain if you\pchange your mind!

#org @yay
= [player] recieved a\n Ghastly!

#org @nay
= [player] recieved a\n Grimer!
Umm, when I try to compile it gives me a mismatch on givepokemon, all though I do not know what is wrong with it. I took the part with givepokemon out, and it compiled, but it cut out huge chunks of the script, which messed the game up.

If anyone knows how to fix may you please help me.
The givepokemon commands lacked one more 0x0. Try it. (Fixes in Bold)
  #2541   Link to this post, but load the entire thread.  
Old December 6th, 2008 (7:56 AM).
Shaded's Avatar
Shaded Shaded is offline
 
Join Date: Nov 2008
Gender:
Posts: 43
Quote:
Originally Posted by Hiche View Post
The givepokemon commands lacked one more 0x0. Try it. (Fixes in Bold)
That fixed the mismatch, but when I compiled the script turned into this"
Code:
'-----------------------
#org 0x9002FA
lock
faceplayer
checkflag 0x1032
if 0x1 goto 0x8900312
setflag 0x1032
msgbox 0x8900320 '"Hello, you look like you\nwant a po..."
callstd 0x4
release
end

'-----------------------
#org 0x900312
msgbox 0x890116F '"Do you want a Ghastly?"
callstd 0x5
compare LASTRESULT 0x1
if 0xC2 goto 0xE3E0E0D9
setvirtualaddress 0xE9E3ED00
nop


'---------
' Strings
'---------
#org 0x900320
= Hello, you look like you\nwant a pokemon.\pI have an extra just talk\nto me again.

#org 0x90116F
= Do you want a Ghastly?
When I check it in game all she says is do you want a ghastly yes no, if you press yes or no , she still says do you want a gastly.It cut out a huge chunk of the code while compiling, does anyone know why?>
  #2542   Link to this post, but load the entire thread.  
Old December 6th, 2008 (7:58 AM).
Sierraffinity's Avatar
Sierraffinity Sierraffinity is offline
Retiring from Pokémon ROM hacking
 
Join Date: Dec 2007
Location: Somewhere the rains of Africa can be blessed
Age: 26
Gender: Female
Nature: Naive
Posts: 1,071
Quote:
Originally Posted by Shaded View Post
That fixed the mismatch, but when I compiled the script turned into this"
Code:
'-----------------------
#org 0x9002FA
lock
faceplayer
checkflag 0x1032
if 0x1 goto 0x8900312
setflag 0x1032
msgbox 0x8900320 '"Hello, you look like you\nwant a po..."
callstd 0x4
release
end

'-----------------------
#org 0x900312
msgbox 0x890116F '"Do you want a Ghastly?"
callstd 0x5
compare LASTRESULT 0x1
if 0xC2 goto 0xE3E0E0D9
setvirtualaddress 0xE9E3ED00
nop


'---------
' Strings
'---------
#org 0x900320
= Hello, you look like you\nwant a pokemon.\pI have an extra just talk\nto me again.

#org 0x90116F
= Do you want a Ghastly?
When I check it in game all she says is do you want a ghastly yes no, if you press yes or no , she still says do you want a gastly.It cut out a huge chunk of the code while compiling, does anyone know why?>
Try a different offset when compiling.
__________________
Restarted and revamped.

Public alpha out now!
  #2543   Link to this post, but load the entire thread.  
Old December 6th, 2008 (8:30 AM).
Shaded's Avatar
Shaded Shaded is offline
 
Join Date: Nov 2008
Gender:
Posts: 43
Quote:
Originally Posted by diegolovespika View Post
Try a different offset when compiling.
Thanks, but now when I test it out and press yes, I get a moltres(at least the givepokemon thing works) but when I press no, it just goes to release and end.

Code:
'-----------------------
#org 0x9002FA
lock
faceplayer
checkflag 0x1032
if 0x1 goto 0x890047C
setflag 0x1032
msgbox 0x89009DF '"Hello, you look like you\nwant a po..."
callstd 0x4
release
end

'-----------------------
#org 0x90047C
msgbox 0x8900AF6 '"Do you want a Ghastly?"
callstd 0x5
compare LASTRESULT 0x1
if 0x1 goto 0x8900536
compare LASTRESULT 0x2
if 0x1 goto 0x8900555
release
end

'-----------------------
#org 0x900536
givepokemon 0x92 0x5 0x0 0x0 0x0 0x0
msgbox 0x8900D13 '"[player] recieved a\n Ghastly!"
setflag 0x800
fanfare 0x13E
waitfanfare
release
end

'-----------------------
#org 0x900555
msgbox 0x8900B79 '"Well,then do you\n want a Grimer?"
callstd 0x5
compare LASTRESULT 0x1
if 0x1 goto 0x89005BE
compare LASTRESULT 0x0
if 0x1 goto 0x89005DD
release
end

'-----------------------
#org 0x9005BE
givepokemon 0x88 0x5 0x0 0x0 0x0 0x0
msgbox 0x8900D33 '"[player] recieved a\n Grimer!"
setflag 0x800
fanfare 0x13E
waitfanfare
release
end

'-----------------------
#org 0x9005DD
msgbox 0x8900C90 '"Well, talk to me\nagain if you\pcha..."
callstd 0x4
release
end


'---------
' Strings
'---------
#org 0x9009DF
= Hello, you look like you\nwant a pokemon.I have an\nextra just talk to me \nagain.

#org 0x900AF6
= Do you want a Ghastly?

#org 0x900D13
= [player] recieved a\n Ghastly!

#org 0x900B79
= Well,then do you\n want a Grimer?

#org 0x900D33
= [player] recieved a\n Grimer!

#org 0x900C90
= Well, talk to me\nagain if you\pchange your mind!
  #2544   Link to this post, but load the entire thread.  
Old December 6th, 2008 (8:38 AM).
Sierraffinity's Avatar
Sierraffinity Sierraffinity is offline
Retiring from Pokémon ROM hacking
 
Join Date: Dec 2007
Location: Somewhere the rains of Africa can be blessed
Age: 26
Gender: Female
Nature: Naive
Posts: 1,071
Quote:
Originally Posted by Shaded View Post
Thanks, but now when I test it out and press yes, I get a moltres(at least the givepokemon thing works) but when I press no, it just goes to release and end.

Code:
'-----------------------
#org 0x9002FA
lock
faceplayer
checkflag 0x1032
if 0x1 goto 0x890047C
setflag 0x1032
msgbox 0x89009DF '"Hello, you look like you\nwant a po..."
callstd 0x4
release
end

'-----------------------
#org 0x90047C
msgbox 0x8900AF6 '"Do you want a Ghastly?"
callstd 0x5
compare LASTRESULT 0x1
if 0x1 goto 0x8900536
compare LASTRESULT 0x0
if 0x1 goto 0x8900555
release
end

'-----------------------
#org 0x900536
givepokemon 0x5C 0x5 0x0 0x0 0x0 0x0
msgbox 0x8900D13 '"[player] recieved a\n Ghastly!"
setflag 0x800
fanfare 0x13E
waitfanfare
release
end

'-----------------------
#org 0x900555
msgbox 0x8900B79 '"Well,then do you\n want a Grimer?"
callstd 0x5
compare LASTRESULT 0x1
if 0x1 goto 0x89005BE
compare LASTRESULT 0x0
if 0x1 goto 0x89005DD
release
end

'-----------------------
#org 0x9005BE
givepokemon 0x58 0x5 0x0 0x0 0x0 0x0
msgbox 0x8900D33 '"[player] recieved a\n Grimer!"
setflag 0x800
fanfare 0x13E
waitfanfare
release
end

'-----------------------
#org 0x9005DD
msgbox 0x8900C90 '"Well, talk to me\nagain if you\pcha..."
callstd 0x4
release
end


'---------
' Strings
'---------
#org 0x9009DF
= Hello, you look like you\nwant a pokemon.I have an\nextra just talk to me \nagain.

#org 0x900AF6
= Do you want a Ghastly?

#org 0x900D13
= [player] recieved a\n Ghastly!

#org 0x900B79
= Well,then do you\n want a Grimer?

#org 0x900D33
= [player] recieved a\n Grimer!

#org 0x900C90
= Well, talk to me\nagain if you\pchange your mind!
There. You had Decimal values of the Pokemon when they should have been Hex values. Also, in your second compare LASTRESULT (Do you want a Ghastly? No), you had compare LASTRESULT 0x2 when it should have been 0x0.
Glad I could help.
__________________
Restarted and revamped.

Public alpha out now!
  #2545   Link to this post, but load the entire thread.  
Old December 6th, 2008 (8:52 AM).
Shaded's Avatar
Shaded Shaded is offline
 
Join Date: Nov 2008
Gender:
Posts: 43
Quote:
Originally Posted by diegolovespika View Post
There. You had Decimal values of the Pokemon when they should have been Hex values. Also, in your second compare LASTRESULT (Do you want a Ghastly? No), you had compare LASTRESULT 0x2 when it should have been 0x0.
Glad I could help.
Thank you so very very much!
  #2546   Link to this post, but load the entire thread.  
Old December 6th, 2008 (5:47 PM).
Working Class Hero Working Class Hero is offline
 
Join Date: Mar 2006
Location: Ohio
Age: 30
Gender:
Nature: Naughty
Posts: 683
#Dynamic 0x800000

#Org @Main
checkflag 0x829
if 0x1 goto @love1
if 0x0 goto @love2
release
end

#org @love1
release
end

#org @love2
lock
faceplayer
message @message
boxset 0x6
applymovement 0xFF @movements
waitmovement 0x0
release
end

#Org @message
= Don't go there!

#org @movements
#raw 0x12

----

What is wrong with this script? It keeps freezing my game. ;_;

Fire Red - XSE
  #2547   Link to this post, but load the entire thread.  
Old December 6th, 2008 (5:51 PM).
Vrai's Avatar
Vrai Vrai is offline
can you feel my heart?
 
Join Date: Jun 2008
Age: 28
Gender: Male
Nature: Adamant
Posts: 2,896
Quote:
Originally Posted by t.A.T.u View Post
#Dynamic 0x800000

#Org @Main
checkflag 0x829
if 0x1 goto @love1
if 0x0 goto @love2
release
end

#org @love1
release
end

#org @love2
lock
faceplayer
message @message
boxset 0x6
applymovement 0xFF @movements
waitmovement 0x0
release
end

#Org @message
= Don't go there!

#org @movements
#raw 0x12 0xFE

----

What is wrong with this script? It keeps freezing my game. ;_;

Fire Red - XSE
Change in bold. Also, make sure you have your Unknown and Var Number values (found in A-map when you have the script selected) correct. They should be 0300 and 4050 respectively.
__________________
  #2548   Link to this post, but load the entire thread.  
Old December 6th, 2008 (6:09 PM).
Working Class Hero Working Class Hero is offline
 
Join Date: Mar 2006
Location: Ohio
Age: 30
Gender:
Nature: Naughty
Posts: 683
Quote:
Originally Posted by Vrai View Post
Change in bold. Also, make sure you have your Unknown and Var Number values (found in A-map when you have the script selected) correct. They should be 0300 and 4050 respectively.
Still Freezes the game.

---

#Dynamic 0x800000

#Org @Main
checkflag 0x829
if 0x1 goto @love1
if 0x0 goto @love2
release
end

#org @love1
release
end

#org @love2
lock
faceplayer
message @message
boxset 0x6
applymovement 0xFF @movements
waitmovement 0x0
release
end

#Org @message
= Don't go there!

#org @movements
#raw 0x12 0xFE
  #2549   Link to this post, but load the entire thread.  
Old December 6th, 2008 (10:22 PM).
Ninja Caterpie's Avatar
Ninja Caterpie Ninja Caterpie is offline
AAAAAAAAAAAAA
 
Join Date: Mar 2008
Location: Best City OCE
Age: 27
Gender: Male
Nature: Relaxed
Posts: 5,978
Remove the lock and faceplayer, as well as the releases. Unneeded.
__________________
Everything ends,
and that's always sad.
But everything begins again, too,
and that's always happy.
  #2550   Link to this post, but load the entire thread.  
Old December 6th, 2008 (10:37 PM).
Surf's Avatar
Surf Surf is offline
...
 
Join Date: Jul 2008
Location: Rust
Age: 28
Gender: Male
Nature: Relaxed
Posts: 1,196
#Dynamic 0x800000

#Org @Main
checkflag 0x829
if 0x0 goto @love2
release
end



#org @love2
lock
faceplayer
message @message
boxset 0x6
applymovement 0xFF @movements
waitmovement 0x0
release
end

#Org @message
= Don't go there!

Try that it saves space and bytes

#org @movements
#raw 12
#raw FE
__________________
I'm looking for some good (When I say good,
I mean you can hold your own by yourself)
N**i Zombies players, to form a team or even a
clan, to play with casually.
Send me a PM with your Highest Level and your PSN,
and I'll get back to you.
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 9:24 AM.