• 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.
#org $start
checkflag 0x82F
if b_true goto $done
setflag 0x82F
applymovement 0x1 $come
pausemove 0
playsound 0x12E
nop
message $1
$1 1 =Good morning honey \nand Happy Birthday!
boxset 6
message $2
$2 1 =oh how they grow up so fast!\nHere is your Birthday present!
boxset 6
nop
fanfare 0x13E
message $3
$3 1 =\v\h01 received Running shoes!
boxset 6
waitfanfaire
message $4
$4 1 =\v\h01 put on the shoes
boxset 6
message $5
$5 1 =Me and your dad have \ndecided that you are \lnow old enough to have \pyour own pokemon.
boxset 6
message $6
$6 1 =So your dad \ncaught you a pokemon yesterday.
boxset 6
message $7
$7 1 =\pUnfortantley your Dad couldn't \nmake it home because \lhe is busy at the lab
boxset 6
$8 1 =\pso if you want the \npokemon go to your father's lab
boxset 6
nop
fadesound 0x12c
applymovement 0x1 $going
pausemove 0
release
end
#org $done
release
end
#org $come
#raw 0x13
#raw 0x13
#raw 0x01
#raw 0xFE
#org $come
$come 1 ; #binary 0x13 0x13 0x01 0xFE
#org $going
#raw 0x12
#raw 0x12
#raw 0xFE
#org $going
$going 1 ; #binary 0x12 0x12 0xFE

could someone help me? For some reason the script stop halfway though

could someone plz look at this script i posted ealier
 
#org $start
lock
faceplayer
message $1
boxset 5
if b_false goto $no
#raw 0x68
fadescreen 0x1
fanfare 0x100
special 0x0
waitfanfare
fadescreen 0x0
message $2
boxset 6
release
end

#org $no
message $3
boxset 6
release
end

#org $3
$3 1 =Ok, well come back if you are ever\ntired and in need of a heal!

#org $2
$2 1 =You and your pokemon have been\nfully healed. Come see me if your\ljourney makes you tired again.

#org $1
$1 1 =Hello, I am the Nurse Joy who runs\nthis clinic. You and your pokemon\llook tired. Would you like to rest\lfor a little bit?


whats wrong with it? When you say yes, she says what she should onyl say when you say "no" and when you says the right thing.
 
#org $start
lock
faceplayer
message $1
boxset 5
if b_false goto $no
#raw 0x68
fadescreen 0x1
fanfare 0x100
special 0x0
waitfanfare
fadescreen 0x0
message $2
boxset 6
release
end

#org $no
message $3
boxset 6
release
end

#org $3
$3 1 =Ok, well come back if you are ever\ntired and in need of a heal!

#org $2
$2 1 =You and your pokemon have been\nfully healed. Come see me if your\ljourney makes you tired again.

#org $1
$1 1 =Hello, I am the Nurse Joy who runs\nthis clinic. You and your pokemon\llook tired. Would you like to rest\lfor a little bit?


whats wrong with it? When you say yes, she says what she should onyl say when you say "no" and when you says the right thing.

Code:
#org $start
lock
faceplayer
message $1
boxset 5
[COLOR="Red"]compare lastresult 1[/COLOR]
if b_false goto $no
#raw 0x68
fadescreen 0x1
fanfare 0x100
special 0x0
waitfanfare
fadescreen 0x0
message $2
boxset 6
release
end

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

elow.
been a while.

I have a script here which needs help. :\
Actually, this script here's a part of my script. :)
Code:
...

#org $cont
#raw 75
#raw 15
#raw 01
#raw 0A
#raw 03
cry 0xA1 0x115
pause 0x28
message $g
boxset 5
compare lastresult 1
if b_true goto $grass
#raw 76
#raw 75
#raw 18
#raw 01
#raw 0A
#raw 03
cry 0xA1 0x118
pause 0x28
message $g
boxset 5
compare lastresult 1
if b_true goto $fire
#raw 76
#raw 75
#raw 1B
#raw 01
#raw 0A
#raw 03
cry 0xA1 0x11B
pause 0x28
message $g
boxset 5
compare lastresult 1
if b_true goto $water
#raw 76
goto $cont
release
end

...

This what happens to my script. :\
Spoiler:


Any help would be appreciated.
Thankies and good day~

P.S.
I'll keep trying to fix it as I wait. =3


edit...
so far, I tried fixing it and it turns out that the first pokemon pic which would appear in the script has a pallete error when it shows it to the screen.
you can see it in the screenshot I have posted along with this post.
 
k... I got another question:

Spoiler:
I deleted the text cus I don't wanna give it all away ;)

when compiling in pokescript it says runtime error mismatch 13
 
k... I got another question:

Spoiler:
I deleted the text cus I don't wanna give it all away ;)

when compiling in pokescript it says runtime error mismatch 13

I think it is because of the raws...?
not quite sure but the few scripts I saw with raws don't use raws like that for movements. :\

e.g.

Code:
#org $1
#raw 0x01
#raw 0xFE

the way you used your movements, you seem to be making a binary-like script movement...

Code:
#org $1
$1 1 ; #binary 0x01 0x56 0xFE

not quite sure, for I never used raws before for my movements in scripts. :\
 
you are nearly right ;)
It's written allright, but there are to many of them.
you could write
#raw 0x10 0x10 0x10 0x10
#raw 0x10 0x10 0xFE

instad of
#raw 0x10 0x10 0x10 0x10 0x10 0x10 0xFE

cause if the code it too long, pokescript doesn't compile it and displays this error message.

edit: the safest way is the one Time wrote:
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE
 
hmm, several scripts with a bunch of Raws like that worked fine for movements :p but thanks! I will try that... I was suspecting that may be the problem but i didn't know how to fix it... I'll try it in a few minutes!








EDIT::: So I put in the script... now I got kinda a weird question.


So, in order to make the guy hidden, I set his person ID to 0252. That does not hide him. So, I made a script right before you enter the door that setflag 0x252. This makes him disappear.

But... my next script, the previous one that was helped with, CLEARS FLAG 0x252 for a reason :/ it was supposed to make him reappear. This has worked for several other things for me. But now, he disappears, and he stays disappeared. He does not reappear when you clear the flag. Why?

EDIT::: oh... I was also just thinking... ugg I sound so dumb... but, what if I want the sprite to not show up, until you activate a certain script? And then, you want it to move up to a certain spot, stay there until another script is activate, then disappear and stay gone??

Because... For him to go up and stay there, you have to have a certain person ID, but then to move him again adn disappear and stay disappeared you need ANOTHER person ID...

is it possible?
 
Last edited:
#org $start
checkflag 0x82F
if b_true goto $done
applymovement 0x1 $come
pausemove 0
playsound 0x12E
nop
message $1
$1 1 =Good morning honey \nand Happy Birthday!
boxset 6
message $2
$2 1 =oh how they grow up so fast!\nHere is your Birthday present!
boxset 6
nop
fanfare 0x13E
message $3
$3 1 =\v\h01 received Running shoes!
boxset 6
waitfanfaire
message $4
$4 1 =\v\h01 put on the shoes
boxset 6
message $5
$5 1 =Me and your dad have \ndecided that you are \lnow old enough to have \pyour own pokemon.
boxset 6
message $6
$6 1 =So your dad \ncaught you a pokemon yesterday.
boxset 6
message $7
$7 1 =\pUnfortantley your Dad couldn't \nmake it home because \lhe is busy at the lab
boxset 6
message $8
$8 1 =\pso if you want the \npokemon go to your father's lab
boxset 6
nop
fadesound 0x12c
applymovement 0x1 $going
pausemove 0
setflag 0x82F
release
end

#org $done
release
end

#org $come
#raw 0x13
#raw 0x13
#raw 0x01
#raw 0xFE

#org $come
$come 1 ; #binary 0x13 0x13 0x01 0xFE

#org $going
#raw 0x12
#raw 0x12
#raw 0xFE
#org $going

$going 1 ; #binary 0x12 0x12 0xFE


so i fixed the script a bit and now it still stops halfway and now says that ?????? was put in my item pocket could sombody find out whats wrong?
 
I'm using XSE.

Code:
#dynamic 0xFFFFF

#org @start
lock
faceplayer
givemoney [amount] 999999 
release
end

When I try to compile it, it says:
"Error13 'Type mismatch' on line 7.
Missing #define or parameter.

Line: givemoney [amount] 999999"

Why won't it work? I know almost nothing about scripting.
 
I'm using XSE.

Code:
#dynamic 0xFFFFF

#org @start
lock
faceplayer
givemoney [amount] 999999 
release
end

When I try to compile it, it says:
"Error13 'Type mismatch' on line 7.
Missing #define or parameter.

Line: givemoney [amount] 999999"

Why won't it work? I know almost nothing about scripting.

Well, the problem is, that the [amount] thing in the Command Help section, is just telling you what to put there, instead of that line saying
Code:
givemoney [amount] 999999
try
Code:
givemoney 999999 0x0

that last 0x0 on the end, I dont know what it does, I have never done a givemoney script, but the command calls for another byte, so there one is...

tell me if it works or not.

also, dont try compiling to "fffff" because it isnt an offset, I suggest starting at 800000 for your dynamic offset, if you want a more space saving choice, try 7d0000 for a dynamic offset.
 
ok this is my problem
1) i write a script
2) i place it at the warp so it activates once u enter the house
3) when i walk in the script doesnt do anything
4) when i walk off of it and bak on then it works
Can i make it so that when u walk in it works right away instead of having u walk somewhere else then bak?
 
Well, the problem is, that the [amount] thing in the Command Help section, is just telling you what to put there, instead of that line saying
Code:
givemoney [amount] 999999
try
Code:
givemoney 999999 0x0

that last 0x0 on the end, I dont know what it does, I have never done a givemoney script, but the command calls for another byte, so there one is...

tell me if it works or not.

also, dont try compiling to "fffff" because it isnt an offset, I suggest starting at 800000 for your dynamic offset, if you want a more space saving choice, try 7d0000 for a dynamic offset.

Thank you, it worked very well.
 
#org $start
checkflag 0x82F
if b_true goto $done
applymovement 0x1 $come
pausemove 0
playsound 0x12E
nop
message $1
$1 1 =Good morning honey \nand Happy Birthday!
boxset 6
message $2
$2 1 =oh how they grow up so fast!\nHere is your Birthday present!
boxset 6
nop
fanfare 0x13E
message $3
$3 1 =\v\h01 received Running shoes!
boxset 6
waitfanfaire
message $4
$4 1 =\v\h01 put on the shoes
boxset 6
message $5
$5 1 =Me and your dad have \ndecided that you are \lnow old enough to have \pyour own pokemon.
boxset 6
message $6
$6 1 =So your dad \ncaught you a pokemon yesterday.
boxset 6
message $7
$7 1 =\pUnfortantley your Dad couldn't \nmake it home because \lhe is busy at the lab
boxset 6
message $8
$8 1 =\pso if you want the \npokemon go to your father's lab
boxset 6
nop
fadesound 0x12c
applymovement 0x1 $going
pausemove 0
setflag 0x82F
release
end

#org $done
release
end

#org $come
#raw 0x13
#raw 0x13
#raw 0x01
#raw 0xFE

#org $come
$come 1 ; #binary 0x13 0x13 0x01 0xFE

#org $going
#raw 0x12
#raw 0x12
#raw 0xFE
#org $going

$going 1 ; #binary 0x12 0x12 0xFE


so i fixed the script a bit and now it still stops halfway and now says that ?????? was put in my item pocket could sombody find out whats wrong?

ive posted this script 3 times are you just ignoring me? Can anyone find out whats wrong with this script i need it to work for my hack
 
dunno if I can help...
I don't know how to use fademusic/fadesound yet. :\

Code:
#org $start
checkflag 0x82F
if b_true goto $done
applymovement 0x1 $come
pausemove 0
playsound 0x12E
nop
[color="red"]nop[/color]
message $1
$1 1 = Good morning honey \nand Happy Birthday!
boxset 6
message $2
$2 1 = oh how they grow up so fast!\nHere is your Birthday present!
boxset 6
fanfare 0x13E
message $3
$3 1 = \v\h01 received Running shoes!
boxset 6
waitfanfaire
message $4
$4 1 = \v\h01 put on the shoes
boxset 6
message $5
boxset 6
fadesound 0x12c
applymovement 0x1 $going
pausemove 0
setflag 0x82F
release
end

#org $done
release
end

#org $come
#raw 0x13
#raw 0x13
#raw 0x01
#raw 0xFE

#org $come
$come 1 ; #binary 0x13 0x13 0x01 0xFE

#org $going
#raw 0x12
#raw 0x12
#raw 0xFE

#org $going
$going 1 ; #binary 0x12 0x12 0xFE

#org $5
$5 1 = Me and your dad have \ndecided that you are \lnow old enough to have \pyour own pokemon.\pSo your dad \ncaught you a pokemon yesterday.\pUnfortantley your Dad couldn't \nmake it home because \lhe is busy at the lab\pso if you want the \npokemon go to your father's lab
 
this one dosn't work very well the text is really weird with weird symbols

#org $start
lock
faceplayer
checkflag 0x828
message $1
$1 1 =Ah \v\h01\ I guess your \nhere to get your \lBirthday Present.
boxset 6
message $2
$2 1=Here take your Birthday Present!
boxset 6
givepokemon 115 5 0
fanfare 0x13E
message $4
$3 1 =\v\h01\ received a Chimchar!
boxset 4
waitfanfare
#raw 0x68
setflag 0x828
message $4
$4 1 =\v\h01\ Would you like to rename Chimchar?
boxset 5
compare LASTRESULT 0x1
if b_true gosub $name
message $5
$5 1 =Now that you have your \nown pokemon you must \llook after it \pwith love and care.
boxset 6
message $6
$6 1=If you do treat this Chimchar \nwith love and care \lI might let you \ptravel the region.
boxset 6
message $7
$7 1=But before you go I \nhave something to tell you.
boxset 6
message $8
$8 1=I Will be leaving tomorrow to \ntravel the Region so that \lI may continue my research.
boxset 6
message $9
$9 1=While I am gone my assistant \nwill take care of the lab.
boxset 6
setweather 0x3
#raw 0x00
doweather
message $10
$10 1=It looks like it started \nraining you better \lgo home to keep dry
boxset 6
warp 0x4 0x1 0xFF
#raw 0x02 0x00 0x06 0x00
end

#org $name
call 0x1A74EB
return

if someone can get this script to work I would be really appericte it
 
Last edited:
ok this is my problem
1) i write a script
2) i place it at the warp so it activates once u enter the house
3) when i walk in the script doesnt do anything
4) when i walk off of it and bak on then it works
Can i make it so that when u walk in it works right away instead of having u walk somewhere else then bak?
a script on a warp only activates after stepping on it a second time. U have to make it a levelscript, look at cooleys thread in the tutorial section: Move camera script and Extra
The extra is the explanation on how to make levelscripts.
 
a script on a warp only activates after stepping on it a second time. U have to make it a levelscript, look at cooleys thread in the tutorial section: Move camera script and Extra
The extra is the explanation on how to make levelscripts.

Ah ty
i found the tut now all im hopin for is that it works
 
Ok, I made a script, but when I compile it, half of it disappears.
Is it my bad, or is it XSE's problem?

Here's the script, if you need it.
Code:
#dynamic 0x7266CC

#org 0x7266CC
checkflag 0x829
if 0x0 goto @end
message @moveit
boxset 6
playsong 0x112 0x0
applymovement 0xFF @wha
applymovement 0x3 @run
waitmovement 0x0
trainerbattle 0x1 0x1 0x0 @getoutoftheway @after @later
end

#org @later
message @damn
boxset 6
fadescreen 0x1
hidesprite 0x3
setflag 0x200
fadescreen 0x0
fadedefault
applymovement 0x4 @aide
waitmovement 0x0
message @this
boxset 6
message @gotdex
fanfare 0x13E
boxset 6
setflag 0x829
message @bye
boxset 6
applymovement 0x4 @aideback
waitmovement 0x0
hdiesprite 0x4
setflag 0x202
end

#org @end
release
end

#org @moveit
= Move it!

#org @wha
#raw 0x53
#raw 0x00
#raw 0xFE

#org @run
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @aide
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @aideback
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

#org @getoutoftheway
= ???: Get out of my way!\pWhat? But I haven't done anything\nwrong!\pAIDE: Stop that man, v\h01!\nHe stole something!\p???: Ah, damn it!\nI didn't want it to come to this[.]

#org @after
= What in the? \nHow'd I lose?

#org @damn
= Fine, take this useless red box\nthen!\p[green_fr]You received a strange red box!\p[black_fr]I'm going. Don't follow.

#org @this
= Great job v\h01!\nI watched the battler from here!\pAnyway, that thing there is a\nPokedex! It records data on Pokemon\ponce you've caught them! You're\nbecoming a trainer, right?\pI'll give this one to you so you\ncan help us get information on the\pdifferent Pokemon in Rolok!

#org @gotdex
= [green_fr]You got the Pokedex!

#org @bye
= See you later, v\h01! \nI'm going back to the lab!
But it becomes
Code:
'-----------------------
#org 0x7266CC
checkflag 0xF
hidesprite2 0x7268 0x8 0x9
if 0x97 goto 0x8035301
setflag 0x200
fadescreen 0x0
fadedefault
applymovement 0x4 0x872676C
waitmovement 0x0
msgbox 0x87268CB '"Great job [player]!\nI watched the ..."
callstd 0x6
msgbox 0x87269E3 '"[green_fr]You got the Pokedex!"
fanfare 0x13E
callstd 0x6
setflag 0x829
msgbox 0x8726A03 '"See you later, [player]. \nI'm goin..."
callstd 0x6
applymovement 0x4 0x8726780
waitmovement 0x0
hidesprite 0x4
setflag 0x202
end

'-----------------------
#org 0x35301
comparefarbytetofarbyte 0x28004008 0x2053D102
setmapfooter 0x59F1


'-----------
' Movements
'-----------
#org 0x72676C
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0x726780
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x7268CB
= Great job [player]!\nI watched the battler from here!\pAnyway, that thing there is a\nPokedex! It records data on Pokemon\ponce you've caught them! You're\nbecoming a trainer, right?\pI'll give this one to you so you\ncan help us get information on the\pdifferent Pokemon in Rolok!

#org 0x7269E3
= [green_fr]You got the Pokedex!

#org 0x726A03
= See you later, [player]. \nI'm going back to the lab!
 
this one dosn't work very well the text is really weird with weird symbols

#org $start
lock
faceplayer
checkflag 0x828
message $1
$1 1 =Ah \v\h01\ I guess your \nhere to get your \lBirthday Present.
boxset 6
message $2
$2 1=Here take your Birthday Present!
boxset 6
givepokemon 115 5 0
fanfare 0x13E
message $4
$3 1 =\v\h01\ received a Chimchar!
boxset 4
waitfanfare
#raw 0x68
setflag 0x828
message $4
$4 1 =\v\h01\ Would you like to rename Chimchar?
boxset 5
compare LASTRESULT 0x1
if b_true gosub $name
message $5
$5 1 =Now that you have your \nown pokemon you must \llook after it \pwith love and care.
boxset 6
message $6
$6 1=If you do treat this Chimchar \nwith love and care \lI might let you \ptravel the region.
boxset 6
message $7
$7 1=But before you go I \nhave something to tell you.
boxset 6
message $8
$8 1=I Will be leaving tomorrow to \ntravel the Region so that \lI may continue my research.
boxset 6
message $9
$9 1=While I am gone my assistant \nwill take care of the lab.
boxset 6
setweather 0x3
#raw 0x00
doweather
message $10
$10 1=It looks like it started \nraining you better \lgo home to keep dry
boxset 6
warp 0x4 0x1 0xFF
#raw 0x02 0x00 0x06 0x00
end

#org $name
call 0x1A74EB
return

if someone can get this script to work I would be really appericte it

I really need the script checked above ive been trying to fix it but nothing helps plz someone help
 
well, your checkflag is missing another line.
if B_true or if B_false
checkflag 0x828
if B_true goto $other

for example.
 
Status
Not open for further replies.
Back
Top