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
  #8051    
Old March 20th, 2013, 09:03 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 TheMightyShin View Post
Yo, I'm having trouble with some flags. The basic set-up is that there's an NPC who won't fight you. However, once talking to a signpost event, talking to this NPC will trigger a battle. I'm doing this via a setflag, which only seems to work on the same map. I'm not sure if I'm doing something wrong, or if flags only apply to the same map. I'm using pksv if that means anything

Code:
#org 0x87408D6
'-----------------------------------
lock
faceplayer
msgbox 0x87408EB ' Howdy, youngster!\pD...
callstd MSG_LOCK ' Built-in lock command
checkflag 0x911
if true jump 0x87406E3 ' Flag is set
release
end

#org 0x87406E3
'-----------------------------------
trainerbattle 0x0 0x14F 0x0 0x8740703 0x874077D
msgbox 0x87407F6 ' FILLER FILLER FILLER...
callstd MSG_LOCK ' Built-in lock command
checkflag 0x912
if false jump 0x87406C9 ' Flag is unset
end

#org 0x87406C9
'-----------------------------------
checkflag 0x912
if true jump 0x87406E1 ' Flag is set
copyvarifnotzero 0x8000 SECRETKEY
copyvarifnotzero 0x8001 0x1
callstd MSG_OBTAIN ' Obtained the XXXXXX!
setflag 0x912
end

#org 0x87406E1
'-----------------------------------
end
The answer to your problem is something I have said 1000 times answering questions: NO flags over 900. They overwrite the RAM used for vars 4000 and up as well as PC box space. Flags 900-90F exist in var 4000, and flags 910-91F exist within var 4001. (Flags are stored in bits, and each var is 16 bits). These vars are temporary and are reset after leaving the map. Read these two posts and learn:

http://www.pokecommunity.com/showpos...&postcount=158
http://www.pokecommunity.com/showpos...&postcount=183

Quote:
Originally Posted by TweenyTodd View Post
I've done exactly that and it STILL doesn't work. I used a clean ROM and re-placed all the characters, set up their flags, and put in the script. I made sure it was script 1 not script 0, and I made sure all the offscripts match. I don't understand whats wrong...
I am going to go test this myself right now. This should be working.

Edit: I compiled it and it worked just fine. Here, let me post a screenshot.

Screen:
Spoiler:
__________________

Paired with Simba

Last edited by karatekid552; March 20th, 2013 at 09:34 AM. Reason: Your double post has been automatically merged.
  #8052    
Old March 20th, 2013, 09:22 AM
TheMightyShin's Avatar
TheMightyShin
 
Join Date: Mar 2013
Gender: Female
Thanks for the reply. Fortunately I managed to figure it out myself but thanks for the clarification. Funny, pksv said those would be safe .
  #8053    
Old March 20th, 2013, 10:52 PM
ProfessorBeeching's Avatar
ProfessorBeeching
Professor Of Fail
 
Join Date: Mar 2013
Location: Sol 3, MW Galaxy, Universe-1
Age: 18
Gender: Male
Nature: Quirky
Quote:
Originally Posted by TBar View Post
I cannot make the most simple script work. I compiled it and inserted it to a character, but when I interatct with the sprite, it makes the clicking sound and nothing happens.
The game does not freeze. The rom is clean.
That's more or less the problem I've been having. Main difference being sometimes the person makes a clicking noise with nothing happening and sometimes I get a glitchy shop menu. I should probably screenshot or video it to make it clearer to understand...
  #8054    
Old March 21st, 2013, 12:39 AM
Kurapika's Avatar
Kurapika
Grudgebearer
 
Join Date: Feb 2013
Location: Lavendar Town - Morocco
Gender: Male
Nature: Naughty
Double-click the person you gave the script to see if it was properly compiled. Also, make you sure you made no mistake in pointers and that the script was inserted in a free space.
Make also sure that you have XSE v1.1.1 (latest version). (You can download a French version here)
__________________
  #8055    
Old March 23rd, 2013, 08:15 AM
ProfessorBeeching's Avatar
ProfessorBeeching
Professor Of Fail
 
Join Date: Mar 2013
Location: Sol 3, MW Galaxy, Universe-1
Age: 18
Gender: Male
Nature: Quirky
Quote:
Originally Posted by Kurapika View Post
Double-click the person you gave the script to see if it was properly compiled. Also, make you sure you made no mistake in pointers and that the script was inserted in a free space.
Make also sure that you have XSE v1.1.1 (latest version). (You can download a French version here)
Double-clicking gives me a 'No Script Editor Defined" error. As for my XSE version, I believe it's the up-to-date one (just with the config file included because of the aforementioned subscript 9 error).
  #8056    
Old March 23rd, 2013, 09:01 AM
TweenyTodd
Quitting cuz i got a job
 
Join Date: Feb 2013
Location: NOYB
Nature: Sassy
Quote:
Originally Posted by karatekid552 View Post
I compiled it and it worked just fine. Here, let me post a screenshot.

Screen:
Spoiler:
But, did you test it out in game? The same compile screen appeared for me, but all 4 people appeared for each gender. I want 2 to appear for either gender.
  #8057    
Old March 23rd, 2013, 12:34 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 TweenyTodd View Post
But, did you test it out in game? The same compile screen appeared for me, but all 4 people appeared for each gender. I want 2 to appear for either gender.
The problem you had was the script crashing. Mine didn't crash, and I know it worked because the spritefacing command worked. This means that (most likely) the flags were set too, but I didn't actually check.

The most important part here, is not the compile log, but the offsets given. Those settings in A-map: they are settings for my Map Script. Notice, they have the same offset as the compiler log. Those are what I was trying to show you. The only reason XSE was in the picture was so you could see how things lined up.

Quote:
Originally Posted by ProfessorBeeching View Post
Double-clicking gives me a 'No Script Editor Defined" error. As for my XSE version, I believe it's the up-to-date one (just with the config file included because of the aforementioned subscript 9 error).
If XSE was on your computer, and you didn't know, and no one ever told you to use it: would you ever think to use it? No. Which is why this isn't working. You never told A-map to use XSE. Go into one of the top menus (Options, I think) and choose "Define Script Editor" or "Choose Script Editor" (can't remember which, but it is at the bottom of one of the top menus.
__________________

Paired with Simba

Last edited by karatekid552; March 23rd, 2013 at 12:37 PM. Reason: Your double post has been automatically merged.
  #8058    
Old March 24th, 2013, 05:10 PM
newpick's Avatar
newpick
Unhatched Egg
 
Join Date: Mar 2013
Gender: Male
First post straight to you guys! tried searching high and lo-tad for it.

Here it is: I want to remove HM05 "Flash" from the game in favor of an item that Oak gives you at the start.

I understand how to make an item given an empty space and have oak give it to you but don't know how to instigate an item into acting as a HM. Help? Thanks!

edit: I could just not have caves :\

Last edited by newpick; March 24th, 2013 at 06:01 PM.
  #8059    
Old March 24th, 2013, 07:05 PM
itman
Back to ROM hacking. :D
 
Join Date: May 2007
Age: 20
Nature: Adamant
Quote:
Originally Posted by newpick View Post
First post straight to you guys! tried searching high and lo-tad for it.

Here it is: I want to remove HM05 "Flash" from the game in favor of an item that Oak gives you at the start.

I understand how to make an item given an empty space and have oak give it to you but don't know how to instigate an item into acting as a HM. Help? Thanks!

edit: I could just not have caves :\
I'm pretty sure if you use JPAN's hacked engine, it's a feature, and it's explained in the word document that comes with the patch.
  #8060    
Old March 25th, 2013, 02:51 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 newpick View Post
First post straight to you guys! tried searching high and lo-tad for it.

Here it is: I want to remove HM05 "Flash" from the game in favor of an item that Oak gives you at the start.

I understand how to make an item given an empty space and have oak give it to you but don't know how to instigate an item into acting as a HM. Help? Thanks!

edit: I could just not have caves :\
I know how to make an item that would have the same effect as flash: ie A flashlight, if that is the type of thing you are referring to.

As itman said, there is a way in JPAN's engine to create items that run scripts. However, this is not required to be used with JPAN's engine, as you are probably not using it already. In that case, see this thread for a routine which will run a script in an item: http://www.pokecommunity.com/showthread.php?t=281573

Now, if you wanted to make an HM type item which teaches a pokemon Flash, that will be much more difficult.
__________________

Paired with Simba
  #8061    
Old March 25th, 2013, 04:02 AM
newpick's Avatar
newpick
Unhatched Egg
 
Join Date: Mar 2013
Gender: Male
Thank you both! I could see why even complex searching wouldn't have yielded that. I could really see this more generalized hack being useful for more things than i could come up with right now!
  #8062    
Old March 25th, 2013, 08:33 AM
TweenyTodd
Quitting cuz i got a job
 
Join Date: Feb 2013
Location: NOYB
Nature: Sassy
Quote:
Originally Posted by karatekid552 View Post
The problem you had was the script crashing. Mine didn't crash, and I know it worked because the spritefacing command worked. This means that (most likely) the flags were set too, but I didn't actually check.

The most important part here, is not the compile log, but the offsets given. Those settings in A-map: they are settings for my Map Script. Notice, they have the same offset as the compiler log. Those are what I was trying to show you. The only reason XSE was in the picture was so you could see how things lined up.
I think the offsets line up right, and im sure of the script. But the spriteface script doesn't work.
Spoiler:
  #8063    
Old March 25th, 2013, 02:37 PM
Bolens's Avatar
Bolens
Soul Hacker
 
Join Date: Jan 2010
Location: PA
Age: 21
Gender: Male
Nature: Mild
Game: Firered Type: Level Script Editor: XSE Script:
Spoiler:
#dynamic 0x745500

#org @start
lockall
msgbox @1 0x6
special 0x113
applymovement 0x7F @move
waitmovement 0x0
setvar 0x7002 0x1
msgbox @2 0x6
applymovement 0x2 @3
applymovement 0x3 @4
applymovement 0x5 @5
applymovement 0x7 @6
applymovement 0x8 @7
applymovement 0x9 @8
waitmovement 0x0
hidesprite 0x3
hidesprite 0x2
hidesprite 0x5
hidesprite 0x7
hidesprite 0x8
hidesprite 0x9
applymovement 0x7F @9
waitmovement 0x0
special 0x114
setflag 0x1005
releaseall
end

#org @1
= Mom: Help!!!!

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

#org @2
= Mom: Somebody please help me!\pGrunt 1: Stop screaming, we run\nthis city so no one can help\lyou.\pGrunt 2: Alright everyone,\nlet’s move out. The boss wants us\lto be in Yann Town in a couple of\lhours.\pGrunts: Yes sir!

#org @3
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @4
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @5
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @6
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @7
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @8
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @9
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE


Problem: XSE crashes whenever I try to compile this into my ROM. Hopefully someone can help, thanks guys.

~Bolens
  #8064    
Old March 25th, 2013, 02:45 PM
Spherical Ice's Avatar
Spherical Ice
Community Supporter
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice
Huh, I split up @2 into separate strings and now it compiles perfectly. I really dunno why, but here you go:

Code:
#dynamic 0x745500

#org @start
lockall
msgbox @1 0x6
special 0x113
applymovement 0x7F @move
waitmovement 0x0
setvar 0x7002 0x1
msgbox @2 0x6
msgbox @string1 0x6
msgbox @string3 0x6
applymovement 0x2 @3
applymovement 0x3 @4
applymovement 0x5 @5
applymovement 0x7 @6
applymovement 0x8 @7 
applymovement 0x9 @8
waitmovement 0x0
hidesprite 0x3
hidesprite 0x2 
hidesprite 0x5
hidesprite 0x7
hidesprite 0x8
hidesprite 0x9
applymovement 0x7F @9
waitmovement 0x0
special 0x114
setflag 0x1005
releaseall
end

#org @1
= Mom: Help!!!!

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

#org @2
= Mom: Somebody please help me!

#org @string1
= Grunt 1: Stop screaming, we run\nthis city so no one can help you.

#org @string3
= Grunt 2: Alright everyone, let's\nmove out.\pThe boss wants us to be in Yann\nTown in a couple of hours.\pGrunts: Yes sir!

#org @3
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @4
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @5
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @6
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @7
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @8
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @9
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE
__________________
  #8065    
Old March 25th, 2013, 03:03 PM
Bolens's Avatar
Bolens
Soul Hacker
 
Join Date: Jan 2010
Location: PA
Age: 21
Gender: Male
Nature: Mild
Quote:
Originally Posted by Spherical Ice View Post
Huh, I split up @2 into separate strings and now it compiles perfectly. I really dunno why, but here you go:

Code:
#dynamic 0x745500

#org @start
lockall
msgbox @1 0x6
special 0x113
applymovement 0x7F @move
waitmovement 0x0
setvar 0x7002 0x1
msgbox @2 0x6
msgbox @string1 0x6
msgbox @string3 0x6
applymovement 0x2 @3
applymovement 0x3 @4
applymovement 0x5 @5
applymovement 0x7 @6
applymovement 0x8 @7 
applymovement 0x9 @8
waitmovement 0x0
hidesprite 0x3
hidesprite 0x2 
hidesprite 0x5
hidesprite 0x7
hidesprite 0x8
hidesprite 0x9
applymovement 0x7F @9
waitmovement 0x0
special 0x114
setflag 0x1005
releaseall
end

#org @1
= Mom: Help!!!!

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

#org @2
= Mom: Somebody please help me!

#org @string1
= Grunt 1: Stop screaming, we run\nthis city so no one can help you.

#org @string3
= Grunt 2: Alright everyone, let's\nmove out.\pThe boss wants us to be in Yann\nTown in a couple of hours.\pGrunts: Yes sir!

#org @3
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @4
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @5
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @6
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @7
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @8
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @9
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE
Thanks so much! It is weird why XSE can be stubborn sometimes, many thanks.
  #8066    
Old March 25th, 2013, 04:32 PM
Crocky's Avatar
Crocky
SuperScarlet!
 
Join Date: Feb 2009
I wanted to add headbutt trees to my hack, and I found this script by google. It works until after you use headbutt, then the game just doesn't allow you to move, like it's missing somthing. How can this be fixed and actually produce a headbutt encounter?

Spoiler:
#dynamic 0x800000

#org @headbutt
checkattack 0x1D
compare 0x800D 0x06
if 0x1 jump @could
setanimation 0x00 0x800D
bufferpartypokemon 0x00 0x800D
bufferattack 0x01 0x1D
message @question MSG_YESNO
compare 0x800D 0x00
if 0x1 jump @end
message @used MSG_NORMAL
closeonkeypress
doanimation 0x25
waitstate
goto 0x1Be06F

#org @could
message @you MSG_NORMAL
release
end

#org @end
release
end

#org @question
= This tree could have a Pokemon\nin it. Use HEADBUTT?

#org @used
= [buffer1] used [buffer2]!

#org @you
= This tree could be HEADBUTTed!
__________________
How to Breed Perfect Pokemon in Omega Ruby and Alpha Sapphire!
How to EV Train in Omega Ruby and Alpha Sapphire!
  #8067    
Old March 25th, 2013, 04:38 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 TweenyTodd View Post
I think the offsets line up right, and im sure of the script. But the spriteface script doesn't work.
Spoiler:
It is perfect (except the image looks like it is setting flag 0x001 on the last line instead of 0x801, just an image problem I hope.) The only thing I can think of is you are not starting a new game when you test your script. This script will only run on a completely brand new game start because the variable is changed as soon as the game starts preventing the map script from running again.
__________________

Paired with Simba
  #8068    
Old March 25th, 2013, 04:39 PM
Spherical Ice's Avatar
Spherical Ice
Community Supporter
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice
Quote:
Originally Posted by Crocky View Post
I wanted to add headbutt trees to my hack, and I found this script by google. It works until after you use headbutt, then the game just doesn't allow you to move, like it's missing somthing. How can this be fixed and actually produce a headbutt encounter?

Spoiler:
#dynamic 0x800000

#org @headbutt
checkattack 0x1D
compare 0x800D 0x06
if 0x1 jump @could
setanimation 0x00 0x800D
bufferpartypokemon 0x00 0x800D
bufferattack 0x01 0x1D
message @question MSG_YESNO
compare 0x800D 0x00
if 0x1 jump @end
message @used MSG_NORMAL
closeonkeypress
doanimation 0x25
waitstate
goto 0x1Be06F

#org @could
message @you MSG_NORMAL
release
end

#org @end
release
end

#org @question
= This tree could have a Pokemon\nin it. Use HEADBUTT?

#org @used
= [buffer1] used [buffer2]!

#org @you
= This tree could be HEADBUTTed!
It says to go to 0x1be06f, but that might be corrupt in you ROM. Here's what the script meant to say:

Code:
#dynamic 0x800000

#org @headbutt
checkattack 0x1D
compare 0x800D 0x06
if 0x1 jump @could
setanimation 0x00 0x800D
bufferpartypokemon 0x00 0x800D
bufferattack 0x01 0x1D
message @question MSG_YESNO
compare 0x800D 0x00
if 0x1 jump @end
message @used MSG_NORMAL
closeonkeypress
doanimation 0x25
waitstate
goto @snippet2

#org @could
message @you MSG_NORMAL
release
end

#org @end
release
end

#org @question
= This tree could have a Pokemon\nin it. Use HEADBUTT?

#org @used
= [buffer1] used [buffer2]!

#org @you
= This tree could be HEADBUTTed!

#org @snippet2
applymovement LASTTALKED @move1
waitmovement 0x0
hidesprite LASTTALKED
special 0xAB
compare LASTRESULT 0x0
if 0x1 goto @snippet2
waitstate
releaseall
end

//---------------
#org @snippet2
releaseall
end


//-----------
// Movements
//-----------
#org @move1
#raw 0x68 //mov68
#raw 0xFE //End of Movements
__________________
  #8069    
Old March 25th, 2013, 04:43 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
Spoiler:
Quote:
Originally Posted by Crocky View Post
I wanted to add headbutt trees to my hack, and I found this script by google. It works until after you use headbutt, then the game just doesn't allow you to move, like it's missing somthing. How can this be fixed and actually produce a headbutt encounter?

Spoiler:
#dynamic 0x800000

#org @headbutt
checkattack 0x1D
compare 0x800D 0x06
if 0x1 jump @could
setanimation 0x00 0x800D
bufferpartypokemon 0x00 0x800D
bufferattack 0x01 0x1D
message @question MSG_YESNO
compare 0x800D 0x00
if 0x1 jump @end
message @used MSG_NORMAL
closeonkeypress
doanimation 0x25
waitstate
goto 0x1Be06F

#org @could
message @you MSG_NORMAL
release
end

#org @end
release
end

#org @question
= This tree could have a Pokemon\nin it. Use HEADBUTT?

#org @used
= [buffer1] used [buffer2]!

#org @you
= This tree could be HEADBUTTed!
Animation 0x25 is the rock smash animation.... Oh, that is how it calls the pokemon. Does it freeze after or before you call the pokemon?

Also, could you post the script that is at 0x1Be06F? I have a feeling that is where your problem lies.


Spherical Ice, why do you have to be so fast?:p
__________________

Paired with Simba
  #8070    
Old March 25th, 2013, 05:07 PM
Crocky's Avatar
Crocky
SuperScarlet!
 
Join Date: Feb 2009
Quote:
Originally Posted by karatekid552 View Post
Spoiler:


Animation 0x25 is the rock smash animation.... Oh, that is how it calls the pokemon. Does it freeze after or before you call the pokemon?

Also, could you post the script that is at 0x1Be06F? I have a feeling that is where your problem lies.


Spherical Ice, why do you have to be so fast?:p
@Spherical Ice, i',m getting a duplicate dynamic label in XSE.

@karatekid552
Spoiler:
'---------------
#org 0x1BE06F
applymovement LASTTALKED 0x81BE08F
waitmovement 0x0
hidesprite LASTTALKED
special 0xAB
compare LASTRESULT 0x0
if 0x1 goto 0x81BE08D
waitstate
releaseall
end

'---------------
#org 0x1BE08D
releaseall
end


'-----------
' Movements
'-----------
#org 0x1BE08F
#raw 0x68 'mov68
#raw 0xFE 'End of Movements
__________________
How to Breed Perfect Pokemon in Omega Ruby and Alpha Sapphire!
How to EV Train in Omega Ruby and Alpha Sapphire!
  #8071    
Old March 25th, 2013, 05:12 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 Crocky View Post
@Spherical Ice, i',m getting a duplicate dynamic label in XSE.

@karatekid552
Spoiler:
'---------------
#org 0x1BE06F
applymovement LASTTALKED 0x81BE08F
waitmovement 0x0
hidesprite LASTTALKED
special 0xAB
compare LASTRESULT 0x0
if 0x1 goto 0x81BE08D
waitstate
releaseall
end

'---------------
#org 0x1BE08D
releaseall
end


'-----------
' Movements
'-----------
#org 0x1BE08F
#raw 0x68 'mov68
#raw 0xFE 'End of Movements
He used @snippit2 twice. Now, to compare his and the original scripts....

They are the same, it should have worked. Can you explain where exactly it freezes and what you have attached this script to?
__________________

Paired with Simba
  #8072    
Old March 25th, 2013, 05:33 PM
Crocky's Avatar
Crocky
SuperScarlet!
 
Join Date: Feb 2009
Quote:
Originally Posted by karatekid552 View Post
He used @snippit2 twice. Now, to compare his and the original scripts....

They are the same, it should have worked. Can you explain where exactly it freezes and what you have attached this script to?
I found the fix haha. I had it on a sign instead of person event. I put it on a Cut Tree and now when I use the headbutt, it shows the cut animation and it looks kind of odd, but it works. Is there any way to change it/remove the cut animation altogether for headbutt trees?
__________________
How to Breed Perfect Pokemon in Omega Ruby and Alpha Sapphire!
How to EV Train in Omega Ruby and Alpha Sapphire!
  #8073    
Old March 25th, 2013, 05:38 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 Crocky View Post
I found the fix haha. I had it on a sign instead of person event. I put it on a Cut Tree and now when I use the headbutt, it shows the cut animation and it looks kind of odd, but it works. Is there any way to change it/remove the cut animation altogether for headbutt trees?
Yes, you could attach it to regular trees which won't be animated because they aren't OWs, but rather tiles. The best and most efficient way would be to create a new behavior byte. I recently saw a tut in the tutorials section for it, and I know that JPAN's Hacked Engine has it. I also remember a thread somewhere in R&D or in the tutorial section specifically pertaining to headbutt trees. This should help you find your answer.
__________________

Paired with Simba
  #8074    
Old March 25th, 2013, 10:04 PM
crystalmole
Unhatched Egg
 
Join Date: Nov 2012
Gender: Male
This script should be a script that allows you to buy TMs from a NPC. Instead it freezes the game. Does anyone know what i did wrong? And also is there a tool that allows me to change the price of an item's in game worth, such as an ultra ball costing 600?


#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @1 0x6
pokemart @values
release
end

@org @1
= I sell TMs.

#org @values
#raw word 0x14B
#raw word 0x14D
#raw word 0x13C
#raw word 0x13A
#raw word 0x14A
#raw word 0x0
  #8075    
Old March 25th, 2013, 10:13 PM
destinedjagold's Avatar
destinedjagold
Oh Hai Thar~ 'ω'
Community Supporter
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Quote:
Originally Posted by crystalmole View Post
This script should be a script that allows you to buy TMs from a NPC. Instead it freezes the game. Does anyone know what i did wrong? And also is there a tool that allows me to change the price of an item's in game worth, such as an ultra ball costing 600?


#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @1 0x6
pokemart @values
release
end

@org @1
= I sell TMs.

#org @values
#raw word 0x14B
#raw word 0x14D
#raw word 0x13C
#raw word 0x13A
#raw word 0x14A
#raw word 0x0

Error in color red.
Also, I've heard that sometimes it glitches if you'll use a number as an address, which is colored blue.
Though I couldn't really be sure of that, since I've not yet encountered such problems.

Anyway, for your second question, I believe thethethethe's item editing tool can do that. Not sure though.
__________________
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 06:57 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.