• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

[Archive] Script help thread

Status
Not open for further replies.
Repeat of XSE Question

Could someone show me an example of a Pokemon Battle Script in XSE? Like if I wanted to battle a Raikou, how would I make a script to do that? Can someone give me an example of a Pokemon Battle Script for XSE? All answers are apprecited. Thanks for reading this post!! :D

Can anyone help me? You don't have to give me a very specific example; I just really want to know how to do this. There really aren't any XSE tutorials that tell me how to do this lol.
 
Hi, I'm trying to implent
some "special tickets" in a hack o mine
but There's something I dont understand:

;SCRIPT ENTRY POINT
08276B03: 26 Level2CmdStore 800D 01F8 ; This mean Special2 0x800D(var) 0x01F8
08276B08: 21 cmp16 [ptr],I 800D 0001 ;Compare LastResult 0x1
08276B0D: 06 jmp_if 01 08276B23 ;if B_true goto 0x276B23
08276B13: 05 jmp 08276B19
08276B18: 02 quit

How do I make it possible to goto the pointer
after the B_true?

I think I need to set a var but... I don't know
which one.

Please, Help me.


//44tim44
 
What is the command to activate the National Dex in Ruby / Sapphire?

special 0x???
 
there's no way to activate the national dex in both Ruby and Sapphire though... :\
the only way is if you'll trade Ruby---FireRed with Johto or kanto Pokes... :\

I set Chikoria, Cyndaquil, Totodile and other Kanto / Johto Pokemons as wild Pokemons.
If I meet one of them, then I don't get a pokedex entry.

By the way, I found a command which activates the National Dex in Emerald.
Can I use it for Ruby / Sapphire?

special 0x1F3 - Activate National Dex (Emerald)
 
Okay, here I am! Again! >>

My last script works now so thanks to everyone who helped. But now my other script wont move. The person does exactly what it is supposed to. It checks for the National Dex, if you don't have it he wont let you through. But if you do he says he will but he doesn't move at all. Here is the script.

#dynamic 0x2E5101

#org @start
lock
faceplayer
checkflag 0x16F 0x1
compare LASTRESULT 0x1
if B_TRUE goto @pass
message @nopass
boxset 6
release
end

#org @pass
message @passx
boxset 6
applymovement 0x1D @move
Waitmovement 0x0
setflag 0x1041
release
end

#org @move
#raw 0x01 0x11 0x60 0xFE

#org @nopass
= Sorry, you can't go further!

#org @passx
= Is that...\pYou may go!
 
I don't think that checkflag works with special.. what you should do is set a flag in the pokedex script, then check that flag in this script.
 
I don't think that checkflag works with special.. what you should do is set a flag in the pokedex script, then check that flag in this script.
The problem is is that the person wont move. Everything else works fine. I just don't know what to do for the movement part. He checks for the National Dex. If you don't have it he does what he is supposed to but if you do he says what he is supposed to but doesn't move. So what do I do? D:
 
The problem is is that the person wont move. Everything else works fine. I just don't know what to do for the movement part. He checks for the National Dex. If you don't have it he does what he is supposed to but if you do he says what he is supposed to but doesn't move. So what do I do? D:


Well, you should check the applymovment command. I bet the person you used is wrong. 0x1D doesn't seem a good number. You don't have more than 25 people in your map, do you?
 
as I said, there isn't a way other than trading through Ruby/Sapphire to FireRed/LeafGreen... :\
if there was, then I should have used it in Reign of Legends... :\
you can try with gameshark like in Naranja... :\

Okay. Thank you.
*filler*
 
script issue...

Spoiler:


text works, but not the givepokemon command. what's wrong? using XSE.
 
script issue...

Spoiler:


text works, but not the givepokemon command. what's wrong? using XSE.

You forgot to active (set) setflag 0x828.
 
#dynamic 0x2E5101

#org @start
checkflag 0x232
lock
faceplayer
checkflag 0x16F 0x1
compare LASTRESULT 0x1
if B_TRUE goto @pass
message @nopass '"Sorry, you can't go further!"
boxset 6
setflag 0x232
release
end

#org @pass
message @passx '"Is that...\pYou may go!"
boxset 6
applymovement MOVE_PLAYER @moveplayer
waitmovement 0x0
applymovement 0x1D @movesprite1
Waitmovement 0x0
setflag 0x1041
release
end

#org @nopass
= Sorry, you can't go further!

#org @passx
= Is that...\pYou may go!

#org @moveplayer
#raw 0x10
#raw 0x10
#raw 0xFE

#org @movesprite1
#raw 0x34
#raw 0xFE

But here is the problem, the person blocking the path will no move to the right at all. He just stays there.
 
Last edited:
like he said. people number. Change the 0x1D to the event id of the person.
 
script issue...

Spoiler:


text works, but not the givepokemon command. what's wrong? using XSE.

Just from looking I can see the problem...
Code:
#define givepokemon 0x85 0xA 0x0
Why exactly are you Defining that? It makes no sense... Anyway, replace that line with this one:
Code:
givepokemon 0x85 0xA 0x0 0x0 0x0 0x0
It will work fine now (In theory).
 
Hey, um, I'm a bit confused. I see ltos of programs for scripting. Which one should I start with, and how can I start to learn scripting. I want to do stuff like giving pokemon and changing the pokedex. For now, my hack has mostly been editted with tools like AdvancedMap, A-Starters, ect.
 
I want three scripts:

1-I want a door closed until catch a Mareep.

2-What is national POKEDéX flag?

3-I want player says "It's dangerious here" and go right.
 
Someone please help. I'm trying to input legendary battles for Lugia, Kyogre, Celebi, and Suicune. Everytime I compile script for any of them this pops up:

Run-time error '457':
This key is already associtated with an element of this collection.


Here's an example of Luigia's script:
#org $Wildbattle
lock
faceplayer
cry 5
message $mewcry
$mewcry 1 = Lugia: You may be tough but can you beat me?
boxset 6
checkflag 0x500
if 0x1 goto $Wildbattle
release
end

#org $Wildbattle
lock
wildbattle 249 100 3
release
setflag 0x500
#raw 53
fadescreen 0
end

Please help.
 
Status
Not open for further replies.
Back
Top