Script Help Thread (DO NOT REQUEST SCRIPTS) Page 381

Started by HackMew December 20th, 2008 5:10 AM
  • 625717 views
  • 9682 replies

M0ZEPH

Formally 'Resultz' - Returned!

Male
Seen March 30th, 2014
Posted March 21st, 2014
76 posts
9.3 Years
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!
CURRENTLY LOOKING FOR HELP WITH MY ROMHACK! HELPERS WILL BE GIVEN JOINT CREDIT

PLEASE PM ME FOR INFO!

Kurapika

Male
Lavendar Town
Seen 16 Hours Ago
Posted April 6th, 2023
943 posts
10.3 Years
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.
G3T - GEN 3 TOOLS ( Windows / Android )


Avara

She/Her
Seen 6 Days Ago
Posted April 10th, 2022
1,305 posts
11.5 Years
Having trouble with this script:


#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


____________


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? =/

Kurapika

Male
Lavendar Town
Seen 16 Hours Ago
Posted April 6th, 2023
943 posts
10.3 Years
@avaramoon, can you give us more details? Such as what you're expecting the script to do and what it does instead.
G3T - GEN 3 TOOLS ( Windows / Android )


Avara

She/Her
Seen 6 Days Ago
Posted April 10th, 2022
1,305 posts
11.5 Years
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.


#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.

Kurapika

Male
Lavendar Town
Seen 16 Hours Ago
Posted April 6th, 2023
943 posts
10.3 Years
#org @start
lock
giveitem 0x51 0x1 0x0
hidesprite 0x1
setflag 0x4B4
checkitem 0x51 0x1
compare 0x800D 0x1
if 0x3 goto @youhaveONEgoldenboneorg1
checkitem 0x51 0x2
compare 0x800D 0x1
if 0x3 goto @youhaveTWOgoldenboneorg1
checkitem 0x51 0x3
compare 0x800D 0x1
if 0x3 goto @youhaveTHREEgoldenboneorg1
checkitem 0x51 0x4
compare 0x800D 0x1
if 0x3 goto @youhaveFOURgoldenboneorg1
msgbox @youhaveMORETHANFOURgoldenbone1 0x6
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 @youhaveMORETHANFOURgoldenbone1
[black_fr]You have [red_fr]4[black_fr]/5 GOLDEN BONES.
#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.
Try this. I also added the case in which the Player has more than 4.
G3T - GEN 3 TOOLS ( Windows / Android )


Avara

She/Her
Seen 6 Days Ago
Posted April 10th, 2022
1,305 posts
11.5 Years
Try this. I also added the case in which the Player has more than 4.

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!

Kurapika

Male
Lavendar Town
Seen 16 Hours Ago
Posted April 6th, 2023
943 posts
10.3 Years
What is the index of Golden Bone? (use PGE's Item Editor)
G3T - GEN 3 TOOLS ( Windows / Android )


M0ZEPH

Formally 'Resultz' - Returned!

Male
Seen March 30th, 2014
Posted March 21st, 2014
76 posts
9.3 Years
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.

#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!
It just gives 5 everytime I talk to him.
CURRENTLY LOOKING FOR HELP WITH MY ROMHACK! HELPERS WILL BE GIVEN JOINT CREDIT

PLEASE PM ME FOR INFO!
Age 26
Male
Seen July 6th, 2019
Posted October 26th, 2016
252 posts
10.1 Years
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.

#org 0xE3D88F
lock
faceplayer
msgbox 0x8E3D8C6 MSG_FACE '"I'm a relief worker sent here from..."
checkitem 0x1A 0x1
compare 0x800D 0x1
if 0x0 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!
It just gives 5 everytime I talk to him.
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.

ShyRayq

Unprofessional Unprofessional

Male
Seen 4 Days Ago
Posted March 2nd, 2023
1,855 posts
15.7 Years
Just curious what does the compare line actually do? I've seen it used but not a clue how to use it.

Thanks for the time though!
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.
3DS Friend Code: 5069-3944-3902
IGN: Peter; (X, Y, OR, AS, S, M, US, UM)
Friend Safari: (Fighting) Throh, Meditite, Breloom
Living Pokedex Complete: Y, C, R, LG, E, D, Pl, HG, B, B2, X, Y, OR, AS, M, UM, LGP, Sw, LA
Big thanks especially to DestinedJagold, Xerneas_X, Elements1, ~RNC~ and ThePoke Man

PM me if you want to trade, or add my FC.

M0ZEPH

Formally 'Resultz' - Returned!

Male
Seen March 30th, 2014
Posted March 21st, 2014
76 posts
9.3 Years
It still just gives me 5 water each time I speak with him, and I copied line for line the script that was given! :/

'---------------
#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!
CURRENTLY LOOKING FOR HELP WITH MY ROMHACK! HELPERS WILL BE GIVEN JOINT CREDIT

PLEASE PM ME FOR INFO!
Male
Seen September 29th, 2016
Posted April 2nd, 2014
12 posts
9.2 Years
(Using XSE)

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
setvar 0x8004 0x0
goto 0x8292799

'---------------
#org 0x292799
checkflag 0x51
if 0x1 goto 0x829283F
msgbox 0x81F8668 MSG_KEEPOPEN '"The clock is stopped[.]\pBetter se..."
call 0x8292849
pause 0x1E
setvar 0x4092 0x6
setflag 0x51
setflag 0x2F2
setflag 0x2F3
checkgender
compare LASTRESULT 0x0
if 0x1 call 0x82927DF
compare LASTRESULT 0x1
if 0x1 call 0x829280F
sound 0x9
hidesprite 0x8008
releaseall
end

'---------------
#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. :)
Age 26
Male
Seen July 6th, 2019
Posted October 26th, 2016
252 posts
10.1 Years
It still just gives me 5 water each time I speak with him, and I copied line for line the script that was given! :/

'---------------
#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.

(Using XSE)

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.
Male
Seen July 25th, 2014
Posted March 22nd, 2014
4 posts
11.1 Years
Game: Fire Red Type: BPRE Editor: XSE Script: Randomization
Spoiler:
#dynamic 0x83C7FA

#org @script
lock
faceplayer
checkflag 0x1236
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
release
end

#org @yes
msgbox @three 0x6
#raw 0x92 0x88 0x13 0x00 0x00 0x00
if 0x1 goto @continue
message @four 0x6
release
end

#org @continue
random 0x0A
compare 0x800D 0x0
if 0x1 goto @1
compare 0x800D 0x1
if 0x1 goto @2
compare 0x800D 0x2
if 0x1 goto @3
compare 0x800D 0x3
if 0x1 goto @4
compare 0x800D 0x4
if 0x1 goto @5
compare 0x800D 0x5
if 0x1 goto @6
compare 0x800D 0x6
if 0x1 goto @7
compare 0x800D 0x7
if 0x1 goto @8
compare 0x800D 0x8
if 0x1 goto @9
compare 0x800D 0x9
if 0x1 goto @10

#org @done
msgbox @five 0x6
release
end

#org @1
fanfare 0x13E
message @karp 0x4
waitfanfare
msgbox @five 0x6
setflag 0x1236
release
end

#org @2
fanfare 0x13E
message @karp 0x4
waitfanfare
msgbox @five 0x6
setflag 0x1236
release
end

#org @3
fanfare 0x13E
message @karp 0x4
waitfanfare
msgbox @five 0x6
setflag 0x1236
release
end

#org @4
fanfare 0x13E
message @karp 0x4
waitfanfare
msgbox @five 0x6
setflag 0x1236
release
end

#org @5
fanfare 0x13E
message @karp 0x4
waitfanfare
msgbox @five 0x6
setflag 0x1236
release
end

#org @6
fanfare 0x13E
message @vigor 0x4
waitfanfare
msgbox @five 0x6
setflag 0x1236
release
end

#org @7
fanfare 0x13E
message @vigor 0x4
waitfanfare
msgbox @five 0x6
setflag 0x1236
release
end

#org @8
fanfare 0x13E
message @star 0x4
waitfanfare
msgbox @five 0x6
setflag 0x1236
release
end

#org @9
fanfare 0x13E
message @star 0x4
waitfanfare
msgbox @five 0x6
setflag 0x1236
release
end


#org @10
fanfare 0x13E
message @tree 0x4
waitfanfare
msgbox @five 0x6
setflag 0x1236
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?
Male
Seen July 7th, 2015
Posted March 23rd, 2014
5 posts
10.1 Years
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

#org @mart8
pokemart @stuff8
release
end

#org @stuff
#raw 0x4 0xD 0xE 0x12 0x11 0x0

#org @stuff1
#raw 0x4 0xD 0x16 0xE 0x11 0x12
#raw 0x55 0x56 0x4B 0x4C 0x4D 0x0

#org @stuff2
#raw 0x4 0xD 0x16 0xE 0x11 0x12
#raw 0x55 0x56 0x4B 0x4C 0x4D 0x3
#raw 0xF 0x10 0x6 0x0 0x0 0x0

#org @stuff3
#raw 0x4 0xD 0x16 0xE 0x11 0x12
#raw 0x55 0x56 0x4B 0x4C 0x4D 0x3
#raw 0xF 0x10 0x6 0x7 0x4E 0x4F

#org @stuff4
#raw 0x4 0xD 0x16 0xE 0x11 0x12
#raw 0x55 0x56 0x4B 0x4C 0x4D 0x3
#raw 0xF 0x10 0x6 0x7 0x4E 0x4F
#raw 0x49 0x4A 0x8 0x0 0x0 0x0

#org @stuff5
#raw 0x4 0xD 0x16 0xE 0x11 0x12
#raw 0x55 0x56 0x4B 0x4C 0x4D 0x3
#raw 0xF 0x10 0x6 0x7 0x4E 0x4F
#raw 0x49 0x4A 0x8 0x2 0x15 0x18

#org @stuff6
#raw 0x4 0xD 0x16 0xE 0x11 0x12
#raw 0x55 0x56 0x4B 0x4C 0x4D 0x3
#raw 0xF 0x10 0x6 0x7 0x4E 0x4F
#raw 0x49 0x4A 0x8 0x2 0x15 0x18
#raw 0x17 0xA 0x9 0x0 0x0 0x0

#org @stuff7
#raw 0x4 0xD 0x16 0xE 0x11 0x12
#raw 0x55 0x56 0x4B 0x4C 0x4D 0x3
#raw 0xF 0x10 0x6 0x7 0x4E 0x4F
#raw 0x49 0x4A 0x8 0x2 0x15 0x18
#raw 0x17 0xA 0x9 0x14 0xB 0x0

#org @stuff8
#raw 0x4 0xD 0x16 0xE 0x11 0x12
#raw 0x55 0x56 0x4B 0x4C 0x4D 0x3
#raw 0xF 0x10 0x6 0x7 0x4E 0x4F
#raw 0x49 0x4A 0x8 0x2 0x15 0x18
#raw 0x17 0xA 0x9 0x14 0xB 0x13
#raw 0x19 0x22 0x0 0x0 0x0 0x0
Sometimes I fell like the only one who ever chose you, but I love you anyway Bulbasaur!

Kurapika

Male
Lavendar Town
Seen 16 Hours Ago
Posted April 6th, 2023
943 posts
10.3 Years
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 @2
fanfare 0x13E
givepokemon 0x120 0x12 0x0 0x0 0x0 0x0
message @vigor 0x4
waitfanfare
msgbox @five 0x6
setflag 0x200
release
end

#org @3
fanfare 0x13E
givepokemon 0x78 0x12 0x0 0x0 0x0 0x0
message @star 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?
Your script doesn't have a givepokemon command at all.
Try it with the changes I made to it.
G3T - GEN 3 TOOLS ( Windows / Android )


Danny0317

Fluorite's back, brah

Age 23
Male
Seen February 19th, 2021
Posted March 11th, 2017
1,067 posts
9.9 Years
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 [$]

Sniper

ふゆかい

Male
Philippines
Seen August 9th, 2016
Posted June 5th, 2016
1,412 posts
9.5 Years
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?
Here's the hex code for that sign: B7=$


\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:
Spoiler:
00=
01=À
02=Á
03=Â
04=Ç
05=È
06=É
07=Ê
08=Ë
09=Ì
0B=Î
0C=Ï
0D=Ò
0E=Ó
0F=Ô
10=Æ
11=Ù
12=Ú
13=Û
14=Ñ
15=ß
16=à
17=á
19=ç
1A=è
1B=é
1C=ê
1D=ë
1E=ì
20=î
21=ï
22=ò
23=ó
24=ô
25=æ
26=ù
27=ú
28=û
29=ñ
2A=º
2B=ª
2C=·
2D=&
2E=+
34=[Lv]
35==
36=;
51=¿
52=¡
53=[PK]
54=[MN]
55=[PO]
56=[Ke]
57=[BL]
58=[OC]
59=[K]
5A=Í
5B=%
5C=(
5D=)
68=â
6F=í
79=[u]
7A=[D]
7B=[L]
7C=[R]
A1=0
A2=1
A3=2
A4=3
A5=4
A6=5
A7=6
A8=7
A9=8
AA=9
AB=!
AC=?
AD=.
AE=-
AF=·
B0=[...]
B1="
B2=["]
B3='
B4=[']
B5=[m]
B6=[f]
B7=$
B8=,
B9=[x]
BA=/
BB=A
BC=B
BD=C
BE=D
BF=E
C0=F
C1=G
C2=H
C3=I
C4=J
C5=K
C6=L
C7=M
C8=N
C9=O
CA=P
CB=Q
CC=R
CD=S
CE=T
CF=U
D0=V
D1=W
D2=X
D3=Y
D4=Z
D5=a
D6=b
D7=c
D8=d
D9=e
DA=f
DB=g
DC=h
DD=i
DE=j
DF=k
E0=l
E1=m
E2=n
E3=o
E4=p
E5=q
E6=r
E7=s
E8=t
E9=u
EA=v
EB=w
EC=x
ED=y
EE=z
EF=[>]
F0=:
F1=Ä
F2=Ö
F3=Ü
F4=ä
F5=ö
F6=ü
F7=[u]
F8=[d]
F9=[l]
FA=\l
FB=\p
FC=\c
FD=\v
FE=\n
FF=\x


Danny0317

Fluorite's back, brah

Age 23
Male
Seen February 19th, 2021
Posted March 11th, 2017
1,067 posts
9.9 Years
Is there a special that poisons your Pokemon in FR? I know there's one in Emerald, and I looked through this http://www.pokecommunity.com/showthread.php?t=184273 and couldn't find it. So is there?

Kurapika

Male
Lavendar Town
Seen 16 Hours Ago
Posted April 6th, 2023
943 posts
10.3 Years
No, but JPAN's hacked engine has it.
It's easy to make an ASM code that does it.
http://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_data_structure_in_Generation_III
The status condition is not a crypted.
G3T - GEN 3 TOOLS ( Windows / Android )


AtecainCorp.

Rejishan awake...

Age 30
Male
Takoabe Town (Region Thonsu)
Seen 1 Day Ago
Posted 1 Week Ago
1,354 posts
14.9 Years
#dynamic 0x800000

#org @start
lock
faceplayer
cry 0x1 0x2
msgbox @1 0x6
setwildbattle 0x1 0x5 0x0
special 0x138
playsong 0x299 0x0
hidesprite 0x800D
setflag 0x105
release
end

#org @1
= A wild Bulbasaur attacks!

I use this code for legendary Pokemons. But one what I did with it wrong? Everytime when I start battle sprite not vanished but they reapeared sometimes. Someone can help? I use Pokemon Ruby.
- My new Project comming Soon

Kurapika

Male
Lavendar Town
Seen 16 Hours Ago
Posted April 6th, 2023
943 posts
10.3 Years
#dynamic 0x800000

#org @start
lock
faceplayer
cry 0x1 0x2
msgbox @1 0x6
setwildbattle 0x1 0x5 0x0
special 0x138
playsong 0x299 0x0
hidesprite 0x800D
setflag 0x105
release
end

#org @1
= A wild Bulbasaur attacks!

I use this code for legendary Pokemons. But one what I did with it wrong? Everytime when I start battle sprite not vanished but they reapeared sometimes. Someone can help? I use Pokemon Ruby.
Are you sure the sprite's ID in Advance-Map is set to 105??
If yes, then either you're clearing that flag in an other script or it is not a safe flag for such a use.
G3T - GEN 3 TOOLS ( Windows / Android )


Danny0317

Fluorite's back, brah

Age 23
Male
Seen February 19th, 2021
Posted March 11th, 2017
1,067 posts
9.9 Years
#dynamic 0x800000

#org @start
lock
faceplayer
cry 0x1 0x2
msgbox @1 0x6
setwildbattle 0x1 0x5 0x0
special 0x138
playsong 0x299 0x0
hidesprite 0x800D
setflag 0x105
release
end

#org @1
= A wild Bulbasaur attacks!

I use this code for legendary Pokemons. But one what I did with it wrong? Everytime when I start battle sprite not vanished but they reapeared sometimes. Someone can help? I use Pokemon Ruby.
You used flag 105, so go to the overworld sprite for the pokemon that you're battling and where it says "Person ID" set it 105