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)
-   -   Script Help Thread (DO NOT REQUEST SCRIPTS) (https://www.pokecommunity.com/showthread.php?t=163576)

Satoshi Sugimori January 10th, 2009 1:44 PM

Quote:

Originally Posted by Ichiro Kazuki (Post 4267768)
Thats my Script.

Spoiler:
Code:

#dynamic 0x26ECB8

#org @start
lock
faceplayer
setvar 0x8008 0x9
call 0x1A8CAD
checkflag 0x1000
if 0x1 goto @how
msgbox @yesno 0x5
compare LASTRESULT 0x0
if 0x1 goto @too
call 0x1A8CBD
compare 0x8004 0x6
if 0x4 goto @too
call 0x1A8CC9
comparevars2 LASTRESULT 0x8009
if 0x5 goto @not
call 0x1A8CD9
msgbox @thanksalot 0x4
setflag 0x1000
release
end

#org @not
bufferpokemon 0x0 0x27
msgbox @not2 0x4
release
end

#org @too
bufferpokemon 0x0 0xD3
msgbox @too2 0x4
release
end

#org @how
msgbox @old 0x4
release
end

#org @thanksalot
= Thanks \nI really mean it!

#org @not2
= That's not [buffer1]\nYou have it or not?

#org @too2
= Dammit, I wanted one [buffer1]!

#org @yesno
= Hey there!\nDo you have a [buffer1]?\lWant to trade it for my\l[buffer2]?

#org @old
= I miss [buffer2]\nYour [buffer1] is doing fine.




He say a don't know comparevars2 on line 17. how can i fix this?

It's a trade script

Did you try comparevar2 whitout the s?

The Abyss January 10th, 2009 4:45 PM

If I wanted to make 4 people move at the same time is their a special value they need to be assigned?

Spoiler:
#dynamic 0x2DD1AB

#org @start
checkflag 0x828
if 0x0 goto @explain
if 0x1 goto @away
end

#org @explain
lock
faceplayer
msgbox @gone
release
end

#org @away
lock
msgbox @bye 0x6
applymovement 0x00 @walk
waitmovement 0x0
release
end

#org @gone
= Please don't disturb us\nWe need the space

#org @bye
= We've seen enough\nLet's go

#org @walk
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x60
#raw 0xFE


I need this to move 4 people at the same time then make them disappear.

Binary January 10th, 2009 5:17 PM

Quote:

Originally Posted by XDRules (Post 4268474)
If I wanted to make 4 people move at the same time is their a special value they need to be assigned?

Spoiler:
#dynamic 0x2DD1AB

#org @start
checkflag 0x828
if 0x0 goto @explain
if 0x1 goto @away
end

#org @explain
lock
faceplayer
msgbox @gone
release
end

#org @away
lock
msgbox @bye 0x6
applymovement 0x00 @walk
waitmovement 0x0
release
end

#org @gone
= Please don't disturb us\nWe need the space

#org @bye
= We've seen enough\nLet's go

#org @walk
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x60
#raw 0xFE


I need this to move 4 people at the same time then make them disappear.

do you mean applymovement 0x(person event no.)?
Then, if you want 4 people to move at the same time..
Code:

applymovement 0x(person event no.) @pointer
applymovement 0x(person event no.) @pointer
applymovement 0x(person event no.) @pointer
applymovement 0x(person event no.) @pointer
waitmovement 0x0


And if you want them all to disappear (at once)
Code:

hidesprite 0x(person event no.)
hidesprite 0x(person event no.)
hidesprite 0x(person event no.)
hidesprite 0x(person event no.)
setflag 0x828 (because there's checkflag 0x828)


And make sure you put the person ID of all four sprites as 828 (In AM)

The Abyss January 10th, 2009 5:19 PM

Flag 828 is the Pokemon menu though. They're supposed to leave when you have a pokemon. I'll just use another flag then.

Binary January 10th, 2009 5:22 PM

Quote:

Originally Posted by XDRules (Post 4268578)
Flag 828 is the Pokemon menu though. They're supposed to leave when you have a pokemon. I'll just use another flag then.

Yeah you could do that. Don't forget to assign the Person ID with the same flag though.

The Abyss January 10th, 2009 6:03 PM

More help here

Spoiler:
#dynamic 0x2E4E83

#org @start
checkflag 0x828
if 0x0 goto @hey
if 0x1 goto @none
end

#org @hey
lock
msgbox @no 0x6
applymovement 0xFF @back
waitmovement 0x0
release
end

#org @no
= No-one is allowed\nto leave this Village\nuntil we have finished\nsearching.

#org @back
#raw 0x0E
#raw 0xFE

#org @none
release
end


What's wrong?

Binary January 10th, 2009 6:12 PM

Quote:

Originally Posted by XDRules (Post 4268713)
More help here

Spoiler:
#dynamic 0x2E4E83

#org @start
checkflag 0x828
if 0x0 goto @hey
if 0x1 goto @none
end

#org @hey
lock
msgbox @no 0x6
applymovement 0xFF @back
waitmovement 0x0
release
end

#org @no
= No-one is allowed\nto leave this Village\nuntil we have finished\nsearching.

#org @back
#raw 0x0E
#raw 0xFE

#org @none
release
end


What's wrong?

Code:

#dynamic 0x2E4E83

#org @start
checkflag 0x828
if 0x1 goto @none
msgbox @no 0x2
applymovement 0xFF @back
waitmovement 0x0
release
end

#org @no
= No-one is allowed\nto leave this Village\nuntil we have finished\nsearching.

#org @back
#raw 0x0E 0xFE

#org @none
release
end


I think that should do it.

The Abyss January 10th, 2009 6:17 PM

Still not working. Do i need to assign a Special Var value or something?

Hiche.. January 11th, 2009 12:40 AM

Quote:

Originally Posted by XDRules (Post 4268756)
Still not working. Do i need to assign a Special Var value or something?

Yes, in Advance Map. Unknown should be 0003, and var number should be 5040, or 4050.

Medo0 January 11th, 2009 1:54 AM

HEY GUYS
I Found this Script here [Page -6-]
Quote:
#org 0x2D513F
setvar 0x4060 0x37
givepokemon 0x4060 0x8 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @player 0x4
waitfanfare
closeonkeypress
hidesprite LASTTALKED
setflag 0x828
release
end

#org @player
[player] recieved a Vulpix!
i have a person that will give you a Vulpix

Now
1st How to change the pokemon that you will receive [ i don't know ids ]
2nd the offset for the person is "14D6CD" do i have to change only the "2D513F" to
"14D6CD"

Could Some1 help

Andryandrew January 11th, 2009 2:12 AM

Quote:

Originally Posted by Medo0 (Post 4267398)
HEY GUYS
I Found this Script here [Page -6-]

i have a person that will give you a Vulpix

Now
1st How to change the pokemon that you will receive [ i don't know ids ]
2nd the offset for the person is "14D6CD" do i have to change only the "2D513F" to
"14D6CD"

Pleas help

HERE you can find a list of pokemon with their relatives IDs...

2- this scritp is a half with dynamic offset and a half with static offsets and it contain some errors; try this (you have to compile it with XSE):
Quote:

#dynamic 0x800000

#org @start
givepokemon 0xPKMN id 0xPKMN level 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @player 0x2
waitfanfare
hidesprite LASTTALKED
setflag 0x828
release
end

#org @player
= [player] recieved a Vulpix!

Medo0 January 11th, 2009 2:19 AM

Quote:

Originally Posted by Andryandrew (Post 4269593)
HERE you can find a list of pokemon with their relatives IDs...

2- this scritp is a half with dynamic offset and a half with static offsets and it contain some errors; try this (you have to compile it with XSE):

Man .. I Swear you are a Scripting Master
I Will test it now:)

Andryandrew January 11th, 2009 2:28 AM

Quote:

Originally Posted by Medo0 (Post 4269599)
Man .. I Swear you are a Scripting Master
I Will test it now:)

I feel very very embarrassed xd :embarrass

Medo0 January 11th, 2009 2:59 AM

Oh Geeez ... I Got this Message When I Replaced the ID With Pikachu
[For The Fat guy in little root]
i got this message:S
http://medo00972.googlepages.com/script.jpg
Link http://medo00972.googlepages.com/script.jpg

-Medo0

Hiche.. January 11th, 2009 3:31 AM

Quote:

Originally Posted by Medo0 (Post 4269654)
Oh Geeez ... I Got this Message When I Replaced the ID With Pikachu
[For The Fat guy in little root]
i got this message:S
http://medo00972.googlepages.com/script.jpg
Link http://medo00972.googlepages.com/script.jpg

-Medo0

0x1900? Uhh.. What's with that? Remove the "level" thing. Replace 0x1900 with 0x25, which in this case is Vulpix.

Medo0 January 11th, 2009 4:10 AM

Replaced the ID With Pikachu

Andryandrew January 11th, 2009 4:18 AM

Quote:

Originally Posted by Medo0 (Post 4269654)
Oh Geeez ... I Got this Message When I Replaced the ID With Pikachu
[For The Fat guy in little root]
i got this message:S
http://medo00972.googlepages.com/script.jpg
Link http://medo00972.googlepages.com/script.jpg

-Medo0

Pikachu id is 0x0019, not 1900 because the bytes have to be switched... and you have to delete the word "level", I wrote it to show you where you have to put the level of the pokemon...

Medo0 January 11th, 2009 4:42 AM

Last question
What's Wrong with this basic Script
#Dynamic 0x80209E

Quote:

#ORG @Main
Lock
FacePlayer
Message @Speak
BoxSet 0x6
Release
End

#ORG @Speak
= Squirtle : Squeeertl

Andryandrew January 11th, 2009 4:56 AM

Quote:

Originally Posted by Medo0 (Post 4269850)
Last question
What's Wrong with this basic Script
#Dynamic 0x80209E

maybe the case of the characters... try this:
Quote:

#org @Main
lock
faceplayer
message @Speak
Boxset 0x6
Release
End

#org @Speak
= Squirtle : Squeeertl

tImE January 11th, 2009 5:18 AM

Code:

compare 0x400C 0x2
if 0x1 goto 0x821E350
compare 0x400B 0x1
if 0x1 goto 0x821E2F0
compare 0x400B 0x2
if 0x1 goto 0x821E320
compare 0x400B 0x4
if 0x1 goto 0x821E350
compare 0x400B 0x8
if 0x1 goto 0x821E41D
compare 0x400B 0x0
if 0x5 goto 0x821E44D
goto 0x821E080


What "Var-values/commands" need to be set for these
to occur?

I'd be glad if some could help me. ^^

Andryandrew January 11th, 2009 10:37 AM

Quote:

Originally Posted by 44tim44 (Post 4269894)
Code:

compare 0x400C 0x2
if 0x1 goto 0x821E350
compare 0x400B 0x1
if 0x1 goto 0x821E2F0
compare 0x400B 0x2
if 0x1 goto 0x821E320
compare 0x400B 0x4
if 0x1 goto 0x821E350
compare 0x400B 0x8
if 0x1 goto 0x821E41D
compare 0x400B 0x0
if 0x5 goto 0x821E44D
goto 0x821E080


What "Var-values/commands" need to be set for these
to occur?

I'd be glad if some could help me. ^^

mmm... I don't understand your question...

tImE January 11th, 2009 11:31 AM

Quote:

Originally Posted by Andryandrew (Post 4270615)
mmm... I don't understand your question...

"compare 0x400C 0x2
if 0x1 goto 0x821E350"

"compare 0x800D 0x1
if 0x1 goto 0x_______"
is the same as
"compare Lastresult 0x1
if b_true goto 0x_______",
This checks if 0x1 occured and
if it did, then it jumps to "0x_______"

Compare 0x400C is the same thing
it just compare different values/variables.

I need to know which variables and values which
need to be set in order to get the
script to continue.

Popstar Leafeon January 12th, 2009 9:36 AM

Quote:

Originally Posted by Andryandrew (Post 4266620)
The script seems perfectly normal... what does not work?
Maybe you have alrerady used flag 0x82f in your rom?

In Pewter City, yeah. It's always there. But no, this is supposed to give you the shoes early on, so you don't have to constantly walk.

пзо January 12th, 2009 9:40 AM

:)
 
Okay, this is definitely the last time I'm coming here.

I have this problem, with the starter town of my hack.
Every time I place a OW in the hack map, hes in the trees. :(
Somehow..

Pokepal17 January 12th, 2009 9:44 AM

Quote:

Originally Posted by пзо (Post 4273906)
Okay, this is definitely the last time I'm coming here.

I have this problem, with the starter town of my hack.
Every time I place a OW in the hack map, hes in the trees. :(
Somehow..

Is it Fire Red and is the town built on Pallet town? Coz it has a level script that moves a NPC to where a trainer tips sign was in the original game.
_______________________________________________________________________________________________________


Need help

ROM: Fire Red
Version: BPRE
Script Editor: XSE
Script: Level Script

Spoiler:

'---------------
#org 0x800000
lock
checkflag 0x1000
if 0x0 call 0x880000D
release
end
'---------------
#org 0x80000D
applymovement MOVE_PLAYER 0x8800024
waitmovement 0x0
msgbox 0x8800028 MSG_NORMAL '"I'm happy!"
setflag 0x1000
return

'---------
' Strings
'---------
#org 0x800028
= I'm happy!

'-----------
' Movements
'-----------
#org 0x800024
#raw 0x63 'Question Mark (?)
#raw 0x66 'Happy (^_^)
#raw 0xFE 'End of Movements


A-map settings



Please note: This is my first level script. I am not completely sure on how to make them. I was given some brief details about them and I didn't understand so by looking at level scripts in a ROM I tried this one as a test. Also please explain any corrections made and if possible, please can you give a link to a tutorial on level scripts. Thanks in advance.


All times are GMT -8. The time now is 2:55 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.