Script Help Thread (DO NOT REQUEST SCRIPTS) Page 217

Started by HackMew December 20th, 2008 5:10 AM
  • 625760 views
  • 9682 replies
Male
Israel
Seen October 17th, 2011
Posted March 22nd, 2011
4 posts
12.9 Years
okay this is in emerald and in XSE and the aim of the script is that a mew sprite asks to join the player in a yes/no box if the player says yes mew joins him and disapears from the overworld. the problem is that i always get a negative message. i didnt read all of the thread (but come on it would take days to read 217 pages.) so if there is an answer simply quote,
thanks in advance.

P.S:i already tried putting 0x0 instead of 0x1 and it didnt work.

Spoiler:

#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @request 0x5
if 0x1 goto @join
msgbox @wait 0x6
release
end

#org @join
givepokemon 0x97 0x5 0x1 0x0 0x0 0x0
hidesprite 0x800F
release
end

#org @request
= will you take me to your party?

#org @wait
= kk ill wait for another trainer

ashes to ashes
dust to dust
all because
in god we trust



73% of teenagers would cry if they saw Justin Bieber standing on top of a skyscraper about to jump. If you are the 27% sitting there with popcorn and 3D glasses, screaming "DO A BACKFLIP!" copy this as your signature!!!

Not all scars show, not all wounds heal Sometimes you can't always see The pain someone feels

Complans

Trainer

Seen August 27th, 2015
Posted April 11th, 2011
98 posts
13.1 Years
okay this is in emerald and in XSE and the aim of the script is that a mew sprite asks to join the player in a yes/no box if the player says yes mew joins him and disapears from the overworld. the problem is that i always get a negative message. i didnt read all of the thread (but come on it would take days to read 217 pages.) so if there is an answer simply quote,
thanks in advance.

P.S:i already tried putting 0x0 instead of 0x1 and it didnt work.

Spoiler:

#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @request 0x5
if 0x1 goto @join
msgbox @wait 0x6
release
end

#org @join
givepokemon 0x97 0x5 0x1 0x0 0x0 0x0
hidesprite 0x800F
release
end

#org @request
= will you take me to your party?

#org @wait
= kk ill wait for another trainer

Try this script:

Spoiler:
#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @request 0x5
compare LASTRESULT 0x1
if 0x1 goto @join
msgbox @wait 0x6
release
end

#org @join
givepokemon 0x97 0x5 0x1 0x0 0x0 0x0
hidesprite LASTTALKED
setflag 0x1005
setflag 0x860

release
end

#org @request
= will you take me to your party?

#org @wait
= kk ill wait for another trainer


I put in bold what you missed out.

Also, when you select 'yes', the Mew just dissapears and you gain control of the player again. You should add a msgbox that says "Mew joined your party!" or something/

And make sure to, in Advance Map, on the Mew sprite, look for Person ID and change it to 1005.

Oh, Collen and Spherical Ice, thanks for the help :)

--Post merge--

Now I'm having trouble..

This script asks the player if they have a Good Rod (obviously not) - if they say yes, the fisherman calls them lucky and the script ends. If they say no, the player gets a Old Rod and a message appears which will appear if you talk to him afterwards. The problem is, if the player chooses they do have a Good Rod and talk to him, the message that should appear after the player gets an Old Rod appears, and they can't get to the option selection again.

Script:
Spoiler:
#dynamic 0x810700

#org @begin
lock
faceplayer
checkflag 0x1008
compare LASTRESULT 0x1
if 0x1 goto @given
goto @endflag

#org @endflag
msgbox @talk 0x5
compare LASTRESULT 0x1
if 0x1 goto @lucky
msgbox @okay 0x6
giveitem 0x106 0x1 MSG_OBTAIN
setflag 0x1008
goto @given

#org @lucky
msgbox @lucky2 0x6
release

#org @given
lock
faceplayer
msgbox @ok 0x6
release
end

#org @talk
= Do you have a Good Rod?

#org @lucky2
= Lucky you! I only have a Old\nRod...

#org @okay
= Oh, that sucks. Here, have my Old\nRod!\pDon't worry, I'm getting a Good\nRod anyway.

#org @ok
= An Old Rod isn't as good as a\nGood Rod, but it still works.

destinedjagold

You can contact me in PC's discord server...

Age 32
Male
Seen 3 Days Ago
Posted March 24th, 2023
8,579 posts
16 Years
Now I'm having trouble..

This script asks the player if they have a Good Rod (obviously not) - if they say yes, the fisherman calls them lucky and the script ends. If they say no, the player gets a Old Rod and a message appears which will appear if you talk to him afterwards. The problem is, if the player chooses they do have a Good Rod and talk to him, the message that should appear after the player gets an Old Rod appears, and they can't get to the option selection again.

Script:
Spoiler:
#dynamic 0x810700

#org @begin
lock
faceplayer
checkflag 0x1008
compare LASTRESULT 0x1
if 0x1 goto @given
goto @endflag

#org @endflag
msgbox @talk 0x5
compare LASTRESULT 0x1
if 0x1 goto @lucky
msgbox @okay 0x6
giveitem 0x106 0x1 MSG_OBTAIN
setflag 0x1008
goto @given

#org @lucky
msgbox @lucky2 0x6
release

#org @given
lock
faceplayer
msgbox @ok 0x6
release
end

#org @talk
= Do you have a Good Rod?

#org @lucky2
= Lucky you! I only have a Old\nRod...

#org @okay
= Oh, that sucks. Here, have my Old\nRod!\pDon't worry, I'm getting a Good\nRod anyway.

#org @ok
= An Old Rod isn't as good as a\nGood Rod, but it still works.
Maybe it's because you forgot to add the 'end' command?
#org @lucky
msgbox @lucky2 0x6
release
end
If that doesn't work, then I am not sure.
Your script looks really fine.

Complans

Trainer

Seen August 27th, 2015
Posted April 11th, 2011
98 posts
13.1 Years


Maybe it's because you forgot to add the 'end' command?
#org @lucky
msgbox @lucky2 0x6
release
end
If that doesn't work, then I am not sure.
Your script looks really fine.
I originally had end but I removed it because I thought that was causing the problem.

Just tried it again, still not working :S

destinedjagold

You can contact me in PC's discord server...

Age 32
Male
Seen 3 Days Ago
Posted March 24th, 2023
8,579 posts
16 Years
I originally had end but I removed it because I thought that was causing the problem.

Just tried it again, still not working :S
Remove the command "compare LASTRESULT 0x1" in the @begin address...

Age 27
Male
Lafayette,Louisiana
Seen March 31st, 2011
Posted March 21st, 2011
2 posts
12.2 Years
I started editing fire red last week. But now I'm trying to make a more complex script.
I don't know how to though. Could someone help me?

I'm using Pokemon Script Editor IDE ...idk what it is.I just make the scripts and make sure I don't mess up.
I also have advance math and all the things that come with elite map.

p.s. to be more specific , i want a person to say something right after i walk into the building,then 6 others surround me,steel all my things and pokemon, a pikachu walk into the building, shoot the 7 others,the screen go black, then comes back with 7different sprites(that look like dead people),get all my stuff back,finally,the pikachu leaves and the scene is over.

Complans

Trainer

Seen August 27th, 2015
Posted April 11th, 2011
98 posts
13.1 Years
I started editing fire red last week. But now I'm trying to make a more complex script.
I don't know how to though. Could someone help me?

I'm using Pokemon Script Editor IDE ...idk what it is.I just make the scripts and make sure I don't mess up.
I also have advance math and all the things that come with elite map.

p.s. to be more specific , i want a person to say something right after i walk into the building,then 6 others surround me,steel all my things and pokemon, a pikachu walk into the building, shoot the 7 others,the screen go black, then comes back with 7different sprites(that look like dead people),get all my stuff back,finally,the pikachu leaves and the scene is over.
If you only started a week ago, you should try out XSE. It's more easier to use, user friendly, and has a built-in scripting guide.

As for your script, I don't think you can get 6 people to surround you (as there is only space for five people to go around you when you are at the entrance of a building). If by you mean Pikachu shooting with graphics, that would be very hard to implement (if possible). Taking away your Pokemon is not possible very hard, but seeing as it is a scene then you could just pretend it took your stuff away.

So yes, it is possible.

Also, if you choose to do XSE you should check out diegoisawesome's massive tutorial about XSE.

Good luck!
Age 27
Male
Lafayette,Louisiana
Seen March 31st, 2011
Posted March 21st, 2011
2 posts
12.2 Years
Yeah, I was planning on just adding text that said "They jacked ur stuff".no not with actual graphics of him shooting, just a sprite of him with a gun and then text that says chk chk BOOM. I don't know how to make the acual script. Like, what do I type in,command wise?

Complans

Trainer

Seen August 27th, 2015
Posted April 11th, 2011
98 posts
13.1 Years
Yeah, I was planning on just adding text that said "They jacked ur stuff".no not with actual graphics of him shooting, just a sprite of him with a gun and then text that says chk chk BOOM. I don't know how to make the acual script. Like, what do I type in,command wise?
Have a look at the thread I linked you to - everything you need to know to make your script is there. Start my looking at the first few scripts, understand what all the basic commands mean, and you'll soon be able to understand enough to be able to do your script :)
Male
Seen April 15th, 2011
Posted April 6th, 2011
17 posts
12.2 Years
i'm prety sure its a scripting error but i have no idea where
Game:ruby
Editor:pksvui 2.1.1
i tried to make a gym, all it contains is 2 warp points (to outside) two normal trainers, and the gym leader, all the scripts are as bare and limeted as can be strait from the templates for the trainers i will put the script for the gym leader in a minuet.
so when i enter the gym the first person sees me and chalanges me, i win but i am frozen, the camera is still centered on my sprite, and the gym leaders sprite has turned into mine which i can control as if it were me! anybody know what could have possibly gone wrong?
the gym leader's is:
Spoiler:
#org 0x8740B5E
'-----------------------------------
lock
faceplayer
trainerbattle 0x0 0x4 0xB8E 0x8000874 0x9000001
setflag RS_BADGE_5
message 0x9000001 ' TM03 contains water ...
copyvarifnotzero 0x8000 TM03
copyvarifnotzero 0x8001 0x1
message 0x9000001 ' TM03 contains water ...
message 0x8740C23 ' Keep on fightin!
callstd MSG_LOCK ' Built-in lock command
release
end


#org 0x8000874
= \h29\h40\h5A\h88\h30\h1C\h10\h40\h08\h43\h58\h80e\h8C\h58\h8C\h09\h18\h18\h1C\h29\h30 \h78\h06\h4A\h40\h18\h12\h78\h80\h18\h22l \h04 \h02\h02

#org 0x9000001
= TM03 contains water pulse, it deals damage and may confuse your enemy.

#org 0x8740C23
= Keep on fightin!


but before i compile it it looks like this:
Spoiler:

#dyn 0x740000
#org @Trainer1
lock
faceplayer
trainerbattle 0 4 @BernChall @BernDefeatmessage @Congrats
setflag 0x80B
message @GotBadge
copyvarifnotzero 0x8000 TM03
copyvarifnotzero 0x8001 1
message @FireStone
message @BernTalk
boxset 6
release
end

#org @BernChall
= So young trainer\n You wish to battle me?\p ARGUS\n the great water trainer!\p So... \n Show me what you got!

#org @BernDefeat
= You have definitely \nproven yourself worthy

#org @BernTalk
= Keep on fightin!

#org @BernCode


#org @Congrats
= Congradulations to you\n on your first gym Victory!

#org @Gotbadge
= Take this Aqua BADGE,\n with it the DEFENSE\nof all your POK\eMON will increase.\pPOK\eMON that know the HM move SURF\nwill be able to travel over water.

#org @FireStone
= TM03 contains water pulse, it deals damage and may confuse your enemy.
Male
Seen 5 Days Ago
Posted 5 Days Ago
98 posts
12.8 Years
Ok, so I have started using Pokescript instead of A text to change what people say since a text has the habit of everything running over. Here is my problem. In fire red, in the viridian city pokemon center there are three people(excluding the nurse) a boy with a cap, a boy without a cap, and an old man at the table. (this is in the game, not hacked.) For the boy with the cap I made him explain the pokemon center. The old man is explaining the pc. His words are, "You can use that pc in the corner for free." The boy without the cap was suppose to say something funny about how the pokemon center can't heal pokemon for free cause they started going broke and stuff. But in the game he is saying the same thing the old man says about using the pc for free. and at the end of what the boy without a cap says there is a "n" with a "~" directly over it. This "n" is not in the old mans saying and I didn't not put that in the script. For some reason the boy without a cap did not say what I put into his script. All three people have different offsets so I know i didn't accidentally paste one into the wrong one.

Complans

Trainer

Seen August 27th, 2015
Posted April 11th, 2011
98 posts
13.1 Years
Ok, so I have started using Pokescript instead of A text to change what people say since a text has the habit of everything running over. Here is my problem. In fire red, in the viridian city pokemon center there are three people(excluding the nurse) a boy with a cap, a boy without a cap, and an old man at the table. (this is in the game, not hacked.) For the boy with the cap I made him explain the pokemon center. The old man is explaining the pc. His words are, "You can use that pc in the corner for free." The boy without the cap was suppose to say something funny about how the pokemon center can't heal pokemon for free cause they started going broke and stuff. But in the game he is saying the same thing the old man says about using the pc for free. and at the end of what the boy without a cap says there is a "n" with a "~" directly over it. This "n" is not in the old mans saying and I didn't not put that in the script. For some reason the boy without a cap did not say what I put into his script. All three people have different offsets so I know i didn't accidentally paste one into the wrong one.
Try separating the offsets by at least 100. For example, make the boy with a cap's offset

$800100

and the old man's

$800200

Or something like that.
Male
Seen August 27th, 2014
Posted October 24th, 2013
79 posts
12.9 Years
how do you edit the options it gives you for a multibox in a script i have it to where the professor in my game walks up to the charecters says what he is supposed to say and then it gives me a multibox which it is supposed to do i just want to edit the multibox to say the starters for my game and then i need to know how to assign the starters so that when you click on houdour it gives you a houndour and when you click on ralts it gives you a ralts and the same for heracross. any help is greatly appreciated!
Working on a Fire Red Remake Hack nameless for the time being!

Complans

Trainer

Seen August 27th, 2015
Posted April 11th, 2011
98 posts
13.1 Years
how do you edit the options it gives you for a multibox in a script i have it to where the professor in my game walks up to the charecters says what he is supposed to say and then it gives me a multibox which it is supposed to do i just want to edit the multibox to say the starters for my game and then i need to know how to assign the starters so that when you click on houdour it gives you a houndour and when you click on ralts it gives you a ralts and the same for heracross. any help is greatly appreciated!
Try using this tool:

http://www.pokecommunity.com/showthread.php?t=243328

If it doesn't work, try finding another tool or just put three Poke Balls like in the normal games for you to choose a starter from.
Male
Seen August 27th, 2014
Posted October 24th, 2013
79 posts
12.9 Years
Try using this tool:

http://www.pokecommunity.com/showthread.php?t=243328

If it doesn't work, try finding another tool or just put three Poke Balls like in the normal games for you to choose a starter from.
thank you sir that was what i was looking for
Working on a Fire Red Remake Hack nameless for the time being!
Male
Seen 5 Days Ago
Posted 5 Days Ago
98 posts
12.8 Years
Try separating the offsets by at least 100. For example, make the boy with a cap's offset

$800100

and the old man's

$800200

Or something like that.
I suppose I could just keep doing that. Start with something and keep going with 100 intervals but won't I eventually run into an offset that is already being used for something else? Free space finder and the offset search in pokescript find offsets for you but in no specific order. Right?
The offsets for each person is:
Boy with cap: 802091
boy without: 801125
old man: 16A2E1

How much more farther off do I need to be? O.o lol

destinedjagold

You can contact me in PC's discord server...

Age 32
Male
Seen 3 Days Ago
Posted March 24th, 2023
8,579 posts
16 Years
I suppose I could just keep doing that. Start with something and keep going with 100 intervals but won't I eventually run into an offset that is already being used for something else? Free space finder and the offset search in pokescript find offsets for you but in no specific order. Right?
The offsets for each person is:
Boy with cap: 802091
boy without: 801125
old man: 16A2E1

How much more farther off do I need to be? O.o lol
Use HackMew's tool called Free Space Finder or FSF for you to search for available free space, or use a Hex Editor to manually search for free space.

Male
Seen August 27th, 2014
Posted October 24th, 2013
79 posts
12.9 Years
#dynamic 0x722565

#org @start
checkflag 0x828
if 0x1 goto @end
msgbox @poke
boxset 0x5
if 0x1 goto @give
release
end

'-----------------------
#org @end
end

#org @give
lock
showpokepic 0xE4 0x10 0x3
hidepokepic
givepokemon 0xE4 0x6 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @given
boxset 0x6
waitfanfare
setflag 0x828

'---------
' Strings
'---------
#org @poke
= Would you like HOUNDOUR the\nDARK and FIRE-TYPE pokemon?

#org @given
= \v\h01 recieved HOUNDOUR!

i cannot figure out why this script wont work. i wanted it to be where it asks you if you want the pokemon and if you say yes if gives you that pokemon but i doesn't give you teh pokemon and it doesn't setflag 828

#dynamic 0x722565

#org @start
checkflag 0x828
if 0x1 goto @end
msgbox @poke
boxset 0x5
if 0x1 goto @give
release
end

'-----------------------
#org @end
end

#org @give
lock
showpokepic 0xE4 0x10 0x3
hidepokepic
givepokemon 0xE4 0x6 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @given
boxset 0x6
waitfanfare
setflag 0x828

'---------
' Strings
'---------
#org @poke
= Would you like HOUNDOUR the\nDARK and FIRE-TYPE pokemon?

#org @given
= \v\h01 recieved HOUNDOUR!

i cannot figure out why this script wont work. i wanted it to be where it asks you if you want the pokemon and if you say yes if gives you that pokemon but i doesn't give you teh pokemon and it doesn't setflag 828
Working on a Fire Red Remake Hack nameless for the time being!

Spherical Ice

Age 25
Leicester, UK
Seen 21 Hours Ago
Posted February 20th, 2022
5,251 posts
15.5 Years
Edits in bold.

#dynamic 0x800000

#org @start
checkflag 0x828
if 0x1 goto @end
lock
faceplayer
showpokepic 0xE4 0x10 0x3
msgbox @poke 0x5
compare LASTRESULT 0x1
if 0x1 goto @give
hidepokepic
release
end

#org @end
release
end

#org @give
hidepokepic
givepokemon 0xE4 0x6 0x0 0x0 0x0 0x0
fanfare 0x13E
preparemsg @given
waitmsg
waitfanfare
setflag 0x828
release
end

#org @poke
= Would you like HOUNDOUR, the\nDARK and FIRE-type POKéMON?

#org @given
= [PLAYER] recieved HOUNDOUR!
Okay, so it's best to just put 0x800000 at the beginning of scripts and let XSE give you the offset. This is a person event, I assume, so I've added in a lock and faceplayer. It would probably be best to show the Pokémon before the player has chosen to help influence them/remind them what Pokémon it is, etc.

If you're using the most recent version of XSE, then the boxset command is useless - just add 0x5, 0x2, 0x6, whatever after "msgbox @string1". As it's 0x5, you need to check whether the player said yes or no, so that's what the compare line is for - 0x1 means the player chose yes, 0x0 means the player chose no. The next line then sends the script to @give if the player did choose yes.

When using fanfares, it's probably best to use the format I've addded in, and finally, I've added a release end as it's needed.

All you need to do now is load your ROM in XSE, paste the script in, hit the blue gears (compile) button, copy the offset given for @start, and paste it in the Script offset input box of the person event you want the script to be assigned to, and hit save.

Hope I've helped.
Male
Seen August 27th, 2014
Posted October 24th, 2013
79 posts
12.9 Years
Edits in bold.

#dynamic 0x800000

#org @start
checkflag 0x828
if 0x1 goto @end
lock
faceplayer
showpokepic 0xE4 0x10 0x3
msgbox @poke 0x5
compare LASTRESULT 0x1
if 0x1 goto @give
hidepokepic
release
end

#org @end
release
end

#org @give
hidepokepic
givepokemon 0xE4 0x6 0x0 0x0 0x0 0x0
fanfare 0x13E
preparemsg @given
waitmsg
waitfanfare
setflag 0x828
release
end

#org @poke
= Would you like HOUNDOUR, the\nDARK and FIRE-type POKéMON?

#org @given
= [PLAYER] recieved HOUNDOUR!
Okay, so it's best to just put 0x800000 at the beginning of scripts and let XSE give you the offset. This is a person event, I assume, so I've added in a lock and faceplayer. It would probably be best to show the Pokémon before the player has chosen to help influence them/remind them what Pokémon it is, etc.

If you're using the most recent version of XSE, then the boxset command is useless - just add 0x5, 0x2, 0x6, whatever after "msgbox @string1". As it's 0x5, you need to check whether the player said yes or no, so that's what the compare line is for - 0x1 means the player chose yes, 0x0 means the player chose no. The next line then sends the script to @give if the player did choose yes.

When using fanfares, it's probably best to use the format I've addded in, and finally, I've added a release end as it's needed.

All you need to do now is load your ROM in XSE, paste the script in, hit the blue gears (compile) button, copy the offset given for @start, and paste it in the Script offset input box of the person event you want the script to be assigned to, and hit save.

Hope I've helped.
when i try to compile it says unkown keyword perparemsg
Working on a Fire Red Remake Hack nameless for the time being!

Complans

Trainer

Seen August 27th, 2015
Posted April 11th, 2011
98 posts
13.1 Years
I need help with this. It's meant to, if the player has the Pokedex and hasn't activated the flag (which is activated by finishing this script) Oak gives the player the National Dex. I don't see anything wrong with it..

Spoiler:
#dynamic 0x805000

#org @begin
checkflag 0x829
if 0x1 goto @holdon
goto @nea

#org @hek
lock
msgbox @wait 0x6
applymovement 0x5 @toplayer
waitmovement 0x0
msgbox @forgot 0x6
special 0x16F
fanfare 0x13E
msgbox @yay 0x4
waitfanfare
closeonkeypress
msgbox @cya 0x6
applymovement 0x5 @back
checkflag 0x1872
release
end

#org @holdon
checkflag 0x1872
if 0x1 goto @hek
release
end

#org @nea
release
end

#org @wait
= Oak: Wait a second!

#org @forgot
= I almost forgot. I need to give\nyou this National Pokedex, there\lhave been reports of Roaming\lPokemon from Hoenn lately.\pThe National Pokedex allows you to\nrecord data about Pokemon from\lother regions.\pHere you go!

#org @yay
= [black_fr][player] obtained the National Pokedex!

#org @cya
= Oak: Take care now!

#org @toplayer
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

#org @back
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x0
#raw 0xFE