Sierra's MEGA-HUGE XSE Scripting Tutorial Page 38

Started by Sierraffinity December 26th, 2008 6:55 PM
  • 776138 views
  • 1232 replies

Sniper

ふゆかい

Male
Philippines
Seen August 9th, 2016
Posted June 5th, 2016
1,412 posts
9.5 Years
I am having a problem that when searching the posts I have not seen anyone else have but I could have missed it so I will ask. I have a basic message script for Fire Red but when I tested it the person becomes a potion goes into my bag and vanishes. The moment I walk away the person reappears and if I click to talk to them the same thing happens again. I have deleted and redone this several times but I get this same result so I do not know what I am doing wrong. I used the newest XSE and advance map. This is the script. Also is there a way to edit the script without looking for a new free space offset? Thank you in advance :)

//---------------
#org 0x800000
lock
faceplayer
msgbox 0x880000D MSG_NORMAL //"Hey there.\pYou should go to the\n..."
release
end


//---------
// Strings
//---------
#org 0x80000D
= Hey there.\pYou should go to the\nBATTLE SCHOOL
Maybe you have edited the script through de-compiling several times.
I see nothing wrong with your script but it should be like this:

#Dynamic 0x800000

#org @start
lock
faceplayer
msgbox @1 0x6
release
end

#org @1
= Hey there.\pYou should go to the\nBATTLE SCHOOL.


Seen March 24th, 2015
Posted May 8th, 2014
9 posts
9.4 Years
I can't seem to get my script to work. It compiles fine. I put the offset into Advancemap, but when I talk to the person, I just get the click sound and nothing happens. Here is my script. I am on Emerald Version:

#dynamic 0x6B46BC

#ORG @Main
lock
faceplayer
message @tutorial 0x5
compare LASTRESULT 1
if 1 goto @yes
compare LASTRESULT 0
if 1 goto @no
release
end

#org @tutorial
= Yes or no

#org @yes
message @pressyes 0x6
lock
warp 0x0 0x9 0xFF 0x02 0x06
#raw 0x0B 0x00 0x14 0x00
release
end

#org @no
message @pressno 0x6
release
end

#org @pressyes
= Okay, let's go!

#org @pressno
= Aww.
Please help!

Sniper

ふゆかい

Male
Philippines
Seen August 9th, 2016
Posted June 5th, 2016
1,412 posts
9.5 Years
I can't seem to get my script to work. It compiles fine. I put the offset into Advancemap, but when I talk to the person, I just get the click sound and nothing happens. Here is my script. I am on Emerald Version:

#dynamic 0x6B46BC

#ORG @Main
lock
faceplayer
message @tutorial 0x5
compare LASTRESULT 1
if 1 goto @yes
compare LASTRESULT 0
if 1 goto @no
release
end

#org @tutorial
= Yes or no

#org @yes
message @pressyes 0x6
lock
warp 0x0 0x9 0xFF 0x02 0x06
#raw 0x0B 0x00 0x14 0x00
release
end

#org @no
message @pressno 0x6
release
end

#org @pressyes
= Okay, let's go!

#org @pressno
= Aww.
Please help!
Before I tell you the wrong parts, what A-map are you using?
If A-map 1.95 it adds more numbers to the current offset. Make sure it's correct.
Anyways, I found several mistakes on your script I'll put it on red.

#dynamic 0x6B46BC

#ORG @Main
lock
faceplayer
message @tutorial 0x5
compare LASTRESULT 1
if 1 goto @yes
compare LASTRESULT 0
if 1 goto @no
release
end

#org @tutorial
= Yes or no

#org @yes
message @pressyes 0x6
lock
warp 0x0 0x9 0xFF 0x02 0x06
#raw 0x0B 0x00 0x14 0x00 Delete that.
release
end

#org @no
message @pressno 0x6
release
end

#org @pressyes
= Okay, let's go!

#org @pressno
= Aww.
Fix it to this:

#dynamic 0x800000

#ORG @Main
lock
faceplayer
checkflag 0x(whatever the flag is)
if 0x1 goto @done
message @tutorial 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
msgbox @no 0x6
release
end

#org @yes
message @pressyes 0x6
warp 0x0 0x9 0xFF 0x02 0x06
release
end

#org @pressyes
= Okay, let's go!

#org @no
= Aww.
An explanation of the checkflag.
If you use a set flag on a certain event and this script
requires the following flag to be triggered the @yes.
The @yes will be triggered, but if the following flag
of the checkflag has not been trigger yet, the @yes won't go
and the @no message will go instead. I think that's it.

If you want a #org @no part. The script should be like this..

#dynamic 0x800000

#ORG @Main
lock
faceplayer
checkflag 0x(whatever the flag is)
if 0x1 goto @done
message @tutorial 0x5
compare LASTRESULT 0x1
if 0x1 goto @yes
if 0x0 goto @no
release
end

#org @yes
message @pressyes 0x6
warp 0x0 0x9 0xFF 0x02 0x06
release
end

#org @no
msgbox @pressno 0x6
release
end

#org @pressyes
= Okay, let's go!

#org @pressno
= Aww.


Male
'Murica
Seen December 21st, 2013
Posted December 21st, 2013
10 posts
10.8 Years
I'm having trouble trying to create complex scripts. I'm wanting to redo all the starting scripts in Pallet town, so I first removed all existing scripts in Pallet and in the Lab. I then made my own script (which compiled successfully), put it into the game under the "Header" tab, and added it on the tile in front of the player's house's door. When I save this and boot up the rom, I get a white screen and am unable to use it (other roms work fine, and removing the script does not fix this). However, I can still load a real time save. When I do that and enter Pallet from the north, the text in my script triggers (although you cannot see the speaker at this location) and then Gary proceeds to say some random lines and make to exiting door sound effect in an endless loop (note that Gary and is lines are no where in this script). I clearly messed up bad, especially with the white screen thing, and I can't very well start with a clean rom because I have so many other scripts and mapping edits in this one. Any ideas on how to fix either of these problems?

On a somewhat minor note, opening the map for Pallet or Viridian in Advance Map (newest version) causes the following error message to appear: "ERROR: (ENotAPointer) AdvanceMapError(5): Value $FFFFFFFF is not a Pointer! Please contakt [email protected]"

The script I am attempting to input:

Spoiler:
#dynamic 0x2DD5A6

#org @start
lock
faceplayer
applymovement 0x3 @move1
waitmovement 0x1
msgbox @help 0x6
applymovement 0x3 @move2
waitmovement 0x1
hidesprite 0x3
setflag 0x400
setvar 0x4000 0x1
release
end

#org @move1
#raw 0x62
#raw 012
#raw 0x12
#raw 0x12
#raw 0xfe

#org @help
= \v\h01! It's TEAM LEAF. They're\nattacking Pallet!\pThey tried to steal my grandon's\nPOKéMON, but he stopped them. They\leven burned down one of the\lhouses!\pI think I saw one of them run\nnorth on Route 1. If you hurry,\lyou might be able to catch him.

#org @move2
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xfe
Seen March 24th, 2015
Posted May 8th, 2014
9 posts
9.4 Years
Having problems with this code.
Spoiler:
#org 0x6B47E8 #dynamic 0x800000 #org @script lock faceplayer checkflag 0x1201 if 0x01 goto @done checkflag 0x1200 if 0x01 goto @youmaypass #org @talk = Hey!\nWhat are you doing?!\pYou're not allowed through here!\nGet lost! message @talk 0x6 release end #org @youmaypass message @talk1 0x6 #org @talk1 = Hey!\n What are you doing?!\pYou're not...\pOh!\nThe policeman said you can pass?\pGo right ahead then! message @talk1 0x6 applymovement 8 @walk #org @walk walk 1 ; #binary 0x11 0x13 0x02 0xFE pausemove 0 setflag 0x1201 release end #org @done message @talk2 talk2 = What are you waiting for?\nYou can go through! message @talk2 0x6 release end
Male
Seen June 14th, 2020
Posted March 16th, 2014
10 posts
12.8 Years
Could someone please tell me what is wrong with this script?
It sounds so stupid considering how non-complex the script actually is but for some reason whenever i run my script, it works completely but freezes the game as it ends.
this happens with all of my scripts that i try to use "applymovement" commands to.
i am using pokemon emerald by the way

Spoiler:
#dynamic 0x800000
#org @start
applymovement 0x6 @move1
pause 0x20
end

#org @move1
#raw 0x5
#raw 0x6
#raw 0x6
waitmovement 0x6
end


thank you for your help.

forget that last post, i figured it out as soon as i posted..
i forgot to add an end movement into the script. well i guess we learn from our mistakes :P
Seen 4 Hours Ago
Posted January 6th, 2014
56 posts
14.5 Years
I keep getting "error 6 'Overflow' on line 18. Wrong parameter type." when I debug/compile my script. Line 18 is the last line.
Spoiler:
#dynamic 0x800000

#org @start
lock
faceplayer
cry 0x185 0x0
msgbox @roar 0x6
waitcry
wildbattle 0xB9 0x50 0x0 0x0
fadescreen 0x0
hidesprite 0x800F
fadescreen 0x1
setflag 0x300
release
end

#org @roar
= Gwogobo gwobobobo!
why yes I am made of awsome
Male
Seen June 14th, 2020
Posted March 16th, 2014
10 posts
12.8 Years
I keep getting "error 6 'Overflow' on line 18. Wrong parameter type." when I debug/compile my script. Line 18 is the last line.
Spoiler:
#dynamic 0x800000

#org @start
lock
faceplayer
cry 0x185 0x0
msgbox @roar 0x6
waitcry
wildbattle 0xB9 0x50 0x0 0x0
fadescreen 0x0
hidesprite 0x800F
fadescreen 0x1
setflag 0x300
release
end

#org @roar
= Gwogobo gwobobobo!
There is too many parameters on line 9, otherwise the script is fine (unless that is the wrong ID of the player on line 11, but I assume you're correct). This would be the complete correct code:
#dynamic 0x800000
#org @start

lock
faceplayer
cry 0x185 0x0
msgbox @roar 0x6
waitcry
wildbattle 0xB9 0x50 0x0
fadescreen 0x0
hidesprite 0x800F
fadescreen 0x1
setflag 0x300
release
end

#org @roar
= Gwogobo gwobobobo!
Seen 4 Hours Ago
Posted January 6th, 2014
56 posts
14.5 Years
There is too many parameters on line 9, otherwise the script is fine (unless that is the wrong ID of the player on line 11, but I assume you're correct). This would be the complete correct code:
#dynamic 0x800000
#org @start

lock
faceplayer
cry 0x185 0x0
msgbox @roar 0x6
waitcry
wildbattle 0xB9 0x50 0x0
fadescreen 0x0
hidesprite 0x800F
fadescreen 0x1
setflag 0x300
release
end

#org @roar
= Gwogobo gwobobobo!
The version of XSE that I am using requires that extra parameter on line nine to set whether the pokemon is shiny or not. It's just line 18 that has the problem.
why yes I am made of awsome
Male
Seen June 14th, 2020
Posted March 16th, 2014
10 posts
12.8 Years
The version of XSE that I am using requires that extra parameter on line nine to set whether the pokemon is shiny or not. It's just line 18 that has the problem.
There is no other problem with your script, the script I made compiled perfectly for me, try copying it and adding that extra parameter and see if it works?
The only other problem I can think of is that sometimes with mine, the text doesn't work when compiling even though there is nothing wrong with it. Try putting the text you want into the text adjuster and converting it and then pressing insert when you have clicked on the line the text should be on. That usually works for me.

Sniper

ふゆかい

Male
Philippines
Seen August 9th, 2016
Posted June 5th, 2016
1,412 posts
9.5 Years
Hi! May I know the meaning of special 0x148 and 0xDE in Fire Red?I could not found a solution herehttp://www.pokecommunity.com/showthread.php?t=184273
Forgot or I don't really know. lol But to be at least helpful, ask here.


Male
Seen January 21st, 2014
Posted January 21st, 2014
1 posts
9.3 Years
I have been attempting to edit my moms words in pallet town. I correctly type in words, link it to the words at the bottom, however when i compile, everything goes to hell. It cuts things out, duplicates the original text over and over...
I have been attempting to write more complicated scripts using this tutorial for 3 years on and off. What is it with any game that i play that things go to hell when i try to edit it? There is no point in me putting in my edited script for you to see because i changed words, i didn't add anything else. Im think about just giving up due to either the tutorial not supplying enough information about some of the more obscure items in coding, or the fact that no matter which XSE version i use, rom, or tool, things just don't work. I mean come on, there are paragraphs about just adding speech message boxes but the setvar stuff, he wrote maybe like 2 or 3 sentences that barely described what it is instead of what i can use it for. its not a tutorial if it can't explain different ways to utilize code. I know its about creativity but toss me a bone here, at least!!! I am an adult so i know its not my lack of comprehension of the material. PLEASE HELP

JoeyBaboey

Charmandasaur

Male
Seen September 15th, 2014
Posted February 23rd, 2014
15 posts
9.3 Years
Does anyone know a solution to this? I've googled and searched but most of the top bar of tools on XSE won't let me click them(the attachment shows what I mean) The circled ones work though. Edit: For some reason this only happens on one script though, the script doesn't compile either(as far as I know) This is the script if anyone wants to see it
Spoiler:
#dynamic 0x800200
#org @start
checkflag 0x7492
if 2 @true
lock
msgbox @door 0x6
applymovement 0xFF @move
release
end

#org @move
#raw 0x2
#raw 0x9
#raw 0xFE

#org @door
= The door won't budge.

#org @true
release
end
Maybe there is something wrong with it? There is another which won't work too
Spoiler:
#dynamic 0x800300
#org @start
lock
checkflag 0x7482
if 2 @true
setflag 0x7482
msgbox @mom 0x6
checkgender
compare 0x800D 0x0
if 2 @boy
goto @girl
release
end
#org @mom
= Mom: \v\h01, it is your sister. Last night\nshe was kidnapped by Team\lGetrolle.
#org @boy
msgbox @boypke 0x6
givepokemon 0x52 0x7 0x217 0x0 0x0 0x0
release
end
#org @girl
message @girlpke 0x6
givepokemon 0x37 0x7 0x215 0x0 0x0 0x0
release
end
#org @boypke
= Here \v\h01 take your Meowth and go\nfind your sister.
#org @girlpke
= Here \v\h01 take your Vulpix and go\nfind your sister.
#org @true
release
end
Keep in mind that I am bad at this
(at least I think I am) Edit: Ignore the save feature not being circled, I always have the File button.
Thanks in Advance! ;):pink_nod:

Wild WINDOW appeared!
Go PERSON!
WINDOWS used OPEN
PERSON is frozen!
Go WINDOW!
WINDOW used COLD DRAFT!
It's not very affective...
WINDOW used CLOSE!
Wild WINDOW fled!

Male
Seen June 14th, 2020
Posted March 16th, 2014
10 posts
12.8 Years
Does anyone know a solution to this? I've googled and searched but most of the top bar of tools on XSE won't let me click them(the attachment shows what I mean) The circled ones work though. Edit: For some reason this only happens on one script though, the script doesn't compile either(as far as I know) This is the script if anyone wants to see it
Spoiler:
#dynamic 0x800200
#org @start
checkflag 0x7492
if 2 @true
lock
msgbox @door 0x6
applymovement 0xFF @move
release
end

#org @move
#raw 0x2
#raw 0x9
#raw 0xFE

#org @door
= The door won't budge.

#org @true
release
end
Maybe there is something wrong with it? There is another which won't work too
Spoiler:
#dynamic 0x800300
#org @start
lock
checkflag 0x7482
if 2 @true
setflag 0x7482
msgbox @mom 0x6
checkgender
compare 0x800D 0x0
if 2 @boy
goto @girl
release
end
#org @mom
= Mom: \v\h01, it is your sister. Last night\nshe was kidnapped by Team\lGetrolle.
#org @boy
msgbox @boypke 0x6
givepokemon 0x52 0x7 0x217 0x0 0x0 0x0
release
end
#org @girl
message @girlpke 0x6
givepokemon 0x37 0x7 0x215 0x0 0x0 0x0
release
end
#org @boypke
= Here \v\h01 take your Meowth and go\nfind your sister.
#org @girlpke
= Here \v\h01 take your Vulpix and go\nfind your sister.
#org @true
release
end
Keep in mind that I am bad at this
(at least I think I am) Edit: Ignore the save feature not being circled, I always have the File button.
Your problem lies with the check flag portion of the script, the number should be 1 not 2 as the only numbers allowed are 0 and 1 (off and on).

JoeyBaboey

Charmandasaur

Male
Seen September 15th, 2014
Posted February 23rd, 2014
15 posts
9.3 Years
the number should be 1 not 2 as the only numbers allowed are 0 and 1 (off and on).
I changed the line in the first one to this
Spoiler:
checkflag 0x7492
if 1 @true
, but it won't let me compile it still. (Sorry if you or I misinterpreted the question/answer)

Edit: Now this script won't let me compile it either :
Spoiler:
dynamic 0x802b00
#org @start
msgbox @hi 0x2
end
#org @hi
= Hello Mr.Pokemon,\nthank you for coming\lfrom Johto.
Oh, and the save button wouldn't work because the thing was already saved... :|
Thanks in Advance! ;):pink_nod:

Wild WINDOW appeared!
Go PERSON!
WINDOWS used OPEN
PERSON is frozen!
Go WINDOW!
WINDOW used COLD DRAFT!
It's not very affective...
WINDOW used CLOSE!
Wild WINDOW fled!

Male
Seen June 14th, 2020
Posted March 16th, 2014
10 posts
12.8 Years
I changed the line in the first one to this
Spoiler:
checkflag 0x7492
if 1 @true
, but it won't let me compile it still. (Sorry if you or I misinterpreted the question/answer)

Edit: Now this script won't let me compile it either :
Spoiler:
dynamic 0x802b00
#org @start
msgbox @hi 0x2
end
#org @hi
= Hello Mr.Pokemon,\nthank you for coming\lfrom Johto.
Oh, and the save button wouldn't work because the thing was already saved... :|
Okay, I've rewritten your script to the way I would do it and fixed all of the problems; this script should compile (I'd try myself but I'm getting ready to go to college):

#dynamic 0x800000
#org @start
Lock
checkflag 0x7492
if 1 goto @true
msgbox @door 0x6
applymovement 0xFF @move
release
end

#org @move
#raw 0x2
#raw 0x9
#raw 0xFE

#org @door
= The door won't budge.

#org @true
release
end

I hope I helped :)

Sniper

ふゆかい

Male
Philippines
Seen August 9th, 2016
Posted June 5th, 2016
1,412 posts
9.5 Years
Okay, I've rewritten your script to the way I would do it and fixed all of the problems; this script should compile (I'd try myself but I'm getting ready to go to college):

#dynamic 0x800000
#org @start
Lock
checkflag 0x7492
if 1 goto @true
msgbox @door 0x6
applymovement 0xFF @move
release
end

#org @move
#raw 0x2
#raw 0x9
#raw 0xFE

#org @door
= The door won't budge.

#org @true
release
end

I hope I helped :)
Actually I found incorrect there. I think checkflag is not needed to a simple script like this.
This is how I ended up correcting yours.

#dynamic 0x800000 (Better if you search on FSF)

#org @start
lock
if 0x1 goto @true
msgbox @door 0x6
applymovement 0xFF @move
waitmovement 0x0
release
end

#org @move
#raw 0x2
#raw 0x9
#raw 0xFE

#org @door
= The door won't budge.

#org @true
release
end


Male
Seen June 14th, 2020
Posted March 16th, 2014
10 posts
12.8 Years
Actually I found incorrect there. I think checkflag is not needed to a simple script like this.
This is how I ended up correcting yours.

#dynamic 0x800000 (Better if you search on FSF)

#org @start
lock
if 0x1 goto @true
msgbox @door 0x6
applymovement 0xFF @move
waitmovement 0x0
release
end

#org @move
#raw 0x2
#raw 0x9
#raw 0xFE

#org @door
= The door won't budge.

#org @true
release
end
I kept the check flag part of the script in because I figured that this script may be part of another one. So something happens in another script and then it sets a flag, which he is using in this one (probably to make the script only run at a certain part of the game).
But as for the wait movement, I forgot to add that in but I don't think it is needed when moving the player.

JoeyBaboey

Charmandasaur

Male
Seen September 15th, 2014
Posted February 23rd, 2014
15 posts
9.3 Years
I kept the check flag part of the script in because I figured that this script may be part of another one.
That is true, but I do not think any one seems to understand my problem, I just put the script in because I thought it was the problem. My problem is that XSE won't let me hit the compile button.
Thanks in Advance! ;):pink_nod:

Wild WINDOW appeared!
Go PERSON!
WINDOWS used OPEN
PERSON is frozen!
Go WINDOW!
WINDOW used COLD DRAFT!
It's not very affective...
WINDOW used CLOSE!
Wild WINDOW fled!

Male
Seen June 14th, 2020
Posted March 16th, 2014
10 posts
12.8 Years
That is true, but I do not think any one seems to understand my problem, I just put the script in because I thought it was the problem. My problem is that XSE won't let me hit the compile button.
If that is the problem then I am afraid that the script is not the problem, although there were a few problems with it anyway. The problem must lie with XSE as I am sure that it lets you compile the script even with script errors, it just notifies you that there is an error. I suggest just downloading XSE again from a different source.

Sniper

ふゆかい

Male
Philippines
Seen August 9th, 2016
Posted June 5th, 2016
1,412 posts
9.5 Years
That is true, but I do not think any one seems to understand my problem, I just put the script in because I thought it was the problem. My problem is that XSE won't let me hit the compile button.
Download XSE 1.1.1 and the script was also the problem because there's wrong.