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
  #8326    
Old May 31st, 2013, 06:13 AM
LusoTrainer's Avatar
LusoTrainer
 
Join Date: Mar 2013
Gender: Male
Quote:
Originally Posted by karatekid552 View Post
Setting the flag will not give the bugged message. Here:
It does to me, when I catch it:



Also, it seems that after I set the flag, compile and run the game, this part of the code:

Code:
#org 0x1A922D
fadescreen 0x1
setflag 0x2FF
hidesprite LASTTALKED
fadescreen 0x0
release
end
changes to this:

Code:
#org 0x1A922D
fadescreen 0x1
setflag 0x2FF
hidesprite LASTTALKED
fadescreen 0x97
nop1
setflag 0x2FF
hidesprite LASTTALKED
fadescreen 0x0
bufferpokemon 0x0 0x8004
msgbox 0x81A63C4 '"The [buffer1] flew away!"
callstd 0x4
release
end
And Mew still doesn't disappear when I lose.
  #8327    
Old May 31st, 2013, 06:19 AM
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote:
Originally Posted by LusoTrainer View Post
It does to me, when I catch it:



Also, it seems that after I set the flag, compile and run the game, this part of the code:

Code:
#org 0x1A922D
fadescreen 0x1
setflag 0x2FF
hidesprite LASTTALKED
fadescreen 0x0
release
end
changes to this:

Code:
#org 0x1A922D
fadescreen 0x1
setflag 0x2FF
hidesprite LASTTALKED
fadescreen 0x97
nop1
setflag 0x2FF
hidesprite LASTTALKED
fadescreen 0x0
bufferpokemon 0x0 0x8004
msgbox 0x81A63C4 '"The [buffer1] flew away!"
callstd 0x4
release
end
And Mew still doesn't disappear when I lose.
I just realized your problem: you are editing scripts that are used for all legendary battles. So, by adding to these scripts, it is affecting others. I would take my script that I posted and change it all to dynamic offsets in the 74000s.
__________________

Paired with Simba
  #8328    
Old May 31st, 2013, 11:34 AM
ExitWound's Avatar
ExitWound
Boggle
 
Join Date: Aug 2007
Age: 22
I guess I'll try asking this again because I honestly don't know why this isn't working...
Game: Emerald

I need some help. I'm utterly confused at the moment... I have a script where you can battle somebody 3 different times, each time having stronger Pokémon. He should give you 3 different items each time you beat him, until he is rebattle-able. He's suppose to give you Leftovers the first time you beat him, PP Max the second, and a Master ball the third. When rebattle-able, he should give a PP Up each time you beat him. As of right now, he only gives the Leftovers and Master ball. No PP Max and no PP Up. What is going on with this script?

Code:
#dynamic 0x6C4340

#org @start
checkflag 0x850
if 0x1 goto @start1
trainerbattle 0x1 0xa1 0x0 @before @after @later
end

#org @start1
checkflag 0x851
if 0x1 goto @start2
trainerbattle 0x1 0x29b 0x0 @before1 @after1 @later1
end

#org @start2
settrainerflag 0x29d
trainerbattle 0x1 0x29d 0x0 @before2 @after2 @later2
end

#org @later
setflag 0x850
msgbox @msg1 0x2
giveitem 0xc8 0x1 0x0
release
end

#org @later1
setflag 0x851
msgbox @msg2 0x2
giveitem 0x47 0x1 0x0
release
end

#org @later2
checkflag 0x852
if 0x1 goto @beaten
setflag 0x852
msgbox @msg3 0x2
giveitem 0x1 0x1 0x0
release
end

#org @beaten
msgbox @msg4 0x2
giveitem 0x45 0x1 0x0
release
end

#org @before
= I am legend.

#org @after
= I... am...\pI'm speechless...

#org @msg1
= You are truly gifted...\lBut next time, you will fail.\pTake this, and remember me.

#org @before1
= This time, you will not be so\nlucky.

#org @after1
= How is this possible!?

#org @msg2
= I promise...\nI will defeat you.

#org @before2
= This time, you will lose.

#org @after2
= Again, I am beaten...

#org @msg3
= You are a King among peasants.

#org @msg4
= For the umpteenth time, I have\nfailed.\pClearly, you are the greatest.\pSo long as you defeat me, you\nmay have this.
__________________

+====================Supports====================+


+====================Supports====================+
  #8329    
Old May 31st, 2013, 12:00 PM
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote:
Originally Posted by ExitWound View Post
I guess I'll try asking this again because I honestly don't know why this isn't working...
Game: Emerald

I need some help. I'm utterly confused at the moment... I have a script where you can battle somebody 3 different times, each time having stronger Pokémon. He should give you 3 different items each time you beat him, until he is rebattle-able. He's suppose to give you Leftovers the first time you beat him, PP Max the second, and a Master ball the third. When rebattle-able, he should give a PP Up each time you beat him. As of right now, he only gives the Leftovers and Master ball. No PP Max and no PP Up. What is going on with this script?

Code:
#dynamic 0x6C4340

#org @start
checkflag 0x850
if 0x1 goto @start1
trainerbattle 0x1 0xa1 0x0 @before @after @later
end

#org @start1
checkflag 0x851
if 0x1 goto @start2
trainerbattle 0x1 0x29b 0x0 @before1 @after1 @later1
end

#org @start2
settrainerflag 0x29d
trainerbattle 0x1 0x29d 0x0 @before2 @after2 @later2
end

#org @later
setflag 0x850
msgbox @msg1 0x2
giveitem 0xc8 0x1 0x0
release
end

#org @later1
setflag 0x851
msgbox @msg2 0x2
giveitem 0x47 0x1 0x0
release
end

#org @later2
checkflag 0x852
if 0x1 goto @beaten
setflag 0x852
msgbox @msg3 0x2
giveitem 0x1 0x1 0x0
release
end

#org @beaten
msgbox @msg4 0x2
giveitem 0x45 0x1 0x0
release
end

#org @before
= I am legend.

#org @after
= I... am...\pI'm speechless...

#org @msg1
= You are truly gifted...\lBut next time, you will fail.\pTake this, and remember me.

#org @before1
= This time, you will not be so\nlucky.

#org @after1
= How is this possible!?

#org @msg2
= I promise...\nI will defeat you.

#org @before2
= This time, you will lose.

#org @after2
= Again, I am beaten...

#org @msg3
= You are a King among peasants.

#org @msg4
= For the umpteenth time, I have\nfailed.\pClearly, you are the greatest.\pSo long as you defeat me, you\nmay have this.
It took me a bit to figure out. You have it in the wrong oder. The "checkflag 0x852" and "if 0x1 goto @beaten" need to be the first lines of your script. @Later2 will only run directly after the trainerbattle, not the next time you talk to him.
__________________

Paired with Simba
  #8330    
Old May 31st, 2013, 12:40 PM
ExitWound's Avatar
ExitWound
Boggle
 
Join Date: Aug 2007
Age: 22
Quote:
Originally Posted by karatekid552 View Post
It took me a bit to figure out. You have it in the wrong oder. The "checkflag 0x852" and "if 0x1 goto @beaten" need to be the first lines of your script. @Later2 will only run directly after the trainerbattle, not the next time you talk to him.
Actually it all runs in the right order. The messages all appear correctly, when I want them to, and the right battles are executed at the right times. The only thing that is wrong is that he wont give the PP Max or the PP Ups and I am unsure why. I understand what you mean, though. But I made it so you can rebattle the trainer the last time and by beating him, you get PP Ups.
__________________

+====================Supports====================+


+====================Supports====================+

Last edited by ExitWound; May 31st, 2013 at 12:47 PM.
  #8331    
Old May 31st, 2013, 01:04 PM
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote:
Originally Posted by ExitWound View Post
Actually it all runs in the right order. The messages all appear correctly, when I want them to, and the right battles are executed at the right times. The only thing that is wrong is that he wont give the PP Max or the PP Ups and I am unsure why. I understand what you mean, though. But I made it so you can rebattle the trainer the last time and by beating him, you get PP Ups.
You don't understand. It wasn't in the right order. Everything up to the last battle was, but your placement of checkflag 0x852 was off.

Here is the correct script:

Code:
#dynamic 0x6C4340

#org @start
checkflag 0x852
if 0x1 goto @beaten
checkflag 0x850
if 0x1 goto @start1
trainerbattle 0x1 0xa1 0x0 @before @after @later
end

#org @start1
checkflag 0x851
if 0x1 goto @start2
trainerbattle 0x1 0x29b 0x0 @before1 @after1 @later1
end

#org @start2
settrainerflag 0x29d
trainerbattle 0x1 0x29d 0x0 @before2 @after2 @later2
end

#org @later
setflag 0x850
msgbox @msg1 0x2
giveitem 0xc8 0x1 0x0
release
end

#org @later1
setflag 0x851
msgbox @msg2 0x2
giveitem 0x47 0x1 0x0
release
end

#org @later2
setflag 0x852
msgbox @msg3 0x2
giveitem 0x1 0x1 0x0
release
end

#org @beaten
msgbox @msg4 0x2
giveitem 0x45 0x1 0x0
release
end

#org @before
= I am legend.

#org @after
= I... am...\pI'm speechless...

#org @msg1
= You are truly gifted...\lBut next time, you will fail.\pTake this, and remember me.

#org @before1
= This time, you will not be so\nlucky.

#org @after1
= How is this possible!?

#org @msg2
= I promise...\nI will defeat you.

#org @before2
= This time, you will lose.

#org @after2
= Again, I am beaten...

#org @msg3
= You are a King among peasants.

#org @msg4
= For the umpteenth time, I have\nfailed.\pClearly, you are the greatest.\pSo long as you defeat me, you\nmay have this.
After you battle him the third time, it goes to @later2. However, the next time you talk to him, it it will not. So, you put that check right at the begining and it will work. Give it a try.
__________________

Paired with Simba
  #8332    
Old May 31st, 2013, 01:31 PM
ExitWound's Avatar
ExitWound
Boggle
 
Join Date: Aug 2007
Age: 22
Quote:
Originally Posted by karatekid552 View Post
You don't understand. It wasn't in the right order. Everything up to the last battle was, but your placement of checkflag 0x852 was off.

Here is the correct script:

Spoiler:
Code:
#dynamic 0x6C4340

#org @start
checkflag 0x852
if 0x1 goto @beaten
checkflag 0x850
if 0x1 goto @start1
trainerbattle 0x1 0xa1 0x0 @before @after @later
end

#org @start1
checkflag 0x851
if 0x1 goto @start2
trainerbattle 0x1 0x29b 0x0 @before1 @after1 @later1
end

#org @start2
settrainerflag 0x29d
trainerbattle 0x1 0x29d 0x0 @before2 @after2 @later2
end

#org @later
setflag 0x850
msgbox @msg1 0x2
giveitem 0xc8 0x1 0x0
release
end

#org @later1
setflag 0x851
msgbox @msg2 0x2
giveitem 0x47 0x1 0x0
release
end

#org @later2
setflag 0x852
msgbox @msg3 0x2
giveitem 0x1 0x1 0x0
release
end

#org @beaten
msgbox @msg4 0x2
giveitem 0x45 0x1 0x0
release
end

#org @before
= I am legend.

#org @after
= I... am...\pI'm speechless...

#org @msg1
= You are truly gifted...\lBut next time, you will fail.\pTake this, and remember me.

#org @before1
= This time, you will not be so\nlucky.

#org @after1
= How is this possible!?

#org @msg2
= I promise...\nI will defeat you.

#org @before2
= This time, you will lose.

#org @after2
= Again, I am beaten...

#org @msg3
= You are a King among peasants.

#org @msg4
= For the umpteenth time, I have\nfailed.\pClearly, you are the greatest.\pSo long as you defeat me, you\nmay have this.


After you battle him the third time, it goes to @later2. However, the next time you talk to him, it it will not. So, you put that check right at the begining and it will work. Give it a try.
That would just make it so if you beat him the 3rd time, you could keep talking to him and get unlimited PP Ups. I didn't want it like that, I wanted to make it so you had to rebattle him for each PP Up that you wanted. But that' doesn't even matter because he doesn't give the PP Up anyway. For some reason, giveitem 0x47 0x1 0x0 and giveitem 0x45 0x1 0x0 do not work. And that is what I'm trying to figure out.
__________________

+====================Supports====================+


+====================Supports====================+
  #8333    
Old May 31st, 2013, 11:24 PM
Zemekis's Avatar
Zemekis
The Booze Cruise
 
Join Date: Feb 2013
Location: 'Murica
Gender: Male
Hi, I have applied the following to a script event in Advance Map but when I walk over it NOTHING HAPPENS, but sometimes if I change this or that, my character just gets stuck in place and freezes there. I read in diegoisawesome's Script Tutorial that I need to change the Unknown to 0300 and the Var Number to 4050...but it still lets me walk right over the event.

#dynamic 0x71AF2D
#org @start
checkflag 0xCB
if 0x0 goto @playsweettunes
checkflag 0xCA
if 0x0 goto @getstuff
checkflag 0x828
if 0x1 goto @done
goto @getstuff
end

#org @playsweettunes
playsong 0x7 0x0
fadesong 0x7
fadesong 0xC
fadesong 0x47
setflag 0xCB
msgbox @wtfwasthat 0x6

#org @wtfwasthat
= [grey_fr]What was that sound? You should\ninvestigate!

#org @done
checkflag 0xC9
if 0x1 goto @superend
lock
msgbox @999 0x6
setflag 0xC9
release
end

#org @999
= [grey_fr]Looks like you have your wallet\nand Pokedex, it's time to get\lgoing!

#org @superend
end

#org @getstuff
msgbox @hue 0x6

#org @hue
= [grey_fr]You should get your wallet and\nPokedex you left on the table\lbefore you leave!
applymovement 0xFF @move

#org @move
#raw 0x1
#raw 0x11
#raw 0xFE
  #8334    
Old June 1st, 2013, 06:25 AM
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote:
Originally Posted by Zemekis View Post
Hi, I have applied the following to a script event in Advance Map but when I walk over it NOTHING HAPPENS, but sometimes if I change this or that, my character just gets stuck in place and freezes there. I read in diegoisawesome's Script Tutorial that I need to change the Unknown to 0300 and the Var Number to 4050...but it still lets me walk right over the event.

#dynamic 0x71AF2D
#org @start
checkflag 0xCB
if 0x0 goto @playsweettunes
checkflag 0xCA
if 0x0 goto @getstuff
checkflag 0x828
if 0x1 goto @done
goto @getstuff
end

#org @playsweettunes
playsong 0x7 0x0
fadesong 0x7
fadesong 0xC
fadesong 0x47
setflag 0xCB
msgbox @wtfwasthat 0x6

#org @wtfwasthat
= [grey_fr]What was that sound? You should\ninvestigate!

#org @done
checkflag 0xC9
if 0x1 goto @superend
lock
msgbox @999 0x6
setflag 0xC9
release
end

#org @999
= [grey_fr]Looks like you have your wallet\nand Pokedex, it's time to get\lgoing!

#org @superend
end

#org @getstuff
msgbox @hue 0x6

#org @hue
= [grey_fr]You should get your wallet and\nPokedex you left on the table\lbefore you leave!
applymovement 0xFF @move

#org @move
#raw 0x1
#raw 0x11
#raw 0xFE
The fact that nothing happenes at all is usually a flag/var problem. Check this out: http://www.pokecommunity.com/showthread.php?t=302347

Quote:
Originally Posted by ExitWound View Post
That would just make it so if you beat him the 3rd time, you could keep talking to him and get unlimited PP Ups. I didn't want it like that, I wanted to make it so you had to rebattle him for each PP Up that you wanted. But that' doesn't even matter because he doesn't give the PP Up anyway. For some reason, giveitem 0x47 0x1 0x0 and giveitem 0x45 0x1 0x0 do not work. And that is what I'm trying to figure out.
Dude, your bag is full. If you look at any script that gives items during it (not just a giveitem like one you find on the ground, but a regular talking script) you will see that it checks how many items you have in your bag and then gives you the item if you have room. Without that check, if the bag is full, nothing happens.
__________________

Paired with Simba

Last edited by karatekid552; June 1st, 2013 at 06:35 AM. Reason: Your double post has been automatically merged.
  #8335    
Old June 1st, 2013, 07:54 AM
Varion Bluefire's Avatar
Varion Bluefire
A.K.A The Glitch
 
Join Date: Apr 2013
Age: 19
Gender: Male
Nature: Naughty
Send a message via Skype™ to Varion Bluefire
So I'm making a multichoice script, just a simple yes/no kind of thing.

This is the script; (FR BTW)
#dynamic 0x800723
#org @start
faceplayer
msgbox @1 0x6
preparemsg @2
waitmsg
multichoice 0xE 0x0 0x0 0x0
copyvar 0x8003 0x8004
compare 0x8003 0x0
if 0x1 goto @yes
compare 0x8003 0x7F
if 0x2 goto @no
release
end

#org @yes
msgbox @3 0x6
fadescreen 0x1
fanfare 0x100
special 0x0
fadescreen 0x0
msgbox @4 0x6
release
end

#org @no
msgbox @5 0x6
release
end

#org @1
= Morning, \v\h01!\nHow are you today?

#org @2
= Would you like to rest for a bit?

#org @3
= Oh goodie, here's your room key.

#org @4
= Have a nice sleep?

#org @5
= Well, come back anytime.

But, Whenever I press no, or cancel it still does option 1 (yes)
__________________
  #8336    
Old June 1st, 2013, 11:18 AM
ExitWound's Avatar
ExitWound
Boggle
 
Join Date: Aug 2007
Age: 22
Quote:
Originally Posted by karatekid552 View Post
Dude, your bag is full. If you look at any script that gives items during it (not just a giveitem like one you find on the ground, but a regular talking script) you will see that it checks how many items you have in your bag and then gives you the item if you have room. Without that check, if the bag is full, nothing happens.
Bahahaha!! Should I shoot myself now or later? I guess I was just confused because he was giving me the Leftovers... I must have only had 1 item slot left until my bag was full. So yeah, I feel like a dumbass now. Thanks anyways, friend.
__________________

+====================Supports====================+


+====================Supports====================+
  #8337    
Old June 1st, 2013, 03:56 PM
DrFuji's Avatar
DrFuji
repeat repeat repeat
Community Supporter
 
Join Date: Sep 2009
Location: Upside-downia
Age: 21
Gender: Male
Nature: Jolly
Quote:
Originally Posted by Varion View Post
So I'm making a multichoice script, just a simple yes/no kind of thing.

This is the script; (FR BTW)

Spoiler:
#dynamic 0x800723
#org @start
faceplayer
msgbox @1 0x6
preparemsg @2
waitmsg
multichoice 0xE 0x0 0x0 0x0
copyvar 0x8003 0x8004
compare 0x8003 0x0
if 0x1 goto @yes
compare 0x8003 0x7F
if 0x2 goto @no
release
end

#org @yes
msgbox @3 0x6
fadescreen 0x1
fanfare 0x100
special 0x0
fadescreen 0x0
msgbox @4 0x6
release
end

#org @no
msgbox @5 0x6
release
end

#org @1
= Morning, \v\h01!\nHow are you today?

#org @2
= Would you like to rest for a bit?

#org @3
= Oh goodie, here's your room key.

#org @4
= Have a nice sleep?

#org @5
= Well, come back anytime.


But, Whenever I press no, or cancel it still does option 1 (yes)
You're incorrectly copying the variable that holds the answer you selected in the multichoice. The answer is always immediately saved to the variable 0x800D rather than 0x8004. Your compare functions are also a little bit messed up, at this point you are stating 'If it is no (0x0) then go to @yes and if it is greater (0x2) than cancel (0x7F) go to @no'. Here's what your script should look like:

Code:
#dynamic 0x800000

#org @start
faceplayer
msgbox @1 0x6
preparemsg @2
waitmsg
multichoice 0xE 0x0 0x0 0x0
compare 0x800D 0x1 // You are initially checking if the answer is yes. I have also removed the second check for @no so there is no need for the copyvar command as we are only checking 0x800D once
if 0x1 goto @yes
msgbox @5 0x6
release
end // @no can be moved up here immediately after the variable check because if the player does not continue to @yes any other answer (0x0/ 0x7F) can be assumed to be no

#org @yes
msgbox @3 0x6
fadescreen 0x1
fanfare 0x100
special 0x0
fadescreen 0x0
msgbox @4 0x6
release
end

#org @1
= Morning, \v\h01!\nHow are you today?

#org @2
= Would you like to rest for a bit?

#org @3
= Oh goodie, here's your room key.

#org @4
= Have a nice sleep?

#org @5
= Well, come back anytime.
  #8338    
Old June 2nd, 2013, 01:58 AM
kearnseyboy6's Avatar
kearnseyboy6
Aussie's Toughest Mudder
 
Join Date: Dec 2008
If I set an overworld to have this script

#dynamic 0x800000

#org @1
msgbox @2 MSG_YESNO
closeonkeypress
compare LASTRESULT 0x1
if 0x1 goto @3
end

#org @3
giveitem 0x8C 0x2 MSG_FIND
end


#org @2
= HEY!\pThere are 2 PSNCURE BERRIES.\nDo you want to pick them?

^Now if I assign a Person ID the script stops it from reappearing, if not it appears again.

How does this work?? There is no setflag in the script...
__________________
HOLIDAYING CURRENTLY!!
  #8339    
Old June 2nd, 2013, 03:28 AM
destinedjagold's Avatar
destinedjagold
Oh Hai Thar~ 'ω'
Community Supporter
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Quote:
Originally Posted by kearnseyboy6 View Post
If I set an overworld to have this script

#dynamic 0x800000

#org @1
msgbox @2 MSG_YESNO
closeonkeypress
compare LASTRESULT 0x1
if 0x1 goto @3
end

#org @3
giveitem 0x8C 0x2 MSG_FIND
end


#org @2
= HEY!\pThere are 2 PSNCURE BERRIES.\nDo you want to pick them?

^Now if I assign a Person ID the script stops it from reappearing, if not it appears again.

How does this work?? There is no setflag in the script...
MSG_FIND is commonly used for Pokeballs holding items in the overworld.
If you want an NPC to give an item to the player, then use MSG_OBTAIN instead.
__________________
3DS FC: 0061-1111-6462
SV: 1364 | Rock Safari: Dwebble, Corsola and Barbaracle

Last edited by destinedjagold; June 2nd, 2013 at 03:28 AM. Reason: ...grammar =/
  #8340    
Old June 2nd, 2013, 05:31 AM
kearnseyboy6's Avatar
kearnseyboy6
Aussie's Toughest Mudder
 
Join Date: Dec 2008
Quote:
Originally Posted by destinedjagold View Post
MSG_FIND is commonly used for Pokeballs holding items in the overworld.
If you want an NPC to give an item to the player, then use MSG_OBTAIN instead.
Sorry I don't think I explained it properly...

When I use person ID 200 the script sets that flag, or if I change it to 201 it sets 201 to stop it from reappearing. Does that make more sense?

I want to know how the games script knows to set the correct flag?
  #8341    
Old June 2nd, 2013, 07:10 AM
Xealeos
Unhatched Egg
 
Join Date: Jul 2012
Gender: Male
Hi, I've got a question about a problem I'm having. I increased the number of starters that you can choose from in Oak's lab in FireRed from 3 to 10. So I made extra balls and they all seem to work just fine. But after I go get Oak's Parcel and deliver it, when your rival walks in, his character sprite doesn't show up. You get given the Pokédex and everything, but when the rival leaves, I think he's allowed to walk off the screen, but then the game freezes.

I think the person event of your rival isn't loading properly and then it freezes when it tries to unload it, but I'm not sure. Maybe it's trying to load and unload the wrong thing? I think it all worked fine before I increased the number of balls, but I'm not sure. Can anyone help me with this?
  #8342    
Old June 2nd, 2013, 11:15 AM
kablam
Unhatched Egg
 
Join Date: May 2013
Gender: Male
So I'm trying to use the pokepic command for Pokescript for three starter Pokemon (on a FIRE RED ROM). It works perfectly fine for Charmander. However, when I test the script for Totodile and Treecko it shows a picture of a Cacnea and question mark respectively. The scripts work perfectly fine for every other part or if I remove the pokescript commands. I have bolded the lines that I believe are causing the problem.

Charmander (working fine):
Spoiler:
#org $script
lock
faceplayer
checkflag 0x828
if 0x01 goto $notyours
#raw 75 0x04 0x00 0x0A 0x03
message $question
$question 1 = Inside this Pokeball\n lies Charmander.\pDo you want to\nchoose Charmander?
boxset 5
compare 0x800D 0x0001
if 0x01 goto $yes
message $no
$no 1 = \v\h01 did not\nreceive Charmander.
boxset 6
#raw 76
release
end

#org $yes
givepokemon 4 5 0
message $talk
$talk 1 = \v\h01 received Charmander.
boxset 6
setflag 0x828
#raw 76
release
end

#org $notyours
message $ha
$ha 1 = You already chose\nyour Pokemon.\pSave this for\nsomeone else.
boxset 6
release
end


Totodile (displays a Cacnea image):
Spoiler:
#org $script
lock
faceplayer
checkflag 0x828
if 0x01 goto $notyours
#raw 75 0x58 0x01 0x0A 0x03
message $question
$question 1 = Inside this Pokeball\n lies Totodile.\pDo you want to\nchoose Totodile?
boxset 5
compare 0x800D 0x0001
if 0x01 goto $yes
message $no
$no 1 = \v\h01 did not\nreceive Totodile.
boxset 6
#raw 76
release
end

#org $yes
givepokemon 158 5 0
message $talk
$talk 1 = \v\h01 received Totodile.
boxset 6
#raw 76
setflag 0x828
release
end

#org $notyours
message $ha
$ha 1 = You already chose\nyour Pokemon.\pSave this for\nsomeone else.
boxset 6
release
end


Treecko (displays a question mark):
Spoiler:
#org $script
lock
faceplayer
checkflag 0x828
if 0x01 goto $notyours
#raw 75 0x52 0x02 0x0A 0x03
message $question
$question 1 = Inside this Pokeball\n lies Treecko.\pDo you want to\nchoose Treecko?
boxset 5
compare 0x800D 0x0001
if 0x01 goto $yes
message $no
$no 1 = \v\h01 did not\nreceive Treecko.
boxset 6
#raw 76
release
end

#org $yes
givepokemon 252 5 0
message $talk
$talk 1 = \v\h01 received Treecko.
boxset 6
#raw 76
setflag 0x828
release
end

#org $notyours
message $ha
$ha 1 = You already chose your\n Pokemon.\pSave this for someone\n else.
boxset 6
release
end


Update: So I tested it again and it turns out that I receive Charmander and Totodile (the latter's pokepic is still broken) but I instead of Treecko I receive a question mark Pokemon.

Last edited by kablam; June 2nd, 2013 at 12:43 PM.
  #8343    
Old June 2nd, 2013, 12:16 PM
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote:
Originally Posted by Xealeos View Post
Hi, I've got a question about a problem I'm having. I increased the number of starters that you can choose from in Oak's lab in FireRed from 3 to 10. So I made extra balls and they all seem to work just fine. But after I go get Oak's Parcel and deliver it, when your rival walks in, his character sprite doesn't show up. You get given the Pokédex and everything, but when the rival leaves, I think he's allowed to walk off the screen, but then the game freezes.

I think the person event of your rival isn't loading properly and then it freezes when it tries to unload it, but I'm not sure. Maybe it's trying to load and unload the wrong thing? I think it all worked fine before I increased the number of balls, but I'm not sure. Can anyone help me with this?
You can only have a specific number of on screen sprites. Simple as that.
__________________

Paired with Simba
  #8344    
Old June 2nd, 2013, 12:42 PM
Xealeos
Unhatched Egg
 
Join Date: Jul 2012
Gender: Male
Using that advice, I managed to fix it. Thanks!
  #8345    
Old June 2nd, 2013, 04:46 PM
vashack's Avatar
vashack
Unhatched Egg
 
Join Date: Feb 2013
Gender: Male
Hello all!
Just a quick question. Does anyone know the offset for trainerbattle 0x3? I want to edit out the text from the battle. Just deleting the text still makes the text box show up, so I wanted to go to the offset in a hex editor and just scrub out the pointers to the texts.
  #8346    
Old June 2nd, 2013, 05:13 PM
Awkward.'s Avatar
Awkward.
#britanna
 
Join Date: May 2012
Age: 17
Gender: Male
Nature: Sassy
Quote:
Originally Posted by vashack View Post
Hello all!
Just a quick question. Does anyone know the offset for trainerbattle 0x3? I want to edit out the text from the battle. Just deleting the text still makes the text box show up, so I wanted to go to the offset in a hex editor and just scrub out the pointers to the texts.
That's not a script, it's a command. trainerbattle is a command, 0x3 is a hex code that activates a type of trainerbattle. I'm not even sure what you mean by the offset for it...

If you want to change the text, open the script in XSE, find the offset at the end of the trainerbattle command, delete it and replace it with a different offset, delete the corresponding text string and offset and replace it, and done.
  #8347    
Old June 2nd, 2013, 05:21 PM
vashack's Avatar
vashack
Unhatched Egg
 
Join Date: Feb 2013
Gender: Male
Quote:
Originally Posted by PJBottomz View Post
That's not a script, it's a command. trainerbattle is a command, 0x3 is a hex code that activates a type of trainerbattle. I'm not even sure what you mean by the offset for it...

If you want to change the text, open the script in XSE, find the offset at the end of the trainerbattle command, delete it and replace it with a different offset, delete the corresponding text string and offset and replace it, and done.
I don't want to change the text in the script. I want to find the offset used for the trainerbattle command, and scrub out the text, so your first battle isn't interrupted by Oak talking about how to battle.
  #8348    
Old June 2nd, 2013, 06:15 PM
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote:
Originally Posted by vashack View Post
I don't want to change the text in the script. I want to find the offset used for the trainerbattle command, and scrub out the text, so your first battle isn't interrupted by Oak talking about how to battle.
Just make a new battle. You need to learn scripting and just write your own script.
__________________

Paired with Simba
  #8349    
Old June 3rd, 2013, 12:44 PM
nalacar
Unhatched Egg
 
Join Date: Apr 2013
Gender: Male
Game: Fire Red
Editor: XSE 1.1.1
Script: De-Leveler

So I thought of an idea for my hack last night. It seems possible, just not quite there yet. Basically a Pokemon De-Leveler that will choose a Poke from the party and reset it to Lv 1. So Charizard gets de-leveled to Lv 1 essentially.

I already know the problem is with the way Im comparing variables in the second check. Just not quite sure how to make it do what I want. The script functions as normal through the second check, but compare always returns 0x0, never 0x1.

A quick explanation of the two specials used and a few others that may work better.
Spoiler:

Used-
09F chooses a pokemon for a purpose and stores its position at 0x8004. works even with eggs

0FF checks pokemon in 0x8004's number and places it in given variable

May Work -
0c1 a "silent hatch" code, hatches an egg in your party indicated by 0x8004, even if not an egg (reset level to 5, changes met location, clears EVs)

147 checks your pokemon in position referenced by 0x8004 and returns to the given variable its pokemon number. returns 0x19c if an egg.

1bb Create a full, party ready pokemon, at the trade slot. 0x8004 = pokemon number, 0x8005 = pokemon level, 0x8006 = item held


Special 0c1 actually does almost everything Im looking for all on its own. Except it doesnt reset the Pokemons attacks. If anyone knows a quick way to reset that data, that might be the simplest way.

Im also unclear as to how to create trades in game. Special 1bb might also work if someone knows how to use that one properly.

The script below is obviously unfinished. The way it is currently set up it will be huge, unless special 0c1 can work for this. I also dont have any framework included yet for taking the original Pokemon away, but that can come later.

I really appreciate the feedback this community always provides.
Spoiler:
'---------------
#org 0x990000
lock
faceplayer
checkflag 0x202
if 0x1 call 0x89901AE
checkflag 0x201
if 0x1 call 0x89901EA
msgbox 0x8990234 MSG_NORMAL '"Hi! Your Pokemon is about to \nget..."
special2 0x8004 0x9F
setflag 0x201
setflag 0x202
release
end

'---------------
#org 0x9901AE
msgbox 0x899025F MSG_NORMAL '"First Check!"
special2 0x8005 0xFF
clearflag 0x202
release
end

'---------------
#org 0x9901EA
msgbox 0x899026E MSG_NORMAL '"Second Check!"
setvar 0x8006 0x3F
compare 0x8005 0x8006
if 0x0 goto 0x899028C
if 0x1 goto 0x899020B
release
end

'---------------
#org 0x99028C
msgbox 0x8990285 MSG_NORMAL '"Fail!"
clearflag 0x201
release
end

'---------------
#org 0x99020B
msgbox 0x899027E MSG_NORMAL '"Here!"
givepokemon 0x3F 0x1 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
clearflag 0x201
release
end


'---------
' Strings
'---------
#org 0x990234
= Hi! Your Pokemon is about to \nget weaker

#org 0x99025F
= First Check!

#org 0x99026E
= Second Check!

#org 0x990285
= Fail!

#org 0x99027E
= Here!

Last edited by nalacar; June 3rd, 2013 at 12:45 PM. Reason: spoiler\/
  #8350    
Old June 3rd, 2013, 07:15 PM
LocksmithArmy's Avatar
LocksmithArmy
Mew!
 
Join Date: Feb 2013
Age: 25
Gender: Male
How can I check if the player has used FLASH?

I have a simple script idea

check if flashused
if no call random number generator
generate number 1-100
if number is under 5 start poke battle
if flash is used jump "release end"

that way no pokebattles will appear after the player uses flash... i just dont know how to check if flash is used...

really i only want 1 pokemon to be limited... all the other pokes wont care about flash... but thats not the point HOW DO I CHECK IF FLASH USED...
__________________
~Current Project:

~Completed Projects:


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 11:40 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.