Script Help Thread (DO NOT REQUEST SCRIPTS) Page 216

Started by HackMew December 20th, 2008 5:10 AM
  • 625760 views
  • 9682 replies
Male
Seen February 8th, 2016
Posted September 4th, 2012
66 posts
13.2 Years
What's wrong whit this script?:


#org $start
lock
faceplayer
cry 0xA1 406
#raw 0x33
pause 0x30
message $cry
$cry 1 = Grrrawwhh!
boxset 6
wildbattle 406 1 1
pause 0x60
fadescreen 0
removesprite 0x800F
setflag 0x1211
pause 0x10
fadescreen 0
release
end

In XSE I get:
Fout 13 'type mismatch' op lijn 1.
Geen #define of parameter.
Lijn: #org $start
Male
Seen August 27th, 2014
Posted October 24th, 2013
79 posts
12.9 Years
Need help.
Trying to compile script. It won't work.
Using XSE

'-----------------------
#dynamic 0x71F050

#org @start
msgbox @talk 0x6
giveitem 0xD 0x1 MSG_OBTAIN
end

#org @talk
= Hi.

Says I need to define the perimeter for "giveitem 0xD 0x1 MSG_OBTAIN"
In the tutorial, it doesn't say that. I don't get it.
Try this out.

'-----------------------
#dynamic 0x71F050

#org @start
lock
faceplayer
msgbox @talk 0x6
giveitem 0xD 0x1 0x0 0x0 0x0
release
end

#org @talk
= Hi.
Working on a Fire Red Remake Hack nameless for the time being!

DrFuji

Heiki Hecchara‌‌

Age 30
Male
Aussie
Seen 4 Days Ago
Posted February 12th, 2021
1,693 posts
13.7 Years
Need help.
Trying to compile script. It won't work.
Using XSE

'-----------------------
#dynamic 0x71F050

#org @start
msgbox @talk 0x6
giveitem 0xD 0x1 MSG_OBTAIN
end

#org @talk
= Hi.

Says I need to define the perimeter for "giveitem 0xD 0x1 MSG_OBTAIN"
In the tutorial, it doesn't say that. I don't get it.
There are some .RKC files that come with XSE that translate other scripting tool commands so XSE can understand them. You will have to use the preprocessing directive '#include std' (std is the file that translates MSG_OBTAIN) at the beginning to make this script run in its current format.

Otherwise, you can replace MSG_OBTAIN with 0x0 and still have the same result. MSG_FIND can be replaced with 0x1.
Seen January 1st, 2015
Posted February 15th, 2013
71 posts
13.8 Years
Okay, I'm having more problems.

Spoiler:
'-----------------------
#org 0x71F5FD
lock
faceplayer
checkflag 0x82F
if 0x1 goto 0x872234B
msgbox 0x87226D1 '"Sigh...\nBecause I don't have Runni..."
callstd 0x6
release
end

'-----------------------
#org 0x72234B
checkflag 0x514
if 0x1 goto 0x87226AD
msgbox 0x872272D '"Are those...?\nRunning shoes!\pPlea..."
callstd 0x5
compare LASTRESULT 0x1
if 0x1 goto 0x87226AD
msgbox 0x872276E '"Sniffle..."
callstd 0x6
release
end

'-----------------------
#org 0x7226AD
msgbox 0x872277A '"Gee, thanks, mister!\nRunning Shoes..."
callstd 0x6
setflag 0x514
clearflag 0x82F
applymovement 0x2 0x87226C6
hidesprite 0x2
setflag 0x516
comparefarbytetovar 0x1E1E1E1E 0x1E
comparefarbytetovar 0xFF1E1E1E 0xCD


'-----------
' Movements
'-----------
#org 0x7226C6
#raw 1E 'Step Up (Fast)
#raw 1E 'Step Up (Fast)
#raw 1E 'Step Up (Fast)
#raw 1E 'Step Up (Fast)
#raw 1E 'Step Up (Fast)
#raw 1E 'Step Up (Fast)
#raw 1E 'Step Up (Fast)
#raw 1E 'Step Up (Fast)
#raw 1E 'Step Up (Fast)
#raw 1E 'Step Up (Fast)


'---------
' Strings
'---------
#org 0x7226D1
= Sigh...\nBecause I don't have Running Shoes,\leveryone says I'm uncool!\pIt's so unfair!!!

#org 0x72272D
= Are those...?\nRunning shoes!\pPlease, mister, may I have them?

#org 0x72276E
= Sniffle...

#org 0x72277A
= Gee, thanks, mister!\nRunning Shoes are so 'in'!

When I give the running shoes, she disappears for a second and then runs away when I walk. If I follow her, the game crashes...

Male
Seen January 31st, 2023
Posted September 26th, 2022
55 posts
13.8 Years
Hey, all. I'm getting this problem:
When I try to have a trigger (the green 's' in A-Map) run a trainerbattle, the game stops working. It basically locks you there and never releases, and it never actually runs the script. However, I know it is possible to do this without the game breaking, because it happens in the normal version of the game (Ruby) multiple times.
Thanks.


@Collen: I think your problem might be that you don't have "release" and "end" at the end of #org 0x7226AD. And another thing, you should probably have the "waitmovement" command following "applymovement." Let me know if that works!

Darthatron

巨大なトロール。

Age 31
Male
Melbourne, Australia
Seen February 2nd, 2015
Posted October 28th, 2014
1,152 posts
17.4 Years
Okay, I'm having more problems.

Spoiler:
'-----------------------
#org 0x71F5FD
lock
faceplayer
checkflag 0x82F
if 0x1 goto 0x872234B
msgbox 0x87226D1 '"Sigh...\nBecause I don't have Runni..."
callstd 0x6
release
end

'-----------------------
#org 0x72234B
checkflag 0x514
if 0x1 goto 0x87226AD
msgbox 0x872272D '"Are those...?\nRunning shoes!\pPlea..."
callstd 0x5
compare LASTRESULT 0x1
if 0x1 goto 0x87226AD
msgbox 0x872276E '"Sniffle..."
callstd 0x6
release
end

'-----------------------
#org 0x7226AD
msgbox 0x872277A '"Gee, thanks, mister!\nRunning Shoes..."
callstd 0x6
setflag 0x514
clearflag 0x82F
applymovement 0x2 0x87226C6
waitmovement 0x0
hidesprite 0x2
setflag 0x516
release
end



'-----------
' Movements
'-----------
#org 0x7226C6
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0xFE 'End Movement


'---------
' Strings
'---------
#org 0x7226D1
= Sigh...\nBecause I don't have Running Shoes,\leveryone says I'm uncool!\pIt's so unfair!!!

#org 0x72272D
= Are those...?\nRunning shoes!\pPlease, mister, may I have them?

#org 0x72276E
= Sniffle...

#org 0x72277A
= Gee, thanks, mister!\nRunning Shoes are so 'in'!

When I give the running shoes, she disappears for a second and then runs away when I walk. If I follow her, the game crashes...
I've added in bold what you forgot to add in.

Also, I have no idea why you had those comparefarbytetovar commands. :\
あなた は しきしゃ です
わたし は ばか です

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
Hey, all. I'm getting this problem:
When I try to have a trigger (the green 's' in A-Map) run a trainerbattle, the game stops working. It basically locks you there and never releases, and it never actually runs the script. However, I know it is possible to do this without the game breaking, because it happens in the normal version of the game (Ruby) multiple times.
Thanks.
If you think that your script is causing the problem, then post it here.
However, based on what you have said, I think you forgot to set the unknown and variable numbers of the said "green 's'" tile through Advance Map...
If you're hacking Ruby, then put 0003 on 'Unknown' and 4000 on 'Var Number'.
If you're hacking FireRed, then put 0003 on 'Unknown' and 4050(not sure) on 'Var Number'...
Either which of the ROMs you are hacking, write 0000 on 'Var Value'...

Complans

Trainer

Seen August 27th, 2015
Posted April 11th, 2011
98 posts
13.1 Years
Hi i'm using XSE and Advance Map and trying to script all the people in an art gallery scene. Ive never used XSE before but because it is good for editing scripts and can be opened on A-Map i am trying to learn.

Anyway this is the script
Spoiler:
#dynamic 0x800000

#org @entrance
lock
faceplayer
msgbox @amber 0x6
release
end

#org @amber
= Welcome to the exhibition. I'm Amber and\nthis was put together with the help of the\lLogan Park curators club.\pI hope you like it


and the problem is that whenever i talk to the sprite she faces me but nothing happens and i can just walk away, this only happens once and i have to double tap A again to get her to face me but there is still no text.

Thanks
I am having the same problem. I tried removing faceplayer, lock, and release but it still won't work.
Seen January 1st, 2015
Posted February 15th, 2013
71 posts
13.8 Years
^ try putting "callstd 0x6" after the "msgbox" thing.

I'm having problems with a script as well.
Spoiler:
'-----------------------
#org 0x72221C
checkflag 0x508
if 0x1 goto 0x8722313
end

'-----------------------
#org 0x722313
hidesprite 0x2
end

It's supposed to make a sprite disapear after I activate the flag.
But when I activate the flag (it activates inside a house) and come outside, he's still there, even though the flag is set.

Male
Seen January 31st, 2023
Posted September 26th, 2022
55 posts
13.8 Years

If you think that your script is causing the problem, then post it here.
However, based on what you have said, I think you forgot to set the unknown and variable numbers of the said "green 's'" tile through Advance Map...
If you're hacking Ruby, then put 0003 on 'Unknown' and 4000 on 'Var Number'.
If you're hacking FireRed, then put 0003 on 'Unknown' and 4050(not sure) on 'Var Number'...
Either which of the ROMs you are hacking, write 0000 on 'Var Value'...

Thanks, destinedjagold, it worked quite well!!

Complans

Trainer

Seen August 27th, 2015
Posted April 11th, 2011
98 posts
13.1 Years
^ try putting "callstd 0x6" after the "msgbox" thing.

I'm having problems with a script as well.
Spoiler:
'-----------------------
#org 0x72221C
checkflag 0x508
if 0x1 goto 0x8722313
end

'-----------------------
#org 0x722313
hidesprite 0x2
end

It's supposed to make a sprite disapear after I activate the flag.
But when I activate the flag (it activates inside a house) and come outside, he's still there, even though the flag is set.
Still no luck. I dunno if it's the way I'm adding the scripts to the game, I'm using PokeScript, is this right?

EDIT: I just found out I can compile using XSE.. silly me :P

Complans

Trainer

Seen August 27th, 2015
Posted April 11th, 2011
98 posts
13.1 Years
I'm having another problem, now with applymovement.

My situation is, there is an area like this:

[attachment]

When the player steps on one of the four spaces in front of the man, a message box will come up telling the player to not go in there, and it will move the player three spaces to the left and one up. The thing is, it works perfectly but once the player finishes moving he is stuck there.

Code:
Spoiler:
#dynamic 0x800000
#org @start
msgbox @man 0x06
applymovement 0xFF @move
waitmovement 0xFF
release
end

#org @man
= Man: Whoa, little boy! It's\nnot safe to go in there!

#org @move
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
Male
Seen August 17th, 2016
Posted May 9th, 2015
673 posts
14.2 Years
Oh, right. I should probably mention that it's a Map Script (you know, in the "header" thing?).
Put 508 as the sprite's ID # if you haven't already (to hide a sprite, it must have an ID # and you must set the same flag # equivalent).


I'm having another problem, now with applymovement.

My situation is, there is an area like this:

[attachment]

When the player steps on one of the four spaces in front of the man, a message box will come up telling the player to not go in there, and it will move the player three spaces to the left and one up. The thing is, it works perfectly but once the player finishes moving he is stuck there.

Code:
Spoiler:
#dynamic 0x800000
#org @start
msgbox @man 0x06
applymovement 0xFF @move
waitmovement 0xFF
release
end

#org @man
= Man: Whoa, little boy! It's\nnot safe to go in there!

#org @move
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0xfe
Put #raw 0xfe at the end of the movements - you need this at the end to indicate to the game that there are no more movements to be completed.

Complans

Trainer

Seen August 27th, 2015
Posted April 11th, 2011
98 posts
13.1 Years
Put 508 as the sprite's ID # if you haven't already (to hide a sprite, it must have an ID # and you must set the same flag # equivalent).




Put #raw 0xfe at the end of the movements - you need this at the end to indicate to the game that there are no more movements to be completed.
Thanks! Works perfectly :)
Seen February 23rd, 2015
Posted February 11th, 2012
59 posts
14.4 Years
Problem:
When the script ends the pokeball doesn't dissapear.

Game: FireRed
Type:
Person event
Editor: XSE
Script:
Spoiler:
'---------------
#org 0x800000
lock
faceplayer
msgbox 0x8800022 MSG_FACE '"A co to jest?\nWidocznie jakis tre..."
givepokemon 0x85 0x5 0x0 0x6 0x6 0x6
setflag 0x828
setflag 0x829
fadescreen 0x0
clearflag 0xBB

'---------
' Strings
'---------
#org 0x800022
= A co to jest?\nWidocznie jakis trener\lzgubil swojego pokemon'a i pokedex'a\lOtrzymales EEVEE i POKEDEX



Spherical Ice

Age 25
Leicester, UK
Seen 21 Hours Ago
Posted February 20th, 2022
5,251 posts
15.5 Years
I'm not quite sure what the clearflag there is for, but to hide the Pokéball, you'll need to include this:

hidesprite 0x#
setflag 0x*
# = the person event number of the Pokéball
* = choose a flag, and put it as the Person ID of the Pokéball overworld.

Some other notes: you need to add "release" and "end" to the end of the main part of the script.

Pokepal17

More cowbell~

Age 28
Male
Steeltown
Seen July 7th, 2011
Posted May 22nd, 2011
1,517 posts
14.6 Years
Problem:
When the script ends the pokeball doesn't dissapear.

Game: FireRed
Type:
Person event
Editor: XSE
Script:
Spoiler:
'---------------
#org 0x800000
lock
faceplayer
msgbox 0x8800022 MSG_FACE '"A co to jest?\nWidocznie jakis tre..."
givepokemon 0x85 0x5 0x0 0x6 0x6 0x6
setflag 0x828
setflag 0x829
fadescreen 0x0
clearflag 0xBB

'---------
' Strings
'---------
#org 0x800022
= A co to jest?\nWidocznie jakis trener\lzgubil swojego pokemon'a i pokedex'a\lOtrzymales EEVEE i POKEDEX

Like Spherical Ice said, you need a setflag an hidesprite, but you also need some other stuff. For this example, I'll use the flag 0x828 as the person ID. Also, you don't need the person event number when talking to a sprite as you can use LASTTALKED. Oh, and you don't need lock or faceplayer as the 0x2 in the msgbox construct automatically does it for you.

So here is the fixed script:

#dynamic 0x800000
#org @start
msgbox @speak 0x2
givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
hidesprite LASTTALKED
setflag 0x828
setflag 0x829
fadescreen 0x0
clearflag 0xBB
end

#org @speak
= A co to jest?\nWidocznie jakis trener\lzgubil swojego pokemon'a i pokedex'a\lOtrzymales EEVEE i POKEDEX
Pokémon Stardrop
Seen February 23rd, 2015
Posted February 11th, 2012
59 posts
14.4 Years
Like Spherical Ice said, you need a setflag an hidesprite, but you also need some other stuff. For this example, I'll use the flag 0x828 as the person ID. Also, you don't need the person event number when talking to a sprite as you can use LASTTALKED. Oh, and you don't need lock or faceplayer as the 0x2 in the msgbox construct automatically does it for you.

So here is the fixed script:

#dynamic 0x800000
#org @start
msgbox @speak 0x2
givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
hidesprite LASTTALKED
setflag 0x828
setflag 0x829
fadescreen 0x0
clearflag 0xBB
end

#org @speak
= A co to jest?\nWidocznie jakis trener\lzgubil swojego pokemon'a i pokedex'a\lOtrzymales EEVEE i POKEDEX

Thank you it really helped.


Teh Blazer

Divider of Zero

Age 27
Male
'MERICA
Seen January 18th, 2019
Posted June 19th, 2018
776 posts
14.3 Years
I am hacking Fire Red and I can't get my script to work. I put in the script offset into Advance Map and I put in the values (0003 and 4050) but the script won't activate. I just step over it and nothing happens. Does anyone know why and how to fix it?
Being a hero is overrated anyways

Complans

Trainer

Seen August 27th, 2015
Posted April 11th, 2011
98 posts
13.1 Years
I am hacking Fire Red and I can't get my script to work. I put in the script offset into Advance Map and I put in the values (0003 and 4050) but the script won't activate. I just step over it and nothing happens. Does anyone know why and how to fix it?
The value for 'Unknown' is 0300, not 0003.

I'm having some trouble.. for some reason my scripts seem to get "mixed up", like, in my starter town I have two person scripts. One is a Nurse Joy that heals your Pokemon for $250, and the other is a Team Rocket grunt who gives you a Pidgey. If, I start up the ROM and talk to the grunt first, he will give me it and leave normally, and then if I talk to Nurse Joy she will heal, and after she has, the give-pidgey script seems to start somehow, and I get another Pidgey. If, however, I talk to Nurse Joy first, she will heal, and give me my Pidgey, and then for some reason the rocket grunt dissapears off the map. I am guessing this is because I set to hidesprite <person number> and not LASTTALKED..

Anyway, does anyone know why my scripts get mixed up like this?
Seen January 1st, 2015
Posted February 15th, 2013
71 posts
13.8 Years
I'm having some trouble.. for some reason my scripts seem to get "mixed up", like, in my starter town I have two person scripts. One is a Nurse Joy that heals your Pokemon for $250, and the other is a Team Rocket grunt who gives you a Pidgey. If, I start up the ROM and talk to the grunt first, he will give me it and leave normally, and then if I talk to Nurse Joy she will heal, and after she has, the give-pidgey script seems to start somehow, and I get another Pidgey. If, however, I talk to Nurse Joy first, she will heal, and give me my Pidgey, and then for some reason the rocket grunt dissapears off the map. I am guessing this is because I set to hidesprite <person number> and not LASTTALKED..

Anyway, does anyone know why my scripts get mixed up like this?
Try making Nurse Joy's/Team Rocket Grunt's offset farther away than Team Rocket Grunt's/Nurse Joy's. I was having the same problem, so I added a hundred to the offset to make it work.

Complans

Trainer

Seen August 27th, 2015
Posted April 11th, 2011
98 posts
13.1 Years
Try making Nurse Joy's/Team Rocket Grunt's offset farther away than Team Rocket Grunt's/Nurse Joy's. I was having the same problem, so I added a hundred to the offset to make it work.
Hmm, well now when I try to compile the script it says "#define missing".. I don't see the need for that in this script?

Spoiler:
#dynamic 0x800000

#org @start
lock
faceplayer
showmoney 0x00 0x00 0x00
msgbox @hello 0x5
compare LASTRESULT 0x1 <---- #define is missing
if 0x1 goto @check
msgbox @no 0x6
hidemoney 0x00 0x00
release
end

#org @hello
= Hi! I can fully heal your\nPokémon to full health for \hB7250!\pDo you want me to do this?

#org @no
= Oh, that's too bad.

#org @okay
= Thanks! Here goes!

#org @done
= There! All nice and healthy!\nCome back again!

#org @notenough
= Oh dear! It seems you don't have\nenough money!

#org @check
checkmoney 0xFA 0x00
compare 0x800D 0x1
if 0x4 goto @heal
msgbox @notenough 0x6
hidemoney 0x00 0x00

#org @heal
paymoney 0xFA 0x00
updatemoney 0x00 0x00 0x00
msgbox @okay 0x4
hidemoney 0x00 0x00
closeonkeypress
fadescreen 0x1
fanfare 0x100
special 0x0
waitfanfare
fadescreen 0x0
msgbox @done 0x6

Spherical Ice

Age 25
Leicester, UK
Seen 21 Hours Ago
Posted February 20th, 2022
5,251 posts
15.5 Years
Are you sure you're XSE has all the needed RBH files? If not, then replace LASTRESULT with 0x8005, though you should have all the RBHs in your XSE folder.

I am hacking Fire Red and I can't get my script to work. I put in the script offset into Advance Map and I put in the values (0003 and 4050) but the script won't activate. I just step over it and nothing happens. Does anyone know why and how to fix it?
Mind posting the script?