• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.
I want to know.

I want to know if there is anything wrong with this before i compile it and waste rom space.

#dynamic 0x800000
#org @begin
lock
faceplayer
checkflag 0x828
if 0x1 goto @gotit
message @q
boxset 6
message @mygod
boxset 6
givepokemon 155 6 139 0 0 0
applymovement 0x01 @MOMwalk
setflag 0x828
release
end

#org @gotit
msgbox @hi
boxset 0x6
release
end

#org @hi
= Hello son, ask around towns\nto find awnsers.

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

#org @q
= #dynamic 0x800000

#org @begin
lock
faceplayer
checkflag 0x828
if 0x1 goto @gotit
message @q
boxset 6
message @mygod
boxset 6
givepokemon 155 6 139 0 0 0
applymovement 0x01 @MOMwalk
Lock
Faceplayer
setflag 0x828
release
end

#org @gotit
msgbox @hi
boxset 0x6
release


end
#org @hi
= Hello son, ask around towns\nto find awnsers.


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


#org @q
= *Blocked for Hacking Sake*


#org @mygod
= You received a Cyndaquil!


#org @coniniue
applymovement 0x01 @Momwalk2
release
end


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


I think i see some errors my self but i dont know hwo to fix them..
 
I want to know if there is anything wrong with this before i compile it and waste rom space.

Spoiler:

I think i see some errors my self but i dont know hwo to fix them..

Pretty screwed up... "@coninue" is not called anywhere, too.

Spoiler:
 
#dynamic 0x800000

#org @begin
lock
faceplayer
checkflag 0x828
if 0x1 goto @gotit
message @q
boxset 6
message @mygod
boxset 6
givepokemon 155 6 139 0 0 0
applymovement 0x01 @MOMwalk
Lock
Faceplayer
applymovement 0x01 @MOMwalk2
Lock
Faceplayer

setflag 0x828
release
end

#org @gotit
msgbox @hi
boxset 0x6
release

end
#org @hi
= Hello son, ask around towns\nto find awnsers.

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

#org @q
= *Blocked for Hacking Sake*

#org @mygod
= You received a Cyndaquil!

#org @coniniue
applymovement 0x01 @Momwalk2
release
end

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



Thanks again but this is @continue

#org @coniniue
applymovement 0x01 @Momwalk2
release
end

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


It was there, where would i fit this in and how?
 
#dynamic 0x800000

#org @begin
lock
faceplayer
checkflag 0x828
if 0x1 goto @gotit
message @q
boxset 6
message @mygod
boxset 6
givepokemon 155 6 139 0 0 0
applymovement 0x01 @MOMwalk
applymovement 0x01 @MOMwalk2 - This is fine? Where can i put @continiue up here?
Lock
Faceplayer
setflag 0x828
release
end

#org @gotit
msgbox @hi
boxset 0x6
release

end
#org @hi
= Hello son, ask around towns\nto find awnsers.

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

#org @q
= *Blocked for Hacking Sake*

#org @mygod
= You received a Cyndaquil!

#org @coniniue
applymovement 0x01 @Momwalk2
release
end

#org @MOMwalk2
#raw 0x12 0x10 0xFE
 
ok

Sorry man:
#dynamic 0x800000
#org @begin
lock
faceplayer
checkflag 0x828
applymovement 0x01 @momwalk
waitmovement 0x0
Lock
Faceplayer
if 0x1 goto @gotit
message @bigtalk
boxset 6
message @mygod
boxset 6
givepokemon 155 6 139 0 0 0
setflag 0x828
release
end

#org @gotit
msgbox @hi
boxset 0x6
end

#org @momsit
applymovement 0x01 @momwalk2
waitmovement 0x0
Lock
Faceplayer
release
end

#org @hi
= Hello son, ask around towns\nto find awnsers.

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

#org @bigtalk
= *Text Blocked
#org @mygod
= You received a Cyndaquil!

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


Your in your home at pallet town, and when you come down the stairs she comes to you, and Says: *Blocked for hacking sake*(I blocked the text) And gives you a cynderquil.
Then she sits back down.. or walks to her position.. if you speak to her again:
She says @hi.

But she walks Evrytime you go on the ..
Image:

[PokeCommunity.com] [Archive] Script help thread

Red: Sit down
Black, Walk to player.
BLue: Talk to player.

This script starts but it keeps happening, eccept the second times, she walks up and right evrytime you go on the
And, she dont walk back to her seat..

I need a scripter for my hack.. i cant keep doing this..
 
Last edited:
Dude, the script keeps happening over and over because you have not set a flag AFTER your mum moves back to her original position. You have put it after the givepokemon command. Also, the order of commands you have totally messed up and you have put unecessary lock and faceplayers. You really only need one at the start, and if you want your mum to face you during the script, you add it into the applymovement script. There was no need for any scripts in the @gotit section, you should just add a script to your mum that checks the flag 0x828 and if 0x1 it goes to whatever you wanted her to say. This way, instead of her walking to you each and every time, you can just talk to her instead and she will say what you wanted her to say. So, I will re-arrange/edit this baby for you.


Spoiler:


If you want to make it more interesting, when it says "You received a Cyndaquil!" make it boxset 4 and add a fanfare in, Since i forgot all the fanfares i don't know which one is the one that sounds when you obtain something.. I think it's fanfare 0x10C, but just look for a list.
After that you should add another script in, boxset 6 with your mum saying "Take care of it"

I think that's it..
 
My script works perfectly, but when I exit the room and re-enter it, the guy that I intended to disappear is there, and the script will activate again. Here's the script in case it's needed:
#dynamic 0x26D37C

#org @start
checkflag 0x1000
if b_true goto @end
if b_false goto @continue
release
end

#org @continue
applymovement MOVE_PLAYER @move1
waitmovement 0x0
msgbox @whosthere?
boxset 0x2
special 0x113
applymovement 0x7F @move2
applymovement 0x01 @move3
waitmovement 0x0
msgbox @thief
boxset 0x2
applymovement 0x01 @move4
waitmovement 0x0
#raw 0x53 0x01 0x00
applymovement 0x7F @move5
waitmovement 0x0
special 0x114
msgbox @police?
boxset 0x2
setflag 0x1000
releaseall
end

#org @end
release
end

#org @move1
#raw 0x52 0x62 0xFE

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

#org @move3
#raw 0x20 0x20 0x20 0x20 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x20 0x20 0x20 0xFE

#org @move4
#raw 0x1D 0x1F 0x1F 0x1F 0x00 0xFE

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

#org @whosthere?
= Someone's there!

#org @thief
= Oh no! I'm outta here!

#org @police?
= What was that? \pWhatever it was, I'd better\ntalk to the police about it.

And, before anyone asks, I did set the Person ID of the guy to 1000 so he would disappear, but he isn't...
 
Try a different flag number other than the one you check during the script, that might cause some type of problem.. so near the end, keep setflag 0x1000 and add another one like setflag 0x1001 and assign 1001 to his ID number.
 
Try a different flag number other than the one you check during the script, that might cause some type of problem.. so near the end, keep setflag 0x1000 and add another one like setflag 0x1001 and assign 1001 to his ID number.


I also changed the checkflag number to 1001, and it worked, thank you.

Dude, the script keeps happening over and over because you have not set a flag AFTER your mum moves back to her original position. You have put it after the givepokemon command. Also, the order of commands you have totally messed up and you have put unecessary lock and faceplayers. You really only need one at the start, and if you want your mum to face you during the script, you add it into the applymovement script. There was no need for any scripts in the @gotit section, you should just add a script to your mum that checks the flag 0x828 and if 0x1 it goes to whatever you wanted her to say. This way, instead of her walking to you each and every time, you can just talk to her instead and she will say what you wanted her to say. So, I will re-arrange/edit this baby for you.


Spoiler:


If you want to make it more interesting, when it says "You received a Cyndaquil!" make it boxset 4 and add a fanfare in, Since i forgot all the fanfares i don't know which one is the one that sounds when you obtain something.. I think it's fanfare 0x10C, but just look for a list.
After that you should add another script in, boxset 6 with your mum saying "Take care of it"

I think that's it..

It's actually fanfare 0x13E. Put in something like this:

Spoiler:
 
Last edited:
He could also, alternatively, as I mentioned before, add a script after the boxset 4 to release it, and also continues the mum's speech, like:

Spoiler:
 
Hi, I just tried this script, it's a give pokemon with naming. Everything works except when I choose to raname the Charmander it continues witht the script as it would if I had chosen not to rename it.

#dynamic 0x71A280
#org @start
lock
faceplayer
checkflag 0x828
if b_true goto @done
message @1
boxset 5
compare LASTRESULT 1
if b_true goto @take
message @2
boxset 6
release
end

#org @take
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
message @3
boxset 4
waitfanfare
#raw 0x68
setflag 0x828
message @4
boxset 5
compare LASTRESULT 1
if b_true gosub @name
message @5
boxset 6
release
end

#org @name
call 0x1A74EB
return

#org @done
message @6
boxset 6
release
end

#org @1
= I'm sorry, I can't take care\nof my Charmander.\pCan you take care of it for me?

#org @2
= That's okay. I'm sure someone\nelse will take it.

#org @3
= \c\h01\h02You recieved a Charmander!

#org @4
= \c\h01\h02Would you like to rename Charmander?

#org @5
= Take care of Charmander.

#org @6
= I hope you're taking good care of\nCharmander.
 
Hi, I just tried this script, it's a give pokemon with naming. Everything works except when I choose to raname the Charmander it continues witht the script as it would if I had chosen not to rename it.

Try this:

Spoiler:
 
Hi, I just tried this script, it's a give pokemon with naming. Everything works except when I choose to raname the Charmander it continues witht the script as it would if I had chosen not to rename it.

Spoiler:

Everything seems in order. Did you check the script at 0x1A74EB?
BTW, #raw 0x68 is closeonkeypress.
Also, here's a little tip: instead of using color codes just for setting the text to black, since you're hacking FR/LG it would be easier to just use the textcolor command:

Spoiler:
 
Saken, thanks, it works perfectly except after you rename the Charmander it finishes the script and it's meant to say the "Take care of Charmander"

HackMew, thanks for the tip, I only learned how to script yesterday and am still learning.
 
Saken, thanks, it works perfectly except after you rename the Charmander it finishes the script and it's meant to say the "Take care of Charmander"

HackMew, thanks for the tip, I only learned how to script yesterday and am still learning.

You're welcome. Here's the script I posted earlied with the @name part changed.
It will work on any game since it does not rely on that static offset you were using.

Spoiler:
 
Alright, everybody. I made a pretty big script that is supposed to define a random thing to talk about, and then talk about it. When I put the script on A-Map, and then talk to the person in the emulator, nothing happens. What did I do wrong?

Here's the script...
Spoiler:

Be warned, it's quite long.

EDIT:: Nevermind, I somehow managed to make it work.
 
Last edited:
Alright, everybody. I made a pretty big script that is supposed to define a random thing to talk about, and then talk about it. When I put the script on A-Map, and then talk to the person in the emulator, nothing happens. What did I do wrong?

Here's the script...
Spoiler:

Be warned, it's quite long.

Nowhere in the script did you use "lock" or "faceplayer"
 
Status
Not open for further replies.
Back
Top