• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best places on the 'net to talk Pokémon and more! Community members will not see the bottom screen advertisements.
  • Want to share your adventures playing Pokémon?
    Check out our new Travel Journals forum for sharing playthroughs of ROM Hacks, Fan Games, and other Pokémon content!
  • IMPORTANT: Following a takedown request, the following hacks have been delisted from PokéCommunity:

    • Pokémon Glazed
    • Pokémon: Giratina Strikes Back
    • Pokémon Flora Sky
    • Pokémon Stranded
    The downloads and discussion threads for these hacks will no longer be accessible, and staff will be unable to return questions regarding accessing this content.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.

trebornosliw

Learning
516
Posts
14
Years
  • Age 31
  • Seen Jul 22, 2012
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:

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!
 

Collen

I have returned.
71
Posts
14
Years
  • Seen Jan 1, 2015
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?
 

trebornosliw

Learning
516
Posts
14
Years
  • Age 31
  • Seen Jul 22, 2012
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?
 

Collen

I have returned.
71
Posts
14
Years
  • Seen Jan 1, 2015
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?
 

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
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.
 

trebornosliw

Learning
516
Posts
14
Years
  • Age 31
  • Seen Jul 22, 2012
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.
 

Binary

え?
3,977
Posts
16
Years
  • Age 29
  • Seen Apr 7, 2014
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 :/.
 

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
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.


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
 

Ninja Caterpie

AAAAAAAAAAAAA
5,979
Posts
15
Years
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)?
 

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
Yeah, I didn't. I found it myself eventually, so I got it. However...

Spoiler:

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:

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.
 

Collen

I have returned.
71
Posts
14
Years
  • Seen Jan 1, 2015
Ok, the XSE thing is good... But in the tutorial, it doesn't say how to insert the script into the game.
How would I do that?

EDIT: I feel like an idiot. Nevermind, I found out.
 
Last edited:
73
Posts
14
Years
  • Seen Aug 31, 2014
Noob Problem

Hi, I'm having a totally noob problem here:

My scripts won't compile into the ROM. I'll open the rom in XSE, copy & paste the script, compile, save, copy the dynamic # into Advance Map, save, and click "open script" only to find a blank page. Its been half a year since I last did this. Help, please?
 

trebornosliw

Learning
516
Posts
14
Years
  • Age 31
  • Seen Jul 22, 2012
Are you sure you're opening the same ROM both times?
...
That's all I've got :\. I have no idea what the problem is otherwise, if you're doing all the steps as you outlined.
 

Ninja Caterpie

AAAAAAAAAAAAA
5,979
Posts
15
Years
Hi, I'm having a totally noob problem here:

My scripts won't compile into the ROM. I'll open the rom in XSE, copy & paste the script, compile, save, copy the dynamic # into Advance Map, save, and click "open script" only to find a blank page. Its been half a year since I last did this. Help, please?

You're copying the offset of the "start" part of the script from the thing that pops up after clicking compile, right?

Ah, just a quickie of my own. How do I change the direction of the Seagallop Ferry in FR? According to the RHN, it's with 0x8004, but that doesn't work. The in-game scripts...don't exactly do anything in helping me, either. They only set 8006 (for the location, I believe) and 8005 once, not checking for where it's going. @_@
 

Collen

I have returned.
71
Posts
14
Years
  • Seen Jan 1, 2015
Ok, I need help.
My message comes out allright, but it only uses the first line, as in the text crosses over the other text.
Spoiler:

What am I doing wrong?
 

trebornosliw

Learning
516
Posts
14
Years
  • Age 31
  • Seen Jul 22, 2012
Ah, you're not supposed to use /, use \. Then it'll work fine.
@Ninja, you'll need to check some of the islands as well as Vermilion and One island. There should be a var change or something there.
 
Status
Not open for further replies.
Back
Top