The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page [Archive] Script help thread

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
Closed Thread
 
Thread Tools
  #1276   Link to this post, but load the entire thread.  
Old June 15th, 2008 (8:40 PM).
Austinia's Avatar
Austinia Austinia is offline
 
Join Date: Jun 2008
Location: California
Age: 30
Gender:
Nature: Quirky
Posts: 152
Quote:
Originally Posted by Shadow-X View Post
Hm, well I'm a n00b to scripting, but I made this script:
The thing is, when I talk to the person, the screen goes red. BTW, I'm using pokescript.
Thanks in advance and if it's pretty bad, it's because I still know very little.
should you use "if b_true goto (...)" or "if b_flase goto (...)"? im not sure... just a guess.
  #1277   Link to this post, but load the entire thread.  
Old June 15th, 2008 (9:32 PM).
Shadow-X's Avatar
Shadow-X Shadow-X is offline
That Guy
 
Join Date: Jan 2008
Gender:
Posts: 9
Quote:
Originally Posted by Austinia View Post
should you use "if b_true goto (...)" or "if b_flase goto (...)"? im not sure... just a guess.
Nope still red, thanks for responding though.
  #1278   Link to this post, but load the entire thread.  
Old June 15th, 2008 (10:17 PM).
One Winged Angel One Winged Angel is offline
Banned
 
Join Date: Apr 2008
Location: Anchorage, Alaska
Age: 30
Gender:
Nature: Calm
Posts: 480
Hey guys, just wondering, what is the flag or giveitem for the Town Map??? Thanks in advanced.
  #1279   Link to this post, but load the entire thread.  
Old June 15th, 2008 (10:24 PM).
Darthatron's Avatar
Darthatron Darthatron is offline
巨大なトロール。
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 31
Gender: Male
Nature: Modest
Posts: 1,152
Quote:
Originally Posted by yunghove View Post
Hey guys, just wondering, what is the flag or giveitem for the Town Map??? Thanks in advanced.
It's an Item, so it's just a "giveitem" script. The number is...
Code:
0x169
Enjoy. Mr. I Hate XSE.
__________________
あなた は しきしゃ です
わたし は ばか です
  #1280   Link to this post, but load the entire thread.  
Old June 15th, 2008 (10:40 PM).
One Winged Angel One Winged Angel is offline
Banned
 
Join Date: Apr 2008
Location: Anchorage, Alaska
Age: 30
Gender:
Nature: Calm
Posts: 480
Lol, thanks. I don't Hate it, i like pokescript better.
  #1281   Link to this post, but load the entire thread.  
Old June 16th, 2008 (4:12 AM).
Charliezard's Avatar
Charliezard Charliezard is offline
A wild shroomish appeared!
 
Join Date: May 2007
Location: Australia
Age: 31
Gender: Male
Posts: 1,274
I redid my movement script, following thethethe's tutorial and HockeyPanda's XSE tutorial and the XSE command helper :P. To reinterprate the movement script in thethethe's tutorial into XSE. Well anyway here's the script
Before being compiled:
Code:
#Dynamic 0x456772

#ORG @Main
checkflag 0x828
if 0x1 goto @Starter
message @1
boxset 0x6
applymovement 0xff @movement
pause 0
nop
release
end

#ORG @Starter
release
end

#ORG @movement
#raw 0x10 0x12 0x12

#ORG @1
= Crap!\nI forgot Pikachu!
After being compiled
Code:
'-----------------------
#org 0x456773
checkflag 0x828
if 0x1 goto 0x8456792
msgbox 0x8456799 '"Crap!\nI forgot Pikachu!"
callstd 0x6
applymovement MOVE_PLAYER 0x8456795
pause 0x0
nop
release
end

'-----------------------
#org 0x456792
release
end


'-----------
' Movements
'-----------
#org 0x456795
#raw 10 'Step Down (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)


'---------
' Strings
'---------
#org 0x456799
= Crap!\nI forgot Pikachu!
It simply freezes you. That is all.

EDIT- I'd prefer someone telling me what's wrong with it as opposed to just posting the script :P.
  #1282   Link to this post, but load the entire thread.  
Old June 16th, 2008 (5:24 AM).
adiktus's Avatar
adiktus adiktus is offline
 
Join Date: May 2008
Nature: Hardy
Posts: 248
@Shadow-X
I dunno.. Try some things.. First, the check item.. maybe do it with 0x72 0x01 0x01 0x00.. Second.. in the movement script, add 0xFE.. Third.. remove the '"I'm the guardian..." and '"Is that a...."
If it doesn't work, I'll check again..

@Onvoloper
Maybe your problem is the script tile? I guess it is a script tile anyway.. try putting 0003 in the unknown.
__________________
*´¨) Love life! Get paid!! Get laid!!!!
¸.´¸.*´¨) ¸.*¨) I'm the DiStOrTeD one
(¸.´ (¸.` * ..:¨¨**¤°¨¨°...............
  #1283   Link to this post, but load the entire thread.  
Old June 16th, 2008 (8:04 AM).
Shadow-X's Avatar
Shadow-X Shadow-X is offline
That Guy
 
Join Date: Jan 2008
Gender:
Posts: 9
Quote:
Originally Posted by adiktus View Post
@Shadow-X
I dunno.. Try some things.. First, the check item.. maybe do it with 0x72 0x01 0x01 0x00.. Second.. in the movement script, add 0xFE.. Third.. remove the '"I'm the guardian..." and '"Is that a...."
If it doesn't work, I'll check again..
Nope it still didn't work......but at least the screen went from light red purplish to bright red
  #1284   Link to this post, but load the entire thread.  
Old June 16th, 2008 (11:53 AM).
Megiddo-san's Avatar
Megiddo-san Megiddo-san is offline
Barium - Summer '12 Return?
 
Join Date: Dec 2007
Location: Where you least expect it
Age: 31
Gender: Male
Nature: Relaxed
Posts: 1,308
For some reason the script goes to #org $done right away. I didn't have an hm01. Does the tm case need to be enabled or something?

#org $begin
lock
faceplayer
checkitem 0x153
#raw 0x01 0x00
compare 0x800D 0x1
if 0x4 goto $done
message $would
boxset 5
compare LASTRESULT 1
if 0x1 goto $takegive
release
end

#org $done
lock
faceplayer
message $how
boxset 6
release
end

#org $takegive
giveitem 0x153 0x1
#raw 0x91 0xDC 0x05 0x00 0x00 0x00
message $there
boxset 6
release
end

#org $would
$would 1 = Hey, I've started to sell HM01's.\nDo you want one? They're 1500\na pop.

#org $how
$how 1 = You don't need two crazy!

#org $there
$there 1 = There you go.
__________________

Hashire! Asu e tsudzuku shinka no micha wa
  #1285   Link to this post, but load the entire thread.  
Old June 16th, 2008 (5:57 PM).
Austinia's Avatar
Austinia Austinia is offline
 
Join Date: Jun 2008
Location: California
Age: 30
Gender:
Nature: Quirky
Posts: 152
Anyone know how to make it so when you walk on a space, it activates a script? Do I just make the script like normal, but enter the offset into a script square in advance map?
  #1286   Link to this post, but load the entire thread.  
Old June 17th, 2008 (12:31 AM).
HackMew's Avatar
HackMew HackMew is offline
Mewtwo Strikes Back
 
Join Date: Jun 2006
Posts: 1,314
Quote:
Originally Posted by Shadow-X View Post
Hm, well I'm a n00b to scripting, but I made this script:
The thing is, when I talk to the person, the screen goes red. BTW, I'm using pokescript.
Thanks in advance and if it's pretty bad, it's because I still know very little.
When using movements you need to put a 0xFE at the end otherwhise the game will keep on reading next values till infinity (more or less:P). Hence the freeze.
I've adjusted your script in order to work with XSE. I've just tested and it's working fine.

Previous Script:
Code:
#org $start
lock
faceplayer
checkitem 0x172 0x1
compare LASTRESULT 0x1
if 0x1 goto $pass
message $nopass '"I'm the guardian of the\secret..."
boxset 6
release
end

#org $pass
message $passx '"Is that a SILVER WING?\pYou may pa..."
boxset 6
applymovement 0x1D $move
pause 0x10
setflag 0x1041
release
end

#org $move
#raw 0x01 0x11 0x60

#org $nopass
= I'm the guardian of the\nsecret legendary POKéMON that is\lsaid to live here.\pUnless you have a SILVER WING,\nyou will not pass.

#org $passx
= Is that a SILVER WING?\pYou may pass...
Adjusted one
Code:
#dynamic 0x800000 'just keep it like that or find another offset filled by FFs

#org @start
lock
faceplayer
checkitem 0x172 0x1
compare LASTRESULT 0x1
if B_TRUE goto @pass
message @nopass '"I'm the guardian of the\secret..."
boxset 6
release
end

#org @pass
message @passx '"Is that a SILVER WING?\pYou may pa..."
boxset 6
applymovement 0x1D @move
waitmovement 0x0
setflag 0x1041
release
end

#org @move
#raw 0x01 0x11 0x60 0xFE

#org @nopass
= I'm the guardian of the\nsecret legendary POKéMON that is\lsaid to live here.\pUnless you have a SILVER WING,\nyou will not pass.

#org @passx
= Is that a SILVER WING?\pYou may pass...

Quote:
Originally Posted by Onvoloper View Post
I redid my movement script, following thethethe's tutorial and HockeyPanda's XSE tutorial and the XSE command helper :P. To reinterprate the movement script in thethethe's tutorial into XSE. Well anyway here's the script
[...]
You need to put an extra 0xFE at the end of each movement #raw data. Also, you should replace that pause 0 and nop with just waitmovement 0x0. I've fixed the script and tried on my own. It worked just fine.


Quote:
Originally Posted by megiddo View Post
For some reason the script goes to #org $done right away. I didn't have an hm01. Does the tm case need to be enabled or something?
No, the TM case gets "enabled" automatically the first time you get one TM/HM.
I fixed the script (even the message which wasn't correclty displayed) and adjusted it for XSE. I've already tested it and it's working like a charm.

Previous script
Code:
#org $begin
lock
faceplayer
checkitem 0x153
#raw 0x01 0x00
compare 0x800D 0x1
if 0x4 goto $done
message $would
boxset 5
compare LASTRESULT  1
if 0x1 goto $takegive
release
end

#org $done
lock
faceplayer
message $how
boxset 6
release
end

#org $takegive
giveitem 0x153 0x1
#raw 0x91 0xDC 0x05 0x00 0x00 0x00
message $there
boxset 6
release
end

#org $would
$would 1 = Hey, I've started to sell HM01's.\nDo you want one?\lThey're 1500 a pop.

#org $how
$how 1 = You don't need two crazy!

#org $there
$there 1 = There you go.
Adjusted one
Code:
#dynamic 0x800000 'or wherever there's some free space

#org @begin
lock
faceplayer
checkitem 0x153 0x1
compare LASTRESULT 0x1
if 0x4 goto @done
message @would
boxset 5
compare LASTRESULT 1
if 0x1 goto @takegive
release
end

#org @done
lock
faceplayer
message @how
boxset 6
release
end

#org @takegive
giveitem 0x153 0x1 0x0
paymoney 1500 0x0
message @there
boxset 6
release
end

#org @would
= Hey, I've started to sell HM01's.\nDo you want one?\pThey're [$]1500 a pop.

#org @how
= You don't need two crazy!

#org @there
= There you go.

Quote:
Originally Posted by Austinia View Post
Anyone know how to make it so when you walk on a space, it activates a script? Do I just make the script like normal, but enter the offset into a script square in advance map?
Basically yes. You may want to put some checkflag in order to not repeat it all the times.
__________________
  #1287   Link to this post, but load the entire thread.  
Old June 17th, 2008 (6:44 AM).
mdark14 mdark14 is offline
 
Join Date: Jun 2008
Posts: 1
where can i leanr how to do this???
  #1288   Link to this post, but load the entire thread.  
Old June 17th, 2008 (10:09 AM).
Austinia's Avatar
Austinia Austinia is offline
 
Join Date: Jun 2008
Location: California
Age: 30
Gender:
Nature: Quirky
Posts: 152
I don't understand. When I script it for the person, it works fine. But, when I put the script in a "script" box in advance map, it freezes when you walk on it.
  #1289   Link to this post, but load the entire thread.  
Old June 17th, 2008 (10:13 AM).
Piplup-Trainer's Avatar
Piplup-Trainer Piplup-Trainer is offline
This is my custom user title.
 
Join Date: Nov 2007
Location: Europe. Many people haven`t heard about the country in which I live.
Age: 31
Gender: Male
Nature: Relaxed
Posts: 228
Hi guys!

What command I need to activate a script when the trainer steps on a tile?
__________________
I LEFT PC!
http://www.pokecommunity.com/member.php?u=66475&vmid=2790824#vmessage2790824


Short summary :

2007 : ROM Hacking - asking some questions regarding Pokemon Ruby/Sapphire
2008 : Trading - mostly to complePokemon keDex in Pokemon Diamond until 2009
2009 : Battling - battles without ev'd Pokemon until 2009, competitive battles until 2010
2010 : Chatting - talking to pc friends, but more often on ut more often on MSN), having a good time
2011 : Less activity - it dropped more because of Windows Live Messenger and Facebook
  #1290   Link to this post, but load the entire thread.  
Old June 17th, 2008 (2:54 PM).
Austinia's Avatar
Austinia Austinia is offline
 
Join Date: Jun 2008
Location: California
Age: 30
Gender:
Nature: Quirky
Posts: 152
Anyone know how to script a trainer battle? Or a tutorial on how to make a trainer battle?
  #1291   Link to this post, but load the entire thread.  
Old June 17th, 2008 (3:41 PM).
Working Class Hero Working Class Hero is offline
 
Join Date: Mar 2006
Location: Ohio
Age: 30
Gender:
Nature: Naughty
Posts: 683
Quote:
#dynamic 0x2E51F2

#org @main
lock
faceplayer
checkflag 0x232
message @there
boxset 0x6
giveitem 0x16F 0x1 0x0
#raw 0x91 0xDC 0x05 0x00 0x00 0x00
setflag 0x232
setflag 0x828
release
end

#org @there
= Here you go! \nGood luck on your journey!

#raw 0x53 0x0F 0x80
Its supposed to give you the National Dex then go away, but instead it gives you the Tri-Pass and never leaves. What is wrong? D:
__________________
I would rather be with friends and family~

lolmence
  #1292   Link to this post, but load the entire thread.  
Old June 17th, 2008 (3:43 PM).
Megiddo-san's Avatar
Megiddo-san Megiddo-san is offline
Barium - Summer '12 Return?
 
Join Date: Dec 2007
Location: Where you least expect it
Age: 31
Gender: Male
Nature: Relaxed
Posts: 1,308
National dex is special 0x16F not giveitem.
__________________

Hashire! Asu e tsudzuku shinka no micha wa
  #1293   Link to this post, but load the entire thread.  
Old June 17th, 2008 (4:11 PM).
Working Class Hero Working Class Hero is offline
 
Join Date: Mar 2006
Location: Ohio
Age: 30
Gender:
Nature: Naughty
Posts: 683
Quote:
Originally Posted by megiddo View Post
National dex is special 0x16F not giveitem.
Well, now all it does is say what it is supposed to. I get nothing at all.

Here is the script.

Quote:
#dynamic 0x2E51F2

#org @main
lock
faceplayer
checkflag 0x232
message @there
boxset 0x6
special 0x16F 0x1 0x0
#raw 0x91 0xDC 0x05 0x00 0x00 0x00
setflag 0x232
setflag 0x828
release
end

#org @there
= Here you go! \nGood luck on your journey!

#raw 0x53 0x0F 0x80
__________________
I would rather be with friends and family~

lolmence
  #1294   Link to this post, but load the entire thread.  
Old June 17th, 2008 (4:14 PM).
destinedjagold's Avatar
destinedjagold destinedjagold is offline
You can contact me in PC's discord server...
 
Join Date: May 2007
Age: 32
Gender: Male
Nature: Careful
Posts: 8,579
Quote:
Originally Posted by Austinia View Post
I don't understand. When I script it for the person, it works fine. But, when I put the script in a "script" box in advance map, it freezes when you walk on it.
in the script tile, there you can find some unknown and variables on A-Map's right corner.
fill those in so it won't freeze.




@avatar...
remove the 0x1 0x0 from the special...
__________________

  #1295   Link to this post, but load the entire thread.  
Old June 17th, 2008 (4:20 PM).
Shadow-X's Avatar
Shadow-X Shadow-X is offline
That Guy
 
Join Date: Jan 2008
Gender:
Posts: 9
Thanks for helping HackMew!
__________________
Ha! My signature rick-roll'd you!
  #1296   Link to this post, but load the entire thread.  
Old June 17th, 2008 (4:43 PM).
Working Class Hero Working Class Hero is offline
 
Join Date: Mar 2006
Location: Ohio
Age: 30
Gender:
Nature: Naughty
Posts: 683
Quote:
Originally Posted by destinedjagold View Post


in the script tile, there you can find some unknown and variables on A-Map's right corner.
fill those in so it won't freeze.




@avatar...
remove the 0x1 0x0 from the special...
Does the same thing as before. Also... (sorry for being rude when your trying to help but this really bugs me.) by using "..." you implied that I am being stupid by putting those. Well tell me this, did you know how to script everything when you have only been scripting for 3 days? Oh, and without a tutorial on how to actually do it?

Quote:
#dynamic 0x2E51F2

#org @main
lock
faceplayer
checkflag 0x232
message @there
boxset 0x6
special 0x16F
#raw 0x91 0xDC 0x05 0x00 0x00 0x00
setflag 0x232
setflag 0x828
release
end

#org @there
= Here you go! \nGood luck on your journey!

#raw 0x53 0x0F 0x80
That is it now. Someone please help. D:
__________________
I would rather be with friends and family~

lolmence
  #1297   Link to this post, but load the entire thread.  
Old June 17th, 2008 (4:53 PM). Edited June 17th, 2008 by adiktus.
adiktus's Avatar
adiktus adiktus is offline
 
Join Date: May 2008
Nature: Hardy
Posts: 248
Try setting the Regional Pokedex before the National Pokedex.. Setflag 0x829 in Fire Red.
__________________
*´¨) Love life! Get paid!! Get laid!!!!
¸.´¸.*´¨) ¸.*¨) I'm the DiStOrTeD one
(¸.´ (¸.` * ..:¨¨**¤°¨¨°...............
  #1298   Link to this post, but load the entire thread.  
Old June 17th, 2008 (6:36 PM).
Austinia's Avatar
Austinia Austinia is offline
 
Join Date: Jun 2008
Location: California
Age: 30
Gender:
Nature: Quirky
Posts: 152
Thanks! I figured it out :D


Now... another quick question... I know you can make yes/no scripts, but is it possible to make a script that says "which pokemon would you like" and then lists options? If so ... could you point me to a tutorial with it... or, give me an example script. Thanks :D
  #1299   Link to this post, but load the entire thread.  
Old June 17th, 2008 (6:41 PM).
Megiddo-san's Avatar
Megiddo-san Megiddo-san is offline
Barium - Summer '12 Return?
 
Join Date: Dec 2007
Location: Where you least expect it
Age: 31
Gender: Male
Nature: Relaxed
Posts: 1,308
You would use this command:
msgbox2 $question
multi 0xE 0x0 0x08 0x0
the 3rd value is one of the already existing multi choice boxes in the game.
If in pokescript, you have to add in the command to the command file.
__________________

Hashire! Asu e tsudzuku shinka no micha wa
  #1300   Link to this post, but load the entire thread.  
Old June 17th, 2008 (6:47 PM).
Austinia's Avatar
Austinia Austinia is offline
 
Join Date: Jun 2008
Location: California
Age: 30
Gender:
Nature: Quirky
Posts: 152
Quote:
Originally Posted by megiddo View Post
You would use this command:
msgbox2 $question
multi 0xE 0x0 0x08 0x0
the 3rd value is one of the already existing multi choice boxes in the game.
If in pokescript, you have to add in the command to the command file.
I don't really understand :S
Closed Thread

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:24 AM.