The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   [Archive] Script help thread (https://www.pokecommunity.com/showthread.php?t=120081)

Kenneth Alog April 4th, 2008 6:39 PM

Can anyone give me a list of trainers in P.E.T (in hex) i'm going to script.

Jirachi_961 April 4th, 2008 7:24 PM

Hey guys, im working with a give pokemon script, but it isnt working for me.

The scenerio:

When i click on the character, he asks me if i want the pokemon fine. Then when i say yes, it says congrats you got the poke, would you like to name it? If i say no, it says the right txt. If i say yes, it lets me name a pokemon that is a big ? pokemon, and not the right pokemon. If i say no to the man asking if i want the pokemon though, it freezes and then pops up a yes and no box again, and if i press no it releases me.

I know i have a huge mistake, does anyone know what it is?

Spoiler:

#org $GivJir
message $Jirachi
$Jirachi 1 = Hey kid, hold this for me for a second.
boxset 5
compare LASTRESULT 1
if B_False goto $no
givepokemon 409 5 0
jingle
message $gotjir
$gotjir 1 = You Recieved a weird pokemon...\lIts the Bby Jirachi!!
boxset 6
message $NameChick
$NameChick 1 = Would You like to give\l BbyJIRACHI a nickname?
boxset 5
compare LASTRESULT 1
if b_False goto $noname
Namepokemon
message $noname
end
#org $no
message $PutBack
$PutBack 1 = Grrr...
boxset 6
end
#org $noname
message $man
$man 1 = Now go away.
boxset 6
end


To save room, i put it in the spoiler. Thanks for any help.

Geeked April 4th, 2008 7:42 PM

Try this...

Code:

#org $GivJir
message $Jirachi
$Jirachi 1 = Hey kid, hold this for me for a second.
boxset 5
compare LASTRESULT 1
if B_False goto $no
givepokemon 409 5 0
jingle
message $gotjir
$gotjir 1 = You Recieved a weird pokemon...\lIts the Bby Jirachi!!
boxset 6
message $NameChick
$NameChick 1 = Would You like to give\l BbyJIRACHI a nickname?
boxset 5
compare LASTRESULT 0x1
if b_true gosub $name
message $noname
boxset 6
release
end

#org $name
call 0x1A74EB
return

#org $no
message $PutBack
$PutBack 1 = Grrr...

#org $noname
$noname 1 = Now go away.



Jirachi_961 April 4th, 2008 7:51 PM

Now, when i press no the first time it doesnt change text, but a "0 coins" icon comes up. But, its a step forward lol.

When i say yes, it says oh i recieved it, and nickname? if i say no, then it says the right txt, but no poke still. If i say yes, then it brings me to a screen where i have to name a ? poke again, and then i still dont get it.

but its still better then before, thanks xray.

Geeked April 4th, 2008 9:47 PM

What are you using? Fire Red, Ruby, Sapphire, etc.?

Quilava's Master April 4th, 2008 10:05 PM

I reli need this script revised. I want it so that when you talk to the person she asks if ur redi for the quiz if u say yes she asks the first question if u say no she tells u to take your time. Also i want so that after one question she goes to the next til she reaches number three...i cannot progress anymore without this script

Spoiler:
#org $start
lock
faceplayer
message $quiz
$quiz 1 = Ms Hanley: Tardy again?\n\v\h01: Sorry.\pMs Hanley: Hmp.\nAre you ready for the quiz?
boxset 5
compare LASTRESULT B_TRUE
if B_False goto $notredi
setflag 0x203
checkflag 0x203
if B_true goto $next
message $Laugh
$Laugh 1 = Ms. Hanley: Let's begin!
Boxset 6
release
end

#org $next
lock
faceplayer
message $1
boxset 5
compare LASTRESULT
if B_false goto $next2
if B_true goto $done
release
end

#org $next2
lock
faceplayer
message $2
boxset 5
compare LASTRESULT
if B_true goto $final
if B_false goto $done
release
end

#org $final
lock
faceplayer
message $3
boxset 5
compare LASTRESULT
if B_true goto $pass
if B_false goto $done
release
end

#org $pass
lock
faceplayer
checkflag 0x207
if B_true goto $here
message $4
boxset 6
release
end

#org $here
lock
faceplayer
message $5
boxset 6
setflag 0x829
release
end

#org $done
lock
faceplayer
message $wrong
release
end

#org $notredi
lock
faceplayer
message $tyme
$tyme 1 = Ms Hanley: Take your time...
boxset 6
release
end

#org $wrong
$wrong 1 = WRONG! \nYou fail but you may try again within this hour.

#org $1
$1 1 = Charmander evolves to Charmeleon at level 18?

#org $2
$2 1 = Porygon evolves twice?

#org $3
$3 1 = Finally.\nThere are no such things as Sub Leaders.

#org $4
$4 1 = Ms Hanley: You pass \v\h01!.\nBut now you must battle Scarlet for your Pokedex!

#org $5
$5 1 = \v\h01: I won!\nMs. Hanley: You did...Now you may\lbegin your journey now.

Jirachi_961 April 4th, 2008 10:34 PM

Quote:

Originally Posted by xray (Post 3468358)
What are you using? Fire Red, Ruby, Sapphire, etc.?

Fire Red, do i have to input different numbers or something?

Neti April 5th, 2008 2:23 AM

hi this question might have been asked before, but i couldnt find an answer in the forum:
how do i manage not to switch sprites after a wildbattle? i mean when you get out of a battle and suddenly are another person...

Piplup-Trainer April 5th, 2008 3:04 PM

Quote:

Originally Posted by Night_Blue (Post 3463372)
A script like that would take long.
You have to make new trainers and give them a setflag
(Or the checktrainer command which I never used)

#org $start
checkflag 0x200
if B_true goto $done
message $the
$the 1 = We're still not in Vermillion City.
boxset 6
release
end

#org $done
message $we
$we 1 = We arrived at Vermillion.
boxset 6
applymovement 0x__ $2
pausemove 0
release
end

#org $2
$2 1 ; #binary 0x12 0x00 0xFE

How do I write down the checktrainer command?

TB Pro April 5th, 2008 5:43 PM

-Removed-
Fixed thanks to Twilite Darkrai. Go Twilite! You're so awesome!

Night_Blue April 5th, 2008 5:55 PM

Piplup Trainer : Look in thethethethe's tutorial,I think it's there,in special trainer commands

TB :
Code:

Code:
#ORG $begin
checkflag 0x202
if B_true goto $done
applymovement 0x01 $exe
pausemove 0
applymovement 0x01 $momwalk
message $momtalk
boxset 6
pausemove 0
message $playertalk
boxset 6
applymovement 0x01 $momwalk1
message $momtalk1
boxset 6
pausemove 0
message $playertalk1
boxset 6
applymovement 0xFF $playerwalk
pause 0x3
applymovement 0x01 $momwalk2
pausemove 0
message $momtalk2
boxset 6
applymovement 0x01 $momwalk3
applymovement 0xFF $playerwalk1
applymovement 0xFF $playerturn1
pausemove 0
message $momtalk3
boxset 6
applymovement 0x01 $momwalk4
applymovement 0xFF $playerwalk2
pausemove 0
setflag 0x202
warp 0x4 0x1 0x0
end

#ORG $done
release
end

#ORG $exe
#RAW 0x62 0xFE

#ORG $momwalk
#RAW 0x11 0x11 0xFE

#ORG $momtalk
$momtalk 1 = MOM: \c\h01\h04Oh \v\h01\.  Today is the\nday you were supposed to\pgo and visit dad isn't it?\nIt'll be okay, honey, I promise.

#ORG $playertalk
$playertalk 1 = .....................

#ORG $momwalk1
#RAW 0x12 0xFE

#ORG $momtalk1
$momtalk1 1 = MOM: \c\h01\h04I can't afford to.......

#ORG $playertalk1
$playertalk1 1 = \v\h01\: \v\h01\h06I'm Going with a POK\h1BMON\nOr without a POK\h1BMON.

#ORG $playerwalk
#RAW 0x10 0x10 0x13 0xFE

#ORG $momwalk2
#RAW 0x1D 0x20 0x1D 0x1D 0x1D 0x1D 0x20 0x4A 0xFE

#ORG $momtalk2
$momtalk2 1 = MOM: \c\h01\h04Don't Be so reckless \v\h01.\nYou might get hurt with no POK\h1BMON.

#ORG $playerturn
#RAW 0x01 0xFE

#ORG $momwalk3
#RAW 0x11 0x11 0x11 0xFE

#ORG $playerwalk1
#RAW 0x11 0x11 0x11 0xFE

#ORG $playerturn1
#RAW 0x04 0xFE

#ORG $momtalk3
$momtalk3 1 = MOM: \v\h01\h04Oh, \v\h01, plese don't get\nhurt. I don't want you to get\phurt like your bro.........\nWell just don't get hurt!\pPromise me that you won't\ntravel into the grass without\pa POK\h1BMON!

#ORG $momwalk4
#RAW 0x12 0xFE

#ORG $playerwalk2
#RAW 0x10 0x10 0x10 0x10 0x12 0x04 0xFE



HackMew April 5th, 2008 5:57 PM

Quote:

Originally Posted by TB Pro! (Post 3471820)
Okay, I have an error(long time since I posted that in here XD!). When I compile my script, it gets about 3/4 of the way down it, and then it pops up an error that says: Run-Time error 457
This key is already associated with an element of this collection. I, along with Twilite Darkrai, checked it over many times, and found no errors that would cuse this.

Here is the script:
Spoiler:
Code:

#ORG $begin
checkflag 0x202
if B_true goto $done
applymovement 0x01 $exe
pausemove 0
applymovement 0x01 $momwalk
message $momtalk
boxset 6
pausemove 0
message $playertalk
boxset 6
applymovement 0x01 $momwalk1
message $momtalk1
boxset 6
pausemove 0
message $playertalk1
boxset 6
applymovement 0xFF $playerwalk
pause 0x3
applymovement 0x01 $momwalk2
pausemove 0
message $momtalk2
boxset 6
applymovement 0x01 $momwalk3
applymovement 0xFF $playerwalk1
applymovement 0xFF $playerturn1
pausemove 0
message $momtalk3
boxset 6
applymovement 0x01 $momwalk4
applymovement 0xFF $playerwalk2
pausemove 0
setflag 0x202
warp 0x4 0x1 0x0
end

#ORG $done
release
end

#ORG $exe
#RAW 0x62 0xFE

#ORG $momwalk
#RAW 0x11 0x11 0xFE

#ORG $momtalk
$momtalk 1 = MOM: \c\h01\h04Oh \v\h01\.  Today is the\nday you were supposed to\pgo and visit dad isn't it?\nIt'll be okay, honey, I promise.

#ORG $playertalk
$playertalk 1 = .....................

#ORG $momwalk1
#RAW 0x12 0xFE

#ORG $momtalk1
$momtalk 1 = MOM: \c\h01\h04I can't afford to.......

#ORG $playertalk1
$playertalk1 1 = \v\h01\: \v\h01\h06I'm Going with a POK\h1BMON\nOr without a POK\h1BMON.

#ORG $playerwalk
#RAW 0x10 0x10 0x13 0xFE

#ORG $momwalk2
#RAW 0x1D 0x20 0x1D 0x1D 0x1D 0x1D 0x20 0x4A 0xFE

#ORG $momtalk2
$momtalk2 1 = MOM: \c\h01\h04Don't Be so reckless \v\h01.\nYou might get hurt with no POK\h1BMON.

#ORG $playerturn
#RAW 0x01 0xFE

#ORG $momwalk3
#RAW 0x11 0x11 0x11 0xFE

#ORG $playerwalk1
#RAW 0x11 0x11 0x11 0xFE

#ORG $playerturn1
#RAW 0x04 0xFE

#ORG $momtalk3
$momtalk3 1 = MOM: \v\h01\h04Oh, \v\h01, plese don't get\nhurt. I don't want you to get\phurt like your bro.........\nWell just don't get hurt!\pPromise me that you won't\ntravel into the grass without\pa POK\h1BMON!

#ORG $momwalk4
#RAW 0x12 0xFE

#ORG $playerwalk2
#RAW 0x10 0x10 0x10 0x10 0x12 0x04 0xFE



Well, after adjusting the script to work with XSE, it got compiled perfectly. The only suggestion I could give you is to replace "B_true" in the third line with a simple 0x1.

DarkFear April 5th, 2008 11:19 PM

I posted this in thethethethe's scripting tutorial, but I think that was the wrong thread.

After I compile the script, I go and test it in VBA. But when I talk to the person, a weird triangle appears in the top-right corner with a symbol in it. After that the game freezes. Any help?

Aquila April 6th, 2008 2:45 AM

Quote:

Originally Posted by xray (Post 3453575)
Okay guys! I fixed it, the movements were the wrong way, he was supposed to be walking left, not right! Thank You Aquila!

NP ;)

Anyway, I have a problem here... The warping script won't work.. Please help me..

#org $begin
checkflag 0x216
if b_true goto $done
message $1
boxset 6
Playsound 0x01B9
nop
applymovement 0xFF $A
pausemove 0
applymovement 0xFF $B
pausemove 0
message $2
boxset 6
checkgender
compare LASTRESULT 1
if B_true goto $boy
#raw 0x55 0x11 0x00
applymovement 0xFF $C
pausemove 0
applymovement 0x01 $E
pausemove 0
applymovement 0x02 $D
applymovement 0x03 $D
applymovement 0x04 $D
applymovement 0x09 $D
applymovement 0x0A $D
applymovement 0x0B $D
applymovement 0x0C $D
pausemove 0
message $3
boxset 6
applymovement 0x01 $F
pausemove 0
applymovement 0x02 $G
applymovement 0x03 $G
applymovement 0x04 $G
applymovement 0x09 $G
applymovement 0x0A $G
applymovement 0x0B $G
applymovement 0x0C $G
pausemove 0
setflag 0x216
warp 24 52 2
release
end

#org $boy
#raw 0x55 0x10 0x00
applymovement 0xFF $C
pausemove 0
applymovement 0x01 $E
pausemove 0
applymovement 0x02 $D
applymovement 0x03 $D
applymovement 0x04 $D
applymovement 0x09 $D
applymovement 0x0A $D
applymovement 0x0B $D
applymovement 0x0C $D
pausemove 0
message $3
boxset 6
applymovement 0x01 $F
pausemove 0
applymovement 0x02 $G
applymovement 0x03 $G
applymovement 0x04 $G
applymovement 0x09 $G
applymovement 0x0A $G
applymovement 0x0B $G
applymovement 0x0C $G
pausemove 0
setflag 0x216
warp 24 52 2
release
end


#org $done
#raw 0x53 0x01 0x00
#raw 0x53 0x02 0x00
#raw 0x53 0x03 0x00
#raw 0x53 0x04 0x00
#raw 0x53 0x09 0x00
#raw 0x53 0x0A 0x00
#raw 0x53 0x0B 0x00
#raw 0x53 0x0C 0x00
release
end

#org $1
$1 1 = Yes!\pIt's happening.

#org $2
$2 1 = GRUNT:Bring us back in time now.

#org $3
$3 1 = GRUNT: What the..?\pWhere did it go?

#org $A
$A 1 ; #binary 0x16 0x17 0x17 0x17 0x17 0x17 0x17 0x17 0x16 0xFE

#org $B
$B 1 ; #binary 0x16 0x16 0xFE

#org $C
$C 1 ; #binary 0x54 0x09 0x09 0x09 0x09 0x0A 0x0A 0x0A 0xFE

#org $D
$D 1 ; #binary 0x57 0xFE

#org $E
$E 1 ; #binary 0x54 0x08 0xFE

#org $F
$F 1 ; #binary 0x55 0xFE

#org $G
$G 1 ; #binary 0x56 0xFE

Ghost April 6th, 2008 2:59 AM

What happens?
When does the script freeze\not work

DARKFEAR : Show us the script

destinedjagold April 6th, 2008 3:21 AM

@ Aquila...
well, I have experienced some of my warping scripts won't work properly, or won't warp at all, mainly because, after looking through the problem, I always have a misspelled command like 'clearfalg' or puasemove' errors...

I saw in your script that the playsound lacks one more 'nop'...
Read thethethethe's tutorial why I said so...

Also, I'm not sure, but I think it should be 0x1B9, but if the music works well, then mind not this line...

Aquila April 6th, 2008 3:37 AM

EDIT: It did actually work (with 1 nop as well as with 2)... it was a level script that went wrong on the map I warped to...

Trogdor7190 April 6th, 2008 1:11 PM

I don't know if this is the right place to put this, but I couldn't find anyplace else.
For some reason, whenever you fight a custom made pokemon in my hack, it gives you a lot more xp than usual.

For example: whenever fighting a lv 2 wurmple, you get 15 xp.

BUT, whenever you fight a lv 2 Firesumo (an edited pokemon) you get anywhere from 100 to 200 xp.

Night_Blue April 6th, 2008 5:11 PM

Trogdor7190 :
That should be asked in Simple Questions thread.
Are you using Pep (Pokemon Editor Pro)
If so,then it's probably switching the catch rate and XP.
Try saving twice so it can switch back.

DarkFear April 6th, 2008 11:22 PM

Quote:

Originally Posted by Jolteon1 (Post 3473143)
What happens?
When does the script freeze\not work

DARKFEAR : Show us the script

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

#org $1
$1 1 =Hi.\nWelcome to Redport.


After I compile the script, I go and test it in VBA. But when I talk to the person, a weird triangle appears in the top-right corner with a symbol in it. After that the game freezes. Any help?

destinedjagold April 7th, 2008 1:03 AM

hm...
maybe it's because you forgot to put a space between the equal sign and the beginning text, which is 'Hi'... :\

Code:

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

#org $1
$1 1 =(put a space here)Hi.\nWelcome to Redport.


That's the only error I found in the script... :\

Master_Track April 7th, 2008 10:03 AM

hey there, I have a little problem.
I know how to make a healing script, but it doesn't help me with my problem:
After the hero fainted, he will be back in the house. But not next to his mother, just somewhere in the room. (btw his mother will be gone soon).
How can I make a script and use it, so that the hero will be warped into the house after he fainted? Where do I insert the script?
(I hope it's possible with pokescript...).

I know, the script would include warp commands and the healing special, that's not the problem. I just don't now where I have to insert it.

Geeked April 7th, 2008 8:39 PM

@destinejagold I never put a space there X_X and all my scripts come out fine :/ try recompiling, maybe it was a pokescript error

destinedjagold April 7th, 2008 9:49 PM

well, it opposite to mine. If there's no space, my scripts won't work properly... :\

Oh well... Here's a video of the script you were having trouble with, Shreyas...

Also, may I know what you gave it as it's filename?
If the filename has some symbols, it also causes the scripts not to work... :\

Larsie13 April 8th, 2008 3:21 AM

Is there a way to check if the player has already entered the HoF? Like with flags or something? Or a way to change where the player will be warped to when they beat the League?


All times are GMT -8. The time now is 2:35 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.