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

0m3GA ARS3NAL September 22nd, 2008 4:32 AM

Quote:

Originally Posted by jin14 (Post 3962370)
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!

Qual è il problema? Dovete spiegare.

jin14 September 22nd, 2008 4:37 AM

0m3GA AR$3NAL tu sei italiano?
cmq il problema sta nel fatto che penso che non sia corretto!
i think that in this script there are some mistake!

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

jin14

I think your problem is with the wildbattle.
What is the people event number in advance map?
What pokemon do you want to battle?
(the one you are using the script on)

Try this:
wildbattle (pokemon number) (pokemon level) (item held)


jin14 September 22nd, 2008 4:53 AM

I DO IT BUT NEED THE BACKGROUND AND THE MUSIC BUT NOW IT GO BUT THE LEVEL ISN'T CORRECT I HAD PUT 18 WHILE IS 24!

0m3GA ARS3NAL September 22nd, 2008 4:54 AM

Quote:

Originally Posted by jin14 (Post 3962415)
0m3GA AR$3NAL tu sei italiano?
cmq il problema sta nel fatto che penso che non sia corretto!
i think that in this script there are some mistake!

No io non sono italiano, ma io sono l'apprendimento della lingua.
Penso che si dovrebbe usare movesprite2 invece di hidesprite.
Movesprite2 rende il movimento permanente. Basta essere sicuri di spostare il sprite a un posto nella zona in cui essa non può essere visto.

(Dico cose correttamente?)

jin14 September 22nd, 2008 5:04 AM

si parli corretamente cmq perchè stai imparando l'italiano? cmq non si dice all'apprendimento ma studiando o imparando
cmq il mio problema è il livello che non coincide on quello che metto!

0m3GA ARS3NAL September 22nd, 2008 5:23 AM

Quote:

Originally Posted by jin14 (Post 3962457)
si parli corretamente cmq perchè stai imparando l'italiano? cmq non si dice all'apprendimento ma studiando o imparando
cmq il mio problema è il livello che non coincide on quello che metto!

Oh. Capisco il problema. Provate ad usare 0x12 invece di 0x18.

0x12 esadecimale è lo stesso di 18 decimali.
capisci?

jin14 September 22nd, 2008 5:42 AM

si capito ma stai usando un traduttore o stai formulando frasi?
cmq si può creare uno script per rubare pokemon all'avversario?

0m3GA ARS3NAL September 22nd, 2008 5:54 AM

Quote:

Originally Posted by jin14 (Post 3962493)
si capito ma stai usando un traduttore o stai formulando frasi?
cmq si può creare uno script per rubare pokemon all'avversario?

Sì ... quando si tratta di una lunga conversazione, ho per l'utilizzo di un traduttore.
Sono ancora imparando. Hehehe.
No, non credo che si può rubare Pokémon. Almeno non senza ASM.
Spiacente.
Sono stanco. Io vado a dormire. Spiacente non ho potuto aiutare.

jin14 September 22nd, 2008 6:18 AM

cmq consiglio se vuoi imparare l'italiano chiedi a me perchè le frasi non sono corrette!

where is a good and complete script guide?

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

Quote:

Originally Posted by jin14 (Post 3962524)
cmq consiglio se vuoi imparare l'italiano chiedi a me perchè le frasi non sono corrette!

where is a good and complete script guide?

Search in the documents and tutorials section.
You will find good poke script tutorials, if that helps.
But I don't think you can find complete XSE guides.

jin14 September 22nd, 2008 10:53 AM

oh thanks i read pokescript guide i hope to learn much with these guide!

garra911 September 22nd, 2008 11:44 AM

Quote:

Originally Posted by Tamerhaidar (Post 3962379)
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

well, when i do that, the sprite it there but when you click him after you have already got dratini, he instantly disappears, and i don't want him there at all after the flag has been set and the script has been done already

Hiche.. September 22nd, 2008 11:54 AM

Quote:

Originally Posted by garra911 (Post 3963087)
well, when i do that, the sprite it there but when you click him after you have already got dratini, he instantly disappears, and i don't want him there at all after the flag has been set and the script has been done already

Try this:

Spoiler:

#ORG $begin
lock
faceplayer
checkflag 0x821
message $here
boxset 6
givepokemon 147 5 216
fanfare 0x13E
message $5
boxset 6
waitfanfare
message $nomore
boxset 6
fadescreen 0x1
#raw 0x53
#raw 0x01
#raw 0x00
fadescreen 0x0
setflag 0x828
setflag 0x821
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!


I tried it and it worked.
Sorry if it didn't help, though.

Sgt. Custard September 22nd, 2008 12:49 PM

For some reason XSE gets mad at me when I ask it to compile a script. It seems to dislike the msgbox2 line:

Code:

#define 0x800000
...
#org 0x80005A
msgbox2 @whichpoke
waitmsgbox
multichoice 0x0 0x0 0x3E 0x1
copyvar LASTRESULT 0x1004
...
#org @whichpoke
= So which one would you like?
...


It says "Error 13 'type mismatch' ... missing #define or parameter"

Only there isn't... It's weird because the debug machine doesn't mind it.

Hiche.. September 22nd, 2008 2:12 PM

Quote:

Originally Posted by Sgt. Custard (Post 3963286)
For some reason XSE gets mad at me when I ask it to compile a script. It seems to dislike the msgbox2 line:

Code:

#define 0x800000
...
#org 0x80005A
msgbox2 @whichpoke
waitmsgbox
multichoice 0x0 0x0 0x3E 0x1
copyvar LASTRESULT 0x1004
...
#org @whichpoke
= So which one would you like?
...


It says "Error 13 'type mismatch' ... missing #define or parameter"

Only there isn't... It's weird because the debug machine doesn't mind it.


Use waitmsgbox2 instead of waitmsgbox.
You are using XSE, right?
What's #org 0x80005A for?
In XSE, you don't use offsets as pointers, you use random names.
That's what I know.
If it didn't work, then maybe your XSE lacks commands, such as msgbox2.

garra911 September 22nd, 2008 5:26 PM

Quote:

Originally Posted by Tamerhaidar (Post 3963112)
Try this:

Spoiler:

#ORG $begin
lock
faceplayer
checkflag 0x821
message $here
boxset 6
givepokemon 147 5 216
fanfare 0x13E
message $5
boxset 6
waitfanfare
message $nomore
boxset 6
fadescreen 0x1
#raw 0x53
#raw 0x01
#raw 0x00
fadescreen 0x0
setflag 0x828
setflag 0x821
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!


I tried it and it worked.
Sorry if it didn't help, though.

no, i don'y think you understand the problem, the script works fine, BUT when the map is reloaded (you leave the room and come back into the room) the script can be played again, and i want it to used once and the sprite with the script is gone and never seen again, how?

Satoshi Sugimori September 22nd, 2008 5:43 PM

Quote:

Originally Posted by garra911 (Post 3964327)
no, i don'y think you understand the problem, the script works fine, BUT when the map is reloaded (you leave the room and come back into the room) the script can be played again, and i want it to used once and the sprite with the script is gone and never seen again, how?

That is because you didn't do this by the first checkflag:

checkflag 0x821 <---- CHECKFLAG AND THEN
if B_true goto $done
blab bla blab alab
END

#org $done
release
end

Or maybe I just don't understand what you mean XD

garra911 September 22nd, 2008 6:40 PM

Quote:

Originally Posted by Poke-Roy (Post 3964385)
That is because you didn't do this by the first checkflag:

checkflag 0x821 <---- CHECKFLAG AND THEN
if B_true goto $done
blab bla blab alab
END

#org $done
release
end

Or maybe I just don't understand what you mean XD

yes ive tried that too, and when you click the sprite(after the script has been ran through once and the map has been reloaded) he instantly disappears, but i need him to be "disappeared" before i click on him

0m3GA ARS3NAL September 22nd, 2008 9:50 PM

Quote:

Originally Posted by garra911 (Post 3964537)
yes ive tried that too, and when you click the sprite(after the script has been ran through once and the map has been reloaded) he instantly disappears, but i need him to be "disappeared" before i click on him

If you used XSE you could use movesprite2 at the end of your script, instead of those #raw codes. and since movesprite2 is a permanent move, you don't need a level script to keep him hidden, you just need to be sure you move the sprite to a spot where he cant be seen ever.
I suggest making the switch...

Kaizer-X September 22nd, 2008 9:58 PM

Quote:

Originally Posted by garra911 (Post 3964537)
yes ive tried that too, and when you click the sprite(after the script has been ran through once and the map has been reloaded) he instantly disappears, but i need him to be "disappeared" before i click on him

hmm try putting this number 003B under person id in advance map

Thrace September 22nd, 2008 10:22 PM

Quote:

Originally Posted by Kaizer-X (Post 3964872)
hmm try putting this number 003B under person id in advance map

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

Sgt. Custard September 22nd, 2008 10:34 PM

Quote:

Originally Posted by Tamerhaidar (Post 3963574)
Use waitmsgbox2 instead of waitmsgbox.
You are using XSE, right?
What's #org 0x80005A for?
In XSE, you don't use offsets as pointers, you use random names.
That's what I know.
If it didn't work, then maybe your XSE lacks commands, such as msgbox2.

Oh, well I'll try that. I did use names, but I've compiled it since (in order to test the first part), so that's why some of has specific no.'s

EDIT: OK, found the cause: didn't have callstd... silly me. BTW there's no such command as "waitmsgbox2"

EDIT2: It still doesn't like it. I even tried an ordinary msgbox...

Thrace September 22nd, 2008 11:17 PM

Quote:

Originally Posted by Sgt. Custard (Post 3963286)
For some reason XSE gets mad at me when I ask it to compile a script. It seems to dislike the msgbox2 line:

Code:

#define 0x800000
...
#org 0x80005A
msgbox2 @whichpoke
waitmsgbox
multichoice 0x0 0x0 0x3E 0x1
copyvar LASTRESULT 0x1004
...
#org @whichpoke
= So which one would you like?
...


It says "Error 13 'type mismatch' ... missing #define or parameter"

Only there isn't... It's weird because the debug machine doesn't mind it.

Could you post the entire script? It seems like you've cut some things out. The error you get is usually when you have misspelt a command or tried to use one that doesn't exist. Also, aren't you supposed to use copyvar 0x8000 LASTRESULT after multichoice?

Hiche.. September 22nd, 2008 11:48 PM

Quote:

Originally Posted by dshayabusa (Post 3964941)
Could you post the entire script? It seems like you've cut some things out. The error you get is usually when you have misspelt a command or tried to use one that doesn't exist. Also, aren't you supposed to use copyvar 0x8000 LASTRESULT after multichoice?

Dshayabusa is right.
copyvar 0x1004 LASTRESULT It should be like this.
And dshayabusa, is there a command called waitmsgbox2?


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?

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

Quote:

Originally Posted by Tamerhaidar (Post 3968301)
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?

Ye right. (About that checkflag, I think I'll keep it anyway....)

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

Quote:

Originally Posted by DarkSalamence (Post 3968302)
Ye right. (About that checkflag, I think I'll keep it anyway....)

I don't know the problem really.
If it didn't work try using a different script tile, or recompile the script.
Sorry if this doesnt help.

-DarK- September 24th, 2008 9:22 AM

Quote:

Originally Posted by Tamerhaidar (Post 3968307)
I don't know the problem really.
If it didn't work try using a different script tile, or recompile the script.
Sorry if this doesnt help.

I found it! Here's what was (probably) missing:

Code:

#org @start
checkflag 0x204
if b_true goto @end

lockall
setvar 0x5040 0x0
goto @script
end


By placing that checkflag, the bug stopped. Thanx for your help anyway Tamer, you've done me a big favor. ^^

Hiche.. September 24th, 2008 9:28 AM

Quote:

Originally Posted by DarkSalamence (Post 3968368)
I found it! Here's what was (probably) missing:

Code:

#org @start
checkflag 0x204
if b_true goto @end

lockall
setvar 0x5040 0x0
goto @script
end


By placing that checkflag, the bug stopped. Thanx for your help anyway Tamer, you've done me a big favor. ^^

lol anytime.
I know this command was missing, but I forgot to tell you.
If you want any help, tell me.

Satoshi Sugimori September 26th, 2008 8:31 AM

Heey can someone check this script,, when I try to compile it it says find pointer for $takeit...

Spoiler:
#org $begin
lock
checkflag 0x800
if B_true goto $done
message $wait
$wait 1=Heey \v\h01!\pWait I still have \nyour Pokemon!
boxset 6
applymovement 0xFF $huh
pausemove 0
applymovement 0x1 $goto
pausemove 0
message $takit
$takeit 1=Here take Pikachu \pI went to the \nPKMN Center with him ;)
boxset 6
givepokemon 25 5 0
#raw 0x75 0x52 0x00 0x0A 0x03
message $nice
$nice 1=Have a nice day honey!
boxset 6
#raw 0x76
message $wait2
$wait2 1=Ooh almost forgot I got \nyou an pokedex!\pHere take it!
setflag 0x829
setflag 0x828
special 0x16F
message $gotdex
$gotdex 1=\v\h01 received the PokeDex!
applymovement 0x1 $away
pausemove 0
setflag 0x800
release
end

#org $done
release
end

#org $huh
#raw 0x55 0x63 0xFE

#org $goto
#raw 0x10 0x10 0x10 0x10 0x10 0x10 0x12 0x10 0x12 0x02 0xFE

#org $away
#raw 0x13 0x11 0x13 0x11 0x11 0x11 0x11 0x11 0x11 0x03 0xFE

Binary September 26th, 2008 8:45 AM

I edited in bold. You forgot the 'e' in take it.
Quote:

#org $begin
lock
checkflag 0x800
if B_true goto $done
message $wait
$wait 1=Heey \v\h01!\pWait I still have \nyour Pokemon!
boxset 6
applymovement 0xFF $huh
pausemove 0
applymovement 0x1 $goto
pausemove 0
message $takeit
$takeit 1=Here take Pikachu \pI went to the \nPKMN Center with him ;)
boxset 6
givepokemon 25 5 0
#raw 0x75 0x52 0x00 0x0A 0x03
message $nice
$nice 1=Have a nice day honey!
boxset 6
#raw 0x76
message $wait2
$wait2 1=Ooh almost forgot I got \nyou an pokedex!\pHere take it!
setflag 0x829
setflag 0x828
special 0x16F
message $gotdex
$gotdex 1=\v\h01 received the PokeDex!
applymovement 0x1 $away
pausemove 0
setflag 0x800
release
end

#org $done
release
end

#org $huh
#raw 0x55 0x63 0xFE

#org $goto
#raw 0x10 0x10 0x10 0x10 0x10 0x10 0x12 0x10 0x12 0x02 0xFE

#org $away
#raw 0x13 0x11 0x13 0x11 0x11 0x11 0x11 0x11 0x11 0x03 0xFE

Satoshi Sugimori September 26th, 2008 9:02 AM

Quote:

Originally Posted by cε׀׀ (Post 3973629)
I edited in bold. You forgot the 'e' in take it.

Lolz stupid mistake XD
Thanks ;)

Shadows September 26th, 2008 2:11 PM

This is related to scripting, so I'll post it here.
Whats the fanfare that plays when you are about to go into a pokemon battle with a random trainer?

Thrace September 26th, 2008 3:49 PM

Quote:

Originally Posted by T (Post 3974344)
This is related to scripting, so I'll post it here.
Whats the fanfare that plays when you are about to go into a pokemon battle with a random trainer?

Theres 0x128 to 0x12B, theres more than one. They aren't fanfares though, they're music so you'll have to use playsong.

Zeturic September 26th, 2008 4:53 PM

I'm pretty positive that there is a command that will allow you to change what happens in a script based on if you are standing above, below, or to either side of the person. What is this command, and how do you use it?

I've looked through the guides, and can't find it. But, it seems like I remember reading about it somewhere.

Quote:

Originally Posted by megiddo (Post 3974884)
#raw 68
Compare 0x800C 0x1
If b_true goto $down
Compare 0x800C 0x2
If b_true goto $up
Compare 0x800C 0x3
If b_true goto $left
Compare 0x800C 0x4
If b_true goto $right

Depends on which direction the player is facing. ^_^

Thank you.

Megiddo-san September 26th, 2008 5:13 PM

#raw 68
Compare 0x800C 0x1
If b_true goto $down
Compare 0x800C 0x2
If b_true goto $up
Compare 0x800C 0x3
If b_true goto $left
Compare 0x800C 0x4
If b_true goto $right

Depends on which direction the player is facing. ^_^

Ripper September 26th, 2008 9:44 PM

Could someone check what's wrong with this script... Thanks!

#org $Start
applymovement 0x03 $Move
pausemove 0x0
message $1
boxset 6
applymovement 0x03 $Move2
pausemove 0x0
setflag 0x200
end

#org $1
$1 1 = Text

#org $Move
#raw 0x10 0x02 0x03 0x10 0x10 0x02 0x03 0x10 0x10 0x63 0xFE

#org $Move2
#raw 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0xFE

Megiddo-san September 26th, 2008 9:46 PM

There could be too many movements on one line.

Ripper September 26th, 2008 10:00 PM

So I have to delete some? Or can I just click enter :D

Megiddo-san September 26th, 2008 10:14 PM

A new set like
#raw 0x 0x 0x 0x 0x
#raw 0x 0x 0x 0x 0x 0xFE
underneath would work. So just move some down one.

Ripper September 26th, 2008 10:19 PM

I tried this...

#org $Start
applymovement 0x03 $Move
pausemove 0x0
applymovement 0x03 $Move2
pausemove 0x0
message $1
boxset 6
applymovement 0x03 $Move3
pausemove 0x0
setflag 0x200
end

#org $1
$1 1 = Text

#org $Move
#raw 0x10 0x02 0x03 0x10 0x10 0xFE

#org $Move2
#raw 0x02 0x03 0x10 0x10 0x63 0xFE

#org $Move3
#raw 0x11 0x11 0x11 0x11 0x11 0x11 0xFE

BUt the same thing happens.... Nothing. I walk over the spot normally and no script occurs.

I then tried your method as well but no dice. Still nothing happens :(

Megiddo-san September 26th, 2008 10:22 PM

Check your person on the map's #.

-DarK- September 27th, 2008 1:31 AM

Spoiler:
#dynamic 0x8000C6

#org @start
checkflag 0x200
if b_true goto @end
lockall
setvar 0x4001 0x2
goto @script
end

#org @script
compare 0x4001 0x0
if b_true goto @up
compare 0x4001 0x1
if b_true goto @down0
compare 0x4001 0x2
if b_true goto @down1
end

#org @up
applymovement 0x4 @move0
applymovement 0xFF @movex0
waitmovement 0x0
goto @check
end

#org @down0
applymovement 0x4 @move1
applymovement 0xFF @movex1
waitmovement 0x0
goto @check
end

#org @down1
applymovement 0x4 @move2
applymovement 0xFF @movex2
waitmovement 0x0
goto @check
end

#org @check
checkflag 0x823
if b_false goto @nopass
checkflag 0x823
if b_true goto @pass
end

#org @pass
msgbox @go
boxset 0x6
fadescreen 0x1
setflag 0x200
fadescreen 0x0
releaseall
end

#org @nopass
msgbox @srry
boxset 0x6
applymovement 0xFF @back
waitmovement 0x0
releaseall
end

#org @end
end

#org @move0
#raw 0x01
#raw 0xFE

#org @move1
#raw 0x00
#raw 0xFE

#org @move2
#raw 0x10
#raw 0xFE

#org @movex0
#raw 0x00
#raw 0xFE

#org @movex1
#raw 0x01
#raw 0xFE

#org @movex2
#raw 0x01
#raw 0xFE

#org @back
#raw 0x13
#raw 0xFE

#org @go
= I'm sorry but I can't ....\nOh!!! Those are the first 4 BADGES!\lI'm sorry, go on through.

#org @srry
= I'm sorry, but I can't let you\nthrough unless you have at least 4\lBADGES.


I use this in FireRed. However, the script worked 1x, it won't work again if I step in that script tile (or in one of the other 2 script tiles who got the other 2 setvars). Anyone knows what I'm doing wrong here?

Ripper September 27th, 2008 2:08 AM

Right, two things...

1) What do I add to a Script to prevent it from happening more than once?
2) How do I cause someone to disapear if I haven't talked to them through the use of a script event. I assign them there ID but I'm not sure how to make them actually disapear without having to leave the screen.

Thanks!

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

Quote:

Originally Posted by Ripper (Post 3975893)
Right, two things...

1) What do I add to a Script to prevent it from happening more than once?
2) How do I cause someone to disapear if I haven't talked to them through the use of a script event. I assign them there ID but I'm not sure how to make them actually disapear without having to leave the screen.

Thanks!

1) Use checkflag / setflag, for instances something like this:

Code:

#org $start
checkflag 0x200
if b_true goto $end
lock
faceplayer ... etc
setflag 0x200
release
end

#org $end
end


2) Use hidesprite and fadescreen. Now for instance, lets combine the prev script with the hide sprite thing:
Code:

#org $start
checkflag 0x200
if b_true goto $end
lock
faceplayer ... etc
fadescreen 1
hidesprite 0xsprite number comes here
setflag 0x200
fadescreen 0

release
end

#org $end
end


Fadescreen 1 fades the screen completly, fadescreen 0 is actually only a flikker. However, when you use fadescreen 1, you must use fadescreen 0 after it so the screen would return to normal, cuz fadescreen 1 on it's own wouldn't un-fade the screen.

Hiche.. September 27th, 2008 3:38 AM

Quote:

Originally Posted by Ripper (Post 3975535)
I tried this...

#org $Start
checkflag 0x200
if b_true goto $done

applymovement 0x03 $Move
pausemove 0
applymovement 0x03 $Move2
pausemove 0
message $1
boxset 6
applymovement 0x03 $Move3
pausemove 0
setflag 0x200
release
end

#org $done
release
end

#org $1
$1 1 = Text

#org $Move
#raw 0x10 0x02 0x03 0x10 0x10 0xFE

#org $Move2
#raw 0x02 0x03 0x10 0x10 0x63 0xFE

#org $Move3
#raw 0x11 0x11 0x11 0x11 0x11 0x11 0xFE

BUt the same thing happens.... Nothing. I walk over the spot normally and no script occurs.

I then tried your method as well but no dice. Still nothing happens :(

You forgot the release command.
I edited somethings in the bold.
Try now.

And DarkSalamnce
#org @end
release
end

And make sure to place your setvar value in varnumber in advance map, which in your case, is 4001.

jin14 September 27th, 2008 4:40 AM

what is the mistake in this script:
#org $der
lock
faceplayer
checkflag 0x200
if b_true goto $fight
trainerbattle 1 0x0A8 $before $after
message $ti sfido!
boxset 0x6
end

#org $fight
message $der
boxset 0x6
nop
nop
setflag 0x1204
release
end

#org $ti sfido!
= Mi chiamo Rino\pe sono un drago\nallenatore\palmeno lo dovrei essere\pdiventerò campione\ndel mondo\pall'attacco!

#org $before
= All'attacco

#org $after
= Noooo....!

#org $der
= la prossima volta...\pvincerò io!

-DarK- September 27th, 2008 4:47 AM

Quote:

Originally Posted by TamerHaidar
And DarkSalamnce
#org @end
release
end

There's more to it than that. The first tile script works correctly (and keeps working after I stepped on it once) The other 2 however, don't, even though they use the same script. Once I stepped on the other 2, the first one stops working too....

Hiche.. September 27th, 2008 4:49 AM

Spoiler:

#org $start
lock
faceplayer
checkflag 0x1204
if b_true goto $fight
trainerbattle 0 0x0A8 $before $after
message $tisfido
boxset 0x6
setflag 0x1204
end

#org $fight
message $der
boxset 0x6
release
end

#org $tisfido
$tisfido 1 = Mi chiamo Rino\pe sono un drago\nallenatore\palmeno lo dovrei essere\pdiventerò campione\ndel mondo\pall'attacco!

#org $before
$before 1 = All'attacco

#org $after
$after 1 = Nooo..!

#org $der
$der 1 = la prossima volta...\pvincerò io!


Try this.
And read thethethethe's tutorial clearly, since you have a lot of mistakes.

DarkSalamance
There maybe a problem with the setvars or varnumber.
Try changing th setvar or the value of it.
Like: setvar 7C40 0x1
Sorry if it didn't help.

-DarK- September 27th, 2008 5:05 AM

Quote:

Originally Posted by Tamerhaidar (Post 3976145)
Spoiler:

#org $start
lock
faceplayer
checkflag 0x1204
if b_true goto $fight
trainerbattle 0 0x0A8 $before $after
message $tisfido
boxset 0x6
setflag 0x1204
end

#org $fight
message $der
boxset 0x6
release
end

#org $tisfido
$tisfido 1 = Mi chiamo Rino\pe sono un drago\nallenatore\palmeno lo dovrei essere\pdiventerò campione\ndel mondo\pall'attacco!

#org $before
$before 1 = All'attacco

#org $after
$after 1 = Nooo..!

#org $der
$der 1 = la prossima volta...\pvincerò io!


Try this.
And read thethethethe's tutorial clearly, since you have a lot of mistakes.

DarkSalamance
There maybe a problem with the setvars or varnumber.
Try changing th setvar or the value of it.
Like: setvar 7C40 0x1
Sorry if it didn't help.

Tried diffirent setvar, still same, tile one works until I step on one of the other 2. Varnumbers are correct, checked them all....


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