• 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.

AluminiumOxide

Aka Ansirent
867
Posts
10
Years
Anyone ?????? please help me please !! Epic the post your write i didn't understand correctly (Apologise for some junk of problem solution i ask )
 

ep!c

Banned
124
Posts
11
Years
  • Seen Jan 4, 2015
Dude, in fact this isnt a thread to request script.
But as it may help you to understand the YES/NO box, I write an example.

Code:
#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @ask
callstd 0x5
compare LASTRESULT 0x1
if 0x1 call @yes
msgbox @gotnot
callstd 0x6
release
end

#org @yes
msgbox @got
callstd 0x6
release
end

#org @ask
= Do you have a Pokémon?

#org @gotnot
= A pity you don't have one!

#org @got
= It's nice to have a Pokémon!
If you have a YES/NO box, you must CHECK whether you answered YES or NO.
You do that with:

COMPARE LASTRESULT 0x1
IF 0x1 CALL @POINTER

Then you make another textbox which gives the player an answer to his choice.

Edit: That closeonkeypress doesnt matter to you. I wrote that to another person!
Edit2: @Kurapika: That wasnt meant to be for Rhytham but for mf91 :P
 
947
Posts
11
Years
Rhytham, if youwant to know what he meant by Level Script and setmaptile command, refer to dieagoisawesome's MEGA HUGE XSE scripting tutorial in the Tutorials forum.
 
30
Posts
10
Years
  • Age 33
  • Seen Sep 12, 2015
Rhytham, if youwant to know what he meant by Level Script and setmaptile command, refer to dieagoisawesome's MEGA HUGE XSE scripting tutorial in the Tutorials forum.

That was probably ment for me. I will do that, thanks :)
 

Edward Newgate

Everyone is a child of the sea
274
Posts
12
Years
Okay, so I am screwing around with level scripts, since these for some reason never worked for me..

I got this now:
Spoiler:

And I put it in the level script thing as this:
Spoiler:


When the script finishes, this comes up (I know this is in lots of tutorials, but this isn't my problem yet):
Spoiler:


The problem is this:
In all the tutorials i've read so far (which includes the popular ones, like Thethethethe's and Diegoisawesome's tutorials) they said that when I go to advanced map header > map script offset,
and paste that offset in XSE, and enable the level script button, it should come up with #raw word 0xFFFF.
The problem is that it's not. There's a perfectly normal #raw word 0x0 like there's supposed to be.
(This is the whole thing):
Spoiler:

See my problem? it shows up as the glitchy 0xFFFF error, but the #raw word is just 0x0 like it's supposed to be...

I really hope somebody can help me with this, since it's kinda getting annoying, not knowing what the solution is since i'm still a rookie at scripting.

Thanks in advance,
Mr.Alpha
 

ep!c

Banned
124
Posts
11
Years
  • Seen Jan 4, 2015
hey, no need to worry.
You just need to re-compile it.
Means you decompile the script, press this levelscript-button, and
then the gear again :)
 
6
Posts
10
Years
  • Age 27
  • Seen Oct 31, 2013
Me again
Game firered, using JPANs hacked engine
Spoiler:


It heals fine, but when i faint in the wild i don't get teleported back here but instead end up at different locations such as the link cable place.
Am i missing something important or what?
 

ep!c

Banned
124
Posts
11
Years
  • Seen Jan 4, 2015
sethealingplace must be set in a level-script, not at joy's script.
 
6
Posts
10
Years
  • Age 27
  • Seen Oct 31, 2013
sethealingplace must be set in a level-script, not at joy's script.

Oh okay that makes sense
Would i use setvar in that? I'm not too familiar with level scripts

Or would it just be

Spoiler:
 

ep!c

Banned
124
Posts
11
Years
  • Seen Jan 4, 2015
No no, you need to set a [03]-type-levelscript.
The script is simply:

Code:
#org @start
sethealingplace 0xXY
end
 

surfer treecko

help, how do I...?
21
Posts
11
Years
  • Seen Nov 17, 2016
Spoiler:


This rather hastily made script doesn't work. What it's supposed to do is bring up a textbox asking if you want to pay if you step on a tile in front of a PC, taking money from you if you say yes and forcing you backwards if you say no or don't have enough. However when you say yes it just brings up the money prompt again, and if you say no the textboxes act weird.

CPmN3iL.png

If you say no this happens until you talk to someone or leave.

hnCz20z.png

Not having enough money also causes the box displaying your money to act weirdly
 

ep!c

Banned
124
Posts
11
Years
  • Seen Jan 4, 2015
Try this :)

Code:
  '---------------
#dynamic 0x800000
#org @start
showmoney 0x00 0x00 0x00
msgbox @question 0x5
compare LASTRESULT 0x1
if 0x1 goto @PC
if 0x0 goto @back
end

#org @question
= Would you like to use the PC?\nIt costs \hB7850.

#org @back
hidemoney 0x00 0x00 '--- moved it before applymovement
applymovement 0xFF @moveback
waitmovement 0x0
end

#org @PC
checkmoney 0x352 0x00 '--- removed the compare LASTRESULT, as its not needed.
if 0x4 goto @continue
msgbox @notenough 0x6 '-- changed to 0x6 as it might bug -> "0x2 = lock + faceplayer + 0x6"
goto @back
end

#org @continue
paymoney 0x352 0x00
hidemoney 0x00 0x00
end '-- added end

#org @notenough
= You don't have enough money...

#org @moveback
#raw 0xC
#raw 0xFE

I would also strongly recommend you adding a temporary variable such as 0x8000 to the script.
It resets at every map-load:

1. it bugs less
2. its better if you leave the field accidently, you musnt pay again.
 
947
Posts
11
Years
@surfer treecko, first I advice you use a signpost script on the PC instead of a walking script.
secondly, the @continue part lacks the calls and special that boot the PC as well as the End command.
Also, do by ep!c's advice and use a temporary variable that will be used so that the player won't pay again if he didn't leave the PokéCenter.

Here, I'll share with you the code I'm using in my hack, it is cmplete:
Spoiler:

I am using the variable 0x4001 as the temporary variable (variable 0x8000, 0x8004, and 0x800D are already used by the original PC script).
I am using a level script of the 03 (On entering map/not on menu close [03]) in the Pokémon Center, this level script simply sets my temporary variable to 0x0.
Code:
setvar 0x4001 0x0
release
end
If the player payed the variable is set to 0xFC (I could simply set it to 0x1, or even use a temporary flag instead of a variable)
 
5
Posts
10
Years
  • Seen Sep 21, 2016
Okay so I'm trying to script an event where someone sees you then checks for a flag and if you have the flag you can go through but if you don't you can't. I had it working except you could just walk right past him(i.e. he didn't see you and stop you you had to talk to him) but then I wanted to make sure it would work if you had the flag so I put someone in to give it to you and from then on he thought you always had the flag even if you didn't. How do I fix it?
 
947
Posts
11
Years
@Electrobuzz334, I don't quite understand your problem.
You're apparently putting the script in the person, you should make a walking script or several walking scripts (depending on your map), in order to make someone "see" you like people "see" you when they want to battle you.
Also, some screenshots and your script will help us assit you better.
 
105
Posts
12
Years
hey i have made this script whts the problem with it?

'---------------
#org 0x8012B6
lock
faceplayer
checkflag 0x828
if 0x1 goto 0x88013CF
msgbox 0x88013E7 MSG_YESNO '"DAD: So [player] are you going to ..."
compare LASTRESULT 0x1
if 0x1 goto 0x88012E1
compare LASTRESULT 0x0
if 0x1 goto 0x880133A
end

'---------------
#org 0x8013CF
msgbox 0x88015A7 MSG_NORMAL '"DAD: [player],best of luck my son...."
applymovement 0x1 0x8801613
waitmovement 0x0
setflag 0x8C6
release
end

'---------------
#org 0x8012E1
applymovement 0x2 0x8801609
waitmovement 0x0
hidesprite 0x3
setflag 0x8C5
applymovement 0x2 0x880160E
waitmovement 0x0
givepokemon 0x11 0xA 0xD2 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x88014C3 MSG_KEEPOPEN '"[player] received a Pidgeotto\nfro..."
waitfanfare
setflag 0x828
msgbox 0x88014E8 MSG_YESNO '"Would you like to give your\nPokém..."
compare LASTRESULT 0x1
if 0x1 goto 0x88013A5
compare LASTRESULT 0x0
if 0x1 goto 0x88013BD
end

'---------------
#org 0x80133A
msgbox 0x8801419 MSG_NORMAL '"DAD: Oh,I see you must be kidding\..."
applymovement 0x1 0x8801606
waitmovement 0x0
applymovement 0x2 0x8801609
waitmovement 0x0
hidesprite 0x3
setflag 0x8C5
applymovement 0x2 0x880160E
waitmovement 0x0
givepokemon 0x11 0xA 0xD2 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x88014C3 MSG_KEEPOPEN '"[player] received a Pidgeotto\nfro..."
waitfanfare
setflag 0x828
msgbox 0x88014E8 MSG_YESNO '"Would you like to give your\nPokém..."
compare LASTRESULT 0x1
if 0x1 goto 0x88013A5
compare LASTRESULT 0x0
if 0x1 goto 0x88013BD
end

'---------------
#org 0x8013A5
setvar 0x8004 0x0
call 0x88013B5
goto 0x88013C4

'---------------
#org 0x8013BD
closeonkeypress
goto 0x88013C4

'---------------
#org 0x8013B5
fadescreen 0x1
special 0x9E
waitstate
return

'---------------
#org 0x8013C4
msgbox 0x880151D MSG_NORMAL '"DAD: Please take care of this\ndoc..."
release
end


'---------
' Strings
'---------
#org 0x8013E7
= DAD: So [player] are you going to start\nyour journey?

#org 0x8015A7
= DAD: [player],best of luck my son.I have\nto go to Saffron city due to some\limportant work.Bye now!

#org 0x8014C3
= [player] received a Pidgeotto\nfrom DAD.\l

#org 0x8014E8
= Would you like to give your\nPokémon a nickname?

#org 0x801419
= DAD: Oh,I see you must be kidding\nam I right? This is the best day\lin any trainer's life.SO,I have\lsomething for you.Cubone can you\lbring the pokeball?\lpresent there?\l

#org 0x80151D
= DAD: Please take care of this\ndocile Pidgeotto I have caught and\ltrained it till the time it was a\lPidgey just for this auspicious\lday.


'-----------
' Movements
'-----------
#org 0x801613
#raw 0x12 'Step Left (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x60 'Hide
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements

#org 0x801609
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements

#org 0x80160E
#raw 0x12 'Step Left (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements

#org 0x801606
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements
 

ep!c

Banned
124
Posts
11
Years
  • Seen Jan 4, 2015
My Crystal ball says me, that the person who you hide with setflag 0x85C, reappears.
0x8C5 is a temporary flag/special flag (0x8XX), use another.
0x200-0x2FF is 100 % free and not buggy :)
 

Danny0317

Fluorite's back, brah
1,067
Posts
10
Years
  • Age 24
  • Seen Nov 19, 2023
hey i have made this script whts the problem with it?

'---------------
#org 0x8012B6
lock
faceplayer
checkflag 0x828
if 0x1 goto 0x88013CF
msgbox 0x88013E7 MSG_YESNO '"DAD: So [player] are you going to ..."
compare LASTRESULT 0x1
if 0x1 goto 0x88012E1
compare LASTRESULT 0x0
if 0x1 goto 0x880133A
end

'---------------
#org 0x8013CF
msgbox 0x88015A7 MSG_NORMAL '"DAD: [player],best of luck my son...."
applymovement 0x1 0x8801613
waitmovement 0x0
setflag 0x8C6
release
end

'---------------
#org 0x8012E1
applymovement 0x2 0x8801609
waitmovement 0x0
hidesprite 0x3
setflag 0x8C5
applymovement 0x2 0x880160E
waitmovement 0x0
givepokemon 0x11 0xA 0xD2 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x88014C3 MSG_KEEPOPEN '"[player] received a Pidgeotto\nfro..."
waitfanfare
setflag 0x828
msgbox 0x88014E8 MSG_YESNO '"Would you like to give your\nPokém..."
compare LASTRESULT 0x1
if 0x1 goto 0x88013A5
compare LASTRESULT 0x0
if 0x1 goto 0x88013BD
end

'---------------
#org 0x80133A
msgbox 0x8801419 MSG_NORMAL '"DAD: Oh,I see you must be kidding\..."
applymovement 0x1 0x8801606
waitmovement 0x0
applymovement 0x2 0x8801609
waitmovement 0x0
hidesprite 0x3
setflag 0x8C5
applymovement 0x2 0x880160E
waitmovement 0x0
givepokemon 0x11 0xA 0xD2 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x88014C3 MSG_KEEPOPEN '"[player] received a Pidgeotto\nfro..."
waitfanfare
setflag 0x828
msgbox 0x88014E8 MSG_YESNO '"Would you like to give your\nPokém..."
compare LASTRESULT 0x1
if 0x1 goto 0x88013A5
compare LASTRESULT 0x0
if 0x1 goto 0x88013BD
end

'---------------
#org 0x8013A5
setvar 0x8004 0x0
call 0x88013B5
goto 0x88013C4

'---------------
#org 0x8013BD
closeonkeypress
goto 0x88013C4

'---------------
#org 0x8013B5
fadescreen 0x1
special 0x9E
waitstate
return

'---------------
#org 0x8013C4
msgbox 0x880151D MSG_NORMAL '"DAD: Please take care of this\ndoc..."
release
end


'---------
' Strings
'---------
#org 0x8013E7
= DAD: So [player] are you going to start\nyour journey?

#org 0x8015A7
= DAD: [player],best of luck my son.I have\nto go to Saffron city due to some\limportant work.Bye now!

#org 0x8014C3
= [player] received a Pidgeotto\nfrom DAD.\l

#org 0x8014E8
= Would you like to give your\nPokémon a nickname?

#org 0x801419
= DAD: Oh,I see you must be kidding\nam I right? This is the best day\lin any trainer's life.SO,I have\lsomething for you.Cubone can you\lbring the pokeball?\lpresent there?\l

#org 0x80151D
= DAD: Please take care of this\ndocile Pidgeotto I have caught and\ltrained it till the time it was a\lPidgey just for this auspicious\lday.


'-----------
' Movements
'-----------
#org 0x801613
#raw 0x12 'Step Left (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x60 'Hide
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements

#org 0x801609
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0xFE 'End of Movements

#org 0x80160E
#raw 0x12 'Step Left (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements

#org 0x801606
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements

Do you have it how it was before you opened it in A-Map?
It would make it much easier to fix it that way.
 
Status
Not open for further replies.
Back
Top