• 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 Trading Card Game 2 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.
Need some help. You see when you are getting a pokemon, and oak tells you to get it, you can leave without getting it, anyone know how I can stop this from happening?

Code:
#org $start
compare 0x4055 0x2
if 0x1 call $hey
release
end

#org $hey
showmsgstatic $yo
$yo 1 = OAK: Hey, Where are you going!
boxset 6
applymovement 0xFF $come
$come 1 ; 0x11 0xFE
pausemove 0
end

That's what I got so far...

Well. I can see what you're talking about, i'm not perfect at these scripts but this should give you an idea -
* Just change the flag if you've used it.
* Add in the movements.
* Add in Oaks Event Number.
* Add in the getting pokemon event number.

Code:
#org $begin
checkflag 0x00
if b_false goto $come
[B]checkflag 0x200[/B]
if b_true goto $finished
applymovement 0x0 $oakcome
pausemove 0
message $stop
boxset 0x6
applymovement 0x00 $oakbring
pausemove 0
applymovement 0xFF $comewith
pausemove 0
[B]setflag 0x200[/B]
release
end

#org $stop
= Hey!\nWhere are you going!

#org $oakcome
#raw 0xFE                      'Add in oaks coming movements.

#org $oakbring
#raw 0xFE                      'Add in oaks taking movements.

#org $comewith
#raw 0xFE                      'Add in the followme movements.

#org $finished
release
end

Dunno if it will work, but it's worth a try.
 
Litium: I've gotten closer to getting that script to work. Now the little beep sound is made and nothing happens. At least it doesn't freeze.

-----
- Pushed block.$block to 801000
- Pushed block.$have to 801081
- Pushed block.$cantlet to 8010CE
- Pushed block.$move1 to 8012CD
- Pushed block.$youvegot to 8012D0
- Pushed block.$move2 to 8014CE
I used the first one as $801000. And... Does file not found or user cancel matter? If so, what am I missing?
 
Last edited:
You have PkmAdv? Maybe is a file missing for pokescript. I don't know...
 
I'll try getting that fixed pokescript that evil dark mew posted.
Yay! I finally got a simple script to work. A give potion script.
Litium: got yours to work too. Thanks, but do you think you can make a little different one where:
[PokeCommunity.com] [Archive] Script help thread This person moves from side to side until you to talk to him when you have a pokemon? And... how do I make it so oak doesn't appear when you try to leave? Thanks to Evil Dark Mew as well.
 
Last edited:
I have some scripting questions,
in this first script, it is a starter script. Everything works fine
except for the givepokemon part, i've added in the Pokemon Menu and Kanto Pokedex any just wanted to check if they were placed right. They are the raws in the middle of the scripts. Also, I want the script to happen when the player steps on the tile, which is infront of a warp tile. How do I do this?

Code:
#org $begin
lock
checkflag 0x202
if b_true goto $done
setflag 0x828
applymovement 0x0 $coming
pausemove 0
givepokemon 0x19 0x5 0x0
message $getpokemon
boxset 0x6
setflag 0x829
message $received
boxset 0x6
applymovement 0x0 $going
pausemove 0
setflag 0x202
release
end

#org $getpokemon
= I think you need a Pokemon for your journey.\nI'll give you your fathers old Pikachu!

#org $received
= You received a PIKACHU!

#org $coming
#raw 0x0B
#raw 0x09
#raw 0x09
#raw 0x03
#raw 0xFE

#org $going
#raw 0x08
#raw 0x08
#raw 0x0A
#raw 0xFE

#org $done
release
end

In these two scripts, I want them to cancel the other so it doesn't happen. I added in checkflags.

Code:
#org $begin
lock
checkflag 0x201
if b_true goto $done
applymovement 0x5 $comingto
pausemove 0
message $explain
boxset 0x6
applymovement 0x3 $goingaway
pausemove 0
#raw 0x53
setflag 0x201
checkflag 0x200
if b_true goto $done
release
end

#org $explain
= Hello, you must be new here.\nMy name is Prof Oak, I am a\pPokemon researcher. I'm a bit busy so\nwhy don't you come visit me at\pmy lab in Route 1.

#org $comingto
#raw 0x62
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x09
#raw 0x09
#raw 0xFE

#org $goingaway
#raw 0x0B
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0xFE

#org $done
release
end

Code:
#org $begin
lock
checkflag 0x200
if b_true goto $finished
applymovement 0x5 $comingto
pausemove 0
message $explain
boxset 0x6
applymovement 0x3 $goingaway
pausemove 0
#raw 0x53
setflag 0x200
checkflag 0x201
if b_true goto $done
release
end

#org $explain
= Hello, you must be new here.\nMy name is Prof Oak, I am a\pPokemon researcher. I'm a bit busy so\nwhy don't you come visit me at\pmy lab in Route 1.

#org $comingto
#raw 0x62
#raw 0x0A
#raw 0x0A
#raw 0x09
#raw 0x09
#raw 0xFE

#org $goingaway
#raw 0x0A
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0xFE

#org $done
release
end

Thankyou.
 
Hey everyone, I've searched around the scripting threads and can't seem to find what I'm looking for, so I'll ask.

I need to know how to make scripts that

1. Use money, eg. buy something or a service
2. How to give an egg that will hatch into a Pokémon of my choice
3. How to make a Pokémon's sprite appear on screen

I know I've read somewhere before how to make random scripts that give a different answer everytime and how to sound a Pokémon's cry, but I can't find the specific post.

All of this is for Fire Red.

I would really appreciate it if someone could repost these.

Thanks in advance ;)
 
Code:
#ORG $HiWelcome
faceplayer
lock
checkflag 0x200
if B_TRUE goto $havethis
message $askme
$askme 1 = Hi would you like this potion?
boxset 5
compare LASTRESULT B_TRUE
if B_False goto $dontget
giveitem 0x29 5
setflag 0x200
release 
end

#ORG $havethis
Lock
faceplayer
message 1 = Well you can have these!
boxset 6
release
end

#ORG $dontget
lock 
faceplayer
message $Ohwell
$Ohwell 1 = Oh Well (all the more for me)
boxset 6
release
end

When i say no i still get the item and then i talk to the person again and the screen just goes black

Bit of help please
 
You forgot to put the Message $whatever for $havethis. I'm not sure about the other problem, I'm not good at Yes/No scripts.
 
You forgot to put the Message $whatever for $havethis. I'm not sure about the other problem, I'm not good at Yes/No scripts.

Code:
#ORG $HiWelcome
faceplayer
lock
checkflag 0x200
if B_TRUE goto $havethis
message $askme
$askme 1 = Hi would you like this potion?
boxset 5
compare LASTRESULT B_TRUE
if B_False goto $dontget
giveitem 0x29 5
setflag 0x200
release 
end

#ORG $havethis
Lock
faceplayer
message $Havethis
$havethis 1 = Well you can have these!
boxset 6
release
end

#ORG $dontget
lock 
faceplayer
message $Ohwell
$Ohwell 1 = Oh Well (all the more for me)
boxset 6
release


end
Now edited the screen doesnt go black but i still get the item when i say no
I talk again and loads of wierd symbles come up
 
Last edited:
Code:
#ORG $hiwelcome
faceplayer
lock
checkflag 0x200
if B_TRUE goto $havethis
message $askme
$askme 1 = Hi would you like this potion?
boxset 5
compare LASTRESULT B_TRUE
if B_False goto $dontget
giveitem 0x29 5
setflag 0x200
release 
end

#ORG $havethis
Lock
faceplayer
message $Havethis
$havethis 1 = Well you can have these!
boxset 6
release
end

#ORG $dontget
lock 
faceplayer
message $Ohwell
$Ohwell 1 = Oh Well (all the more for me)
boxset 6
release


end
Now edited the screen doesnt go black but i still get the item when i say no
I talk again and loads of wierd symbles come up

im not to good at yes/no but I thin your problem is this in B
Code:
#org $hiwelcome
[B]lock[/B]
faceplayer
checkflag 0x200
if B_TRUE goto [B]$done[/B]
message $askme
$askme 1 =Hi would you like these potions?
boxset 5
compare LASTRESULT B_TRUE
if B_False goto $dontget
[B]message $havethis
$havethis 1 =Well you can have these!
boxset 6[/B]
giveitem 0x29 5
setflag 0x200
release 
end

[B]#org $done
release
end[/B]

#org $dontget
lock 
faceplayer
message $ohwell
$ohwell 1 =Oh Well (all the more for me)
boxset 6
release
end
I wouldnt use all those capital letters just use normal..Idunno why.>XD

Code:
#org $depart
lock
checkflag 0x361
if B_true goto $done
message $fly
$fly 1 =Hello!\nDo you want to go\pon this flight?
boxset 5
compare LASTRESUILT B_TRUE
if B_False goto $no
message $check
$check 1 =Can I see your ticket?
boxset 6
#raw 0x47 0x10F 0x00 0x1 0x00
compare LASTRESULT 0x1
if 0x1 goto $nono
message $alright
$alright 1 =Let's go aboard!
boxset 6
applymovement 0x1 $gotoplane
applymovement 0xFF $gotoplane
pausemove 0
applymovement 0x1 $goback
pausemove 0
fadescreen 0
warp 15 1 0
setflag 0x361
release
end

#org $done
release
end

#org $no
lock
message $no
$no 1 =Alright, maybe later!
boxset 6
release
end

#org $nono
$nono 1 =You don't have a ticket!

#org $gotoplane
$gotoplane 1 ; #binary 0x10 0x10 0xFE

#org $goback
$goback 1 ; #binary 0x11 0x11 0x02 0xFE
Can someone check this..it doesnt work when I choose no it still goed for yes..:(
 
Last edited:
Question

I, (Being brand new to the forums and to hacking), had recently tried to compile a test script, (After following Irish Womans' tutorial zealously.)

The main premise of the script is a followup to the "Lava Cookie," demo as shown. I was able to compile it successfully, and had applied it to the man. Alas, when I tried to talk to him ingame, the screen faded out and the results of a contest, for some strange reason, appeared instead.
Here is a picture of the said "Strange Screen."
 
I, (Being brand new to the forums and to hacking), had recently tried to compile a test script, (After following Irish Womans' tutorial zealously.)

The main premise of the script is a followup to the "Lava Cookie," demo as shown. I was able to compile it successfully, and had applied it to the man. Alas, when I tried to talk to him ingame, the screen faded out and the results of a contest, for some strange reason, appeared instead.
Here is a picture of the said "Strange Screen."

First of all, where's the picture? I didn't see one.

Second of all, Irish Witch's tutorial is outdated, it hasn't been updated in many months. Try another tutorial.
 
#org $begin
lock
faceplayer
checkflag 0x232
if B_true goto $gotit
message $q
boxset 6
message $mygod
boxset 6
givepokemon 280 5 0
message $namecharm
boxset 5
setflag 0x232
setflag 0x828
release
end

#org $gotit
message $hi
boxset 6
release
end

#org $hi
$hi 1 = how's that TORCHIC?

#org $q
$q 1 = please help me\ntake this TORCHIC!

#org $mygod
$mygod 1 = You recived the TORCHIC!

message $namecharm
$namecharm 1 = give TORCHIC a nickname
boxset 5
compare LASTRESULT 1
if b_false goto $seeya
NamePokemon
goto $seeya
setflag 0x203

message $seeya
$seeya 1 = thanks!
release
end

i was woundering if you could help me with my give pokemon script.the problem with it is that when it asks you to name the pokemon in the game when you select yes it does not go to the name pokemon screen it just ends the script i also i cannot get the $seeya mesage to dysplay. also one more thing how do you get the sptiyes to vanish?
if there are any other mistakes with the script please tell me
many thanks
 
Last edited:
Spoiler:


If anybody else is having problems with the 'checkitem' command, put #raw 0x1 and #raw 0x0 after the checkitem 0xx it seems to work then!
 
Last edited:
First is this right place to post?

But evey time i make a script white a yes and no ask, It just stopping the script no deppending on what you are chossing? How do i make a script that goes

Do you mind bring some water?
Yes--> Thanks (Set and offset)
No---> Why not? Come on (And repeat it all again)

Please help fast it's for fire red!
 
Does anyone know whats wrong with this script...
cuz when I finished this script I suddenly play another person..:s
Please help (or rewrite if possible..)

Spoiler:
 
Does anyone know whats wrong with this script...
cuz when I finished this script I suddenly play another person..:s
Please help (or rewrite if possible..)

Spoiler:
Your problem was the people numbers I think. Instead of something like 0x4, you should have something like 0x04. I rewrote the script, it should work.

Spoiler:
 
Last edited:
Can somebody help me with these questions:

1. How do you make a give egg script

2. how do you make a script so that the pokemon ina wild battle script is shiny?

3. how do you make a give pokemon script but the pokmeon givin is shiny?
 
Status
Not open for further replies.
Back
Top