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)

Hiche.. October 2nd, 2008 7:04 AM

Hey,
what is the command that checks the amount of time taken?
Like for example, a guy tells you that you have 10 min to come back, if you come earlier the next event won't happen until 10 min have passed.
Thanks.

0m3GA ARS3NAL October 2nd, 2008 8:13 AM

Quote:

Originally Posted by Tamerhaidar (Post 3994110)
Hey,
what is the command that checks the amount of time taken?
Like for example, a guy tells you that you have 10 min to come back, if you come earlier the next event won't happen until 10 min have passed.
Thanks.

Hmm... I have the one for Emerald version, that is the 24 hour check... but I haven't found a 10 minute one yet... is there one?

Hiche.. October 2nd, 2008 8:15 AM

I am just giving an example. lol
There is a 24 hour one, but what is it for Fire red? the command..
Thanks.

Symbol October 2nd, 2008 2:00 PM

Quote:

Originally Posted by Time (Post 3993346)


If the PLAYER's too far away from the person you want to move, it will never move.
If you want a person to move towards the PLAYER, that person should be...

If the person will appear from either right or left, then the person should be 8 tiles away from the PLAYER so the screen won't show him.
If the person will appear from either above or at the bottom, then the person should be 6 tiles away from the PLAYER...

http://i203.photobucket.com/albums/aa154/destinedjagold/LifeofGuardians_01-1.png

The center of the screen is always the PLAYER, so this means, the screen is 15x11 in size.

What I am trying to say is that, put that person 8 tiles away from the PLAYER if he moves in from either left or right, and/or 6 tiles away if he moves from either up or down. ;)


Thank you for the help Time. ^_^

Tyrantrum October 2nd, 2008 3:18 PM

I've been wanting to test this script out. When I did(a long while ago), the Rom froze when I stepped on the script tile.

I use XSE.

Code:

#dynamic 0x71AF6D

#org @begin
applymovement 0x1 @move1
waitmovement 0x0
msgbox @go
boxset 0x6
applymovement 0x1 @move2
waitmovement 0x0
applymovement 0xFF @move3
release
end

#org @move1
= 0x0F 0x0F 0x0F 0x01 0xFE

#org @go
= GO AWAY NOW!!!

#org @move2
= 0x4F 0x00 0xFE

#org @move3
= 0x0E 0x0E 0x0E 0xFE



Shadows October 2nd, 2008 3:20 PM

Quote:

Originally Posted by Wind~ (Post 3995251)
I've been wanting to test this script out. When I did(a long while ago), the Rom froze when I stepped on the script tile.

I use XSE.

Code:

#dynamic 0x71AF6D

#org @begin
applymovement 0x1 @move1
waitmovement 0x0
msgbox @go
boxset 0x6
applymovement 0x1 @move2
waitmovement 0x0
applymovement 0xFF @move3
waitmovement 0x0
release
end

#org @move1
= 0x0F 0x0F 0x0F 0x01 0xFE

#org @go
= GO AWAY NOW!!!

#org @move2
= 0x4F 0x00 0xFE

#org @move3
= 0x0E 0x0E 0x0E 0xFE



On the script tile, put
Unknown 0300
Var# 4050
Changes in bold.

Tyrantrum October 2nd, 2008 3:37 PM

I know the unknown and var # already. ;P
But thanks for the change. =)

Shadows October 2nd, 2008 3:48 PM

I can't believe I didn't spot this before!
Here's the new script:
Works perfectly.
#dynamic 0x71AF6D

#org @begin
applymovement 0x1 @move1
waitmovement 0x0
msgbox @go
callstd 0x6 0x6
applymovement 0x1 @move2
waitmovement 0x0
applymovement 0xFF @move3
waitmovement 0x0
release
end

#org @move1
#raw 0x0F 0x0F 0x0F 0x01 0xFE

#org @go
= GO AWAY NOW!!!

#org @move2
#raw 0x4F 0x00 0xFE

#org @move3
#raw 0x0E 0x0E 0x0E 0xFE

spenceroone3 October 2nd, 2008 4:36 PM

2 Questions:
As there is a way to giveitem and takeitem,
Is there a way to givepokemon and TAKEPOKEMON? By that I mean a script that checks your party for a certain pokemon and if it finds it it takes it away. P.S I already know checkpokemon, I just don't know how to take the pokemon away.

Is there a command to randomize a pokemon from all that you've seen (Like the girl who gives you nuggets and luxury balls when you show her a random pokemon? Ooops I just got the answer to this question... *Runs off to find the girl script*

garra911 October 2nd, 2008 7:02 PM

does anyone know how to do a script with multiple choices and answers such as when you open click a pc and see the different choices, any help?

0m3GA ARS3NAL October 2nd, 2008 8:47 PM

Quote:

Originally Posted by Tamerhaidar (Post 3994243)
I am just giving an example. lol
There is a 24 hour one, but what is it for Fire red? the command..
Thanks.

Well, since Fire Red doesn't have an in-game clock... I wouldn't think there would be one...
If there is, it would probably be found in a script... try thinking of a script in Fire red that has a time function, if any, then scan through it (look it over) if it has any, you can find it like that. (that is how I got the ones for Emerald Version.)

Hiche.. October 2nd, 2008 10:30 PM

Quote:

Originally Posted by garra911 (Post 3996094)
does anyone know how to do a script with multiple choices and answers such as when you open click a pc and see the different choices, any help?

>Go to thethethethe's scripting tutorial, and you will find it.

>And thanks for the reply 0m3GA AR$3NL.

garra911 October 3rd, 2008 11:38 AM

Quote:

Originally Posted by Tamerhaidar (Post 3996369)
>Go to thethethethe's scripting tutorial, and you will find it.

>And thanks for the reply 0m3GA AR$3NL.

yea, ive seen that and that is the base of what im looking for, but i'm looking for inserting your own options not just the owns already i the game, does that make sense?

0m3GA ARS3NAL October 3rd, 2008 11:58 AM

Quote:

Originally Posted by garra911 (Post 3997711)
yea, ive seen that and that is the base of what im looking for, but i'm looking for inserting your own options not just the owns already i the game, does that make sense?

Well, first off, you need to find the offset for the multichoice box you are trying to find. (That, or use A-text)
Then, edit the multichoice box, being sure not to overwrite anything.
Then get the ID of the multichoice box. (Example 1F is
5F
4F
3F
2F
1F
EXIT)
And use your custom box like that!
(Choice #1 would be
compare LASTRESULT 0x0
if b_true goto @example

and choice 2 would be
compare LASTRESULT 0x1
if b_true goto @example2)
You get it?
Here is a list of the multichoice box ID numbers
Spoiler:

00 = Yes | No
01 = Eevee | Flareon | Jolteon | Vaporeon | Quit
02 = Normal | Black | Pink | Sepia
03 = Hall of Fame | Quit
04 = Eggs | Quit
05 = Victories | Quit
06 = Hall of Fame | Eggs | Quit
07 = Hall of Fame | Victories | Quit
08 = Eggs | Victories | Quit
09 = Hall of Fame | Eggs | Victories | Quit
0A = Exit
0D = Bicycle $1000000 | No thanks.
0E = Abra 200 coins | Ekans 700 coins | Dratini 2100 coins Charmander 2100 coins | Larvitar 5000 coins | No thanks.
0F = SLP | PSN | PAR | BRN | FRZ | Exit
10 = Yes | No | Info
11 = Single Battle | Double Battle | Mutli Battle | Info | Exit
12 = Yes | No | Info
13 = Make a Challenge | Info | Exit
14 = Rooftop | B1F | Exit
15 = Helix Fossil | Exit
16 = Dome Fossil | Exit
17 = Old Amber | Exit
18 = Helix Fossil | Old Amber | Exit
19 = Dome Fossil | Old Amber | Exit
1A = Fresh Water $200 | Soda Pop $300 | Lemonade $350
1B = 50 coins $1000 | 500coins $10000 | Exit
1C = Excellent | Not so bad.
1D = Right | Left
1E = TM25 5500 coins | TM14 5500 coins | TM38 5500 coins | TM23 4500 coins | TM26 6500 coins | No thanks.
1F = 5F | 4F | 3F | 2F | 1F | Exit
20 = Fresh Water | Exit
21 = Soda Pop | Exit
22 = Fresh Water | Soda Pop | Exit
23 = Lemonade | Exit
24 = Fresh Water | Lemonade | Exit
25 = Soda Pop | Lemonade | Exit
26 = Fresh Water | Lemonade | Exit
27 = Trade Center | Colosseum | Exit
28 = Game Link Cable | Wireless | Exit
29 = Smoke Ball 800 coins | Miracle Seed 1000 coins | Charcoal 1000 coins | Mystic Water 1000 coins | Yellow Flute 1600 coins | No thanks.
2A = B1F | B2F | B4F | Exit
2B = Linked Game Play | Direct Corner | Union Room | Quit
2C = Two Island | Three Island | Exit
2D = One Island | Three Island | Exit
2E = One Island | Two Island | Exit
2F = Trade Center | Colosseum | Berry Crush | Exit
30 = Empty | Empty | Exit
31 = Pokémon Jump | Dodrio Berry-picking | Exit
32 = Trade Center | Colosseum | Exit
33 = 2 Tiny Mushrooms | 1 Big Mushroom
34 = Trade Center | Colosseum | Empty | Berry Crush | Exit
35 = Trade Center | Colosseum | Empty | Exit
36 = Sevii Islands | Navel Rock | Exit
37 = Sevii Islands | Birth Island | Exit
38 = Sevii Islands | Navel Rock | Birth Island | Exit
39 = One Island | Two Island | Three Island | Exit
3A = Vermillion | Two Island | Three Island | Exit
3B = Vermillion | One Island | Three Island | Exit
3C = Vermillion | One Island | Two Island | Exit
3D = Vermillion | Exit
3E = Empty | Empty | Exit
3F = Join Group | Become Leader | Exit
40 = Single | Double | Knockout | Mixed | Exit

Chimchar 9 October 3rd, 2008 12:46 PM

can anyone help me one this script its a give pokemon script ( im hacking ruby)
what happens: i go to speak to my mum and the text wont activate so it doesnt do anything.
im using XSE

here is the script:

#org 0x800000
lock
faceplayer
checkflag 0x800
if 0x0 goto 0x8800014
if 0x1 goto 0x8800035
release
end
'-----------------------
#org 0x800014
givepokemon 0x58 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
setflag 0x828
msgbox 0x880003F '"hey hows it going kid you \nare fin..."
callstd 0x6
release
end
'-----------------------
#org 0x800035
msgbox 0x88000DE '"Umm sorry kid but i only caught\nyo..."
callstd 0x6
end

'---------
' Strings
'---------
#org 0x80003F
= hey hows it going kid you \nare finally 10 years old so that \pmeans you leave to go on your \njourney so here is your growlithe\ngood luck on your journey !
#org 0x8000DE
= Umm sorry kid but i only caught\nyou one pokemon,bye kid.

Shadows October 3rd, 2008 12:55 PM

Quote:

Originally Posted by Lucario 9 (Post 3997903)
can anyone help me one this script its a give pokemon script ( im hacking ruby)
what happens: i go to speak to my mum and the text wont activate so it doesnt do anything.
im using XSE

here is the script:

#org 0x800000
lock
faceplayer
checkflag 0x800
if 0x0 goto 0x8800014
if 0x1 goto 0x8800035
release
end
'-----------------------
#org 0x800014
msgbox 0x880003F '"hey hows it going kid you \nare fin..."
callstd 0x6
givepokemon 0x58 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
setflag 0x800
release
end
'-----------------------
#org 0x800035
msgbox 0x88000DE '"Umm sorry kid but i only caught\nyo..."
callstd 0x6
release
end

'---------
' Strings
'---------
#org 0x80003F
= hey hows it going kid you \nare finally 10 years old so that \pmeans you leave to go on your \njourney so here is your growlithe\ngood luck on your journey !
#org 0x8000DE
= Umm sorry kid but i only caught\nyou one pokemon,bye kid.

Well I think you should check your grammar, other then that, changes are in bold...
It should work fine, if you used the /n,/p,/l right.

Chimchar 9 October 3rd, 2008 1:02 PM

Quote:

Originally Posted by T (Post 3997940)
Well I think you should check your grammar, other then that, changes are in bold...
It should work fine, if you used the /n,/p,/l right.

iv done what you said but it still doesnt work.
any other ideas?

Shadows October 3rd, 2008 1:06 PM

Quote:

Originally Posted by Lucario 9 (Post 3997982)
iv done what you said but it still doesnt work.
any other ideas?

Try a new offset, and re-type the script.
If this is a person event, it should work fine.

Hiche.. October 3rd, 2008 1:19 PM

Spoiler:

#dynamic 0xoffset

#org @start
checkflag 0x800
if 0x1 goto @done
message @1
callstd 0x6
givepokemon 0x58 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
setflag 0x800
release
end

#org @done
message @2
callstd 0x6
release
end

#org @1
= Hey hows it going kid you \nare finally 10 years old so that \pmeans you leave to go on your \njourney so here is your growlithe\ngood luck on your.

#org @2
= Umm sorry kid but i only caught\nyou one pokemon,bye kid.


I did this from scratch.
Try it.

Chimchar 9 October 3rd, 2008 2:00 PM

Quote:

Originally Posted by Tamerhaidar (Post 3998064)
Spoiler:

#dynamic 0xoffset

#org @start
checkflag 0x800
if 0x1 goto @done
message @1
callstd 0x6
givepokemon 0x58 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
setflag 0x800
release
end

#org @done
message @2
callstd 0x6
release
end

#org @1
= Hey hows it going kid you \nare finally 10 years old so that \pmeans you leave to go on your \njourney so here is your growlithe\ngood luck on your.

#org @2
= Umm sorry kid but i only caught\nyou one pokemon,bye kid.


I did this from scratch.
Try it.

hmm no it still doesnt work

Shadows October 4th, 2008 6:32 AM

Quote:

Originally Posted by Lucario 9 (Post 3998222)
hmm no it still doesnt work

Re download XSE, and try again.

Ninja Caterpie October 4th, 2008 2:16 PM

No need to do that.
After checkflag, put
Code:

if 0x0 goto @done


I think before is was checking and then if it WASN'T set go to done. xD

You should also fix up your grammar (tonnes of people hate bad grammar) and let you choose a nickname, give the music as well as tell you you got the Pokemon. For now, she'll say hello and you have the Pokemon. That's it.

Shadows October 4th, 2008 4:59 PM

In a hidesprite script, when I take a step the person re-appears.
How do I stop this?

Zeturic October 4th, 2008 5:10 PM

Quote:

Originally Posted by T (Post 4003280)
In a hidesprite script, when I take a step the person re-appears.
How do I stop this?

Set a flag in the script, and put the same flag in the person's people ID. That'll stop them from reappearing. So, after the hidesprite #raws, put a setflag, more than likely 0x200, and then put that flag in the person's people ID, so if the flag is 0x200, put 0200 as the ID.

That should work.

Daniel A. October 5th, 2008 4:12 AM

I have a script here:


Code:

#org $start
checkflag 0x828
if b_true goto $done
message $1
boxset 5
compare LASTRESULT 0x1
if b_true goto $take
message $2
boxset 6
release
end

#org $take
givepokemon 4 5 0
fanfare 0x13E
message $3
boxset 4
waitfanfare
#raw 0x68
setflag 0x828
message $4
boxset 5
compare LASTRESULT 0x1
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
$1 1 =I'm sorry, I can't take care\nof my Charmander.\pCan you take care of it for me?

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

#org $3
$3 1 =\c\h01\h02You received a Charmander!

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

#org $5
$5 1 =Take Care of Charmander.

#org $6
$6 1 =I hope you're taking good care of\nCharmander.is correct?


is it correct?


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.