Script Help Thread (DO NOT REQUEST SCRIPTS) Page 176

Started by HackMew December 20th, 2008 5:10 AM
  • 625760 views
  • 9682 replies
Male
Seen August 27th, 2012
Posted August 22nd, 2012
687 posts
13.1 Years
Josh,

the third badge is activated if you set a flag 0x822 (setflag 0x822). In order to check whether you have or have not obtained the third badge, you use this:

...
...
checkflag 0x822 ' checks whether you have the third badge
if 0x1 goto @third_badge ' if you have it goto @third_badge
....
....
....
end

#org @third_badge
givepokemon command (I'm sure you know it)
....
end

etc...
Chad -
Male
Seen August 27th, 2014
Posted October 24th, 2013
79 posts
12.9 Years
'-----------------------
#org 0x90056A
lock
faceplayer
checkflag 0x822
if 0x1 goto 0x8900971
if 0x0 goto 0x890098F
release
end

'-----------------------
#org 0x900971
givepokemon 0x102 0x15 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
setflag 0x828
msgbox 0x890015E '"You have the THUNDER BADGE.\nYou mu..."
end

'-----------------------
#org 0x90098F
cmdC3 0x0


'---------
' Strings
'---------
#org 0x90015E
= You have the THUNDER BADGE.\nYou must be a well rounded\ptrainer.\nTake this POKeMHow is that MUDKIP?

i made a test script for this but it did not work sadly:\. I went up to the person i hit a and they face me but they dont talk or lock my players sprite or any of that
Age 28
Seen April 7th, 2014
Posted April 2nd, 2014
3,977 posts
15.8 Years
'-----------------------
#org 0x90056A
lock
faceplayer
checkflag 0x822
if 0x1 goto 0x8900971
if 0x0 goto 0x890098F
release
end

'-----------------------
#org 0x900971
givepokemon 0x102 0x15 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
setflag 0x828
msgbox 0x890015E '"You have the THUNDER BADGE.\nYou mu..."
end

'-----------------------
#org 0x90098F
cmdC3 0x0


'---------
' Strings
'---------
#org 0x90015E
= You have the THUNDER BADGE.\nYou must be a well rounded\ptrainer.\nTake this POKeMHow is that MUDKIP?

i made a test script for this but it did not work sadly:\. I went up to the person i hit a and they face me but they dont talk or lock my players sprite or any of that
'-----------------------
#org 0x90056A
lock
faceplayer
checkflag 0x822
if 0x1 goto 0x8900971
if 0x0 goto 0x890098F
release
end

'-----------------------
#org 0x900971
givepokemon 0x102 0x15 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
setflag 0x828
msgbox 0x890015E '"You have the THUNDER BADGE.\nYou mu..."
end

'-----------------------
#org 0x90098F
cmdC3 0x0


'---------
' Strings
'---------
#org 0x90015E
= You have the THUNDER BADGE.\nYou must be a well rounded\ptrainer.\nTake this POKeMHow is that MUDKIP?
Cross-outs are unnecessary parts.
Male
Seen August 27th, 2014
Posted October 24th, 2013
79 posts
12.9 Years
'-----------------------
#org 0x90059A
lock
faceplayer
checkflag 0x822
if 0x1 goto 0x8900971
msgbox 0x8900A2F '"I found a sick POKeMON ,but\ni dont..."
callstd 0x6
release
end

'-----------------------
#org 0x900971
givepokemon 0x102 0x15 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
setflag 0x822
msgbox 0x890015E '"You have the THUNDER BADGE.\nYou mu..."
end


'---------
' Strings
'---------
#org 0x900A2F
= I found a sick POKeMON ,but\ni dont trust anybody to raise\pit.

#org 0x90015E
= You have the THUNDER BADGE.\nYou must be a well rounded\ptrainer.\nTake this POKeMHow is that MUDKIP?

i think its perfect or at lease looks like it, but there is the final result. thanks a million guys!
Age 36
Female
UK
Seen February 24th, 2018
Posted December 26th, 2012
58 posts
18.7 Years
I'm guessing the hidesprite is necessary. And, why do you always use the MSG_KEEPOPEN followed by a closeonkeypress?
You could always do something simple like this:
msgbox @outro 0x4
It's the way I was taught I guess! Anyways, thanks for the info.
Some signature, or something!

colcolstyles

Yours truly

Male
The Bay Area
Seen May 18th, 2019
Posted August 13th, 2012
1,588 posts
15 Years
How do I make 2 level scripts on one map work? The first one I have works, but the second one wont activate.
AdvanceMap will only allow one level script of each type but there is a way to have two or more. However, you won't be able to access any of them except the first one via AdvanceMap. This is why you can't simply open up most of the level scripts in the player's house in R/S/E.

Open up AdvanceMap and go the map that you want to add the two level scripts two. Go to the "Header" tab and switch to "Professional Header View" (Control + H). Copy the address in the "Map Script offset" field. Now open up your hex editor and navigate to the address that was in the "Map Script offset" field. You should see some data formatted like this:

[Level script type (byte)] [Pointer (word)]

Find the pointer after the '0x02' as that's most likely the type of level script that you want two of. If not, then choose the appropriate one. Next, go to the address that the pointer points to. You'll see some data like this:

[Variable (halfword)] [Value (halfword)] [Script address (word)] ...

For example, for the male player's house in Emerald, I found this:

924003003C781F08

...which, when formatted correctly, looks like this:

0x4092 0x0003 0x081F783C

So that would mean that if the variable 0x4092 contains 0x0003 when the map is loaded, the script at 0x081F783C will be run. To add more than one, just add another string of 8 bytes with the variable, value, and script address. For example, in that same house there are also two other scripts that will run if 0x4092 is 0x0005 and 0x0006 respectively, not to mention a couple others for other situations. Put a '0x00' afterwards which, I think, ends the table. Hope that helps!

Brother of Vrai

x Necromorph x

Super Saiyan 4

Age 29
Male
Kanto
Seen July 28th, 2013
Posted November 21st, 2012
295 posts
13 Years
AdvanceMap will only allow one level script of each type but there is a way to have two or more. However, you won't be able to access any of them except the first one via AdvanceMap. This is why you can't simply open up most of the level scripts in the player's house in R/S/E.

Open up AdvanceMap and go the map that you want to add the two level scripts two. Go to the "Header" tab and switch to "Professional Header View" (Control + H). Copy the address in the "Map Script offset" field. Now open up your hex editor and navigate to the address that was in the "Map Script offset" field. You should see some data formatted like this:

[Level script type (byte)] [Pointer (word)]

Find the pointer after the '0x02' as that's most likely the type of level script that you want two of. If not, then choose the appropriate one. Next, go to the address that the pointer points to. You'll see some data like this:

[Variable (halfword)] [Value (halfword)] [Script address (word)] ...

For example, for the male player's house in Emerald, I found this:

924003003C781F08

...which, when formatted correctly, looks like this:

0x4092 0x0003 0x081F783C

So that would mean that if the variable 0x4092 contains 0x0003 when the map is loaded, the script at 0x081F783C will be run. To add more than one, just add another string of 8 bytes with the variable, value, and script address. For example, in that same house there are also two other scripts that will run if 0x4092 is 0x0005 and 0x0006 respectively, not to mention a couple others for other situations. Put a '0x00' afterwards which, I think, ends the table. Hope that helps!

Alright, thank you! I had no idea AdvanceMap only allows one of each type. I'll be trying this out for sure.


My Favorite Legendaries
Male
Philippines
Seen April 4th, 2011
Posted August 14th, 2010
14 posts
13.1 Years
in fr/lg, how will i create a rival battle like, he will walk to you then he will battle then after the battle he will say something and then he will just walk away? help pls! =))
I really need help.
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.

0m3GA ARS3NAL

Im comin' home...

Age 30
Male
Superjail Penitentiary
Seen February 25th, 2023
Posted September 12th, 2013
1,816 posts
15.3 Years
in fr/lg, how will i create a rival battle like, he will walk to you then he will battle then after the battle he will say something and then he will just walk away? help pls! =))
I really need help.
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.
You already got an answer on this page, scroll up and read it.
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>

yugimon121

3 hearts and failing in battle

Male
Ireland!!
Seen June 23rd, 2011
Posted February 10th, 2011
25 posts
13 Years
in fr/lg, how will i create a rival battle like, he will walk to you then he will battle then after the battle he will say something and then he will just walk away? help pls! =))
I really need help.
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.
do you use pokescript? if so i can help
if you use XSE, im afraid im no good
"Bonnie: Somebody save him, he can't swim!
Peter: Oh, he's not even kicking. Kick Joe, kick.
Lois: Peter, he's a paraplegic!
Peter: That doesn't mean he can't hear. Kick Joe, kick!"

Peter: Oh my god, Brian, there's a message in my Alphabits. It says, 'Oooooo.'
Brian: Peter, those are Cheerios.

Peter - I'm afraid I have some very bad news, your wife's gonna be a vegetable. You're gonna have to bathe her, feed her, and care for her for the rest of your life.
Guy - OH MY GOD!
Peter - No no no, I'm just kiddin. She's dead.
Male
Philippines
Seen April 4th, 2011
Posted August 14th, 2010
14 posts
13.1 Years
YES!! im using pokescript! help me please!
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.

WHAT'S THE PROBLEM IN THIS SCRIPT??
THIS IS A RIVAL SCRIPT..
AND ALSO POKESCRIPT..
HELP APPRECIATED!!




#ORG $begin
jingle
checkflag 0x200
if B_true goto $done
applymovement 0x04 $rivalwalk
pausemove 0
message $rivaltalk
$momtalk 1=Let's battle!
boxset 6
trainerbattle 1 0x003
applymovement 0x04 $rivalwalkback
pausemove 0
setflag 0x200
removesprite 4
release
end

#org $done
release
end

#org $rivalwalk
$momwalk 1 ; 0x10 0x10 0x10 0x13 0x13 0x13 0xFE

#org $rivalwalkback
$momwalkback 1 ; 0x12 0x12 0x12 0x11 0x11 0x11 0xFE


I really need help.
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.

yugimon121

3 hearts and failing in battle

Male
Ireland!!
Seen June 23rd, 2011
Posted February 10th, 2011
25 posts
13 Years
WHAT'S THE PROBLEM IN THIS SCRIPT??
THIS IS A RIVAL SCRIPT..
AND ALSO POKESCRIPT..
HELP APPRECIATED!!




#ORG $begin
jingle
checkflag 0x200
if B_true goto $done
applymovement 0x04 $rivalwalk
pausemove 0
message $rivaltalk
$momtalk 1=Let's battle!
boxset 6
trainerbattle 1 0x003
applymovement 0x04 $rivalwalkback
pausemove 0
setflag 0x200
removesprite 4
release
end

#org $done
release
end

#org $rivalwalk
$momwalk 1 ; 0x10 0x10 0x10 0x13 0x13 0x13 0xFE

#org $rivalwalkback
$momwalkback 1 ; 0x12 0x12 0x12 0x11 0x11 0x11 0xFE
well for no.1
message $rivaltalk
$momtalk 1=Let's battle!
where did momtalk come in? :p
it should be
message $rivaltalk
$rivaltalk 1 = Let's battle
ill pm u the rest or else itd be too long
"Bonnie: Somebody save him, he can't swim!
Peter: Oh, he's not even kicking. Kick Joe, kick.
Lois: Peter, he's a paraplegic!
Peter: That doesn't mean he can't hear. Kick Joe, kick!"

Peter: Oh my god, Brian, there's a message in my Alphabits. It says, 'Oooooo.'
Brian: Peter, those are Cheerios.

Peter - I'm afraid I have some very bad news, your wife's gonna be a vegetable. You're gonna have to bathe her, feed her, and care for her for the rest of your life.
Guy - OH MY GOD!
Peter - No no no, I'm just kiddin. She's dead.
Male
somewhere
Seen November 29th, 2016
Posted June 25th, 2013
82 posts
12.9 Years
help
#dynamic 0x80007C

#org @start
lockall
applymovement 0xFF @move
waitmovement 0xFF
msgbox @haha 0x6
applymovement 0x4 @move2
waitmovement 0x4
msgbox @what 0x6
setvar 0x6000 0x1
releaseall
end

#org @move
#raw 0x62 0xFE

#org @haha
= ???:hahaha i created a..!\nOh no i'm late!\pIhave to go!

#org @move2
#raw 0x60 0xFE

#org @what
= [PLAYER]:who was that?!\nHe left something\pI'll check!

when i step on the script the ! pops and then the ??? person disapears and nothing happens then..Why?and when i went to a another map and go back the ??? person is again there why?Help!!

yugimon121

3 hearts and failing in battle

Male
Ireland!!
Seen June 23rd, 2011
Posted February 10th, 2011
25 posts
13 Years
Why wouldnt you use a flag...
checkflag checks to see if it has happened and setflag makes it not happen again
i may be mitaken, but i think a setvar makes an event happen a specific amount of times, atleast thats what i learned on my experience with pokescript
"Bonnie: Somebody save him, he can't swim!
Peter: Oh, he's not even kicking. Kick Joe, kick.
Lois: Peter, he's a paraplegic!
Peter: That doesn't mean he can't hear. Kick Joe, kick!"

Peter: Oh my god, Brian, there's a message in my Alphabits. It says, 'Oooooo.'
Brian: Peter, those are Cheerios.

Peter - I'm afraid I have some very bad news, your wife's gonna be a vegetable. You're gonna have to bathe her, feed her, and care for her for the rest of your life.
Guy - OH MY GOD!
Peter - No no no, I'm just kiddin. She's dead.