Script Help Thread (DO NOT REQUEST SCRIPTS) Page 336

Started by HackMew December 20th, 2008 5:10 AM
  • 625717 views
  • 9682 replies
Male
somewhere
Seen November 29th, 2016
Posted June 25th, 2013
82 posts
12.9 Years
hi again, Im confused while using green script boxes. here is a simple script I made:
#dyn 0x740000
#org @main
lock
faceplayer
message @talk
callstd MSG_NORMAL
setvar 0x8001 0x1
release
end

#org @talk
= \v\h01: Good Morning.

First of all what does setvar do and what does 0x8001 mean and 0x1 I know that they are the var number and var value but i dont know what they do and how to use them properly.
Second everytime i step on the script box I trigger it. How can I make it trigger only once? Do I need a second script box for that. Please explain, anyone. Thanks in advance

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
hi again, Im confused while using green script boxes. here is a simple script I made:
#dyn 0x740000
#org @main
lock
faceplayer
message @talk
callstd MSG_NORMAL
setvar 0x8001 0x1
release
end

#org @talk
= \v\h01: Good Morning.

First of all what does setvar do and what does 0x8001 mean and 0x1 I know that they are the var number and var value but i dont know what they do and how to use them properly.
Second everytime i step on the script box I trigger it. How can I make it trigger only once? Do I need a second script box for that. Please explain, anyone. Thanks in advance
I wrote a tutorial on this.... Google "Flags, Vars, & Script Tiles".

I've been experimenting with a few scripts and I've gotten the hang of things. One thing I'm still wondering about are the codes. I know of the \n, \p, and \e. Are there any others?
\l is like \p but it doesn't create a new page, it just goes one more line when you hit A.

Paired with Simba

xboxmandude

Rom Hacker

Age 26
Male
Pakistan
Seen September 26th, 2016
Posted October 22nd, 2015
95 posts
9.9 Years
Look I've read the rules... And I'm not asking for a script.
I want a tutorial on how to make oak give you the national dex.
I know what I have to put its some specialx something. I just don't know how or what else I have to type. Yes.. I am infact a noob.
I know how to make someone else give the national dex.
But I want oak to give it.
If anyone van help me please pm me I will give credit when my hack is completed

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
But if i use a script tile, and i want a trainer with view radius = 7, i need to apply seven different movement depending on where the hero is...or is there a better way to do this?
Yes, that is how it would need to be done, or you could simply put some obstacles in the way and limit the amount of places the player could be when he/she is seen by the trainer.

Paired with Simba
Male
Seen July 14th, 2020
Posted September 14th, 2015
215 posts
10.7 Years
Anyone help me with this scripting problem? I put this script on a 'script' in advanced map

Spoiler:
'---------------
#org 0x804083
lock
textcolor 0x0
msgbox 0x88040B3 MSG_NORMAL '"Hey! Wait!"
pause 0x1E
applymovement MOVE_PLAYER 0x8804135
waitmovement 0x0
pause 0x1E
msgbox 0x88040C0 MSG_NORMAL '"Team Rocket has been spotted\nin t..."
applymovement MOVE_PLAYER 0x8804132
waitmovement 0x0
release
end


'---------
' Strings
'---------
#org 0x8040B3
= Hey! Wait!

#org 0x8040C0
= Team Rocket has been spotted\nin this area.\pNo one is allowed to pass until\nwe are sure they have left the\larea.


'-----------
' Movements
'-----------
#org 0x804135
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements

#org 0x804132
#raw 0x12 'Step Left (Normal)
#raw 0xFE 'End of Movements


and when I add the var value and var number, I just walk through it and the script doesn't activate. I made sure I was using the right variable and such, but no matter what the script doesnt activate. (the var number is 4010 and the var value is 4)

Why isn't the script activating?
Check out my Pokemon Rom! Click the Image Below!

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)

Age 24
Female
Earth
Seen December 9th, 2016
Posted December 5th, 2016
2,475 posts
10.5 Years
This is a problem because variable 4010 Does not equal 4. You need a script to setvar 4010 To 4 before this could run.
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Youtube Channel

Support me at my site!
Pokémon Platinum Red and Blue

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
This is a problem because variable 4010 Does not equal 4. You need a script to setvar 4010 To 4 before this could run.
Var 4010 is temporary. Of course it won't stay at 0x4.

Paired with Simba

Avara

She/Her
Seen 6 Days Ago
Posted April 10th, 2022
1,305 posts
11.5 Years
In my hack I want to include a sort of tournament type thing, but I want only certain pokemon to be able to be used in it.

Would I just do this by repeating a lot of checkpokemon commands containing the desired pokemon's hex numbers? I didn't know if this would work because you can only have six in your party, and I want more than just six pokemon to be eligible to enter.

I'm (obviously) new to this. I have read all the scripting tutorials out there and tried to write a script for this myself but when I test it it doesn't work. I'm not requesting a script, I just want to know IF it can be done and if so, how.

Another thing I need help with is that my warps coming out of your room at the very start of the game are not working!! I cannot get out of the first screen you go to after the intro, unless I use a warp script, any more experienced people know what the problem might be?

Thanks

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
I've been experimenting with a few scripts and I was wondering what numbers should I use for the var number? Like in flags I can use 200 and up.
I wrote a tutorial on this. Google "Flags, Vars, & Script Tiles".

In my hack I want to include a sort of tournament type thing, but I want only certain pokemon to be able to be used in it.

Would I just do this by repeating a lot of checkpokemon commands containing the desired pokemon's hex numbers? I didn't know if this would work because you can only have six in your party, and I want more than just six pokemon to be eligible to enter.

I'm (obviously) new to this. I have read all the scripting tutorials out there and tried to write a script for this myself but when I test it it doesn't work. I'm not requesting a script, I just want to know IF it can be done and if so, how.

Another thing I need help with is that my warps coming out of your room at the very start of the game are not working!! I cannot get out of the first screen you go to after the intro, unless I use a warp script, any more experienced people know what the problem might be?

Thanks
Checkpokemon, is, unfortunately, not a real command. You will need to use a series of specials to do this. (Now that I think about it, how freaking useful would that be? I think I may just write a new command for that.) I can't remember exactly which specials, but I know that I found them by breaking down the script used in HackMew's remove specific pokemon tutorial/research.

I can't help with your second problem unless I see what's going on.

Paired with Simba
Age 34
Male
Seen March 16th, 2022
Posted February 8th, 2019
416 posts
10.3 Years
Another thing I need help with is that my warps coming out of your room at the very start of the game are not working!! I cannot get out of the first screen you go to after the intro, unless I use a warp script, any more experienced people know what the problem might be?

Thanks
I am assuming you changed the room at the start of the game, if this is the case,
you probably put a warp on a tile that was not a "door"... a screenshot would help the diagnosis tho... or atleast some more info
Male
Seen February 13th, 2016
Posted April 28th, 2014
48 posts
12.5 Years
I'm having a problem with a map connection. Going through is fine, then if I try to go back, the connection is blocked off as if there is a 1 movement permission there, but there isn't. It also shows a block of tiles to the left on the original route that are the border block for both maps. I do not have any tiles in either map, within the first 7 of the connection, that are not present in the tileset of both maps.

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)

Age 24
Female
Earth
Seen December 9th, 2016
Posted December 5th, 2016
2,475 posts
10.5 Years
Your map connections are messed up do to am 1.95. That's why you should NOT use am 1.95. Plus this is the script help thread, so only scripting problems go here.
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Youtube Channel

Support me at my site!
Pokémon Platinum Red and Blue
Age 34
Male
Seen March 16th, 2022
Posted February 8th, 2019
416 posts
10.3 Years
I'm having a problem with a map connection. Going through is fine, then if I try to go back, the connection is blocked off as if there is a 1 movement permission there, but there isn't. It also shows a block of tiles to the left on the original route that are the border block for both maps. I do not have any tiles in either map, within the first 7 of the connection, that are not present in the tileset of both maps.
go to the header tab... hit ctrl+h then scroll down to the "connection" offset... and overwrite it with all 00000s...

change maps and make sure you save the maps changes

go back to the map with the issues...

then make all new map connections...

I had similar issues in the past and just clearing them out and redoing them always worked... :)
Seen February 1st, 2014
Posted November 23rd, 2013
53 posts
10.6 Years
Hi all,

i still have problems with do something after trainerbattle...actually i have put my script into a script tile, so the problem of use a trainer itself is avoided.

this is the part of my script do some problem:

#org 0x8742315
'-----------------------------------
trainerbattle 0x0 0x275 0x0 0x8186881 0x81BC163
clearflag 0x3C6
jump 0x8151004

#org 0x8151004
'-----------------------------------
msgbox 0x8170D66
callstd MSG_SIGN ' Signpost-style message
compare PLAYERFACING LEFT
...
After the battle end nothing happen and the hero can do some other things...when return to the script tile the script resume from that point and the rest of the part happen...why?

NB. At the start of the script i call a lockall, and in the various exit point i always call a releaseall end

Thanks a lot

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
Hi all,

i still have problems with do something after trainerbattle...actually i have put my script into a script tile, so the problem of use a trainer itself is avoided.

this is the part of my script do some problem:



After the battle end nothing happen and the hero can do some other things...when return to the script tile the script resume from that point and the rest of the part happen...why?

NB. At the start of the script i call a lockall, and in the various exit point i always call a releaseall end

Thanks a lot
You need to set the script up to continue. I believe this should fix it:

#org @start
'-----------------------------------
trainerbattle 0x1 0x275 0x0 @msg1 @msg2 @next
clearflag 0x3C6
jump @jump

#org @next
'-----------------------------------
msgbox @msg
callstd MSG_SIGN ' Signpost-style message
compare PLAYERFACING LEFT
....


Also, judging by the fact that you are using callstd, that means you are using an old version of XSE that has some bugs. I would advise going and getting the version that Gamer2020 just put out about a month ago.

Paired with Simba
Male
Seen June 10th, 2014
Posted July 10th, 2013
6 posts
10.4 Years
This is a noob question but when I finish writing a script and then save it to the desktop I cant figure out how to insert the new script into the ROM, i have pressed compile script but the original still takes effect and is what shows up when the script is edited again.

Please help so I can continue hacking

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
This is a noob question but when I finish writing a script and then save it to the desktop I cant figure out how to insert the new script into the ROM, i have pressed compile script but the original still takes effect and is what shows up when the script is edited again.

Please help so I can continue hacking
What script editor are you using? If you are using XSE, saving it unlinks it from the game and therefore won't compile. If you are using any type of dynamic insertion (#dynamic 0xXXXXXX, #org @start), it will put the script at a brand new location, not even touching the original.

If you are using Pokescript, don't come back until you are using PKSV or XSE. We don't serve Pokescript here anymore because it is very old and outdated and has a very different syntax.

Paired with Simba

chrunch

Male
Seen December 10th, 2021
Posted February 24th, 2021
1,343 posts
13.6 Years
So this is the first time I've touched scripting in about a year or so, and I'm trying to do it off my memory and I have no idea what I'm doing wrong:

#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x820
if 0x1 goto @2
msgbox @1 0x6
release
end

#org @1
= You're getting your first Pokemon\ntoday, right? Good luck on your\ljourney, [player]!

#org @2
= Wow, you've came so far since you\ngot your Pokemon, [player]! I wish I\lcould be like you!
when I compile that it turns into this:
'---------------
#org 0x8039E5
lock
faceplayer
checkflag 0x820
if 0x1 goto 0x8803A4C
msgbox 0x88039FB MSG_NORMAL '"You're getting your first Pokemon\..."
release
end

'---------------
#org 0x803A4C
warpteleport2 0xE3 0xEB 0xB8 0xED00 0xE9E3
givecoins 0xD9EA
nop

'---------
' Strings
'---------
#org 0x8039FB
= You're getting your first Pokemon\ntoday, right? Good luck on your\ljourney, [player]!
I haven't done scripting in a long time so there are probably 20 mistakes in there but I'm confused as to why this is happening ;_;

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
So this is the first time I've touched scripting in about a year or so, and I'm trying to do it off my memory and I have no idea what I'm doing wrong:

Spoiler:
#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x820
if 0x1 goto @2
msgbox @1 0x6
release
end

#org @1
= You're getting your first Pokemon\ntoday, right? Good luck on your\ljourney, [player]!

#org @2
= Wow, you've came so far since you\ngot your Pokemon, [player]! I wish I\lcould be like you!

when I compile that it turns into this:
Spoiler:
'---------------
#org 0x8039E5
lock
faceplayer
checkflag 0x820
if 0x1 goto 0x8803A4C
msgbox 0x88039FB MSG_NORMAL '"You're getting your first Pokemon\..."
release
end

'---------------
#org 0x803A4C
warpteleport2 0xE3 0xEB 0xB8 0xED00 0xE9E3
givecoins 0xD9EA
nop

'---------
' Strings
'---------
#org 0x8039FB
= You're getting your first Pokemon\ntoday, right? Good luck on your\ljourney, [player]!


I haven't done scripting in a long time so there are probably 20 mistakes in there but I'm confused as to why this is happening ;_;
It's not bad, you just have no msgbox calling the @2, which is why it is compiling as code instead of text.

Here:

#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x820
if 0x1 goto @2msgbox
msgbox @1 0x6
release
end

#org @2msgbox
msgbox @2 0x6
release
end

#org @1
= You're getting your first Pokemon\ntoday, right? Good luck on your\ljourney, [player]!

#org @2
= Wow, you've came so far since you\ngot your Pokemon, [player]! I wish I\lcould be like you!

Paired with Simba

chrunch

Male
Seen December 10th, 2021
Posted February 24th, 2021
1,343 posts
13.6 Years
It's not bad, you just have no msgbox calling the @2, which is why it is compiling as code instead of text.

Here:

#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x820
if 0x1 goto @2msgbox
msgbox @1 0x6
release
end

#org @2msgbox
msgbox @2 0x6
release
end

#org @1
= You're getting your first Pokemon\ntoday, right? Good luck on your\ljourney, [player]!

#org @2
= Wow, you've came so far since you\ngot your Pokemon, [player]! I wish I\lcould be like you!
Alright, thanks for your help. I knew I'd forgotten something obvious. :P
The Orion Spur
Seen June 23rd, 2015
Posted July 13th, 2013
6 posts
9.9 Years
Hi everyone,
I'm new to scripting, and I've been reading lots of tutorials and picking a few things up. I'm having a problem actually inserting a script onto the map and getting it to run. I can get people to say things/give me pokemon, set flags, and all of that, but the game freezes whenever I try to run even the simplest script event (by that I mean, in advancemaps where you place the 'S' on the screen). I'm using XSE. I even tried copy-pasting other scripts from the game and it still freezes. It compiles and is added to the ROM with no problems.

It seems that most (all?) of the tutorials start from the point of being able to make scripts work, and then explain what to type, which is very helpful, but not exactly the help that I need
Thanks in advance