The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

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
Click here to go to the first staff post in this thread.  
Thread Tools
  #5051    
Old January 5th, 2011 (06:23 PM).
destinedjagold's Avatar
destinedjagold
Oh Hai Thar~ 'ω'
Community Supporter
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Quote:
Originally Posted by elhound View Post
I've got a problem, I'm also still very new to scripting but I know the basics I think.

I've been trying to make a simple rival battle script for the last couple hours, winging it along the way, and taking my best guess at it. After following a few tutorials and youtube videos I had a script that somewhat worked.

It would have the rival walk over and talk and everything, go into the battle, but then after the battle it would go back to the map and you couldn't move or talk and it pretty much froze. I was using trainerbattle 0x0 then.

So I tried switching to trainerbattle 0x3 and now it won't work at all.

I just wan't to know what I did wrong, how I could fix it, and how to avoid this issue in the future.

Thank you

Here is the code I was left with at the end:

Spoiler:
#dynamic 0x804B00

#org @start
clearflag 0x1215
showsprite 0xA
applymovement 0xA @move1
waitmovement 0xA
msgbox @talk1 0x6
trainerbattle 0x03 0x14B 0x0 @win
msgbox @talk2 0x6
applymovement 0xA @move2
waitmovement 0xA
hidesprite 0xA
setflag 0x1215
setvar 0x6000 0x0001
end

#org @move1
#raw 0x62
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x3
#raw 0xFE

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

#org @talk1
= [rival]: = Hey [player]!\nLet's have a battle!

#org @win
= Aww, I lost...

#org @talk2
= [rival]: = You got lucky punk,\nnext time it won't be\lso easy.
The script is for FireRed, if I am not mistaken...
I am not really an FR hacker, but try this. Remember to back-up your ROM.
Spoiler:
#dynamic 0x804B00

#org @start
checkflag 0x1215
if 0x1 goto @done

showsprite 0xA
applymovement 0xA @move1
waitmovement 0xA
trainerbattle 0x01 0x14B 0x0 @talk1 @win @cont
end

#org @cont
msgbox @talk2 0x6
applymovement 0xA @move2
waitmovement 0xA
hidesprite 0xA
setflag 0x1215
setvar 0x6000 0x0001
release
end

#org @done
release
end


#org @move1
#raw 0x62
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x3
#raw 0xFE

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

#org @talk1
= [rival]: = Hey [player]!\nLet's have a battle!

#org @win
= Aww, I lost...

#org @talk2
= [rival]: = You got lucky punk,\nnext time it won't be\lso easy.
__________________
  #5052    
Old January 5th, 2011 (08:39 PM).
Django136's Avatar
Django136
Epic Pro Baller
 
Join Date: Dec 2010
Gender: Male
I'm somewhat new to scripting and I'm working on a script for what happens after you walk out of your house at the beginning of the game. This is a level script, and it all runs fine except for the movesprite. It just acts like that line isn't there. Am I using it right? Also, it's a hack of Fire Red.
Spoiler:

#dynamic 0x34839C

#org @start
movesprite 0x02 0x001B 0x0011
applymovement 0x02 @firstmove
waitmovement 0x0
applymovement 0x02 @notice
applymovement 0xFF @turn1
fanfare 0x0015
pause 0x30
msgbox @1 0x6
applymovement 0x02 @move
waitmovement 0x0
msgbox @2 0x6
applymovement 0x02 @move2
applymovement 0xFF @move2
waitmovement 0x0
applymovement 0x02 @move3
applymovement 0xFF @move4
waitmovement 0x0
setvar 0x4033 0x1

release
end

#org @firstmove
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0xFE

#org @notice
#raw 0x62
#raw 0xFE

#org @turn1
#raw 0x2
#raw 0xFE

#org @move
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0xFE

#org @move2
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move3
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x11
#raw 0x12
#raw 0x11
#raw 0x12
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x3
#raw 0xFE

#org @move4
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x11
#raw 0x12
#raw 0x11
#raw 0x12
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @1
= [rival]: HEYYY!!!

#org @2
= I can't believe you were\nstill sleeping!\pWe need to get going!\p[green_fr][player]: Chill! We're gonna be there\n on time.\p[black_fr][rival]: No we aren't, you suck...



  #5053    
Old January 5th, 2011 (10:01 PM).
Silent the Lucario's Avatar
Silent the Lucario
Novice Mapper
 
Join Date: Apr 2010
Location: Somewhere in Hoenn
Gender: Male
Nature: Relaxed
I don't know how to do spoilers anyway this is supposed to give you Pikachu and Abra one time but you can get it way more than once

#include stditems.rbh
#include stdpoke.rbh

//---------------
#org 0x800000
checkflag 0x1000
if 0x1 goto 0x880003C
msgbox 0x880005B MSG_FACE //"Take this pokemon and go you\nanno..."
setflag 0x828
givepokemon PKMN_ABRA 0x10 ITEM_NONE 0x0 0x0 0x0
msgbox 0x880008A MSG_FACE //"You want another one!? Whatever\nj..."
givepokemon PKMN_PIKACHU 0x10 ITEM_LIGHTBALL 0x0 0x0 0x0
end

//---------------
#org 0x80003C
hidecoins 0xD9 0xE8
nop

//---------
// Strings
//---------
#org 0x80005B
= Take this pokemon and go you\nannoying twerp!

#org 0x80008A
= You want another one!? Whatever\njust don't complain if it's not\lwhat you want!
  #5054    
Old January 6th, 2011 (01:00 AM).
Hi-Techneon's Avatar
Hi-Techneon
Trainer
 
Join Date: Dec 2010
Location: Belgium
Age: 17
Gender: Male
Nature: Rash
Quote:
Originally Posted by colcolstyles View Post
If you're trying to mimic the Mr. Briney script, then you probably should have taken a look at that script. They (the programmers) used the 'spriteinvisible' command to hide the player. I recommend that you use it as well.
PKSV said it uses 'call', and then there were some setvar and copyvar things, but I couldn't find any movement data at all. I'll just do that with XSE, then. Thanks for the help
__________________

VDex:
White:
  #5055    
Old January 6th, 2011 (01:35 AM).
djvbb12
Beginning Trainer
 
Join Date: Jan 2011
Gender: Male
I think this post belongs here. I'm having trouble compiling (using pksv) and i was wondering if anyone could tell me what I'm doing wrong. SO! this is my first time writing the script (minus the asm (thanks hackmew)) and when I compiled it and then opened PKSV up again at the offset I got nothing but meaningless crud. It'd have lines and lines saying #raw 0xE2 etc. each value was different unlike when the area is free space. and occasionally lines of script were present but not script I had written.

Here's the script I wrote:
Spoiler:

#dynamic 0x87402F2
#org @start
lock
faceplayer
checkflag 0x200
if true jump @done
setvar 0x4036 0x013
copyvar 0x8004 0x4036
special2 LASTRESULT 0x17C
compare LASTRESULT 1
if true jump @one
setvar 0x4036 0x014
copyvar 0x8004 0x4036
special2 LASTRESULT 0x17C
compare LASTRESULT 1
if true jump @two
msgbox @first
callstd MSG_NORMAL
release
end

#org @one
setvar 0x4036 0x014
copyvar 0x8004 0x4036
special2 LASTRESULT 0x17C
compare LASTRESULT 1
if true jump @both
msgbox @half
callstd MSG_NORMAL
release
end

#org @two
setvar 0x4036 0x013
copyvar 0x8004 0x4036
special2 LASTRESULT 0x17C
compare LASTRESULT 1
if true jump @both
msgbox @half
callstd MSG_NORMAL
release
end

#org @both
setvar 0x4036 0x013
copyvar 0x8004 0x4036
callasm 0x812271
setvar 0x4036 0x014
copyvar 0x8004 0x4036
callasm 0x812271
addpokemon RELICANTH 2 0 0 0 0
setflag 0x0200
storepokemon 0 RELICANTH
msgbox @finalmessage
callstd MSG_NORMAL
release
end

#org @done
msgbox @finalmessage
callstd MSG_NORMAL
release
end

#org @first
= Listen well child.\nIf you ever capture the legendary\lfire and water ghosts bring\nthem to me.

#org @half
= Hey!\nYou have the legendary ghost \v\h03 with you!\pIf you bring the other legendary ghost,\v\h02,\nI can use my powers to unite them.

#org @finalmessage
= I'm so glad that AOI\nand AKAI could finally\lbe reunited!

Again this is my first time so if you could look over the validity of the script that'd be great.
  #5056    
Old January 6th, 2011 (10:45 AM).
metapod23's Avatar
metapod23
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Quote:
Originally Posted by Django136 View Post
I'm somewhat new to scripting and I'm working on a script for what happens after you walk out of your house at the beginning of the game. This is a level script, and it all runs fine except for the movesprite. It just acts like that line isn't there. Am I using it right? Also, it's a hack of Fire Red.
Spoiler:

#dynamic 0x34839C

#org @start
movesprite 0x02 0x001B 0x0011
applymovement 0x02 @firstmove
waitmovement 0x0
applymovement 0x02 @notice
applymovement 0xFF @turn1
fanfare 0x0015
pause 0x30
msgbox @1 0x6
applymovement 0x02 @move
waitmovement 0x0
msgbox @2 0x6
applymovement 0x02 @move2
applymovement 0xFF @move2
waitmovement 0x0
applymovement 0x02 @move3
applymovement 0xFF @move4
waitmovement 0x0
setvar 0x4033 0x1

release
end

#org @firstmove
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0xFE

#org @notice
#raw 0x62
#raw 0xFE

#org @turn1
#raw 0x2
#raw 0xFE

#org @move
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0xFE

#org @move2
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move3
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x11
#raw 0x12
#raw 0x11
#raw 0x12
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x3
#raw 0xFE

#org @move4
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x11
#raw 0x12
#raw 0x11
#raw 0x12
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @1
= [rival]: HEYYY!!!

#org @2
= I can't believe you were\nstill sleeping!\pWe need to get going!\p[green_fr][player]: Chill! We're gonna be there\n on time.\p[black_fr][rival]: No we aren't, you suck...



Try the movesprite2 command. A lot of times that works better for me.

Also, why is the dynamic # 0x34839C? It should be, at the lowest, 0x700000, to be safe.


Quote:
Originally Posted by Silent the Lucario View Post
I don't know how to do spoilers anyway this is supposed to give you Pikachu and Abra one time but you can get it way more than once

Spoiler:
#include stditems.rbh
#include stdpoke.rbh

#dynamic 0x800000
//---------------
#org @start
checkflag 0x(unusedflag)
if 0x1 goto @end

checkflag 0x1000
if 0x1 goto 0x880003C
msgbox 0x880005B MSG_FACE //"Take this pokemon and go you\nanno..."
setflag 0x828
givepokemon PKMN_ABRA 0x10 ITEM_NONE 0x0 0x0 0x0
msgbox 0x880008A MSG_FACE //"You want another one!? Whatever\nj..."
givepokemon PKMN_PIKACHU 0x10 ITEM_LIGHTBALL 0x0 0x0 0x0
setflag 0x(unusedflag)
end

#org @end
msgbox @alreadygave msg_face
end

#org @alreadygave
= Some random line about not wanting to give you the same Pokemon again, blah blah blah ...


//---------------
#org 0x80003C
hidecoins 0xD9 0xE8
nop

//---------
// Strings
//---------
#org 0x80005B
= Take this pokemon and go you\nannoying twerp!

#org 0x80008A
= You want another one!? Whatever\njust don't complain if it's not\lwhat you want!
The gist of what you need to do in bold.
__________________
  #5057    
Old January 6th, 2011 (12:02 PM). Edited January 6th, 2011 by giradialkia.
Silent the Lucario's Avatar
Silent the Lucario
Novice Mapper
 
Join Date: Apr 2010
Location: Somewhere in Hoenn
Gender: Male
Nature: Relaxed
Quote:
Originally Posted by metapod23 View Post
Try the movesprite2 command. A lot of times that works better for me.

Also, why is the dynamic # 0x34839C? It should be, at the lowest, 0x700000, to be safe.




The gist of what you need to do in bold.
Thanks dude :D i figured out the other flag thing but i still couldn't get the after message to work so thank you also could you help me to make it that this person talks to you after you do more stuff like for example get all eight badges or something :D anyway here are some more scripts that i need help with

Spoiler:
#dynamic 0x800000

#org @start
trainerbattle 0x0 0x002 0x0 @intro @defeat
msgbox @msg 0x2
hidesprite 9
end

#org @intro
= Yo, you must be a new trainer.\nLet's battle

#org @defeat
= Me the Champion lost to a\nrookie....I'll be waiting for you\lin Hoenn!

#org @msg
= Meet me in Hoenn...[player]

----------------------
#org 0x212F31
trainerbattle 0x1 0x109 0x0 0x821362A 0x821370B 0x8212F66
special2 LASTRESULT 0x3C
compare LASTRESULT 0x1
if 0x1 goto 0x8212FC8
checkflag 0xA5
if 0x0 goto 0x8212FA4
msgbox 0x82139A7 '"Since you are so strong, you should..."
callstd 0x4
release
end

'-----------------------
#org 0x212F66
msgbox2 0x82137EC '"[player] received the HYPNOSIS BADGE\n..."
waitmsgbox
call 0x827207E
msgbox 0x8213816 '"The HYPNOSIS BADGE heightens the ATTAC..."
callstd 0x4
setflag 0x4F0
setflag 0x867
setvar 0x405A 0x1
addvar 0x4085 0x1
setvar 0x8008 0x1
call 0x8271F43
compare 0x4085 0x6
if 0x1 call 0x8271E84
goto 0x8212FA4
end

'-----------------------
#org 0x212FC8
trainerbattle 0x7 0x109 0x0 0x8213C2F 0x8213CF9 0x8213D93
msgbox 0x8213D12 '"WALLY: I still have much to learn..."
callstd 0x6
end

'-----------------------
#org 0x212FA4
giveitem 0x147 0x1 0x0
compare LASTRESULT 0x0
if 0x1 goto 0x8272054
setflag 0xA5
msgbox 0x82138B1 '"That TECHNICAL MACHINE, TM39,\ncont..."
callstd 0x4
release
end

'-----------------------
#org 0x27207E
fanfare 0x171
waitfanfare
return

'-----------------------
#org 0x271F43
copyvar 0x8000 0x8008
compare 0x8000 0x1
if 0x1 goto 0x8271FA1
compare 0x8000 0x2
if 0x1 goto 0x8271FAB
compare 0x8000 0x3
if 0x1 goto 0x8271FBE
compare 0x8000 0x4
if 0x1 goto 0x8271FCE
compare 0x8000 0x5
if 0x1 goto 0x8271FE7
compare 0x8000 0x6
if 0x1 goto 0x8271FFD
compare 0x8000 0x7
if 0x1 goto 0x8272010
compare 0x8000 0x8
if 0x1 goto 0x8272035
end

'-----------------------
#org 0x271E84
clearflag 0x30D
setflag 0x128
return

'-----------------------
#org 0x272054
msgbox 0x8272AD0 '"Too bad!\nThe BAG is full[.]"
callstd 0x4
release
end

'-----------------------
#org 0x271FA1
cleartrainerflag 0x140
cleartrainerflag 0x141
cleartrainerflag 0x23B
return

'-----------------------
#org 0x271FAB
cleartrainerflag 0xB3
cleartrainerflag 0x1A9
cleartrainerflag 0x1AA
cleartrainerflag 0x23C
cleartrainerflag 0x23E
cleartrainerflag 0x23D
return

'-----------------------
#org 0x271FBE
cleartrainerflag 0xBF
cleartrainerflag 0xC2
cleartrainerflag 0x143
cleartrainerflag 0x289
cleartrainerflag 0x322
return

'-----------------------
#org 0x271FCE
cleartrainerflag 0xC9
cleartrainerflag 0xCB
cleartrainerflag 0xCD
cleartrainerflag 0x288
cleartrainerflag 0x28A
cleartrainerflag 0xCC
cleartrainerflag 0xCA
cleartrainerflag 0x1F5
return

'-----------------------
#org 0x271FE7
cleartrainerflag 0x47
cleartrainerflag 0x48
cleartrainerflag 0x49
cleartrainerflag 0x4A
cleartrainerflag 0x59
cleartrainerflag 0x5A
cleartrainerflag 0x5B
return

'-----------------------
#org 0x271FFD
cleartrainerflag 0x191
cleartrainerflag 0x28E
cleartrainerflag 0x28F
cleartrainerflag 0x194
cleartrainerflag 0x192
cleartrainerflag 0x323
return

'-----------------------
#org 0x272010
cleartrainerflag 0xE9
cleartrainerflag 0xEA
cleartrainerflag 0xEB
cleartrainerflag 0xF4
cleartrainerflag 0xF5
cleartrainerflag 0xF6
cleartrainerflag 0x23F
cleartrainerflag 0x246
cleartrainerflag 0x247
cleartrainerflag 0x248
cleartrainerflag 0x24F
cleartrainerflag 0x249
return

'-----------------------
#org 0x272035
cleartrainerflag 0x265
cleartrainerflag 0x266
cleartrainerflag 0x76
cleartrainerflag 0x80
cleartrainerflag 0x81
cleartrainerflag 0x82
cleartrainerflag 0x83
cleartrainerflag 0x12D
cleartrainerflag 0x1F6
cleartrainerflag 0x73
return


'---------
' Strings
'---------
#org 0x21362A
= = Hello I am Wally,the Palpolis Gym\nLeader! I became a Gym leader so I\lcan show that Psychic types can be\lgood using phsyical and\lnon-phsyical move! I hope you take\lme seriously!

#org 0x21370B
= So[.]\nI lost[.]\pIt seems that I still have much more\nto learn[.]\pI understand.\pThe POKéMON LEAGUE's rules state\nthat TRAINERS are to be given this\lif they defeat a GYM LEADER.\pPlease accept the official POKéMON\nLEAGUE HYPNOSIS BADGE.

#org 0x2139A7
= Since you are so strong, you should\nchallenge other GYM LEADERS.\pBy battling many TRAINERS, you should\nlearn many things.

#org 0x2137EC
= [player] received the HYPNOSIS BADGE\nfrom ROXANNE.

#org 0x213816
= The HYPNOSIS BADGE heightens the ATTACK\npower of your POKéMON.\pIt also enables them to use the HM move\nCUT outside of battle.\pPlease take this with you, too.

#org 0x213C2F
= WALLY: I'm so glad to see you again.\nI'm WALLY, the GYM LEADER here.\pI'm sure we've both experienced many\nbattles since we last met.\pI would like to see how much better\nwe've become. Let us battle!

#org 0x213CF9
= Grr[.]\nAgain, I have lost[.]

#org 0x213D93
= WALLY: I'm so glad to see you again.\nI'm WALLY, the GYM LEADER here.\pI'm sure we've both experienced many\nbattles since we last met.\pI would like to see how much better\nwe've become[.]\pOh, no[.]\nYou only have one POKéMON with you?\pPlease return with at least one more\nPOKéMON.

#org 0x213D12
= WALLY: I still have much to learn\nwhen it comes to battling POKéMON.\pThat awareness makes me love battling\nall that much more!

#org 0x2138B1
= That TECHNICAL MACHINE, TM29,\ncontains PSYCHIC.\pIt not only inflicts damage by tapping\ninto psychic powers\pIf you use a TM, it instantly teaches\nthe move to a POKéMON.\pRemember, a TM can be used only once,\nso think before you use it.

#org 0x272AD0
= Too bad!\nThe BAG is full[.]
#dynamic 0x800000
#org @main
msgbox @msg 0x2
end

#org @msg
= Prof.ELM's House


I'll send rest later (i have like 10 or 15 more :D)
  #5058    
Old January 6th, 2011 (04:06 PM).
Binary's Avatar
Binary
え?
 
Join Date: Aug 2007
Age: 20
@Silent the Lucario:
Is everything in the spoiler a single script? If not, I suggest you separate them since it would make things easier.
I can see 3 different scripts, and you haven't really mentioned the problems you're facing with them.
__________________
  #5059    
Old January 7th, 2011 (07:23 AM).
metapod23's Avatar
metapod23
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Quote:
Originally Posted by Silent the Lucario View Post
Thanks dude :D i figured out the other flag thing but i still couldn't get the after message to work so thank you also could you help me to make it that this person talks to you after you do more stuff like for example get all eight badges or something :D[/spoiler]
The eighth badge is activated by setting flag 0x827, so just use checkflag 0x827 and have it go to the script you want if it's set.

Quote:
anyway here are some more scripts that i need help with

Spoiler:
#dynamic 0x800000

#org @start
trainerbattle 0x0 0x002 0x0 @intro @defeat
msgbox @msg 0x2
hidesprite 9
end

#org @intro
= Yo, you must be a new trainer.\nLet's battle

#org @defeat
= Me the Champion lost to a\nrookie....I'll be waiting for you\lin Hoenn!

#org @msg
= Meet me in Hoenn...[player]

----------------------
#org 0x212F31
trainerbattle 0x1 0x109 0x0 0x821362A 0x821370B 0x8212F66
special2 LASTRESULT 0x3C
compare LASTRESULT 0x1
if 0x1 goto 0x8212FC8
checkflag 0xA5
if 0x0 goto 0x8212FA4
msgbox 0x82139A7 '"Since you are so strong, you should..."
callstd 0x4
release
end

'-----------------------
#org 0x212F66
msgbox2 0x82137EC '"[player] received the HYPNOSIS BADGE\n..."
waitmsgbox
call 0x827207E
msgbox 0x8213816 '"The HYPNOSIS BADGE heightens the ATTAC..."
callstd 0x4
setflag 0x4F0
setflag 0x867
setvar 0x405A 0x1
addvar 0x4085 0x1
setvar 0x8008 0x1
call 0x8271F43
compare 0x4085 0x6
if 0x1 call 0x8271E84
goto 0x8212FA4
end

'-----------------------
#org 0x212FC8
trainerbattle 0x7 0x109 0x0 0x8213C2F 0x8213CF9 0x8213D93
msgbox 0x8213D12 '"WALLY: I still have much to learn..."
callstd 0x6
end

'-----------------------
#org 0x212FA4
giveitem 0x147 0x1 0x0
compare LASTRESULT 0x0
if 0x1 goto 0x8272054
setflag 0xA5
msgbox 0x82138B1 '"That TECHNICAL MACHINE, TM39,\ncont..."
callstd 0x4
release
end

'-----------------------
#org 0x27207E
fanfare 0x171
waitfanfare
return

'-----------------------
#org 0x271F43
copyvar 0x8000 0x8008
compare 0x8000 0x1
if 0x1 goto 0x8271FA1
compare 0x8000 0x2
if 0x1 goto 0x8271FAB
compare 0x8000 0x3
if 0x1 goto 0x8271FBE
compare 0x8000 0x4
if 0x1 goto 0x8271FCE
compare 0x8000 0x5
if 0x1 goto 0x8271FE7
compare 0x8000 0x6
if 0x1 goto 0x8271FFD
compare 0x8000 0x7
if 0x1 goto 0x8272010
compare 0x8000 0x8
if 0x1 goto 0x8272035
end

'-----------------------
#org 0x271E84
clearflag 0x30D
setflag 0x128
return

'-----------------------
#org 0x272054
msgbox 0x8272AD0 '"Too bad!\nThe BAG is full[.]"
callstd 0x4
release
end

'-----------------------
#org 0x271FA1
cleartrainerflag 0x140
cleartrainerflag 0x141
cleartrainerflag 0x23B
return

'-----------------------
#org 0x271FAB
cleartrainerflag 0xB3
cleartrainerflag 0x1A9
cleartrainerflag 0x1AA
cleartrainerflag 0x23C
cleartrainerflag 0x23E
cleartrainerflag 0x23D
return

'-----------------------
#org 0x271FBE
cleartrainerflag 0xBF
cleartrainerflag 0xC2
cleartrainerflag 0x143
cleartrainerflag 0x289
cleartrainerflag 0x322
return

'-----------------------
#org 0x271FCE
cleartrainerflag 0xC9
cleartrainerflag 0xCB
cleartrainerflag 0xCD
cleartrainerflag 0x288
cleartrainerflag 0x28A
cleartrainerflag 0xCC
cleartrainerflag 0xCA
cleartrainerflag 0x1F5
return

'-----------------------
#org 0x271FE7
cleartrainerflag 0x47
cleartrainerflag 0x48
cleartrainerflag 0x49
cleartrainerflag 0x4A
cleartrainerflag 0x59
cleartrainerflag 0x5A
cleartrainerflag 0x5B
return

'-----------------------
#org 0x271FFD
cleartrainerflag 0x191
cleartrainerflag 0x28E
cleartrainerflag 0x28F
cleartrainerflag 0x194
cleartrainerflag 0x192
cleartrainerflag 0x323
return

'-----------------------
#org 0x272010
cleartrainerflag 0xE9
cleartrainerflag 0xEA
cleartrainerflag 0xEB
cleartrainerflag 0xF4
cleartrainerflag 0xF5
cleartrainerflag 0xF6
cleartrainerflag 0x23F
cleartrainerflag 0x246
cleartrainerflag 0x247
cleartrainerflag 0x248
cleartrainerflag 0x24F
cleartrainerflag 0x249
return

'-----------------------
#org 0x272035
cleartrainerflag 0x265
cleartrainerflag 0x266
cleartrainerflag 0x76
cleartrainerflag 0x80
cleartrainerflag 0x81
cleartrainerflag 0x82
cleartrainerflag 0x83
cleartrainerflag 0x12D
cleartrainerflag 0x1F6
cleartrainerflag 0x73
return


'---------
' Strings
'---------
#org 0x21362A
= = Hello I am Wally,the Palpolis Gym\nLeader! I became a Gym leader so I\lcan show that Psychic types can be\lgood using phsyical and\lnon-phsyical move! I hope you take\lme seriously!

#org 0x21370B
= So[.]\nI lost[.]\pIt seems that I still have much more\nto learn[.]\pI understand.\pThe POKéMON LEAGUE's rules state\nthat TRAINERS are to be given this\lif they defeat a GYM LEADER.\pPlease accept the official POKéMON\nLEAGUE HYPNOSIS BADGE.

#org 0x2139A7
= Since you are so strong, you should\nchallenge other GYM LEADERS.\pBy battling many TRAINERS, you should\nlearn many things.

#org 0x2137EC
= [player] received the HYPNOSIS BADGE\nfrom ROXANNE.

#org 0x213816
= The HYPNOSIS BADGE heightens the ATTACK\npower of your POKéMON.\pIt also enables them to use the HM move\nCUT outside of battle.\pPlease take this with you, too.

#org 0x213C2F
= WALLY: I'm so glad to see you again.\nI'm WALLY, the GYM LEADER here.\pI'm sure we've both experienced many\nbattles since we last met.\pI would like to see how much better\nwe've become. Let us battle!

#org 0x213CF9
= Grr[.]\nAgain, I have lost[.]

#org 0x213D93
= WALLY: I'm so glad to see you again.\nI'm WALLY, the GYM LEADER here.\pI'm sure we've both experienced many\nbattles since we last met.\pI would like to see how much better\nwe've become[.]\pOh, no[.]\nYou only have one POKéMON with you?\pPlease return with at least one more\nPOKéMON.

#org 0x213D12
= WALLY: I still have much to learn\nwhen it comes to battling POKéMON.\pThat awareness makes me love battling\nall that much more!

#org 0x2138B1
= That TECHNICAL MACHINE, TM29,\ncontains PSYCHIC.\pIt not only inflicts damage by tapping\ninto psychic powers\pIf you use a TM, it instantly teaches\nthe move to a POKéMON.\pRemember, a TM can be used only once,\nso think before you use it.

#org 0x272AD0
= Too bad!\nThe BAG is full[.]
#dynamic 0x800000
#org @main
msgbox @msg 0x2
end

#org @msg
= Prof.ELM's House


I'll send rest later (i have like 10 or 15 more :D)
As Binary said, not sure what all the problems are with the scripts you have, you have to say what you're having trouble with. The first one, with the hidesprite, you might need to put a flag number in the person's ID and put setflag 0x(flag number in person's ID) in the script to make the sprite permanently hidden.
__________________
  #5060    
Old January 7th, 2011 (11:35 AM).
Nomad_Mu's Avatar
Nomad_Mu
Beginning Trainer
 
Join Date: Sep 2010
Location: Foot of the Mountain, Misery
Age: 23
Gender: Male
Nature: Adamant
What is the command to enable/activate the PokéDex? So far I've only been able to find the National Dex command.
__________________
There is no such thing as overkill, just sufficient firepower.
Current Project:
  #5061    
Old January 7th, 2011 (11:53 AM).
Binary's Avatar
Binary
え?
 
Join Date: Aug 2007
Age: 20
Quote:
Originally Posted by Nomad_Mu View Post
What is the command to enable/activate the PokéDex? So far I've only been able to find the National Dex command.
Assuming it's for FR/LG, the flag 0x829 activates Pokedex Menu.
__________________
  #5062    
Old January 7th, 2011 (11:53 AM).
Hi-Techneon's Avatar
Hi-Techneon
Trainer
 
Join Date: Dec 2010
Location: Belgium
Age: 17
Gender: Male
Nature: Rash
Quote:
Originally Posted by Nomad_Mu View Post
What is the command to enable/activate the PokéDex? So far I've only been able to find the National Dex command.
It uses a flag. Flag 0x801 for Ruby if I'm right. Use setflag to enable it and clearflag to disable it.
__________________

VDex:
White:
  #5063    
Old January 7th, 2011 (11:59 AM). Edited January 7th, 2011 by Nomad_Mu.
Nomad_Mu's Avatar
Nomad_Mu
Beginning Trainer
 
Join Date: Sep 2010
Location: Foot of the Mountain, Misery
Age: 23
Gender: Male
Nature: Adamant
Major edit, I missed the post by Binary. Thank you both.
Yes, I am working on a FireRed hack, sorry I forgot to mention that.

Would there be any problems by activating both the PokéDex and National Dex at the same time?
__________________
There is no such thing as overkill, just sufficient firepower.
Current Project:
  #5064    
Old January 7th, 2011 (12:12 PM).
Binary's Avatar
Binary
え?
 
Join Date: Aug 2007
Age: 20
Quote:
Originally Posted by Nomad_Mu View Post
Major edit, I missed the post by Binary. Thank you both.
Yes, I am working on a FireRed hack, sorry I forgot to mention that.

Would there be any problems by activating both the PokéDex and National Dex at the same time?
None that I know of. There shouldn't be any problems.
Haven't really tried though.
__________________
  #5065    
Old January 7th, 2011 (12:15 PM).
Hi-Techneon's Avatar
Hi-Techneon
Trainer
 
Join Date: Dec 2010
Location: Belgium
Age: 17
Gender: Male
Nature: Rash
Quote:
Originally Posted by Nomad_Mu View Post
Major edit, I missed the post by Binary. Thank you both.
Yes, I am working on a FireRed hack, sorry I forgot to mention that.

Would there be any problems by activating both the PokéDex and National Dex at the same time?
There shouldn't be any problems since the PokéDex is active once you start your game, but it isn't visible in the menu until you use the setflag command to make it visible in the menu.
__________________

VDex:
White:
  #5066    
Old January 7th, 2011 (06:21 PM). Edited January 7th, 2011 by Silent the Lucario.
Silent the Lucario's Avatar
Silent the Lucario
Novice Mapper
 
Join Date: Apr 2010
Location: Somewhere in Hoenn
Gender: Male
Nature: Relaxed
I don't need any help with those scipts anymore :D their useless now

Edit: I need help with this script

Spoiler:
#include stdpoke.rbh
#dynamic 0x800000

#org @start
checkflag 0x827
checkflag 0x2000
if 0x1 goto @stealbadges
checkflag 0x1000
checkflag 0x828
checkflag 0x829
if 0x1 goto @nomore
msgbox @starters 0x2
givepokemon PKMN_MAGBY 0x10 0x0 0x0 0x0 0x0
givepokemon PKMN_PICHU 0x10 0x0 0x0 0x0 0x0
setflag 0x1000
setflag 0x828
setflag 0x829
end

#org @stealbadges
msgbox @gottosteal 0x2
clearflag 0x820
clearflag 0x821
clearflag 0x822
clearflag 0x823
clearflag 0x824
clearflag 0x825
clearflag 0x826
clearflag 0x827
setflag 0x1001
end

#org @gottosteal
= I'm taking your badges so you can\ngo to the new region and start\lyour journey there! Don't worry\lthey'll let you fight them! I'm\lsure!

#org @nomore
checkflag 0x1002
if 0x1 goto @annoy
msgbox @giveno 0x2
setflag 0x1002
end

#org @giveno
= Go on your journey! But make sure\nto come back after you have beaten\lthe Elite Four! I'll have\lsomething to give you!

#org @annoy
msgbox @annoying 0x2
end

#org @annoying
= Just leave already!

#org @starters
= Sky: Hello [player] I'm Profeesor\nSky! This is my pokemon Lab! I\lassume you are here for a starter\lright?\p[player]: Yes Proffessor I've been\nwaiting my whole life to get a\lPokemon\pSky: Well [player] your not just\ngetting one but, two pokemon!\p[player]: Awesome!\pSky: Yes I know. Anyway I'm also\ngiving you a pokedex make sure to\lkeep it safe!\p[player]: Yes Proffessor! Thank\nyou!\pSky: No problem! Now get started\non your Journey!


It keeps on going to a part of the script that only happens when you get the eighth gym badge and when the champion activates a flag and i don't have the eighth gym badge nor did I even put the champion script in the game yet
__________________
I support all nintendo handheld hacking.

---------------------------------------------------------------------------
I'm novice mapper and a Intermediate scripter

If you need any help with scripting don't refrain to ask!
Pokemon Emerald Rules!


Hacks I support:




Pokemon Shinygold


Please click my egg it'll get lonely



  #5067    
Old January 7th, 2011 (06:33 PM). Edited January 14th, 2011 by phantom12.
phantom12
Beginning Trainer
 
Join Date: May 2010
when ever i try this script the chareter just freezes in spot.
It is supposed to make a sprite move to the right, trainer battle and then give a item


[b]Game: ruby
[b]Type: script
[b]Editor: xse
[/spoiler]
#dynamic 0x291403
'---------------
#org @start
lock
checkflag 0x7
if 0x0 goto @snippet1
release
end
'---------------
#org @snippet1
msgbox @string1 0x6 '"Beat it! i'm working hear."
applymovement 0x1 @move1
waitmovement 0x0
trainerbattle 0x0 0x8 0x0 @string2 @string3
msgbox @string4 0x6 '"How could my virus pokemon fail i\..."
giveitem 0x1 0xA 0x0
setflag 0x7
release
end

'---------
' Strings
'---------
#org @string1
= Beat it! i'm working hear.
#org @string2
= Go! my virus pokemon.
#org @string3
= Time for me to escape.
#org @string4
= How could my virus pokemon fail i\nhave to retreat for now.\pPOKEDEX: he dropped something.

'-----------
' Movements
'-----------
#org @move1
#raw 0x24 'Step on the Spot Right (Faster)
#raw 0x24 'Step on the Spot Right (Faster)
#raw 0x24 'Step on the Spot Right (Faster)
#raw 0x24 'Step on the Spot Right (Faster)
#raw 0x24 'Step on the Spot Right (Faster)
#raw 0x24 'Step on the Spot Right (Faster)
#raw 0xFE 'End of Movements
  #5068    
Old January 7th, 2011 (09:10 PM).
metapod23's Avatar
metapod23
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Quote:
Originally Posted by Silent the Lucario View Post
I don't need any help with those scipts anymore :D their useless now

Edit: I need help with this script

Spoiler:
#include stdpoke.rbh
#dynamic 0x800000

#org @start
checkflag 0x827
if 0x1 goto @stealbadges
checkflag 0x2000
if 0x1 goto @stealbadges
checkflag 0x1000
if 0x1 goto @nomore
checkflag 0x828
if 0x1 goto @nomore
checkflag 0x829
if 0x1 goto @nomore

msgbox @starters 0x2
givepokemon PKMN_MAGBY 0x10 0x0 0x0 0x0 0x0
givepokemon PKMN_PICHU 0x10 0x0 0x0 0x0 0x0
setflag 0x1000
setflag 0x828
setflag 0x829
end

#org @stealbadges
checkflag 0x1001
if 0x1 goto @end

msgbox @gottosteal 0x2
clearflag 0x820
clearflag 0x821
clearflag 0x822
clearflag 0x823
clearflag 0x824
clearflag 0x825
clearflag 0x826
clearflag 0x827
setflag 0x1001
end

#org @end
* script you want to run after the badges are deactivated


#org @gottosteal
= I'm taking your badges so you can\ngo to the new region and start\lyour journey there! Don't worry\lthey'll let you fight them! I'm\lsure!

#org @nomore
checkflag 0x1002
if 0x1 goto @annoy
msgbox @giveno 0x2
setflag 0x1002
end

#org @giveno
= Go on your journey! But make sure\nto come back after you have beaten\lthe Elite Four! I'll have\lsomething to give you!

#org @annoy
msgbox @annoying 0x2
end

#org @annoying
= Just leave already!

#org @starters
= Sky: Hello [player] I'm Profeesor\nSky! This is my pokemon Lab! I\lassume you are here for a starter\lright?\p[player]: Yes Proffessor I've been\nwaiting my whole life to get a\lPokemon\pSky: Well [player] your not just\ngetting one but, two pokemon!\p[player]: Awesome!\pSky: Yes I know. Anyway I'm also\ngiving you a pokedex make sure to\lkeep it safe!\p[player]: Yes Proffessor! Thank\nyou!\pSky: No problem! Now get started\non your Journey!


It keeps on going to a part of the script that only happens when you get the eighth gym badge and when the champion activates a flag and i don't have the eighth gym badge nor did I even put the champion script in the game yet
Some changes in bold - not sure why you're setting three flags (0x1000, 0x828, and 0x829) and needing to check all three of them. Whatever it's for, you probably only need to check flag 0x1000 at the beginning of the script, anyway.

If you need the @stealbadges script to activate only when both flags (0x827 and 0x1000) are active, it would have to be like this:

Code:
checkflag 0x827
if 0x1 goto @check2
......

#org @check2
checkflag 0x1000
if 0x1 goto @stealbadges
(rest of script)
__________________
  #5069    
Old January 7th, 2011 (09:19 PM).
SnapTime's Avatar
SnapTime
Unhatched Egg
 
Join Date: Dec 2010
Gender: Male
Hey guys im having a problem with my script still. Its been awhile and I still cant figure it out.
After the battle, the rival says his lines and then disappears without doing the movement first.
Here's the script.

Quote:
#dyn 0x740000
#org @begin
trainerbattle 0x1 0x211 0x0 @intro @defeat @after
end

#org @after
lock
msgbox @afterwards
callstd msg_normal
applymovement 0x10 @move
pauseevent 0x0
disappear LASTTALKED
setflag 0x251
release
end

#org @intro
= I will crush you!!!

#org @defeat
= You crushed me[.]

#org @afterwards
= I can also say something after the battle.

#org @move
= m walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end
Here's the events log in AM which i think might be the problem.
  #5070    
Old January 7th, 2011 (11:28 PM).
destinedjagold's Avatar
destinedjagold
Oh Hai Thar~ 'ω'
Community Supporter
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
your problem is the applymovement 0x10 @move line...
Remember that 10 and 0x10 are not the same.
So either use applymovement 10 @move or applymovement 0xA @move...
__________________
  #5071    
Old January 8th, 2011 (06:55 AM).
Silent the Lucario's Avatar
Silent the Lucario
Novice Mapper
 
Join Date: Apr 2010
Location: Somewhere in Hoenn
Gender: Male
Nature: Relaxed
I fixed the script :D i just needed to talk to the person from behind and it worked perfectly :D
__________________
I support all nintendo handheld hacking.

---------------------------------------------------------------------------
I'm novice mapper and a Intermediate scripter

If you need any help with scripting don't refrain to ask!
Pokemon Emerald Rules!


Hacks I support:




Pokemon Shinygold


Please click my egg it'll get lonely



  #5072    
Old January 8th, 2011 (08:04 AM).
SnapTime's Avatar
SnapTime
Unhatched Egg
 
Join Date: Dec 2010
Gender: Male
Quote:
Originally Posted by destinedjagold View Post
your problem is the applymovement 0x10 @move line...
Remember that 10 and 0x10 are not the same.
So either use applymovement 10 @move or applymovement 0xA @move...
Thanks so much for helping me out, well now my script looks like this:
Quote:
#org 0x874110A
'-----------------------------------
trainerbattle 0x1 0x211 0x0 0x874682C 0x87487E2 0x8746785
end

#org 0x8746785
'-----------------------------------
lock
msgbox 0x8750248 ' I can also say somet...
callstd MSG_LOCK ' Built-in lock command
applymovement 0xA 0x885D5B2 ' walk_up walk_right w...
pauseevent 0x0
disappear LASTTALKED
setflag 0x251
release
end


#org 0x874682C
= I will crush you!!!

#org 0x87487E2
= You crushed me[.]

#org 0x8750248
= I can also say something after the battle.

#org 0x885D5B2
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right end
After the battle, he talks to you, then pauses, then disappears with no movement.
  #5073    
Old January 8th, 2011 (11:52 AM).
Hi-Techneon's Avatar
Hi-Techneon
Trainer
 
Join Date: Dec 2010
Location: Belgium
Age: 17
Gender: Male
Nature: Rash
Quote:
Originally Posted by SnapTime View Post
Thanks so much for helping me out, well now my script looks like this:


After the battle, he talks to you, then pauses, then disappears with no movement.
Not sure or it works, but try applymovement LASTTALKED OFFSET, it might work
__________________

VDex:
White:
  #5074    
Old January 8th, 2011 (12:22 PM).
SnapTime's Avatar
SnapTime
Unhatched Egg
 
Join Date: Dec 2010
Gender: Male
Quote:
Originally Posted by Hi-Techneon View Post
Not sure or it works, but try applymovement LASTTALKED OFFSET, it might work
thanks but that didnt work either
the script looks fine to me.
I think its a problem with my event log maybe. Or maybe because hes a trainer and its not an actual script?
  #5075    
Old January 9th, 2011 (09:30 AM).
Atterny's Avatar
Atterny
Pokemon Scarlet Head Hacker
 
Join Date: Jan 2010
Age: 19
Gender: Male
Nature: Naive
Ruby
Person Script (givepokemon)

Spoiler:
#dynamic 0x801B51

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

#org @option1
Msgbox @3 0x5
If 0x0 goto @option2
Givepokemon 0x115 0x5 0x0 0x0 0x0 0x0
Fanfare 0x13E
Msgbox @4 0x4
Waitfanfare
Closeonkeypress
Setflag 0x8D3
Msgbox @5 0x5
Compare LASTRESULT 0x1
If 0x1 gosub @name
Msgbox @6 0x6
Release
End

#org @option2
Msgbox @7 0x5
If 0x0 goto @option3
Givepokemon 0x118 0x5 0x0 0x0 0x0 0x0
Fanfare 0x13E
Msgbox @4 0x4
Waitfanfare
Closeonkeypress
Setflag 0x8D3
Msgbox @5 0x5
Compare LASTRESULT 0x1
If 0x1 gosub @name
Msgbox @6 0x6
Release
End

#org @option3
Msgbox @8 0x5
If 0x0 goto @option1
Givepokemon 0x11B 0x5 0x0 0x0 0x0 0x0
Fanfare 0x13E
Msgbox @4 0x4
Waitfanfare
Closeonkeypress
Setflag 0x8D3
Msgbox @5 0x5
Compare LASTRESULT 0x1
If 0x1 gosub @name
Msgbox @6 0x6
Release
End

#org @name
Call 0x1A74EB
Return

#org @done
Msgbox @15 0x6

#org @1
= Want a pokemon?

#org @2
= How are you?

#org @3
= Do you want CHULEE,\nThe kungfu bird?

#org @4
= Here you go.

#org @5
= Do you want to name it?

#org @6
= Congratulations!\n You’ve just got\lyour first pokemon!

#org @7
= Do you want DRATT?\nThe dark beast?

#org @8
= Do you want LEEBRIO?\nThe happy spirit?


I debug and compile the script, and it all works fine, but when i talk to the person nothing happens, any ideas? (i think im missing something but i can't figure it out.)
__________________
All you do, no matter how amazing, will never amount to what you can do on any video rated 13+ or M, no matter what.
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 04:33 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 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 - 2014 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.