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

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.

Co500

Nostalgia Edition
563
Posts
15
Years
You don't want to use those flags, especially the flags in the '0x800's because those are often reserved for special purposes like badges, enabling menu items, etc. Take a look at the list of used flags in XSE's guide. Most flags not on that list are safe for using, though I personally recommend any over '0x1000'. Also, the following code won't work:

Code:
...
[B]checkflag 0x8
checkflag 0x82F
checkflag 0x829
checkflag 0x828
if 0x1 goto @done[/B]
...
You need an 'if' statement after every single 'checkflag'. Similarly, at the beginning of the last script there is a 'checkflag' without an 'if' statement following it, effectively rendering it useless.
In Bold: Im giving the player the pokedex here and the running shoes aswell as the pokemon menu thats why im using them cause I have too,
also do I just put if 0x1 goto @done, done1, done2 etc
 

colcolstyles

Yours truly
1,588
Posts
15
Years
In Bold: Im giving the player the pokedex here and the running shoes aswell as the pokemon menu thats why im using them cause I have too,
also do I just put if 0x1 goto @done, done1, done2 etc

Okay but I still wouldn't use flags like '0xC' and '0x7'. And regardless of what flags you're giving, the first three checkflags would do nothing without an 'if' statement. Anyway, if you delete the first three, it should still work. You don't need multiple "@done"-type scripts.
 

Co500

Nostalgia Edition
563
Posts
15
Years
Okay but I still wouldn't use flags like '0xC' and '0x7'. And regardless of what flags you're giving, the first three checkflags would do nothing without an 'if' statement. Anyway, if you delete the first three, it should still work. You don't need multiple "@done"-type scripts.
but i need the flags for the script to work and make sence,
could you please explain more clearly and thanks for your help but do i put after every check flag if 0x1 goto .......?
 

colcolstyles

Yours truly
1,588
Posts
15
Years
I'm not saying that you shouldn't use flags. I'm saying that your use of flags is incorrect, wastes space, and (at times) doesn't function as intended.

Spoiler:

Based on the script above, here's how I (for all intents and purposes) would have done it:

Spoiler:


Basically, as long as you check for at least one of the flags that you set at the end, you should be fine (granted that you don't clear them at a later time).
 

Co500

Nostalgia Edition
563
Posts
15
Years
I'm not saying that you shouldn't use flags. I'm saying that your use of flags is incorrect, wastes space, and (at times) doesn't function as intended.



Based on the script above, here's how I (for all intents and purposes) would have done it:

Spoiler:


Basically, as long as you check for at least one of the flags that you set at the end, you should be fine (granted that you don't clear them at a later time).

ah i get you so after ive done that the scripts shouldnt reactivate then,
thanks
 
79
Posts
13
Years
  • Seen Aug 27, 2014
just wondering what are the different commands for different types of trainer battle

example what one is double battle and single battle etc. etc.
 
49
Posts
14
Years
  • Seen Sep 10, 2011
#Dynamic 0xoffset

#org @start
checkflag 0x829
if 0x0 goto @hey!
if 0x1 goto @end
end

#org @hey!
lock
msgbox @icant 0x6
(I changed it to this thinking thats what you ment..)
(bold used to be..)
msgbox @icant
boxset 0x6
applymovement 0xFF @back
waitmovement 0x0
release
end

#org @icant
= I can't go in there without\nmy pokedex

#org @back
#raw 0x00 0xFE

#org @end
release
end


Ok, so I tried using this as a srcipt tile and it freezes on me as soon as I step on the tile. Its a "can't enter till you have a pokedex" script.

I'm using FR and I used this code the way its written, just with new messages and the bold part, and placed on a path instead of a door. Like I said, it freezes when I step there.. How do I correct this?

Also, (possibly the problem with above) when would I need to use (in A-Map) the "unknown, var number, etc" from the side bar? I've seen some of it used in the tutorials but I haven't seen anything on weather I need to or not with certain scripts, commands, etc. If there is a more detailed tut on the A-map event sidebar and which types of events I need for what, can I get a link to it? Thanks a bunch guys, you've been very helpful so far. :)
 
79
Posts
13
Years
  • Seen Aug 27, 2014
Ok, so I tried using this as a srcipt tile and it freezes on me as soon as I step on the tile. Its a "can't enter till you have a pokedex" script.

I'm using FR and I used this code the way its written, just with new messages and the bold part, and placed on a path instead of a door. Like I said, it freezes when I step there.. How do I correct this?

Also, (possibly the problem with above) when would I need to use (in A-Map) the "unknown, var number, etc" from the side bar? I've seen some of it used in the tutorials but I haven't seen anything on weather I need to or not with certain scripts, commands, etc. If there is a more detailed tut on the A-map event sidebar and which types of events I need for what, can I get a link to it? Thanks a bunch guys, you've been very helpful so far. :)

try to switch around 0x1 and 0x0
 

Capitalist Ness

can't stump the trump
69
Posts
15
Years
Do you guys forgot about me?
I tell my question again, how to change Wildbattles music? I don't want Regular Battle Theme in this script...
Here's my script.
Spoiler:
 

Chad -

 
687
Posts
14
Years
  • Seen Aug 27, 2012
just wondering what are the different commands for different types of trainer battle

example what one is double battle and single battle etc. etc.

There is trainerbattle 0x0, which is used for normal-trainer battles (single). trainerbattle 0x1 is used for mainly rival battles and gym leaders/elite four (it continues the script after you win). trainerbattle 0x4 is used for double battles.

There is also trainerbattle 0x5, which is used when you want to rebattle someone, though only single battles (requires special2 command) and trainerbattle 0x7, which is used if you want to re-battle two people at the same time (double battles). (NOT SURE ABOUT THIS PART)

There are more, but I don't know what they do, really. (trainerbattle 0x3, for example)

Decompile the in-game scripts to see them more clearly.

Chad -
 
Last edited:

Epicness

Hacker Newbia
24
Posts
13
Years
  • Age 28
  • Seen Dec 19, 2010
I am making a End of the world theme game and I'm having trouble with a give pokemon script. the chat works fine but when you say yes to the question its a bunch of jarble. here it is:

#org $begin
lock
faceplayer
checkflag 0x3200
if b_true goto $alreadygotone
message $talk
$talk 1 = Your Destiny Awaits...\nTake this Pokemon \land go to Kanto...
boxset 5
compare LASTRESULT 1
if 1 goto $get
message $why
$why 1 = Your destiny will steer \nyou right.
boxset 6
release
end
#org $get
lock
message $get1
$get1 1 = Your Destiny calls...
boxset 6
givepokemon 1 5 0x00
message $received
$recieved 1 = \v\h01 obtained BLASTOISE.
boxset 6
setflag 0x3200
release
end
#org $alreadygotone
lock
faceplayer
message $how
$how 1 = Fulfill your Destiny...
boxset 6
release
end
 

Crysalus

Rides a mantine to school.
26
Posts
13
Years
  • Age 28
  • Seen Dec 27, 2010
What I can see wrong with that script, is that after the question, at #org $get, you do not require a second lock, because it should carry on from the first. not sure if that will fix your problem, but still
 

FireFox

Dialga Fangirl
58
Posts
19
Years
  • Age 37
  • UK
  • Seen Feb 24, 2018
There are more, but I don't know what they do, really. (trainerbattle 0x3, for example)

I use trainerbattle 0x3 alot for forced battles, it's also used for the battles against Giovani (Team Rocket HQ/Silph Co.).

trainerbattle 0x3 0xID 0x0 @defeat

I'm not sure of its full function, so I just call it "boss trainer" or "forced battle". Meh, it works and that's all I care about!

Example:
Code:
...
msgbox @wellhello 0x4
closeonkeypress
trainerbattle 0x3 0xB 0x0 @curseyou
msgbox @imoutofhere 0x4
closeonkeypress
...

EDIT:
Also, using trainerbattle 0x3 DOESN'T play the "intro music" that is set in A-Trainer, it just goes stright into battle.
 
Last edited:
49
Posts
14
Years
  • Seen Sep 10, 2011
Ok, so I tried using this as a srcipt tile and it freezes on me as soon as I step on the tile. Its a "can't enter till you have a pokedex" script.

Spoiler:


I'm using FR and I used this code the way its written, just with new messages and the bold part, and placed on a path instead of a door. Like I said, it freezes when I step there.. How do I correct this?

Also, (possibly the problem with above) when would I need to use (in A-Map) the "unknown, var number, etc" from the side bar? I've seen some of it used in the tutorials but I haven't seen anything on weather I need to or not with certain scripts, commands, etc. If there is a more detailed tut on the A-map event sidebar and which types of events I need for what, can I get a link to it? Thanks a bunch guys, you've been very helpful so far. :)


Still can't get this to work.. Help please? :D


-1up
 

DuoRyan

Hack'in as usual, it seem.
335
Posts
14
Years
Still can't get this to work.. Help please? :D


-1up

#Dynamic 0xoffset

#org @start
checkflag 0x829
if 0x1 goto @done
msgbox @1 0x6
applymovement 0xFF @move
waitmovement 0x0
release
end

#org @done
release
end

#org @1
= I can't go in there\pwithout my pokedex

#org @move
#raw 0x10
#raw 0xfe

Try this and when you you used the green script
Put 0003 on unknown
and 4050 0n var number
 

Kevin

kevin del rey
2,686
Posts
13
Years
#Dynamic 0xoffset

#org @start
checkflag 0x829
if 0x1 goto @done
msgbox @1 0x6
applymovement 0xFF @move
waitmovement 0x0
release
end

#org @done
release
end

#org @1
= I can't go in there\pwithout my pokedex

#org @move
#raw 0x10
#raw 0xfe

Try this and when you you used the green script
Put 0003 on unknown
and 4050 0n var number
To prevent it from happening again;
#Dynamic 0xoffset

#org @start
checkflag 0x829
if 0x1 goto @done
msgbox @1 0x6
applymovement 0xFF @move
waitmovement 0x0
setflag 0x829
release
end

#org @done
release
end

#org @1
= I can't go in there\pwithout my pokedex

#org @move
#raw 0x10
#raw 0xfe
 

Zeffy

g'day
6,402
Posts
15
Years
  • Age 27
  • Seen Feb 7, 2024
To prevent it from happening again;
#Dynamic 0xoffset

#org @start
checkflag 0x829
if 0x1 goto @done
msgbox @1 0x6
applymovement 0xFF @move
waitmovement 0x0
setflag 0x829
release
end

#org @done
release
end

#org @1
= I can't go in there\pwithout my pokedex

#org @move
#raw 0x10
#raw 0xfe
nononono~

829 is the Pokédex flag, so if you set it there, the other script with a Pokédex flag will be ruined. Just do this: Put 0003 on Unknown
and 4050 on Var Number. Every script tile, as much as I know, needs to have that.
 

DuoRyan

Hack'in as usual, it seem.
335
Posts
14
Years
To prevent it from happening again;
#Dynamic 0xoffset

#org @start
checkflag 0x829
if 0x1 goto @done
msgbox @1 0x6
applymovement 0xFF @move
waitmovement 0x0
setflag 0x829
release
end

#org @done
release
end

#org @1
= I can't go in there\pwithout my pokedex

#org @move
#raw 0x10
#raw 0xfe

Yeah if he does a Pokedex script, the script above will check the flag 0x829 and go to #org @done which will end the script.
 

Kevin

kevin del rey
2,686
Posts
13
Years
I originally posted this in the Simple questions thread, and thought it was a question more suited for this thread.

To start this off, Yes I have attempted to find the answer to my question on my own without avail.

I would like to know how to script this into Pokemon R/S:

When you talk to a person (or maybe have him run to you)
The script then Checks what your Starter Pokemon was or Who the first Pokemon in your lineup is and gives you an item accordingly.

Example.

Starter Pokemon was Charmander.

You just received it from Prof. Birch.

On your way out, just after you leave the lab, an assistant comes running out and says, "Wait!\pPROF. BIRCH wanted you to have this."

Since your Starter Pokemon, or the first Pokemon in your lineup at this time, was Charmander He gives you the Charcoal Item. If your Starter Pokemon was Bulbasaur you would get a Mystic Water instead.

I would prefer the Starter Pokemon to have one of 3 items from the start but it looks like I can only make the Starter have only 2 choices... No item or 1 item no matter who you pick.

If anyone can help me with this it would be much appreciated.
This isn't a request thread. But, I think you'll need to use flags for something like that. Look up a tutorial.
 
Status
Not open for further replies.
Back
Top