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
  #5601    
Old April 29th, 2011, 03:31 PM
Shiny Metagross
Beginning Trainer
 
Join Date: Apr 2011
Gender: Male
For some reason, the script isn't running when I step on the tile. My var number and value are set correctly in A-Map(though I don't know if or what I need to set the unknowns...), and I have the person ID right.
Code:
#dynamic 0x800000

#org @start
setvar 0x6000 0x0001
applymovement 0x0 @move1
waitmovement 0x0
msgbox @1 0x2
applymovement 0xFF @move2
waitmovement 0xFF
msgbox @2 0x2
setflag 0x800
givepokemon 0x97 0x64 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
msgbox @4 0x2
giveitem 0x1 0x1 MSG_OBTAIN
applymovement 0x0 @move3
waitmovement 0x0
pause 0x20
setmaptile 0x0A 0x0A 0x23D 0x0
setmaptile 0x0A 0x0B 0x245 0x0
setmaptile 0x0A 0x0C 0x24D 0x0
special 0x8E
applymovement 0x0 @move4
waitmovement 0x0
msgbox @5 0x6
release
end

#org @move1
#raw 0x56
#raw 0x08
#raw 0x03
#raw 0xFE

#org @move2
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0xFE

#org @move3
#raw 0x00
#raw 0xFE

#org @move4
#raw 0x09
#raw 0x64
#raw 0xFE

#org @1
= Dad: [player]!\n Over here!

#org @2
= Dad: You've been waiting a long\ntime for this day, haven't\lyou, [player]?\pWell, now the time has come for\nyou to catch your very own\lPok\h1Bmon!\pYou'll need a Pok\h1Bmon to protect\n you in the forest...

#org @3
= [player] obtained Mew!

#org @4
= Dad: When you find the pok\h1Bmon\nyou want, use this, but choose\lwisely!

#org @5
= Dad: Now you're all set to go!\p Good luck, [player]!
  #5602    
Old April 29th, 2011, 04:10 PM
Crimson5M's Avatar
Crimson5M
what
Community Supporter
 
Join Date: Feb 2011
Location: Scotland
Age: 19
Gender: Male
Nature: Quiet
Does anyone know what is wrong with this script? I'm using XSE and Ruby.
Spoiler:
Code:
#dynamic 0x800000

//---------------
#org @start
lock
faceplayer
call @face
cry 0x121 0x1
msgbox @msg1 0x6
waitcry
hidepokepic
release
end 

#org @msg1
= [grey_rs]Patrat: Pat...Patrat!

#org @face
showpokepic 0x1 0x1 0x1
hidebox 0x1 0x1 0xF 0xF
pause 0x1
hidepokepic
showpokepic 0xfe 0x15 0x6
hidebox 0x15 0x6 0xe 0xe
return


The box won't hide. Or at least, not all of it. Most of it just stays there.
__________________

Because it should've won HotY.
Pear
Frodo Baggins
Twitter
Youtube
CBC
  #5603    
Old May 1st, 2011, 01:42 PM
~Anbuja's Avatar
~Anbuja
Let's Keep It Simple
 
Join Date: Oct 2010
Location: In Snorlax Stomach
Gender: Male
Nature: Lonely
Send a message via Skype™ to ~Anbuja
well helllo
its for firered
Spoiler:

#dynamic 0x26D37C

@org @start
checkflag 0x9001
if 0x1 goto @done1
compare 0x9001 0x1
if 0x1 goto @case101
compare 0x9001 0x2
if 0x1 goto @case202
compare 0x9001 0x3
if 0x1 goto @case303
release
end

#org @done1
release
end

#org @case101
showsprite 0x1
applymovement 0x1 @move101
waitmovement 0x1
applymovement 0xFF @moveplayer
waitmovement 0xFF
msgbox @talk1 0x6
applymovement 0x1 @move101b
waitmovement 0x1
hidesprite 0x1
setflag 0x9001
release
end

#org @case202
showsprite 0x1
applymovement 0x1 @move202
waitmovement 0x1
applymovement 0xFF @moveplayer
waitmovement 0xFF
msgbox @talk1 0x6
applymovement 0x1 @move202b
waitmovement 0x1
hidesprite 0x1
setflag 0x9001
release
end

#org @case303
showsprite 0x1
applymovement 0x1 @move303
waitmovement 0x1
applymovement 0xFF @moveplayer
waitmovement 0xFF
msgbox @talk1 0x6
applymovement 0x1 @move303b
waitmovement 0x1
hidesprite 0x1
setflag 0x9001
release
end

#org @talk1
= \c\h01\h03[rival]:\nHey Jayson !! Come on\lman, stand up. We need to get over\lto Mr.Begum's place to get our\lfirst pokemon. Then I can start my\ljourney to become the best pokemon\ltrainer ever. Hahaha.\p\c\h01\h08Jayson: Yeah you keep on\ndreaming. You'll never become a\lpokemon master with that atitude.\p\c\h01\h03[rival]: Well at least you\ncould've let me dream, or\lyou could've lied and told me that\lI could become the best. Its\lcalled being nice.\p\c\h01\h08Jayson: Yeah yeah.\nWhatever. Lets go so I can be\lsaved the pain of listening to you\lall day.\p\c\h01\h03[rival]: Uhhmm. Okay ? Lets\njust go.

#org @moveplayer
#raw 0x3
#raw 0xFE

#org @move101
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move101b
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move202
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move202b
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move303
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move303b
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0xFE

well i think everythink is alright with this script but it have the reset bug does anyone know how to fix an reset bug??
__________________
  #5604    
Old May 1st, 2011, 02:15 PM
Quilava's Master's Avatar
Quilava's Master
Shattered Dreams '13
 
Join Date: Jul 2007
Nature: Adamant
Quote:
Originally Posted by Anbuja's_BlooDY View Post
well helllo:)
its for firered
Spoiler:

#dynamic 0x26D37C

@org @start
checkflag 0x9001
if 0x1 goto @done1
compare 0x9001 0x1
if 0x1 goto @case101
compare 0x9001 0x2
if 0x1 goto @case202
compare 0x9001 0x3
if 0x1 goto @case303
release
end

#org @done1
release
end

#org @case101
showsprite 0x1
applymovement 0x1 @move101
waitmovement 0x1
applymovement 0xFF @moveplayer
waitmovement 0xFF
msgbox @talk1 0x6
applymovement 0x1 @move101b
waitmovement 0x1
hidesprite 0x1
setflag 0x9001
release
end

#org @case202
showsprite 0x1
applymovement 0x1 @move202
waitmovement 0x1
applymovement 0xFF @moveplayer
waitmovement 0xFF
msgbox @talk1 0x6
applymovement 0x1 @move202b
waitmovement 0x1
hidesprite 0x1
setflag 0x9001
release
end

#org @case303
showsprite 0x1
applymovement 0x1 @move303
waitmovement 0x1
applymovement 0xFF @moveplayer
waitmovement 0xFF
msgbox @talk1 0x6
applymovement 0x1 @move303b
waitmovement 0x1
hidesprite 0x1
setflag 0x9001
release
end

#org @talk1
= \c\h01\h03[rival]:\nHey Jayson !! Come on\lman, stand up. We need to get over\lto Mr.Begum's place to get our\lfirst pokemon. Then I can start my\ljourney to become the best pokemon\ltrainer ever. Hahaha.\p\c\h01\h08Jayson: Yeah you keep on\ndreaming. You'll never become a\lpokemon master with that atitude.\p\c\h01\h03[rival]: Well at least you\ncould've let me dream, or\lyou could've lied and told me that\lI could become the best. Its\lcalled being nice.\p\c\h01\h08Jayson: Yeah yeah.\nWhatever. Lets go so I can be\lsaved the pain of listening to you\lall day.\p\c\h01\h03[rival]: Uhhmm. Okay ? Lets\njust go.

#org @moveplayer
#raw 0x3
#raw 0xFE

#org @move101
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move101b
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move202
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move202b
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move303
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move303b
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0xFE

well i think everythink is alright with this script but it have the reset bug does anyone know how to fix an reset bug??
Can you tell us when it resets? Or the circumstances surrounding the reset.
__________________
The return of Pokemon Shattered Dreams! Click the screenshot to visit the thread, you know you want to.
  #5605    
Old May 1st, 2011, 03:13 PM
~Anbuja's Avatar
~Anbuja
Let's Keep It Simple
 
Join Date: Oct 2010
Location: In Snorlax Stomach
Gender: Male
Nature: Lonely
Send a message via Skype™ to ~Anbuja
Quote:
Originally Posted by Quilava's Master View Post
Can you tell us when it resets? Or the circumstances surrounding the reset.
it wont let me start the game....after the intro the screens turn black and you hear just the music my friend said its the reset bug thats why i asked
well thanks in advantage
__________________
  #5606    
Old May 1st, 2011, 03:20 PM
Quilava's Master's Avatar
Quilava's Master
Shattered Dreams '13
 
Join Date: Jul 2007
Nature: Adamant
Quote:
Originally Posted by Anbuja's_BlooDY View Post
it wont let me start the game....after the intro the screens turn black and you hear just the music my friend said its the reset bug thats why i asked
well thanks in advantage:)
Okay well to start off with a name like the reset bug, I would assume it resets when the script initiates. If the script in the players room, try removing the scripts that you placed there and see if the game starts normally. If it doesn't then the issue isn't with the script. If the game does start normally, then check if the script is in in the exact location where the player starts, which, if I recall correctly, is 0x6 on the X axis and 0x6 on the Y axis. If there's a script there try moving it.
__________________
The return of Pokemon Shattered Dreams! Click the screenshot to visit the thread, you know you want to.
  #5607    
Old May 1st, 2011, 03:34 PM
~Anbuja's Avatar
~Anbuja
Let's Keep It Simple
 
Join Date: Oct 2010
Location: In Snorlax Stomach
Gender: Male
Nature: Lonely
Send a message via Skype™ to ~Anbuja
Quote:
Originally Posted by Quilava's Master View Post
Okay well to start off with a name like the reset bug, I would assume it resets when the script initiates. If the script in the players room, try removing the scripts that you placed there and see if the game starts normally. If it doesn't then the issue isn't with the script. If the game does start normally, then check if the script is in in the exact location where the player starts, which, if I recall correctly, is 0x6 on the X axis and 0x6 on the Y axis. If there's a script there try moving it.
i removed the scripts and the game worked normally (started) and no there arent some scripts on the positon where the hero start(you were right x6y6)
to be sure the sccripts have the fault i guess kinda i made the same on a clean fire red rom and there the game worked normally jsut that the script didnt open it played like the normal fire red and i repatched an rom with my ips and did the same and this bug with black screen happened again
__________________
  #5608    
Old May 2nd, 2011, 02:46 AM
Echidna's Avatar
Echidna
Community Supporter
 
Join Date: Aug 2010
Location: Vaniville Town
Age: 20
Gender: Male
Nature: Brave
Quote:
Originally Posted by Quilava's Master View Post
Okay well to start off with a name like the reset bug, I would assume it resets when the script initiates. If the script in the players room, try removing the scripts that you placed there and see if the game starts normally. If it doesn't then the issue isn't with the script. If the game does start normally, then check if the script is in in the exact location where the player starts, which, if I recall correctly, is 0x6 on the X axis and 0x6 on the Y axis. If there's a script there try moving it.
hey, i'm the original writer of the script, here's how its layed out:
Spoiler:
#dynamic 0x26D37C

#org @start
checkflag 0x9001
if 0x1 goto @done1
compare 0x9001 0x1
if 0x1 goto @case101
compare 0x9001 0x2
if 0x1 goto @case202
compare 0x9001 0x3
if 0x1 goto @case303
release
end

#org @done1
release
end

#org @case101
showsprite 0x1
applymovement 0x1 @move101
waitmovement 0x1
applymovement 0xFF @moveplayer
waitmovement 0xFF
msgbox @talk1 0x6
applymovement 0x1 @move101b
waitmovement 0x1
hidesprite 0x1
setflag 0x9001
release
end

#org @case202
showsprite 0x1
applymovement 0x1 @move202
waitmovement 0x1
applymovement 0xFF @moveplayer
waitmovement 0xFF
msgbox @talk1 0x6
applymovement 0x1 @move202b
waitmovement 0x1
hidesprite 0x1
setflag 0x9001
release
end

#org @case303
showsprite 0x1
applymovement 0x1 @move303
waitmovement 0x1
applymovement 0xFF @moveplayer
waitmovement 0xFF
msgbox @talk1 0x6
applymovement 0x1 @move303b
waitmovement 0x1
hidesprite 0x1
setflag 0x9001
release
end

#org @talk1
= \c\h01\h03[rival]:\nHey Jayson !! Come on\lman, stand up. We need to get over\lto Mr.Begum's place to get our\lfirst pokemon. Then I can start my\ljourney to become the best pokemon\ltrainer ever. Hahaha.\p\c\h01\h08Jayson: Yeah you keep on\ndreaming. You'll never become a\lpokemon master with that atitude.\p\c\h01\h03[rival]: Well at least you\ncould've let me dream, or\lyou could've lied and told me that\lI could become the best. Its\lcalled being nice.\p\c\h01\h08Jayson: Yeah yeah.\nWhatever. Lets go so I can be\lsaved the pain of listening to you\lall day.\p\c\h01\h03[rival]: Uhhmm. Okay ? Lets\njust go.

#org @moveplayer
#raw 0x3
#raw 0xFE

#org @move101
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move101b
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move202
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move202b
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move303
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move303b
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0xFE


this script is just compiled to the rom as a basis to what i'm doing.

then i compile this script and its offset goes to a script tile to the right of the player's start position:
Spoiler:
#dynamic 0x26D6E1

#org @start
lock
setvar 0x9001 0x1
goto 0x26D37C


yes 26D37C is the offset of the first script.

then this one is compiled and goes under the player:
Spoiler:
#dynamic 0x26D6E2

#org @start
lock
setvar 0x9001 0x2
goto 0x26D37C


and this one goes to his left:
Spoiler:
#dynamic 0x26D6E3

#org @start
lock
setvar 0x9001 0x3
goto 0x26D37C


yes the unknow has been set to 0003 and the var number to 4051, and all my script work on these conditions. and the flag 9001 is set to the OW in question's person ID box, and his movement type is hidden so i don't really think its necessary. There is no script where the player starts. and the person event number of the OW in question is 1 which is already in hex.

i also tried this as a level script, and i made one simple script instead of all the others (i did the level script on a new rom of the hack, not the on i already did work on), here's the script:
Spoiler:
#dynamic 0x26D37C

#org @start
showsprite 0x1
applymovement 0x1 @move101
waitmovement 0x1
applymovement 0xFF @moveplayer
waitmovement 0xFF
msgbox @talk1 0x6
applymovement 0x1 @move101b
waitmovement 0x1
hidesprite 0x1
setflag 0x9001
setvar 0x9002 0x1
release
end

#org @talk1
= \c\h01\h03[rival]:\nHey Jayson !! Come on\lman, stand up. We need to get over\lto Mr.Begum's place to get our\lfirst pokemon. Then I can start my\ljourney to become the best pokemon\ltrainer ever. Hahaha.\p\c\h01\h08Jayson: Yeah you keep on\ndreaming. You'll never become a\lpokemon master with that atitude.\p\c\h01\h03[rival]: Well at least you\ncould've let me dream, or\lyou could've lied and told me that\lI could become the best. Its\lcalled being nice.\p\c\h01\h08Jayson: Yeah yeah.\nWhatever. Lets go so I can be\lsaved the pain of listening to you\lall day.\p\c\h01\h03[rival]: Uhhmm. Okay ? Lets\njust go.

#org @moveplayer
#raw 0x3
#raw 0xFE

#org @move101
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move101b
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0xFE


i proof read a million times, the script is flawless. and the leve script was followed step by step, and the reset bugs won't allow us to continue. when i compile the script, just when th player is about to appeard in his room, the emulator/game resets.




oh and here's a screeny of where the ow is (the one who will be affected by the script)

__________________







Last edited by Echidna; May 2nd, 2011 at 02:51 AM. Reason: Your double post has been automatically merged.
  #5609    
Old May 2nd, 2011, 04:12 AM
Plumpyfoof's Avatar
Plumpyfoof
 
Join Date: Apr 2011
Location: Melbourne, Australia
Age: 20
Gender: Male
Nature: Sassy
Send a message via Skype™ to Plumpyfoof
I just need a quick answer hah.
So I've written out my script and i've got my flags in place but when i go out of the map and back in and I walk on the script tile the script starts again, if i have everything in the correct order (or at least i think i do) i don't know what i've got wrong. Help?
  #5610    
Old May 2nd, 2011, 08:13 AM
Echidna's Avatar
Echidna
Community Supporter
 
Join Date: Aug 2010
Location: Vaniville Town
Age: 20
Gender: Male
Nature: Brave
the flags have to have the following order:

in the very n=beginning of the script, use checkflag 0xflag number
then use 'if 0x1 goto @pointer'
now remember to make the pointer you placed in the if command, and in it, use only release and end. and at the end of the original script, use setflag 0xflag number.

best use flags above 1000, almost all those under 1000are already used, and might glitch up your game if used.
__________________






  #5611    
Old May 3rd, 2011, 09:27 PM
Plumpyfoof's Avatar
Plumpyfoof
 
Join Date: Apr 2011
Location: Melbourne, Australia
Age: 20
Gender: Male
Nature: Sassy
Send a message via Skype™ to Plumpyfoof
Quote:
Originally Posted by PEDRO12 View Post
the flags have to have the following order:

in the very n=beginning of the script, use checkflag 0xflag number
then use 'if 0x1 goto @pointer'
now remember to make the pointer you placed in the if command, and in it, use only release and end. and at the end of the original script, use setflag 0xflag number.

best use flags above 1000, almost all those under 1000are already used, and might glitch up your game if used.
I have all that right i think.
Maybe you can pick out the problem
this is my main script anyway

Spoiler:

#dynamic 0x3AE44B

#org @start
lock
checkflag 0xA
if 0x1 goto @done
checkflag 0x820
if 0x1 goto @continue
release
end

#org @done
release
end
#org @continue
msgbox @talk1
callstd 0x6
showsprite 0x04
applymovement 0x04 @move1
waitmovement 0x0
applymovement 0xFF @move3
pause 0x35
applymovement 0x04 @move2
waitmovement 0x0
msgbox @talk2
callstd 0x6
applymovement 0x04 @move3
waitmovement 0x0
msgbox @talk3
callstd 0x6
showsprite 0x05
showsprite 0x06
applymovement 0x05 @move1
applymovement 0x06 @move1
waitmovement 0x0
msgbox @talk4
callstd 0x6
msgbox @talk5
callstd 0x6
msgbox @talk6
callstd 0x6
msgbox @talk7
callstd 0x6
waitmsgbox 0x0
applymovement 0x04 @move4
waitmovement 0x0
msgbox @talk8
callstd 0x6
waitmsgbox 0x0
applymovement 0x05 @move5
applymovement 0x06 @move5
waitmovement 0x0
hidesprite 0x04
hidesprite 0x05
hidesprite 0x06
setflag 0xA
release
end
  #5612    
Old May 4th, 2011, 01:39 AM
Crimson Stardust's Avatar
Crimson Stardust
Anime Addiction
 
Join Date: Mar 2009
Location: It is for me to noe and all of you to find out
Age: 21
Gender: Male
Nature: Relaxed
Send a message via AIM to Crimson Stardust Send a message via Windows Live Messenger to Crimson Stardust
I have a question,
How do i exactly make the script like you know for the beginning of the hack where you and your rival need to choose a starter.
Like how do i make so that the rival pick out the one that have the elements againts, like if i picked fire he pick water..
And also in the future battle how do i make so that the battle involves the pokemon which the rival picked? since it can be any 3 according to how the player choose..

Is using flags be use for all this?
Then how is the future battle made? like the trainer stats like how i am gonna edit the trainer to have the pokemon the elements against..must i use a-trainer to have the rival 3 types with each different element?

Kind confusing i know, i myself finds it hard to type..haha
__________________



  #5613    
Old May 4th, 2011, 04:04 AM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 23
Gender: Male
Nature: Modest
Quote:
Originally Posted by Crimson Stardust View Post
I have a question,
How do i exactly make the script like you know for the beginning of the hack where you and your rival need to choose a starter.
Like how do i make so that the rival pick out the one that have the elements againts, like if i picked fire he pick water..
And also in the future battle how do i make so that the battle involves the pokemon which the rival picked? since it can be any 3 according to how the player choose..

Is using flags be use for all this?
Then how is the future battle made? like the trainer stats like how i am gonna edit the trainer to have the pokemon the elements against..must i use a-trainer to have the rival 3 types with each different element?

Kind confusing i know, i myself finds it hard to type..haha
You just use a variable or flags and then check it during the rival scripts and then run a different battle depending on the value. There's no other way around it, really.
__________________
あなた は しきしゃ です
わたし は ばか です
  #5614    
Old May 4th, 2011, 04:08 AM
Crimson Stardust's Avatar
Crimson Stardust
Anime Addiction
 
Join Date: Mar 2009
Location: It is for me to noe and all of you to find out
Age: 21
Gender: Male
Nature: Relaxed
Send a message via AIM to Crimson Stardust Send a message via Windows Live Messenger to Crimson Stardust
Quote:
Originally Posted by Darthatron View Post
You just use a variable or flags and then check it during the rival scripts and then run a different battle depending on the value. There's no other way around it, really.
ok cool, i just want to make sure i did not do anything wrong..xD
__________________



  #5615    
Old May 4th, 2011, 06:33 AM
Echidna's Avatar
Echidna
Community Supporter
 
Join Date: Aug 2010
Location: Vaniville Town
Age: 20
Gender: Male
Nature: Brave
Quote:
Originally Posted by Plumpyfoof View Post
I have all that right i think.
Maybe you can pick out the problem
this is my main script anyway

Spoiler:

#dynamic 0x3AE44B

#org @start
lock
checkflag 0xA
if 0x1 goto @done
checkflag 0x820
if 0x1 goto @continue
release
end

#org @done
release
end
#org @continue
msgbox @talk1
callstd 0x6
showsprite 0x04
applymovement 0x04 @move1
waitmovement 0x0
applymovement 0xFF @move3
pause 0x35
applymovement 0x04 @move2
waitmovement 0x0
msgbox @talk2
callstd 0x6
applymovement 0x04 @move3
waitmovement 0x0
msgbox @talk3
callstd 0x6
showsprite 0x05
showsprite 0x06
applymovement 0x05 @move1
applymovement 0x06 @move1
waitmovement 0x0
msgbox @talk4
callstd 0x6
msgbox @talk5
callstd 0x6
msgbox @talk6
callstd 0x6
msgbox @talk7
callstd 0x6
waitmsgbox 0x0
applymovement 0x04 @move4
waitmovement 0x0
msgbox @talk8
callstd 0x6
waitmsgbox 0x0
applymovement 0x05 @move5
applymovement 0x06 @move5
waitmovement 0x0
hidesprite 0x04
hidesprite 0x05
hidesprite 0x06
setflag 0xA
release
end
ok first off, like i said, use flags above a 1000, i'm pretty sure flag A is already used, and if some guide says otherwise, those lists are somethimes wrong, but almost no flags above a thousand are used, but use flags above 2000 just to be sure. So instead of checkflag 0xA and setflag 0xS, use checkflag 0x2001 and setflag 0x2001. That's safer. Secondly, instead of
msgbox @talk
callstd 0x6

just use msgbox @talk 0x6 (if you're using the new XSE), its much easier (both work, but just take shorcuts) and as for prites 4 5 and 6, is the flag you set put in their person ID field box ? it should. so make it 2001 if you decide to take my advice on flags.

and don't use waitmsgbox 0x0, for only one simple reason, it doesn't exist !! you don't even have to use any wait command, the game has a built i' wait till message is done to continue' feature. lol.

this should make the script work, and only happen once, hey, you see the link that says tutorial part 1 and part 2 in my sig, go to part 1, and read the scripting part, then continue to part 2, it should help you overcome your scripting probs.
__________________






  #5616    
Old May 4th, 2011, 05:47 PM
Envi
Full Metal Fangirl
 
Join Date: Sep 2010
Location: The Unseen World
Gender: Female
Nature: Lonely
Ok so I have been browsing alot of scripting tutorials and I have found that most of the ones I look at are directed towards FireRed and totally skip out on how to script movements.

I am currently trying to make a script in Pokemon Ruby where the player's character steps on a tile, and then they are forced to walk to a certain spot and talk to a certain person.

I started with this script to test it, but the game freezes whenever I step on the area where the script is. It looks like this:

#org 0x814E948
'-----------------------------------
lockall
msgbox 0x816D10E ' Test
callstd MSG_NOCLOSE ' Non-closing message
closemsg
movesprite 0x2 0xF 0x3
applymovement PLAYER 0x814EA2C ' walk_up walk_up walk...
msgbox 0x816D119 ' Testing
callstd MSG_NOCLOSE ' Non-closing message
closemsg
setvar 0x4060 0x2
releaseall
end


#org 0x816D10E
= Test

#org 0x816D119
= Testing

#org 0x814EA2C
M walk_up walk_up walk_up walk_up walk_up walk_up walk_up walk_up end


Could anyone tell me what I am doing wrong here? Its very important because having patches of script like this are the basis of my hack and if I can figure this out then I am screwed.
  #5617    
Old May 5th, 2011, 12:55 AM
Plumpyfoof's Avatar
Plumpyfoof
 
Join Date: Apr 2011
Location: Melbourne, Australia
Age: 20
Gender: Male
Nature: Sassy
Send a message via Skype™ to Plumpyfoof
Quote:
Originally Posted by PEDRO12 View Post

ok first off, like i said, use flags above a 1000, i'm pretty sure flag A is already used, and if some guide says otherwise, those lists are somethimes wrong, but almost no flags above a thousand are used, but use flags above 2000 just to be sure. So instead of checkflag 0xA and setflag 0xS, use checkflag 0x2001 and setflag 0x2001. That's safer. Secondly, instead of
msgbox @talk
callstd 0x6
...
...
...
this should make the script work, and only happen once, hey, you see the link that says tutorial part 1 and part 2 in my sig, go to part 1, and read the scripting part, then continue to part 2, it should help you overcome your scripting probs.
Okay i changed the flags just to be safe.
I'm using an older version of xse and i just can't be bothered getting the new version right now hah so i have to use callstd hah.
Some tutorial thing on youtube told me to use waitmsgbox hah that is awkward.

I've checked out your tutorials and learnt a few things (thanks) but it still repeats itself i think i might start a new script instead and hopefully that'll work instead

Thanks again hahah.
  #5618    
Old May 5th, 2011, 02:04 PM
TheZerox9's Avatar
TheZerox9
That's Right
 
Join Date: Dec 2010
Location: NO ONE SHALL STALK ME!!!
Gender: Male
Nature: Relaxed
It is fine until I add another text box after: msgbox 0x831DB3F '"\c\h01Á[player] and [rival] receive..."
callstd 0x6
(yes, i included it at the bottom with a working offset) as soon as i compile, the final movement screws up. every time i fix it, it goes back. Help?

'-----------------------
#org 0x31D81D
applymovement MOVE_PLAYER 0x831D8AA
applymovement 0x1 0x831D8AE
waitmovement 0x0
msgbox 0x831D8B2 '"\c\h01ÇADMIN BONNIE: All right,\nki..."
callstd 0x6
applymovement 0x1 0x831D93D
waitmovement 0x0
applymovement MOVE_PLAYER 0x831D941
waitmovement 0x0
msgbox 0x831D945 '"\c\h01Ë[rival]: Hey!! You mean[.] w..."
callstd 0x6
applymovement MOVE_PLAYER 0x831DA0D
msgbox 0x831DA10 '"\c\h01ÇBONNIE: So, who are you two?..."
callstd 0x6
fanfare 0x13E
waitfanfare
msgbox 0x831DB3F '"\c\h01Á[player] and [rival] receive..."
callstd 0x6
applymovement 0x2 0x831DCAF
waitmovement 0x0
hidesprite 0x2
applymovement 0x1 0x831DCB4
applymovement MOVE_PLAYER 0x831DCB7
waitmovement 0x0
msgbox 0x831DCBA '"\c\h01Ë[rival]: Hey, [player], I'm ..."
callstd 0x6
applymovement MOVE_PLAYER 0x831DD3E
waitmovement 0x0
applymovement 0x1 0x831DD41
waitmovement 0x0
hidesprite 0x1
writebytetooffset 0x11 0x11116CFE


'-----------
' Movements
'-----------
#org 0x31D8AA
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0x31D8AE
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0x31D93D
#raw 65 'Double Exclamation Mark (!!)
#raw 53 'Jump in Place (Facing Up)
#raw FE 'End of Movements

#org 0x31D941
#raw 3 'Face Right
#raw 63 'Question Mark (?)
#raw FE 'End of Movements

#org 0x31DA0D
#raw 1 'Face Up
#raw FE 'End of Movements

#org 0x31DCAF
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0x31DCB4
#raw 1F 'Step Left (Fast)
#raw FE 'End of Movements

#org 0x31DCB7
#raw 3 'Face Right
#raw FE 'End of Movements

#org 0x31DD3E
#raw 1 'Face Up
#raw FE 'End of Movements

#org 0x31DD41
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x31D8B2
= \c\h01ÇADMIN BONNIE: All right,\nkiddies! First mission!\pWe won't go easy on you.\pYou're about to go mano-a-mano\nwith supernatural phenomena.

#org 0x31D945
= \c\h01Ë[rival]: Hey!! You mean[.] we're\ngoing to visit the SAFFRON GYM?!\p\c\h01ÇBONNIE: What? No, don't be\nridiculous.\pEven we ADMIN have trouble with\nSABRINA's PSYCHICS.\pYou're going to LAVENDER TOWN.\p\c\h01Ë[rival]: Oh[.]

#org 0x31DA10
= \c\h01ÇBONNIE: So, who are you two?\p[.]\pAh, the infamous [player] and \n[rival]. I heard you two were quite\lthe troublemakers as TRAINEES.\pGood.\pWe've got three GRUNTS in POKéMON\nTOWER rounding up CUBONE.\pThey're reporting trouble, in the\nform of a mother MAROWAK.\pYou two are going to check it out.\nHere, take these.

#org 0x31DB3F
= \c\h01Á[player] and [rival] received two\nWEIRD RED BRICKY THINGAMABOBS!

#org 0x31DCBA
= \c\h01Ë[rival]: Hey, [player], I'm gonna\nfind us some better POKéMON before\lwe head to LAVENDER TOWN. Meet me\loutside when you're done in here.

whoops! first line was cut off! It is fire red, XSE, and a script box.

whoops! first line was cut off! It is fire red, XSE, and a script box.

Last edited by TheZerox9; May 5th, 2011 at 02:45 PM. Reason: Your double post has been automatically merged.
  #5619    
Old May 6th, 2011, 05:59 AM
Kifli
 
Join Date: May 2011
Hi guys, im pretty new here, so i have a quick question.
When I Compile a script, it's works and everything. But, if I want to change the script, and I compile it, it does the old script. So everytime I want to change the script, i have to delete the person event in AdvanceMap, and re-do it? (Because thats what im doing)
Isn't there any quicker solution for this?

Last edited by Kifli; May 6th, 2011 at 06:05 AM. Reason: Your double post has been automatically merged.
  #5620    
Old May 6th, 2011, 06:18 AM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 23
Gender: Male
Nature: Modest
Quote:
Originally Posted by Kifli View Post
Hi guys, im pretty new here, so i have a quick question.
When I Compile a script, it's works and everything. But, if I want to change the script, and I compile it, it does the old script. So everytime I want to change the script, i have to delete the person event in AdvanceMap, and re-do it? (Because thats what im doing)
Isn't there any quicker solution for this?
You just have to change the script offset in AMap to the new location that it gets compiled to.
__________________
あなた は しきしゃ です
わたし は ばか です
  #5621    
Old May 6th, 2011, 06:29 AM
Kifli
 
Join Date: May 2011
So, it's not possible to just change the script under an offset?
So let's see, there is a script with offset "a". It contains the next: "Text one"
But, i want the script with offset "a" change to "text two", i must create a new offset?
  #5622    
Old May 6th, 2011, 12:29 PM
gameguru's Avatar
gameguru
 
Join Date: Nov 2009
Location: Your Mind
Gender: Male
Nature: Careful
I hope this is a simple question... So I have been working on this hack for a long while now, and I just recently reset the game and tried to play through what i have hacked.
The problem is, when I walk out of my house. This text box appears that won't go away.



This is the level script (type 3)
'---------------
#org 0x165465
setworldmapflag 0x890
checkflag 0x291
if 0x1 call 0x8165488
compare 0x4070 0x0
if 0x1 call 0x81654A8
compare 0x4070 0x1
if 0x1 call 0x81654A2
end

'---------------
#org 0x165488
checkflag 0x83E
if 0x0 goto 0x81A77A9
compare 0x4070 0x1
if 0x4 goto 0x81A77A9
setvar 0x4070 0x1
return

'---------------
#org 0x1654A8
checkflag 0x291
if 0x1 goto 0x81654BD
movesprite2 0x1 0x5 0xF
spritebehave 0x1 0x7
return

'---------------
#org 0x1654A2
setvar 0x4070 0x2
return

'---------------
#org 0x1A77A9
return

'---------------
#org 0x1654BD
movesprite2 0x1 0xC 0x2
spritebehave 0x1 0x8
setvar 0x4002 0x1
return

Last edited by gameguru; May 6th, 2011 at 12:30 PM. Reason: missing data
  #5623    
Old May 6th, 2011, 01:07 PM
Kifli
 
Join Date: May 2011
Hi guys, I have a small problem. I'd like to make an npc what gives you a Mew. The problem is, somewhy the script doesn't work. (Of course, I tried another offset instead of "gimmethatgoddampokemon")

#dynamic 0x802530

#org @gimmethatgoddampokemon
givepokemon 0x97 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x802840 0x4
waitfanfare
closeonkeypress
setflag 0x200
release
end

#org @start
lock
faceplayer
checkflag 0x200
if 0x1 goto 0x880255D
msgbox 0x8802549 0x5
compare 0x800D 0x1
if 0x1 goto @gimmethatgoddampokemon
msgbox 0x802830 0x6
release
end

#org 0x802830
= Oh, that's okay. I guess I'll have\nto find some other people to look\lafter for my Legendary, really\lrare, only one pokemon!


#org 0x80255D
msgbox 0x880256D 0x6
release
end

#org 0x802549
= As You can see, I will go away\pfrom this peaceful island. I want\pyou to take care of my little Mew!\pWill you do this for me?

#org 0x80256D
= Do you take good care of my Mew?


#org 0x802840
= [black_fr]You received a Mew!

If i decompile it, it shows the next:
'---------------
#org 0x802530
lock
faceplayer
checkflag 0x200
if 0x1 goto 0x880255D
msgbox 0x8802549 0x5 '"As You can see, I will go away\pfr..."
compare 0x800D 0x1
if 0xBB goto 0xE3D300E7
'---------------
#org 0x80255D

'---------
' Strings
'---------
#org 0x802549
= As You can see, I will go away\pfrom Do you take good care of my Mew?

As you can see, the whole script is messed up somewhere, but I can't find it where. Any help would be appreciated:3

Last edited by Kifli; May 6th, 2011 at 01:12 PM. Reason: Your double post has been automatically merged.
  #5624    
Old May 6th, 2011, 11:01 PM
Binary's Avatar
Binary
え?
 
Join Date: Aug 2007
Age: 20
Quote:
Originally Posted by Kifli View Post
So, it's not possible to just change the script under an offset?
So let's see, there is a script with offset "a". It contains the next: "Text one"
But, i want the script with offset "a" change to "text two", i must create a new offset?
No. You can open the script with XSE via Advance Map. Once the script at a particular offset is opened, press the decompile button (should be somewhere on the toolbar) and then edit the script. You can't edit the script without decompiling. Once you're happy with what you've edited, compile the script.

If you're going to add major changes, I would suggest writing a new script though.
Quote:
Originally Posted by gameguru View Post
I hope this is a simple question... So I have been working on this hack for a long while now, and I just recently reset the game and tried to play through what i have hacked.
The problem is, when I walk out of my house. This text box appears that won't go away.



This is the level script (type 3)
'---------------
#org 0x165465
setworldmapflag 0x890
checkflag 0x291
if 0x1 call 0x8165488
compare 0x4070 0x0
if 0x1 call 0x81654A8
compare 0x4070 0x1
if 0x1 call 0x81654A2
end

'---------------
#org 0x165488
checkflag 0x83E
if 0x0 goto 0x81A77A9
compare 0x4070 0x1
if 0x4 goto 0x81A77A9
setvar 0x4070 0x1
return

'---------------
#org 0x1654A8
checkflag 0x291
if 0x1 goto 0x81654BD
movesprite2 0x1 0x5 0xF
spritebehave 0x1 0x7
return

'---------------
#org 0x1654A2
setvar 0x4070 0x2
return

'---------------
#org 0x1A77A9
return

'---------------
#org 0x1654BD
movesprite2 0x1 0xC 0x2
spritebehave 0x1 0x8
setvar 0x4002 0x1
return
I believe the solution to your problem can be found here.


Quote:
Originally Posted by Kifli View Post
Hi guys, I have a small problem. I'd like to make an npc what gives you a Mew. The problem is, somewhy the script doesn't work. (Of course, I tried another offset instead of "gimmethatgoddampokemon")

#dynamic 0x802530

#org @gimmethatgoddampokemon
givepokemon 0x97 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x802840 0x4
waitfanfare
closeonkeypress
setflag 0x200
release
end

#org @start
lock
faceplayer
checkflag 0x200
if 0x1 goto 0x880255D
msgbox 0x8802549 0x5
compare 0x800D 0x1
if 0x1 goto @gimmethatgoddampokemon
msgbox 0x802830 0x6
release
end

#org 0x802830
= Oh, that's okay. I guess I'll have\nto find some other people to look\lafter for my Legendary, really\lrare, only one pokemon!


#org 0x80255D
msgbox 0x880256D 0x6
release
end

#org 0x802549
= As You can see, I will go away\pfrom this peaceful island. I want\pyou to take care of my little Mew!\pWill you do this for me?

#org 0x80256D
= Do you take good care of my Mew?


#org 0x802840
= [black_fr]You received a Mew!

If i decompile it, it shows the next:
'---------------
#org 0x802530
lock
faceplayer
checkflag 0x200
if 0x1 goto 0x880255D
msgbox 0x8802549 0x5 '"As You can see, I will go away\pfr..."
compare 0x800D 0x1
if 0xBB goto 0xE3D300E7
'---------------
#org 0x80255D

'---------
' Strings
'---------
#org 0x802549
= As You can see, I will go away\pfrom Do you take good care of my Mew?

As you can see, the whole script is messed up somewhere, but I can't find it where. Any help would be appreciated:3
First of all, use appropriate pointers. Not something as confusing as gimmethatgoddampokemon. :/
Also, while writing a new script, try not to use real offsets. By real offsets, I'm referring to those strings of hex numbers. Use pointers like @1, @2, etc. unless you really know what that offset contains, or if the offset is free.
Lastly, try compiling the script again in some free space.
__________________
  #5625    
Old May 7th, 2011, 01:15 AM
Kifli
 
Join Date: May 2011
First of all, use appropriate pointers. Not something as confusing as gimmethatgoddampokemon. :/
Also, while writing a new script, try not to use real offsets. By real offsets, I'm referring to those strings of hex numbers. Use pointers like @1, @2, etc. unless you really know what that offset contains, or if the offset is free.
Lastly, try compiling the script again in some free space.[/FONT][/QUOTE]

Well, I tried, and it's helped with the pointers, thank you:b (Actually, I had to compile to a new offset, because with the old one it didn't work. But thank you :D!
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 01:03 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.