• 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.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.
Game:Fire Red
Type:Gba
Editor:pokescript
Script: movement script (sound)

Spoiler:

Screenshots and/or Videos:

Basicly what im trying to do is get Gary to walk towards tell me
something and then walk away.
Ive done that fine all works perfectly now i want to add his music 0x13B
whilst he is in motion does anyone know how to do this because i cant find anyone
who can yet
I would be incredibly gratefull for any help

You can split the movements into two different ones and put a song command thing in the middle or you could use fadesong (or w/e its Pokescript equivalent is) and have it fade into his theme as he's walking.
 
Might want to explain the problem first.

Alright, so I made a level script;
Code:
#org @start
lockall
textcolor 0x0
applymovement MOVE_PLAYER @move1
msgbox @string1 MSG_NORMAL '"You're here to help me with my\nre..."
setflag 0x202
setvar 0x4055 0x2
end
 
 
'---------
' Strings
'---------
#org @string1
= You're here to help me with my\nresearch, right?\pOn the table there are three\nspecial POKéMON from KANTO.\pPick one!
 
 
'-----------
' Movements
'-----------
#org @move1
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
But, uhm, when I go into the map, the shop menu comes up instead. o_O

Okay, first can you please alsoshow us the #raws at the beginning of the script.

Also, you need a waitmovement 0x0 under the applymovement.
 
I kinda need help!
Spoiler:


Pokemon Ruby hacking im working on
and i put in a trainer with Elite four Sidney as the trainer but
when i battle him
he sends out the first pokemon i set for him properly but when he sends out another its a level 80 sandslash
and i cant change it why is that?
 
Oops, yeah, sorry about that. This, right?

Code:
'---------------
#org 0x721578
#raw 0x2
#raw pointer 0x871AF7A
#raw 0x0

'---------------
#org 0x71AF7A
#raw word 0x4055
#raw word 0x1
#raw pointer 0x8721589
#raw word 0x1

'---------------
#org 0x721589
lockall
textcolor 0x0
applymovement MOVE_PLAYER 0x872161A
msgbox 0x87215A5 MSG_NORMAL '"You're here to help me with my\nre..."
setflag 0x202
setvar 0x4055 0x2
end


'---------
' Strings
'---------
#org 0x7215A5
= You're here to help me with my\nresearch, right?\pOn the table there are three\nspecial POKéMON from KANTO.\pPick one!


'-----------
' Movements
'-----------
#org 0x72161A
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
 
Oops, yeah, sorry about that. This, right?

Code:
'---------------
#org 0x721578
#raw 0x2
#raw pointer 0x871AF7A
#raw 0x0
 
'---------------
#org 0x71AF7A
#raw word 0x4055
#raw word 0x1
#raw pointer 0x8721589
#raw word [B]0x0[/B]
 
'---------------
#org 0x721589
lockall
textcolor 0x0
applymovement MOVE_PLAYER 0x872161A
msgbox 0x87215A5 MSG_NORMAL '"You're here to help me with my\nre..."
setflag 0x202
setvar 0x4055 0x2
end
 
 
'---------
' Strings
'---------
#org 0x7215A5
= You're here to help me with my\nresearch, right?\pOn the table there are three\nspecial POKéMON from KANTO.\pPick one!
 
 
'-----------
' Movements
'-----------
#org 0x72161A
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements


Fixes in bold. That #raw word 0x0 should always be 0x0 because it acts as an "end" command for the level script header. If it's not #raw word 0x0, it does stupid things like item givings. It'd be cool if you could make it give a rare candy.
 
I kinda need help!
he sends out the first pokemon i set for him properly but when he sends out another its a level 80 sandslash
and i cant change it why is that?
Did you re-check it with A-Trainer?
You might not have saved it properly.
 
how to a make a script (preferably with PKSV) where the pesron event is deleted after you use it once

You add this:

Code:
hidesprite 0xZ
setflag 0xY

Z is the event number of the person.
Y is an unused flag.

After that, in A-Map, put the person event's Person ID as Y and the person event should be gone after the script.



Now for my own question.

Code:
#dynamic 0x720000

'---------------
#org @start
checkflag 0x204
if 0x1 goto @snippet1
textcolor 0x0
msgbox @string1 MSG_NORMAL '"Hey! [player]!"
showsprite 0x9
playsong 0x13B 0x0
applymovement MOVE_PLAYER @move1
applymovement 0x9 @move2
waitmovement 0x0
compare 0x4000 0x1
if 0x1 goto @snippet2
compare 0x4000 0x2
if 0x1 goto @snippet3
compare 0x4000 0x3
if 0x1 goto @snippet4
release
end

'---------------
#org @snippet1
release
end

'---------------
#org @snippet2
trainerbattle 0x1 0x149 0x0 @string2 @string3 @snippet5
end

'---------------
#org @snippet3
trainerbattle 0x1 0x14A 0x0 @string2 @string3 @snippet5
end

'---------------
#org @snippet4
trainerbattle 0x1 0x14B 0x0 @string2 @string3 @snippet5
end

'---------------
#org @snippet5
msgbox @string4 MSG_NORMAL '"You're quite a POKéMON TRAINER,\n[..."
additem 0x153 0x1
loadpointer 0x0 @string5 '" BLACK FR You got the HM01!"
giveitem2 0x153 0x1 0x105
msgbox @string6 MSG_NORMAL '"Before I go, watch out for a chick..."
applymovement 0x9 @move3
waitmovement 0x0
hidesprite 0x9
release
end


'---------
' Strings
'---------
#org @string1
= Hey! [player]!

#org @string2
= It's me, [player]!\pI'm helping PROF. SPRUCE with his\nresearch as well!\pYou're taking on FOREGROVE CITY\nPOKéMON GYM, right?\pWell, let me test your ability!

#org @string3
= Whoa! Blown away!

#org @string4
= You're quite a POKéMON TRAINER,\n[player]!\pYou'll do great if you're going to\ndo the GYM LEADER challenge!\pYou can be my rival!\pOh, almost forgot, PROF. SPRUCE\ntold me to give you this.\pIt's a HM, or HIDDEN MACHINE, for\nCUT!

#org @string5
=  BLACK FR You got the HM01!

#org @string6
= Before I go, watch out for a chick\nnamed LISA.\pShe's also helping PROF. SPRUCE\nwith his research.\pYou can't miss her, she's got a\nhuge white hat and matching bag.\pAnyway, I should be going now!\nCatch you later!


'-----------
' Movements
'-----------
#org @move1
#raw 0x0 'Face Down
#raw 0xFE 'End of Movements

#org @move2
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements

#org @move3
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements

I have this script written and everything, but when I try to run it, it just skips past the compare vars. I definitely set 0x4000 when you get your first Pokemon. Depending on the one you get, it'll set to something different, but it seems to have not set at all. =| 'tis strange.

How do you check what is set as a var?
 
Last edited:
Now for my own question.

Spoiler:

I have this script written and everything, but when I try to run it, it just skips past the compare vars. I definitely set 0x4000 when you get your first Pokemon. Depending on the one you get, it'll set to something different, but it seems to have not set at all. =| 'tis strange.

How do you check what is set as a var?

Maybe you should consider using a different variable for that purpose. Don't forget the game uses 0x4000 (among others) as a temporary one. Also, avoid using such low flags.
If you want to check the variable's value you can use a buffernumber command.
 
About the flags, I got a little lazy, bad habit. D= Every time I use one, I say to myself "I'll go to high NEXT time"

And yeah, that's probably the problem. Checking the var, it's at 40. @_@

What variables would you advise?

...although, if I'm really lazy, I can just use three different flags. xD
 
About the flags, I got a little lazy, bad habit. D= Every time I use one, I say to myself "I'll go to high NEXT time"

And yeah, that's probably the problem. Checking the var, it's at 40. @_@

What variables would you advise?

...although, if I'm really lazy, I can just use three different flags. xD

You could use variable 0x8000, for example.
 
Alright, I have a question, In XSE do we right the values as HEX or DEC
 
Game: Sapphire
Type: Script Error
Editor: Advance Map and Pokemon Script Editor
Script: This script was directly copied from thethethethe's scripting tutorial, and it's meant to give me a charmander. However, whenever I try to configure it I get an error that reads:
Initialized.
#ORG
-> 0x0
CHECKFLAG
-> 0x828
IF
Unknown value in IF (Value must be integer)

I really don't know what I have to do to make it work.

Spoiler:


Also for some reason, when I save the file anyway and restart the rom, it won't load on the VBA and I have to delete it and put a new one in.
If it's helpful, I'm trying to edit the man in LITTLEROOT that talks to you about computers to give you a pokemon.

Thanks so much for the help!
 
Hello everyone I have a problem with a script. When you start the game you are found in a certain map of mine which has a script in the map scripts section in a-map. The script type is 02 validates values etc. As flag I put 5004. The script is :

#org 0x800C6D
lockall
hidesprite 0xFF
special 0x113
applymovement MOVE_CAMERA 0x8800EBB
waitmovement 0x0
msgbox 0x8800C91 MSG_NORMAL '"TEACHER: ...\pAs you know this was..."
releaseall
warpmuted 0x4 0x1 0xFF 0x9 0x6
end


'---------
' Strings
'---------
#org 0x800C91
= TEACHER: ...\pAs you know this was the last lesso\nbefore you graduate from\lhigh school so be proud!\pAs [rival] already knows, I am\nProfessor's GERSON's best friend!\pSo I will make a gift to one of you!\pThe one that answers the next question\ncan choose one of\lthe Professor's POKeMON!\p[rival]: Hey, that's not fair...\n... Oh ok.\pTEACHER: NIDORAN is a male only\nTrue or false?\p[rival]: Definitely true!\p[player]: Of course it's false!\pWell done [player]!!!\nYou're right!\pI am going to talk to the Professor\nfor your achievement!\pAnyway, class dismissed!\pHave a nice adventure kids!


'-----------
' Movements
'-----------
#org 0x800EBB
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements

My problem is that I DON'T WANT my player to be shown, but it is and it disappears AFTER the camera is moved... Any suggestions?
 
Hello everyone I have a problem with a script. When you start the game you are found in a certain map of mine which has a script in the map scripts section in a-map. The script type is 02 validates values etc. As flag I put 5004. The script is :

Spoiler:


My problem is that I DON'T WANT my player to be shown, but it is and it disappears AFTER the camera is moved... Any suggestions?

Well, why didn't you use the camera unlocking special too (0x114)? Also, please read the rules.
 
Because I don't need move in the map! I don't use the same map again in the game! Am I doing something wrong with the hidesprite command?
 
Well I tried it but unfortunately it doesn't work! The sprite of my player is shown and after the camera is moved it disappears. I want it to remain hidden in the whole event! Thank you in advance!
 
can someone help me.

In this script the sprite of a person should pop up the «!» box and the the hero should do it too. but the game freezes when i step on the script tile!!

the script is...

#org $ret
applymovement 0x02 $ret2
pausemove 0x0
applymovement 0xFF
pausemove 0x0
boxset 6
release
end

#org $ret2
$ret2 1 = #raw 0x63 0xFE

#org $ret3
$ret3 1 = #raw 0x65 0xFE
 
can someone help me.

In this script the sprite of a person should pop up the «!» box and the the hero should do it too. but the game freezes when i step on the script tile!!

the script is...
Spoiler:

Set the script Unknown value to 0003 and the Var Number to 4050, that's what is causing the freezing.

Your script has some issues too though, #raw 0x62 is the ! symbol I believe and you have missed off the pointer on the second apply movement.
 
Status
Not open for further replies.
Back
Top