• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • It's time to vote for your favorite Pokémon Battle Revolution protagonist in our new weekly protagonist poll! Click here to cast your vote and let us know which PBR protagonist you like most.
  • 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.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.
What is wrong with this?

Code:
#dynamic 0x45676F

#org @start
Lock
Faceplayer
checkflag 0x828
if 0x0 goto @1
if 0x1 goto @sorry
Message @1
Boxset 5
compare LASTRESULT 0x1
if 0x1 goto @yes
message @no
boxset 6
release
end

#org @1
= Do you want some pokemon?

#org @yes
givepokemon 1 5 2 1 0 0
givepokemon 4 5 2 1 0 0
givepokemon 7 5 2 1 0 0
fanfare 0x13E
waitfanfare
setflag 0x828
message @cool
boxset 6
checkflag 0x829
if 0x0 goto @k
if 0x1 goto @z
checkflag 0x82F
if 0x0 goto @k
if 0x1 goto @z
release
end

#org @sorry
= I already gave you the pokemon, and the stuff...

#org @k
setflag 0x829
setflag 0x82F
release
end

#org @z
release
end

#org @no
= You can't leave Pallet without Pokemon...

#org @cool
= \v\h01: Thanks!
It seems to want to give me different results, but none of them are good...

Fixed a little bit of it... Still buggy, here is what it is now.

Code:
#dynamic 0x45676F

#org @start
Lock
Faceplayer
Message @1
Boxset 5
compare LASTRESULT 0x1
if 0x1 goto @yes
message @no
boxset 6
release
end

#org @1
= Do you want some pokemon?

#org @yes
givepokemon 1 5 2 1 0 0
givepokemon 4 5 2 1 0 0
givepokemon 7 5 2 1 0 0
fanfare 0x13E
waitfanfare
message @cool
boxset 6
checkflag 0x828
if 0x0 goto @lo
if 0x1 goto @sorry
checkflag 0x829
if 0x0 goto @k
if 0x1 goto @z
checkflag 0x82F
if 0x0 goto @k
if 0x1 goto @z
release
end

#org @sorry
= I already gave you the pokemon,\n and the stuff...

#org @k
setflag 0x829
setflag 0x82F
message @more
release
end

#org @z
release
end

#org @no
= You can't leave Pallet\nwithout Pokemon...

#org @cool
= \v\h01 received pokemon!\p\v\h01: Thanks!

#org @lo
setflag 0x828

#org @more
= I have also given you \nthe pokedex, and running shoes!

He is talking and asking me if I want the pokemon, but now he is not following the rest of the script...

What's wrong?
 
What is wrong with this?

Code:
#dynamic 0x45676F

#org @start
Lock
Faceplayer
checkflag 0x828
if 0x0 goto @1
if 0x1 goto @sorry
Message @1
Boxset 5
compare LASTRESULT 0x1
if 0x1 goto @yes
message @no
boxset 6
release
end

#org @1
= Do you want some pokemon?

#org @yes
givepokemon 1 5 2 1 0 0
givepokemon 4 5 2 1 0 0
givepokemon 7 5 2 1 0 0
fanfare 0x13E
waitfanfare
setflag 0x828
message @cool
boxset 6
checkflag 0x829
if 0x0 goto @k
if 0x1 goto @z
checkflag 0x82F
if 0x0 goto @k
if 0x1 goto @z
release
end

#org @sorry
= I already gave you the pokemon, and the stuff...

#org @k
setflag 0x829
setflag 0x82F
release
end

#org @z
release
end

#org @no
= You can't leave Pallet without Pokemon...

#org @cool
= \v\h01: Thanks!
It seems to want to give me different results, but none of them are good...

Fixed a little bit of it... Still buggy, here is what it is now.

Code:
#dynamic 0x45676F

#org @start
Lock
Faceplayer
Message @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
message @no 0x6
release
end

#org @1
= Do you want some pokemon?

#org @yes
givepokemon 1 5 2 1 0 0
givepokemon 4 5 2 1 0 0
givepokemon 7 5 2 1 0 0
fanfare 0x13E
waitfanfare
message @cool 0x6
checkflag 0x828
if 0x0 [B]call [/B]@lo
[B]checkflag 0x828[/B]
if 0x1 [B]call[/B] @sorry[B]part[/B]
checkflag 0x829
if 0x0 goto @k
[B]checkflag 0x829[/B]
if 0x1 goto @z
checkflag 0x82F
if 0x0 goto @k
[B]checkflag 0x82F[/B]
if 0x1 goto @z
release
end

[B]#org @sorrypart[/B]
[B]message @sorry 0x6
return[/B]

#org @sorry
= I already gave you the pokemon,\n and the stuff...

#org @k
setflag 0x829
setflag 0x82F
message @more 0x6
release
end

#org @z
release
end

#org @no
= You can't leave Pallet\nwithout Pokemon...

#org @cool
= \v\h01 received pokemon!\p\v\h01: Thanks!

#org @lo
setflag 0x828
[B]return[/B]

#org @more
= I have also given you \nthe pokedex, and running shoes!
He is talking and asking me if I want the pokemon, but now he is not following the rest of the script...

What's wrong?
That's an odd script, and I think that I fixed it...
 
Game: FireRed
Type: person event
Editor: XSE

When I compiled this script into the ROM, it messed up the Start menu: the blue bar at the bottom of the menu that explains what each item does looks like it mated with a Missingno. I know it's this script that did it, because I backed up my ROM before I compiled it and the backup is perfectly fine; this script is the only difference between the backup ROM and the glitched-menu ROM. The menu looks messed up from the moment the game starts, not just before or after the script is activated.

I've got only one good idea for why it might have messed up: when I searched for free space in the FSF, I used the default of search for 256 free bytes. I don't know how many bytes long this script is, but it's the longest I've done so far. Maybe it went over 256 bytes and overwrote some other data? That's all I can figure out, though. (And how do you check how long a script will be before compiling it?)

Script:

Spoiler:


Also, and less important, when giving any of the above Pokémon a nickname, the little animated Pokémon sprite in the naming menu is a Rattata instead of whatever Pokémon it's supposed to be. After the script ends, when I pause and check the Pokémon menu, it's got the proper Pokémon sprite and is indeed whatever Pokémon it's supposed to be. Earlier in the game you get a Rattata but don't get a chance to nickname it. Could that be causing the mix-up in the nickname menu? Or, for that matter, in the Start menu?
 
Game: FireRed
Type: person event
Editor: XSE

When I compiled this script into the ROM, it messed up the Start menu: the blue bar at the bottom of the menu that explains what each item does looks like it mated with a Missingno. I know it's this script that did it, because I backed up my ROM before I compiled it and the backup is perfectly fine; this script is the only difference between the backup ROM and the glitched-menu ROM. The menu looks messed up from the moment the game starts, not just before or after the script is activated.

I've got only one good idea for why it might have messed up: when I searched for free space in the FSF, I used the default of search for 256 free bytes. I don't know how many bytes long this script is, but it's the longest I've done so far. Maybe it went over 256 bytes and overwrote some other data? That's all I can figure out, though. (And how do you check how long a script will be before compiling it?)

Script:

Spoiler:


Also, and less important, when giving any of the above Pokémon a nickname, the little animated Pokémon sprite in the naming menu is a Rattata instead of whatever Pokémon it's supposed to be. After the script ends, when I pause and check the Pokémon menu, it's got the proper Pokémon sprite and is indeed whatever Pokémon it's supposed to be. Earlier in the game you get a Rattata but don't get a chance to nickname it. Could that be causing the mix-up in the nickname menu? Or, for that matter, in the Start menu?
Try re-compiling with a different offset.
Also, You have to use a slightly different method of nicknaming because it nicknames the first Pokemon in your party. Try it now, at a different offset.
 
Im doing a sign text for Oaks lab heres the code, but whenever i put it in addvance map all it sais is,rofessor Oak's Lab missing the P. How come the P is gone?

#Dynamic 0x800000

#org @start
msgbox @text 0x3
end

#org @text
= Professor Oak's Lab
Try that.
filleritupfilleritup
 
Remember my post not too long ago? I fixed the problem. Thanks to Diego for giving me a clue.

Took me about 50 tries, but here it is!

Code:
#dynamic 0x000000

#org @start
Lock
Faceplayer
Message @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
message @no 0x6
release
end

#org @1
= Do you want some pokemon?

#org @yes
checkflag 0x828
if 0x1 goto @z
givepokemon 1 5 2 1 0 0
givepokemon 4 5 2 1 0 0
givepokemon 7 5 2 1 0 0
fanfare 0x13E
waitfanfare
message @cool 0x6
checkflag 0x828
if 0x0 goto @k
release
end

#org @k
setflag 0x829
setflag 0x82F
setflag 0x828
message @more 0x6
release
end

#org @z
message @sorry 0x6
release
end

#org @no
= You can't leave Pallet\nwithout Pokemon...

#org @cool
= \v\h01 received pokemon!\p\v\h01: Thanks!

#org @more
= I have also given you \nthe pokedex, and running shoes!

#org @sorry
= I am sorry, I gave you the pokemon,\n...\l and the stuff...

Try it for yourself!
 
hello, i need asistent.

i made trouble in Littleroot-> in the hero's house (the boy), what i did was creating a new "house" for him, that looks the same but the diffrence is that you can enter.. it is could: Littleroot 1.6. my problem is the main script, once you start a new game (i edited this two days after i started the game so for me there wasn't any problem) the main script leads you to Littleroot 1.0..

can you help me with that? after you get out of the track i want it to lead the trainer to the same place (in the map) but instead of Littleroot 1.0 i want it to lead to Littleroot 1.6..

thanks, i hope that wasn't to much to ask :]
 
Try re-compiling with a different offset.
Also, You have to use a slightly different method of nicknaming because it nicknames the first Pokemon in your party. Try it now, at a different offset.

I tried it at a different offset and the glitched menu problem went away, thanks. However, when I replace my nickname commands with your nickname commands, I get this screen:
[PokeCommunity.com] Script Help Thread (DO NOT REQUEST SCRIPTS)

and when I check the Pokémon I received, it doesn't have whatever name I just gave it.
 
I'm a big beginner to scripting and I can only do yes and no boxes -.- and I was wondering if anyone could help me build a script or give send me in the direction of a tutorial that includes the parts I need.

ROM:Fire Red
Program: XSE
Script details: First off ,there will be two guys facing eachother seemingly locked in a battle(I can do this part) and then I need it so when you talk to the person, he asks you to help him, and then the option for Yes or No to help him comes up and if you press yes it gives you a pokemon(use any pokemon you want) and induces a battle with a pokemon trainer. It doesnt matter what the trainer says before or after the win because I'll edit it to whatever I need afterwards. If you say No, then it just ends the conversation, this I can do by myself but it's the trainer part and give pokemon thats getting to me.
Any help is welcome.
 
I'm a big beginner to scripting and I can only do yes and no boxes -.- and I was wondering if anyone could help me build a script or give send me in the direction of a tutorial that includes the parts I need.

ROM:Fire Red
Program: XSE
Script details: First off ,there will be two guys facing eachother seemingly locked in a battle(I can do this part) and then I need it so when you talk to the person, he asks you to help him, and then the option for Yes or No to help him comes up and if you press yes it gives you a pokemon(use any pokemon you want) and induces a battle with a pokemon trainer. It doesnt matter what the trainer says before or after the win because I'll edit it to whatever I need afterwards. If you say No, then it just ends the conversation, this I can do by myself but it's the trainer part and give pokemon thats getting to me.
Any help is welcome.

Okay, probably the best thing for you to do--for any script--is use diegoisawesome's MEGA-HUGE XSE Scripting Tutorial. I've used it for pretty much everything, and it answers both of your questions.

To give a Pokémon, you use this command:

givepokemon 0x(PKMN) 0x(LVL) 0x(ITEM) 0x0 0x0 0x0
fanfare 0x13E
msgbox @(insert your pointer to your you-got-a-Pokémon dialogue) 0x4
waitfanfare
closeonkeypress

Replace "(PKMN)" with the number of the Pokémon in hexadecimal. I think a Pokémon's hexadecimal number is simply its Pokédex number converted to hex, and you can convert normal numbers into hex with this site really easily. "(LVL)" is replaced with the level you want the Pokémon to be--I think you have to convert it to hex, too, but I haven't tried this myself because I've never made a givepokemon script that gives a Pokémon over level 5. "(ITEM)" is any held item you want the Pokémon to have; each item also has a number assigned to it, and you need to convert that number into hex as well. A list of what number corresponds with what item can be found in diegoisawesome's tutorial. I don't know what the last three "0x0"s do, I think you're just supposed to leave them blank and I've never heard of a script that requires you to do anything else with them. The "fanfare 0x13E" and "waitfanfare" makes the little dinging you hear whenever you get a Pokémon or receive an item. It's not necessary for the script to work, but it makes it more convincing. You have to do something else in the script to give the Pokémon a nickname, but you'll have to ask someone else about that because I keep messing that script up...

There are two different ways to do trainer battles. One of them is just for plain old every day battles, the trainers that "catch your eye," walk up to you, battle, and then it's done. The other way is for "special" battles, like gym battles where you have to go up to the OW and talk to it to start the battle, or battles that are part of a longer script--like yours. Here's how the second type works:

trainerbattle 0x1 0x(TRAINER) 0x0 @before (or any other pointer you want, "before" isn't necessary) @after @later

"0x1" means it's a special battle, instead of a normal battle; a normal battle would just be "0x0". The "(TRAINER)" needs to be replaced with a number that will tell the game what the battle will be like: the name of the trainer your battling, what Pokémon it has and what levels... That number is basically the enemy trainer's "Trainer ID" number. You can create trainers and their teams using the tool A-Trainer, and then the number that A-Trainer assigns to the trainer you just made will be the number you put in "(TRAINER)". The 0x0 at the end is also supposed to be blank. @before is a msgbox the trainer will say right before the battle begins, @after is their dialogue--while still in the battle screen--when they're defeated, and @later is where you will continue the actual script, not just a msgbox.

Hope that helps. In the future, you probably want to check diegoisawesome's or someone else's tutorial before asking a question, because oftentimes questions like yours have already been answered. Generally, if it's something that everybody needs to do if they're making a hack--like make a battle, give out Pokémon or items, heal their Pokémon, etc.--then it's already been explained in a tutorial somewhere.
 
Question, how would you make it seem like two people are seemingly locked in a battle, Like in Silver Gold and Crystal?
 
Well I keep getting a "runtime error 13 type mismatch" in my step on tile script. I can't fix it at all. I'm using pokescript, and it's a hack for pokemon emerald. Any help at all would be grateful.

#org $start
setvar 0x4400 2
checkflag 0x209
if b_true goto $done
setweather 0x3
#raw 0x00
doweather
Applymovement 0x05 $move
pausemove 0x0
Applymovement 0xff $move2
pausemove 0x0
Message $1
boxset 6
Applymovement 0x06 $move3
pausemove 0x0
Message $2
boxset 6
Applymovement 0x06 $move4
Applymovement 0xFF $move4
pausemove 0x0
Message $3
boxset 6
Applymovement 0x06 $move5
pausemove 0x0
Message $4
boxset 6
fadescreen 0x1
setweather 0x0
#raw 0xA3
doweather
fadescreen 0x0
release
end

#org $done
release
end


#org $1
$1 1 =\c\h01\h04What was that thing?\nIt moved as if it was on the run.

#org $2
$2 1 =Did you see that great beast?\p\c\h01\h04Yes it was awesome.\nAnd your are?\p\c\h01\h02I am Eusine.\pI have been chasing great legendary\n beasts like that for years.\pI think the beast went this way.\nFollow if you want.

#org $3
$3 1 =Hmm nothing here.

#org $4
$4 1 =Amazing!\nIt seems that it can move over water.\pDoes it walk,surf,run...so many\n questions.\pI'm sorry I must leave now\nMuch research to do.

#org $move
#raw 0x0F 0x0F 0x0F 0x0F 0x0C 0x0C 0x0C 0x0F 0x0F 0x0F 0x0F 0x0D 0x0F 0x0F 0x0C 0x0C 0x0C 0x0C 0x0C 0x0C 0x0C 0x0C 0xfe

#org $move2
#raw 0x02 0x01 0x03 0x00 0xfe

#org $move3
#raw 0x0B 0x0B 0x0B 0x0B 0x0B 0x0B 0x0B 0x0B 0x08 0x0B 0x01 0xfe

#org $move4
#raw 0x08 0x08 0x08 0x0B 0x0b 0x0b 0xb 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x0A 0x0A 0x0A 0x0A 0x08 0x08 0x08 0x08 0x08 0xfe

#org $move5
#raw 0x56 0xfe
 
Shiny Hack Maker?

Game:FR
Editor:XSE

Ok trying to insert a shiny hack. I put the shiny hack in and put this as the script:
Code:
'---------------
#org 0x71A23C
checkflag 0x200
if 0x1 goto 0x871A26D
callasm 0x871A3B8
msgbox 0x871A276 MSG_FACE '"take the b----!"
givepokemon 0x6 0xA 0x1 0x0 0x0 0x0
msgbox 0x871A288 MSG_FACE '"[player] recieved the Charizard!"
setflag 0x200
'---------------
#org 0x71A26D
msgbox 0x871A2A5 MSG_FACE '"What do you want I already gave yo..."

'---------
' Strings
'---------
#org 0x71A276
= take the b----!

#org 0x71A288
= [player] recieved the Charizard!

#org 0x71A2A5
= What do you want I already gave you\na f------ Charizard
The problem is when I compile the script and talk to the character the game freezez. I am not sure what the problem is because I put it in just like everybody said it should but it still doesnt work.
 
Game:FR
Editor:XSE
Ok trying to insert a shiny hack. I put the shiny hack in and put this as the script:
Code:
'---------------
#org 0x71A23C
checkflag 0x200
if 0x1 goto 0x871A26D
callasm 0x871A3B8
msgbox 0x871A276 MSG_FACE '"take the b----!"
givepokemon 0x6 0xA 0x1 0x0 0x0 0x0
msgbox 0x871A288 MSG_FACE '"[player] recieved the Charizard!"
setflag 0x200
'---------------
#org 0x71A26D
msgbox 0x871A2A5 MSG_FACE '"What do you want I already gave yo..."
 
'---------
' Strings
'---------
#org 0x71A276
= take the b----!
 
#org 0x71A288
= [player] recieved the Charizard!
 
#org 0x71A2A5
= What do you want I already gave you\na f------ Charizard
The problem is when I compile the script and talk to the character the game freezez. I am not sure what the problem is because I put it in just like everybody said it should but it still doesnt work.

It's a thumb code so the offset for the callasm, the last digit must be either,1 ,3 ,5 ,7 ,9 ,B ,D ,F
 
So does that mean I have to insert the shiny hack routine at an offset that ends with one of those?

Erm well I don't think you do. It's just when you use the callasm you add 1 byte to the offset where you insert it. So insert it at an offset which doesn't end in 1 ,3 ,5 ,7 ,9 ,B ,D ,F
 
Status
Not open for further replies.
Back
Top