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.


Advertise here

Closed Thread
Click here to go to the first staff post in this thread.  
Thread Tools
  #3676    
Old April 23rd, 2010, 03:37 AM
Collen
I have returned.
 
Join Date: Jul 2009

Advertise here
Ok, so I'm starting to make scripts, and I've ran into something.
I can insert one line scrips, but when I do multi-line scripts (/n /l /p), It makes this weird box show up in the top left corner, and when I press the A button, it goes away and the game freezes. I'm entering everything like I saw on the tutorial and then insert it like I would insert a normal script (like the tutorial said), but it just doesn't work!
Here's the script:
Spoiler:
#org $script
lock
faceplayer
message $talk
$talk 1 = Hello./nI'm afraid you can't/lenter the lab right now./lWho are you, any way?/pYou don't look like a trainer!
boxset 6
release
end

Does anyone know what I'm doing wrong?
__________________


Last edited by Collen; April 23rd, 2010 at 03:39 AM. Reason: Capitalizing the A. Looks weird in lowercase.
  #3677    
Old April 23rd, 2010, 03:46 AM
Magic's Avatar
Magic
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Quote:
Originally Posted by Collen View Post
Ok, so I'm starting to make scripts, and I've ran into something.
I can insert one line scrips, but when I do multi-line scripts (/n /l /p), It makes this weird box show up in the top left corner, and when I press the A button, it goes away and the game freezes. I'm entering everything like I saw on the tutorial and then insert it like I would insert a normal script (like the tutorial said), but it just doesn't work!
Here's the script:
Spoiler:
#org $script
lock
faceplayer
message $talk
$talk 1 = Hello./nI'm afraid you can't/lenter the lab right now./lWho are you, any way?/pYou don't look like a trainer!
boxset 6
release
end

Does anyone know what I'm doing wrong?
If you use XSE to script you can input your text into its Text adjuster which works out where the /n etc. bits go.

If you still want to script pokéscript style than that works too, but you might want to download XSE just to use the Text Adjuster it's a life saver.

Spoiler:

= Hello.\nI'm afraid you can't enter the lab\lright now.\lWho are you anyway? You don't look\llike a trainer!
__________________
  #3678    
Old April 23rd, 2010, 04:21 AM
Collen
I have returned.
 
Join Date: Jul 2009
This time, instead of doing anything, it just mkaes the sound and nothing happens.
__________________

  #3679    
Old April 23rd, 2010, 08:58 AM
mariovstoad
Beginning Trainer
 
Join Date: Jun 2009
Gender:
i seem to have come up with an error.
Spoiler:
#dynamic 0x800000

#org @start
applymovement 0xFF @move
release
end

#org @move
#raw 0x15
#raw 0xFE


this script should cause my character to jump up two spaces when i step on the tile. however, it flat out doesn't work. whats wrong?
  #3680    
Old April 23rd, 2010, 09:02 AM
Binary's Avatar
Binary
え?
 
Join Date: Aug 2007
Age: 20
@mariovstoad

Spoiler:
#dynamic 0x800000

#org @start
applymovement 0xFF @move
waitmovement 0x0
release
end

#org @move
#raw 0x15
#raw 0xFE
__________________
  #3681    
Old April 23rd, 2010, 10:40 AM
shadix
Beginning Trainer
 
Join Date: Mar 2010
Gender: Male
Hello. I still can not grasp the setvar function. Can someone explain how to use and give an example of the two forms?

Please help me :((
  #3682    
Old April 23rd, 2010, 01:44 PM
Collen
I have returned.
 
Join Date: Jul 2009
Ok, I forgot to burn the script. Now it makes that weird box appear like the other scripts I tried.

It looks like I won't be able to hack it....
ugh.
__________________

  #3683    
Old April 23rd, 2010, 04:33 PM
Zeffy's Avatar
Zeffy
reducio actividado
 
Join Date: Apr 2009
Send a message via Skype™ to Zeffy
Quote:
Originally Posted by shadix View Post
Hello. I still can not grasp the setvar function. Can someone explain how to use and give an example of the two forms?

Please help me (
If you want to know more about the setvar function try reading a tutorial.
__________________

Last edited by Christos; April 23rd, 2010 at 09:32 PM.
  #3684    
Old April 24th, 2010, 04:09 AM
shadix
Beginning Trainer
 
Join Date: Mar 2010
Gender: Male
ehh... I don't undertand. Please take me the example. :(
  #3685    
Old April 24th, 2010, 04:34 AM
Ninja Caterpie's Avatar
Ninja Caterpie
Sitting by the back window
 
Join Date: Mar 2008
Location: Best City OCE
Age: 18
Gender: Male
Nature: Bold
Quote:
Originally Posted by shadix View Post
ehh... I don't undertand. Please take me the example.
Vars are like flags, except you can set them to more than just on or off. You can also do basic maths with them.

For example, say you have three starters and want your rival to have different starters accordingly.

Instead of wasting three flags setting them for each different starter, you can use one variable and set it to a different amount for a different starter. Variables are very useful around scripts that have multiple stages and/or outcomes.

Setvar sets the var as a number. Addvar and subtractvar add and subtract from vars. You might need something like that if you're trying to set a var according to another one or something like that.

If you want a script example, go decompile some in-game scripts.
__________________
Brony represent.
  #3686    
Old April 24th, 2010, 05:49 AM
trebornosliw's Avatar
trebornosliw
Learning
 
Join Date: Jul 2009
Age: 22
Gender: Male
Nature: Adamant
Question, can you use a script to change a map's palette? Just curious. Also, there's a script for changing the player OW in one of the hacking newsletters; does anyone know if it's any good (I could check myself of course, and probably will, but first I will ensure that I have made every effort to facilitate laziness)?
__________________
Credit for my avatar goes to the Lego company.
  #3687    
Old April 24th, 2010, 06:17 AM
Shiny Quagsire's Avatar
Shiny Quagsire
どないやねん, ヤドン
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
One question, very simple, but I haven't a clue:

How can I check a variable, and if its, say, 01 or 00 goto another part of the script?
__________________



  #3688    
Old April 24th, 2010, 07:08 AM
trebornosliw's Avatar
trebornosliw
Learning
 
Join Date: Jul 2009
Age: 22
Gender: Male
Nature: Adamant
Quote:
Originally Posted by shiny quagsire View Post
One question, very simple, but I haven't a clue:

How can I check a variable, and if its, say, 01 or 00 goto another part of the script?
Very simple. The way it works is very similar to a flag. Here's a quick example in XSE:
Spoiler:

#dynamic 0x800000

#org @example
compare 0x800D 0x0
if 0x1 goto @first
compare 0x800D 0x1
if 0x1 goto @second
compare 0x800D 0x3
if 0x1 goto @third

So, when you use a "setvar 0x800D" you're assigning a value to that offset (just for the record, it's best not to mess with 0x800D, as this var is used for stuff like checkpokemon, etc. Look at Diegoisawesome's tut for more info on those). You then compare the value stored at that offset with the "compare 0x800D" command to any number. For instance, if I assigned the number 1 to 0x800D and want something special to happen, "compare 0x800D 0x1, if 0x1 goto... etc."
Hope that helped!
__________________
Credit for my avatar goes to the Lego company.
  #3689    
Old April 24th, 2010, 10:23 AM
Collen
I have returned.
 
Join Date: Jul 2009
Ok, now I think there's something wrong with my Pokescript.
Whenever I burn it, that weird box shows up. I can't stand it!
It doesn't happen to the guy who wrote the tutorial, and I did the exact same thing he said!

Why does everything bad HAVE to happen to me?
__________________

  #3690    
Old April 24th, 2010, 01:14 PM
trebornosliw's Avatar
trebornosliw
Learning
 
Join Date: Jul 2009
Age: 22
Gender: Male
Nature: Adamant
If everything bad only happened to you, I'd be thrilled, because nothing bad would ever happen to me.
That aside, bad things happen to you because you use Pokescript. Switch to XSE for far better results.
That and that aside, are you sure it's not just the compiler box? Does it have an offset like 0x800291 on it?
__________________
Credit for my avatar goes to the Lego company.
  #3691    
Old April 24th, 2010, 01:29 PM
ultiomos's Avatar
ultiomos
 
Join Date: Feb 2010
Location: At Home
Age: 17
Gender: Male
Nature: Quiet
Send a message via Skype™ to ultiomos
Is it possible to make a script to level a pokemon up?
  #3692    
Old April 24th, 2010, 02:35 PM
Collen
I have returned.
 
Join Date: Jul 2009
Quote:
Originally Posted by trebornosliw View Post
If everything bad only happened to you, I'd be thrilled, because nothing bad would ever happen to me.
That aside, bad things happen to you because you use Pokescript. Switch to XSE for far better results.
That and that aside, are you sure it's not just the compiler box? Does it have an offset like 0x800291 on it?
But the tutorial uses Pokescript, and if I didn't use it, the tutorials would all become usless.
And, where is this "XSE" thing? Is it like pokescript?
Does it use the same scripts?
__________________

  #3693    
Old April 24th, 2010, 03:07 PM
Shiny Quagsire's Avatar
Shiny Quagsire
どないやねん, ヤドン
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 16
Gender: Male
Nature: Jolly
Quote:
Originally Posted by Collen View Post
But the tutorial uses Pokescript, and if I didn't use it, the tutorials would all become usless.
And, where is this "XSE" thing? Is it like pokescript?
Does it use the same scripts?
XSE is a script compiler far better than pokescript, with more commands and enhanced features. It's layout is exactly like pokescript, except there are @'s instead of $'s. You'll find it in hackmew's tool thread here.
__________________



  #3694    
Old April 24th, 2010, 07:56 PM
trebornosliw's Avatar
trebornosliw
Learning
 
Join Date: Jul 2009
Age: 22
Gender: Male
Nature: Adamant
No, XSE is different from Pokescript in other ways as well; here's a great tutorial: Diegoisawesome's XSE Tutorial
The main bonuses of XSE (for me) is that it works way, way better than the alternatives, it's popular, so more people can help you out with it, and the program itself has a ton of extra features, including script dumps, a text adjuster, and a built-in compiler/decompiler.
__________________
Credit for my avatar goes to the Lego company.
  #3695    
Old April 24th, 2010, 11:13 PM
Satoshi Ookami's Avatar
Satoshi Ookami
Memento Mori
Community Supporter
 
Join Date: Jul 2008
Location: Abyss of Time, Great Seal
Age: 22
Gender: Male
Nature: Calm
Quote:
Originally Posted by ultiomos View Post
Is it possible to make a script to level a pokemon up?
I think there's no script for that. (Someone correct me if I'm wrong.)
Maybe the only way to do it is by removing pokemon and giving trainer the same one with higher level.
Or you can just give trainer Rare Candy xD
__________________
ROM hacking FAQ - Read before asking how to play a hack. | Previous Sign 2 | Previous Sign

Anime List | PSN Trophy List
  #3696    
Old April 24th, 2010, 11:43 PM
Ninja Caterpie's Avatar
Ninja Caterpie
Sitting by the back window
 
Join Date: Mar 2008
Location: Best City OCE
Age: 18
Gender: Male
Nature: Bold
What's the special for the Seagallop Ferry and how do I change the direction it goes? I think it was in the RHN, but I can't find it. =|
__________________
Brony represent.
  #3697    
Old April 25th, 2010, 02:06 AM
Binary's Avatar
Binary
え?
 
Join Date: Aug 2007
Age: 20
Quote:
Originally Posted by Ninja Caterpie View Post
What's the special for the Seagallop Ferry and how do I change the direction it goes? I think it was in the RHN, but I can't find it. =|
In which game?
If it's FR I suggest you to decompile a script and see for yourself. There are plenty in the Sevii islands. As for the direction, I don't know :/.
__________________
  #3698    
Old April 25th, 2010, 03:05 AM
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Quote:
Originally Posted by ultiomos View Post
Is it possible to make a script to level a pokemon up?
Only through ASM. Even if you give the player a Rare Candy, you cannot be sure that the player will actually use it, unless you use an ASM routine.


Quote:
Originally Posted by Ninja Caterpie View Post
What's the special for the Seagallop Ferry and how do I change the direction it goes? I think it was in the RHN, but I can't find it. =|
Well, maybe because you didn't search thoroughly :P
__________________
  #3699    
Old April 25th, 2010, 03:32 AM
Ninja Caterpie's Avatar
Ninja Caterpie
Sitting by the back window
 
Join Date: Mar 2008
Location: Best City OCE
Age: 18
Gender: Male
Nature: Bold
Yeah, I didn't. I found it myself eventually, so I got it. However...

Code:
'---------------
#org 0x737B92
lock
faceplayer
compare 0x7000 0x0
if 0x1 goto 0x8737BB5
compare 0x7000 0x1
if 0x1 goto 0x8737BC5
msgbox 0x8737C14 MSG_NORMAL '"Oh, it's you again! Did you use\nt..."
release
end

'---------------
#org 0x737BB5
msgbox 0x8737C5C MSG_NORMAL '"Hello dear! How are you going?\pHm..."
setvar 0x7000 0x1
release
end

'---------------
#org 0x737BC5
checkitem 0x67 0x0
if 0x1 goto 0x8737C09
checkitem 0x68 0x0
if 0x1 goto 0x8737C09
msgbox 0x8737D63 MSG_NORMAL '"Oh! You brought the mushrooms!\pHe..."
giveitem 0x171 0x1 MSG_FIND
removeitem 0x67 0x1
removeitem 0x68 0x1
setvar 0x7000 0x2
msgbox 0x8737DEE MSG_NORMAL '"Use it well! It's very good for\nc..."
release
end

'---------------
#org 0x737C09
msgbox 0x8737E25 MSG_NORMAL '"If you want me to make you a\nSECR..."
release
end


'---------
' Strings
'---------
#org 0x737C14
= Oh, it's you again! Did you use\nthe SECRETPOTION I gave you for\lgood?

#org 0x737C5C
= Hello dear! How are you going?\pHmm, what's that? You need a\nSECRETPOTION? For what reason?\pOh, nevermind, I'll let you decide\nthat yourself.\pYou've come to the right person,\nhowever! I can make you one!\pI need a TINYMUSHROOM and BIG\nMUSHROOM in order to do so.

#org 0x737D63
= Oh! You brought the mushrooms!\pHere, just one moment please!\p[.][.][.][.][.][.][.][.][.][.][.][.][.][.]\n[.][.][.][.][.][.][.][.][.][.][.][.][.][.]\pAlright! It's done. Here's your\nSECRETPOTION!

#org 0x737DEE
= Use it well! It's very good for\ncuring sick POKéMON!

#org 0x737E25
= If you want me to make you a\nSECRETPOTION, I need some items.\pI need a TINYMUSHROOM and BIG\nMUSHROOM in order to do so.\pYou can find them aplenty in\nCATERPIE WOOD, just south of here.
This is meant to talk, then if you talk again, check if you've got a big mushroom and tinymushroom and then give you an item. It gives the item even if you don't have the mushrooms.

Also, the script after...

Code:
'---------------
#org 0x737F34
checkflag 0x1010
if 0x1 goto 0x8737F52
checkitem 0x171 0x1
if 0x4 goto 0x8737F72
msgbox 0x8737F95 MSG_FACE '"Ahoy there! What might ye be\nwant..."
end

'---------------
#org 0x737F52
lock
faceplayer
msgbox 0x873806E MSG_YESNO '"Ahoy there, laddy! Are ye ready t'..."
compare LASTRESULT 0x1
if 0x1 goto 0x8737F7F
msgbox 0x873809D MSG_NORMAL '"Alrighty, lad. Tell me when ye're\..."
release
end

'---------------
#org 0x737F72
msgbox 0x87380C8 MSG_FACE '"Oh!\pYe brought the SECRETPOTION! ..."
setflag 0x1010
end

'---------------
#org 0x737F7F
msgbox 0x8738142 MSG_NORMAL '"Then we're off! Let's go!"
setvar 0x8006 0x4
setvar 0x8004 0x0
special 0x17B

'---------
' Strings
'---------
#org 0x737F95
= Ahoy there! What might ye be\nwantin', lad?\pA ride to CAY ISLAND, y'say? I\ncould do that!\pThe only problem is, m' ELECTRODE,\nthe one I use for power, is sick!\pI need a SECRETPOTION from the\nhermit on BLUETHORN CAPE[.]

#org 0x73806E
= Ahoy there, laddy! Are ye ready t'\nset sail?

#org 0x73809D
= Alrighty, lad. Tell me when ye're\nready.

#org 0x7380C8
= Oh!\pYe brought the SECRETPOTION! I\nthank ye very much, laddy!\pIf ye'd wait just a moment, I can\ntake you to CAY ISLAND.

#org 0x738142
= Then we're off! Let's go!
It's supposed to check if you've got a SECRETPOTION, and then let you get on the ship. The checkitem doesn't work.

Checkitem seems to not work right for me...am I doing it wrong (8D)?
__________________
Brony represent.
  #3700    
Old April 25th, 2010, 03:55 AM
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Quote:
Originally Posted by Ninja Caterpie View Post
Yeah, I didn't. I found it myself eventually, so I got it. However...

Spoiler:
Code:
'---------------
#org 0x737B92
lock
faceplayer
compare 0x7000 0x0
if 0x1 goto 0x8737BB5
compare 0x7000 0x1
if 0x1 goto 0x8737BC5
msgbox 0x8737C14 MSG_NORMAL '"Oh, it's you again! Did you use\nt..."
release
end

'---------------
#org 0x737BB5
msgbox 0x8737C5C MSG_NORMAL '"Hello dear! How are you going?\pHm..."
setvar 0x7000 0x1
release
end

'---------------
#org 0x737BC5
checkitem 0x67 0x0
if 0x1 goto 0x8737C09
checkitem 0x68 0x0
if 0x1 goto 0x8737C09
msgbox 0x8737D63 MSG_NORMAL '"Oh! You brought the mushrooms!\pHe..."
giveitem 0x171 0x1 MSG_FIND
removeitem 0x67 0x1
removeitem 0x68 0x1
setvar 0x7000 0x2
msgbox 0x8737DEE MSG_NORMAL '"Use it well! It's very good for\nc..."
release
end

'---------------
#org 0x737C09
msgbox 0x8737E25 MSG_NORMAL '"If you want me to make you a\nSECR..."
release
end


'---------
' Strings
'---------
#org 0x737C14
= Oh, it's you again! Did you use\nthe SECRETPOTION I gave you for\lgood?

#org 0x737C5C
= Hello dear! How are you going?\pHmm, what's that? You need a\nSECRETPOTION? For what reason?\pOh, nevermind, I'll let you decide\nthat yourself.\pYou've come to the right person,\nhowever! I can make you one!\pI need a TINYMUSHROOM and BIG\nMUSHROOM in order to do so.

#org 0x737D63
= Oh! You brought the mushrooms!\pHere, just one moment please!\p[.][.][.][.][.][.][.][.][.][.][.][.][.][.]\n[.][.][.][.][.][.][.][.][.][.][.][.][.][.]\pAlright! It's done. Here's your\nSECRETPOTION!

#org 0x737DEE
= Use it well! It's very good for\ncuring sick POKéMON!

#org 0x737E25
= If you want me to make you a\nSECRETPOTION, I need some items.\pI need a TINYMUSHROOM and BIG\nMUSHROOM in order to do so.\pYou can find them aplenty in\nCATERPIE WOOD, just south of here.


This is meant to talk, then if you talk again, check if you've got a big mushroom and tinymushroom and then give you an item. It gives the item even if you don't have the mushrooms.

Also, the script after...

Spoiler:
Code:
'---------------
#org 0x737F34
checkflag 0x1010
if 0x1 goto 0x8737F52
checkitem 0x171 0x1
if 0x4 goto 0x8737F72
msgbox 0x8737F95 MSG_FACE '"Ahoy there! What might ye be\nwant..."
end

'---------------
#org 0x737F52
lock
faceplayer
msgbox 0x873806E MSG_YESNO '"Ahoy there, laddy! Are ye ready t'..."
compare LASTRESULT 0x1
if 0x1 goto 0x8737F7F
msgbox 0x873809D MSG_NORMAL '"Alrighty, lad. Tell me when ye're\..."
release
end

'---------------
#org 0x737F72
msgbox 0x87380C8 MSG_FACE '"Oh!\pYe brought the SECRETPOTION! ..."
setflag 0x1010
end

'---------------
#org 0x737F7F
msgbox 0x8738142 MSG_NORMAL '"Then we're off! Let's go!"
setvar 0x8006 0x4
setvar 0x8004 0x0
special 0x17B

'---------
' Strings
'---------
#org 0x737F95
= Ahoy there! What might ye be\nwantin', lad?\pA ride to CAY ISLAND, y'say? I\ncould do that!\pThe only problem is, m' ELECTRODE,\nthe one I use for power, is sick!\pI need a SECRETPOTION from the\nhermit on BLUETHORN CAPE[.]

#org 0x73806E
= Ahoy there, laddy! Are ye ready t'\nset sail?

#org 0x73809D
= Alrighty, lad. Tell me when ye're\nready.

#org 0x7380C8
= Oh!\pYe brought the SECRETPOTION! I\nthank ye very much, laddy!\pIf ye'd wait just a moment, I can\ntake you to CAY ISLAND.

#org 0x738142
= Then we're off! Let's go!


It's supposed to check if you've got a SECRETPOTION, and then let you get on the ship. The checkitem doesn't work.

Checkitem seems to not work right for me...am I doing it wrong (8D)?
Yes, you're doing it wrong:

Code:
checkitem 0x68 0x1
compare LASTRESULT 0x0
if 0x1 goto @donthave
Also, next time check in-game scripts. And use spoilers, please.
__________________
Closed Thread
Quick Reply

Sponsored Links


Advertise here
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:02 PM.


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.