The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other Script Problems!

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old October 26th, 2014 (2:18 PM). Edited March 27th, 2015 by Sefuree.
Sefuree's Avatar
Sefuree Sefuree is offline
Canada Goose
 
Join Date: May 2014
Location: Canada
Age: 22
Gender: Male
Nature: Adamant
Posts: 3,183
Hi, i have a few scripting problems!

Give Pokemon Script
Spoiler:
Code:
#dynamic 0x71A544

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

#org @take
givepokemon 0x6 0x50 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 call @name
msgbox @5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @done
msgbox @6 0x6
release
end

#org @1
= Hi, Can you take this Charizard\noff my hands?

#org @2
= Oh, That's okay!\nI'm sure someone else will want\lit!

#org @3
= [black_fr]You received a Charizard!

#org @4
= [black_fr]Would you like to give\na\nnickname to Charizard?

#org @5
= Take good care of my Charizard!

#org @6
= How is my Charizard feeling?


Wild Pokemon Script
Spoiler:
Code:
#dynamic 0x71A7C8

#org @start
lock
faceplayer
msgbox @1 0x6
cry 0x6 0x0
wildbattle 0x144 0x1E 0x8B
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x201
release
end

#org @1
= Articuno: Cuuuuuno!


I'm Using this tutorial: http://www.pokecommunity.com/showthread.php?t=164276

Here is the results of the scripts



Problems:
- Wrong pokemon
- wrong level's
- not facing player

Can someone help?
__________________

:)
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old October 26th, 2014 (3:14 PM).
Percy's Avatar
Percy Percy is offline
 
Join Date: Sep 2014
Location: Asia
Gender: Male
Nature: Quiet
Posts: 3,045
Quote:
Originally Posted by TheRealOCD View Post
Hi, i have a few scripting problems!

Give Pokemon Script
Code:
#dynamic 0x71A544

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

#org @take
givepokemon 0x6 0x50 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 call @name
msgbox @5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @done
msgbox @6 0x6
release
end

#org @1
= Hi, Can you take this Charizard\noff my hands?

#org @2
= Oh, That's okay!\nI'm sure someone else will want\lit!

#org @3
= [black_fr]You received a Charizard!

#org @4
= [black_fr]Would you like to give\na\nnickname to Charizard?

#org @5
= Take good care of my Charizard!

#org @6
= How is my Charizard feeling?
Wild Pokemon Script
Code:
#dynamic 0x71A7C8

#org @start
lock
faceplayer
msgbox @1 0x6
cry 0x6 0x0
wildbattle 0x144 0x1E 0x8B
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x201
release
end

#org @1
= Articuno: Cuuuuuno!

Here is the results of the scripts

Problems:
- Wrong pokemon
- wrong level's
- not facing player

Can someone help?
The reason when you talk to the old man, and he does not face you 'cause you don't have the faceplayer effect, so you should add a faceplayer effect:

Code:
#dynamic 0x71A544

#org @start
lock
faceplayer
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x6
release
end

#org @take
givepokemon 0x6 0x50 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 call @name
msgbox @5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @done
msgbox @6 0x6
release
end

#org @1
= Hi, Can you take this Charizard\noff my hands?

#org @2
= Oh, That's okay!\nI'm sure someone else will want\lit!

#org @3
= [black_fr]You received a Charizard!

#org @4
= [black_fr]Would you like to give\na\nnickname to Charizard?

#org @5
= Take good care of my Charizard!

#org @6
= How is my Charizard feeling?
The corrections is in Bold.
I don't know why the Charizard became lvl. 80...

But I know why the wildbattle script is wrong...
You didn't convert it to hex.
Articuno's number is 144 change it to hex and:

90
so that should be:
wildbattle 0x90 ... ... ...
__________________
i don't want to have a signature
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old October 26th, 2014 (3:16 PM).
JosefigGaming's Avatar
JosefigGaming JosefigGaming is offline
 
Join Date: May 2013
Location: Portugal
Age: 23
Gender: Male
Posts: 287
the reason that the old man is not facing you is probably because he doesn't have a sprite for looking to the right/left
The reason why the pokemon and levels are wrong is because you have to use their hex id
Use this to convert: http://www.binaryhexconverter.com/hex-to-decimal-converter
For example, I wanna give someone a level 20 Pikachu
Pikachu's ID is 2, so I put 25 in the decimal box and I get 19
Do the same with the number 20 and I get 14
so in the pokemon id slot i put 0x19 and in the level slot i put 0x14
Now, if you dont wanna convert to hex everytime you can just use their decimal number, as long as you dont put "0x" before the number
So instead of 0x19 I put 25
Just like that
Hope I helped :)
__________________
Working on:


#fasterSneasel :D (nohomo)

Coolest IRC with the coolest people in the coolest rooms:
http://chat.linkandzelda.com:9090/?channels=romhacking,gogo,discovery,fluorite
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old October 26th, 2014 (3:40 PM). Edited October 26th, 2014 by Sefuree.
Sefuree's Avatar
Sefuree Sefuree is offline
Canada Goose
 
Join Date: May 2014
Location: Canada
Age: 22
Gender: Male
Nature: Adamant
Posts: 3,183
There is so much here! so i put it in a spoiler!
Spoiler:
Quote:
Originally Posted by BlazikenXY View Post
The reason when you talk to the old man, and he does not face you 'cause you don't have the faceplayer effect, so you should add a faceplayer effect:

Code:
#dynamic 0x71A544

#org @start
lock
faceplayer
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x6
release
end

#org @take
givepokemon 0x6 0x50 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 call @name
msgbox @5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @done
msgbox @6 0x6
release
end

#org @1
= Hi, Can you take this Charizard\noff my hands?

#org @2
= Oh, That's okay!\nI'm sure someone else will want\lit!

#org @3
= [black_fr]You received a Charizard!

#org @4
= [black_fr]Would you like to give\na\nnickname to Charizard?

#org @5
= Take good care of my Charizard!

#org @6
= How is my Charizard feeling?
The corrections is in Bold.
I don't know why the Charizard became lvl. 80...

But I know why the wildbattle script is wrong...
You didn't convert it to hex.
Articuno's number is 144 change it to hex and:

90
so that should be:
wildbattle 0x90 ... ... ...
Quote:
Originally Posted by JosefigGaming View Post
the reason that the old man is not facing you is probably because he doesn't have a sprite for looking to the right/left
The reason why the pokemon and levels are wrong is because you have to use their hex id
Use this to convert: http://www.binaryhexconverter.com/hex-to-decimal-converter
For example, I wanna give someone a level 20 Pikachu
Pikachu's ID is 2, so I put 25 in the decimal box and I get 19
Do the same with the number 20 and I get 14
so in the pokemon id slot i put 0x19 and in the level slot i put 0x14
Now, if you dont wanna convert to hex everytime you can just use their decimal number, as long as you dont put "0x" before the number
So instead of 0x19 I put 25
Just like that
Hope I helped :)


Thanks i'll let you know how it goes! i'm not at home right now! #mobile
__________________

:)
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

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

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

Forum Jump


All times are GMT -8. The time now is 9:07 AM.