Advertiser Content

Help Thread Script Help Thread

Started by Spherical Ice November 29th, 2014 12:35 PM
  • 64765 views
  • 1049 replies

Spherical Ice

Age 21
Bristol, UK
Seen 17 Hours Ago
Posted 3 Weeks Ago
5,254 posts
11.9 Years

Script Help Thread


This thread is for any questions related to the creation of events and scripting in the Pokémon games. Post here with your script embedded in [SPOILER]spoiler tags[/SPOILER], stating somewhere in your post the ROM the script is intended for and the syntax you are using (e.g. XSE, PKSVUI, etc.).

Thread rules


Do not demand for answers to your questions!
People do not have to answer your questions, they do it because they want to! Not only are those posts annoying, they also are completely pointless! If such a post is found, it will probably be deleted.

Wrap your scripts in [SPOILER]spoiler tags[/SPOILER].
This is here to keep the thread as easy to browse as possible, as most scripts tend to take up multiple lines and this can make scrolling through the thread a chore.

When answering, quote the post with the question.
This is here to simply keep organization. It is much easier to read the thread when you have both the question and the answer. The users quoted will also get a notification so they will know their question has been replied to.

U.Flame

Humbled Beginner

Age 24
Male
Sapphire City
Seen 4 Hours Ago
Posted 19 Hours Ago
1,286 posts
11.4 Years
I'm getting back into my Sapphire hack with scripting. I gave up on finding the follow-up clock script and instead decided to expand the entry script with the intent of bypassing interacting with the clock. Problem is, the script won't add new movements. I encountered this problem once before, and the solution was to use a new offset instead of using the old one. That gave the space needed for the expansion of the script, so naturally I tried using a new offset here. For some reason, that didn't work. I made a small temporary adjustment to the text to test if the script can be edited, and it was successful, meaning the problem is with the movement alone. Why didn't the new offset work? Using XSE by the way.

This is the script before I attempted to expand it:
Spoiler:
'---------------
#org 0x243EBA
lockall
setvar 0x8004 0x1
setvar 0x8005 0x0
goto 0x8243ECB

'---------------
#org 0x243ECB
msgbox 0x8243F2D MSG_KEEPOPEN '"What do you think? I already\nunpa..."
applymovement 0x8004 0x8243FEC
waitmovement 0x0
compare 0x8005 0x0
if 0x1 call 0x8243F15
compare 0x8005 0x1
if 0x1 call 0x8243F21
msgbox 0x8243F83 MSG_KEEPOPEN '"See, I even made you a room in the..."
closeonkeypress
setvar 0x4092 0x4
applymovement MOVE_PLAYER 0x8243FEF
applymovement 0x8004 0x8243FF2
waitmovement 0x0
releaseall
end

'---------------
#org 0x243F15
applymovement MOVE_PLAYER 0x8243FF5
waitmovement 0x0
return

'---------------
#org 0x243F21
applymovement MOVE_PLAYER 0x8243FF8
waitmovement 0x0
return


'---------
' Strings
'---------
#org 0x243F2D
= What do you think? I already\nunpacked nearly everything.\pWell, except the basement.

#org 0x243F83
= See, I even made you a room in the\ncorner! Go check it out!\pOh, and set your clock while\nyou're at it.


'-----------
' Movements
'-----------
#org 0x243FEC
#raw 0x3E 'Face Player
#raw 0xFE 'End of Movements

#org 0x243FEF
#raw 0x9 'Step Up (Normal)
#raw 0xFE 'End of Movements

#org 0x243FF2
#raw 0x26 'Step on the Spot Up (Fastest)
#raw 0xFE 'End of Movements

#org 0x243FF5
#raw 0x28 'Step on the Spot Right (Fastest)
#raw 0xFE 'End of Movements

#org 0x243FF8
#raw 0x27 'Step on the Spot Left (Fastest)
#raw 0xFE 'End of Movements


Here is my expansion attempt. As you can see, I replaced the offset with a new one from Free Space Finder. The change is on movement string 0x243FEF, where I tried adding new movement:
Spoiler:
'---------------
#org 0x246707
lockall
setvar 0x8004 0x1
setvar 0x8005 0x0
goto 0x8243ECB

'---------------
#org 0x243ECB
msgbox 0x8243F2D MSG_KEEPOPEN '"What do you think? I already\nunpa..."
applymovement 0x8004 0x8243FEC
waitmovement 0x0
compare 0x8005 0x0
if 0x1 call 0x8243F15
compare 0x8005 0x1
if 0x1 call 0x8243F21
msgbox 0x8243F83 MSG_KEEPOPEN '"See, I even made you a room in the..."
closeonkeypress
setvar 0x4092 0x4
applymovement MOVE_PLAYER 0x8243FEF
applymovement 0x8004 0x8243FF2
waitmovement 0x0
releaseall
end

'---------------
#org 0x243F15
applymovement MOVE_PLAYER 0x8243FF5
waitmovement 0x0
return

'---------------
#org 0x243F21
applymovement MOVE_PLAYER 0x8243FF8
waitmovement 0x0
return


'---------
' Strings
'---------
#org 0x243F2D
= do you think? I already\nunpacked nearly everything.\pWell, except the basement.

#org 0x243F83
= See, I even made you a room in the\ncorner! Go check it out!\pOh, and set your clock while\nyou're at it.


'-----------
' Movements
'-----------
#org 0x243FEC
#raw 0x3E 'Face Player
#raw 0xFE 'End of Movements

#org 0x243FEF
#raw 0x9 'Step Up (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0x26 'Step on the Spot Up (Fastest)
#raw 0xFE 'End of Movements

#org 0x243FF2
#raw 0x26 'Step on the Spot Up (Fastest)
#raw 0xFE 'End of Movements

#org 0x243FF5
#raw 0x28 'Step on the Spot Right (Fastest)
#raw 0xFE 'End of Movements

#org 0x243FF8
#raw 0x27 'Step on the Spot Left (Fastest)
#raw 0xFE 'End of Movements
Hacks I'm working on:
(Name in Progress) My main project, actively in development
Tales of Link GBA Remake: Secondary project, developing whenever I'm able.
3rd Gen Multiplayer Project: Research and development, really just experimenting for the moment
Pokemon Cursed/Creepy White: Group project, on hiatus for now with plans to return eventually.
Animal Crossing Wild World playing as an animal: experimental, messing with models and textures

Hacks I've worked on in the past:
Pokemon Ruby Destiny Broken Timeline (pre-reboot) - Assisted with maps
Pokemon HeartGold Prince Boo Edition - Experimental project with three small changes. Made at the request of YouTube LPer PrinceBoo21.

Recently came to realize I know significantly less than I thought I did. Basically, years of self-taught experience amounted to very little. After seeking tutorials and help, I've become more competent, but I have a long way to go. I look forward to learning more, in the meantime, I'll call myself a beginner, not a veteran.

Times I've been ninja'd: 18
Times I've ninja'd people: 3

FBI

Free supporter

Male
Unknown Island
Seen 4 Hours Ago
Posted 8 Hours Ago
1,906 posts
6.7 Years
I'm getting back into my Sapphire hack with scripting. I gave up on finding the follow-up clock script and instead decided to expand the entry script with the intent of bypassing interacting with the clock. Problem is, the script won't add new movements. I encountered this problem once before, and the solution was to use a new offset instead of using the old one. That gave the space needed for the expansion of the script, so naturally I tried using a new offset here. For some reason, that didn't work. I made a small temporary adjustment to the text to test if the script can be edited, and it was successful, meaning the problem is with the movement alone. Why didn't the new offset work? Using XSE by the way.

This is the script before I attempted to expand it:
Spoiler:
'---------------
#org 0x243EBA
lockall
setvar 0x8004 0x1
setvar 0x8005 0x0
goto 0x8243ECB

'---------------
#org 0x243ECB
msgbox 0x8243F2D MSG_KEEPOPEN '"What do you think? I already\nunpa..."
applymovement 0x8004 0x8243FEC
waitmovement 0x0
compare 0x8005 0x0
if 0x1 call 0x8243F15
compare 0x8005 0x1
if 0x1 call 0x8243F21
msgbox 0x8243F83 MSG_KEEPOPEN '"See, I even made you a room in the..."
closeonkeypress
setvar 0x4092 0x4
applymovement MOVE_PLAYER 0x8243FEF
applymovement 0x8004 0x8243FF2
waitmovement 0x0
releaseall
end

'---------------
#org 0x243F15
applymovement MOVE_PLAYER 0x8243FF5
waitmovement 0x0
return

'---------------
#org 0x243F21
applymovement MOVE_PLAYER 0x8243FF8
waitmovement 0x0
return


'---------
' Strings
'---------
#org 0x243F2D
= What do you think? I already\nunpacked nearly everything.\pWell, except the basement.

#org 0x243F83
= See, I even made you a room in the\ncorner! Go check it out!\pOh, and set your clock while\nyou're at it.


'-----------
' Movements
'-----------
#org 0x243FEC
#raw 0x3E 'Face Player
#raw 0xFE 'End of Movements

#org 0x243FEF
#raw 0x9 'Step Up (Normal)
#raw 0xFE 'End of Movements

#org 0x243FF2
#raw 0x26 'Step on the Spot Up (Fastest)
#raw 0xFE 'End of Movements

#org 0x243FF5
#raw 0x28 'Step on the Spot Right (Fastest)
#raw 0xFE 'End of Movements

#org 0x243FF8
#raw 0x27 'Step on the Spot Left (Fastest)
#raw 0xFE 'End of Movements


Here is my expansion attempt. As you can see, I replaced the offset with a new one from Free Space Finder. The change is on movement string 0x243FEF, where I tried adding new movement:
Spoiler:
'---------------
#org 0x246707
lockall
setvar 0x8004 0x1
setvar 0x8005 0x0
goto 0x8243ECB

'---------------
#org 0x243ECB
msgbox 0x8243F2D MSG_KEEPOPEN '"What do you think? I already\nunpa..."
applymovement 0x8004 0x8243FEC
waitmovement 0x0
compare 0x8005 0x0
if 0x1 call 0x8243F15
compare 0x8005 0x1
if 0x1 call 0x8243F21
msgbox 0x8243F83 MSG_KEEPOPEN '"See, I even made you a room in the..."
closeonkeypress
setvar 0x4092 0x4
applymovement MOVE_PLAYER 0x8243FEF
applymovement 0x8004 0x8243FF2
waitmovement 0x0
releaseall
end

'---------------
#org 0x243F15
applymovement MOVE_PLAYER 0x8243FF5
waitmovement 0x0
return

'---------------
#org 0x243F21
applymovement MOVE_PLAYER 0x8243FF8
waitmovement 0x0
return


'---------
' Strings
'---------
#org 0x243F2D
= do you think? I already\nunpacked nearly everything.\pWell, except the basement.

#org 0x243F83
= See, I even made you a room in the\ncorner! Go check it out!\pOh, and set your clock while\nyou're at it.


'-----------
' Movements
'-----------
#org 0x243FEC
#raw 0x3E 'Face Player
#raw 0xFE 'End of Movements

#org 0x243FEF
#raw 0x9 'Step Up (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0xB 'Step Right (Normal)
#raw 0x26 'Step on the Spot Up (Fastest)
#raw 0xFE 'End of Movements

#org 0x243FF2
#raw 0x26 'Step on the Spot Up (Fastest)
#raw 0xFE 'End of Movements

#org 0x243FF5
#raw 0x28 'Step on the Spot Right (Fastest)
#raw 0xFE 'End of Movements

#org 0x243FF8
#raw 0x27 'Step on the Spot Left (Fastest)
#raw 0xFE 'End of Movements
That's not a good way to do it. Change the pointer to the movements directly. I.e:

...
applymovement PLAYER 0xOldOffset
pauseevent 0x0
...

Would become

...
applymovement PLAYER 0xNewOffset
pauseevent 0x0
...
Where NewOffset is the location to the new movement commands. Another thing is, do yourself a favor and hack Emerald or Fire Red. R/S/LG aren't very good choices for ROM bases.
...

U.Flame

Humbled Beginner

Age 24
Male
Sapphire City
Seen 4 Hours Ago
Posted 19 Hours Ago
1,286 posts
11.4 Years
Ah, so I just have to replace that offset instead. Thank you. If serious problems occur down the road, I may switch to a more stable ROM, but Sapphire's really grown on me. Not to mention there are like, no Sapphire hacks (even if it is for good reason), so I'm also kinda trying to prove something here.

Wait, no, that didn't work either. What's the problem here? At this point I'm starting to doubt it's the offsets. I tested altering the text again and confirmed I'm editing the right script, so it's not a mix-up.
Could it be something I'm doing wrong on Free Space Finder?
Hacks I'm working on:
(Name in Progress) My main project, actively in development
Tales of Link GBA Remake: Secondary project, developing whenever I'm able.
3rd Gen Multiplayer Project: Research and development, really just experimenting for the moment
Pokemon Cursed/Creepy White: Group project, on hiatus for now with plans to return eventually.
Animal Crossing Wild World playing as an animal: experimental, messing with models and textures

Hacks I've worked on in the past:
Pokemon Ruby Destiny Broken Timeline (pre-reboot) - Assisted with maps
Pokemon HeartGold Prince Boo Edition - Experimental project with three small changes. Made at the request of YouTube LPer PrinceBoo21.

Recently came to realize I know significantly less than I thought I did. Basically, years of self-taught experience amounted to very little. After seeking tutorials and help, I've become more competent, but I have a long way to go. I look forward to learning more, in the meantime, I'll call myself a beginner, not a veteran.

Times I've been ninja'd: 18
Times I've ninja'd people: 3

FBI

Free supporter

Male
Unknown Island
Seen 4 Hours Ago
Posted 8 Hours Ago
1,906 posts
6.7 Years
Ah, so I just have to replace that offset instead. Thank you. If serious problems occur down the road, I may switch to a more stable ROM, but Sapphire's really grown on me. Not to mention there are like, no Sapphire hacks (even if it is for good reason), so I'm also kinda trying to prove something here.

Wait, no, that didn't work either. What's the problem here? At this point I'm starting to doubt it's the offsets. I tested altering the text again and confirmed I'm editing the right script, so it's not a mix-up.
Could it be something I'm doing wrong on Free Space Finder?
I tried it and it worked for me. :o
Try this:

...
applymovement PLAYER 0xOld
...
...
call 0x8NewOffset
...
and at new offset compile this:

#org @newOffset
applymovement PLAYER @something
pauseevent 0x0
return

#org @something
m movements end


If that doesn't work, just scrap the whole script and redo it all :D
...

U.Flame

Humbled Beginner

Age 24
Male
Sapphire City
Seen 4 Hours Ago
Posted 19 Hours Ago
1,286 posts
11.4 Years
Alright, I'm going to try using a new script. I want to copy and paste some parts of the script over, but XSE doesn't have the paste option working, whether I copy or cut. It used to work before, is there some setting for it?

Anyway, I tried a new script, and now I can't get any movement at all! It's as simple as possible and there's still some kind of conflict? What's wrong here?

Spoiler:
'---------------
#org 0x24FEED
msgbox 0x824FF04 MSG_NORMAL '"Testing...\nTesting...\pDoes this ..."
applymovement MOVE_PLAYER 0x824FF2C
setvar 0x4092 0x4
release
end


'---------
' Strings
'---------
#org 0x24FF04
= Testing...\nTesting...\pDoes this work?


'-----------
' Movements
'-----------
#org 0x24FF2C
#raw 0x9 'Step Up (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0xFE 'End of Movements
Hacks I'm working on:
(Name in Progress) My main project, actively in development
Tales of Link GBA Remake: Secondary project, developing whenever I'm able.
3rd Gen Multiplayer Project: Research and development, really just experimenting for the moment
Pokemon Cursed/Creepy White: Group project, on hiatus for now with plans to return eventually.
Animal Crossing Wild World playing as an animal: experimental, messing with models and textures

Hacks I've worked on in the past:
Pokemon Ruby Destiny Broken Timeline (pre-reboot) - Assisted with maps
Pokemon HeartGold Prince Boo Edition - Experimental project with three small changes. Made at the request of YouTube LPer PrinceBoo21.

Recently came to realize I know significantly less than I thought I did. Basically, years of self-taught experience amounted to very little. After seeking tutorials and help, I've become more competent, but I have a long way to go. I look forward to learning more, in the meantime, I'll call myself a beginner, not a veteran.

Times I've been ninja'd: 18
Times I've ninja'd people: 3

destinedjagold

You Can Contact me in PC's Discord

Age 29
Male
Philippines
Seen 1 Day Ago
Posted May 6th, 2019
8,596 posts
12.4 Years
Alright, I'm going to try using a new script. I want to copy and paste some parts of the script over, but XSE doesn't have the paste option working, whether I copy or cut. It used to work before, is there some setting for it?

Anyway, I tried a new script, and now I can't get any movement at all! It's as simple as possible and there's still some kind of conflict? What's wrong here?

Spoiler:
'---------------
#org 0x24FEED
msgbox 0x824FF04 MSG_NORMAL '"Testing...\nTesting...\pDoes this ..."
applymovement MOVE_PLAYER 0x824FF2C
setvar 0x4092 0x4
release
end


'---------
' Strings
'---------
#org 0x24FF04
= Testing...\nTesting...\pDoes this work?


'-----------
' Movements
'-----------
#org 0x24FF2C
#raw 0x9 'Step Up (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0xFE 'End of Movements
...erm... you forgot the [waitmovement 0x0] command after your [applymovement]. :/

U.Flame

Humbled Beginner

Age 24
Male
Sapphire City
Seen 4 Hours Ago
Posted 19 Hours Ago
1,286 posts
11.4 Years
...oh. Well let's see if that works. Thanks!
Holy crap that's been the problem since the beginning. Thanks man, that was embarrassing.

So I'm having a bit of a problem implementing the clock event. Here's what I have so far:
Spoiler:
'---------------
#org 0x246707
lockall
setvar 0x8004 0x1
setvar 0x8005 0x0
goto 0x8243ECB

'---------------
#org 0x243ECB
msgbox 0x8243F2D MSG_KEEPOPEN '"What do you think? I already\nunpa..."
applymovement 0x8004 0x8243FEC
waitmovement 0x0
compare 0x8005 0x0
if 0x1 call 0x8243F15
compare 0x8005 0x1
if 0x1 call 0x8243F21
msgbox 0x8243F83 MSG_KEEPOPEN '"See, I even made you a room in the..."
closeonkeypress
setvar 0x4092 0x4
Spoiler:
applymovement 0x8004 0x246727
waitmovement 0x0

applymovement MOVE_PLAYER 0x246717
waitmovement 0x0
call 0x246737
applymovement 0x8004 0x246757
waitmovement 0x0

#org 0x246737
fadescreen 0x1
special 0x9A
waitstate
setflag 0x51
setflag 0x2F2
setflag 0x2F3
return

'---------------
#org 0x243F15
applymovement MOVE_PLAYER 0x8243FF5
waitmovement 0x0
return

'---------------
#org 0x243F21
applymovement MOVE_PLAYER 0x8243FF8
waitmovement 0x0
return


'---------
' Strings
'---------
#org 0x243F2D
= What do you think? I already\nunpacked nearly everything.\pWell, except the basement.

#org 0x243F83
= See, I even made you a room in the\ncorner! Go check it out!\pOh, and set your clock while\nyou're at it.


'-----------
' Movements
'-----------
#org 0x243FEC
#raw 0x3E 'Face Player
#raw 0xFE 'End of Movements

#org 0x246717
#raw 0x9 'Step Up (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0xB
#raw 0xB
#raw 0xB
#raw 0xB
#raw 0xB
#raw 0xB
#raw 0x9
#raw 0x9
#raw 0x9
#raw 0x9
#raw 0xFE 'End of Movements

#org 0x246727
#raw 0x26
#raw 0xFE 'End of Movements

#org 0x246757
#raw 0x9
#raw 0x9
#raw 0xFE

#org 0x243FF8
#raw 0x27 'Step on the Spot Left (Fastest)
#raw 0xFE 'End of Movements

It activates the clock event, but doesn't continue the script after that part. The extra spoiler'd part there was a small extra movement I wanted to add, but it stops the clock event from activating for some reason. I could do without it, but I'd like to fix it if possible. How do I continue the script after setting the clock, and is there a way to add that extra movement part?
Hacks I'm working on:
(Name in Progress) My main project, actively in development
Tales of Link GBA Remake: Secondary project, developing whenever I'm able.
3rd Gen Multiplayer Project: Research and development, really just experimenting for the moment
Pokemon Cursed/Creepy White: Group project, on hiatus for now with plans to return eventually.
Animal Crossing Wild World playing as an animal: experimental, messing with models and textures

Hacks I've worked on in the past:
Pokemon Ruby Destiny Broken Timeline (pre-reboot) - Assisted with maps
Pokemon HeartGold Prince Boo Edition - Experimental project with three small changes. Made at the request of YouTube LPer PrinceBoo21.

Recently came to realize I know significantly less than I thought I did. Basically, years of self-taught experience amounted to very little. After seeking tutorials and help, I've become more competent, but I have a long way to go. I look forward to learning more, in the meantime, I'll call myself a beginner, not a veteran.

Times I've been ninja'd: 18
Times I've ninja'd people: 3
Male
Italy
Seen July 6th, 2019
Posted February 14th, 2018
267 posts
5 Years
Ok so I'm trying to do a level script so that if a certain flag is active the entire cave should light up, but I can't fully comprehend the lighten command. The entire level script (type 2 right?)doesn't start at all.

Here's my script:

#dynamic 0x800000
#org @start
setvar 0x5004 0x1
checkflag 0x3
if 0x1 goto @flash
release
end

#org @flash
msgbox @uno 0x5
compare LASTRESULT 0X1
if 0x1 goto @flash1
msgbox @none 0x6
release
end

#org @flash1
lighten 0x2
release
end

#org @uno
= wanna use the torch?

#org @none
= test

Christos

Male
Seen 2 Weeks Ago
Posted August 4th, 2019
6,368 posts
13.6 Years
Ok so I'm trying to do a level script so that if a certain flag is active the entire cave should light up, but I can't fully comprehend the lighten command. The entire level script (type 2 right?)doesn't start at all.

Here's my script:

Spoiler:
#dynamic 0x800000
#org @start
setvar 0x5004 0x1
checkflag 0x3
if 0x1 goto @flash
release
end

#org @flash
msgbox @uno 0x5
compare LASTRESULT 0X1
if 0x1 goto @flash1
msgbox @none 0x6
release
end

#org @flash1
lighten 0x2
release
end

#org @uno
= wanna use the torch?

#org @none
= test
Moved your post to the Script Help thread. Your map should be a type 5 one (on entering and on menu close) since you want it to happen every time, otherwise if it's a type 2 it'll only work once and exiting the map and entering again or opening the menu and closing it would mean the cave would be dark again. The script you posted should work even as a type 2 though, at least once.

Make it a type 5 level script, and make it so that after the player chooses to light up the cave another flag is set. So at the beginning of the script there should be a check for that flag, so that the cave will stay lit up if you've chosen to use the torch.

There might be a different way to do this, but I've used something similar in a gym map of mine in Fire Red, based on Brawly's gym level script in Emerald. The script uses darken commands instead of lighten, so the script is the opposite of yours. So in your case, your script should check for the flag that is set after you choose to use the torch, and if it's not set, it should use the darken 0x4 command and ask you if you want to use the torch, otherwise it should end, and the cave would be normal.

A Pokemon that is discriminated!
Support squirtle and make it everyone's favourite.
Male
Italy
Seen July 6th, 2019
Posted February 14th, 2018
267 posts
5 Years
Moved your post to the Script Help thread. Your map should be a type 5 one (on entering and on menu close) since you want it to happen every time, otherwise if it's a type 2 it'll only work once and exiting the map and entering again or opening the menu and closing it would mean the cave would be dark again. The script you posted should work even as a type 2 though, at least once.

Make it a type 5 level script, and make it so that after the player chooses to light up the cave another flag is set. So at the beginning of the script there should be a check for that flag, so that the cave will stay lit up if you've chosen to use the torch.

There might be a different way to do this, but I've used something similar in a gym map of mine in Fire Red, based on Brawly's gym level script in Emerald. The script uses darken commands instead of lighten, so the script is the opposite of yours. So in your case, your script should check for the flag that is set after you choose to use the torch, and if it's not set, it should use the darken 0x4 command and ask you if you want to use the torch, otherwise it should end, and the cave would be normal.
Ok so you're right, it works but just once!

So I put another flag and setted a type 5 level script. This time though nothing happens and the screen is back.
Here's the script:

Spoiler:
#dynamic 0x800000
#org @start
checkflag 0x1006
if 0x1 goto @flash1
checkflag 0x1003
if 0x1 goto @flash
release
end

#org @flash
msgbox @uno 0x5
compare LASTRESULT 0X1
if 0x1 goto @flash1
msgbox @none 0x6
release
end

#org @flash1
sound 0x23
lighten 0x2
setflag 0x1006
setvar 0x5004 0x1
release
end

#org @uno
= Wanna use the torch?

#org @none
= nope

Christos

Male
Seen 2 Weeks Ago
Posted August 4th, 2019
6,368 posts
13.6 Years
Ok so you're right, it works but just once!

So I put another flag and setted a type 5 level script. This time though nothing happens and the screen is back.
Here's the script:

Spoiler:
#dynamic 0x800000
#org @start
checkflag 0x1006
if 0x1 goto @flash1
checkflag 0x1003
if 0x1 goto @flash
release
end

#org @flash
msgbox @uno 0x5
compare LASTRESULT 0X1
if 0x1 goto @flash1
msgbox @none 0x6
release
end

#org @flash1
sound 0x23
lighten 0x2
setflag 0x1006
setvar 0x5004 0x1
release
end

#org @uno
= Wanna use the torch?

#org @none
= nope
Oh, right, I forgot, type 5 level shouldn't work with messages, only for certain flag and variable setting, and other commands such as darken/lighten. Which ROM are you using? By the way, you should put your scripts in spoiler tags whenever you post here.

So what you could do is have two level scripts. A type 2 level script that will ask if you want to use the torch and set a flag and use the lighten command, and another type 5 that will lighten the cave again whenever you open the menu or re-enter the cave.

A Pokemon that is discriminated!
Support squirtle and make it everyone's favourite.
Male
Italy
Seen July 6th, 2019
Posted February 14th, 2018
267 posts
5 Years
Oh, right, I forgot, type 5 level shouldn't work with messages, only for certain flag and variable setting, and other commands such as darken/lighten. Which ROM are you using? By the way, you should put your scripts in spoiler tags whenever you post here.

So what you could do is have two level scripts. A type 2 level script that will ask if you want to use the torch and set a flag and use the lighten command, and another type 5 that will lighten the cave again whenever you open the menu or re-enter the cave.
It all went just like you said, thank you!
Just one little problem, if I say No the first level script will keep repeating until I wont say yes.

Christos

Male
Seen 2 Weeks Ago
Posted August 4th, 2019
6,368 posts
13.6 Years
It all went just like you said, thank you!
Just one little problem, if I say No the first level script will keep repeating until I wont say yes.
Set the variable of the level script to 1 before the question to use the torch. Though this would make it so that if you choose no you don't get to be asked again, this is how type 2 level scripts work. Only thing I can think of to make it ask you this question whenever you enter the cave map is a variable that would reset after you exit the cave. I don't know if there are such temporary variables but what you could do is have type 5 level scripts on all the maps that have an entrance to the cave, such that if your variable is set to 1 after the cave level script, it would be set back to 0 so that the cave level script can be executed again.

A Pokemon that is discriminated!
Support squirtle and make it everyone's favourite.

Sensual

This should be good.

Male
Seen August 3rd, 2018
Posted December 12th, 2017
106 posts
5.1 Years
Yo, I'm having a very simple problem here and I cannot figure it out for the life of me.

The scenario is that an NPC will "enter" a room, say something, and then leave after. The sprite (0x1) is positioned right on the entrance and is supposed to be hidden until the player activates a script, where it will reappear and perform the above scenario. The problem I'm having is that the sprite isn't actually hiding for some reason.

Spoiler:
#dyn 0x740000
#org @main
'-----------------------------------
lock
checkflag 0x1066
if true jump @true
msgbox @talk
callstd MSG_NOCLOSE
closemsg
pause 0x10
msgbox @talk3
callstd MSG_NOCLOSE
closemsg
reappear 0x1
applymovement 0x1 @enter
pauseevent 0x0
msgbox @talk2
callstd MSG_NOCLOSE
closemsg
pause 0x5
msgbox @talk4
textcolor RED
callstd MSG_NOCLOSE
closemsg
msgbox @talk5
callstd MSG_NOCLOSE
closemsg
applymovement 0x1 @leave
pauseevent 0x0
disappear 0x1
setvar 0x4034 0x1
setflag 0x1066
release
end

#org @true
'------------------------------------
msgbox @false
callstd MSG_NOCLOSE
closemsg
release
end


The Person ID is set to 1066 in A-Map, btw. Any help?

DarkenedEclipse

Project Oak

Male
Sinnoh
Seen December 24th, 2016
Posted October 2nd, 2015
207 posts
5.3 Years
Yo, I'm having a very simple problem here and I cannot figure it out for the life of me.

The scenario is that an NPC will "enter" a room, say something, and then leave after. The sprite (0x1) is positioned right on the entrance and is supposed to be hidden until the player activates a script, where it will reappear and perform the above scenario. The problem I'm having is that the sprite isn't actually hiding for some reason.

Spoiler:
#dyn 0x740000
#org @main
'-----------------------------------
lock
checkflag 0x1066
if true jump @true
msgbox @talk
callstd MSG_NOCLOSE
closemsg
pause 0x10
msgbox @talk3
callstd MSG_NOCLOSE
closemsg
reappear 0x1
applymovement 0x1 @enter
pauseevent 0x0
msgbox @talk2
callstd MSG_NOCLOSE
closemsg
pause 0x5
msgbox @talk4
textcolor RED
callstd MSG_NOCLOSE
closemsg
msgbox @talk5
callstd MSG_NOCLOSE
closemsg
applymovement 0x1 @leave
pauseevent 0x0
disappear 0x1
setvar 0x4034 0x1
setflag 0x1066
release
end

#org @true
'------------------------------------
msgbox @false
callstd MSG_NOCLOSE
closemsg
release
end


The Person ID is set to 1066 in A-Map, btw. Any help?
What program is this

Percy

Male
Asia
Seen 1 Hour Ago
Posted 2 Days Ago
2,969 posts
5.1 Years
What program is this
With the looks of the commands, its PKSV-ui.

Percy

Male
Asia
Seen 1 Hour Ago
Posted 2 Days Ago
2,969 posts
5.1 Years
What's the best scripting program to use? I need to insert missions and scripts for the missions for my team rocket hack of fire red I'm working on
eXtreme Script Editor, bro! =]
Here's the link to the download: http://www.mediafire.com/?8qe70zzp45bjf91

FBI

Free supporter

Male
Unknown Island
Seen 4 Hours Ago
Posted 8 Hours Ago
1,906 posts
6.7 Years
What program is this
That's PKSV. Also that person's problem is that he needs to set a flag and set the person ID to that flag number for the person to disappear. Clearflag and reappear sprite commands should be used to make the sprite appear again.

OK thanks
Top two are PKSV and XSE. They both have their different perks (someone should update them both using same/similar syntax and increased features :D ).
...
Male
The Netherlands
Seen July 14th, 2019
Posted October 25th, 2018
31 posts
5.5 Years
Hello, new hacker here.

So, I'm trying to get into hacking and I'm playing around with FireRed now.

My question:

When I look at Brock's vanilla script in FireRed, there's like millions of ''Cleartrainerflag xxx'' commands in there.
What do these even do and if I were to make a new Gym leader script myself from scratch could I just leave all these ''Cleartrainerflags'' out?

DarkenedEclipse

Project Oak

Male
Sinnoh
Seen December 24th, 2016
Posted October 2nd, 2015
207 posts
5.3 Years
Hello, new hacker here.

So, I'm trying to get into hacking and I'm playing around with FireRed now.

My question:

When I look at Brock's vanilla script in FireRed, there's like millions of ''Cleartrainerflag xxx'' commands in there.
What do these even do and if I were to make a new Gym leader script myself from scratch could I just leave all these ''Cleartrainerflags'' out?
The clear trainer flags allow you to rebattle a trainer again. Setting a trainer flag prevents you from fighting for example Brock again. If you leave it out, you won't be able to fight Brock again. Fire red uses the whole after beating the elite 4 thing or whatever you can rebattle the gym leaders once. That's all. If you got rid of the cleartrainerflags the player won't be able to fight Brock twice. O it's fine to leave those out.

AriArk

Survey Corps

Age 18
Male
Somewhere.. Over the rainbow
Seen January 27th, 2015
Posted January 6th, 2015
136 posts
9.2 Years
Hey,
I'm looking for a Pokemon Center Nurse Joy script (one to heal my pokemon) for JPAN's Fire Red Hacked Engine.
For some reason the old one from a clean rom was causing bugs, so I was pointed here to get some help with a new Pokemon Center script.
Thx for any help :)

Joexv

joexv.github.io

Age 22
Male
Oregon
Seen September 9th, 2019
Posted August 7th, 2018
Hey,
I'm looking for a Pokemon Center Nurse Joy script (one to heal my pokemon) for JPAN's Fire Red Hacked Engine.
For some reason the old one from a clean rom was causing bugs, so I was pointed here to get some help with a new Pokemon Center script.
Thx for any help :)

Heres a basic one, it doesnt use any of her special animations though:
Spoiler:

#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @1 0x5
compare lastresult 0x1
if 0x0 goto @no
msgbox @2 0x6
applymovement 0x# @turn
waitmovement 0x0
fanfare 0x125
special 0x0
faceplayer
msgbox @3 0x6
release
end

#org @1
= Welcome, would you like me to heal\nyour Pokemon?

#org @2
= Thank you, please wait while I heal\nthem.

#org @3
= Your Pokemon are all healed. Have a\nnice day!

#org @turn
#raw 0x2
#raw 0xfe




Now this is a basic one but it could be tweaked to fit your needs.
I died and am dead

Lance32497

LanceKoijer of Pokemon_Addicts

Male
Criscanto town-Ginoa Region xD
Seen August 13th, 2017
Posted January 1st, 2017
793 posts
5.2 Years
Hello guys, I know that my question includes script,
I want to make a roaming Pokemon in FireRed. What will be the script for that?
Also, Upon applying that roaming script, can I use callasm 0xShinizer routine offset+1?
So that, that roaming pokemon is shiny?
Thanks
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Advertiser Content