• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.
5
Posts
12
Years
Well when i did it that way first the compiler wasn't working - apparently you can't use more than 15 move calls at once? becuase when i changed it it compiled easily- and is this XSE and application? or just a different form of scripting? becuase i found out that none of my own script boxes work - when i step on them nothing happens.


((Also completely unrelated note - if i use PKSV will i be able to edit the scripts that are already in the game? say like how when you get out of the car and your mom comes out of the door- would it be possible to edit her script so that she i dont know spins around a runs back in side? what she does int important just if its possible?))
 

The Void

hiiiii
1,416
Posts
13
Years
I made a script for Brendan in a cave in Pokemon FireRed. According to him he was there because of a rare Pokemon. He then engages the player in a Pokemon battle. After the player defeats him, Brendan says a few stuff about how strong the player is then an earthquake occurs. He then says that it must be coming from downstairs and walks towards a ladder leading downstairs.

Spoiler:


I was able to compile this and get the offset but for some reason when I tested it on the game, the game just hangs... Can you tell me why? Please do tell me what's wrong with my script. I've just began scripting and I don't know much yet...
 
Last edited:

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
So I'll need to adjust the script as if the trainer were a Gym Leader, which allows you to rebattle them again after losing?
Yes, that is one way how to do it =)

Spoiler:


I was able to compile this and get the offset but for some reason when I tested it on the game, the game just hangs... Can you tell me why? Please do tell me what's wrong with my script. I've just began scripting and I don't know much yet...
I'm amazed how your ROM could swallow this script O_o
But let me ask you something... are you using XSE? If yes, what version.
Because your movement commands are pretty weird... you know you cannot write what you want person to do, you must write commands in form of e.g. #raw 0xFE (which is End Movement command).
I'd suggest you to check diegoisawesome's scripting tutorial and movement part, it surely gives you the hang of it =)
 

Olli

I am still bathing in a summer's afterglow
2,583
Posts
13
Years
Well when i did it that way first the compiler wasn't working - apparently you can't use more than 15 move calls at once? becuase when i changed it it compiled easily- and is this XSE and application? or just a different form of scripting? becuase i found out that none of my own script boxes work - when i step on them nothing happens.


((Also completely unrelated note - if i use PKSV will i be able to edit the scripts that are already in the game? say like how when you get out of the car and your mom comes out of the door- would it be possible to edit her script so that she i dont know spins around a runs back in side? what she does int important just if its possible?))

You see, I think that XSE is the best scripting program there's out there (yes, it is an application.)
When you download XSE, tutorials, item and pokemon hex codes comes with it, and you'll also be able to read and edit scripts that are already in the game through XSE.
I would highly recommend that you download it.
I think you can find it in HackMew's toolbox (if the download link works now)
 
6
Posts
12
Years
  • Seen Apr 26, 2011
I found out that the general questions thread wasn't where I was supposed to post.

I've been trying to give the pokedex and pokemon menu to the player but it's not working.
My script;
#org $script
lock
faceplayer
checkflag 0x1200
if 0x01 goto $done
message $talk
$talk 1 = I got you an Eevee for your\n birthday. Be responsible!
boxset 6
givepokemon 133 5 0x8B
setflag 0x1200
setflag FR_PKMNMENU
setflag FR_POKEDEX
applymovement 1 $move
$move 1 ; #binary 0x12 0xFE
pausemove 0x0000

#org $done
message $bye
$bye 1 = Have fun on your advenuture!
boxset 6
release
end

I used Poket Script.
 

Olli

I am still bathing in a summer's afterglow
2,583
Posts
13
Years
Like I posted on the the simple questions thread, you should try and change FR_PKMNMENU to 0x828 and FR_POKEDEX to 0x829.
 

Dark pokemon

Beginner Hacker
42
Posts
14
Years
I'm hacking Emerald.

In this script you recieve an Evee but for some reason the script repeats.

Here is the script
Code:
'---------------
#org 0x48B62F
checkflag 0x860
lock
faceplayer
setvar 0x4001 0x2
setvar 0x4002 0x9B
setvar 0x4003 0xE
setvar 0x4004 0x6
compare 0x4055 0x3
if 0x4 goto 0x848B669
compare 0x4055 0x2
if 0x1 goto 0x848B6A2
msgbox 0x848B7C6 MSG_NORMAL '"Its a strange machine.\nWait, is t..."
release
end

'---------------
#org 0x48B669
msgbox 0x848B674 MSG_NORMAL '"Its a machine where Prof.Ike keeps..."
release
end

'---------------
#org 0x48B6A2
msgbox 0x848B6CA MSG_YESNO '"Is that an Evee in that machine?"
showpokepic 0x85 0xA 0x3
msgbox 0x848B6ED MSG_YESNO '"Should I take it?"
compare LASTRESULT 0x2
if 0x0 goto 0x848B701
if 0x1 goto 0x848B789
end

'---------------
#org 0x48B701
hidepokepic
givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x848B73E MSG_KEEPOPEN '"[darkgrey_em]You received an Evee!"
waitfanfare
closeonkeypress
setflag 0x860
msgbox 0x848B759 MSG_YESNO '"[darkgrey_em]Would you like to giv..."
compare LASTRESULT 0x1
if 0x1 call 0x848B737
release
end

'---------------
#org 0x48B789
msgbox 0x848B7A2 MSG_YESNO '"Why not?  I'm allowed to take it?"
compare LASTRESULT 0x1
if 0x1 goto 0x848B6A2
goto 0x848B789

'---------------
#org 0x48B737
call 0x81A74EB
return

'---------------
#org 0x1A74EB
jumpram
nop1
comparefarbytes 0x34014004 0xF0001C20
comparefarbytes 0x44802FD 0x1BC1080
virtualcallif 0x0 0xF0000047
showpokepic 0x203 0x0 0xB5
if 0x48 call 0x49076800
warp4 0x18 0x0 0x88 0x2804 0xD80F
goto 0x480649


'---------
' Strings
'---------
#org 0x48B7C6
= Its a strange machine.\nWait, is that an Evee?

#org 0x48B674
= Its a machine where Prof.Ike keeps\nPOKEMON.

#org 0x48B6CA
= Is that an Evee in that machine?

#org 0x48B6ED
= Should I take it?

#org 0x48B73E
= [darkgrey_em]You received an Evee!

#org 0x48B759
= [darkgrey_em]Would you like to give a\nnickname to Evee?

#org 0x48B7A2
= Why not?  I'm allowed to take it?
 
5
Posts
12
Years
You see, I think that XSE is the best scripting program there's out there (yes, it is an application.)
When you download XSE, tutorials, item and pokemon hex codes comes with it, and you'll also be able to read and edit scripts that are already in the game through XSE.
I would highly recommend that you download it.
I think you can find it in HackMew's toolbox (if the download link works now)


Thank you!! I hope it's as great as you say becuase pokescript is tough!
 

Quickster

Dream or Drop?
351
Posts
16
Years
  • Seen Apr 4, 2016
I'm hacking Emerald.

In this script you recieve an Evee but for some reason the script repeats.

Here is the script
Code:
'---------------
#org 0x48B62F
checkflag 0x860
lock
faceplayer
setvar 0x4001 0x2
setvar 0x4002 0x9B
setvar 0x4003 0xE
setvar 0x4004 0x6
compare 0x4055 0x3
if 0x4 goto 0x848B669
compare 0x4055 0x2
if 0x1 goto 0x848B6A2
msgbox 0x848B7C6 MSG_NORMAL '"Its a strange machine.\nWait, is t..."
release
end

'---------------
#org 0x48B669
msgbox 0x848B674 MSG_NORMAL '"Its a machine where Prof.Ike keeps..."
release
end

'---------------
#org 0x48B6A2
msgbox 0x848B6CA MSG_YESNO '"Is that an Evee in that machine?"
showpokepic 0x85 0xA 0x3
msgbox 0x848B6ED MSG_YESNO '"Should I take it?"
compare LASTRESULT 0x2
if 0x0 goto 0x848B701
if 0x1 goto 0x848B789
end

'---------------
#org 0x48B701
hidepokepic
givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x848B73E MSG_KEEPOPEN '"[darkgrey_em]You received an Evee!"
waitfanfare
closeonkeypress
setflag 0x860
msgbox 0x848B759 MSG_YESNO '"[darkgrey_em]Would you like to giv..."
compare LASTRESULT 0x1
if 0x1 call 0x848B737
release
end

'---------------
#org 0x48B789
msgbox 0x848B7A2 MSG_YESNO '"Why not?  I'm allowed to take it?"
compare LASTRESULT 0x1
if 0x1 goto 0x848B6A2
goto 0x848B789

'---------------
#org 0x48B737
call 0x81A74EB
return

'---------------
#org 0x1A74EB
jumpram
nop1
comparefarbytes 0x34014004 0xF0001C20
comparefarbytes 0x44802FD 0x1BC1080
virtualcallif 0x0 0xF0000047
showpokepic 0x203 0x0 0xB5
if 0x48 call 0x49076800
warp4 0x18 0x0 0x88 0x2804 0xD80F
goto 0x480649


'---------
' Strings
'---------
#org 0x48B7C6
= Its a strange machine.\nWait, is that an Evee?

#org 0x48B674
= Its a machine where Prof.Ike keeps\nPOKEMON.

#org 0x48B6CA
= Is that an Evee in that machine?

#org 0x48B6ED
= Should I take it?

#org 0x48B73E
= [darkgrey_em]You received an Evee!

#org 0x48B759
= [darkgrey_em]Would you like to give a\nnickname to Evee?

#org 0x48B7A2
= Why not?  I'm allowed to take it?

Hmm, sorry I didnt really take the time to look at this and really focus so this may be wrong, but I believe that since you have a checkflag 0x860 at the beginning and not an if statement that is your problem. At least at first glance.

So like this:
checkflag 0x860
if 0x1 goto @blahh

and I think that should stop it from repeating.
 

The Void

hiiiii
1,416
Posts
13
Years
Yes, that is one way how to do it =)


I'm amazed how your ROM could swallow this script O_o
But let me ask you something... are you using XSE? If yes, what version.
Because your movement commands are pretty weird... you know you cannot write what you want person to do, you must write commands in form of e.g. #raw 0xFE (which is End Movement command).
I'd suggest you to check diegoisawesome's scripting tutorial and movement part, it surely gives you the hang of it =)

No I use PKSVUI not XSE...
 
8
Posts
14
Years
Game: Fire Red
Type: Trigger
Editor: XSE
Spoiler:


Sorry can't post the video link. But basically the pokemon trainer I battle is invisible in the Over World. I'd like to know how to fix it.
 
1
Posts
12
Years
  • Seen Jun 22, 2012
For some reason, the script isn't running when I step on the tile. My var number and value are set correctly in A-Map(though I don't know if or what I need to set the unknowns...), and I have the person ID right.
Code:
#dynamic 0x800000

#org @start
setvar 0x6000 0x0001
applymovement 0x0 @move1
waitmovement 0x0
msgbox @1 0x2
applymovement 0xFF @move2
waitmovement 0xFF
msgbox @2 0x2
setflag 0x800
givepokemon 0x97 0x64 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
msgbox @4 0x2
giveitem 0x1 0x1 MSG_OBTAIN
applymovement 0x0 @move3
waitmovement 0x0
pause 0x20
setmaptile 0x0A 0x0A 0x23D 0x0
setmaptile 0x0A 0x0B 0x245 0x0
setmaptile 0x0A 0x0C 0x24D 0x0
special 0x8E
applymovement 0x0 @move4
waitmovement 0x0
msgbox @5 0x6
release
end

#org @move1
#raw 0x56
#raw 0x08
#raw 0x03
#raw 0xFE

#org @move2
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0xFE

#org @move3
#raw 0x00
#raw 0xFE

#org @move4
#raw 0x09
#raw 0x64
#raw 0xFE

#org @1
= Dad: [player]!\n Over here!

#org @2
= Dad: You've been waiting a long\ntime for this day, haven't\lyou, [player]?\pWell, now the time has come for\nyou to catch your very own\lPok\h1Bmon!\pYou'll need a Pok\h1Bmon to protect\n you in the forest...

#org @3
= [player] obtained Mew!

#org @4
= Dad: When you find the pok\h1Bmon\nyou want, use this, but choose\lwisely!

#org @5
= Dad: Now you're all set to go!\p Good luck, [player]!
 

marcc5m

what
1,116
Posts
13
Years
Does anyone know what is wrong with this script? I'm using XSE and Ruby.
Spoiler:

The box won't hide. Or at least, not all of it. Most of it just stays there.
 

~Anbuja

Let's Keep It Simple
321
Posts
13
Years
well helllo:)
its for firered
Spoiler:

well i think everythink is alright with this script but it have the reset bug does anyone know how to fix an reset bug??
 

Quilava's Master

Shattered Dreams '13
694
Posts
16
Years
  • Seen Aug 14, 2023
well helllo:)
its for firered
Spoiler:

well i think everythink is alright with this script but it have the reset bug does anyone know how to fix an reset bug??
Can you tell us when it resets? Or the circumstances surrounding the reset.
 

Quilava's Master

Shattered Dreams '13
694
Posts
16
Years
  • Seen Aug 14, 2023
it wont let me start the game....after the intro the screens turn black and you hear just the music my friend said its the reset bug thats why i asked
well thanks in advantage:)
Okay well to start off with a name like the reset bug, I would assume it resets when the script initiates. If the script in the players room, try removing the scripts that you placed there and see if the game starts normally. If it doesn't then the issue isn't with the script. If the game does start normally, then check if the script is in in the exact location where the player starts, which, if I recall correctly, is 0x6 on the X axis and 0x6 on the Y axis. If there's a script there try moving it.
 

~Anbuja

Let's Keep It Simple
321
Posts
13
Years
Okay well to start off with a name like the reset bug, I would assume it resets when the script initiates. If the script in the players room, try removing the scripts that you placed there and see if the game starts normally. If it doesn't then the issue isn't with the script. If the game does start normally, then check if the script is in in the exact location where the player starts, which, if I recall correctly, is 0x6 on the X axis and 0x6 on the Y axis. If there's a script there try moving it.

i removed the scripts and the game worked normally (started) and no there arent some scripts on the positon where the hero start(you were right x6y6)
to be sure the sccripts have the fault i guess kinda:( i made the same on a clean fire red rom and there the game worked normally jsut that the script didnt open it played like the normal fire red and i repatched an rom with my ips and did the same and this bug with black screen happened again
 

Echidna

i don't care what's in your hair
2,077
Posts
13
Years
Okay well to start off with a name like the reset bug, I would assume it resets when the script initiates. If the script in the players room, try removing the scripts that you placed there and see if the game starts normally. If it doesn't then the issue isn't with the script. If the game does start normally, then check if the script is in in the exact location where the player starts, which, if I recall correctly, is 0x6 on the X axis and 0x6 on the Y axis. If there's a script there try moving it.

hey, i'm the original writer of the script, here's how its layed out:
Spoiler:


this script is just compiled to the rom as a basis to what i'm doing.

then i compile this script and its offset goes to a script tile to the right of the player's start position:
Spoiler:


yes 26D37C is the offset of the first script.

then this one is compiled and goes under the player:
Spoiler:


and this one goes to his left:
Spoiler:


yes the unknow has been set to 0003 and the var number to 4051, and all my script work on these conditions. and the flag 9001 is set to the OW in question's person ID box, and his movement type is hidden so i don't really think its necessary. There is no script where the player starts. and the person event number of the OW in question is 1 which is already in hex.

i also tried this as a level script, and i made one simple script instead of all the others (i did the level script on a new rom of the hack, not the on i already did work on), here's the script:
Spoiler:


i proof read a million times, the script is flawless. and the leve script was followed step by step, and the reset bugs won't allow us to continue. when i compile the script, just when th player is about to appeard in his room, the emulator/game resets.




oh and here's a screeny of where the ow is (the one who will be affected by the script)

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