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 21st, 2008 1:04 AM

Quote:

Originally Posted by dshayabusa (Post 3957102)
Whats wrong with it and why do you need setvar?

Actually, I'm not sure if I need it, tho I think so. The problem with the script is, it freezes my game once I stand in the tile that has this script, while it should make the guy that gives me national dex turn left (facing me this way) and start talking.

Thrace September 21st, 2008 1:39 AM

Quote:

Originally Posted by DarkSalamence (Post 3958266)
Actually, I'm not sure if I need it, tho I think so. The problem with the script is, it freezes my game once I stand in the tile that has this script, while it should make the guy that gives me national dex turn left (facing me this way) and start talking.

You need to change some of the properties of that script tile in A-Map. Click on it, on the right hand side there will be some values you can edit. For the first Unknown textbox put in 0003, for var number put in 4001 and for var value put 0.

-DarK- September 21st, 2008 1:49 AM

Quote:

Originally Posted by dshayabusa (Post 3958317)
You need to change some of the properties of that script tile in A-Map. Click on it, on the right hand side there will be some values you can edit. For the first Unknown textbox put in 0003, for var number put in 4001 and for var value put 0.

Okay, I did that, now the game doesn't freeze, and the guy turns left to me, but he won't start speaking unless I talk to him.... How can I fix this?

Thrace September 21st, 2008 2:01 AM

Quote:

Originally Posted by DarkSalamence (Post 3958331)
Okay, I did that, now the game doesn't freeze, and the guy turns left to me, but he won't start speaking unless I talk to him.... How can I fix this?

Try this:
Code:

#Dynamic 0x86A7E4

#org @start
lockall
applymovement 0x9 @left
waitmovement 0x0
call @start2
releaseall
end

#org @start2
checkflag 0x204
if b_true goto @gone
checkflag 0x829
if b_false goto @nodex
checkflag 0x829
if 0x1 goto @havedex

end

#org @havedex
msgbox @upgrade
boxset 0x5
compare LASTRESULT 1
if b_true goto @getdex
compare LASTRESULT 1
if 0x0 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
fanfare 0x13E
boxset 0x6
special 0x1F3
waitfanfare
fadescreen 1
hidesprite 0x9
fadescreen 0
setflag 0x204
end

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

#org @notwant
msgbox @no
boxset 0x6
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
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 @left
#raw 0x02
#raw 0xFE



-DarK- September 21st, 2008 2:09 AM

Quote:

Originally Posted by dshayabusa (Post 3958342)
Try this:
Code:

#Dynamic 0x86A7E4

#org @start
lockall
applymovement 0x9 @left
waitmovement 0x0
call @start2
releaseall
end

#org @start2
checkflag 0x204
if b_true goto @gone
checkflag 0x829
if b_false goto @nodex
checkflag 0x829
if 0x1 goto @havedex

end

#org @havedex
msgbox @upgrade
boxset 0x5
compare LASTRESULT 1
if b_true goto @getdex
compare LASTRESULT 1
if 0x0 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
fanfare 0x13E
boxset 0x6
special 0x1F3
waitfanfare
fadescreen 1
hidesprite 0x9
fadescreen 0
setflag 0x204
end

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

#org @notwant
msgbox @no
boxset 0x6
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
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 @left
#raw 0x02
#raw 0xFE



Nope, still didn't work. When I decompiled the script, it resulted in +300 nops and a few things that don't even look like the script

Thrace September 21st, 2008 2:34 AM

Quote:

Originally Posted by DarkSalamence (Post 3958357)
Nope, still didn't work. When I decompiled the script, it resulted in +300 nops and a few things that don't even look like the script

That usually means that it hasn't compiled properly, it has nothing to do with the script itself. Copy and paste everything into a new script and try compiling again.

-DarK- September 21st, 2008 2:49 AM

Quote:

Originally Posted by dshayabusa (Post 3958384)
That usually means that it hasn't compiled properly, it has nothing to do with the script itself. Copy and paste everything into a new script and try compiling again.

Still didn't work, tho the decompile showed that it did compile correctly this time.

EDIT:I tried to create a setvar script, but since I hardly know how to use it...

Here's what I made:
Code:

#Dynamic 0x9C2E0B

#org @start
lockall
setvar 4001 0x2
goto @script
end

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

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

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

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

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

#org @havedex
msgbox @upgrade
boxset 0x5
compare LASTRESULT 1
if b_true goto @getdex
else 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
fanfare 0x13E
boxset 0x6
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


And this is what it has become when I decompile the script:
Code:

'-----------------------
#org 0x9C33AC
lockall
setvar 0xFA1 0x2
goto 0x89C33B9
end

'-----------------------
#org 0x9C33B9
compare 0xFA1 0x0
if 0x1 goto 0x89C33DC
compare 0xFA1 0x1
if 0x1 goto 0x89C33ED
compare 0xFA1 0x2
if 0x1 goto 0x89C33FE
end

'-----------------------
#org 0x9C33DC
applymovement 0x9 0x89C3673
waitmovement 0x0
goto 0x89C340F
return

'-----------------------
#org 0x9C33ED
applymovement 0x9 0x89C3676
waitmovement 0x0
goto 0x89C340F
return

'-----------------------
#org 0x9C33FE
applymovement 0x9 0x89C3679
waitmovement 0x0
goto 0x89C340F
return

'-----------------------
#org 0x9C340F
checkflag 0x204
if 0x1 goto 0x89C366E
checkflag 0x861
if 0x0 goto 0x89C35A9
goto 0x38000F23
playsong2 0x89C
callstd 0x5
compare LASTRESULT 0x1
if 0x1 goto 0x89C3505
goto 0xE0D9C243
warp8 0xE3 0x0 0xE8 0xD9DC 0xD9E6
setdoorclosed 0xC300 0xDE00

'-----------------------
#org 0x9C366E
hidesprite 0x9
'-----------------------
#org 0x9C35A9
msgbox 0x89C35B4 '"Hi there. I'm researching POKéMON\n..."
'-----------------------
#org 0x9C3505
msgbox 0x89C3521 '"[player]'s POKéDEX got upgraded."

'-----------
' Movements
'-----------
#org 0x9C3673
#raw 4E 'Face Left
#raw FE 'End of Movements

#org 0x9C3676
#raw 6 'Step Left (Slow)
#raw FE 'End of Movements

#org 0x9C3679
#raw 6 'Step Left (Slow)
#raw 6 'Step Left (Slow)
#raw FE 'End of Movements

'---------
' Strings
'---------
#org 0x9C35B4
= 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 0x9C3521
= [player]'s POKéDEX got upgraded.


As you see, there are stuff that gone missing, and stuff that I didn't ask for.... Well, that's what you get with limited scripting skills... Can someone maybe fix this script? (or maybe PM me and explain setvar in XSE language, since I only find pokescript stuff...)

Ninja Caterpie September 21st, 2008 3:04 AM

Ok, in the script square, put 0003 for the unknown and 5040 for the one under it.

-DarK- September 21st, 2008 3:13 AM

Quote:

Originally Posted by Dark Lakitu (Post 3958454)
Ok, in the script square, put 0003 for the unknown and 5040 for the one under it.

:O It works (tho the script didn't detect that I had pokedex yet). But, can you explain me why use 5040 and not 4001?

Ninja Caterpie September 21st, 2008 3:13 AM

I dunno. It just works. :\

Thrace September 21st, 2008 3:15 AM

Code:

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

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

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

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

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

#org @havedex
msgbox @upgrade
boxset 0x5
compare LASTRESULT 1
if b_true goto @getdex
compare LASTRESULT 1
if b_true 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 6
fanfare 0x13E
boxset 0x6
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


Probably should have looked at the whole thing before answering, my bad. Try the above, DO NOT change anything! Just copy and paste.

Mistakes:
No such thing as "else" in XSE
Forgetting boxset 0x6
Numbers not represented in hex (ie 0x4001)

-DarK- September 21st, 2008 3:42 AM

Quote:

Originally Posted by dshayabusa (Post 3958493)
Code:

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

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

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

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

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

#org @havedex
msgbox @upgrade
boxset 0x5
compare LASTRESULT 1
if b_true goto @getdex
compare LASTRESULT 1
if b_true 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 6
fanfare 0x13E
boxset 0x6
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


Probably should have looked at the whole thing before answering, my bad. Try the above, DO NOT change anything! Just copy and paste.

Mistakes:
No such thing as "else" in XSE
Forgetting boxset 0x6
Numbers not represented in hex (ie 0x4001)

"else" does exist, I saw HackMew himself post a part of a script with "else" in it. I even got proof that it works:

Code:

#Dynamic 0x803A50

#org @start
checkflag 0x204
if b_true goto @gone
lock
faceplayer
checkflag 0x861
if b_false goto @nodex
else goto @havedex
release
end

#org @havedex
msgbox @upgrade
boxset 0x5
compare LASTRESULT 1
if b_true goto @getdex
else goto @notwant
release
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
fanfare 0x13E
boxset 0x6
special 0x1F3
waitfanfare
fadescreen 1
hidesprite 0x9
fadescreen 0
setflag 0x204
release
end

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

#org @notwant
msgbox @no
boxset 0x6
release
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
release
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


This is the original script; the one I put on the person himself, who's supposed to give me the national dex. It works COMPLETLY, everything, every single part of it.

Sgt. Custard September 21st, 2008 4:25 AM

I'm having a problem with this script. All that happens is I can't move and the music stops and nothing else, no message etc. I've debugged it in XSE and it likes it now, but it still doesn't work. Can you see the problem? BTW, I know there isn't flag yet; I'll be adding that later, but that shouldn't affect anything.

Code:

#dynamic 0x800000

#org @start
lock
playsong2 0x012E
msgbox @message
callstd 6
applymovement 0xFF @exclm
applymovement 0x5 @movement
msgbox @message1
callstd 6
applymovement 0x5 @jump
msgbox @message2
callstd 6
applymovement 0x5 @jump1
msgbox @message3
callstd 5
compare LASTRESULT 0x0
if 0x1 call @no
msgbox @message4
callstd 6
call @multi
end

#org @multi
multichoice 0 0 15 0
copyvar LASTRESULT 0x2000
compare 0x2000 0x0
if 0x1 call @charmander
compare 0x2000 0x1
if 0x1 call @squirtle
compare 0x2000 0x2
if 0x1 call @bulbasaur
return

#org @exclm
#raw 0x63

#org @movement
#raw 0x13 0x13 0x13 0x13 0x13 0x11 0x13

#org @message
=Hey kid!

#org @message1
=Do you know anyone called [PLAYER]?\n...\lWhat? You're [PLAYER]!?

#org @jump
#raw 0x02

#org @message2
=Sir, are you sure he's called...\nHe...\lYessir, I will...\lRoger that.

#org @jump1
#raw 0x03

#org @message4
=(This is spoiler stuff from my hack so I'm not showing it)

#org @no
msgbox @nospeech
callstd 5
compare LASTRESULT 0x0
if 0x1 jump @no
return

#org @message3
= Well I'm glad to hear it. OK then,\nhave you got a pokémon of your own?\lNo... In that case I shall give you\lone. I have three with me. Which\lone would you like?

#org @charmander
msgbox @charmanderspeech
callstd 5
compare LASTRESULT 0x1
if 0x1 jump @getchar
compare LASTRESULT 0x0
if 0x1 call @nopoke
return

#org @squirtle
msgbox @squirtlespeech
callstd 5
compare LASTRESULT 0x1
if 0x1 jump @getsquirt
if 0x0 call @nopoke
return

#org @bulbasaur
msgbox @bulbasaurspeech
callstd 5
compare LASTRESULT 0x1
if 0x1 jump @getbulb
if 0x0 call @nopoke
return

#org @getchar
fanfare 0x010C
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
msgbox @receivechar
callstd 6
waitfanfare
call 0x1A74EB
msgbox @bye
callstd 6
applymovement 0x5 @byemove
hidesprite 0x5
fadedefault
end

#org @getbulb
fanfare 0x010C
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
msgbox @receivebulb
callstd 6
waitfanfare
call 0x1A74EB
msgbox @bye
callstd 6
applymovement 0x5 @byemove
hidesprite 0x5
fadedefault
end

#org @getsquirt
fanfare 0x010C
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
msgbox @receivesquirt
callstd 6
waitfanfare
call 0x1A74EB
msgbox @bye
callstd 6
applymovement 0x5 @byemove
hidesprite 0x5
fadedefault
end

#org @receivechar
=[PLAYER] received the charmander\nfrom the policeman!

#org @receivebulb
=[PLAYER] received the bulbasaur\nfrom the policeman!

#org @receivesquirt
=[PLAYER] received the squirtle\nfrom the policeman!

#org @byemove
#raw 0x12 0x10 0x12 0x12 0x12 0x12 0x12

#org @nopoke
msgbox @nopokespeech
callstd 6
return

#org @nopokespeech
=Oh? In that case what pokémon would\nyou like?

#org @nospeech
=[PLAYER]... He's your father.\nYou've got to help him. Are you\lwith me?

#org @charmanderspeech
=Ah! So I see you have chosen the\ncharmander, the fire pokémon! Is\lthat your final choice?

#org @bulbasaurspeech
=Ah! So I see you have chosen the\nbulbasaur, the grass pokémon! Is\lthat your final choice?

#org @squirtlespeech
=Ah! So I see you have chosen the\nsquirtle, the water pokémon! Is\lthat your final choice?

#org @bye
= Well I'll be seeing you very soon;\nin the meantime, start training up\lthat pokémon!


I know it's long. Thanks in advance!

Kaizer-X September 21st, 2008 5:37 AM

Quote:

Originally Posted by alexllew (Post 3958612)
I'm having a problem with this script. All that happens is I can't move and the music stops and nothing else, no message etc. I've debugged it in XSE and it likes it now, but it still doesn't work. Can you see the problem? BTW, I know there isn't flag yet; I'll be adding that later, but that shouldn't affect anything.

Code:

#dynamic 0x800000

#org @start
lock
playsong2 0x012E
msgbox @message
callstd 6
applymovement 0xFF @exclm
applymovement 0x5 @movement
msgbox @message1
callstd 6
applymovement 0x5 @jump
msgbox @message2
callstd 6
applymovement 0x5 @jump1
msgbox @message3
callstd 5
compare LASTRESULT 0x0
if 0x1 call @no
msgbox @message4
callstd 6
call @multi
end

#org @multi
multichoice 0 0 15 0
copyvar LASTRESULT 0x2000
compare 0x2000 0x0
if 0x1 call @charmander
compare 0x2000 0x1
if 0x1 call @squirtle
compare 0x2000 0x2
if 0x1 call @bulbasaur
return

#org @exclm
#raw 0x63

#org @movement
#raw 0x13 0x13 0x13 0x13 0x13 0x11 0x13

#org @message
=Hey kid!

#org @message1
=Do you know anyone called [PLAYER]?\n...\lWhat? You're [PLAYER]!?

#org @jump
#raw 0x02

#org @message2
=Sir, are you sure he's called...\nHe...\lYessir, I will...\lRoger that.

#org @jump1
#raw 0x03

#org @message4
=(This is spoiler stuff from my hack so I'm not showing it)

#org @no
msgbox @nospeech
callstd 5
compare LASTRESULT 0x0
if 0x1 jump @no
return

#org @message3
= Well I'm glad to hear it. OK then,\nhave you got a pokémon of your own?\lNo... In that case I shall give you\lone. I have three with me. Which\lone would you like?

#org @charmander
msgbox @charmanderspeech
callstd 5
compare LASTRESULT 0x1
if 0x1 jump @getchar
compare LASTRESULT 0x0
if 0x1 call @nopoke
return

#org @squirtle
msgbox @squirtlespeech
callstd 5
compare LASTRESULT 0x1
if 0x1 jump @getsquirt
if 0x0 call @nopoke
return

#org @bulbasaur
msgbox @bulbasaurspeech
callstd 5
compare LASTRESULT 0x1
if 0x1 jump @getbulb
if 0x0 call @nopoke
return

#org @getchar
fanfare 0x010C
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
msgbox @receivechar
callstd 6
waitfanfare
call 0x1A74EB
msgbox @bye
callstd 6
applymovement 0x5 @byemove
hidesprite 0x5
fadedefault
end

#org @getbulb
fanfare 0x010C
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
msgbox @receivebulb
callstd 6
waitfanfare
call 0x1A74EB
msgbox @bye
callstd 6
applymovement 0x5 @byemove
hidesprite 0x5
fadedefault
end

#org @getsquirt
fanfare 0x010C
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
msgbox @receivesquirt
callstd 6
waitfanfare
call 0x1A74EB
msgbox @bye
callstd 6
applymovement 0x5 @byemove
hidesprite 0x5
fadedefault
end

#org @receivechar
=[PLAYER] received the charmander\nfrom the policeman!

#org @receivebulb
=[PLAYER] received the bulbasaur\nfrom the policeman!

#org @receivesquirt
=[PLAYER] received the squirtle\nfrom the policeman!

#org @byemove
#raw 0x12 0x10 0x12 0x12 0x12 0x12 0x12

#org @nopoke
msgbox @nopokespeech
callstd 6
return

#org @nopokespeech
=Oh? In that case what pokémon would\nyou like?

#org @nospeech
=[PLAYER]... He's your father.\nYou've got to help him. Are you\lwith me?

#org @charmanderspeech
=Ah! So I see you have chosen the\ncharmander, the fire pokémon! Is\lthat your final choice?

#org @bulbasaurspeech
=Ah! So I see you have chosen the\nbulbasaur, the grass pokémon! Is\lthat your final choice?

#org @squirtlespeech
=Ah! So I see you have chosen the\nsquirtle, the water pokémon! Is\lthat your final choice?

#org @bye
= Well I'll be seeing you very soon;\nin the meantime, start training up\lthat pokémon!


I know it's long. Thanks in advance!

hmm have u change the var no. in advance map to 4010 and the unknown to 0003?

Hiche.. September 21st, 2008 5:41 AM

Quote:

Originally Posted by alexllew (Post 3958612)
I'm having a problem with this script. All that happens is I can't move and the music stops and nothing else, no message etc. I've debugged it in XSE and it likes it now, but it still doesn't work. Can you see the problem? BTW, I know there isn't flag yet; I'll be adding that later, but that shouldn't affect anything.

Code:

#dynamic 0x800000

#org @start
lock
playsong2 0x012E
msgbox @message
callstd 6
applymovement 0xFF @exclm
applymovement 0x5 @movement
waitmovement 0
msgbox @message1
callstd 6
applymovement 0x5 @jump
waitmovement 0
msgbox @message2
callstd 6
applymovement 0x5 @jump1
waitmovement 0
msgbox @message3
callstd 5
compare LASTRESULT 0x0
if 0x1 call @no
msgbox @message4
callstd 6
call @multi
end

#org @multi
multichoice 0 0 15 0
copyvar 0x8000 0x800D
compare 0x8000 0x0

if 0x1 call @charmander
compare 0x8000 0x1
if 0x1 call @squirtle
compare 0x8000 0x2
if 0x1 call @bulbasaur
return

#org @exclm
#raw 0x63 0xFE

#org @movement
#raw 0x13 0x13 0x13 0x13 0x13 0x11 0x13 0xFE

#org @message
=Hey kid!

#org @message1
=Do you know anyone called [PLAYER]?\n...\lWhat? You're [PLAYER]!?

#org @jump
#raw 0x02 0xFE

#org @message2
=Sir, are you sure he's called...\nHe...\lYessir, I will...\lRoger that.

#org @jump1
#raw 0x03 0xFE

#org @message4
=(This is spoiler stuff from my hack so I'm not showing it)

#org @no
msgbox @nospeech
callstd 5
compare LASTRESULT 0x0
if 0x1 jump @no
return

#org @message3
= Well I'm glad to hear it. OK then,\nhave you got a pokémon of your own?\lNo... In that case I shall give you\lone. I have three with me. Which\lone would you like?

#org @charmander
msgbox @charmanderspeech
callstd 5
compare LASTRESULT 0x1
if 0x1 jump @getchar
compare LASTRESULT 0x0
if 0x1 call @nopoke
return

#org @squirtle
msgbox @squirtlespeech
callstd 5
compare LASTRESULT 0x1
if 0x1 jump @getsquirt
if 0x0 call @nopoke
return

#org @bulbasaur
msgbox @bulbasaurspeech
callstd 5
compare LASTRESULT 0x1
if 0x1 jump @getbulb
if 0x0 call @nopoke
return

#org @getchar
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
fanfare 0x010C
msgbox @receivechar
callstd 6
waitfanfare
call 0x1A74EB
msgbox @bye
callstd 6
applymovement 0x5 @byemove
waitmovement 0
hidesprite 0x5
fadedefault
end

#org @getbulb
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
fanfare 0x010C
msgbox @receivebulb
callstd 6
waitfanfare
call 0x1A74EB
msgbox @bye
callstd 6
applymovement 0x5 @byemove
waitmovement 0
hidesprite 0x5
fadedefault
end

#org @getsquirt
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
fanfare 0x010C
msgbox @receivesquirt
callstd 6
waitfanfare
call 0x1A74EB
msgbox @bye
callstd 6
applymovement 0x5 @byemove
waitmovement 0
hidesprite 0x5
fadedefault
end

#org @receivechar
= [PLAYER] received the charmander\nfrom the policeman!

#org @receivebulb
= [PLAYER] received the bulbasaur\nfrom the policeman!

#org @receivesquirt
= [PLAYER] received the squirtle\nfrom the policeman!

#org @byemove
#raw 0x12 0x10 0x12 0x12 0x12 0x12 0x12 0xFE

#org @nopoke
msgbox @nopokespeech
callstd 6
return

#org @nopokespeech
= Oh? In that case what pokémon would\nyou like?

#org @nospeech
= [PLAYER]... He's your father.\nYou've got to help him. Are you\lwith me?

#org @charmanderspeech
= Ah! So I see you have chosen the\ncharmander, the fire pokémon! Is\lthat your final choice?

#org @bulbasaurspeech
= Ah! So I see you have chosen the\nbulbasaur, the grass pokémon! Is\lthat your final choice?

#org @squirtlespeech
= Ah! So I see you have chosen the\nsquirtle, the water pokémon! Is\lthat your final choice?

#org @bye
= Well I'll be seeing you very soon;\nin the meantime, start training up\lthat pokémon!


I know it's long. Thanks in advance!


Try adding waitmovement 0, under each applymovement command.
And end each movement with a 0xFE. I edited it for you in the bold.
And if I remember, when using multichoice command, I think you should use msgbox2.
If I find any more errors, I'll tell you.
And what with the returns? I am not sure, but try replacing them with "end".
Hope that helps

Shadows September 21st, 2008 5:42 AM

Quote:

Originally Posted by Tamerhaidar (Post 3958749)
Try adding waitmovement 0x0, under each applymovement command.
And end each movement with a 0xFE. I edited it for you in the bold.
And if I remember, when using multichoice command, I hink you should use msgbox2.
If I find any more errors, I'll tell you.
And what with the returns? I am not sure, but try replacing them with "end".
Hope that helps

You forgot the 0x in front of the 0.

jin14 September 21st, 2008 6:15 AM

hi exist a script that you can thief the pokemon?

Shadows September 21st, 2008 6:21 AM

Quote:

Originally Posted by jin14 (Post 3958868)
hi exist a script that you can thief the pokemon?

Click this Please
^^^^^^^^^^^^^^^^^^^

jin14 September 21st, 2008 8:44 AM

i wuold only know if exist a scipt for thief or no!

what is the mistake in this script:
#dynamic 0x856471

#org @dialga
lock
faceplayer
message @sfidami!
boxset 0x6
wildbattle 0x003 0x18 0x2 0x2 0x1
hidesprite 0x0F
setflag 0x1204
release
end

#org @sfidami!
= Sono Dialga!\psignore del tempo\pio sono il primo guardiano\nsai perchè siamo qui?\pperchè noi dobbiamo rompere i 5 sigilli\ne battere Darkrai\pper farlo abbiamo bisogno di\pun allenatore che ci sfidi\ncosì possiamo valutare\pla sua forza\pbene iniziamo!

garra911 September 21st, 2008 5:20 PM

probem/question
 
Spoiler:
#ORG $begin
lock
faceplayer
checkflag 0x828
message $here
boxset 6
givepokemon 147 5 216
fanfare 0x13E
message $5
boxset 6
waitfanfare
message $nomore
boxset 6
fadescreen 0x1
applymovement 0x01 $MOVE
pausemove 0
fadescreen 0x0
setflag 0x828
release
end

#ORG $here
$here 1 = You'll want this for the\ndemo, Have fun!

#ORG $5
$5 1 = \c\h01\h04You got a Dratini!

#ORG $nomore
$nomore 1 = Don't forget to check the\ngame's Pokemon Community\pthread for details and updates\lHave Fun!

#org $MOVE
#raw 0x60
#raw 0x1E
#raw 0x1E
#raw 0xFE



okay,so im this script, a man gives you a Drantini, says to check the games thread, and the screen fades and he's "magically " gone BUT when you enter the map where this event takes place, he's back and if you rtalk to him, he gives you another dratini and repeats the script, how is avoidable?

Thrace September 21st, 2008 8:27 PM

Quote:

Originally Posted by garra911 (Post 3961619)
Spoiler:
#ORG $begin
lock
faceplayer
checkflag 0x828
message $here
boxset 6
givepokemon 147 5 216
fanfare 0x13E
message $5
boxset 6
waitfanfare
message $nomore
boxset 6
fadescreen 0x1
applymovement 0x01 $MOVE
pausemove 0
fadescreen 0x0
setflag 0x828
release
end

#ORG $here
$here 1 = You'll want this for the\ndemo, Have fun!

#ORG $5
$5 1 = \c\h01\h04You got a Dratini!

#ORG $nomore
$nomore 1 = Don't forget to check the\ngame's Pokemon Community\pthread for details and updates\lHave Fun!

#org $MOVE
#raw 0x60
#raw 0x1E
#raw 0x1E
#raw 0xFE



okay,so im this script, a man gives you a Drantini, says to check the games thread, and the screen fades and he's "magically " gone BUT when you enter the map where this event takes place, he's back and if you rtalk to him, he gives you another dratini and repeats the script, how is avoidable?

Put 0828 in the person ID of the man in A-Map.

Hiche.. September 22nd, 2008 12:06 AM

Quote:

Originally Posted by garra911 (Post 3961619)
Spoiler:
#ORG $begin
lock
faceplayer
checkflag 0x828
message $here
boxset 6
givepokemon 147 5 216
fanfare 0x13E
message $5
boxset 6
waitfanfare
message $nomore
boxset 6
fadescreen 0x1
applymovement 0x01 $MOVE
pausemove 0
fadescreen 0x0
setflag 0x828
release
end

#ORG $here
$here 1 = You'll want this for the\ndemo, Have fun!

#ORG $5
$5 1 = \c\h01\h04You got a Dratini!

#ORG $nomore
$nomore 1 = Don't forget to check the\ngame's Pokemon Community\pthread for details and updates\lHave Fun!

#org $MOVE
#raw 0x60
#raw 0x1E
#raw 0x1E
#raw 0xFE



okay,so im this script, a man gives you a Drantini, says to check the games thread, and the screen fades and he's "magically " gone BUT when you enter the map where this event takes place, he's back and if you rtalk to him, he gives you another dratini and repeats the script, how is avoidable?

Like dshayabusa said.
And try adding this command:
#raw 0x53
#raw 0x<people number>
#raw 0x00
Hope that helps.

Ninja Caterpie September 22nd, 2008 2:03 AM

Tamerhaider, you can also use hidesprite. Or is it some different thing you're talking about?

jin14 September 22nd, 2008 4:10 AM

what is the mistake in this script:
#dynamic 0x856471

#org @dialga
lock
faceplayer
message @sfidami!
boxset 0x6
wildbattle 0x003 0x18 0x2 0x2 0x1
hidesprite 0x0F
setflag 0x1204
release
end

#org @sfidami!
= Sono Dialga!\psignore del tempo\pio sono il primo guardiano\nsai perchè siamo qui?\pperchè noi dobbiamo rompere i 5 sigilli\ne battere Darkrai\pper farlo abbiamo bisogno di\pun allenatore che ci sfidi\ncosì possiamo valutare\pla sua forza\pbene iniziamo!

Hiche.. September 22nd, 2008 4:19 AM

Quote:

Originally Posted by Dark Lakitu (Post 3962246)
Tamerhaider, you can also use hidesprite. Or is it some different thing you're talking about?

He's using poke script.
I think it's better to use #raw 0x53 ...etc for a person to disappear completely.
Not sure if hidesprite will do the same thing, though.
In XSE, I use hidesprite and it works fine.

And garra911

change this:

fadescreen 0x1
applymovement 0x01 $MOVE
pausemove 0
fadescreen 0x0

Into this:

fadescreen 0x1
#raw 0x53
#raw 0x01
#raw 0x00
fadescreen 0x0


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.