• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.
25
Posts
14
Years
  • Seen Dec 28, 2013
For your first problem, try adding waitmovement 0xFF after the applymovement.
For the second one, frankly, I have no idea..

apparently waitmovement is an unknown command in PKSV. you got any other idea? or anyone else got an idea?
 

Crimson Stardust

Anime Addiction
1,319
Posts
15
Years
Hello,
a question here,
i am scripting a rival event where the rival challenge you to a battle,
what i am unsure is how do i go about the trainer winning the battle?
like the trainerbattle scripts have @defeat and @after,
defeat after we defeat the rival and after i will make a script that make him say something about his lost blah blah blah then he goes off,
but what i am unsure is what if he win?The rival win i mean,
then how do i check he win so that my script will instead of the rival complaining he lost he will brag about his win and goes off like in fire red without me being warped off to the pokemon centre.
I did check the fire red script but it was way confusing for me to understand..lol
 

Ninja Caterpie

AAAAAAAAAAAAA
5,979
Posts
16
Years
Hello,
a question here,
i am scripting a rival event where the rival challenge you to a battle,
what i am unsure is how do i go about the trainer winning the battle?
like the trainerbattle scripts have @defeat and @after,
defeat after we defeat the rival and after i will make a script that make him say something about his lost blah blah blah then he goes off,
but what i am unsure is what if he win?The rival win i mean,
then how do i check he win so that my script will instead of the rival complaining he lost he will brag about his win and goes off like in fire red without me being warped off to the pokemon centre.
I did check the fire red script but it was way confusing for me to understand..lol

I'm not 100% sure, but I believe it uses 0x09 as the trainerbattle type. That is;

Code:
trainerbattle 0x09 [trainer] 0x3 @winchat @losechat
The 'winchat' and 'losechat' is what he says in the battle should he win or lose.

Then after the battle, you just continue the script as normal. I'm not sure if you can do different things depending on his victory or loss, though.
 

Crimson Stardust

Anime Addiction
1,319
Posts
15
Years
I'm not 100% sure, but I believe it uses 0x09 as the trainerbattle type. That is;

Code:
trainerbattle 0x09 [trainer] 0x3 @winchat @losechat
The 'winchat' and 'losechat' is what he says in the battle should he win or lose.

Then after the battle, you just continue the script as normal. I'm not sure if you can do different things depending on his victory or loss, though.
so the script will check if whether i win the script will go to win?
then lose go to lose script?
 

Ninja Caterpie

AAAAAAAAAAAAA
5,979
Posts
16
Years
No. The 'winchat' and 'losechat' are what the rival says in the battle. Y'know, after you win, they say something like "You got lucky!" and then you get your money and the battle ends? yeah, that's the text.

I'm not sure on how to actually make totally different actions based on whether you win or lose. Couldn't you just have the rival say something after he wins "hell yeah!" and loses "aw man" and then just have him say "Meh, whatever, smell you later"? That way it can make sense for both.

Like, uh, for example.

Code:
...
trainerbattle 0x09 0x9003 0x3 @winchat @losechat //have the battle.
message @cya 0x6                                 //after the battle he says @cya
applymovement 0x01 @away                         //then runs
...


#org @winchat
= aw man you won

#org @losechat
= aw yeah i won

#org @cya
= k, thanks, bye.

apologies if I syntax'd anything incorrectly, haven't done this in yonks.
 

Crimson Stardust

Anime Addiction
1,319
Posts
15
Years
No. The 'winchat' and 'losechat' are what the rival says in the battle. Y'know, after you win, they say something like "You got lucky!" and then you get your money and the battle ends? yeah, that's the text.

I'm not sure on how to actually make totally different actions based on whether you win or lose. Couldn't you just have the rival say something after he wins "hell yeah!" and loses "aw man" and then just have him say "Meh, whatever, smell you later"? That way it can make sense for both.

Like, uh, for example.

Code:
...
trainerbattle 0x09 0x9003 0x3 @winchat @losechat //have the battle.
message @cya 0x6                                 //after the battle he says @cya
applymovement 0x01 @away                         //then runs
...


#org @winchat
= aw man you won

#org @losechat
= aw yeah i won

#org @cya
= k, thanks, bye.
apologies if I syntax'd anything incorrectly, haven't done this in yonks.
That's cool man..Yeah i figured out i have to find a sentence to fit those two which i have..and thanks for telling me..xD
 
4
Posts
12
Years
  • Seen Aug 25, 2011
Hello, I've been searching for ages and still cant find this out.
I'm trying to make a script to have someone you talk to take away a Bulbasaur from you and replace it with a Charmander. I know its weird but i need it for a reason.
I really do not know what you put for removing a pokemon, since giving a pokemon is givepokemon 0x00 0x00 0x00 (with thre rest of the script of course, i know how to do that)

can someone please tell me the code for removing a pokemon instead of giving one? Thank you. (I tried guessing and using removepokemon 1 inplace of givepokemon 0x00 0x00 0x00, didnt work.)

(in Pokescript please :D)
 
Last edited:

Innocence

PC Lurker: I'm watching you...
1,041
Posts
19
Years
Hello, I've been searching for ages and still cant find this out.
I'm trying to make a script to have someone you talk to take away a Bulbasaur from you and replace it with a Charmander. I know its weird but i need it for a reason.
I really do not know what you put for removing a pokemon, since giving a pokemon is givepokemon 0x00 0x00 0x00 (with thre rest of the script of course, i know how to do that)

can someone please tell me the code for removing a pokemon instead of giving one? Thank you. (I tried guessing and using removepokemon 1 inplace of givepokemon 0x00 0x00 0x00, didnt work.)

This thread should help you: http://www.pokecommunity.com/showthread.php?t=206138

Please note that depending on circumstances you won't be able to guarantee that the Bulbasaur is the one taken away.
 
4
Posts
12
Years
  • Seen Aug 25, 2011
Thanks, but I actually found that link earlier before I posted the question and it doesn't answer it because I need it in PokeScript language because thats all I know right now. Is it possible to take away a pokemon with pokescript?
 

Innocence

PC Lurker: I'm watching you...
1,041
Posts
19
Years
Thanks, but I actually found that link earlier before I posted the question and it doesn't answer it because I need it in PokeScript language because thats all I know right now. Is it possible to take away a pokemon with pokescript?

You do realize that the ASM routine is the same with both?

I'm pretty sure it's still callasm to call that routine with Pokescript as well...


EDIT: Aah, I see. That isn't the thread I thought it was. http://www.pokecommunity.com/showthread.php?t=167889

Try this one.
 
4
Posts
12
Years
  • Seen Aug 25, 2011
To tell the truth i have no idea what ASM is. I asked for the pokescript for it because its easier for me to add into my script's scenario:
Spoiler:


EDIT: That new link seems to make alot more sense! Thank you very much I'll go test it out


EDIT:: ... Total failure. I can't believe this is so complicated... I was hoping i could just simply replace givepokemon 0x00 0x00 0x00 with something like takepokemon or releasepokemon (because I really dont know what that would be x.x)
 
Last edited:

Innocence

PC Lurker: I'm watching you...
1,041
Posts
19
Years
To tell the truth i have no idea what ASM is. I asked for the pokescript for it because its easier for me to add into my script's scenario:
Spoiler:


EDIT: That new link seems to make alot more sense! Thank you very much I'll go test it out


EDIT:: ... Total failure. I can't believe this is so complicated... I was hoping i could just simply replace givepokemon 0x00 0x00 0x00 with something like takepokemon or releasepokemon (because I really dont know what that would be x.x)

Nope. Function doesn't exist in the code of the game, which makes things complicated. You need to ASM it in (which HackMew and thethethethe have very nicely done for us) and then call it in the script.

What exactly went wrong for you?
 
49
Posts
14
Years
  • Seen Sep 10, 2011
Hey guys!

I was wondering how I'd go about writing a script that checks for the number of times you've beat the elite four. I'm basically going to offer new starters for each time you beat the elite four so you can make a new party, and offer new areas to enter, give more items, etc, but I have no clue on how to check if they beat the elite four 2, 3 or 4 times, and so on. Maybe it checks the number of records in the hall of fame?

Anyways, I use:
AMap
XSE
Fire Red

Thanks in advance, I really hope to hear from you guys.

I tried looking for hints in the script at the end of the elite four on how to check, but couldn't find out what variable it uses for it, and how to word it if I did find it.. I know special 0x110 (I believe thats the number) is the hall of fame special, do I use that somehow maybe?
 
23
Posts
16
Years
Code:
#dynamic 0x800000

#org @script
lock
faceplayer
textcolor 0x1
msgbox @poliwhirl 0x2
pause 0x10
textcolor 0x2
message @gotpoliwhirl 0x4
closeonkeypress
givepokemon 0x3D 0x5 0x00 0x00 0x00 0x00
setflag 0x828
fadescreen 1
fanfare 0x13D
hidesprite 0x800D 
setflag 0x1201
setvar 0x6000 0x01
waitfanfare
fadescreen 0
textcolor 0x0
msgbox @nickname 0x2
textcolor 0x0
msgbox @nickname2 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
textcolor 0x0
msgbox @nickname4 0x2 \\line 28
release
end

#org @yes
special 0x9E
release
end

#org @nickname
= I've never really thought about\nnicknaming my pokemon.

#org @nickname2
= Should I nickname my POLIWHIRL?

#org @nickname4 
= No, I don't think I'll nickname my\nPOLIWHIRL.

#org @poliwhirl 
= Oh!\nHere is my POLIWHIRL.

#org @gotpoliwhirl
= \v\h01 picked up his POLIWHIRL.

I've been having trouble with this script I've created in XSE. When I try to compile I get a error. (Error 13 "Type mismatch" on line 28. File: "(file location). Missing dynamic label. Can anyone help me?

E:
Hey guys!

I was wondering how I'd go about writing a script that checks for the number of times you've beat the elite four. I'm basically going to offer new starters for each time you beat the elite four so you can make a new party, and offer new areas to enter, give more items, etc, but I have no clue on how to check if they beat the elite four 2, 3 or 4 times, and so on. Maybe it checks the number of records in the hall of fame?

Anyways, I use:
AMap
XSE
Fire Red

Thanks in advance, I really hope to hear from you guys.

I tried looking for hints in the script at the end of the elite four on how to check, but couldn't find out what variable it uses for it, and how to word it if I did find it.. I know special 0x110 (I believe thats the number) is the hall of fame special, do I use that somehow maybe?

I probably just use flags but it depends on how long you want to count for. If it doesn't matter after say 5 times then you could use flags but if you want to count foverever then I don't know.
 
Last edited:
49
Posts
14
Years
  • Seen Sep 10, 2011
How would I do that tho? I'd like to leave the origional game intact, I'm just trying to expand on it for my friend, something to work on untill I get better at this yunno? Its my 1st project, haha.

I was thinking of adding a script to the end to solve my problem. A series of checkfalgs maybe like what swellow said. If I opened a new XSE window and wrote out that script and open nintendos Elite Four script, Decompiled that, Added the new script at the Free Space Finders new offset and compiled it, I shouldn't run into any problems right? No overlapping memory or anything?
 
23
Posts
16
Years
How would I do that tho? I'd like to leave the origional game intact, I'm just trying to expand on it for my friend, something to work on untill I get better at this yunno? Its my 1st project, haha.

I was thinking of adding a script to the end to solve my problem. A series of checkfalgs maybe like what swellow said. If I opened a new XSE window and wrote out that script and open nintendos Elite Four script, Decompiled that, Added the new script at the Free Space Finders new offset and compiled it, I shouldn't run into any problems right? No overlapping memory or anything?

Yes, there shouldn't be any problems but instead of using FSF you can put #dynamic 0x800000 and it should find free space for you.
 

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
Code:
#dynamic 0x800000

#org @script
lock
faceplayer
textcolor 0x1
msgbox @poliwhirl 0x2
pause 0x10
textcolor 0x2
message @gotpoliwhirl 0x4
closeonkeypress
givepokemon 0x3D 0x5 0x00 0x00 0x00 0x00
setflag 0x828
fadescreen 1
fanfare 0x13D
hidesprite 0x800D 
setflag 0x1201
setvar 0x6000 0x01
waitfanfare
fadescreen 0
textcolor 0x0
msgbox @nickname 0x2
textcolor 0x0
msgbox @nickname2 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
textcolor 0x0
msgbox @nickname4 0x2 \\line 28
release
end

#org @yes
special 0x9E
release
end

#org @nickname
= I've never really thought about\nnicknaming my pokemon.

#org @nickname2
= Should I nickname my POLIWHIRL?

#org @nickname4 
= No, I don't think I'll nickname my\nPOLIWHIRL.

#org @poliwhirl 
= Oh!\nHere is my POLIWHIRL.

#org @gotpoliwhirl
= \v\h01 picked up his POLIWHIRL.

I've been having trouble with this script I've created in XSE. When I try to compile I get a error. (Error 13 "Type mismatch" on line 28. File: "(file location). Missing dynamic label. Can anyone help me?
Try put 0x6 instead of 0x2 but I don't see any error in there...


How would I do that tho? I'd like to leave the origional game intact, I'm just trying to expand on it for my friend, something to work on untill I get better at this yunno? Its my 1st project, haha.

I was thinking of adding a script to the end to solve my problem. A series of checkfalgs maybe like what swellow said. If I opened a new XSE window and wrote out that script and open nintendos Elite Four script, Decompiled that, Added the new script at the Free Space Finders new offset and compiled it, I shouldn't run into any problems right? No overlapping memory or anything?
I'd recompile champions' script to free location and added series of check and setflag commands and those set flags would be used in giving starters script =)
It has advantage in a fact that champion can have different team each run (if you set it of course :D), isn't that great? :D
 
3
Posts
13
Years
  • Seen Jul 18, 2012
hey everyone. I'm sorry to bother you, but I've looked at at ALL scripting tutorials and scripting just DOESN'T work for me. ex. when i use pokescript and open my rom the character is there but when i talk to it it just goes beep and nothing happens. This has been a frequent problem and stops me from scripting although i love to hack Roms. I have used XSE and a basic script ( like "hi" ) takes me to the celadon game center to choose a prize.
Hacking Fire Red
Vista ( if thats important )
tried poket script
tried eXtreme Script Editor
even tried advance text.
so if you know the answer and don't mind posting, Please Help:)
 
Status
Not open for further replies.
Back
Top