PankajBlitz
Taiyoh!
- 216
- Posts
- 9
- Years
- Reach
- Seen Oct 19, 2021
That's why everyone suggests Fire Red or Emerald as Base Rom. Very few research is done in Ruby.
Your words won't change my decision.
That's why everyone suggests Fire Red or Emerald as Base Rom. Very few research is done in Ruby.
Your words won't change my decision.
#dynamic 0x800F45
#org @start
playsong 0x013B 0x0
applymovement 8 @move1
waitmovement 8
msgbox @talk1 0x6
trainerbattle 0x0 0x002 0x0 @first @after
applymovement 8 @move2
waitmovement 8
hidesprite 8
setvar 0x6009 0x1
setflag 0x1209
fadesong 0x0126
release
end
#org @move1
#raw 0x13
#raw 0x10
#raw 0xFE
#org @talk1
= Hello my names Erin.. Can you help\nme train??
#org @first
= Lets do this..
#org @after
= Oh you win.. Thanks for your help\nthough. We should do this again\lsometime
#org @move2
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0xFE
[URL="https://www.youtube.com/results?q=%23dynamic"]#dynamic[/URL] 0x8008FE
[URL="https://www.youtube.com/results?q=%23org"]#org[/URL] @start
msgbox @talk1 0x6
playsong 0x011A 0x0
applymovement 10 @walk1
waitmovement 10
applymovement 0xFF @walk2
waitmovement 0xFF
msgbox @talk2 0x6
giveitem 0x103 1 0x0
msgbox @talk3 0x6
applymovement 10 @walk3
waitmovement 10
hidesprite 10
setvar 0x6000 0x1
setflag 0x1206
fadesong 0x012C
release
end
[URL="https://www.youtube.com/results?q=%23org"]#org[/URL] @talk1
= HEY WAIT! DONT GO YET!
[URL="https://www.youtube.com/results?q=%23org"]#org[/URL] @talk2
= I fixed your bike finally and it\nruns better than ever!\pHere you go!
[URL="https://www.youtube.com/results?q=%23org"]#org[/URL] @talk3
= That's all I needed to give you.\nI'll catch you later!\pBye!
[URL="https://www.youtube.com/results?q=%23org"]#org[/URL] @walk1
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x10
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x10
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x10
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x10
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x10
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x10
#raw 0x12
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x12
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x12
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x12
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x12
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x4A
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0xFE
[URL="https://www.youtube.com/results?q=%23org"]#org[/URL] @walk2
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x63
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x55
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0xFE
[URL="https://www.youtube.com/results?q=%23org"]#org[/URL] @walk3
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x13
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x13
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x13
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x13
#raw 0x13
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x11
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x11
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x11
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x11
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x11
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x11
[URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0xFE
I need help with an applymovement script. Here's the code:
Code:[URL="https://www.youtube.com/results?q=%23dynamic"]#dynamic[/URL] 0x8008FE [URL="https://www.youtube.com/results?q=%23org"]#org[/URL] @start msgbox @talk1 0x6 playsong 0x011A 0x0 applymovement 10 @walk1 waitmovement 10 applymovement 0xFF @walk2 waitmovement 0xFF msgbox @talk2 0x6 giveitem 0x103 1 0x0 msgbox @talk3 0x6 applymovement 10 @walk3 waitmovement 10 hidesprite 10 setvar 0x6000 0x1 setflag 0x1206 fadesong 0x012C release end [URL="https://www.youtube.com/results?q=%23org"]#org[/URL] @talk1 = HEY WAIT! DONT GO YET! [URL="https://www.youtube.com/results?q=%23org"]#org[/URL] @talk2 = I fixed your bike finally and it\nruns better than ever!\pHere you go! [URL="https://www.youtube.com/results?q=%23org"]#org[/URL] @talk3 = That's all I needed to give you.\nI'll catch you later!\pBye! [URL="https://www.youtube.com/results?q=%23org"]#org[/URL] @walk1 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x10 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x10 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x10 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x10 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x10 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x10 #raw 0x12 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x12 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x12 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x12 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x12 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x4A [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0xFE [URL="https://www.youtube.com/results?q=%23org"]#org[/URL] @walk2 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x63 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x55 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0xFE [URL="https://www.youtube.com/results?q=%23org"]#org[/URL] @walk3 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x13 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x13 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x13 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x13 #raw 0x13 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x11 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x11 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x11 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x11 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x11 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0x11 [URL="https://www.youtube.com/results?q=%23raw"]#raw[/URL] 0xFE
So I set the var to the green script tile and placed the OW at the right place BUT the problem with this script is the OW always shows no matter what it shows at the place where I put it on A Map and the script works right the OW walks up to you and gives you an item and walks away but when I go back to the place where I placed the OW he's still there.
Am I doing something wrong? Do I need to set something so that the OW doesn't appear in game all the time, only during the script.
you need to put the flag 1206 (used in this script) in the PERSON ID box in order to hide the Sprite permanently. Make sure you put it in PERSON ID not PERSON EVENT.
Try this, it should work:Ok I need help with a script.. I have my script Semi working I basically want the npc to walk towards me before battle talk to me then after battle the npc walks off screen. But after battle nothing happens until you step off the script tile and then back on then the npc just says the frist text again then walks off. is there anyway of making it so the npc walks off after you win the battle thanks in advance -jazzy (this is in fire red with XSE)
Code:#dynamic 0x800F45 #org @start playsong 0x013B 0x0 applymovement 8 @move1 waitmovement 8 msgbox @talk1 0x6 trainerbattle 0x0 0x002 0x0 @first @after applymovement 8 @move2 waitmovement 8 hidesprite 8 setvar 0x6009 0x1 setflag 0x1209 fadesong 0x0126 release end #org @move1 #raw 0x13 #raw 0x10 #raw 0xFE #org @talk1 = Hello my names Erin.. Can you help\nme train?? #org @first = Lets do this.. #org @after = Oh you win.. Thanks for your help\nthough. We should do this again\lsometime #org @move2 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x11 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x11 #raw 0x11 #raw 0xFE
#dynamic 0x800F45
#org @start
playsong 0x013B 0x0
applymovement 8 @move1
waitmovement 0
msgbox @talk1 0x6
trainerbattle 0x3 0x002 0x0 @after
applymovement 8 @move2
waitmovement 0
hidesprite 8
setflag 0x1209
setvar 0x6009 0x1
release
end
#org @move1
#raw 0x13
#raw 0x10
#raw 0xFE
#org @talk1
= Hello my names Erin.. Can you help\nme train??\pLets do this..
#org @after
= Oh you win.. Thanks for your help\nthough. We should do this again\lsometime
#org @move2
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0xFE
What have you got so far?
#dynamic 0x802697
#org 0x802697
lock
showsprite 0x6
setvar 0x6040 0x1
playsong 0x14C 0x1
applymovement MOVE_PLAYER 0x88027CC
waitmovement 0xFF
applymovement 0x6 0x88027EB
waitmovement 0x6
msgbox @talk1 0x6
msgbox @talk2 0x6
applymovement 0x6 0x88027E2
applymovement MOVE_PLAYER 0x88027D0
waitmovement 0xFF
msgbox 0x8802716 MSG_NORMAL
applymovement 0x6 0x88027DD
waitmovement 0x6
hidesprite 0x6
applymovement MOVE_PLAYER 0x88027D8
waitmovement 0xFF
setflag 0x4D8
release
end
'---------
' Strings
'---------
#org @talk1
= no text
#org @talk2
= no text
#org 0x802716
= no text
'-----------
' Movements
'-----------
#org 0x8027CC
#raw 0x4 'Face Down (Faster)
#raw 0x63 'Question Mark (?)
#raw 0xFE 'End of Movements
#org 0x8027EB
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x66 'Happy (^_^)
#raw 0xFE 'End of Movements
#org 0x8027E2
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x2 'Face Left
#raw 0xFE 'End of Movements
#org 0x8027D0
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements
#org 0x8027DD
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements
#org 0x8027D8
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements
Can anybody point me in the direction of an item table for Emerald? Specifically, I'm looking to change up locations of TMs and which ones the Gym Leaders give to the player. I'm having trouble because the items don't match up with their index. For example, Flannery gives TM50, in the unmodified script it says give item 152, however TM50 is item 338 in the index, so I'm kinda lost here...
Also, again in Emerald, how would I go about changing the script with the old woman who gives the player an egg with a Wynaut to an egg containing an Eevee instead?
Ohhhhh. Thanks! That makes a ton of sense now! Got them both working how I wanted them to thanks to you.you have to convert the index no. of item into Hex.
Hello there!
I´m having troubles with this starter choosing script. I took the original script from a tutorial on the forum and modified it a bit to let the player choose into two more starters.
The thing is that after saying "no" to the first pokémon, the script (if it worked well) it´s supposed to ask the player if they want x pokémon (in this case is an eevee) but after denying all i get is some weird text and the third opption doesent even appear and the dialog ends.
This is the script:
Spoiler:#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x828
if 0x1 goto @how
msgbox @give 0x5
compare 0x800D 0x1
if 0x1 goto @get
compare 0x800D 0x0
if 0x1 goto @eevee
release
end
#org @get
givepokemon 0x19 0x5 0x44 0x0 0x0 0x0
fanfare 0x13E
msgbox @receive 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @givenickname 0x5
compare 0x800D 0x1
if 0x1 goto @name
compare 0x800D 0x0
if 0x1 goto @go
end
#org @ok
msgbox @oh 0x6
release
end
#org @name
setvar 0x8004 0x0
call @nickname
goto @takecare
#org @nickname
fadescreen 0x1
special 0x9E
waitstate
return
#org @go
closeonkeypress
goto @takecare
#org @takecare
msgbox @please 0x6
release
end
#org @how
msgbox @check 0x6
release
end
#org @give
= Hola! El día de hoy comienza tu camino\npara convertirte en un gran Maestro Pokémon.\pPero todo gran camino comienza\l por un pequeño paso.\pTu paso de hoy es elegir tu\lPokémon Inicial.\pDe casualidad quieres este Pikachu?
#org @oh
= Oh, I see...
#org @receive
= [black_fr]\v\h01 recibió un Pokémon!
#org @givenickname
= [black_fr]Would you like to give your\nPokémon a nickname?
#org @please
= Please take care of my dear\nPokémon.
#org @eevee
msgbox @eevee 0x5
compare 0x800D 0x1
if 0x1 goto @geteevee
compare 0x800D 0x0
if 0x0 goto @dratini
#org @geteevee
givepokemon 0x85 0x5 0x44 0x0 0x0 0x0
fanfare 0x13E
msgbox @receive 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @givenickname 0x5
compare 0x800D 0x1
if 0x1 goto @name
compare 0x800D 0x0
if 0x1 goto @go
end
#org @dratini
msgbox @dratini 0x5
compare 0x800D 0x1
if 0x1 goto @getdratini
if 0x0 goto @oh
#org @getdratini
givepokemon 0x93 0x5 0x44 0x0 0x0 0x0
fanfare 0x13E
msgbox @receive 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @givenickname 0x5
compare 0x800D 0x1
if 0x1 goto @name
compare 0x800D 0x0
if 0x1 goto @go
end
#org @check
= How's my old Pokémon?
the error may be very basic since I´m really new at scripting.
Also, sorry if any grammar mistake is found. English is not my mother language.
Thanks for helping me!
Hey there!
First of all, nice try! The script is a little bit of a mess, but definitely not bad for a beginner. I'll try to explain the biggest flaws with it.
At various points in the script, after YES/NO questions, you put:
compare 0x800D 0x1
if 0x1 goto @something
compare 0x800D 0x0
if 0x1 goto @something
The second compare and if are redundant, because when you click NO to the question, the script will automatically execute what is specified below the first compare and if(which is the compare for YES) anyway. This is probably why the script stops working at that point, because there shouldn't be a compare & if for when you click NO, at least not in this situation.
Your script is also a bit too long. For some things, you jump through various unnecessary hoops to get to a certain result. The script can be shortened a bit, while still yielding the desired result.
Those are the main flaws.
I have tweaked your script to a shorter and more streamlined form, and I believe it works the way you intended it to. Please test it out in the game and report back the results!
Spoiler:#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x828
if 0x1 goto @how
msgbox @pikachu 0x5
compare 0x800D 0x1
if 0x1 goto @getpikachu
msgbox @eevee 0x5
compare 0x800D 0x1
if 0x1 goto @geteevee
msgbox @dratini 0x5
compare 0x800D 0x1
if 0x1 goto @getdratini
release
end
#org @how
msgbox @check 0x6
release
end
#org @getpikachu
givepokemon 0x19 0x5 0x44 0x0 0x0 0x0
fanfare 0x13E
setvar 0x8004 0x19
bufferpokemon 0x0 0x8004
msgbox @receive 0x4
waitfanfare
setflag 0x828
msgbox @givenickname 0x5
compare 0x800D 0x1
if 0x1 call @name
msgbox @takecare 0x6
release
end
#org @geteevee
givepokemon 0x85 0x5 0x44 0x0 0x0 0x0
fanfare 0x13E
setvar 0x8004 0x85
bufferpokemon 0x0 0x8004
msgbox @receive 0x4
waitfanfare
setflag 0x828
msgbox @givenickname 0x5
compare 0x800D 0x1
if 0x1 call @name
msgbox @takecare 0x6
release
end
#org @getdratini
givepokemon 0x93 0x5 0x44 0x0 0x0 0x0
fanfare 0x13E
setvar 0x8004 0x93
bufferpokemon 0x0 0x8004
msgbox @receive 0x4
waitfanfare
setflag 0x828
msgbox @givenickname 0x5
compare 0x800D 0x1
if 0x1 call @name
msgbox @takecare 0x6
release
end
#org @name
setvar 0x8004 0x0
fadescreen 0x1
special 0x9E
waitstate
return
#org @check
= How's my old Pokémon?
#org @pikachu
= Hola! El día de hoy comienza tu camino\npara convertirte en un gran Maestro Pokémon.\pPero todo gran camino comienza\l por un pequeño paso.\pTu paso de hoy es elegir tu\lPokémon Inicial.\pDe casualidad quieres este Pikachu?
#org @eevee
= We also have an EEVEE. Would you\nlike that one instead?
#org @dratini
= How about a DRATINI? It's the only\none we have left.
#org @receive
= [black_fr][player] received the [buffer1]!
#org @givenickname
= [black_fr]Would you like to give your\n[buffer1] a nickname?
#org @takecare
= Please take care of my dear\nPokémon.
You're very welcome!The tweaked script worked just as intended. Thanks for the help!