• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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.

[Archive] Script help thread

Status
Not open for further replies.
Can some buddy make a give away script? the pokemon who's giving away is bulbasaur

This is not a script request thread. I am sorry, but you will need to go get help elsewhere.
Unless you want to learn how to make a give pokemon script, then you should go look around in the documents and tutorials section.

Here is a link to the documents and tutorials section, look around there for a scripting tutorial.
(Depending on what kind of script program you use, you may want to find the appropreate tutorial.
CLICK ME!
 
Hello,
I've got a problem with this script o' mine:
Code:
#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x904
if b_true goto @heal
checkflag 0x903
if b_true goto @newest
checkflag 0x902
if b_true goto @newer
checkitem 0x10D 0x1
if b_true goto @new
msgbox @normal
boxset 0x6
release
end

#org @new
msgbox @shop2
boxset 0x6
removeitem 0x10D 0x1
setflag 0x902
release
end

#org @newer
msgbox @sleep
boxset 0x6
release
end

#org @newest
msgbox @morn
boxset 0x6
givepokemon 0xF6 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @getPK
boxset 0x4
waitfanfare
#raw 0x68
setflag 0x828
msgbox @bye
boxset 0x6
setflag 0x904
release
end

#org @heal
msgbox @wellback
boxset 0x4
#raw 0x68
fadescreen 0x1
fanfare 0x100
special 0x0
waitfanfare
fadescreen 0x0
msgbox @fin
boxset 0x6
release
end


#org @normal
= Dad: You better get going, if you want to\nbe home before night, [player].

#org @shop2
= Dad: Oh, welcome back, [player].\pDid you get the parcel?\p...\pYou did? Great!\p[player] gave Dad the parcel.\pYes, this is it...\pIt's been a long day, [player].\nGo upstairs and get some rest.\pAfter all, it is your birthday tomorrow.

#org @sleep
= Dad: Go get some sleep, [player].

#org @morn
= Dad: Good morning, [player].\nAnd happy birthday, too.\pToday is the day you are allowed to have\nyour first Pokemon.\pSo... I guess this is it then.\nHere you go [player].

#org @getPK
= [player] received a Larvitar.

#org @bye
= Dad: Now that you have your Pokémon, I\nguess you're eager to explore the world\land create a bond with your Pokémon...\pI just want to say, good luck.\pAnd I hope you'll come and visit me now\nand then, okay?\lGood bye, [player].

#org @wellback
= Dad: Welcome home, [player].\nYou look a little tired.\pI think you should rest a bit.

#org @fin
= Dad: You and and your Pokémon look much better\nnow.\pSee you, [player].

The problem is, even though I have "Item 10D" the scipt continues with "msgbox @normal
boxs..." instead of jumping to "@new".

If anyone know how to fix it, please tell me.

//44tim44
 
Hello,
I've got a problem with this script o' mine:
Code:
#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x904
if b_true goto @heal
checkflag 0x903
if b_true goto @newest
checkflag 0x902
if b_true goto @newer
[B] checkitem 0x10D
#raw 0x01 0x00
compare 0x800D 0x1
if 0x4 goto @new[/B]
msgbox @normal
boxset 0x6
release
end

#org @new
msgbox @shop2
boxset 0x6
removeitem 0x10D 0x1
setflag 0x902
release
end

#org @newer
msgbox @sleep
boxset 0x6
release
end

#org @newest
msgbox @morn
boxset 0x6
givepokemon 0xF6 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @getPK
boxset 0x4
waitfanfare
#raw 0x68
setflag 0x828
msgbox @bye
boxset 0x6
setflag 0x904
release
end

#org @heal
msgbox @wellback
boxset 0x4
#raw 0x68
fadescreen 0x1
fanfare 0x100
special 0x0
waitfanfare
fadescreen 0x0
msgbox @fin
boxset 0x6
release
end


#org @normal
= Dad: You better get going, if you want to\nbe home before night, [player].

#org @shop2
= Dad: Oh, welcome back, [player].\pDid you get the parcel?\p...\pYou did? Great!\p[player] gave Dad the parcel.\pYes, this is it...\pIt's been a long day, [player].\nGo upstairs and get some rest.\pAfter all, it is your birthday tomorrow.

#org @sleep
= Dad: Go get some sleep, [player].

#org @morn
= Dad: Good morning, [player].\nAnd happy birthday, too.\pToday is the day you are allowed to have\nyour first Pokemon.\pSo... I guess this is it then.\nHere you go [player].

#org @getPK
= [player] received a Larvitar.

#org @bye
= Dad: Now that you have your Pokémon, I\nguess you're eager to explore the world\land create a bond with your Pokémon...\pI just want to say, good luck.\pAnd I hope you'll come and visit me now\nand then, okay?\lGood bye, [player].

#org @wellback
= Dad: Welcome home, [player].\nYou look a little tired.\pI think you should rest a bit.

#org @fin
= Dad: You and and your Pokémon look much better\nnow.\pSee you, [player].
The problem is, even though I have "Item 10D" the scipt continues with "msgbox @normal
boxs..." instead of jumping to "@new".

If anyone know how to fix it, please tell me.

//44tim44

The fixes are in Bold. Hope it helps.
 
The fixes are in Bold. Hope it helps.

Thank you, SO much, Hiche!
It's working great now. ^^

//44tim44

EDIT: Okay now I have a new problem:
As soon as the map is reset where the previous script is
taking place, it's like all the flags have been cleared, why?
ALl flags work properly as long as I saty on the map, but as soon
as I leave-return they're cleared.

I usually have no problems with scripting, but I
have been into RPGmaking so, I have forgotten some stuff...

If someone can help me, please do.
 
Last edited:
Spoiler:


Okay, I really don't understand level scripts at all. I've got this script, with comments in at certain places. Hiche said that would require level scripting, but I'm not sure how to implement them, nor how to move the camera to a different map. (I know how to move the camera normally, just not how to warp it to another map.)

Keep in mind, that this script hasn't been tested yet.

Also, if anyone's confused, this is what the script's supposed to do:

Spoiler:
 
Hi, I am really new to scripting and I need some help.

This script freeses up once the player goes on the script tile here.

[PokeCommunity.com] [Archive] Script help thread



Code:
#dynamic 0x71A294

#org @start
checkflag 0x851
msgbox @text2
applymovement 0x00 @move
waitmovement 0x0
msgbox @text
boxset 6
applymovement 0x00 @move2
waitmovement 0x0
setflag 0x851
release
end

#org @text2
= \hAB

#org @move
#raw 0x00 0x11 0x11 0x03

org @text
= Good morning!\nProfessor Cedar wanted to see you!

#org @move2
#raw 0x00 0x10 0x10 0x02


Oh and I'm using XSE
 
Hi, I am really new to scripting and I need some help.

This script freeses up once the player goes on the script tile here.

[PokeCommunity.com] [Archive] Script help thread



Code:
#dynamic 0x71A294

#org @start
checkflag 0x851
msgbox @text2
applymovement 0x00 @move
waitmovement 0x0
msgbox @text
boxset 6
applymovement 0x00 @move2
waitmovement 0x0
setflag 0x851
release
end

#org @text2
= \hAB

#org @move
#raw 0x00 0x11 0x11 0x03

org @text
= Good morning!\nProfessor Cedar wanted to see you!

#org @move2
#raw 0x00 0x10 0x10 0x02
Oh and I'm using XSE

On A-Map, make sure that you have the Unknown and Var Number values set correctly. (Unknown=0300 Var Number=4050)
 
Hi, I am really new to scripting and I need some help.

This script freeses up once the player goes on the script tile here.

[PokeCommunity.com] [Archive] Script help thread



Code:
#dynamic 0x71A294

#org @start
checkflag 0x851
msgbox @text2
applymovement 0x00 @move
waitmovement 0x0
msgbox @text
boxset 6
applymovement 0x00 @move2
waitmovement 0x0
setflag 0x851
release
end

#org @text2
= \hAB

#org @move
#raw 0x00 0x11 0x11 0x03

org @text
= Good morning!\nProfessor Cedar wanted to see you!

#org @move2
#raw 0x00 0x10 0x10 0x02


Oh and I'm using XSE

try this one.
Since I am now using XSE, I maybe able to help out... :\
Code:
#dynamic 0x71A294

#org @start
checkflag 0x851
[COLOR="Red"]if 0x1 goto @done[/COLOR]
msgbox @text2
[COLOR="Red"]boxset 6[/COLOR]
applymovement [COLOR="Blue"]0x00[/COLOR] @move
waitmovement 0x0
msgbox @text
boxset 6
applymovement [COLOR="Blue"]0x00 [/COLOR]@move2
waitmovement 0x0
setflag 0x851
release
end

#org @text2
[COLOR="Blue"]= \hAB[/COLOR]

#org @move
#raw 0x00 0x11 0x11 0x03 [COLOR="Red"]0xFE[/COLOR]

org @text
= Good morning!\nProfessor Cedar wanted to see you!

#org @move2
#raw 0x00 0x10 0x10 0x02 [COLOR="Red"]0xFE

#org @done
release
end[/COLOR]

red ones are what you lack, while the blue ones are questionable...

here's my fixed version of your script...

Code:
#dynamic 0x71A294

#org @start
checkflag 0x851
if 0x1 goto @done
message @text2
boxset 0x6
applymovement 0x01 @move
waitmovement 0x0
message @text
boxset 0x6
applymovement 0x01 @move2
waitmovement 0x0
setflag 0x851
release
end

#org @text2
= \hAB

#org @move
#raw 0x00 0x11 0x11 0x03 0xFE

org @text
= Good morning!\nProfessor Cedar wanted to see you!

#org @move2
#raw 0x00 0x10 0x10 0x02 0xFE

#org @done
release
end
 
the script above just freezes

i need a script that make HIRO follow some one like how you have to follow oak if you attempt to go into the grass, i need it to have somthing showing me (put downsteps here) (right, left Up)
and i also wanted it to give hiro item at the end
i am using leaf green if that helps
and XSE for script
I aslo need an item list including pokedex please help
 
Last edited:
the script above just freezes

i need a script that make HIRO follow some one like how you have to follow oak if you attempt to go into the grass, i need it to have somthing showing me (put downsteps here) (right, left Up)
and i also wanted it to give hiro item at the end
i am using leaf green if that helps
and XSE for script
I aslo need an item list including pokedex please help

Please don't ask for scripts here we don't have time for it
Here read this Poke script or this XSE
Good Luck
 
yeah i set the No.s and i still freezes, what is that scripts action anyway, what happends
 
Hello,
I've got a problem with this script o' mine:
Code:
#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x904
if b_true goto @heal
checkflag 0x903
if b_true goto @newest
checkflag 0x902
if b_true goto @newer
checkitem 0x10D 0x1
if b_true goto @new
msgbox @normal
boxset 0x6
release
end

#org @new
msgbox @shop2
boxset 0x6
removeitem 0x10D 0x1
setflag 0x902
release
end

#org @newer
msgbox @sleep
boxset 0x6
release
end

#org @newest
msgbox @morn
boxset 0x6
givepokemon 0xF6 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @getPK
boxset 0x4
waitfanfare
#raw 0x68
setflag 0x828
msgbox @bye
boxset 0x6
setflag 0x904
release
end

#org @heal
msgbox @wellback
boxset 0x4
#raw 0x68
fadescreen 0x1
fanfare 0x100
special 0x0
waitfanfare
fadescreen 0x0
msgbox @fin
boxset 0x6
release
end


#org @normal
= Dad: You better get going, if you want to\nbe home before night, [player].

#org @shop2
= Dad: Oh, welcome back, [player].\pDid you get the parcel?\p...\pYou did? Great!\p[player] gave Dad the parcel.\pYes, this is it...\pIt's been a long day, [player].\nGo upstairs and get some rest.\pAfter all, it is your birthday tomorrow.

#org @sleep
= Dad: Go get some sleep, [player].

#org @morn
= Dad: Good morning, [player].\nAnd happy birthday, too.\pToday is the day you are allowed to have\nyour first Pokemon.\pSo... I guess this is it then.\nHere you go [player].

#org @getPK
= [player] received a Larvitar.

#org @bye
= Dad: Now that you have your Pokémon, I\nguess you're eager to explore the world\land create a bond with your Pokémon...\pI just want to say, good luck.\pAnd I hope you'll come and visit me now\nand then, okay?\lGood bye, [player].

#org @wellback
= Dad: Welcome home, [player].\nYou look a little tired.\pI think you should rest a bit.

#org @fin
= Dad: You and and your Pokémon look much better\nnow.\pSee you, [player].

-----------------------------------------------------------

Okay now I have a new problem:
As soon as the map is reset where the previous script is
taking place, it's like all the flags have been cleared, why?
ALl flags work properly as long as I saty on the map, but as soon
as I leave-return they're cleared.

I usually have no problems with scripting, but I
have been into RPGmaking so, I have forgotten some stuff...

If someone can help me, please do.

@Score_under: That won't work as the last of the flags
must always be active (even after leaving map).
That way it wouldn't work do as you say.

If somebody knows what the problem is, do tell me.

//44tim44
 
What's wrong with this script?

Code:
-----------------------
#org 0x8000A2
if 0x0 goto 0x88000B3
if 0x1 goto 0x8800124
end

'-----------------------
#org 0x8000B3
lock
msgbox 0x88000C9 '"Oh!\pMom said not to leave Rubyflam..."
callstd 0x6
applymovement MOVE_PLAYER 0x8800121
waitmovement 0x0
release
end

'-----------------------
#org 0x800124
release
end


'-----------
' Movements
'-----------
#org 0x800121
#raw C 'Step Down (Slow)
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x8000C9
= Oh!\pMom said not to leave Rubyflame\nwithout a Pokémonn....\pBut where can I get one?

When playtesting, if I step on where the script is, the game freezes up.


Please help! Thanks!
 
What's wrong with this script?

Code:
-----------------------
#org 0x8000A2
if 0x0 goto 0x88000B3
if 0x1 goto 0x8800124
end

'-----------------------
#org 0x8000B3
lock
msgbox 0x88000C9 '"Oh!\pMom said not to leave Rubyflam..."
callstd 0x6
applymovement MOVE_PLAYER 0x8800121
waitmovement 0x0
release
end

'-----------------------
#org 0x800124
release
end


'-----------
' Movements
'-----------
#org 0x800121
#raw C 'Step Down (Slow)
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x8000C9
= Oh!\pMom said not to leave Rubyflame\nwithout a Pokémonn....\pBut where can I get one?
When playtesting, if I step on where the script is, the game freezes up.


Please help! Thanks!

In A-Map, use this for your settings:

Unknown: 0300
Var # : 4050
Everything under it:Rest is fine
 
Aargh! I spent all of today trying to find out: WHAT'S WRONG???
This is the script that warps you:
Spoiler:

This is the level script:
Spoiler:

For some reason, the level script doesn't activate.
I have the flag in A-Map set to 7000, the value set to zero, and I've fixed A-Map's error with the level script.
HELP ME PLEASE!!!!!!!!!!!!

Did you use variable 0x7000 somewhere else, perhaps?
Also, could you post the full level script? AM -> Professional Header View -> Header -> Map Script Offset. Copy and paste into XSE, check the Level Script option and decompile.


Oh. lol. I guess i wasn't paying attention >_<
Now, the problem is, that when I click Yes, it goes to the NO pointer and when I click No it goes to the yes pointer.
Spoiler:

When you use if 0x0 goto @something, it's like telling the script "if the above condition was false (0x0) then goto the @something part". If you mix those things, you better use B_TRUE (and B_FALSE) eventually. Same applies for B_YES and B_NO while using compare. Also, remember that whenever you check if the answer is yes or no, you don't need to check it again. If it wasn't yes, it's obvious it was no and vice-versa.
There's another problem. Whatever the answer was, you're using goto. Hence no return.
In other words, the multichoice part would be never executed.
Here's the fixed script:

Spoiler:



I just learned how to make level scripts, and everything is working fine except for one problem I'm running into. You see I set a flag in the beginning of the game to hide a sprite in one of the houses in pallet town. That flag was 112. So the sprite was hidden. Then I went and made a script that when I talk to a man he leads him to his house, and in his house I put a level script where he gives me a Pokemon (celebi). It all works fine, and I get the Celebi and everything. I made it so that the flag I set in the beginning of the game is cleared when I talk to the man, because I want the sprite in the house that he's leading me to to be visible again. So, the sprite is visible again and all works fine. HOWEVER, my problem is that when I go into the house without talking to the old man, as soon as I enter the house, the game freezes... Or at least the character freezes. I've been trying to solve this for like 2 weeks but to no avail... any help?

Here are my 2 scripts:

The first one, when the old man leads me to his house (this one works fine)

Spoiler:


Here is the LEVEL script:

Spoiler:


I'm not sure If I posted this same issue here before and pmed a lot of people but I still didn't get it to work. Oh and the type of level script I'm doing is the "validates values, loads handler to 0x30000EB0" since that's the only one I know how to use and if I try to experiment with the other types it leads to failure.. so yeah.... Oh and people keep telling me stuff like don't use flags used in the game and variables use in the game but I already know that and I tried using different variables and flags it made no difference.

Well, the first thing I would try is replacing all those unsafe flags with better values, like 0x1001 and above. Also, could you post the full level script? See the details I wrote above.




that's the use of those? o.O
I still think they are pretty useless :\ , because no matter what I type on those "x and Y coordinates", the player will always land on where I put the warp tile, at least, in Ruby...

But thanks for that information though. :)

No, it's not useless. The coordinates will be triggered by a special value of the warp number: 0xFF.

Normal warp:
Code:
warp 0x4 0x1 0x0 0x0 0x0

Same as above + coords:
Code:
warp 0x4 0x1 0xFF 0x2 0x6


Nothing is wrong, but the rename part won't work, unless setvar 0x8004 0x0 is added.

Maybe you should explaing why it works like that. Well, the rename Pokémon special will check the value of variable 0x8004 to decide what Pokémon actually needs to be renamed.
When you you get the first Pokémon, you need to set 0x8004 to 0x0 because 0x0 means the first one in the player's party.


I have a question about XSE scripting...

For example, I am done scripting SCRIPT A, e.g.;
Spoiler:

and I compiled it in the ROM and it took the offset 0x900000 and consumed it all the way to 0x900100.
and then I compiled SCRIPT B, e.g.;

Spoiler:

and compiled successfully and it took offsets 0x900101 to 0x900200...

then suddenly, I tried it out in the ROM and SCRIPT A didn't worked the way I wanted it to. So I opened SCRIPT A and added some codes to perfect it.
so it turned like this;

Spoiler:

now my question...
since I already compiled SCRIPT A first and then I compiled SCRIPT B and afterwards I edited SCRIPT A and compiled it back, will XSE overwrite the offsets of SCRIPT B or will find free sp
ace either automatically or the offsets after SCRIPT B?

Thanks~

When you compile something using just dynamic offset, nothing will be ever overwritten.
Also, it doesn't make a lot of sense changing the #dynamic offset each time since XSE will just use the value as a starting point for the free space search inside the ROM. It would be a waste of time looking right from the beginning or something, so you can use FSF for example to get your offset and then you don't need to change it... ever, unless you add a LOT of data and therefore it's better to find a new offset.
All XSE need is that offset, after all. Searching free space it's its job.


Hello,
I've got a problem with this script o' mine:
Spoiler:

The problem is, even though I have "Item 10D" the scipt continues with "msgbox @normal
boxs..." instead of jumping to "@new".

If anyone know how to fix it, please tell me.
//44tim44

That happens because you're not using the checkitem command properly.
I won't stop repeating you should use only 0x1001 and above as flag values.
Look at this carefully:

Spoiler:


Hi, I am really new to scripting and I need some help.

This script freeses up once the player goes on the script tile here.

Spoiler:

Oh and I'm using XSE

After each msgbox you need to use callstd/boxset (until the new XSE is released, at lest).
At the end of each movement you need to put 0xFE to make it stop.
Also, checkflag alone isn't enough. You need to use the if command too.
Finally, use better flags, 0x1001 and above.

Don't forget script triggers - green "S" - should always set up like this:

[PokeCommunity.com] [Archive] Script help thread


Most of the times, it will work just fine. Using always the same variable isn't a really good practice, but most people do that anyway.
Fixed script below:

Spoiler:



What's wrong with this script?

Spoiler:

When playtesting, if I step on where the script is, the game freezes up.


Please help! Thanks!

I wonder how that script was working...
You didn't even use checkflag/setflag. See the remark above.
Anyway, this is the fixed script:

Spoiler:
 
Last edited:
Status
Not open for further replies.
Back
Top