• 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?".
  • 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.
31
Posts
15
Years
  • Seen Jul 23, 2023
What is wrong with this line?

#org 0x87401A4
= \v\h06: Rise and shine \v\h01.\nAbout time you woke up.\pALEX is expecting us at the gym,\nso let's go!

Which makes it say this
"Gary: Rise and shine FIRE.
Ŭ
Alex is expecting us at the gym,
so let's go!"

It then is followed by normality.
 

Sarcastic Prince

Starting anew...
3,003
Posts
16
Years
What is wrong with this line?

#org 0x87401A4
= \v\h06: Rise and shine \v\h01.\nAbout time you woke up.\pALEX is expecting us at the gym,\nso let's go!

Which makes it say this
"Gary: Rise and shine FIRE.
Ŭ
Alex is expecting us at the gym,
so let's go!"

It then is followed by normality.

Try using [player] and [rival]. Maybe that'll work.

OK, and now for my question.

Spoiler:


Only 4 of the 15 OWs follow the "applymovement" command.
They're numbers 13, 14, 15 and 21.

Is something wrong with the script?
 
58
Posts
13
Years
  • Seen Jan 3, 2015
Try using [player] and [rival]. Maybe that'll work.

OK, and now for my question.

Spoiler:


Only 4 of the 15 OWs follow the "applymovement" command.
They're numbers 13, 14, 15 and 21.

Is something wrong with the script?

Maybe the parameters (the people's event numbers) in the applymovement commands are not in hex? Just my unreliable two cents.
 
31
Posts
12
Years
  • Seen Jun 20, 2012
Game: Pokemon Emerald
Type: 1.0
Editor: XSE
Script:
Spoiler:
Spoiler:

Screenshots and/or videos: I would post pics/videos but I don't have the right to yet, but basically the game freezes when I talk to the person event holding the script.
 

Shiny Quagsire

I'm Still Alive, Elsewhere
697
Posts
14
Years
Game: Pokemon Emerald
Type: 1.0
Editor: XSE
Script:
Spoiler:
Spoiler:

Screenshots and/or videos: I would post pics/videos but I don't have the right to yet, but basically the game freezes when I talk to the person event holding the script.

OK, this make no sense. You said you're using XSE, while this is Pokescript format. XSE CANNOT process this, since it isn't in it's native XSE format. If you're looking for tutorials for XSE, I'd reccomend diegoisawesome's MEGA-HUGE XSE tutorial. XSE's HUGE advantage over Pokescript is that it has a QUI for scriptwriting, a built-in guide, and a command database filled with more up to date commands, AKA no more #raw's for commands!


Anyhow, If you'd like to see XSE format, I converted your into it:
Spoiler:

I was lazy and didn't convert the #raw's, but it should still work though!
 
31
Posts
12
Years
  • Seen Jun 20, 2012
Sorry...I'm still a noob, but thanks! I shall test it now.

Still isn't working, now just a box pops up and freezes
 
Last edited:

Sarcastic Prince

Starting anew...
3,003
Posts
16
Years

Especially the thing that you did not put waitmovement after every applymovement... and the fact that you overused pause 0x28 + special 0x133 other then that I don't see anything wrong with it.

Nope... I want the script to have all 15 people to move at the same time.
And every time they make a turn, I want 3 earthquakes to happen.

I don't think that pause 0x28 + special 0x133 is the root problem.
Maybe it's because I didn't use Hex form for the person's picture number.

I've just fixed the script. Now, only 7, 8, 9, 10, 12, 17 do not work.
I wonder why? Here's the script: (The people's event numbers are all in Hex form in the applymovement script)

Spoiler:
 
Last edited:
3
Posts
12
Years
  • Seen Aug 15, 2011
I always seem to fail at stuff like this but im trying to make it so when you step on a script box the map shakes, at the moment it just freezes, can anyone help.
Here is the script.
#org 0x7400CF
lockall
setvar 0x8004 0x3
setvar 0x8005 0xC
setvar 0x8006 0xC
setvar 0x8007 0x3
special 0x136
waitstate
releaseall
end
 
31
Posts
12
Years
  • Seen Jun 20, 2012
No one really answered/resolved me question earlier...what happens is that the game just opens a box and freezes...

Spoiler:
 

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
No one really answered/resolved me question earlier...what happens is that the game just opens a box and freezes...
What version of XSE do you use btw?
Anyways I'd also advise this...
Code:
lock
faceplayer
checkflag 0x828
if 0x0 goto 0x8828978
if 0x1 goto 0x886A1F8
release
end

If you have comparsion like that one you don't need to script both possibilities =)
You can have it like this:

Code:
lock
faceplayer
checkflag 0x828
if 0x0 goto 0x8828978
msgbox 0x88EA553 '"Sorry, you have already received yo..."
release
end

But that's not the main problem I see.
In pokemon orgs you're missing one important part and that is compare LASTRESULT 0x1 =)
That command is very important in 0x5 msgboxes =)
It goes like this: it compares last "click" and 0x1 goes for yes.
So command "if 0x1" after that means that if you clicked on YES script goes to new location =)

So you need to have it like this:
Code:
showpokepic 0x87 0xA 0x3
msgbox 0x88D699E '"Do you want Jolteon?"
[B]compare LASTRESULT 0x1[/B]
if 0x1 goto 0x886A83E
hidepokepic
release
end

But since your script demand continuation it should be like this:
Spoiler:


I hope it will work now and you understood a bit of what I just explained :D
 
Last edited:
31
Posts
12
Years
  • Seen Jun 20, 2012
Ok I must be doing something else wrong...now when i click on him he makes the "ding" noise but nothing opens...:\ I feel dumb.

Oh and i'm using v1.0.0 xse
 
Last edited:

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
Ok I must be doing something else wrong...now when i click on him he makes the "ding" noise but nothing opens...:\ I feel dumb.
Facepalm, I'm a noob :D
I misspelled important part :D
Instead of "if 0x1 goto @choice" there should be if 0x0 goto @choice

Oh and i'm using v1.0.0 xse
I see... well I'd advise you to download higher version but I don't know where to download version 1.1.1... :( (guys you can save me! xD)
So in your version msgboxes must be done this way:
Instead of msgbox @whatever 0x6, it must be:
msgbox @whatever
callstd 0x6
 
31
Posts
12
Years
  • Seen Jun 20, 2012
OMG THANK YOU!!! IT WORKS BEAUTIFULY!!! :D :D :D

Ok, the script works but I when I get the pokemon it's not the pokemon I want, like when I select vaporeon it gives me spinda, and jolteon gives me wingull. Fix?

Nevermind, I got it, I didn't know it had to be in hexadecimal.
 
Last edited:
84
Posts
14
Years
  • Seen Jun 6, 2014
I'm trying out a basic trainer battle script and would like to know how I would be able to change the weather while he's talking before the battle. I'm unsure of how to do this...

Code:
#dynamic 0x800000

#org @start

trainerbattle 0x0 0x009 0x0 @before @after
msgbox @beaten 0x6
release 
end

#org @before
= ...

#org @after
= I will be back...

#org @beaten
= Go away...
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
I always seem to fail at stuff like this but im trying to make it so when you step on a script box the map shakes, at the moment it just freezes, can anyone help.
Here is the script.
#org 0x7400CF
lockall
setvar 0x8004 0x3
setvar 0x8005 0xC
setvar 0x8006 0xC
setvar 0x8007 0x3
special 0x136
waitstate
releaseall
end

Have you set the set the Unknown and Variable values of the green script tile to these?

after%20change.jpg


I'm trying out a basic trainer battle script and would like to know how I would be able to change the weather while he's talking before the battle. I'm unsure of how to do this...

Code:
#dynamic 0x800000
 
#org @start
[COLOR=red]setweather 0x3[/COLOR]
[COLOR=red]doweather[/COLOR]
trainerbattle 0x0 0x009 0x0 @before @after
msgbox @beaten 0x6
release 
end
 
#org @before
= ...
 
#org @after
= I will be back...
 
#org @beaten
= Go away...

Additions in red.

You have to use a combination of the 'setweather' and 'doweather' commands. The setweather command tells the game what weather to change to (Rain is 0x3) while the doweather command makes it execute the new weather. You can find an ordered list of weather used in the Header tab of Advance Map.

Unfortunately, this script will not work properly if the player is 'seen' by the trainer. If you assign a view radius to the OW that holds this script then the game will glitch out when it tries to start a battle. The player has to go up and talk to the OW for the script to work as it is intended.
 
58
Posts
13
Years
  • Seen Jan 3, 2015
While de-compiling a few scripts, a rather unusual command appeared: cmd24. The Command Help in XSE says the command is still under investigation. Does anybody know or figured out what it does, or if it is of any significance in scripts?

Also, how is it that the script of the item Pokeballs do not have a hidesprite and/or a setflag command to make them disappear? And it seems every Pokeball has a different Person ID.
 
84
Posts
14
Years
  • Seen Jun 6, 2014
Have you set the set the Unknown and Variable values of the green script tile to these?

after%20change.jpg




Additions in red.

You have to use a combination of the 'setweather' and 'doweather' commands. The setweather command tells the game what weather to change to (Rain is 0x3) while the doweather command makes it execute the new weather. You can find an ordered list of weather used in the Header tab of Advance Map.

Unfortunately, this script will not work properly if the player is 'seen' by the trainer. If you assign a view radius to the OW that holds this script then the game will glitch out when it tries to start a battle. The player has to go up and talk to the OW for the script to work as it is intended.
Thanks. I was planning on walking up to the OW. There wouldn't be any need to set any flags in this script?
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
While de-compiling a few scripts, a rather unusual command appeared: cmd24. The Command Help in XSE says the command is still under investigation. Does anybody know or figured out what it does, or if it is of any significance in scripts?

Also, how is it that the script of the item Pokeballs do not have a hidesprite and/or a setflag command to make them disappear? And it seems every Pokeball has a different Person ID.

I have no idea about cmd24 :P

That is because of a special property of the specific command 'giveitem MSG_FIND' (or 'giveitem 0xY 0xZ 0x1'). It makes the OW that you spoke to last (the Pokeball) disappear while simultainously setting the flag that is equal to the OW's Person ID. You can see this clearly when use the giveitem command on an OW with an ID of 828 - It makes the Pokemon menu option appear on the player's start screen.

Each Pokeball has a different ID to stop the scripts from conflicting with each other. If you were to have two items with the same Person ID and picked one up, the other one will disappear. Since this isn't what you want, it is best to give each Pokeball an ID for a flag that won't be used anywhere else in scripts.

Thanks. I was planning on walking up to the OW. There wouldn't be any need to set any flags in this script?

If you were to leave the map (setting the weather back to it's default setting) and then return to speak to the OW then it will start raining again the instant you talk to him. It would be a bit weird since you've already defeated him so he would just be saying his defeated text. If you don't want this to happen then you can use a script similar to this:

Code:
#dynamic 0x800000
 
#org @start
checkflag 0x200
if 0x1 goto @defeated
setweather 0x3
doweather
trainerbattle 0x0 0x009 0x0 @before @after
setflag 0x200
release 
end
 
#org @defeated
msgbox @beaten 0x6
release
end
 
#org @before
= ...
 
#org @after
= I will be back...
 
#org @beaten
= Go away...
 
Status
Not open for further replies.
Back
Top