The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary Hack Tutorials (https://www.pokecommunity.com/forumdisplay.php?f=66)
-   -   thethethethe's Scripting Tutorial (https://www.pokecommunity.com/showthread.php?t=128887)

Master_Track March 22nd, 2008 2:28 AM

Maybe it's used in an original script, so just try some other flag ;)

edit:
Well, now I have a problem -.-
I made two scripts: One should activate 'till the hero got the Pokedex fromr Oak. Then it should just release,
It's this one:

Code:

#org $begin
checkflag 0x829
compare lastresult 0x1
if B_true goto $release
applymovement 0x05 $move
pause 0x30
applymovement 0x05 $move2
pausemove 0x0
applymovement 0xFF $move4
pausemove 0x0
message $arbeiten
$arbeiten 1 = Du kannst hier jetzt nicht\ndurch. Vor dem Vertania-Wald wird\lgerade aufgeräumt, der starke Regen\lhat eine Erdschicht abrutschen lassen.
boxset 6
applymovement 0xFF $move5
pausemove 0x0
applymovement 0x05 $move3
pausemove 0x0
release
end

#org $release
release
end

#org $move
#raw 0x65 0xFE

#org $move2
#raw 0x11 0x11 0x13 0x13 0x00 0xFE

#org $move5
#raw 0x10 0x10 0x10 0xFE

#org $move3
#raw 0x12 0x12 0x10 0x10 0xFE

#org $move4
#raw 0x01 0xFE


Everything works fine with this script, It does what it is supposed to do, and after getting the pokedex ist doesn't anything.
But now I have the second script, it should bar the hero from going into the arena 'till he received the 7th badge.
There ist is:
Code:

#org $begin
checkflag 0x826
compare lastresult 0x1
if B_true goto $continue
lock
applymovement 0xFF $move
pausemove 0x0
message $stop
$stop 1 = Die Türen der Arena sind fest\nverschlossen.
boxset 6
applymovement 0xFF $move2
pausemove 0x0
release
end

#org $move
#raw 0x01 0xFE

#org $move2
#raw 0x12 0x12 0xFE

#org $continue
release
end


Works fine too, but this script releases after I got the Pokedex, though the checkflag 0x826 checks for the 7th badge, doesn't it?
Pls help ^^

destinedjagold March 22nd, 2008 3:34 AM

Quote:

Originally Posted by destinedjagold (Post 3420879)
I tested the script myself and it worked fine.
I'll put up a video when YouTube finishes uplaoding it. ;)

and yeah, I guess it's because of the setflag...

here's the video of the script...

Pokepal2007 March 22nd, 2008 5:57 AM

what should change the flag to?

or is it the event number will i need to change it to D or something?

thetribemaster March 22nd, 2008 8:27 AM

Okay, this script works well up until when you get the DEX, and Pokemon. Then it skips right to $adventure when it should give message $mission

I also have a script on the first page that doesnt work.

Code:

#org $start
lock
faceplayer
checkflag 0x201
if B_false goto $news
checkflag 0x828
if B_false goto $flags
checkflag 0x829
if B_false goto $flags
checkflag 0x202
if B_true goto $missionfinish
checkflag 0x203
if B_true goto $bosses
checkflag 0x205
if B_true goto $adventure
message $mission
setflag 0x205
release
end

#org $mission
$mission 1 =Your mission, should you choose\nto accept it is:\pI need you to find the source of\ldarkness in this world.\pIt may sound a daunting task\lbut I think you can do it!\pI think you should visit my friends\l across Johto, they will train you\lto find and destroy the darkness\lhaunting this world.\pReturn here when you have\l seen all 8 of them.

#org $news
message $1
boxset 6
setflag 0x201
release
end

#org $1
$1 1 =Hello! I am Prof. XANU\pI have a proposition for you.\pBut first you need a pokemon\land a pokedex.\p Go grab them off of that table.

#org $flags
message $2
boxset 6
release
end

#org $2
$2 1 =Did you get them yet?

#org $missionfinish
message $3
boxset 6
setflag 0x204
release
end

#org $3
$3 1 =So you finished?\pGreat!!!\nYour mom has something for\l you.\lGo get it!

#org $bosses
checkflag 0x207
message $4
boxset 6
setflag 0x206
release
end

#org $4
$4 1 =We have discovered the source\nof darkness.\pIt is a pokemon called DARKRAI.\p We must find a way to destroy it.\pGo find him at his fortress.

#org $adventure
message $5
boxset 6
release
end

#org $5
$5 1 =How's the mission coming?\p...\pOh thats wonderful!\lKeep it up!


Help me plz, and with my script on the first page

Master_Track March 22nd, 2008 10:56 AM

@pokepal2007: Just try another number, like checkflag 0x240 and later in the script setflag 0x240.
Quote:

Originally Posted by thetribemaster (Post 3412439)
Code:

#org $start
checkflag 0x828
if B_true goto $done
message $wait
boxset 6
applymovement 0x01 $move
pausemove 0x0
applymovement 0xFF $youmove
pausemove 0x0
message $poke
boxset 6
applymovement 0x01 $move2
release
end

$done
release
end

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

#org $youmove
#raw 0x17 0xFE

#org $move2
#raw 0x20 0x20 0x20 0x1E 0xFE

#org $wait
$wait 1 = WAIT!!!!

#org $poke
$poke 1 = You need a pokemon to go\nout!



Maybe it will work if you write it like this:

Code:

#org $start
checkflag 0x828
if B_true goto $done
message $wait
$wait 1 = WAIT!
boxset 6
applymovement 0x01 $move
pausemove 0x0
applymovement 0xFF $youmove
pausemove 0x0
message $poke
$poke 1 = You need a pokemon to go\nout!
boxset 6
applymovement 0x01 $move2
pausemove 0x0
release
end

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

#org $move2
#raw 0x20 0x20 0x20 0x1E 0xFE

#org $youmove
#raw 0x17 0xFE

#org $done
release
end


It's your script from the first page, don't know what to do in the one you just postet. You wrote it too complicated, if you write all the ckeckflags in a row it's more complicated. It could be easier ^^

But I hope at least this will work.
If not, check if the unknown and the var.number in AM are REALLY right.
It should work.

Pokepal2007 March 22nd, 2008 11:05 AM

ok i will try that then :) :)

thetribemaster March 22nd, 2008 12:18 PM

Also the

#org $name
call 0x1A74EB
return

just changed a couple of tiles... and namepokemon doesnt work

Master_Track March 22nd, 2008 12:40 PM

Quote:

Originally Posted by thetribemaster (Post 3422330)
Also the

#org $name
call 0x1A74EB
return

just changed a couple of tiles... and namepokemon doesnt work

I'm not sure what the problem is but...did you write gosub $name or goto $name
afaik you have to write gosub.

Pokepal2007 March 22nd, 2008 1:53 PM

im gunna start a game for script testing.

thetribemaster March 22nd, 2008 2:50 PM

I did, this is the script I'm using it in:

Code:

#org $start
lock
checkflag 0x201
if B_false goto $done
checkflag 0x828
if B_true goto $1
#raw 0x75 0x98 0x00 0x0A 0x03
message $info
boxset 6
message $takeit
boxset 5
compare LASTRESULT 1
if B_true goto $getpoke
#raw 0x76
release
end

#org $info
$info 1 = Its the Leaf Pokemon Chikorita!

#org $takeit
$takeit 1 = Take the grass type Chikorita?

#org $getpoke
setflag 0x828
givepokemon 152 5 0
#raw 0x76
fanfare 0x13E
message $recieved
boxset 4
waitfanfare
#raw 0x68
message $rename
boxset 5
compare LASTRESULT 1
if B_true gosub $name
#raw 0x53 0x0F 0x80
release
end

#org $recieved
$recieved 1 =You got a CHIKORITA!

#org $rename
$rename 1 = Rename Chikorita?

#org $name
call 0x1A74EB
return

#org $1
message $gotit
boxset 6
release
end

#org $gotit
$gotit 1 =You already have a Pokemon!

#org $done
message $pokeball
boxset 6
release
end

#org $pokeball
$pokeball 1 =It's a pokeball!



/Circa March 23rd, 2008 1:42 AM

I don't want to go over the whole script, because I myself might make some errors. (i've been using scriptEd)

But your main problem is your paragraphs.
Messages always go after the main scripts, so you might want to re arrange everything.

Dingo01930 March 24th, 2008 2:08 AM

1 Attachment(s)
What a comprehensive thread on Pokescript!!
Well Done!!

And I've a very basic problem.......
I try to add a persion on PALLET TOWN and involves only simple dialogue,
But the result shown is not my expectation.... My script is

Code:

#org $start
lock
faceplayer
message $1
boxset 6
release
end

#org $1
$1 1 =Hi.\nWelcome to our town!


But the result comes is a dialogue with unidentified symbol(attachment shown).......

~~ HELP ME PLZ ~~

Master_Track March 24th, 2008 3:04 AM

It's NOT a mistake in the script, I'm sure.
You made a mistake compiling it into the script.

First, rightclick on the rubikon file.
Click compile
Klick destination and choose you Rom
Then click the blue book or whatever
Klick the searching symbol
Then click the FIRST of the five numbers shown
klick assign
Then, there should be your $s, all marked blue.
Klick file-burn
Scroll up to the first number shown (should be"pushed $start to NUMBER)
Copy the number and insert it in AM as offset


If you did this correct it should work, there is no mistake in your script.

e: did you use a japanese version? I'm not sure if it works with those.

Shadow Arcanine March 24th, 2008 3:51 AM

1 Attachment(s)
hm, i've got a very big problem, all scripts that i made turns always into a red screen, so i tested it by coping exectly the give pokemon script of thex4 in the first post. but when i click burn, there is a message (attachement) and i don't know what to do. this come for every script from $done to $5. i think maybe that's my problem, could someone help me please?
and sry for my bad english...

Master_Track March 24th, 2008 3:58 AM

well maybe just a grammatical mistake ;)
The problem is, no pointer leads to the $ in your image.
If you post the whole script here I may be able to tell you whats wrong. But this IS a mistake inside the script.

well maybe just a grammatical mistake ;)
The problem is, no pointer leads to the $ in your image.
If you post the whole script here I may be able to tell you whats wrong. But this IS a mistake inside the script.

edit:
i found a mistake inside the script :
Code:

#org $start
checkflag 0x828
if b_true goto $done
message $1
boxset 5
compare LASTRESULT 0x1
if b_true goto $take
message $2
boxset 6
release
end

#org $take
givepokemon 4 5 0
fanfare 0x13E
message $3
boxset 4
waitfanfare
#raw 0x68
setflag 0x828
message $4
boxset 5
compare LASTRESULT 0x1
if b_true gosub $name
message $5
boxset 6
release
end

#org $name
call 0x1A74EB
return

#org $1
$1 1 =I'm sorry, I can't take care\nof my Charmander.\pCan you take care of it for me?

#org $2
$2 1 =That's okay. I'm sure someone\nelse will take it.

#org $3
$3 1 =\c\h01\h02You received a Charmander!

#org $4
$4 1 =\c\h01\h02Would you like to rename Charmander?

#org $5
$5 1 =Take Care of Charmander.


There is no #org $done existing.
So add at the end just an

#org $done
message $gotit
$gotit 1 = Is Charmander allright?
boxset 6
release
end

Shadow Arcanine March 24th, 2008 4:05 AM

ok my script looks now like this after i rename it to .rbc:

checkflag 0x828\par
if b_true goto $done\par
message $1\par
boxset 5\par
compare LASTRESULT 0x1\par
if b_true goto $take\par
message $2\par
boxset 6\par
release\par
end\par
\par
#org $take\par
givepokemon 4 5 0\par
fanfare 0x13E\par
message $3\par
boxset 4\par
waitfanfare\par
#raw 0x68\par
setflag 0x828\par
message $4\par
boxset 5\par
compare LASTRESULT 0x1\par
if b_true gosub $name\par
message $5\par
boxset 6\par
release\par
end\par
\par
#org $name\par
call 0x1A74EB\par
return\par
\par
#org $1\par
$1 1 =I'm sorry, I can't take care\\nof my Charmander.\\pCan you take care of it for me?\par
\par
#org $2\par
$2 1 =That's okay. I'm sure someone\\nelse will take it.\par
\par
#org $3\par
$3 1 =\\c\\h01\\h02You received a Charmander!\par
\par
#org $4\par
$4 1 =\\c\\h01\\h02Would you like to rename Charmander?\par
\par
#org $5\par
$5 1 =Take Care of Charmander.\par
}

like i said before, it's exectly the script like in the first post, the givepokemon script. thank you for helping me!

Edit: ok thank you very much, i'll try it out!

Master_Track March 24th, 2008 4:07 AM

write this:

Code:

#org $start
checkflag 0x828
if b_true goto $done
message $1
boxset 5
compare LASTRESULT 0x1
if b_true goto $take
message $2
boxset 6
release
end

#org $take
givepokemon 4 5 0
fanfare 0x13E
message $3
boxset 4
waitfanfare
#raw 0x68
setflag 0x828
message $4
boxset 5
compare LASTRESULT 0x1
if b_true gosub $name
message $5
boxset 6
release
end

#org $name
call 0x1A74EB
return

#org $1
$1 1 =I'm sorry, I can't take care\nof my Charmander.\pCan you take care of it for me?

#org $2
$2 1 =That's okay. I'm sure someone\nelse will take it.

#org $3
$3 1 =\c\h01\h02You received a Charmander!

#org $4
$4 1 =\c\h01\h02Would you like to rename Charmander?

#org $5
$5 1 =Take Care of Charmander.

#org $done
message $gotit
$gotit 1 = Is Charmander allright?
boxset 6
release
end


Und btw, wenn dus auf deutsch suchst: Ich habs in einem andren Forum übersetzt ^^
Ich brauch aber noch einen beitrag um links schreiben zu dürfen...
äh I mean, if you need it I translated it with permission of thethethethe into german on another board, but I'm not allowed to give links until I wrote 15 posts ^^

Shadow Arcanine March 24th, 2008 4:21 AM

ok, thank you it works perfekt! maybe thethethethe should chance this script on the first post to the correct one! and no, thank you, but i don't need the scripts in german, but it's a good idea for german hackers like myself!^^

Dingo01930 March 24th, 2008 4:22 AM

Quote:

Originally Posted by Master_Track (Post 3427702)
It's NOT a mistake in the script, I'm sure.
You made a mistake compiling it into the script.

First, rightclick on the rubikon file.
Click compile
Klick destination and choose you Rom
Then click the blue book or whatever
Klick the searching symbol
Then click the FIRST of the five numbers shown
klick assign
Then, there should be your $s, all marked blue.
Klick file-burn
Scroll up to the first number shown (should be"pushed $start to NUMBER)
Copy the number and insert it in AM as offset


If you did this correct it should work, there is no mistake in your script.

e: did you use a japanese version? I'm not sure if it works with those.

I've followed your step but still the unidentified symbol has shown..... = ="
Maybe my ROM has problem??
My ROM is Fire Red (U).......
Or my PkmAdv database has problem??
Many Thx for your help~

Master_Track March 24th, 2008 4:32 AM

Quote:

Originally Posted by Shadow Arcanine (Post 3427835)
ok, thank you it works perfekt! maybe thethethethe should chance this script on the first post to the correct one! and no, thank you, but i don't need the scripts in german, but it's a good idea for german hackers like myself!^^

(I think you didn't understand me right, not the scripts are in german but the tutorial itself, so only the explanation. It may be easier for german /austrian people (like me ^^).And if you understood me right...well, doesn't matter huh?xD)

@ dingo:
I had the same problem, my person always said " ÁÈ Ì

Make sure there aren't any spaces between the $ and the numbers (in Advance Map, the offset).
And no Space before the $ too.
My problem was solved when I really focused on the spaces and the steps when compiling the script.

Shadow Arcanine March 24th, 2008 4:41 AM

oh man, i've got the same problem over and over again.. now i've put a simple script:

#org $start
lock
faceplayer
message $goodday
boxset 6
release
end

#org $goodday
$goodday 1 =Hi.\nit's a good day, isn't it?
and now the same problem: floating pointer must be pushed, is there any mistake in this script? i can't found anyone.

Dingo01930 March 24th, 2008 4:57 AM

I've checked my script very carefully whether there are mistakes on spaces.
but my problem still exists.......
Very desperate.......

Master_Track March 24th, 2008 5:02 AM

Quote:

Originally Posted by Shadow Arcanine (Post 3427898)
oh man, i've got the same problem over and over again.. now i've put a simple script:

#org $start
lock
faceplayer
message $goodday
boxset 6
release
end

#org $goodday
$goodday 1 =Hi.\nit's a good day, isn't it?
and now the same problem: floating pointer must be pushed, is there any mistake in this script? i can't found anyone.

the script is right, I can't see a mistake -.-'
If you followed the steps I wrote before (compiling) and didn't do any spaces when inserting the offset, it really should work.
Maybe you should re-install Pokescript and the PkmnAdv?

@dingo:
oh man, don't have an idea of what could be wrong now -.-
Sorry but it seems I can't help you with that.

thethethethe March 24th, 2008 5:08 AM

Sorry, my internet is playing up and I can't multiquote.

@Master_Track:
Thanks for spotting the error, it's fixed now. In all that typing, I was bound to make at least one. Also, thanks for answering people's questions.

@Dingo01930:
I'd say re-install pokescript. I compiled and tried your script, without any troubles.

@Shadow Arcanine
Ummm... same as Dingo01930, I compiled your script, and it worked fine. All I can say is just try and re-install pokescript.

Shadow Arcanine March 24th, 2008 5:31 AM

ok thank you thex4, i reinstalled pokescript, now it works perfectly, thank you very much!


All times are GMT -8. The time now is 9:06 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.