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)

Master_Track August 15th, 2008 2:01 PM

\c\h01\h05 would mean orange, for example
so
\c\h01\h05This text would appeare orange,\c\h01\h02but this would be black again ^^
so just use another colour code before the text u want to have another colour. If you want to make one world in another colour
use the code, the word, then the code for black
\c\h01\h02Just \c\h01\h04like \c\h01\h02this ^^

Austinia August 15th, 2008 3:54 PM

! Thanks! XD I dunno how I was so dumb to not think of that x_X

Trodx August 16th, 2008 10:27 AM

Quote:

'-----------------------
#org 0x165A6B
lock
faceplayer
msgbox 0x826D398 '"The path ahead is very dangerous."
callstd 0x6
checkflag 0x827
if b_true goto 0x826D35D
msgbox 0x826D49E '"I can see it in your eyes.\nYou wou..."
callstd 0x6
release
end

'-----------------------
#org 0x26D35D
msgbox 0x826D3BB '"Is that the badge of Lance\n the dr..."
callstd 0x6
applymovement 0x2 0x826D49A
pause 0x0
release
end


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


'---------
' Strings
'---------
#org 0x26D398
= The path ahead is very dangerous.

#org 0x26D49E
= I can see it in your eyes.\nYou wouldn't last a few minutes\l out there. I can't let you pass.

#org 0x26D3BB
= Is that the badge of Lance\n the dragon master?\lIf you have earned his respect,\lyou are certainly strong enough\l to pass.
The script has no errors but the sprite that I put it on will not show up during game play until the hero walks past it and turns.
I think it might have to do with some of those variables in Amap like unknown and person Id.

xeladude August 16th, 2008 12:01 PM

Excuse me but, is there an item ID for the National Dex. My Hack is like FireRed but new areas and Pokemon. And the starters are from Johto and Hoenn. I need Oak to give you the National Dex after you give him the Parcel, and not a regular dex.

adiktus August 16th, 2008 2:29 PM

Quote:

Originally Posted by Trodx (Post 3862098)
The script has no errors but the sprite that I put it on will not show up during game play until the hero walks past it and turns.
I think it might have to do with some of those variables in Amap like unknown and person Id.

Make sure the person event number is not duplicated in that map, and if you don't want that person to disappear, put 0000 as person ID. If you want him to disappear, put in the flag and make sure the flag is previously unused. If nothing works, try deleting that person and readding him again.

Quote:

Originally Posted by xeladude (Post 3862269)
Excuse me but, is there an item ID for the National Dex. My Hack is like FireRed but new areas and Pokemon. And the starters are from Johto and Hoenn. I need Oak to give you the National Dex after you give him the Parcel, and not a regular dex.

After setting the dex flag, add special 0x16F to make it a National Dex.

Trodx August 16th, 2008 3:16 PM

For the trainerbattle command you require the battle number and a "resevered" word. Can anyone tell me where you find these?

X-aveon August 16th, 2008 3:18 PM

can somebody please help me with my script on page 67?

Master_Track August 16th, 2008 3:28 PM

Quote:

Originally Posted by Trodx (Post 3862766)
For the trainerbattle command you require the battle number and a "resevered" word. Can anyone tell me where you find these?

xD
Open up PET and choose a trainer to edit, then use the number of this trainer in hex (they r already displayed in hex).
And then you have to use the number REVERSED ^^
so
trainerbattle 0x0 0x0A 0x00 @before @after
msgbox @beaten
callstd 0x6
release
end

would be a normal trainerbattle against trainer number 000A ^^
in case u don't know how to reverse:

000A-->[00][0A]-->[0A][00]-->0A00-->0x0A 0x00

@X-Aveon: if you meant the one I fixed for you: You want to make a message if you loose, but if you loose..you faint and are warped to the pokemon center. There's no message for after loosing ^^

X-aveon August 16th, 2008 3:46 PM

Quote:

Originally Posted by Master_Track (Post 3862792)
xD

@X-Aveon: if you meant the one I fixed for you: You want to make a message if you loose, but if you loose..you faint and are warped to the pokemon center. There's no message for after loosing ^^

Oh. ok. i get it now. but after you bet them. it still doesn't do the movements.
can you please help me? thnx in advanced.

xD.

Master_Track August 16th, 2008 3:57 PM

Code:

#dynamic 0x1C5A03

#org @start
lock
faceplayer
checkflag 0x828
if B_true goto @done
msgbox @notime
boxset 0x6
release
end

#org @done
trainerbattle 0x1 0x5F 0x01 @before @after @later
end

#org @later
lock
applymovement 0x1 @move
waitmovement 0x0
hidesprite 0x1
release
end

#ORG @move
#raw 0x62 0x30 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0xFE

#org @before
= Do you have a\nproblem?\pLets fight!

#org @after
= Dang, you're strong!

#org @notime
= I don't have\ntime for you.


it should work like this, if there's still a problem: report.

Chimchar 9 August 16th, 2008 3:59 PM

hey nobody looked at my script so im going to post it again

so here it is:

#org 0x8000A3
checkflag 0x828
if 0x0 goto 0x88000B7
if 0x1 goto 0x88000B4
end

#org 0x8000B7
lock
msgbox 0x88000CD '"oh i forgot i need a pokemon \nfrom..."
callstd 0x6
applymovement MOVE_PLAYER 0x880011A
waitmovement 0x0
release
end

#org 0x8000B4
release
end

#org 0x80011A
#raw 3 'Face Right

#org 0x8000CD
= oh i forgot i need a pokemon \nfrom proffeser elm i better \ngo and get one.

im just a starter at scripting please correct it

and the problem is i want it to push you right untill you get your pokemon but it freezes for some odd reason

adiktus August 16th, 2008 4:10 PM

Quote:

Originally Posted by riolu 9 (Post 3862873)
hey nobody looked at my script so im going to post it again

so here it is:

#org 0x8000A3
checkflag 0x828
if 0x0 goto 0x88000B7
if 0x1 goto 0x88000B4
end

#org 0x8000B7
lock
msgbox 0x88000CD '"oh i forgot i need a pokemon \nfrom..."
callstd 0x6
applymovement MOVE_PLAYER 0x880011A
waitmovement 0x0
release
end

#org 0x8000B4
release
end

#org 0x80011A
#raw 3 'Face Right

#org 0x8000CD
= oh i forgot i need a pokemon \nfrom proffeser elm i better \ngo and get one.

im just a starter at scripting please correct it

and the problem is i want it to push you right untill you get your pokemon but it freezes for some odd reason

It's supposed to be a script tile. change the first unknown to 0003 and the variable to 4050 (assuming you haven't used 4050 yet). And in a script tile, lock isn't really necessary.. Instead, use lockall (though I have never seen lockall work XD)

But.. I'm gonna point out some things in the script itself...

Code:

#org 0x8000A3
checkflag 0x828
if 0x0 goto 0x88000B7
if 0x1 goto 0x88000B4 you can delete the underlined part.. or better yet, delete this whole line and the one it points to (it's just a release, which is not needed, and an end which can also be found here)
end


and the fact that.. it's supposed to stop you from continuing without pokemon.. Dunno why, but why make the player face right instead of move right?

Chimchar 9 August 16th, 2008 4:15 PM

Quote:

Originally Posted by adiktus (Post 3862902)
It's supposed to be a script tile. change the first unknown to 0003 and the variable to 4050 (assuming you haven't used 4050 yet). And in a script tile, lock isn't really necessary.. Instead, use lockall (though I have never seen lockall work XD)

But.. I'm gonna point out some things in the script itself...

Code:

#org 0x8000A3
checkflag 0x828
if 0x0 goto 0x88000B7
if 0x1 goto 0x88000B4 you can delete the underlined part.. or better yet, delete this whole line and the one it points to (it's just a release, which is not needed, and an end which can also be found here)
end


and the fact that.. it's supposed to stop you from continuing without pokemon.. Dunno why, but why make the player face right instead of move right?

thanks but what do you mean by unknown

Ninja Caterpie August 16th, 2008 4:40 PM

On the script tile on the map, on the right there will be Unknown. And some other stuff.

KhaosKnight August 16th, 2008 4:52 PM

Quote:

Originally Posted by riolu 9 (Post 3862910)
thanks but what do you mean by unknown

Check it, courtesy of THEx4



you can use 4050 or 5040 they both work.

adiktus August 16th, 2008 5:24 PM

In the older versions of advance map, there are two textboxes for unknown, var number, and var value. In 1.90 above, there's one for each.

For the older versions, numbers are entered into the two textboxes in reverse. So 4050 is entered as 50 40, 0003 as 03 00.. so on.. 4050 and 40 50 are essentially different variables, but both may work in the beginning of a game (for the same value, which is 0000).

For the var number you may enter any variable you like, provided you know if it is used, it's current value, and when it will be changed.

Chimchar 9 August 17th, 2008 9:21 AM

yeah the script works now but when i move right it freezes why is that?

Shadows August 17th, 2008 7:02 PM

when I compile this script(In Odale Town, Ruby)
It just uses Brendan/Mays Movement Script.

Spoiler:
#Dynamic 0x6B2198

#org @start
checkflag 0x807
if 0x0 goto @hey!
if 0x1 goto @end
end

#org @hey!
lock
msgbox @icant
boxset 0x6
applymovement 0x85 @back
waitmovement 0x0
release
end

#org @icant
= You want to goto the Earth Gym?\pOh, go right ahead!.

#org @back
#raw 0x10 0x10 0xFE

#org @end
hidesprite 0x4
release
end

Whats wrong with it?(Note: this is my first applymovement script)

KhaosKnight August 17th, 2008 7:17 PM

you have 85 people on one map? if you are trying to get the hero to move then the value should be FF. And i think the hidesprite commands only work best when used in level scripts.

but then again i am not sure what the problem is.

Shadows August 17th, 2008 7:30 PM

Quote:

Originally Posted by KhaosKnight (Post 3865858)
you have 85 people on one map? if you are trying to get the hero to move then the value should be FF. And i think the hidesprite commands only work best when used in level scripts.

but then again i am not sure what the problem is.

Oops...
(the # was suppose to be 8)
But that wasn't the problem anyways.
I fixed it though.

<~F.M.P~> August 17th, 2008 9:02 PM

This is hard!
 
Help please I'm trying to get a special command to work and everytime I walk over it nothing happens! Im sure it's alot of the script is wrong, but I've just started after all. the players supposed to stop and the gronuds supposed to shake(earthquake)

Code:

#org $start
lock
faceplayer
checkflag 0x200
special 0x164
if b_true goto $done
setflag 0x200
release
end

#org $done
clearflag ox200
release
end



0m3GA ARS3NAL August 20th, 2008 11:47 PM

Quote:

Originally Posted by Floating monkey pirate (Post 3865968)
Help please I'm trying to get a special command to work and everytime I walk over it nothing happens! Im sure it's alot of the script is wrong, but I've just started after all. the players supposed to stop and the gronuds supposed to shake(earthquake)

Code:

#org $start
lock
faceplayer
checkflag 0x200
special 0x164
if b_true goto $done
setflag 0x200
release
end

#org $done
clearflag ox200
release
end



Ok, first, you should use XSE, if you can, it is better, trust me. and it is easy to transit between Pokescript and XSE, there isn't much of a difference.

Ok, I have a few variations of your script here...

1: The ground will only shake one time. (You can step on the tile one time, and it will shake, but if you step on it again, it wont shake.)
Code:

#org $start
lock
faceplayer
checkflag 0x200
if b_true goto $done
special 0x164
setflag 0x200
release
end

#org $done
release
end


2:Every time you step on the tile, the ground shakes
Code:

#org $start
lock
faceplayer
special 0x164
release
end


3: Every OTHER time you step on the tile, the ground shakes

Code:

#org $start
lock
faceplayer
checkflag 0x200
if b_true goto $done
special 0x164
setflag 0x200
release
end

#org $done
clearflag 0x200
release
end


---------------
In case you decide to make the all important switch to XSE, here are the XSE versions of all of the previous scripts. (In spoiler Tags to save room)

1.
Spoiler:
Code:

#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x200
if b_true goto @done
special 0x164
setflag 0x200
release
end

#org @done
release
end




2
Spoiler:
Code:

#dynamic 0x800000

#org @start
lock
faceplayer
special 0x164
release
end




3
Spoiler:
Code:

#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x200
if b_true goto @done
special 0x164
setflag 0x200
release
end

#org @done
clearflag 0x200
release
end




Also, one last thing. Whether you are using XSE or Pokescript, be sure, in advcance map, to select the script event you are using, and change the "Var Number" to 5040, and teh "Unkown" above it to 0300. If you dont, your script will not work. If this doesn't help, PM me, if it does, Gimme Karma!!! (that set of scales up in right hand corner of this post.)

Pikachu™ August 21st, 2008 2:31 AM

#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

Shadows August 21st, 2008 10:22 AM

Whats wrong with this script?
When I talk to the man, it does everything right up until I choose yes/no.
Spoiler:
'-----------------------
#dynamic 0x71ECcc


#org @start
msgbox @yesno
boxset 0x5
if 0x1 goto @yes
if 0x0 goto @no
end

#org @yesno
= Water...\nI need Water...\pWould you like to give him water?

#org @yes
fadescreen 0x0
waitfanfare
fanfare 0x100
message @water
end

#org @water
= Thank you!\nTake these masterb\pZzz...
#org @no
message @nowater
end

#org @nowater
= Please...\n I need water!

Master_Track August 21st, 2008 10:57 AM

u forgot the compare line
compare lastresult 0x1

or

compare 0x800D 0x1

it's the same. It should work fine then.
but u should also add lock and faceplayer.

and if u choose yes: u can't use first waitfanfare and then fanfare. use fanfare, then waitfanfare.


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.