Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub
Reload this Page Script Help Thread (DO NOT REQUEST SCRIPTS)

Notices
For all updates, view the main page.

ROM Hacking Hub General discussions about ROM Hacking and Emulation. Not sure where to start? This is the place for you.
Posting links to ROMs is illegal and is not tolerated anywhere on the forum.
New threads in this forum are to be approved by a moderator before they are displayed.



Closed Thread
 
Thread Tools
  #2176    
Old September 2nd, 2009 (11:35 AM).
garra911's Avatar
garra911 garra911 is offline
Me
 
Join Date: Aug 2007
Gender:
Posts: 74
Spoiler:
#org $start
message $hey
boxset 6
applymovement 0xFF $move
pausemove 0x10
message $end
boxset 6
applymovement 0xFF $out
pausemove 0x03
release
end

#org $hey
$hey 1 = Hey Kid! Hold your horses!

#org $move
$move 1 ; #binary 0x02 0xFE

#org $end
$end 1 = Sorry, but this is the end of the\ndemo, check the Pokemon\pCommunity thread for future\nupdates.

#org $out
$out 1 ; #binary 0x01 0x0D 0x0D 0xFE


still need help
__________________
  #2177    
Old September 2nd, 2009 (01:41 PM).
jarcon jarcon is offline
 
Join Date: Aug 2009
Gender: Male
Posts: 8
I've learned alot since I last posted here... I'm still using Pokescript and will continue to, so hopefully someone can help me with it.
I'm attempting to recreate in Fire Red Oak's scripts, starting with him walking up to you at the grass then leading you into the lab. Here is my script;

Spoiler:
#org $oakcatch
lock
faceplayer
message $talkoak1
$talkoak1 1 = HOLD UP!!
boxset 6
applymovement 1 $move
$move 1 ; #binary 0x11 0x11 0x11 0x11 0x11 0x13 0x11 0xFE
pausemove 0
message $talkoak2
$talkoak2 1 = What are you doing?\lWild pokemon live in tall grass,\lits dangerous!\pI know, come with me!
boxset 6
applymovement 1 $move2
$move2 1 ; #binary 0x10 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x12 0x11 0xFE
applymovement 0xFF $move3
pausemove 0
release
end

#org $move3
$move3 1 ; #binary 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x12 0x11 0xFE


What I did was recreate what happens in the script, except change his path, your path and the text. What happens though, is Oak says 'HOLD UP!' and then the movement does not proceed, the next text proceeds. Then, after the text, the player is forced to move into the door of the lab(which is also where the warp is) however nothing happens and the script ends. Hope someone can help, thanks.
-Jarcon
  #2178    
Old September 3rd, 2009 (01:58 AM).
G Deoxys's Avatar
G Deoxys G Deoxys is offline
Beginner Rom Hacker
 
Join Date: Aug 2009
Location: Internet
Gender: Male
Nature: Timid
Posts: 21
I'm kinda new to scripting and need help with:

Trainer Scripts, Give Pokemon Scripts and Battle Scripts...

Edit: and adding more legend battles
  #2179    
Old September 3rd, 2009 (02:04 AM).
Q-Bone Q-Bone is offline
Musician and Pixel Artist
 
Join Date: Jan 2009
Location: United Kingdom
Age: 20
Gender: Male
Nature: Modest
Posts: 243
Quote originally posted by G Deoxys:
I'm kinda new to scripting and need help with:

Trainer Scripts, Give Pokemon Scripts and Battle Scripts...

Edit: and adding more legend battles
If you are using XSE, I advise refering to this thread:
http://www.pokecommunity.com/showthread.php?t=164276

Make sure you read everything though (even stuff you already know) so you can get a basic understanding of advanced stuff.
__________________
Diamond FC: 2020 9546 5045
  #2180    
Old September 3rd, 2009 (05:38 AM).
Curt_09's Avatar
Curt_09 Curt_09 is offline
Also known as Chozo
 
Join Date: Feb 2009
Location: Oklahoma
Age: 23
Gender: Male
Posts: 499
Quote originally posted by jarcon:
I've learned alot since I last posted here... I'm still using Pokescript and will continue to, so hopefully someone can help me with it.
I'm attempting to recreate in Fire Red Oak's scripts, starting with him walking up to you at the grass then leading you into the lab. Here is my script;

Spoiler:
#org $oakcatch
lock
faceplayer
message $talkoak1
$talkoak1 1 = HOLD UP!!
boxset 6
applymovement 1 $move
$move 1 ; #binary 0x11 0x11 0x11 0x11 0x11 0x13 0x11 0xFE
pausemove 0
message $talkoak2
$talkoak2 1 = What are you doing?\lWild pokemon live in tall grass,\lits dangerous!\pI know, come with me!
boxset 6
applymovement 1 $move2
$move2 1 ; #binary 0x10 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x12 0x11 0xFE
applymovement 0xFF $move3
pausemove 0
release
end

#org $move3
$move3 1 ; #binary 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x12 0x11 0xFE


What I did was recreate what happens in the script, except change his path, your path and the text. What happens though, is Oak says 'HOLD UP!' and then the movement does not proceed, the next text proceeds. Then, after the text, the player is forced to move into the door of the lab(which is also where the warp is) however nothing happens and the script ends. Hope someone can help, thanks.
-Jarcon
I'm fairly certain that you still need to use applymovement 0x1 for Oak here.
When moving characters via script, all map data is ignored; like whenever you screw up and someone ends up moving through a wall, or you get your character stuck on top of a house. Similar thing for warps, making you walk onto them doesn't work, you have to use the warp command. I don't know how to use it in PokeScript, but I imagine it's very similar to XSE.
warp 0xmapbank 0xmapnumber 0xwarpnumber 0x0 0x0
__________________
Old hacks I liked back in the day:



  #2181    
Old September 3rd, 2009 (07:05 AM).
Pokepal17's Avatar
Pokepal17 Pokepal17 is offline
More cowbell~
Silver Tier
 
Join Date: Oct 2008
Location: Steeltown
Age: 20
Gender: Male
Nature: Modest
Posts: 1,517
Quote originally posted by garra911:
Spoiler:
#org $start
message $hey
boxset 6
applymovement 0xFF $move
pausemove 0x10
message $end
boxset 6
applymovement 0xFF $out
pausemove 0x03
release
end

#org $hey
$hey 1 = Hey Kid! Hold your horses!

#org $move
$move 1 ; #binary 0x02 0xFE

#org $end
$end 1 = Sorry, but this is the end of the\ndemo, check the Pokemon\pCommunity thread for future\nupdates.

#org $out
$out 1 ; #binary 0x01 0x0D 0x0D 0xFE


still need help
If you upgrade to XSE, this would be the fixed script:

#org @start
lock
message @hey 0x6
applymovement 0xFF @move
waitmovement 0x0
message @end 0x6
applymovement 0xFF @out
waitmovement 0x0
release
end

#org @hey
= Hey Kid! Hold your horses!

#org @move
#raw 0x02 0xFE

#org @end
= Sorry, but this is the end of the\ndemo, check the Pokemon\pCommunity thread for future\nupdates.

#org @out
#raw 0x01 0x0D 0x0D 0xFE
__________________
Pokémon Stardrop
  #2182    
Old September 3rd, 2009 (06:41 PM).
cooley's Avatar
cooley cooley is offline
///Keepin' it simple
Silver Tier
 
Join Date: Feb 2007
Location: United States
Age: 20
Gender: Male
Nature: Impish
Posts: 1,150
Send a message via Windows Live Messenger to cooley Send a message via Skype™ to cooley
Quote originally posted by jarcon:
I've learned alot since I last posted here... I'm still using Pokescript and will continue to, so hopefully someone can help me with it.
I'm attempting to recreate in Fire Red Oak's scripts, starting with him walking up to you at the grass then leading you into the lab. Here is my script;

Spoiler:
#org $oakcatch
lock
faceplayer
message $talkoak1
$talkoak1 1 = HOLD UP!!
boxset 6
applymovement 1 $move
$move 1 ; #binary 0x11 0x11 0x11 0x11 0x11 0x13 0x11 0xFE
pausemove 0
message $talkoak2
$talkoak2 1 = What are you doing?\lWild pokemon live in tall grass,\lits dangerous!\pI know, come with me!
boxset 6
applymovement 1 $move2
$move2 1 ; #binary 0x10 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x12 0x11 0xFE
applymovement 0xFF $move3
pausemove 0
release
end

#org $move3
$move3 1 ; #binary 0x10 0x10 0x10 0x10 0x10 0x10 0x10 0x12 0x12 0x12 0x12 0x12 0x11 0xFE


What I did was recreate what happens in the script, except change his path, your path and the text. What happens though, is Oak says 'HOLD UP!' and then the movement does not proceed, the next text proceeds. Then, after the text, the player is forced to move into the door of the lab(which is also where the warp is) however nothing happens and the script ends. Hope someone can help, thanks.
-Jarcon
Wow, pokescript scripts look soooo unorganized nowadays, but anyways, your problem is not the script. Well, for the warping part, it is. Your problem lies in the overworld placement. It should be 1 tile down from where the screen ends in VBA.
_____________________________________
| Visual Boy advance 97% | - | ¤ | X |
| -----------------------------------------|
| -----------------------------------------|
| -----------------------------------------|
| ----------------HIRO-------------------|
| -----------------------------------------|
| -----------------------------------------|
| -----------------------------------------|
| -----------------------------------------| <-End of screen
|____________________________________| <- Put owerworld somewhere down here

And your Owerworld should be one tile down from the end of the VBA display screen if you understand what I'm trying to say..
__________________

  #2183    
Old September 3rd, 2009 (10:18 PM).
beauty. proletariat beauty. proletariat is offline
Banned
 
Join Date: Jul 2005
Location: Sydney, Australia
Gender: Female
Nature: Rash
Posts: 1,500
Hey guys. I'm working in XSE on fire red, and looking at the following offsets:
0x169BAB
0x169D78
0x169DAE

They're all scripts on professor oak's three pokeballs.

I'll break them down to what I dont understand

Spoiler:
'---------------
#org 0x169DAE
lock
faceplayer
setvar 0x4001 0x2
setvar 0x4002 0x4
setvar 0x4003 0x7
setvar 0x4004 0x6
compare 0x4055 0x3
if 0x4 goto 0x8169DE4
compare 0x4055 0x2
if 0x1 goto 0x8169BE1
msgbox 0x818EA19 MSG_KEEPOPEN '"Those are POKé BALLS.\nThey contai..."
release
end

Spoiler:
'---------------
#org 0x169D78
lock
faceplayer
setvar 0x4001 0x1
setvar 0x4002 0x7
setvar 0x4003 0x1
setvar 0x4004 0x5
compare 0x4055 0x3
if 0x4 goto 0x8169DE4
compare 0x4055 0x2
if 0x1 goto 0x8169BE1
msgbox 0x818EA19 MSG_KEEPOPEN '"Those are POKé BALLS.\nThey contai..."
release
end

Spoiler:
'---------------
#org 0x169BAB
lock
faceplayer
setvar 0x4001 0x0
setvar 0x4002 0x1
setvar 0x4003 0x4
setvar 0x4004 0x7
compare 0x4055 0x3
if 0x4 goto 0x8169DE4
compare 0x4055 0x2
if 0x1 goto 0x8169BE1
msgbox 0x818EA19 MSG_KEEPOPEN '"Those are POKé BALLS.\nThey contai..."
release
end


I dont understand all those setvars and what effect they have on choosing the pokemon.

here is the rest of the script (its the same in all of them)

Spoiler:

'---------------
#org 0x169DE4
msgbox 0x818EA45 MSG_KEEPOPEN '"That's PROF. OAK's last POKéMON."
release
end

'---------------
#org 0x169BE1
applymovement 0x4 0x81A75EF
waitmovement 0x0
showpokepic 0x4002 0xA 0x3
textcolor 0x0
compare 0x4001 0x0
if 0x1 goto 0x8169C14
compare 0x4001 0x1
if 0x1 goto 0x8169C33
compare 0x4001 0x2
if 0x1 goto 0x8169C52
end

'---------------
#org 0x169C14
msgbox 0x818E272 MSG_YESNO '"I see! BULBASAUR is your choice.\n..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169C74
compare LASTRESULT 0x0
if 0x1 goto 0x8169C71
end

'---------------
#org 0x169C33
msgbox 0x818E207 MSG_YESNO '"Hm! SQUIRTLE is your choice.\nIt's..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169C74
compare LASTRESULT 0x0
if 0x1 goto 0x8169C71
end

'---------------
#org 0x169C52
msgbox 0x818E194 MSG_YESNO '"Ah! CHARMANDER is your choice.\nYo..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169C74
compare LASTRESULT 0x0
if 0x1 goto 0x8169C71
end

'---------------
#org 0x169C74
hidepokepic
hidesprite LASTTALKED
msgbox 0x818E2E5 MSG_KEEPOPEN '"This POKéMON is really quite\nener..."
call 0x81A6675
setflag 0x828
setflag 0x291
givepokemon 0x4002 0x5 0x0 0x0 0x0 0x0
copyvar 0x4031 0x4001
bufferpokemon 0x0 0x4002
preparemsg 0x818E30D '"[player] received the [buffer1]\nf..."
waitmsg
fanfare 0x13E
waitfanfare
msgbox 0x81A56A7 MSG_YESNO '"Do you want to give a nickname to\..."
compare LASTRESULT 0x1
if 0x1 goto 0x8169CCC
compare LASTRESULT 0x0
if 0x1 goto 0x8169CDC
end

'---------------
#org 0x169C71
hidepokepic
release
end

'---------------
#org 0x1A6675
copyvar 0x8012 0x8013
return

'---------------
#org 0x169CCC
setvar 0x8004 0x0
call 0x81A74EB
goto 0x8169CDC

'---------------
#org 0x169CDC
closeonkeypress
compare 0x4001 0x0
if 0x1 goto 0x8169CFF
compare 0x4001 0x1
if 0x1 goto 0x8169D1F
compare 0x4001 0x2
if 0x1 goto 0x8169D0F
end

'---------------
#org 0x1A74EB
fadescreen 0x1
special 0x9E
waitstate
return

'---------------
#org 0x169CFF
applymovement 0x8 0x8169D62
waitmovement 0x0
goto 0x8169D2F

'---------------
#org 0x169D1F
applymovement 0x8 0x8169D72
waitmovement 0x0
goto 0x8169D2F

'---------------
#org 0x169D0F
applymovement 0x8 0x8169D6B
waitmovement 0x0
goto 0x8169D2F

'---------------
#org 0x169D2F
textcolor 0x0
msgbox 0x818DD34 MSG_KEEPOPEN '"[rival]: I'll take this one, then!"
hidesprite 0x4004
textcolor 0x3
bufferpokemon 0x0 0x4003
preparemsg 0x818DD52 '"[rival] received the [buffer1]\nfr..."
waitmsg
fanfare 0x13E
waitfanfare
setvar 0x4055 0x3
checkflag 0x83E
if 0x1 call 0x8169D5C
release
end

'---------------
#org 0x169D5C
setvar 0x4070 0x1
return


'---------
' Strings
'---------
#org 0x18EA19
= Those are POKé BALLS.\nThey contain POKéMON!

#org 0x18EA45
= That's PROF. OAK's last POKéMON.

#org 0x18E272
= I see! BULBASAUR is your choice.\nIt's very easy to raise.\pSo, [player], you want to go with\nthe GRASS POKéMON BULBASAUR?

#org 0x18E207
= Hm! SQUIRTLE is your choice.\nIt's one worth raising.\pSo, [player], you've decided on the\nWATER POKéMON SQUIRTLE?

#org 0x18E194
= Ah! CHARMANDER is your choice.\nYou should raise it patiently.\pSo, [player], you're claiming the\nFIRE POKéMON CHARMANDER?

#org 0x18E2E5
= This POKéMON is really quite\nenergetic!

#org 0x18E30D
= [player] received the [buffer1]\nfrom PROF. OAK!

#org 0x1A56A7
= Do you want to give a nickname to\nthis [buffer1]?

#org 0x18DD34
= [rival]: I'll take this one, then!

#org 0x18DD52
= [rival] received the [buffer1]\nfrom PROF. OAK!


'-----------
' Movements
'-----------
#org 0x1A75EF
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements

#org 0x169D62
#raw 0x10 'Step Down (Normal)
#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 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements

#org 0x169D72
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements

#org 0x169D6B
#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 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements


Also, please tell me if I can PM you for further questions (incase you dont like random pms) as I'm completely new to Scripting and I will be asking for a lot of help.
  #2184    
Old September 3rd, 2009 (10:49 PM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
Crystal Tier
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,592
Well instead of having a separate script for each pokéball (which is unnecessary given how similar each script would be), the makers of the game decided to save space by reusing the same "main" script for each pokéball but use variables for the parts which differed for each pokéball. For example, instead of having three different 'givepokemon' commands, they used one 'givepokemon' but set the parameter which defines which pokémon the player is to recieve to be a variable (0x4002 to be exact). This way, the pokémon that the player receives will be the pokémon that corresponds to the value stored in 0x4002. Same thing for the commands like 'bufferpokemon' and 'showpokepic'.
Each pokéball has a script which sets those variables and then a 'goto' which points to the main script.
__________________

Brother of Vrai
  #2185    
Old September 3rd, 2009 (11:58 PM). Edited September 4th, 2009 by beauty. proletariat.
beauty. proletariat beauty. proletariat is offline
Banned
 
Join Date: Jul 2005
Location: Sydney, Australia
Gender: Female
Nature: Rash
Posts: 1,500
Quote originally posted by colcolstyles:
Well instead of having a separate script for each pokéball (which is unnecessary given how similar each script would be), the makers of the game decided to save space by reusing the same "main" script for each pokéball but use variables for the parts which differed for each pokéball. For example, instead of having three different 'givepokemon' commands, they used one 'givepokemon' but set the parameter which defines which pokémon the player is to recieve to be a variable (0x4002 to be exact). This way, the pokémon that the player receives will be the pokémon that corresponds to the value stored in 0x4002. Same thing for the commands like 'bufferpokemon' and 'showpokepic'.
Each pokéball has a script which sets those variables and then a 'goto' which points to the main script.
Hmmm... Okay...

Spoiler:
'---------------
#org 0x169DAE
msgbox 0x82DD0F8 MSG_YESNO '"There is a Slakoth in the POKéBALL..."
compare LASTRESULT 0x1
if 0x1 goto 0x82D55F8
msgbox 0x82DD131 MSG_NORMAL '"You decide to leave it alone."
hidesprite 0x6
release
end

'---------------
#org 0x2D55F8
givepokemon 0x16C 0x5 0x8B 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x82DD151 MSG_KEEPOPEN '"[black_fr]You took the POKéBALL!"
waitfanfare
closeonkeypress
setflag 0x828
msgbox 0x82DD16D MSG_YESNO '"[black_fr]Would you like to give a..."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
release
end

'---------------
#org 0x1A74EB
fadescreen 0x1
special 0x9E
waitstate
return


'---------
' Strings
'---------
#org 0x2DD0F8
= There is a Slakoth in the POKéBALL.\pTake the POKéBALL?

#org 0x2DD131
= You decide to leave it alone.

#org 0x2DD151
= [black_fr]You took the POKéBALL!

#org 0x2DD16D
= [black_fr]Would you like to give a\nnickname to Slakoth?

I cant get the pokeball to hide by using hidesprite.

I tested hidesprite LASTTALKED aswell.
  #2186    
Old September 4th, 2009 (12:37 AM).
Q-Bone Q-Bone is offline
Musician and Pixel Artist
 
Join Date: Jan 2009
Location: United Kingdom
Age: 20
Gender: Male
Nature: Modest
Posts: 243
Quote originally posted by eccentric. reach:
Hmmm... Okay...

Spoiler:
'---------------
#org 0x169DAE
msgbox 0x82DD0F8 MSG_YESNO '"There is a Slakoth in the POKéBALL..."
compare LASTRESULT 0x1
if 0x1 goto 0x82D55F8
msgbox 0x82DD131 MSG_NORMAL '"You decide to leave it alone."
hidesprite 0x6
release
end

'---------------
#org 0x2D55F8
givepokemon 0x16C 0x5 0x8B 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x82DD151 MSG_KEEPOPEN '"[black_fr]You took the POKéBALL!"
waitfanfare
closeonkeypress
setflag 0x828
msgbox 0x82DD16D MSG_YESNO '"[black_fr]Would you like to give a..."
compare LASTRESULT 0x1
if 0x1 call 0x81A74EB
release
end

'---------------
#org 0x1A74EB
fadescreen 0x1
special 0x9E
waitstate
return


'---------
' Strings
'---------
#org 0x2DD0F8
= There is a Slakoth in the POKéBALL.\pTake the POKéBALL?

#org 0x2DD131
= You decide to leave it alone.

#org 0x2DD151
= [black_fr]You took the POKéBALL!

#org 0x2DD16D
= [black_fr]Would you like to give a\nnickname to Slakoth?

I cant get the pokeball to hide by using hidesprite.

I tested hidesprite LASTTALKED aswell.
After 'hidesprite' you need to use 'setflag', and the Sprite you want to hide has to have it's 'Person ID' the same number as the 'Flag'.
__________________
Diamond FC: 2020 9546 5045
  #2187    
Old September 4th, 2009 (06:48 AM).
Tropical Sunlight's Avatar
Tropical Sunlight Tropical Sunlight is offline
The Faltine
 
Join Date: Mar 2008
Location: Slovenia
Age: 19
Gender: Male
Posts: 3,578
Send a message via Windows Live Messenger to Tropical Sunlight
I was just wandering, why won't this script work?
Spoiler:
#include stdattacks.rbh

#dynamic 0x00F5E1

#org @start
lock
checkattack ATK_FISSURE
compare LASTRESULT 0x1
if 0x1 goto @have
msgbox @someday MSG_NORMAL
release
end

#org @have
setanimation 0x0 0x800D
bufferpartypokemon 0x0 0x800D
bufferattack 0x1 ATK_FISSURE
msgbox @use MSG_YESNO
compare LASTRESULT 0x0
if 0x1 goto @noiwouldnt
msgbox @useattack 0x4
closeonkeypress
doanimation 0x25
waitstate
warp 0x3 0x2 0x7 0x10 0x20

#org @noiwouldnt
release
end

#org @someday
= The soil is softer here.\nA POKéMON may be able to dig it.

#org @use
= The soil is softer here.\nA POKéMON may be able to dig it.\pWould you like to use TUNNEL?

#org @useattack
= [buffer1] used [buffer2]!
__________________
  #2188    
Old September 4th, 2009 (06:57 AM).
cooley's Avatar
cooley cooley is offline
///Keepin' it simple
Silver Tier
 
Join Date: Feb 2007
Location: United States
Age: 20
Gender: Male
Nature: Impish
Posts: 1,150
Send a message via Windows Live Messenger to cooley Send a message via Skype™ to cooley
Quote originally posted by Colorful Summer:
I was just wandering, why won't this script work?
Spoiler:
#include stdattacks.rbh

#dynamic 0x00F5E1

#org @start
lock
checkattack ATK_FISSURE
compare LASTRESULT 0x1
if 0x1 goto @have
msgbox @someday MSG_NORMAL
release
end

#org @have
setanimation 0x0 0x800D
bufferpartypokemon 0x0 0x800D
bufferattack 0x1 ATK_FISSURE
msgbox @use MSG_YESNO
compare LASTRESULT 0x0
if 0x1 goto @noiwouldnt
msgbox @useattack 0x4
closeonkeypress
doanimation 0x25
waitstate
warp 0x3 0x2 0x7 0x10 0x20
end

#org @noiwouldnt
release
end

#org @someday
= The soil is softer here.\nA POKéMON may be able to dig it.

#org @use
= The soil is softer here.\nA POKéMON may be able to dig it.\pWould you like to use TUNNEL?

#org @useattack
= [buffer1] used [buffer2]!
May I ask what's wrong with it? And why you chose the offset you did?
I understand you're trying to make another field move though.
__________________

  #2189    
Old September 4th, 2009 (07:07 AM).
Tropical Sunlight's Avatar
Tropical Sunlight Tropical Sunlight is offline
The Faltine
 
Join Date: Mar 2008
Location: Slovenia
Age: 19
Gender: Male
Posts: 3,578
Send a message via Windows Live Messenger to Tropical Sunlight
Quote originally posted by cooley:
May I ask what's wrong with it? And why you chose the offset you did?
I understand you're trying to make another field move though.
Nah, forget it.
I figured it out.

It was the offset.
I don't know why I chose it.
Also, why do I need to insert x and y positions if I have the warp chosen...?
__________________
  #2190    
Old September 4th, 2009 (07:31 AM).
cooley's Avatar
cooley cooley is offline
///Keepin' it simple
Silver Tier
 
Join Date: Feb 2007
Location: United States
Age: 20
Gender: Male
Nature: Impish
Posts: 1,150
Send a message via Windows Live Messenger to cooley Send a message via Skype™ to cooley
Quote originally posted by Colorful Summer:
Nah, forget it.
I figured it out.

It was the offset.
I don't know why I chose it.
Also, why do I need to insert x and y positions if I have the warp chosen...?
Well the things is.. you don't

You can do it two ways:
Warp 0x(bank) 0x(map) 0x(warp #) 0xFF 0xFF
or
Warp 0x(bank) 0x(map) 0xFF 0x(X) 0x(Y)

If you chose the warp # instead of X/Y, then you should replace them with 0xFF, as shown above.

If you choose the X/Y, replace the warp # with 0xFF. It's just how the command was made
__________________

  #2191    
Old September 4th, 2009 (11:16 PM).
beauty. proletariat beauty. proletariat is offline
Banned
 
Join Date: Jul 2005
Location: Sydney, Australia
Gender: Female
Nature: Rash
Posts: 1,500
Is there a script that finds the number of badges?
  #2192    
Old September 5th, 2009 (12:02 AM).
Wiimeiser Wiimeiser is offline
 
Join Date: May 2009
Gender:
Nature: Quirky
Posts: 27
How do I stop item balls respawning when I move? When I put an item ball where there wasn't one it respawns when I take one step. Is there a way to fix this? I'm testing Emerald and I've seen non-Emerald hacks with this problem too.
__________________
75% of Pokemon gamers use cheats and specially made codes to make their pokemon battle-worthy. If you are one of the 25% percent that level their Pokemon up legally, put this in your signature.
  #2193    
Old September 5th, 2009 (06:56 AM).
Pokepal17's Avatar
Pokepal17 Pokepal17 is offline
More cowbell~
Silver Tier
 
Join Date: Oct 2008
Location: Steeltown
Age: 20
Gender: Male
Nature: Modest
Posts: 1,517
Quote originally posted by Wiimeiser:
How do I stop item balls respawning when I move? When I put an item ball where there wasn't one it respawns when I take one step. Is there a way to fix this? I'm testing Emerald and I've seen non-Emerald hacks with this problem too.
Give it an ID doce of an unused flag.
__________________
Pokémon Stardrop
  #2194    
Old September 5th, 2009 (09:54 AM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
Crystal Tier
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,592
Quote originally posted by eccentric. reach:
Is there a script that finds the number of badges?
Well, it's possible but you would have to check each badge sequentially until one returned false. There isn't a nice easy special which returns the number of badges that the player has acquired; you'll have to check each one individually.

By the way, the badges (which are activated using a flag) for each version can be found in XSE's 'std.rbh' header file.
__________________

Brother of Vrai
  #2195    
Old September 5th, 2009 (06:57 PM).
Reflekz Reflekz is offline
 
Join Date: Sep 2009
Gender: Male
Posts: 6
I'm having problems getting an official battle script to work right, here is the script I have.

#dynamic 0x800000

#org @start
trainerbattle 0x1 0x2DF 0x0 @intro @defeat @after
msgbox @msg 0x2
end

#org @after
msgbox @msg2 0x2
end

#org @intro
= I'm crazy as fo.

#org @defeat
= OMFGPWNT

#org @msg
= OMFGPWNT.

#org @msg2
= You beat me..\nOMFGPWNT

Help would be appreciated :D
  #2196    
Old September 6th, 2009 (05:22 AM).
Pokepal17's Avatar
Pokepal17 Pokepal17 is offline
More cowbell~
Silver Tier
 
Join Date: Oct 2008
Location: Steeltown
Age: 20
Gender: Male
Nature: Modest
Posts: 1,517
Quote originally posted by Reflekz:
I'm having problems getting an official battle script to work right, here is the script I have.

#dynamic 0x800000

#org @start
trainerbattle 0x1 0x2DF 0x0 @intro @defeat @after
msgbox @msg 0x2
end

#org @after
msgbox @msg2 0x2
end

#org @intro
= I'm crazy as fo.

#org @defeat
= OMFGPWNT

#org @msg
= OMFGPWNT.

#org @msg2
= You beat me..\nOMFGPWNT

Help would be appreciated :D
What's the problem? Next time please tell us what's wrong, we're not psychic and if we don't know what's wrong we won't know how to fix it.
__________________
Pokémon Stardrop
  #2197    
Old September 6th, 2009 (05:31 AM).
HackMew's Avatar
HackMew HackMew is offline
Mewtwo Strikes Back
Crystal Tier
 
Join Date: Jun 2006
Posts: 1,314
Quote originally posted by colcolstyles:
Well, it's possible but you would have to check each badge sequentially until one returned false. There isn't a nice easy special which returns the number of badges that the player has acquired; you'll have to check each one individually.

By the way, the badges (which are activated using a flag) for each version can be found in XSE's 'std.rbh' header file.
There's better way. You check each badge flag. For each check, if the flag is enabled, you call a little sub-script that increment a defined variable. At the end, you'll get the number of badges. Below there's an example, assuming you're using FR/LG, if not just change the flags accordingly. The number of badges will be put into var 0x8000.

Spoiler:
#dynamic 0x800000

#org @start
setvar 0x8000 0x0
checkflag FR_BADGE1
if 0x1 call @increment
checkflag FR_BADGE2
if 0x1 call @increment
checkflag FR_BADGE3
if 0x1 call @increment
checkflag FR_BADGE4
if 0x1 call @increment
checkflag FR_BADGE5
if 0x1 call @increment
checkflag FR_BADGE6
if 0x1 call @increment
checkflag FR_BADGE7
if 0x1 call @increment
checkflag FR_BADGE8
if 0x1 call @increment
end

#org @increment
addvar 0x8000 0x1
return
__________________
  #2198    
Old September 6th, 2009 (07:31 AM). Edited September 6th, 2009 by Reflekz.
Reflekz Reflekz is offline
 
Join Date: Sep 2009
Gender: Male
Posts: 6
#dynamic 0x800000

#org @start
trainerbattle 0x1 0x2DF 0x0 @intro @defeat @after
msgbox @msg 0x2
end

#org @after
msgbox @msg2 0x2
end

#org @intro
= I'm crazy as fo.

#org @defeat
= OMFGPWNT

#org @msg
= OMFGPWNT.

#org @msg2
= You beat me..\nOMFGPWNT

Well as you can probably tell, that is the "official battle" script example from the guide provided with xse. Well, I compile the script and copy the offset to the correct elite four member using advance map.

But when I talk to him he just says the #org @msg2 text and doesn't initiate battle or anything.

What am I doing wrong?

EDIT: "The script i compiled and used had the correct trainer id just thought i'd make that clear."
  #2199    
Old September 6th, 2009 (05:22 PM).
0m3GA ARS3NAL's Avatar
0m3GA ARS3NAL 0m3GA ARS3NAL is offline
Im comin' home...
Silver Tier
 
Join Date: Jan 2008
Location: Superjail Penitentiary
Age: 22
Gender: Male
Nature: Gentle
Posts: 1,816
Quote originally posted by Reflekz:
#dynamic 0x800000

#org @start
trainerbattle 0x1 0x2DF 0x0 @intro @defeat @after
msgbox @msg 0x2
end

#org @after
msgbox @msg2 0x2
end

#org @intro
= I'm crazy as fo.

#org @defeat
= OMFGPWNT

#org @msg
= OMFGPWNT.

#org @msg2
= You beat me..\nOMFGPWNT

Well as you can probably tell, that is the "official battle" script example from the guide provided with xse. Well, I compile the script and copy the offset to the correct elite four member using advance map.

But when I talk to him he just says the #org @msg2 text and doesn't initiate battle or anything.

What am I doing wrong?

EDIT: "The script i compiled and used had the correct trainer id just thought i'd make that clear."
Has the trainer already been fought?
If so, there trainer flag is activated and you need to clear it.
__________________
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>
  #2200    
Old September 6th, 2009 (05:55 PM).
Reflekz Reflekz is offline
 
Join Date: Sep 2009
Gender: Male
Posts: 6
The trainer is an elite four member.

I've already beaten the elite four of course. Would I still have to do something with the trainer flag?
Closed Thread
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC -8. The time now is 09:00 PM.