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)

Thrace September 22nd, 2008 11:52 PM

Quote:

Originally Posted by Tamerhaidar (Post 3964967)
Dshayabusa is right.
copyvar 0x1004 LASTRESULT It should be like this.
And dshayabusa, is there a command called waitmsgbox2?


Not in the database, waitmsgbox applies to msgbox2 and msgbox3 according to XSE.

Hiche.. September 23rd, 2008 12:05 AM

Oh ok, thanks for the info.
Anyways, I saw a script in a website just now, there is a command in poke script called vardisplay 0x0 0x8005.
What's that?
Thanks in advance

Thrace September 23rd, 2008 12:56 AM

Quote:

Originally Posted by Tamerhaidar (Post 3964990)
Oh ok, thanks for the info.
Anyways, I saw a script in a website just now, there is a command in poke script called vardisplay 0x0 0x8005.
What's that?
Thanks in advance

vardisplay? I've never heard of it, but by the look of its parameters it could just be an edited name for setvar/checkvar or it could be a command that buffers the value in a variable.

garra911 September 23rd, 2008 1:11 PM

Quote:

Originally Posted by dshayabusa (Post 3964899)
Why 003B? It should correspond with the flag used for that event, you need to use 0821 (shouldn't it be 828?).

thank you, ive finally figured out my problem, i was change the vent id, not the person id, im retearded

Kaizer-X September 23rd, 2008 2:47 PM

Quote:

Originally Posted by dshayabusa (Post 3964899)
Why 003B? It should correspond with the flag used for that event, you need to use 0821 (shouldn't it be 828?).

hmm i m nt too sure myself but it work out for me...u mean the ppl id should correspond with the flag?

thethethethe September 23rd, 2008 8:16 PM

Quote:

Originally Posted by Tamerhaidar (Post 3964990)
Oh ok, thanks for the info.
Anyways, I saw a script in a website just now, there is a command in poke script called vardisplay 0x0 0x8005.
What's that?
Thanks in advance

That was a command in an old version of the ScriptDEC decompiler. Which Dabomstew added to a pokescript 'fix'. It isn't apart of a default Pokescript installation. I know that because I still use that name.

In XSE, I think it's buffervar or buffervariable or something like that? It's command &h83.

Sgt. Custard September 23rd, 2008 10:41 PM

OK, I've finally solved it. For some reason XSE didn't want to have dynamic offsets as well as static ones (which had appeared because I decompiled my own script from the ROM due to loss of data), so I just used a Hex Ed and voilá...

Hiche.. September 24th, 2008 12:29 AM

Quote:

Originally Posted by thethethethe (Post 3967449)
That was a command in an old version of the ScriptDEC decompiler. Which Dabomstew added to a pokescript 'fix'. It isn't apart of a default Pokescript installation. I know that because I still use that name.

In XSE, I think it's buffervar or buffervariable or something like that? It's command &h83.

Thanks thethethethe.
When I saw it, it was used in the multi command,
like for example:

#org $option1
setvar 0x8005 0x1
vardisplay 0 0x8005
message $display
boxset 0x6
end

I tried it out the script first, but didn't work.
Then I added this command:
addcmmd vardisplay #83
to the database and it worked.
Anyway, Thank you for clearing it up, thethethethe.

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

I posted this script a while ago, and it still doesn't work....

Code:

#Dynamic 0x800000

#org @start
lockall
setvar 0x5040 0x0
goto @script
return

#org @script
compare 0x5040 0x0
if b_true goto @left0
compare 0x5040 0x1
if b_true goto @left1
compare 0x5040 0x2
if b_true goto @left2
return

#org @left0
applymovement 0x9 @move0
waitmovement 0x0
goto @check
end

#org @left1
applymovement 0x9 @move1
waitmovement 0x0
goto @check
end

#org @left2
applymovement 0x9 @move2
waitmovement 0x0
goto @check
end

#org @check
checkflag 0x204
if b_true goto @gone
checkflag 0x829
if b_true goto @havedex
checkflag 0x829
if b_false goto @nodex
end

#org @havedex
msgbox @upgrade
boxset 0x5
compare LASTRESULT 1
if b_true goto @getdex
goto @notwant
end

#org @upgrade
= Hello there. I just noticed that\nyou have a POKéDEX. I research\lPOKéMON from foreigns lands like\lKANTO and JOHTO. Would you like me\lto upgrade your POKéDEX so that it\lcan store those POKéMON's data?

#org @getdex
msgbox @receivedex
boxset 0x6
fanfare 0x13E
special 0x1F3
waitfanfare
fadescreen 1
hidesprite 0x9
fadescreen 0
setflag 0x204
releaseall
end

#org @receivedex
= [player]'s POKéDEX got upgraded.

#org @notwant
msgbox @no
boxset 0x6
releaseall
end

#org @no
= Oh? You don't want to? Well that's\nok then. If you change your mind,\lcome see me again.

#org @nodex
msgbox @hello2
boxset 0x6
releaseall
end

#org @hello2
= Hi there. I'm researching POKéMON\nfrom foreign lands like KANTO and\lJOHTO. If you could bring me a\lPOKéDEX, I would upgrade it with\lthe information about POKéMON found\lonly there.

#org @gone
hidesprite 0x9
end

#org @move0
#raw 0x4E
#raw 0xFE

#org @move1
#raw 0x06
#raw 0xFE

#org @move2
#raw 0x06
#raw 0x06
#raw 0xFE


I suck at setvar, I hardly know how to use it correctly. NOTE:The script works partially. The aide who needs to say the message says messages, but 1) The message is the wrong one, which means the checkflag for pokedex doesn't works correctly (and yes, I do have the pokedex) and 2) He won't face left to me.

Someone knows what's wrong with this?

Hiche.. September 24th, 2008 2:38 AM

Quote:

Originally Posted by DarkSalamence (Post 3967857)
I posted this script a while ago, and it still doesn't work....

Code:

#Dynamic 0x800000

#org @start
lockall
setvar 0x5040 0x0
goto @script
return

#org @script
compare 0x5040 0x0
if b_true goto @left0
compare 0x5040 0x1
if b_true goto @left1
compare 0x5040 0x2
if b_true goto @left2
return

#org @left0
applymovement 0x9 @move0
waitmovement 0x0
goto @check
end

#org @left1
applymovement 0x9 @move1
waitmovement 0x0
goto @check
end

#org @left2
applymovement 0x9 @move2
waitmovement 0x0
goto @check
end

#org @check
checkflag 0x204
if b_true goto @gone
checkflag 0x829
if b_true goto @havedex
checkflag 0x829
if b_false goto @nodex
end

#org @havedex
msgbox @upgrade
boxset 0x5
compare LASTRESULT 1
if b_true goto @getdex
goto @notwant
end

#org @upgrade
= Hello there. I just noticed that\nyou have a POKéDEX. I research\lPOKéMON from foreigns lands like\lKANTO and JOHTO. Would you like me\lto upgrade your POKéDEX so that it\lcan store those POKéMON's data?

#org @getdex
msgbox @receivedex
boxset 0x6
fanfare 0x13E
special 0x1F3
waitfanfare
fadescreen 1
hidesprite 0x9
fadescreen 0
setflag 0x204
releaseall
end

#org @receivedex
= [player]'s POKéDEX got upgraded.

#org @notwant
msgbox @no
boxset 0x6
releaseall
end

#org @no
= Oh? You don't want to? Well that's\nok then. If you change your mind,\lcome see me again.

#org @nodex
msgbox @hello2
boxset 0x6
releaseall
end

#org @hello2
= Hi there. I'm researching POKéMON\nfrom foreign lands like KANTO and\lJOHTO. If you could bring me a\lPOKéDEX, I would upgrade it with\lthe information about POKéMON found\lonly there.

#org @gone
hidesprite 0x9
end

#org @move0
#raw 0x4E
#raw 0xFE

#org @move1
#raw 0x06
#raw 0xFE

#org @move2
#raw 0x06
#raw 0x06
#raw 0xFE


I suck at setvar, I hardly know how to use it correctly. NOTE:The script works partially. The aide who needs to say the message says messages, but 1) The message is the wrong one, which means the checkflag for pokedex doesn't works correctly (and yes, I do have the pokedex) and 2) He won't face left to me.

Someone knows what's wrong with this?

To upgrade your pokedex to national dex, use special 0x16F not 0x1F3.
In what applymovement $pointer do you want the aide to face you left?
To face left, use #raw 0x02.
Is this for ruby or firered?

-DarK- September 24th, 2008 2:41 AM

Quote:

Originally Posted by Tamerhaidar (Post 3967867)
To upgrade your pokedex to national dex, use special 0x16F not 0x1F3.
In what applymovement $pointer do you want the aide to face you left?
To face left, use #raw 0x02.
Hope that helps.


Tamer, I'm hacking emerald, and in emerald it's special 0x1F3 (tried it out with regular person event, and it worked)
Also, it should be @move0 to face left
And finally, I looked around in the emerald dump that came with the latest version of XSE and the script said that 0x4E was to face left.

Hiche.. September 24th, 2008 2:43 AM

Quote:

Originally Posted by DarkSalamence (Post 3967872)
Tamer, I'm hacking emerald, and in emerald it's special 0x1F3 (tried it out with regular person event, and it worked)
Also, it should be @move0 to face left
And finally, I looked around in the emerald dump that came with the latest version of XSE and the script said that 0x4E was to face left.

Oh, I thought it was for fire red.
Sorry about that.
I'll look at it now, and see if there's something wrong.

-DarK- September 24th, 2008 2:46 AM

Quote:

Originally Posted by Tamerhaidar (Post 3967874)
Oh, I thought it was for fire red.
Sorry about that.
I'll look at it now, and see if there's something wrong.

Np bout that, I should've told that first.

Hmm, Tamer, looks like you were right anyway about #raw 0x02, it does make him face left. Dunno why the dump said 0x4E then....

Chimchar 9 September 24th, 2008 2:57 AM

can anyone help me here?
i done a give pokemon script and when i check to see what pokemon i got it just freezes.
so if you want the script here it is :

#org 0x800079
lock
faceplayer
checkflag 0x828
if 0x0 goto 0x880008D
if 0x1 goto 0x88000AE
release
end
'-----------------------
#org 0x80008D
givepokemon 0x25 0x5 0x13 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
setflag 0x828
msgbox 0x88000B8 '"hey kid whats up i just went\nto ro..."
callstd 0x6
release
end
'-----------------------
#org 0x8000AE
msgbox 0x880012F '"sorry kid you only get one from\nyo..."
callstd 0x6
end

'---------
' Strings
'---------
#org 0x8000B8
= hey kid whats up i just went\nto route 1 to catch you a starter\pfor your journey so here it is.\nits a vulpix cool
#org 0x80012F
= sorry kid you only get one from\nyour gramps good luck on your\njourney

oh and im using XSE.
please help

Hiche.. September 24th, 2008 2:58 AM

I only found a possible error.
In fire red, to check for the poke dex, you use checkflag 0x829.
In ruby, I think it's checkflag 0x821 or 0x820.
I don't know if in emerald it the same as ruby.
Not sure though.

Lucario 9,
can you post the script before you compiled it, please?
Thanks.

-DarK- September 24th, 2008 2:58 AM

Quote:

Originally Posted by Tamerhaidar (Post 3967894)
I only found a possible error.
In fire red, to check for the poke dex, you use checkflag 0x829.
In ruby, I think it's checkflag 0x821 or 0x820.
I don't know if in emerald it the same as ruby.
Not sure though.

I tested that too Tamer, with the regular script, and it worked too.

EDIT: the checkflag was the wrong one anyway, it should be 0x861. However, even that doesn't works, it's still the same as before. :(

Chimchar 9 September 24th, 2008 3:13 AM

Quote:

Originally Posted by Tamerhaidar (Post 3967894)
I only found a possible error.
In fire red, to check for the poke dex, you use checkflag 0x829.
In ruby, I think it's checkflag 0x821 or 0x820.
I don't know if in emerald it the same as ruby.
Not sure though.

Lucario 9,
can you post the script before you compiled it, please?
Thanks.

no it works now i just done 0x829 and it worked
even i dont think that was for me but it works now so thanks

Hiche.. September 24th, 2008 3:31 AM

DarkSalamance

I fixed it a little.
Spoiler:

#Dynamic 0x800000

#org @start
lockall
setvar 0x5040 0x0
goto @script
end

#org @script
checkflag 0x209
compare 0x5040 0x0
if b_true goto @left0
compare 0x5040 0x1
if b_true goto @left1
compare 0x5040 0x2
if b_true goto @left2
end

#org @left0
applymovement 0x9 @move0
waitmovement 0x0
goto @check
end

#org @left1
applymovement 0x9 @move1
waitmovement 0x0
goto @check
end

#org @left2
applymovement 0x9 @move2
waitmovement 0x0
goto @check
end

#org @check
checkflag 0x204
if b_true goto @gone
checkflag 0x861
if b_true goto @havedex
checkflag 0x861
if b_false goto @nodex
end

#org @havedex
msgbox @upgrade
boxset 0x5
compare LASTRESULT 1
if b_true goto @getdex
goto @notwant
end

#org @upgrade
= Hello there. I just noticed that\nyou have a POKéDEX. I research\lPOKéMON from foreigns lands like\lKANTO and JOHTO. Would you like me\lto upgrade your POKéDEX so that it\lcan store those POKéMON's data?

#org @getdex
special 0x1F3
fanfare 0x13E
msgbox @receivedex
boxset 0x6
waitfanfare
fadescreen 1
hidesprite 0x9
fadescreen 0
setflag 0x209
setflag 0x204
releaseall
end

#org @receivedex
= [player]'s POKéDEX got upgraded.

#org @notwant
msgbox @no
boxset 0x6
releaseall
end

#org @no
= Oh? You don't want to? Well that's\nok then. If you change your mind,\lcome see me again.

#org @nodex
msgbox @hello2
boxset 0x6
releaseall
end

#org @hello2
= Hi there. I'm researching POKéMON\nfrom foreign lands like KANTO and\lJOHTO. If you could bring me a\lPOKéDEX, I would upgrade it with\lthe information about POKéMON found\lonly there.

#org @gone
hidesprite 0x9
end

#org @move0
#raw 0x02
#raw 0xFE

#org @move1
#raw 0x06
#raw 0xFE

#org @move2
#raw 0x06
#raw 0x06
#raw 0xFE


You used returns, why is that?
I saw in thethethethe's tutorial, a script close to yours, and he didn't use return.
check his tutorial, it's under "setvar lesson2" (even if it's pokescript)
Well, try now.

jin14 September 24th, 2008 4:01 AM

i'm staing find a pokescript guide not like insert script but a guide on the script for poket script
somebody can help me?

pokemonfan123456789 September 24th, 2008 6:41 AM

i dont get any of it. i want to make a rom but i dont know here to start. HELP!!!!

Satoshi Sugimori September 24th, 2008 6:51 AM

Quote:

Originally Posted by jin14 (Post 3967966)
i'm staing find a pokescript guide not like insert script but a guide on the script for poket script
somebody can help me?

If you look in the tutorials/documents part you'll find lots of poketscript tutorials...

jin14 September 24th, 2008 7:08 AM

ok thank you very much but you can't post a link of a welliest poketscript guide?
second you i speak well english?

Binary September 24th, 2008 7:45 AM

Quote:

Originally Posted by jin14 (Post 3968185)
ok thank you very much but you can't post a link of a welliest poketscript guide?
second you i speak well english?

Link! to thethethethe's pokescript guide. It's a very neat tutorial I highly recommend. Your english is understandable.

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

Quote:

Originally Posted by Tamerhaidar (Post 3967941)
DarkSalamance

I fixed it a little.
Spoiler:

#Dynamic 0x800000

#org @start
lockall
setvar 0x5040 0x0
goto @script
end

#org @script
checkflag 0x209
compare 0x5040 0x0
if b_true goto @left0
compare 0x5040 0x1
if b_true goto @left1
compare 0x5040 0x2
if b_true goto @left2
end

#org @left0
applymovement 0x9 @move0
waitmovement 0x0
goto @check
end

#org @left1
applymovement 0x9 @move1
waitmovement 0x0
goto @check
end

#org @left2
applymovement 0x9 @move2
waitmovement 0x0
goto @check
end

#org @check
checkflag 0x204
if b_true goto @gone
checkflag 0x861
if b_true goto @havedex
checkflag 0x861
if b_false goto @nodex
end

#org @havedex
msgbox @upgrade
boxset 0x5
compare LASTRESULT 1
if b_true goto @getdex
goto @notwant
end

#org @upgrade
= Hello there. I just noticed that\nyou have a POKéDEX. I research\lPOKéMON from foreigns lands like\lKANTO and JOHTO. Would you like me\lto upgrade your POKéDEX so that it\lcan store those POKéMON's data?

#org @getdex
special 0x1F3
fanfare 0x13E
msgbox @receivedex
boxset 0x6
waitfanfare
fadescreen 1
hidesprite 0x9
fadescreen 0
setflag 0x209
setflag 0x204
releaseall
end

#org @receivedex
= [player]'s POKéDEX got upgraded.

#org @notwant
msgbox @no
boxset 0x6
releaseall
end

#org @no
= Oh? You don't want to? Well that's\nok then. If you change your mind,\lcome see me again.

#org @nodex
msgbox @hello2
boxset 0x6
releaseall
end

#org @hello2
= Hi there. I'm researching POKéMON\nfrom foreign lands like KANTO and\lJOHTO. If you could bring me a\lPOKéDEX, I would upgrade it with\lthe information about POKéMON found\lonly there.

#org @gone
hidesprite 0x9
end

#org @move0
#raw 0x02
#raw 0xFE

#org @move1
#raw 0x06
#raw 0xFE

#org @move2
#raw 0x06
#raw 0x06
#raw 0xFE


You used returns, why is that?
I saw in thethethethe's tutorial, a script close to yours, and he didn't use return.
check his tutorial, it's under "setvar lesson2" (even if it's pokescript)
Well, try now.

It works! (Tho there is still a small bug. Even after the aide has disappeared, the script pauzes me for a small sec when I step on that tile. Any way to fix that?) Ty alot Tamer ! But still, why that checkflag 0x209 @ script? I don't get it...

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

Quote:

Originally Posted by DarkSalamence (Post 3968286)
It works! (Tho there is still a small bug. Even after the aide has disappeared, the script pauses me for a small sec when I step on that tile. Any way to fix that?) Ty a lot Tamer ! But still, why that checkflag 0x209 @ script? I don't get it...

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?


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.