• 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.
Works now! Thank you! ^^

-wonders why it didn't the first time-

Also, I can't see whats wrong with this. The lines over lap when I talk to the people though.

What do you mean lines overlap? BTW, its \n, not /n
 
Hey, I just got back into scripting today and I just made this code and it doesn't work. Could you help me out.
Code:
#org $begin
lock
faceplayer
checkflag 0x200
if B_TRUE goto $Desert
checkflag 0x201
if B_TRUE goto $LostForest
checkflag 0x202
if B_TRUE goto $NextTown
message $hi
boxset 6
release
end

#org $hi
message $hi 1 = Hi v/h01. Do you have a ticket? No? Come back when you do, okay?

#org $NextTown
checkflag 0x204
if B_TRUE goto $goback1
message $hi1
boxset 5
compare LASTRESULT 1
if 2 goto $Stay
message $ok
boxset 6
setflag 0x204
applymovement 0x3 $move
applymovement 0xFF $move1
pausemove 0
warp 3 1 0
release
end

#org $hi1
message $hi1 1 = Hi v/h01./n I see you have a ticket./n Would you like to go to the next town?

#org $ok
message $ok 1 = Okay then. Lets go!

#org $move
applymovement $move ; 0x00 0x60 0xFE

#org $move1
applymovement $move1 ; 0x10 0x60 0xFE

#org $Stay
message $ok1
boxset 6
release
end

#org $ok1
message $ok1 1 = Ok then v/h01./n Tell me when your ready to go.

#org $goback1
message $ask
boxset 5
compare LASTRESULT 1
if 2 goto $ok4
message $ok5
boxset 6
applymovement 0x3 $move
applymovement 0xFF $move1
pausemove 0
warp 3 1 0
release
end

#org $ask
message $ok4 1 = So do you want to go to the next town?

#org $ok5
message $ok5 1 = Lets go!

#org $ok4
message $no
boxset 5
if B_TRUE goto $repeat
message $done
release
end

#org $no
message $no 1 = Your sure you don't want to go somewhere?

#org $done
message $done 1 = Ok, v/h01. Tell me when you want to go somewhere.

#org $repeat
checkflag 0x200
if B_TRUE goto $Desert
checkflag 0x201
if B_TRUE goto 0x203
checkflag 0x202
if B_TRUE goto $NextTown
release
end

#org $LostForest
checkflag 0x203
if B_TRUE goto $goback
message $hi2
boxset 5
compare LASTRESULT 1
if 2 goto $goback1
message $ok2
boxset 6
setflag 0x203
applymovement 0x3 $move
applymovement 0xFF $move1
pausemove 0
warp 1 0 0
release
end

#org $hi2
message $hi2 1 = Oh, hi v/h01... Wait you have that ticket?! Wow! Your the first person to have that ticket... Well then are you ready to go?

#org $ok2
message $ok2 1 = Ok then. Lets go!

#org $goback
message $goback2
boxset 5
compare LASTRESULT 1
if 2 goto $goback1
message $ok3
boxset 6
applymovement 0x3 $move
applymovement 0xFF $move1
pausemove 0
warp 1 0 0
release
end

#org $goback2
message $goback2 1 = Would you like to go back to Lost Forest, v/h01?

#org $ok3
message $ok3 1 = Ok, v/h01./n Lets go to Lost Forest!

#org $Desert
checkflag 0x205
if B_TRUE goto $goback3
checkflag 0x201
if B_TRUE goto $gotogoback
message $desert1
boxset 5
compare LASTRESULT 1
if 2 goto $goback1
message $going
boxset 6
setflag 0x205
applymovement 0x3 $move
applymovement 0xFF $move1
pausemove 0
warp 1 0 0
release
end

#org $desert1
message $desert1 1 = You have all of the tickets don't you?/n v/h01, that's amazing!/n So, do you want to/n go to your next destination?

#org $going
message $going 1 = Ok then. This trip is going to be awhile,/n so you should probably sleep./n From what I hear, there are some powerful trainers out there./n Be careful.

#org $goback3
checkflag 0x201
if B_TRUE goto $gotogoback
message $desert3
boxset 5
compare LASTRESULT 1
if 2 goto $goback1
message $going2
boxset 6
applymovement 0x3 $move
applymovement 0xFF $move1
pausemove 0
warp 3 19 0
release
end

#org $desert3
message $desert3 1 = So do you want to back to the Desert?

#org $going2
message $going2 1 = Ok, let's go!

#org $gotogoback
checkflag 0x206
if B_TRUE goto $gotogoback1
message $desert2
boxset 5
compare LASTRESULT 1
if 2 goto $goback
message $going1
boxset 6
setflag 0x206
applymovement 0x3 $move
applymovement 0xFF $move1
pausemove 0
warp 3 19 0
release
end

#org $desert2
message $desert2 1 = You have all of the tickets don't you?/n v/h01, that's amazing!/n So, do you want to/n go to your next destination?

#org $going1
message $going1 1 = Ok then. This trip is going to be awhile,/n so you should probably sleep./n From what I hear, there are some powerful trainers out there./n Be careful.

#org $gotogoback1
message $desert4
boxset 5
compare LASTRESULT 1
if 2 goto $goback
message $going3
boxset 6
applymovement 0x3 $move
applymovement 0xFF $move1
pausemove 0
warp 3 19 0
release
end

#org $desert4
message $desert4 1 = So, do you want to go back to the Desert?

#org $going3
message $going3 1 = Ok then, lets go!
 
ya got a lot of errors there... :\
I'll give you an example of your errors and the correct ones...
first...
Code:
#org $move1
applymovement $move1 ; 0x10 0x60 0xFE

It should be
Code:
#org $move1
$move1 1 ; #binary 0x10 0x60 0xFE

next...
Code:
#org $ok5
message $ok5 1 = Lets go!

it should have been...
Code:
#org $ok5
$ok5 1 = Lets go!

next...
Code:
Hi v/h01./n

I'm guessing you wish the player's name to appear, right?
use this code...
Code:
\v\h01
 
Thanks! Were those the only errors, because when I tried the code, the game crashed.
 
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
 
How would a script look to battle someone and if you win, you get a pokemon.

How would I iknstall that script once made?

XD
 
ok,
IAM USING THIS SCRIPT
#org $begin
lock
faceplayer
checkflag 0x200
message $howareyou
$howareyou 1 =Hey
boxset 6
setflag 0x200
release


than i install the script into advance map by using the green squares
than i play the game and the script keeps repeating when i walk over it how do i stop this from happening???
 
How would a script look to battle someone and if you win, you get a pokemon.
I just made this one up so there's bound to be an error somewhere but this should be the basic formula (NOTE: done in pokescript):

Code:
#org $begin
trainerbattle 0 0x001 $before $after
checkflag 0x200
if b_true goto $done
message $givepoke
boxset 6
givepokemon 155 5 0
setflag 0x200
release
end

#org $done
message $takegoodcare
boxset 6
release
end

#org $before
$before 1 = {challenge text}

#org $after
$after 1 = {end of battle text}

#org $givepoke
$givepoke 1 = Wow, you are really good.\pHere, take my CYNDAQUIL.

#org $takegoodcare
$takegoodcare 1 = I hope you are taking good\ncare of my CYNDAQUIL.
How would I iknstall that script once made?
XD
Read any pokescript tutorial and look for a section on compiling.

ok,
IAM USING THIS SCRIPT
#org $begin
lock
faceplayer
checkflag 0x200
message $howareyou
$howareyou 1 =Hey
boxset 6
setflag 0x200
release


than i install the script into advance map by using the green squares
than i play the game and the script keeps repeating when i walk over it how do i stop this from happening???

Well first of all, there is no END command in your script. Secondly, when you use CHECKFLAG, you need to have a pointer to another section so that if there is a flag, the script will jump to another section. Try this:

Code:
[B][COLOR=deepskyblue]#org $begin
lock
faceplayer
checkflag 0x200[/COLOR][/B]
if b_true goto $done
[B][COLOR=deepskyblue] message $howareyou
$howareyou 1 =Hey
boxset 6
setflag 0x200
release[/COLOR][/B]
end

#org $done
message $text
$text 1 = {some other text}
boxset 6
release
end
 
Last edited:
Well first of all, there is no END command in your script. Secondly, when you use CHECKFLAG, you need to have a pointer to another section so that if there is a flag, the script will jump to another section. Try this:

Code:
[B][COLOR=deepskyblue]#org $begin[/COLOR][/B]
[B][COLOR=deepskyblue]lock[/COLOR][/B]
[B][COLOR=deepskyblue]faceplayer[/COLOR][/B]
[B][COLOR=deepskyblue]checkflag 0x200[/COLOR][/B]
if b_true goto $done
[B][COLOR=deepskyblue]message $howareyou[/COLOR][/B]
[B][COLOR=deepskyblue]$howareyou 1 =Hey[/COLOR][/B]
[B][COLOR=deepskyblue]boxset 6[/COLOR][/B]
[B][COLOR=deepskyblue]setflag 0x200[/COLOR][/B]
[B][COLOR=deepskyblue]release[/COLOR][/B]
end
 
#org $done
message $text
$text 1 = {some other text}
boxset 6
release
end
[/quote]

That could be true.. In script tiles, you could also forget about checkflags and just set the variable number to another value.
 
I want some scripts for my hack game.

1-I want a man give a Charmander and run away map (Ever)

2-I want an another man give Pokedex and run away map (Ever)

3-I want a door close until catch a Mareep. (No level range needed)
 
Hi guys! I need a script.

The script unlocks you the national Pokedex after you get the Hoenn Dex from Prof. Birch.

Thanks in advance.
 
hey.... I'm pretty new at scripting... I have one quick question....

#org $start
giveitem 208 1
#raw 0x53 0x0F 0x80
message $3
boxset 6
setflag 0x200
release
end


#org $3
$3 1 =hmm, I wonder what use a magnet\nis to Team Rocket...
For the above, I want the pokeball to disappear when you receive the item. It disappears, but when you move it reappears.

I would assume these would be easy to fix... but I don't know how :p

Thanks in advance :)

edit:

adding another question....

#org $start
lock
faceplayer
checkflag 0x207
if b_true goto $true
if b_false goto $hello
release
end

#org $true
message $2
boxset 6
checkflag 0x207
if b_true goto $fin
release
end

#org $fin
applymovement 0x04 $move
applymovement 0xFF $move2
pause 0x70
release
end

#org $hello
setflag 0x206
message $1
boxset 6
release
end

#org $2
$2 2 =Ahh!\nDon't let him come after me!

#org $1
$1 1 =You rotten kids!\pGo away NOW!

#org $move
#raw 0x1F 0x1F 0x1F 0x1F 0x1F 0x1F 0x60 0xFE

#org $move2
#raw 0x65 0xFE
She is supposed to run away and NOT come back... but when I enter a building she returns... how do I make her leave forever?
 
Last edited:
Hm, well I'm a n00b to scripting, but I made this script:
#org $start
lock
faceplayer
checkitem 0x172 0x1
compare LASTRESULT 0x1
if 0x1 goto $pass
message $nopass '"I'm the guardian of the\secret..."
boxset 6
release
end

#org $pass
message $passx '"Is that a SILVER WING?\pYou may pa..."
boxset 6
applymovement 0x1D $move
pause 0x10
setflag 0x1041
release
end

#org $move
#raw 0x01 0x11 0x60

#org $nopass
= I'm the guardian of the\nsecret legendary POKéMON that is\lsaid to live here.\pUnless you have a SILVER WING,\nyou will not pass.

#org $passx
= Is that a SILVER WING?\pYou may pass...
The thing is, when I talk to the person, the screen goes red. BTW, I'm using pokescript.
Thanks in advance and if it's pretty bad, it's because I still know very little.
 
Hm, well I'm a n00b to scripting, but I made this script:
The thing is, when I talk to the person, the screen goes red. BTW, I'm using pokescript.
Thanks in advance and if it's pretty bad, it's because I still know very little.
should you use "if b_true goto (...)" or "if b_flase goto (...)"? im not sure... just a guess.
 
Status
Not open for further replies.
Back
Top