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

Winter Wonderland

Puts the fun in dysfunctional
305
Posts
12
Years
Okay, so I'm trying to make this sprite disappear after a battle. It works, up until I decide to take a step anywhere, then it reappears. It's on Fire Red. Here's the script, can anyone tell me what's wrong with it?

Code:
#dynamic 0x800000
 
#org @start
checkflag 0x829
if 0x0 goto @done
checkflag 0x1000
if 0x1 goto @done
applymovement 0x03 @move1
waitmovement 0x0
trainerbattle 0x1 0x1AA 0x0 @before @after @later
end
 
#org @before
= Hey, [PLAYER]! We never tested out our\nPokemon! We should battle, like\lright now!
 
#org @after
= Damn! Your Pokemon is pretty good!
 
#org @later
msgbox @3 0x6
giveitem 0x4 0x05 MSG_OBTAIN
closeonkeypress
applymovement 0x03 @move2
waitmovement 0x0
hidesprite 0x03
setflag 0x1000
release
end
 
#org @done
release
end
 
#org @3
= Wow! Your Totodile is pretty\nstrong! You know, there's a gym in\lSky Slate City. Why don't you go\lcheck it out? Also, you should\ltake these. It will help you fill\lout the PokeDex. I'll see you\llater, friend!
 
#org @4
= You received the PokeBalls!
 
#org @move1
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0xFE
 
#org @move2
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE
 

The Void

hiiiii
1,416
Posts
13
Years
Okay, so I'm trying to make this sprite disappear after a battle. It works, up until I decide to take a step anywhere, then it reappears. It's on Fire Red. Here's the script, can anyone tell me what's wrong with it?

Code:
#dynamic 0x800000
 
#org @start
checkflag 0x829
if 0x0 goto @done
checkflag 0x1000
if 0x1 goto @done
applymovement 0x03 @move1
waitmovement 0x0
trainerbattle 0x1 0x1AA 0x0 @before @after @later
end
 
#org @before
= Hey, [PLAYER]! We never tested out our\nPokemon! We should battle, like\lright now!
 
#org @after
= Damn! Your Pokemon is pretty good!
 
#org @later
msgbox @3 0x6
giveitem 0x4 0x05 MSG_OBTAIN
closeonkeypress
applymovement 0x03 @move2
waitmovement 0x0
hidesprite 0x03
setflag 0x1000
release
end
 
#org @done
release
end
 
#org @3
= Wow! Your Totodile is pretty\nstrong! You know, there's a gym in\lSky Slate City. Why don't you go\lcheck it out? Also, you should\ltake these. It will help you fill\lout the PokeDex. I'll see you\llater, friend!
 
#org @4
= You received the PokeBalls!
 
#org @move1
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0xFE
 
#org @move2
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE
Are you using XSE? I'm not familiar with those codes...

I usually use applymovement, pauseevent, fadedefault, disappear and setflag
codes...
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
Okay, so I'm trying to make this sprite disappear after a battle. It works, up until I decide to take a step anywhere, then it reappears. It's on Fire Red. Here's the script, can anyone tell me what's wrong with it?

Code:
#dynamic 0x800000
 
#org @start
checkflag 0x829
if 0x0 goto @done
checkflag 0x1000
if 0x1 goto @done
applymovement 0x03 @move1
waitmovement 0x0
trainerbattle 0x1 0x1AA 0x0 @before @after @later
end
 
#org @before
= Hey, [PLAYER]! We never tested out our\nPokemon! We should battle, like\lright now!
 
#org @after
= Damn! Your Pokemon is pretty good!
 
#org @later
msgbox @3 0x6
giveitem 0x4 0x05 MSG_OBTAIN
closeonkeypress
applymovement 0x03 @move2
waitmovement 0x0
hidesprite 0x03
setflag 0x1000
release
end
 
#org @done
release
end
 
#org @3
= Wow! Your Totodile is pretty\nstrong! You know, there's a gym in\lSky Slate City. Why don't you go\lcheck it out? Also, you should\ltake these. It will help you fill\lout the PokeDex. I'll see you\llater, friend!
 
#org @4
= You received the PokeBalls!
 
#org @move1
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0xFE
 
#org @move2
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

destinedjagold's post above yours shows how make a person event disappear for good.

Write the flag in the Person ID box.
mappy-1.png

Just put 1000 in their Person ID box since you're already setting that flag in the script.
 
19
Posts
12
Years
  • Seen Aug 12, 2012
Another problem

In the game I'm making, the player has a sister who blocks the entrance to the next area until the player get's his first Pokemon.

Like this:

#dynamic 0x71A248

#org @start
checkflag 0x1002
if b_true goto @moved [if you got your Pokemon, goto @moved]
lock
faceplayer
message @tutorial
boxset 6
release end

#org @tutorial
= Sister: There's a\nKRAZY Hole here!\lIt wasn't here before.\pI wonder what's down there \v\h01!

#org @tutorialmod
= Sister: There's a\nKRAZY Hole here!\lIt wasn't here before.\pI wonder what's down there \v\h01!\p You should go check!

#org @moved
applymovement 0x1 @move1
waitmovement 0x1
message @tutorialmod
boxset 6
clearflag 0x1002 [This is so that she doesn't keep moving again and again]
release
end

#org @move1
#raw 0x12
#raw 0x3
#raw 0xFE



But when you back there (from another room or something) she's blocking the entrance again. My question is, how do you make it so that once she moves to the left, she never moves back, but still can't move left again.
Thanks
 

Quilava's Master

Shattered Dreams '13
694
Posts
16
Years
  • Seen Aug 14, 2023
In the game I'm making, the player has a sister who blocks the entrance to the next area until the player get's his first Pokemon.

Like this:

#dynamic 0x71A248

#org @start
checkflag 0x1002
if b_true goto @moved [if you got your Pokemon, goto @moved]
lock
faceplayer
message @tutorial
boxset 6
release end

#org @tutorial
= Sister: There's a\nKRAZY Hole here!\lIt wasn't here before.\pI wonder what's down there \v\h01!

#org @tutorialmod
= Sister: There's a\nKRAZY Hole here!\lIt wasn't here before.\pI wonder what's down there \v\h01!\p You should go check!

#org @moved
applymovement 0x1 @move1
waitmovement 0x1
message @tutorialmod
boxset 6
clearflag 0x1002 [This is so that she doesn't keep moving again and again]
release
end

#org @move1
#raw 0x12
#raw 0x3
#raw 0xFE



But when you back there (from another room or something) she's blocking the entrance again. My question is, how do you make it so that once she moves to the left, she never moves back, but still can't move left again.
Thanks
Make a level script using movesprite2 0x1 0x[X-coordinate] 0x[Y-coordinate]
 
14
Posts
12
Years
  • Seen Jan 22, 2012
Is there a way to trigger 'fly', or any HM for that matter, during an ongoing script event?
 

Dark pokemon

Beginner Hacker
42
Posts
14
Years
Ok so I have download xse and is trying to make a script when I click the compile button all it does is make a flash.

so did it compile and if not do I need to get a new xse
 
19
Posts
12
Years
  • Seen Aug 12, 2012
Still not working.......

I used this as a level script but, if you DON'T have a Pokemon yet it just freezes.

'-----------------------
#org 0x800337
checkflag 0x1002 [if you have a Pokemon]
if 0x1 goto 0x8800342
end

'-----------------------
#org 0x800342
movesprite2 0x1 0xE 0x7
setvar 0x7001 0x1
end


Also, if you step out of the view of your sister, she goes back to blocking the hole.
 

billzfan123

Awesome Hacker
2
Posts
12
Years
  • Age 29
  • Seen Aug 23, 2014
Hi, I created a VERY simple script, but when i tried to compile it an error popped up that said "file not found or user cancel". I'm not sure what to do to make poketscript work... can i have some help? here is my VERY simple script:

#org $script
lock
faceplayer
message $text
$text 1 = Hello!\nHow are you?\pGoodbye, \v\h01
boxset 6
release
end
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
Hi, I created a VERY simple script, but when i tried to compile it an error popped up that said "file not found or user cancel". I'm not sure what to do to make poketscript work... can i have some help? here is my VERY simple script:

#org $script
lock
faceplayer
message $text
$text 1 = Hello!\nHow are you?\pGoodbye, \v\h01
boxset 6
release
end

While you are early in the field of scripting, may I suggest you switch to using XSE instead of PokeScript?
 
10
Posts
13
Years
  • Seen May 5, 2013
got over the problem of the mew, thank you for help, now i'm into another problem, since in my rom the player is able to obtain all the starter, i was wandering how the script of the lady that teaches you the final move to your starter (such as blast burn for charmender) works, because my goal is make possible to learn all the three moves, but in order to do so i have to understand wich flag trigger the selection between the moves, i mean, if the lady just compare the first pokemon in ur team with one of the 3 starters, i don't need to modify the scripts, switch the pokemon party position will be enough, but if a flag if set in the moment i choose the starter, then it is all a different story... so can anyone help me to figure out how it works and wich flag it trigger?

thank you for reading :D

uppp !! :D can't figure it out, i know, it passed a while, but i'm now having the time thanks to the summer break :D
 
Status
Not open for further replies.
Back
Top