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?".
Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
There's no corruption risks with making more free space, the corruption thing is actually talking about the mistake people made years ago when they thought Emerald used 00 bytes instead of FF bytes for free space, which caused sound glitches if people used Advance Map with Emerald. The tutorial I gave you fixes that and gives you more free space. And once you create more free space, you could use Advance Map with the freed offsets for a while, until MEH becomes beta status lol. And I haven't been hacking that long either, I struggle to make really big scripts sometimes haha.
Ah right.. I just get concerned becuase I've already written off one rom haha!
My thing is I'm confident in knowing how to do what I need to do, however if it throws an error at me i have no idea how to fix it! xD
Is the amount of free space in Emerald really SO limited that it's necessary to expand or whatever? I mean I don't create the most space requiring of scripts!
Yeah, the free space is very limited, especially in comparaison to FR/LG.
Scripts don't take a lot of space, but texts (dialogues) and sprites do take a lot of space.
What it's supposed to do is give you an item, then check how many of that item you have, then a msgbox will display saying "You have [number]/5 [item]s". However, when using the above script, it just keeps telling me I have 1 of the item even if I have more than one. Is there something I've missed? =/
It's supposed to give an item and then let the player know how many of that item the player has, but instead it just keeps going to the pointer for having 1 of that item. I'll post my full script here with strings if that makes it easier to understand, sorry im not good with explanations lol.
Code:
#org @start
lock
giveitem 0x51 0x1 0x0
hidesprite 0x1
setflag 0x4B4
checkitem 0x51 0x1
compare 0x800D 0x1
if 0x1 goto @youhaveONEgoldenboneorg1
checkitem 0x51 0x2
compare 0x800D 0x1
if 0x1 goto @youhaveTWOgoldenboneorg1
checkitem 0x51 0x3
compare 0x800D 0x1
if 0x1 goto @youhaveTHREEgoldenboneorg1
checkitem 0x51 0x4
compare 0x800D 0x1
if 0x1 goto @youhaveFOURgoldenboneorg1
release
end
#org @youhaveONEgoldenboneorg1
msgbox @youhaveONEgoldenbone1 0x6
release
end
#org @youhaveTWOgoldenboneorg1
msgbox @youhaveTWOgoldenbone1 0x6
release
end
#org @youhaveTHREEgoldenboneorg1
msgbox @youhaveTHREEgoldenbone1 0x6
release
end
#org @youhaveFOURgoldenboneorg1
msgbox @youhaveFOURgoldenbone1 0x6
release
end
#org @youhaveFOURgoldenbone1
[black_fr]You have [red_fr]4[black_fr]/5 GOLDEN BONES.
#org @youhaveTHREEgoldenbone1
[black_fr]You have [red_fr]3[black_fr]/5 GOLDEN BONES.
#org @youhaveTWOgoldenbone1
[black_fr]You have [red_fr]2[black_fr]/5 GOLDEN BONES.
#org @youhaveONEgoldenbone1
[black_fr]You have [red_fr]1[black_fr]/5 GOLDEN BONES.
Thank you so much for taking the time to try and help, I really appreciate it! Sadly, it still isn't working for some reason =/ it just keeps telling the player they only have 1 of the item even if you have more than 1. Weird!
I'm kinda useless with things like script tiles. I've read many tutorials on how to set them up but None have really got into my head. Could anyone possibly give me a concise step by step on how to set them up?
EDIT: Stuck with this one. It's supposed to check for 0 Fresh water then give 5 if there's none in the bag.
Code:
#org 0xE3D88F
lock
faceplayer
msgbox 0x8E3D8C6 MSG_FACE '"I'm a relief worker sent here from..."
checkitem 0x1A 0x0
if 0x5 goto 0x8E3D8AF
msgbox 0x8E3D935 MSG_FACE '"Oh, you already have some.... \nSh..."
release
end
'---------------
#org 0xE3D8AF
giveitem 0x1A 0x5 MSG_OBTAIN
msgbox 0x8E3D973 MSG_FACE '"You take care now, /nand if you ru..."
release
end
'---------
' Strings
'---------
#org 0xE3D8C6
= I'm a relief worker sent here from \nVentura Town. \pI'm giving out free Fresh Water \lto anyone that needs it!
#org 0xE3D935
= Oh, you already have some.... \nShouldn't be too greedy now!
#org 0xE3D973
= You take care now, /nand if you run out come /lstraight back!
I'm kinda useless with things like script tiles. I've read many tutorials on how to set them up but None have really got into my head. Could anyone possibly give me a concise step by step on how to set them up?
EDIT: Stuck with this one. It's supposed to check for 0 Fresh water then give 5 if there's none in the bag.
Code:
#org 0xE3D88F
lock
faceplayer
msgbox 0x8E3D8C6 MSG_FACE '"I'm a relief worker sent here from..."
[B]checkitem 0x1A 0x1
compare 0x800D 0x1
if 0x0 goto 0x8E3D8AF[/B]
msgbox 0x8E3D935 MSG_FACE '"Oh, you already have some.... \nSh..."
release
end
'---------------
#org 0xE3D8AF
giveitem 0x1A 0x5 MSG_OBTAIN
msgbox 0x8E3D973 MSG_FACE '"You take care now, /nand if you ru..."
release
end
'---------
' Strings
'---------
#org 0xE3D8C6
= I'm a relief worker sent here from \nVentura Town. \pI'm giving out free Fresh Water \lto anyone that needs it!
#org 0xE3D935
= Oh, you already have some.... \nShouldn't be too greedy now!
#org 0xE3D973
= You take care now, \nand if you run out come \lstraight back!
I haven't tested this out, so I'm not sure if it'll work, but changes are in bold. Try it out and see if it works.
EDIT: nvm it doesn't work just tested it
DOUBLE EDIT: Ok should work now, sorry about that. btw you used the slash (/) instead of the backslash (\) for some of the dialogue, I changed that for you.
Exactly what it says on the lid: It compares.
In this case, it compares the value 0x1 to 0x800D a.k.a. Last results, which is the value used in the Checkitem command: 0x1
Then it says if it is 0x0, or false, then jump to this.
Basically: Checkitem for 1 water, compare number player has to 1, if false, give 5.
It still just gives me 5 water each time I speak with him, and I copied line for line the script that was given! :/
Code:
'---------------
#org 0xE3D88F
lock
faceplayer
msgbox 0x8E3D8C6 MSG_FACE '"I'm a relief worker sent here from..."
checkitem 0x1A 0x1
compare LASTRESULT 0x1
if 0x0 goto 0x8E3D8AF
loadpointer 0x0 0x8E3D935 '"Oh, you already have some.... \nSh..."
release
end
'---------------
#org 0xE3D8AF
giveitem 0x1A 0x5 MSG_OBTAIN
msgbox 0x8E3D973 MSG_FACE '"You take care now, \nand if you ru..."
release
end
'---------
' Strings
'---------
#org 0xE3D8C6
= I'm a relief worker sent here from \nVentura Town. \pI'm giving out free Fresh Water \lto anyone that needs it!
#org 0xE3D935
= Oh, you already have some.... \nShouldn't be too greedy now!
#org 0xE3D973
= You take care now, \nand if you run out come \lstraight back!
'---------------
#org 0x29283F
cmdc3 0x2D
fadescreen 0x1
special 0x9E
waitstate
releaseall
end
'---------------
#org 0x292849
fadescreen 0x1
special 0x9D
waitstate
return
'---------------
#org 0x2927DF
setvar 0x8008 0xE
showsprite 0x8008
applymovement 0x8008 0x8292850
waitmovement 0x0
applymovement MOVE_PLAYER 0x82725A8
waitmovement 0x0
msgbox 0x81F869A MSG_KEEPOPEN '"MOM: [player], how do you like you..."
closeonkeypress
applymovement 0x8008 0x8292857
waitmovement 0x0
return
'---------------
#org 0x29280F
setvar 0x8008 0xE
showsprite 0x8008
applymovement 0x8008 0x829285B
waitmovement 0x0
applymovement MOVE_PLAYER 0x82725A4
waitmovement 0x0
msgbox 0x81F869A MSG_KEEPOPEN '"MOM: [player], how do you like you..."
closeonkeypress
applymovement 0x8008 0x8292862
waitmovement 0x0
return
'---------
' Strings
'---------
#org 0x1F8668
= The clock is stopped[.]\pBetter set it and start it!
#org 0x1F869A
= MOM: [player], how do you like your\nnew room?\pGood! Everything's put away neatly!\pThey finished moving everything in\ndownstairs, too.\pPOKéMON movers are so convenient!\pOh, you should make sure that\neverything's all there on your desk.
'-----------
' Movements
'-----------
#org 0x292850
#raw 0x13 'Delay4
#raw 0x8 'Step Down (Normal)
#raw 0x27 'Step on the Spot Left (Fastest)
#raw 0x14 'Delay5
#raw 0x13 'Delay4
#raw 0xA 'Step Left (Normal)
#raw 0xFE 'End of Movements
#org 0x2725A8
#raw 0x28 'Step on the Spot Right (Fastest)
#raw 0xFE 'End of Movements
#org 0x292857
#raw 0xB 'Step Right (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0x13 'Delay4
#raw 0xFE 'End of Movements
#org 0x29285B
#raw 0x13 'Delay4
#raw 0x8 'Step Down (Normal)
#raw 0x28 'Step on the Spot Right (Fastest)
#raw 0x14 'Delay5
#raw 0x13 'Delay4
#raw 0xB 'Step Right (Normal)
#raw 0xFE 'End of Movements
#org 0x2725A4
#raw 0x27 'Step on the Spot Left (Fastest)
#raw 0xFE 'End of Movements
#org 0x292862
#raw 0xA 'Step Left (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0x13 'Delay4
#raw 0xFE 'End of Movements
I'm just trying to make a script for this that prevents me from leaving my room until I set the clock. As you can see, there are a lot of var/flags...
If anyone can help me out, and also explain to me how to read a script that's already programmed.. thanks. :)
It still just gives me 5 water each time I speak with him, and I copied line for line the script that was given! :/
Code:
'---------------
#org 0xE3D88F
lock
faceplayer
msgbox 0x8E3D8C6 MSG_FACE '"I'm a relief worker sent here from..."
checkitem 0x1A 0x1
compare LASTRESULT 0x1
if 0x0 goto 0x8E3D8AF
loadpointer 0x0 0x8E3D935 '"Oh, you already have some.... \nSh..."
release
end
'---------------
#org 0xE3D8AF
giveitem 0x1A 0x5 MSG_OBTAIN
msgbox 0x8E3D973 MSG_FACE '"You take care now, \nand if you ru..."
release
end
'---------
' Strings
'---------
#org 0xE3D8C6
= I'm a relief worker sent here from \nVentura Town. \pI'm giving out free Fresh Water \lto anyone that needs it!
#org 0xE3D935
= Oh, you already have some.... \nShouldn't be too greedy now!
#org 0xE3D973
= You take care now, \nand if you run out come \lstraight back!
That loadpointer command shouldn't be there... Did you remove the script data from the rom before recompiling? Deleting the sprite on Advance Map won't help, because the script is still inside the rom. I would use a pre-processing command (such as clean or removeall), or fill the script data with FF bytes in a hex editor, and recompile the script I gave you.
I'm trying to create my own script to set the clock in Emerald, you know when your mom tells you to go upstairs and set your clock?
When I open the script in XSE, this is what I get:
Spoiler:
'---------------
#org 0x292781
lockall <-- This will lock everything on the map
setvar 0x8004 0x0 <-- This will set a value of 0 to var 0x8004
goto 0x8292799 <-- This will basically make the script "goto" 0x292799 (disregard the 8), where the script will continue.
'---------------
#org 0x292799
checkflag 0x51 <-- This will check the flag 0x51. If the flag is set, the game will goto 0x29283F. If you look at the script, the flag 0x51 is set after the special (when you set the time) is executed. So this flag is probably there to prevent the time setting from happening again.
if 0x1 goto 0x829283F
msgbox 0x81F8668 MSG_KEEPOPEN '"The clock is stopped[.]\pBetter se..."
call 0x8292849 <-- This will call 0x292849. After the commands at 0x292849 are executed, the script will return to this place, and continue on.
pause 0x1E
setvar 0x4092 0x6 <-- This will set the value of 6 to var 0x4092. I'm not 100% sure why this is there, but I'm guessing its to disable the level script downstairs that forces you to go upstairs if you don't set the time.
setflag 0x51 <-- Sets the flag 0x51. As you saw, if you interact with the clock again, the script will check to see if this flag is set.
setflag 0x2F2 <-- Not sure what these flags are doing here, but I'm guessing they're there to hide the Vigoroth and truck sprites.
setflag 0x2F3
checkgender < -- This will check your gender, and go to a different offset depending on your gender. This makes sense, since the rooms for the boy and girl PC are different.
compare LASTRESULT 0x0
if 0x1 call 0x82927DF
compare LASTRESULT 0x1
if 0x1 call 0x829280F
sound 0x9
hidesprite 0x8008
releaseall
end
'---------------
#org 0x29283F <-- If the flag 0x51 is set, the script goes here. This probably shows the clock, but prevents you from messing with the time again.
cmdc3 0x2D
fadescreen 0x1
special 0x9E
waitstate
releaseall
end
'---------------
#org 0x292849 <-- This is the script that will set the time.
fadescreen 0x1
special 0x9D
waitstate
return
'---------------
#org 0x2927DF <-- The script for the mom coming in, if you're male.
setvar 0x8008 0xE <-- Can't really tell what this does, sorry. It seems to do something for the mom, but I can't really tell what its doing at the moment.
showsprite 0x8008
applymovement 0x8008 0x8292850
waitmovement 0x0
applymovement MOVE_PLAYER 0x82725A8
waitmovement 0x0
msgbox 0x81F869A MSG_KEEPOPEN '"MOM: [player], how do you like you..."
closeonkeypress
applymovement 0x8008 0x8292857
waitmovement 0x0
return
'---------------
#org 0x29280F < -- Script for if you're female.
setvar 0x8008 0xE
showsprite 0x8008
applymovement 0x8008 0x829285B
waitmovement 0x0
applymovement MOVE_PLAYER 0x82725A4
waitmovement 0x0
msgbox 0x81F869A MSG_KEEPOPEN '"MOM: [player], how do you like you..."
closeonkeypress
applymovement 0x8008 0x8292862
waitmovement 0x0
return
'---------
' Strings
'---------
#org 0x1F8668
= The clock is stopped[.]\pBetter set it and start it!
#org 0x1F869A
= MOM: [player], how do you like your\nnew room?\pGood! Everything's put away neatly!\pThey finished moving everything in\ndownstairs, too.\pPOKéMON movers are so convenient!\pOh, you should make sure that\neverything's all there on your desk.
'-----------
' Movements
'-----------
#org 0x292850
#raw 0x13 'Delay4
#raw 0x8 'Step Down (Normal)
#raw 0x27 'Step on the Spot Left (Fastest)
#raw 0x14 'Delay5
#raw 0x13 'Delay4
#raw 0xA 'Step Left (Normal)
#raw 0xFE 'End of Movements
#org 0x2725A8
#raw 0x28 'Step on the Spot Right (Fastest)
#raw 0xFE 'End of Movements
#org 0x292857
#raw 0xB 'Step Right (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0x13 'Delay4
#raw 0xFE 'End of Movements
#org 0x29285B
#raw 0x13 'Delay4
#raw 0x8 'Step Down (Normal)
#raw 0x28 'Step on the Spot Right (Fastest)
#raw 0x14 'Delay5
#raw 0x13 'Delay4
#raw 0xB 'Step Right (Normal)
#raw 0xFE 'End of Movements
#org 0x2725A4
#raw 0x27 'Step on the Spot Left (Fastest)
#raw 0xFE 'End of Movements
#org 0x292862
#raw 0xA 'Step Left (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0x13 'Delay4
#raw 0xFE 'End of Movements
I'm just trying to make a script for this that prevents me from leaving my room until I set the clock. As you can see, there are a lot of var/flags...
If anyone can help me out, and also explain to me how to read a script that's already programmed.. thanks. :)
Ok I tried my best to help you. I can't really explain some of them though, since you'd have to look at related scripts to understand what the vars/flags are doing. I'm also not the best at deciphering scripts, so that too.
#org @one
= Ay kid I got a real special Pokémon\nright here.\pIt's real nice and it's only\n[@]5000 okay?\pWhat'da say you buyin?
#org @two
= Okay, but you are missin' out.
#org @three
= Alright! Alright! You're gonna\nlove it.
#org @four
= Aye! You ain't even got enough\ncash!
#org @five
= Thanks, but I ain't got nothing\nelse for ya!
#org @karp
= You received Magikarp!
#org @vigor
= You received Vigoroth!
#org @star
= You received Staryu!
#org @tree
= You received Grovyle!
I'm try to make a guy that when you buy a Pokemon from him he gives you a random Pokemon, the highest chance being Magikarp. The script isn't complete just for testing purposes. When I test the script it always chooses the first choice, and no other choice, is there something wrong with this?
Hello. I am using Firered as a base and I'm trying to make a new pokemart person script. I made the script and tried to put it into action but It doesn't work. If anyone could help me and tell me what I did wrong that would be great, Thank you.
P.S. I used XSE
P.S.S. I didn't forget the #dynamic. I just left it off when I copied it over.
Spoiler:
#org @start
lock
faceplayer
checkflag 0x820
if 0x1 goto @mart1
pokemart @stuff
release
end
#org @mart1
checkflag 0x821
if 0x1 goto @mart2
pokemart @stuff1
release
end
#org @mart2
checkflag 0x822
if 0x1 goto @mart3
pokemart @stuff2
release
end
#org @mart3
checkflag 0x823
if 0x1 goto @mart4
pokemart @stuff3
release
end
#org @mart4
checkflag 0x824
if 0x1 goto @mart5
pokemart @stuff4
release
end
#org @mart5
checkflag 0x825
if 0x1 goto @mart6
pokemart @stuff5
release
end
#org @mart6
checkflag 0x826
if 0x1 goto @mart7
pokemart @stuff6
release
end
#org @mart7
checkflag 0x827
if 0x1 goto @mart8
pokemart @stuff7
release
end
Game: Fire Red Type: BPRE Editor: XSE Script: Randomization
Spoiler:
#dynamic 0x83C7FA
#org @script
lock
faceplayer checkflag 0x1236 (this Flag is not safe to use, use a flag between 0x200 and 0x2FF, inclusive.)
checkflag 0x200
if 0x01 goto @done
showmoney 0x02 0x02 0x00
msgbox @one 0x5
compare 0x800D 0x1
if 0x1 goto @yes
msgbox @two 0x6
#raw 0x94 0x02 0x02 (hidemoney 0x2 0x2)
release
end
#org @yes
msgbox @three 0x6
#raw 0x92 0x88 0x13 0x00 0x00 0x00 (checkmoney 0x1388 0x0 is more simple.)
if 0x1 goto @continue
message @four 0x6
release
end
#org @continue
random 0x0A
compare 0x800D 0x5
if 0x3 goto @1 (if <= 5 then goto ...etc)
compare 0x800D 0x7
if 0x3 goto @2
compare 0x800D 0x9
if 0x3 goto @3
fanfare 0x13E
givepokemon 0xFD 0x12 0x0 0x0 0x0 0x0
message @tree 0x4
waitfanfare
msgbox @five 0x6
setflag 0x200
release
end
#org @done
msgbox @five 0x6
release
end
#org @1
fanfare 0x13E
givepokemon 0x81 (Magikarp) 0x12 (level 18) 0x0 (no held item) 0x0 0x0 0x0
message @karp 0x4
waitfanfare
msgbox @five 0x6
setflag 0x200
release
end
#org @one
= Ay kid I got a real special Pokémon\nright here.\pIt's real nice and it's only\n[@]5000 okay?\pWhat'da say you buyin?
#org @two
= Okay, but you are missin' out.
#org @three
= Alright! Alright! You're gonna\nlove it.
#org @four
= Aye! You ain't even got enough\ncash!
#org @five
= Thanks, but I ain't got nothing\nelse for ya!
#org @karp
= You received Magikarp!
#org @vigor
= You received Vigoroth!
#org @star
= You received Staryu!
#org @tree
= You received Grovyle!
I'm try to make a guy that when you buy a Pokemon from him he gives you a random Pokemon, the highest chance being Magikarp. The script isn't complete just for testing purposes. When I test the script it always chooses the first choice, and no other choice, is there something wrong with this?
This question might be a bit stupid, but oh well, yolo.
I wanna add the Pokedollar sign in a script, something like "Hey, here's (Pokedollar sign)500" but I have no clue on how to make the Pokedollar sign appear. Does anybody know how?
EDIT: Got it by looking at the Magikarp Salesman. It's [$]
This question might be a bit stupid, but oh well, yolo.
I wanna add the Pokedollar sign in a script, something like "Hey, here's (Pokedollar sign)500" but I have no clue on how to make the Pokedollar sign appear. Does anybody know how?
\h is used with hex values. Here's an example:
That \hB7 is the currency sign of the Pokemon world.
So in this example, I'm going to use "$":
Here's a table of all the hex codes for each symbol: