• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Akari, Red, Kris, May - which Pokémon protagonist is your favorite? Let us know by voting in our semifinal favorite protagonist poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Archive] Script help thread

Status
Not open for further replies.
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?>
 
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.
 
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!
 
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 [B]0x0[/B]
if 0x1 goto 0x8900555
release
end

'-----------------------
#org 0x900536
givepokemon [B]0x5C[/B] 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 [B]0x58[/B] 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.
 
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!
 
#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
 
#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.
 
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
 
Remove the lock and faceplayer, as well as the releases. Unneeded.
 
#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
 
In that case:

#Dynamic 0x800000

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

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

#Org @message
= Don't go there!

#org @movements
#raw 12
#raw FE
 
Did you try entering and leaving a building before testing the script?
Also, are you sure you set all the values properly?

[PokeCommunity.com] [Archive] Script help thread

Yes I did. But I found the problem after the script was fixed. Somehow I put a 1 in var value. I have no idea why. o_O

Thanks everyone! ^_^ -feels stupid- D:

Now it is freezing after I get the thing I need. I am trying to make it check for the Pokedex (Nat).

#Dynamic 0x800000

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

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

#Org @message
= Don't go there!

#org @movements
#raw 12
#raw FE
 
I gave up on that one. :x

Now I made a new script but now after everything it freezes. I set everything to the right setting.

Spoiler:


The last @main2 I know it isn't needed but it I want it there because on another script it prevented it from freezing. (It froze at first, but after I added that it didn't.)
 
I gave up on that one. :x

Now I made a new script but now after everything it freezes. I set everything to the right setting.

Spoiler:


The last @main2 I know it isn't needed but it I want it there because on another script it prevented it from freezing. (It froze at first, but after I added that it didn't.)
Try this
Spoiler:

In @main2, you don't need lock.
 
I gave up on that one. :x

Now I made a new script but now after everything it freezes. I set everything to the right setting.

Spoiler:


The last @main2 I know it isn't needed but it I want it there because on another script it prevented it from freezing. (It froze at first, but after I added that it didn't.)

You don't use checkflag like that, sorry.
Also, at then end of each movement you need to put 0xFE.
Another thing. Instead of lock/faceplayer, just use callstd/boxset 0x2.
See the script below:

Spoiler:
 
Status
Not open for further replies.
Back
Top