The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   [Archive] Script help thread (https://www.pokecommunity.com/showthread.php?t=120081)

-DarK- September 24th, 2008 8:36 AM

Quote:

Originally Posted by Tamerhaidar (Post 3968301)
I just put the checkflag for no reason. I saw it in another script.
If it doesn't do anything, then delete it.
for your problem,
you put the unknown: 0003
and varnumber: 5040 , right?

Ye right. (About that checkflag, I think I'll keep it anyway....)

Hiche.. September 24th, 2008 8:39 AM

Quote:

Originally Posted by DarkSalamence (Post 3968302)
Ye right. (About that checkflag, I think I'll keep it anyway....)

I don't know the problem really.
If it didn't work try using a different script tile, or recompile the script.
Sorry if this doesnt help.

-DarK- September 24th, 2008 9:22 AM

Quote:

Originally Posted by Tamerhaidar (Post 3968307)
I don't know the problem really.
If it didn't work try using a different script tile, or recompile the script.
Sorry if this doesnt help.

I found it! Here's what was (probably) missing:

Code:

#org @start
checkflag 0x204
if b_true goto @end

lockall
setvar 0x5040 0x0
goto @script
end


By placing that checkflag, the bug stopped. Thanx for your help anyway Tamer, you've done me a big favor. ^^

Hiche.. September 24th, 2008 9:28 AM

Quote:

Originally Posted by DarkSalamence (Post 3968368)
I found it! Here's what was (probably) missing:

Code:

#org @start
checkflag 0x204
if b_true goto @end

lockall
setvar 0x5040 0x0
goto @script
end


By placing that checkflag, the bug stopped. Thanx for your help anyway Tamer, you've done me a big favor. ^^

lol anytime.
I know this command was missing, but I forgot to tell you.
If you want any help, tell me.

Satoshi Sugimori September 26th, 2008 8:31 AM

Heey can someone check this script,, when I try to compile it it says find pointer for $takeit...

Spoiler:
#org $begin
lock
checkflag 0x800
if B_true goto $done
message $wait
$wait 1=Heey \v\h01!\pWait I still have \nyour Pokemon!
boxset 6
applymovement 0xFF $huh
pausemove 0
applymovement 0x1 $goto
pausemove 0
message $takit
$takeit 1=Here take Pikachu \pI went to the \nPKMN Center with him ;)
boxset 6
givepokemon 25 5 0
#raw 0x75 0x52 0x00 0x0A 0x03
message $nice
$nice 1=Have a nice day honey!
boxset 6
#raw 0x76
message $wait2
$wait2 1=Ooh almost forgot I got \nyou an pokedex!\pHere take it!
setflag 0x829
setflag 0x828
special 0x16F
message $gotdex
$gotdex 1=\v\h01 received the PokeDex!
applymovement 0x1 $away
pausemove 0
setflag 0x800
release
end

#org $done
release
end

#org $huh
#raw 0x55 0x63 0xFE

#org $goto
#raw 0x10 0x10 0x10 0x10 0x10 0x10 0x12 0x10 0x12 0x02 0xFE

#org $away
#raw 0x13 0x11 0x13 0x11 0x11 0x11 0x11 0x11 0x11 0x03 0xFE

Binary September 26th, 2008 8:45 AM

I edited in bold. You forgot the 'e' in take it.
Quote:

#org $begin
lock
checkflag 0x800
if B_true goto $done
message $wait
$wait 1=Heey \v\h01!\pWait I still have \nyour Pokemon!
boxset 6
applymovement 0xFF $huh
pausemove 0
applymovement 0x1 $goto
pausemove 0
message $takeit
$takeit 1=Here take Pikachu \pI went to the \nPKMN Center with him ;)
boxset 6
givepokemon 25 5 0
#raw 0x75 0x52 0x00 0x0A 0x03
message $nice
$nice 1=Have a nice day honey!
boxset 6
#raw 0x76
message $wait2
$wait2 1=Ooh almost forgot I got \nyou an pokedex!\pHere take it!
setflag 0x829
setflag 0x828
special 0x16F
message $gotdex
$gotdex 1=\v\h01 received the PokeDex!
applymovement 0x1 $away
pausemove 0
setflag 0x800
release
end

#org $done
release
end

#org $huh
#raw 0x55 0x63 0xFE

#org $goto
#raw 0x10 0x10 0x10 0x10 0x10 0x10 0x12 0x10 0x12 0x02 0xFE

#org $away
#raw 0x13 0x11 0x13 0x11 0x11 0x11 0x11 0x11 0x11 0x03 0xFE

Satoshi Sugimori September 26th, 2008 9:02 AM

Quote:

Originally Posted by cε׀׀ (Post 3973629)
I edited in bold. You forgot the 'e' in take it.

Lolz stupid mistake XD
Thanks ;)

Shadows September 26th, 2008 2:11 PM

This is related to scripting, so I'll post it here.
Whats the fanfare that plays when you are about to go into a pokemon battle with a random trainer?

Thrace September 26th, 2008 3:49 PM

Quote:

Originally Posted by T (Post 3974344)
This is related to scripting, so I'll post it here.
Whats the fanfare that plays when you are about to go into a pokemon battle with a random trainer?

Theres 0x128 to 0x12B, theres more than one. They aren't fanfares though, they're music so you'll have to use playsong.

Zeturic September 26th, 2008 4:53 PM

I'm pretty positive that there is a command that will allow you to change what happens in a script based on if you are standing above, below, or to either side of the person. What is this command, and how do you use it?

I've looked through the guides, and can't find it. But, it seems like I remember reading about it somewhere.

Quote:

Originally Posted by megiddo (Post 3974884)
#raw 68
Compare 0x800C 0x1
If b_true goto $down
Compare 0x800C 0x2
If b_true goto $up
Compare 0x800C 0x3
If b_true goto $left
Compare 0x800C 0x4
If b_true goto $right

Depends on which direction the player is facing. ^_^

Thank you.

Megiddo-san September 26th, 2008 5:13 PM

#raw 68
Compare 0x800C 0x1
If b_true goto $down
Compare 0x800C 0x2
If b_true goto $up
Compare 0x800C 0x3
If b_true goto $left
Compare 0x800C 0x4
If b_true goto $right

Depends on which direction the player is facing. ^_^

Ripper September 26th, 2008 9:44 PM

Could someone check what's wrong with this script... Thanks!

#org $Start
applymovement 0x03 $Move
pausemove 0x0
message $1
boxset 6
applymovement 0x03 $Move2
pausemove 0x0
setflag 0x200
end

#org $1
$1 1 = Text

#org $Move
#raw 0x10 0x02 0x03 0x10 0x10 0x02 0x03 0x10 0x10 0x63 0xFE

#org $Move2
#raw 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0xFE

Megiddo-san September 26th, 2008 9:46 PM

There could be too many movements on one line.

Ripper September 26th, 2008 10:00 PM

So I have to delete some? Or can I just click enter :D

Megiddo-san September 26th, 2008 10:14 PM

A new set like
#raw 0x 0x 0x 0x 0x
#raw 0x 0x 0x 0x 0x 0xFE
underneath would work. So just move some down one.

Ripper September 26th, 2008 10:19 PM

I tried this...

#org $Start
applymovement 0x03 $Move
pausemove 0x0
applymovement 0x03 $Move2
pausemove 0x0
message $1
boxset 6
applymovement 0x03 $Move3
pausemove 0x0
setflag 0x200
end

#org $1
$1 1 = Text

#org $Move
#raw 0x10 0x02 0x03 0x10 0x10 0xFE

#org $Move2
#raw 0x02 0x03 0x10 0x10 0x63 0xFE

#org $Move3
#raw 0x11 0x11 0x11 0x11 0x11 0x11 0xFE

BUt the same thing happens.... Nothing. I walk over the spot normally and no script occurs.

I then tried your method as well but no dice. Still nothing happens :(

Megiddo-san September 26th, 2008 10:22 PM

Check your person on the map's #.

-DarK- September 27th, 2008 1:31 AM

Spoiler:
#dynamic 0x8000C6

#org @start
checkflag 0x200
if b_true goto @end
lockall
setvar 0x4001 0x2
goto @script
end

#org @script
compare 0x4001 0x0
if b_true goto @up
compare 0x4001 0x1
if b_true goto @down0
compare 0x4001 0x2
if b_true goto @down1
end

#org @up
applymovement 0x4 @move0
applymovement 0xFF @movex0
waitmovement 0x0
goto @check
end

#org @down0
applymovement 0x4 @move1
applymovement 0xFF @movex1
waitmovement 0x0
goto @check
end

#org @down1
applymovement 0x4 @move2
applymovement 0xFF @movex2
waitmovement 0x0
goto @check
end

#org @check
checkflag 0x823
if b_false goto @nopass
checkflag 0x823
if b_true goto @pass
end

#org @pass
msgbox @go
boxset 0x6
fadescreen 0x1
setflag 0x200
fadescreen 0x0
releaseall
end

#org @nopass
msgbox @srry
boxset 0x6
applymovement 0xFF @back
waitmovement 0x0
releaseall
end

#org @end
end

#org @move0
#raw 0x01
#raw 0xFE

#org @move1
#raw 0x00
#raw 0xFE

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

#org @movex0
#raw 0x00
#raw 0xFE

#org @movex1
#raw 0x01
#raw 0xFE

#org @movex2
#raw 0x01
#raw 0xFE

#org @back
#raw 0x13
#raw 0xFE

#org @go
= I'm sorry but I can't ....\nOh!!! Those are the first 4 BADGES!\lI'm sorry, go on through.

#org @srry
= I'm sorry, but I can't let you\nthrough unless you have at least 4\lBADGES.


I use this in FireRed. However, the script worked 1x, it won't work again if I step in that script tile (or in one of the other 2 script tiles who got the other 2 setvars). Anyone knows what I'm doing wrong here?

Ripper September 27th, 2008 2:08 AM

Right, two things...

1) What do I add to a Script to prevent it from happening more than once?
2) How do I cause someone to disapear if I haven't talked to them through the use of a script event. I assign them there ID but I'm not sure how to make them actually disapear without having to leave the screen.

Thanks!

-DarK- September 27th, 2008 2:18 AM

Quote:

Originally Posted by Ripper (Post 3975893)
Right, two things...

1) What do I add to a Script to prevent it from happening more than once?
2) How do I cause someone to disapear if I haven't talked to them through the use of a script event. I assign them there ID but I'm not sure how to make them actually disapear without having to leave the screen.

Thanks!

1) Use checkflag / setflag, for instances something like this:

Code:

#org $start
checkflag 0x200
if b_true goto $end
lock
faceplayer ... etc
setflag 0x200
release
end

#org $end
end


2) Use hidesprite and fadescreen. Now for instance, lets combine the prev script with the hide sprite thing:
Code:

#org $start
checkflag 0x200
if b_true goto $end
lock
faceplayer ... etc
fadescreen 1
hidesprite 0xsprite number comes here
setflag 0x200
fadescreen 0

release
end

#org $end
end


Fadescreen 1 fades the screen completly, fadescreen 0 is actually only a flikker. However, when you use fadescreen 1, you must use fadescreen 0 after it so the screen would return to normal, cuz fadescreen 1 on it's own wouldn't un-fade the screen.

Hiche.. September 27th, 2008 3:38 AM

Quote:

Originally Posted by Ripper (Post 3975535)
I tried this...

#org $Start
checkflag 0x200
if b_true goto $done

applymovement 0x03 $Move
pausemove 0
applymovement 0x03 $Move2
pausemove 0
message $1
boxset 6
applymovement 0x03 $Move3
pausemove 0
setflag 0x200
release
end

#org $done
release
end

#org $1
$1 1 = Text

#org $Move
#raw 0x10 0x02 0x03 0x10 0x10 0xFE

#org $Move2
#raw 0x02 0x03 0x10 0x10 0x63 0xFE

#org $Move3
#raw 0x11 0x11 0x11 0x11 0x11 0x11 0xFE

BUt the same thing happens.... Nothing. I walk over the spot normally and no script occurs.

I then tried your method as well but no dice. Still nothing happens :(

You forgot the release command.
I edited somethings in the bold.
Try now.

And DarkSalamnce
#org @end
release
end

And make sure to place your setvar value in varnumber in advance map, which in your case, is 4001.

jin14 September 27th, 2008 4:40 AM

what is the mistake in this script:
#org $der
lock
faceplayer
checkflag 0x200
if b_true goto $fight
trainerbattle 1 0x0A8 $before $after
message $ti sfido!
boxset 0x6
end

#org $fight
message $der
boxset 0x6
nop
nop
setflag 0x1204
release
end

#org $ti sfido!
= Mi chiamo Rino\pe sono un drago\nallenatore\palmeno lo dovrei essere\pdiventerò campione\ndel mondo\pall'attacco!

#org $before
= All'attacco

#org $after
= Noooo....!

#org $der
= la prossima volta...\pvincerò io!

-DarK- September 27th, 2008 4:47 AM

Quote:

Originally Posted by TamerHaidar
And DarkSalamnce
#org @end
release
end

There's more to it than that. The first tile script works correctly (and keeps working after I stepped on it once) The other 2 however, don't, even though they use the same script. Once I stepped on the other 2, the first one stops working too....

Hiche.. September 27th, 2008 4:49 AM

Spoiler:

#org $start
lock
faceplayer
checkflag 0x1204
if b_true goto $fight
trainerbattle 0 0x0A8 $before $after
message $tisfido
boxset 0x6
setflag 0x1204
end

#org $fight
message $der
boxset 0x6
release
end

#org $tisfido
$tisfido 1 = Mi chiamo Rino\pe sono un drago\nallenatore\palmeno lo dovrei essere\pdiventerò campione\ndel mondo\pall'attacco!

#org $before
$before 1 = All'attacco

#org $after
$after 1 = Nooo..!

#org $der
$der 1 = la prossima volta...\pvincerò io!


Try this.
And read thethethethe's tutorial clearly, since you have a lot of mistakes.

DarkSalamance
There maybe a problem with the setvars or varnumber.
Try changing th setvar or the value of it.
Like: setvar 7C40 0x1
Sorry if it didn't help.

-DarK- September 27th, 2008 5:05 AM

Quote:

Originally Posted by Tamerhaidar (Post 3976145)
Spoiler:

#org $start
lock
faceplayer
checkflag 0x1204
if b_true goto $fight
trainerbattle 0 0x0A8 $before $after
message $tisfido
boxset 0x6
setflag 0x1204
end

#org $fight
message $der
boxset 0x6
release
end

#org $tisfido
$tisfido 1 = Mi chiamo Rino\pe sono un drago\nallenatore\palmeno lo dovrei essere\pdiventerò campione\ndel mondo\pall'attacco!

#org $before
$before 1 = All'attacco

#org $after
$after 1 = Nooo..!

#org $der
$der 1 = la prossima volta...\pvincerò io!


Try this.
And read thethethethe's tutorial clearly, since you have a lot of mistakes.

DarkSalamance
There maybe a problem with the setvars or varnumber.
Try changing th setvar or the value of it.
Like: setvar 7C40 0x1
Sorry if it didn't help.

Tried diffirent setvar, still same, tile one works until I step on one of the other 2. Varnumbers are correct, checked them all....


All times are GMT -8. The time now is 2:34 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.