The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script Help Thread (DO NOT REQUEST SCRIPTS) (https://www.pokecommunity.com/showthread.php?t=163576)

Quickster November 4th, 2009 4:29 AM

Quote:

Originally Posted by Pokepal17 (Post 5288354)
The special depends on the pokemon's party number -1 as a value in 0x8004.
Fixed in bold.

Thank you so much, no one else gave me that straight of an answer before.

DaVici November 4th, 2009 9:06 AM

Hey, thank you ash 493 for your help!
I've yet another problem though. When I compile this script:
Spoiler:

'---------------
#Dynamic 0x2D50FC

#org @start
lock
faceplayer
checkflag 0x828
if 0x1 goto @done
msgbox @hello 0x2
checkflag 0x1
if 0x1 goto @poke1
checkflag 0x2
if 0x1 goto @poke2
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
setflag 0x828
setflag 0x829
msgbox @poke3msg 0x2
fanfare 0x13E
msgbox @poke3msggot 0x2
waitfanfare
applymovement 0x01 @gotopokedex
waitmovement 0x0
applymovement 0x02 @pokedexdissappear
waitmovement 0x0
applymovement 0x01 @gofrompokedex
waitmovement 0x0
fanfare 0x13E
msgbox @getpokedex 0x2
waitfanfare
release
end

#org @poke1
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
setflag 0x828
setflag 0x829
msgbox @poke1msg 0x2
fanfare 0x13E
msgbox @poke1msggot 0x2
waitfanfare
applymovement 0x01 @gotopokedex
waitmovement 0x0
applymovement 0x02 @pokedexdissappear
waitmovement 0x0
applymovement 0x01 @gofrompokedex
waitmovement 0x0
fanfare 0x13E
msgbox @getpokedex 0x2
waitfanfare
release
end

#org @poke2
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
setflag 0x828
setflag 0x829
msgbox @poke2msg 0x2
fanfare 0x13E
msgbox @poke2msggot 0x2
waitfanfare
applymovement 0x01 @gotopokedex
waitmovement 0x0
applymovement 0x02 @pokedexdissappear
waitmovement 0x0
applymovement 0x01 @gofrompokedex
waitmovement 0x0
fanfare 0x13E
msgbox @getpokedex 0x2
waitfanfare
release
end

#org @done
msgbox @only1 0x2
release
end

#org @only1
= Sorry, I've only found this\npokemon...

#org @hello
= Hi! You have to be [player], right?\nI've found a pokemon at the\lriver, and I've heard it was\lyours. It's just...

#org @poke1msg
= Your pokemon was a CYNDAQUIL\nwasn't it? Well... It's genes\lmutated under the influence of\lkerosine from the airplane, and\lyou r former CYNDAQUIL sort of\lmutated to something I would call\la CYNDOIL.\nAnyway, heres your pokemon.

#org @poke2msg
= Your pokemon was a MUDKIP\nwasn't it? Well... It's genes\lmutated under the influence of\lkerosine from the airplane, and\lyou r former MUDKIP sort of\lmutated to something I would call\lan OILKIP.\nAnyway, heres your pokemon.

#org @poke3msg
= Your pokemon was a TURTWIG\nwasn't it? Well... It's genes\lmutated under the influence of\lkerosine from the airplane, and\lyou r former TURTWIG sort of\lmutated to something I would call\la TURTOIL.\nAnyway, heres your pokemon.

#org @poke1msggot
= Congrats!\nYou've got a CYNDOIL!

#org @poke2msggot
= Congrats!\nYou've got an OILKIP!

#org @poke3msggot
= Congrats!\nYou've got a TURTOIL!

#org @getpokedex
= Please take this too...\pCongrats! You've got a pokedex!\pIt is used to store data of seen\nand caught pokemon.\lGood luck!

#org @gotopokedex
#raw 0x13
#raw 0x13
#raw 0x2D
#raw 0xFE

#org @pokedexdissappear
#raw 0x60
#raw 0xFE

#org @gofrompokedex
#raw 0x12
#raw 0x12
#raw 0x2D
#raw 0xFE

It get this:

Spoiler:

'---------------
#org 0x2D50FC
lock
checkflag 0x828
if 0x1 goto 0x82D5271
msgbox 0x8000006 0x6A '"-¿\h69\h9A1ï\h3D\h84\h82\h0A\h84pÌ..."
checkflag 0x828
if 0x1 goto 0x82D5271
msgbox 0x8000006 0x6A '"-¿\h69\h9A1ï\h3D\h84\h82\h0A\h84pÌ..."
checkflag 0x828
if 0x1 goto 0x82D5271
msgbox 0x82D52A5 0x6 '" ñûËññËÔ \h8BW&ËÌÁ\h31\h3E..."
checkflag 0x1
if 0x1 goto 0x82D518F
checkflag 0x2
if 0x1 goto 0x82D5224
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
setflag 0x828
setflag 0x829
msgbox 0x82DD29E 0x6 '"'s genes\lmutated under the influe..."
fanfare 0x13E
msgbox 0x82DD398 0x6 '"influence of\lkerosine from the ai..."
waitfanfare
applymovement 0x1 0x8282B6A
if 0x1 goto 0x82D52BE
msgbox 0x82D54FC 0x6 '"[U]Ç È ñûËññËÔ íX&ËÌÁ\h3..."
checkflag 0x1
if 0x1 goto 0x82D5224
checkflag 0x2
if 0x1 goto 0x82D5271
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
setflag 0x828
setflag 0x829
msgbox 0x82DD29E 0x6 '"'s genes\lmutated under the influe..."
fanfare 0x13E
msgbox 0x82DD398 0x6 '"influence of\lkerosine from the ai..."
waitfanfare
applymovement 0x1 0xFFFFFFFF

'---------------
#org 0x2D5271
waitfanfare
applymovement 0x1 0x82DD55E
waitmovement 0x0
applymovement 0x2 0x82DD563
waitmovement 0x0
applymovement 0x1 0x82DD566
waitmovement 0x0
fanfare 0x13E
msgbox 0x82DD4E4 0x2 '"Please take this too...\pCongrats!..."
waitfanfare
release
end
'---------------
#org 0x2D518F
waitmovementpos 0x82D 0x79 0x7
nop
goto 0x0

'---------------
#org 0x2D5224
lock
faceplayer
checkflag 0x828
if 0x1 goto 0x82D5552
msgbox 0x82D5586 0x2 '"Hi! You have to be [player], right..."
checkflag 0x1
if 0x1 goto 0x82D529F
checkflag 0x2
if 0x1 goto 0x82D54FC
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
setflag 0x828
setflag 0x829
msgbox 0x82DD34D 0x2 '"Your pokemon was a TURTWIG\nwasn't..."
fanfare 0x13E
msgbox 0x82DD471 0x2 '"Congrats!\nYou've got a TURTOIL!"
waitfanfare
applymovement 0x1 0x82DD55E
waitmovement 0x0
applymovement 0x2 0x82DD563
waitmovement 0x0
applymovement 0x1 0x82DD566
waitmovement 0x0
fanfare 0x13E
msgbox 0x82DD4E4 0x2 '"Please take this too...\pCongrats!..."
waitfanfare
release
end

'---------------
#org 0x2D52BE
nop1
msgbox 0x82DD42D 0x2 '"Congrats!\nYou've got a CYNDOIL!"
waitfanfare
applymovement 0x1 0x82DD55E
waitmovement 0x0
applymovement 0x2 0x82DD563
waitmovement 0x0
applymovement 0x1 0x82DD566
waitmovement 0x0
fanfare 0x13E
msgbox 0x82DD4E4 0x2 '"Please take this too...\pCongrats!..."
waitfanfare
release
end

'---------------
#org 0x2D5552
msgbox 0x82D555D 0x2 '"Sorry, I've only found this\npokem..."
release
end

'---------------
#org 0x2D529F
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
setflag 0x828
setflag 0x829
msgbox 0x82DD18B 0x2 '"Your pokemon was a CYNDAQUIL\nwasn..."
fanfare 0x13E
msgbox 0x82DD42D 0x2 '"Congrats!\nYou've got a CYNDOIL!"
waitfanfare
applymovement 0x1 0x82DD55E
waitmovement 0x0
applymovement 0x2 0x82DD563
waitmovement 0x0
applymovement 0x1 0x82DD566
waitmovement 0x0
fanfare 0x13E
msgbox 0x82DD4E4 0x2 '"Please take this too...\pCongrats!..."
waitfanfare
release
end

'---------------
#org 0x2D54FC
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
setflag 0x828
setflag 0x829
msgbox 0x82DD26F 0x2 '"Your pokemon was a MUDKIP\nwasn't ..."
fanfare 0x13E
msgbox 0x82DD44F 0x2 '"Congrats!\nYou've got an OILKIP!"
waitfanfare
applymovement 0x1 0x82DD55E
waitmovement 0x0
applymovement 0x2 0x82DD563
waitmovement 0x0
applymovement 0x1 0x82DD566
waitmovement 0x0
fanfare 0x13E
msgbox 0x82DD4E4 0x2 '"Please take this too...\pCongrats!..."
waitfanfare
release
end

'---------
' Strings
'---------
#org 0x6
= -¿\h69\h9A1ï\h3D\h84\h82\h0A\h84pÌ.Ùô\h8B\h98F\h81\h7Fï2¡Dç\h93ÌTîŒ\h46\h4A\h4A\hF8\h27\h31x[OC]Mt\h33\h82oTE<äk\h94T\h4BÌG\h94[Ke]\h8AFÛ\h726\c\h9F\h84\h4D\h732P\h9A[LL][OC]\h972ú\c\h03\h98\h76óëM[LL]ÂÇ-[Ke]E\h38\h84 \h406Ó\v\hFF

#org 0x2D52A5
= ñûËññËÔ \h8BW&ËÌÁ\h31\h3EÀÔ &Z&ËÌÁ\h32\h4FÀ [Po]a&Ë¿ \h4FÁ [E]a&Ë¿ \h4FÀ \h66a&Ë¿ \h31\h3EÀÔ pZ&ËÌÁ\h32\h6CÁ

#org 0x2DD29E
= 's genes\lmutated under the influence of\lkerosine from the airplane, and\lyou r former MUDKIP sort of\lmutated to something I would call\lan OILKIP.\nAnyway, heres your pokemon.

#org 0x2DD398
= influence of\lkerosine from the airplane, and\lyou r former TURTWIG sort of\lmutated to something I would call\la TURTOIL.\nAnyway, heres your pokemon.

#org 0x2D54FC
= [U]Ç È ñûËññËÔ íX&ËÌÁ\h31\h3EÀÔ \h4FZ&ËÌÁ\h32\h4FÀ [Po]a&Ë¿ \h4FÁ [E]a&Ë¿ \h4FÀ \h66a&Ë¿ \h31\h3EÀÔ pZ&ËÌÁ\h32\h6CÁ

#org 0x2DD4E4
= Please take this too...\pCongrats! You've got a pokedex!\pIt is used to store data of seen\nand caught pokemon.\lGood luck!

#org 0x2D5586
= Hi! You have to be [player], right?\nI've found a pokemon at the\lriver, and I've heard it was\lyours. It's just...

#org 0x2DD34D
= Your pokemon was a TURTWIG\nwasn't it? Well... It's genes\lmutated under the influence of\lkerosine from the airplane, and\lyou r former TURTWIG sort of\lmutated to something I would call\la TURTOIL.\nAnyway, heres your pokemon.

#org 0x2DD471
= Congrats!\nYou've got a TURTOIL!

#org 0x2DD42D
= Congrats!\nYou've got a CYNDOIL!

#org 0x2D555D
= Sorry, I've only found this\npokemon...

#org 0x2DD18B
= Your pokemon was a CYNDAQUIL\nwasn't it? Well... It's genes\lmutated under the influence of\lkerosine from the airplane, and\lyou r former CYNDAQUIL sort of\lmutated to something I would call\la CYNDOIL.\nAnyway, heres your pokemon.

#org 0x2DD26F
= Your pokemon was a MUDKIP\nwasn't it? Well... It's genes\lmutated under the influence of\lkerosine from the airplane, and\lyou r former MUDKIP sort of\lmutated to something I would call\lan OILKIP.\nAnyway, heres your pokemon.

#org 0x2DD44F
= Congrats!\nYou've got an OILKIP!

'-----------
' Movements
'-----------
#org 0x282B6A
#raw 0x33 'Slide Left (Slow)
#raw 0x0 'Face Down
#raw 0x3 'Face Right
#raw 0x12 'Step Left (Normal)
#raw 0x44 'Slide Running on Left Foot (Right)
#raw 0x41 'Slide Running on Left Foot (Down)
#raw 0x11 'Step Up (Normal)
#raw 0x0 'Face Down
#raw 0x7 'Face Right (Faster)
#raw 0x44 'Slide Running on Left Foot (Right)
#raw 0x1 'Face Up
#raw 0x0 'Face Down
#raw 0xE4 'movE4
#raw 0x1 'Face Up
#raw 0x12 'Step Left (Normal)
#raw 0x44 'Slide Running on Left Foot (Right)
#raw 0x44 'Slide Running on Left Foot (Right)
#raw 0x34 'Slide Right (Slow)
#raw 0x1 'Face Up
#raw 0x7F 'mov7F
#raw 0x13 'Step Right (Normal)
#raw 0x1 'Face Up
#raw 0x0 'Face Down
#raw 0x69 'mov69
#raw 0x1 'Face Up
#raw 0x40 'Slide Running on Right Foot (Right)
#raw 0x51 'Jump Right
#raw 0x8 'Step Down (Very Slow)
#raw 0xEF 'movEF
#raw 0x51 'Jump Right
#raw 0x99 'mov99
#raw 0x49 'Jump Facing Left (Right)
#raw 0x95 'mov95
#raw 0x51 'Jump Right
#raw 0x99 'mov99
#raw 0x0 'Face Down
#raw 0x54 'Jump in Place (Facing Left)
#raw 0x59 'Jump in Place (Facing Right/Left)
#raw 0x51 'Jump Right
#raw 0x49 'Jump Facing Left (Right)
#raw 0x95 'mov95
#raw 0x95 'mov95
#raw 0x11 'Step Up (Normal)
#raw 0x54 'Jump in Place (Facing Left)
#raw 0x26 'Step on the Spot Up (Faster)
#raw 0x59 'Jump in Place (Facing Right/Left)
#raw 0x99 'mov99
#raw 0x0 'Face Down
#raw 0x77 'mov77
#raw 0x11 'Step Up (Normal)
#raw 0x31 'Slide Down (Slow)
#raw 0x0 'Face Down
#raw 0xEA 'movEA
#raw 0x8 'Step Down (Very Slow)
#raw 0x50 'Jump Left
#raw 0xA1 'movA1
#raw 0x83 'mov83
#raw 0x0 'Face Down
#raw 0x1E 'Step Up (Fast)
#raw 0x25 'Step on the Spot Down (Faster)
#raw 0x95 'mov95
#raw 0x99 'mov99
#raw 0x99 'mov99
#raw 0x29 'Step on the Spot Down (Fastest)
#raw 0x9 'Step Up (Very Slow)
#raw 0xB6 'movB6
#raw 0x60 'Hide
#raw 0x3 'Face Right
#raw 0xE0 'movE0
#raw 0x50 'Jump Left
#raw 0xC7 'movC7
#raw 0x14 'Jump2 Down
#raw 0x3F 'Slide Running on Right Foot (Left)
#raw 0x19 'Delay2
#raw 0x2F 'Face Left (Delayed)
#raw 0x95 'mov95
#raw 0x99 'mov99
#raw 0x59 'Jump in Place (Facing Right/Left)
#raw 0x95 'mov95
#raw 0x95 'mov95
#raw 0x0 'Face Down
#raw 0x99 'mov99
#raw 0x55 'Jump in Place (Facing Right)
#raw 0x99 'mov99
#raw 0x95 'mov95
#raw 0x59 'Jump in Place (Facing Right/Left)
#raw 0x95 'mov95
#raw 0x99 'mov99
#raw 0x95 'mov95
#raw 0x10 'Step Down (Normal)
#raw 0x55 'Jump in Place (Facing Right)
#raw 0x99 'mov99
#raw 0x99 'mov99
#raw 0xB0 'movB0
#raw 0x1F 'Step Left (Fast)
#raw 0x85 'mov85
#raw 0xA1 'movA1
#raw 0x99 'mov99
#raw 0x99 'mov99
#raw 0x48 'Jump Facing Up (Left)
#raw 0x89 'mov89
#raw 0x80 'mov80
#raw 0x3 'Face Right
#raw 0x19 'Delay2
#raw 0xA1 'movA1
#raw 0x0 'Face Down
#raw 0x5D 'mov5D
#raw 0xA1 'movA1
#raw 0x21 'Step on the Spot Down (Normal)
#raw 0x22 'Step on the Spot Up (Normal)
#raw 0x4A 'Face Player
#raw 0x32 'Slide Up (Slow)
#raw 0x0 'Face Down
#raw 0x7 'Face Right (Faster)
#raw 0x11 'Step Up (Normal)
#raw 0xAA 'movAA
#raw 0x21 'Step on the Spot Down (Normal)
#raw 0xE7 'movE7
#raw 0x96 'mov96
#raw 0x1 'Face Up
#raw 0xEF 'movEF
#raw 0x66 'Happy (^_^)
#raw 0x92 'mov92
#raw 0x1 'Face Up
#raw 0xF7 'movF7
#raw 0x60 'Hide
#raw 0x96 'mov96
#raw 0x2 'Face Left
#raw 0xEF 'movEF
#raw 0x66 'Happy (^_^)
#raw 0x96 'mov96
#raw 0x1 'Face Up
#raw 0xAE 'movAE
#raw 0x66 'Happy (^_^)
#raw 0x94 'mov94
#raw 0x52 'Jump in Place (Facing Down)
#raw 0xB7 'movB7
#raw 0x99 'mov99
#raw 0x71 'mov71
#raw 0x9 'Step Up (Very Slow)
#raw 0xBF 'movBF
#raw 0x19 'Delay2
#raw 0x0 'Face Down
#raw 0x3 'Face Right
#raw 0xC1 'movC1
#raw 0x71 'mov71
#raw 0x0 'Face Down
#raw 0x77 'mov77
#raw 0xDD 'movDD
#raw 0xC1 'movC1
#raw 0x1C 'Delay5
#raw 0x17 'Jump2 Right
#raw 0x99 'mov99
#raw 0xC1 'movC1
#raw 0xCC 'movCC
#raw 0x0 'Face Down
#raw 0xA1 'movA1
#raw 0x96 'mov96
#raw 0x19 'Delay2
#raw 0xCC 'movCC
#raw 0x11 'Step Up (Normal)
#raw 0x60 'Hide
#raw 0x66 'Happy (^_^)
#raw 0x11 'Step Up (Normal)
#raw 0x0 'Face Down
#raw 0x66 'Happy (^_^)
#raw 0x0 'Face Down
#raw 0x60 'Hide
#raw 0x66 'Happy (^_^)
#raw 0x6 'Face Left (Faster)
#raw 0x77 'mov77
#raw 0xA1 'movA1
#raw 0x1A 'Delay3
#raw 0x0 'Face Down
#raw 0x91 'mov91
#raw 0x17 'Jump2 Right
#raw 0xAA 'movAA
#raw 0xB1 'movB1
#raw 0x1B 'Delay4
#raw 0xA1 'movA1
#raw 0x1A 'Delay3
#raw 0xB7 'movB7
#raw 0x0 'Face Down
#raw 0x1B 'Delay4
#raw 0xAA 'movAA
#raw 0x71 'mov71
#raw 0x77 'mov77
#raw 0xBB 'movBB
#raw 0x1A 'Delay3
#raw 0xBB 'movBB
#raw 0x77 'mov77
#raw 0xAC 'movAC
#raw 0x22 'Step on the Spot Up (Normal)
#raw 0x80 'mov80
#raw 0x66 'Happy (^_^)
#raw 0x0 'Face Down
#raw 0x4 'Face Down (Faster)
#raw 0x0 'Face Down
#raw 0x1 'Face Up
#raw 0x7D 'mov7D
#raw 0x11 'Step Up (Normal)
#raw 0xE3 'movE3
#raw 0xD9 'movD9
#raw 0x99 'mov99
#raw 0x0 'Face Down
#raw 0x69 'mov69
#raw 0x6 'Face Left (Faster)
#raw 0x9D 'mov9D
#raw 0x99 'mov99
#raw 0x66 'Happy (^_^)
#raw 0x0 'Face Down
#raw 0x91 'mov91
#raw 0x69 'mov69
#raw 0x17 'Jump2 Right
#raw 0x6 'Face Left (Faster)
#raw 0x0 'Face Down
#raw 0x61 'Show
#raw 0x0 'Face Down
#raw 0x59 'Jump in Place (Facing Right/Left)
#raw 0x61 'Show
#raw 0x0 'Face Down
#raw 0x57 'Jump in Place (Facing Up/Down)
#raw 0x50 'Jump Left
#raw 0x3 'Face Right
#raw 0x11 'Step Up (Normal)
#raw 0xE3 'movE3
#raw 0xE7 'movE7
#raw 0xF0 'movF0
#raw 0x1 'Face Up
#raw 0x70 'mov70
#raw 0x1 'Face Up
#raw 0x11 'Step Up (Normal)
#raw 0xE3 'movE3
#raw 0x71 'mov71
#raw 0x77 'mov77
#raw 0x10 'Step Down (Normal)
#raw 0x5 'Face Up (Faster)
#raw 0x30 'Face Right (Delayed)
#raw 0x9 'Step Up (Very Slow)
#raw 0xD0 'movD0
#raw 0x1 'Face Up
#raw 0xFC 'movFC
#raw 0x11 'Step Up (Normal)
#raw 0xE3 'movE3
#raw 0xF0 'movF0
#raw 0x1 'Face Up
#raw 0x70 'mov70
#raw 0x1 'Face Up
#raw 0xF3 'movF3
#raw 0xF1 'movF1
#raw 0xF3 'movF3

#org 0x2DD55E
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x2D 'Face Down (Delayed)
#raw 0xFE 'End of Movements

#org 0x2DD563
#raw 0x60 'Hide
#raw 0xFE 'End of Movements

#org 0x2DD566
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x2D 'Face Down (Delayed)
#raw 0xFE 'End of Movements


Which is certainly not what it should be...

Satoshi Ookami November 4th, 2009 9:17 AM

Let's use new offsets...
I can consider that those are offsets which are in ROM already... and they must not be extended what ya might've done.
So just use offsets above 0x700000/0x800000

DaVici November 4th, 2009 10:33 AM

what d'ya mean with extended? anyway, thanx for the help XD

PS: i've found the space with the free space finder...

Dr. POP November 5th, 2009 12:40 PM

I'm kind of experimenting with scripting (XSE), and I'm able to create most of the basic scripts (dialogs, flags, variables...). However, I'm still stuck with applymovement. Here's my script:

Quote:

#dynamic 0x28F12E

#org @start
applymovement 0x20 @move
release
end

#org @move
#raw 0x52
#raw 0xFE
The problem is that it just doesn't do anything when I interact with it. I tried to keep it pretty basic, but did I miss something? It should be a person jumping when interacting.
I also tried the script from diegoisawesome's tutorial thread, and that one worked fine (on the same person).
This is his script I used:
Quote:

#dynamic 0x800000

#org @start
applymovement 0x04 @move
waitmovement 0x0
applymovement 0xFF @move2
pause 0x30
applymovement 0x04 @move3
applymovement 0xFF @move3
waitmovement 0x0
release
end

#org @move
#raw 0x62
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move2
#raw 0x03
#raw 0xFE

#org @move3
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE
I can't see any differences except for the waitmovement parts. Should I change some values in AdvanceMap?
Can someone help me out on this point? Thanks!

panthers4091 November 5th, 2009 1:16 PM

Quote:

Originally Posted by Jm20 (Post 5293614)
I'm kind of experimenting with scripting (XSE), and I'm able to create most of the basic scripts (dialogs, flags, variables...). However, I'm still stuck with applymovement. Here's my script:


The problem is that it just doesn't do anything when I interact with it. I tried to keep it pretty basic, but did I miss something? It should be a person jumping when interacting.
I also tried the script from diegoisawesome's tutorial thread, and that one worked fine (on the same person).
This is his script I used:


I can't see any differences except for the waitmovement parts. Should I change some values in AdvanceMap?
Can someone help me out on this point? Thanks!

Are you using the correct person event #(where you put 0x20)?
You have to convert it from decimal to hex as well.

Also it may seem stupid but did you change the person's script you interact with and save?

Dr. POP November 5th, 2009 1:34 PM

Quote:

Originally Posted by panthers4091 (Post 5293712)
Are you using the correct person event #(where you put 0x20)?
You have to convert it from decimal to hex as well.

Also it may seem stupid but did you change the person's script you interact with and save?

I did forgot to change the people event nr. in hex, so thanks for that! (People event nr. in decimal (in the map) is 20) Sadly, it doesn't fix the problem.
Current script:
Quote:

#dynamic 0x71B2A4

#org @start
applymovement 0x14 @move
release
end

#org @move
#raw 0x52
#raw 0xFE

Problem is still that it doesn't react... :\

PS: I tried several times and rewrote the script, so there should be the correct offset inserted. Well, there is, I am sure. Thanks anyway for your help.

Pokepal17 November 5th, 2009 1:40 PM

Quote:

Originally Posted by Jm20 (Post 5293766)
I did forgot to change the people event nr. in hex, so thanks for that! (People event nr. in decimal (in the map) is 20) Sadly, it doesn't fix the problem.
Current script:

Problem is still that it doesn't react... :\

PS: I tried several times and rewrote the script, so there should be the correct offset inserted. Well, there is, I am sure. Thanks anyway for your help.

You need a waitmovement 0x0 to pause the script long enough for the movements.
Also, I think you mean 14 in decimal so it should be E.
So this will be your script.

#dynamic 0x71B2A4

#org @start
applymovement 0xE @move

waitmovement 0x0
release
end

#org @move
#raw 0x52
#raw 0xFE

Dr. POP November 7th, 2009 1:09 PM

Quote:

Originally Posted by Pokepal17 (Post 5293786)
You need a waitmovement 0x0 to pause the script long enough for the movements.
Also, I think you mean 14 in decimal so it should be E.
So this will be your script.

#dynamic 0x71B2A4

#org @start
applymovement 0xE @move

waitmovement 0x0
release
end

#org @move
#raw 0x52
#raw 0xFE

Woohoo! Thank you so much! So the "waitmovement" actually did were the problem :D (By the way, the dec number was 20, so the hex number was 14 ;) ) But thanks both panthers and pokepal who helped me so quickly!

Hi, back again! :nervous:

Trying to expand the applymovement with a msgbox command. Applying it to a person with person event # 11 (dec) (and hex). It should jump and then say "Hi!".
However, it now ignores the applymovement and just only reads the msgbox. In other words, the person now doesn't jump but only says "Hi!", while he should do both.

Quote:

#dynamic 0x71C1E0

#org @start
applymovement 0x11 @move
waitmovement 0x0
msgbox @talk 0x2
release
end

#org @move
#raw 0x52
#raw 0xFE

#org @talk
= Hi!

Is msgbox 0x2 maybe not good? Should it be 0x6?
When I enter another person # (13 for example), the other person (# 13) does jump, and the the first dude (# 11) begins talking. (It however doesn't work this way with both commands for the same person, which is essentially my problem.)

Is this something simple again? I hope so! Hopefully someone can help me! :)

Pokepal17 November 7th, 2009 2:53 PM

Quote:

Originally Posted by Jm20 (Post 5300156)
Hi, back again! :nervous:

Trying to expand the applymovement with a msgbox command. Applying it to a person with person event # 11 (dec) (and hex). It should jump and then say "Hi!".
However, it now ignores the applymovement and just only reads the msgbox. In other words, the person now doesn't jump but only says "Hi!", while he should do both.



Is msgbox 0x2 maybe not good? Should it be 0x6?
When I enter another person # (13 for example), the other person (# 13) does jump, and the the first dude (# 11) begins talking. (It however doesn't work this way with both commands for the same person, which is essentially my problem.)

Is this something simple again? I hope so! Hopefully someone can help me! :)

Try using LASTTAKED since it stores the last peron you talked to. Fixes in bold. Also, change the unknown in the person event to 03. :P Hope it works.

#dynamic 0x71C1E0

#org @start
applymovement LASTTALKED @move
waitmovement 0x0
msgbox @talk 0x2
release
end

#org @move
#raw 0x52
#raw 0xFE

#org @talk
= Hi!

Dr. POP November 7th, 2009 5:33 PM

Thanks for your reply! :embarrass I am really sorry for my stupidity, but the problem was (again!) the hex/dec number. I really can't believe I made the same mistake again :nervous:
hehe, so I entered 11 as a hex number, since I thought until 15 hex and dec were the same (I didn't think, I know). What I should have entered (and have entered by now) is 'B' (hex) instead of '11' (dec).
So there was actually nothing wrong with my script (which relieves me:cheeky:) but only with my common sense (hmm)

Anyway, thanks again!

PS: LASTTALKED also worked!

Pokepal17 November 7th, 2009 5:45 PM

Quote:

Originally Posted by Jm20 (Post 5301032)
Thanks for your reply! :embarrass I am really sorry for my stupidity, but the problem was (again!) the hex/dec number. I really can't believe I made the same mistake again :nervous:
hehe, so I entered 11 as a hex number, since I thought until 15 hex and dec were the same (I didn't think, I know). What I should have entered (and have entered by now) is 'B' (hex) instead of '11' (dec).
So there was actually nothing wrong with my script (which relieves me:cheeky:) but only with my common sense (hmm)

Anyway, thanks again!

PS: LASTTALKED also worked!

I thought you might have used the wrong hex number. And LASTTALKED will work because if our interacting with a peron and that peron is moving, LASTTALKED can replace their event number because whenever you talk to a person event, LASTTALKED get's assigned the event number as a value.

Shukumei November 8th, 2009 10:18 AM

I'm new to scripting and I'm hacking FR. I'm using XSE and advancemap. I searched this thread but didn't find anything that helped. My issue is for variables and flags. I did a little debugging on my own and it seems that the game is assigning new values to variables I use outside of my own scripts. I need a method to figure out what memory address I can safely store variables and flags in without fear of them being overwritten. Any help? Also, on a side note I was wondering if any experianced hackers would be willing to twitter back and forth with me so I don't have to go to the library every time I have a question. Thanks in advance.

Satoshi Sugimori November 9th, 2009 2:38 PM

I got a question i'm working on a hack but it needs 2 different hiro ow's the one with a normal palette and one with a darker palette, and I need them to change while playing.

So my question is: is it possible to make a script that changes the OW while entering a map?

Pokepal17 November 9th, 2009 3:13 PM

Quote:

Originally Posted by Satoshi Sugimori © (Post 5306506)
I got a question i'm working on a hack but it needs 2 different hiro ow's the one with a normal palette and one with a darker palette, and I need them to change while playing.

So my question is: is it possible to make a script that changes the OW while entering a map?

Writebytetooffset would make change it as long as you know the location of the memory address. However, the change won't be permanent and will go back to normal after you warp or go to somewhere in the menu. So ASM would be the best way to do it. :P

NarutoActor November 9th, 2009 3:17 PM

Quote:

Originally Posted by Pokepal17 (Post 5306643)
Writebytetooffset would make change it as long as you know the location of the memory address. However, the change won't be permanent and will go back to normal after you warp or go to somewhere in the menu. So ASM would be the best way to do it. :P

but, can't you use a level script for every map.

Satoshi Sugimori November 9th, 2009 3:21 PM

Quote:

Originally Posted by Pokepal17 (Post 5306643)
Writebytetooffset would make change it as long as you know the location of the memory address. However, the change won't be permanent and will go back to normal after you warp or go to somewhere in the menu. So ASM would be the best way to do it. :P

Alright thanks..
That means I have to go and learn ASM :P

Pokepal17 November 9th, 2009 3:31 PM

Quote:

Originally Posted by NarutoActor (Post 5306660)
but, can't you use a level script for every map.

What about when you open and go into the menu. The type of level script you need won't work there. Take my word - ASM is your best solution.

NarutoActor November 9th, 2009 3:42 PM

Good point. XD Its just most people can't asm.

colcolstyles November 9th, 2009 4:12 PM

Quote:

Originally Posted by Pokepal17 (Post 5306720)
What about when you open and go into the menu. The type of level script you need won't work there. Take my word - ASM is your best solution.

But a 0x07 type level script ("On entering map/on menu close") with those 'writebytetooffset' commands will activate when you return from the Bag or something like that.

qwertyuiop1234567890 November 12th, 2009 3:52 PM

1 Attachment(s)
I've just begun scripting a while ago, so I'm sorry if I missed something obvious x.x
Spoiler:
#dynamic 0x71FC38

#org @start
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x6
release
end

#org @take
givepokemon 0x3A 0x9 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @done
msgbox @6 0x6
release
end

#org @1
= This is Prof. Cinder's\nGrowlithe! Do you want to keep\nthis Growlithe?

#org @2
= ...

#org @3
= [black_fr]You received a Growlithe!

#org @4
= [black_fr]Would you like to give a\nnickname to Growlithe?

#org @5
= Growlithe seems happy

#org @6
= ...


I have a few questions on this. (The first isn't actually related to THIS script, more like scripting in general: How do you turn a number into hex? None of the tutorials seem to mention it )

Okay, on to this script. It's on a Firered ROM, I'm using XSE, and the script is *supposed* to give you a Growlithe. When I try to compile it, I get the error shown in the attachment (Error 13 "Type mismatch" on line 7. Missing #define.)


Presuming I get this problem fixed, my next order of business is to make the growlithe sprite disappear after you receive the Pokemon. I know you would do this using either a 'setflag' or a 'hidesprite' but I don't know how to put those in.

Can anyone with any of these issues?

NarutoActor November 12th, 2009 4:07 PM

its supose to be 0x0 and you need two of them. one for yes and no. compare lastresult 0x0 if 0x0 goto @yes, compare lastresult 0x0 if 0x1 goto @no

Satoshi Ookami November 13th, 2009 6:07 AM

Quote:

Originally Posted by qwertyuiop1234567890 (Post 5314762)
I have a few questions on this. (The first isn't actually related to THIS script, more like scripting in general: How do you turn a number into hex? None of the tutorials seem to mention it )

Use calculator which is part of XSE.

Quote:

Originally Posted by qwertyuiop1234567890 (Post 5314762)
I have a few questions on this. (The first isn't actually related to THIS script, more like scripting in general: How do you turn a number into hex? None of the tutorials seem to mention it ) Presuming I get this problem fixed, my next order of business is to make the growlithe sprite disappear after you receive the Pokemon. I know you would do this using either a 'setflag' or a 'hidesprite' but I don't know how to put those in.

Use setflag after player receives pokemon and put the number of flag to person's ID in A-Map. And to make it disappear when the script is progressing you should use
applymovement 0x(number of person in hex) @(something)
waitmovement 0x0

Haku. November 13th, 2009 9:11 AM

Quote:

Originally Posted by Likewise (Post 4212637)
It keeps saying Type Mismatch on line 8, but I checked the tutorials and that's how give item is supposed to go right?


...
You forgot to put #org @movey1..

Hacker42r/sT November 13th, 2009 7:47 PM

im hacking fire red. and i wanted to know how i could get rid of the script that professor oak gives you the national pokedex in, and just have him give you the national pokedex in the beginning.


All times are GMT -8. The time now is 2:55 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.