PDA

View Full Version : [Tutorial] Creating Level Scripts


cooley
August 19th, 2009, 09:56 AM
How to create a Level Script
Yes, another tutorial, due to the large amount of level script questions

Note: Before reading, please learn some scripting first.

You all may think that making a level script is really hard, and categorize it in the same field as ASM hacking. Well, it isn’t hard, at all.

This is what a level script looks like:


#dynamic 0x800000

#org @start
msgbox @string 0x6
setvar 0x4033 0x1
release
end


#org @string 0x6
= You see?\nThe level script worked!


The most important part is the "setvar 0x4033 0x1". Without this in this 'type' of level script, then you will get a repeating level script.

Well, that's the tutorial... "I'll add more Later" xD
Nah, only joking :P


Okay, the first thing you would do is head on over to the Header Tab, in A-map. I'm pretty sure, everyone knows where that is.


If you look down a little, you will see this:
http://i35.tinypic.com/2dbmo2p.jpg

Click on add, and then click on "script type". You should see a drop-down menu like this:

http://i34.tinypic.com/efm39v.jpg


All of these are different types of Level scripts. The one you most likely want is the one that is highlighted.


"01 'setmaptile' script" is not the official name, but it's used in the Pokemart in Viridian City. It's purpose is in it's name; which is to setmaptile(s) before the map loads. It's not as fast as:


"04 Validates valus, loads handler to 0x03000F28" which is used to make something happen the instant you walk into the entrance/exit of the map. It's used in the PLAYER's Room to make him face up towards the Nintendo. The best time to use this is in houses or places you warp to, not like routes and towns where you walk into.



"03 On entering map/not on menu close" This is a multipurpose one. You can checkflags, compare vars, and other things and use them to make other things happen. There are a lot of these, so there is also a lot to learn from by decompiling Nintendo's scripts.



Last but not least, "02 Validates values, loads handler to 0x03000EB0". The one that most people use to make a level script. This one, you can literally use almost all the commands, like msgbox, applymovement, fadescreen, etc. But the catch is that I haven't found a way to use it like "checkflag 0x828/if 0x1 goto @done" because once you set the var, it's set... But don't worry, I'll find a way.


Okay, once you've clicked on "02 Validates values....." You will see the script offset and script offset 2 boxes are "$000000". Also the Flag and Value boxes should be 0000 too.

http://i34.tinypic.com/14o9501.jpg

Compile your Level script [make sure it has a setvar 0x(variable) 0x(value) in the script though]
According to score_under:
It does not have to be subtracted by 1. The reason we use 0x0 in the Value box is because the var starts at 0. The Value box dictates which value the var has to be to start the script. After the script, you set it to 1 (or indeed any other value if you choose to), and this means it no longer equals zero, so no longer activates.


http://i35.tinypic.com/vq1a8l.jpg

Click Save map scripts and the Script offset box contents should change.
Save from the File menu(Ctrl+S) and play your ROM.



http://i37.tinypic.com/wvbonb.jpg


Wow, the level script really worked!!!
But...
http://i36.tinypic.com/2vrss37.jpg


Advance Map overwrites the 0000 that you put into the Value box, with FFFF. And since it's subtracted by 1, and FFFF is the highest number you can insert, the level script glitches up.


To fix this, you go to the header tab, and press Ctrl+H to get professional header view. You should see an area called "Map Options". And within it you should see "Map script offset"

http://i37.tinypic.com/rshsaq.jpg

Copy the map script offset, and open your ROM in XSE.
Once done, paste the offset in the "decompile box" and click on "level script"


http://i37.tinypic.com/205cqc6.jpg
(This is the old XSE, but they both function similarly.)


After you've pasted the offset, and toggle the level script decompile feature (last button to the right) click decompile or "Shift+Ctrl+D"


http://i33.tinypic.com/a5gsk9.jpg
ATTENTION: OLD XSE! IF YOURS LOOKS LIKE THIS, THEN YOU NEED A SERIOUS UPDATE!


#org 0x71A242
#raw word 0x0
#raw word 0x0
#raw pointer 0x880007D
#raw word 0xFFFF


#org 0x71A242
#raw word 0x0
#raw word 0x0
#raw pointer 0x880007D
#raw word 0x0


This is the important part. The 0xFFFF needs to be 0x0 so change it to 0x0 and compile. You should see the compiler log:

http://i38.tinypic.com/2jepm3n.jpg

Now your Level script should work, no problems at all...
That was easy, right Staples?

Make a level script inactive until a certain event happens

Okay, so you've had fun with Level scripts, and you're both good friends. But... You walk into a map, and need a level script to activate, but not the first or second time you enter the map, but the 5th time!

Video Demonstration:
v/cLnzkgozr3Y

For this to work, you will need the cooperation of two maps. For my example I used the Player's room [PALLET TOWN (4.0)] and PALLET TOWN (3.0) map.

In the Player's room the level script is Level script type 03 "On entering map/not on menu close":
#org 0x800000
setvar 0x4010 0x1
release
end
I set the var to 0x1 so that the level script in Pallet town is deactivated. Hope you understood that.

This should clear things up. Here is the level script in Pallet Town:

'---------------
#org 0x800007
setweather 0x4
doweather
applymovement MOVE_PLAYER 0x8800052
waitmovement 0xFF
sound 0x15
pause 0x32
msgbox 0x880002B MSG_NORMAL '"Oh, boy[.]\pJust my luck, it's rai..."
setvar 0x4010 0x1
release
end


'---------
' Strings
'---------
#org 0x80002B
= Oh, boy[.]\pJust my luck, it's raining!


'-----------
' Movements
'-----------
#org 0x800052
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements
Pretty simple huh? Basically, the level script won't activate, because the variable has been set already.

Since you enter Your Room before exited your house into Pallet town, the level script in Pallet town wont work. [/DUMBEDDOWN]

You should be outside of your house. I assigned the Daisy(Gary's sister) in Pallet town this script, as seen in the video:

'---------------
#org 0x800054
msgbox 0x8800064 MSG_NORMAL '"Setting Variable 0x4010 back to 0x..."
setvar 0x4010 0x0
release
end


'---------
' Strings
'---------
#org 0x800064
= Setting Variable 0x4010 back to 0x0\n\c\h08ó. \c\h08ó. \c\h08ó.Done!
Don't mind the "\c\h08ó" . That's just how I make my msgs. It doesn't affect the outcome at all, just added for special effects :P

And once you talk to DAISY, walk out her house, and it should start raining, just like in the Video :)

I guess that's that...
Anything else you need to know, ask here, I'll see if I can answer!
Thanks for reading!

Gamer2020
August 19th, 2009, 11:31 AM
Wow this is a great tutorial!

Thank you for this. It answered a couple of questions I had.

DawnRyder
August 19th, 2009, 11:55 AM
Thanks dude, this is awesome.

Curt_09
August 19th, 2009, 12:08 PM
Great tutorial Cooley, maybe we won't have to answer so many of these in the simple questions and script help threads anymore.

liuyanghejerry
August 20th, 2009, 04:38 AM
Seems this tut is a remake?
So cooley,why don't you update your XSE?

cooley
August 20th, 2009, 10:06 AM
Seems this tut is a remake?
So cooley,why don't you update your XSE?
I'm a BETA tester for XSE, mine is always updating. These pics were from the other thread, and since both versions of XSE do basically the same thing... Why upload new pics?

Besides, it's not like you can find the version that I used for this tutorial anywhere, anyways..

Zaptinex
August 20th, 2009, 10:29 AM
Yes! More info on how to do Level Scripts! Thanks a ton Cooley!

Pokepal17
August 21st, 2009, 11:08 AM
I was gonna make a tutorial just like this.


Good work, but it would be good to explain the other types of level scripts and the anatomy of a full level script.

BlitŻ
August 22nd, 2009, 05:36 AM
hah, this helped me, I didn't know about the other level script options, such as 03 and 04 thank much ^^

but does 03 activate whenever you enter a map?

cooley
August 22nd, 2009, 05:16 PM
I was gonna make a tutorial just like this.


Good work, but it would be good to explain the other types of level scripts and the anatomy of a full level script.
Well, it would be good. The other types of level scripts don't need to be explained. Nintendo doesn't really use them that much.

As for explaining the anatomy of a full level script, I'm pretty sure that all that is needed is a setvar and inserting the var into the Flag box in A-map ;)

hah, this helped me, I didn't know about the other level script options, such as 03 and 04 thank much ^^

but does 03 activate whenever you enter a map?
03 activates whenever you enter a map, but it doesn't have to do anything if you don't want it to. Take checkflag for instance, if a certain flag is not activated it doesn't have to do anything.

Pokepal17
August 23rd, 2009, 07:46 AM
Well, it would be good. The other types of level scripts don't need to be explained. Nintendo doesn't really use them that much.

As for explaining the anatomy of a full level script, I'm pretty sure that all that is needed is a setvar and inserting the var into the Flag box in A-map ;)


03 activates whenever you enter a map, but it doesn't have to do anything if you don't want it to. Take checkflag for instance, if a certain flag is not activated it doesn't have to do anything.

No what I meant was something else, but if I get the chance, I'll write the tutorial on it.

Surf
August 23rd, 2009, 10:46 PM
Cooleh, is there a way to make the level script not activate until a certain event has happened?

Pokepal17
August 24th, 2009, 07:11 AM
Cooleh, is there a way to make the level script not activate until a certain event has happened?

Yep.

Easy enough.

Put the var value for the lvl script as 0001 and put a setvar 0xvar 0x2 in the script.

And then before, you want the event to activate, do in a scipt, setvar 0xvar 0x1.

cooley
August 24th, 2009, 07:35 AM
Cooleh, is there a way to make the level script not activate until a certain event has happened?
It's part 2 of my tutorial... or the easier way, what pokepal said

Reygok
September 14th, 2009, 05:50 AM
Hi, i just registered, only to post here^^ (and, sorry in advane, my c nearly never works)

I just want to show you my levelscript, ooley:


'---------------
#org 0x6BEF70
#raw 0x2
#raw pointer 0x86BEF76
#raw 0x0

'---------------
#org 0x6BEF76
#raw word 0x7000
#raw word 0x0
#raw pointer 0x8802634
#raw word 0x0

'---------------
#org 0x802634
lock
checkflag 0x204
if 0x1 goto 0x8801F22
checkflag 0x201
if 0x0 goto 0x8801F22
applymovement MOVE_PLAYER 0x8801F24
waitmovement 0x0
msgbox 0x8801F2D MSG_NORMAL '"Prof. Gink: Hallo ihr beiden!\nHeu..."
applymovement 0x2 0x8801F2A
waitmovement 0x0
msgbox 0x880203C MSG_NORMAL '"Sandy: Nein, ich will dass [player..."
msgbox 0x880206A MSG_NORMAL '"Prof. Gink: Nun gut. Also [player]..."
setflag 0x203
setvar 0x7000 0x1
release
end

'---------------
#org 0x801F22
release
end


'---------
' Strings
'---------
#org 0x801F2D
= Prof. Gink: Hallo ihr beiden!\nHeute ist es soweit!\pDa ihr beide gestern 14 Jahre alt\ngeworden seit, bekommt ihr heute\leuer erstes Pokémon!\pIhr könnt zwischen 3 verschiedenen\nwählen. Also, Ladies first, wie\lman so schön sagt!\pSandy, du darfst als erstes\neins aussuchen.

#org 0x80203C
= Sandy: Nein, ich will dass [player]\nzuerst wählt!

#org 0x80206A
= Prof. Gink: Nun gut. Also [player],\ndie Pokémon liegen dort auf dem Tisch.\pSuch dir eines aus.


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

#org 0x801F2A
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements

I followed exatly you tutorial, and revised it 4 times, but I don't find the error. When I enter the map I put this level sript on, nothing happens. Do you know why? Or anyone else?

Thanky in advane

Edit: And does anybody know why some sprites have strange colors with ''showpokepic''? Bulbasaur is normal, but Charmander is black and blue ^^

psychicboy
September 16th, 2009, 06:40 AM
This sure helped me a hell of alot... :P

cooley
September 16th, 2009, 03:05 PM
Hi, i just registered, only to post here^^ (and, sorry in advane, my c nearly never works)

I just want to show you my levelscript, ooley:


'---------------
#org 0x6BEF70
#raw 0x2
#raw pointer 0x86BEF76
#raw 0x0

'---------------
#org 0x6BEF76
#raw word 0x7000
#raw word 0x0
#raw pointer 0x8802634
#raw word 0x0

'---------------
#org 0x802634
lock
checkflag 0x204
if 0x1 goto 0x8801F22
checkflag 0x201
if 0x0 goto 0x8801F22
applymovement MOVE_PLAYER 0x8801F24
waitmovement 0x0
msgbox 0x8801F2D MSG_NORMAL '"Prof. Gink: Hallo ihr beiden!\nHeu..."
applymovement 0x2 0x8801F2A
waitmovement 0x0
msgbox 0x880203C MSG_NORMAL '"Sandy: Nein, ich will dass [player..."
msgbox 0x880206A MSG_NORMAL '"Prof. Gink: Nun gut. Also [player]..."
setflag 0x203
setvar 0x7000 0x1
release
end

'---------------
#org 0x801F22
release
end


'---------
' Strings
'---------
#org 0x801F2D
= Prof. Gink: Hallo ihr beiden!\nHeute ist es soweit!\pDa ihr beide gestern 14 Jahre alt\ngeworden seit, bekommt ihr heute\leuer erstes Pokémon!\pIhr könnt zwischen 3 verschiedenen\nwählen. Also, Ladies first, wie\lman so schön sagt!\pSandy, du darfst als erstes\neins aussuchen.

#org 0x80203C
= Sandy: Nein, ich will dass [player]\nzuerst wählt!

#org 0x80206A
= Prof. Gink: Nun gut. Also [player],\ndie Pokémon liegen dort auf dem Tisch.\pSuch dir eines aus.


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

#org 0x801F2A
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements

I followed exatly you tutorial, and revised it 4 times, but I don't find the error. When I enter the map I put this level sript on, nothing happens. Do you know why? Or anyone else?

Thanky in advane

Edit: And does anybody know why some sprites have strange colors with ''showpokepic''? Bulbasaur is normal, but Charmander is black and blue ^^
Well, you shouldn't use checkflag in those type of level scripts... If you want to do something like that, see pokepal17's post above or read part two of my level script tutorial.

But for it not working, I would suggest changing the Var, to something like in the 4010-4FFF range. Post back if it doesn't work out.

Pokepal17
September 16th, 2009, 03:19 PM
Well, you shouldn't use checkflag in those type of level scripts... If you want to do something like that, see pokepal17's post above or read part two of my level script tutorial.

But for it not working, I would suggest changing the Var, to something like in the 4010-4FFF range. Post back if it doesn't work out.

Actually use vars between 0x5000 and 0x7000. The ones that you mentioned Cooley, are used already in Fire Red and some of them store returning values from specials.

ribon22x
September 16th, 2009, 07:13 PM
I like this tutorial, but I think you are missing a bit more technical concepts

Reygok
September 17th, 2009, 12:04 PM
I really dont know what was the problem, but I tried 5555 and it worked... I had tried 4500 and some others already before, but those didnt work...And I have Sapphire, not Fire Red, so they should have worked... but they simply did not^^
ANyway, thanks cooley and Pokepal, i can finally continue with my hack...

Ah, and dont you know whats this problem with the color changing sprites when I use showpokepic? I put a Charmander, a Bulbasaur and a Mudkip, and when I klick charmander, it is black, then i click bulbasaur and mudkip, they are normal color, then charmander again, who turned into blue and white, then also bulbasaur is black... does the comand wrk different in the new version of XSE, like callstd or whats the problem?

Haku.
September 17th, 2009, 05:16 PM
This could be useful to beginners learning to script.
I already learn level script when i began to scripting.Weird....

Reygok
October 7th, 2009, 09:13 AM
Hm, the level scripts, or better: the level script works, but only one! When I add another script, on an other map, the first changes in this second!
I had a script in Players house, the mother walks towards the player and say good morning and so on. But when I add a level sript in Prof Birch's Laboratory to get the first pokémon, and save it, I get my first Pokémon from my mother when I leave my room in my house! The offset of level sript 1 simply changed, its now the same as the seond! But I took a different var! Whats the problem?

VVB
October 7th, 2009, 09:33 AM
Ah, and dont you know whats this problem with the color changing sprites when I use showpokepic? I put a Charmander, a Bulbasaur and a Mudkip, and when I klick charmander, it is black, then i click bulbasaur and mudkip, they are normal color, then charmander again, who turned into blue and white, then also bulbasaur is black... does the comand wrk different in the new version of XSE, like callstd or whats the problem?

I have the same problem. It seems that the one I select first gets messed up colours.

I have no idea why. :S

cooley
October 9th, 2009, 11:28 AM
Hm, the level scripts, or better: the level script works, but only one! When I add another script, on an other map, the first changes in this second!
I had a script in Players house, the mother walks towards the player and say good morning and so on. But when I add a level sript in Prof Birch's Laboratory to get the first pokémon, and save it, I get my first Pokémon from my mother when I leave my room in my house! The offset of level sript 1 simply changed, its now the same as the seond! But I took a different var! Whats the problem?
Well, it's not the level script. It's advance-map that messes the level scripts up.
After you insert a first level script, and you move right along to the next map and try to add a level script, it would usually become the last one you entered, even if it's on a different map. So to fix this:

On the second map (that has the problems), just add about two level scripts or add them until you get a blank, editable one. Once you get the editable blank one, delete all that come before it. Now enter the settings for the level script and it should work.

Reygok
October 9th, 2009, 12:21 PM
Okay, thanks for the answer, I'm pretty sure it should work now, but I cannot test it XD
Actually, every time I open up a script with XSE, the pointers are shown as I named them, like '@start', and there are no offsets! Even when I open the Map script offset, the pointers are called '@swizzle' or something like that. That means when I change the FFFF after the pointer, and then klick compile, it says: 'no Dynamic offset'
Have I switched an option somewhere? I dont think so... Or could it be that I dont know any more how the whole thing works, because I didn't script for 2 months :p

Soul.//Silver
October 15th, 2009, 04:44 PM
Quick question, what is a Level Script and what is it used for? noob question probably, but I hang out more in the Game Developing section.

"Уровень - скрипт"
October 16th, 2009, 02:00 AM
Thanks a lot!
This tut works for me!

But I have problems with
the "03 On entering map/not on menu close" thing . . .

score_under
October 16th, 2009, 05:09 AM
Some of the technicalities here are a little off... D:
The var you(well, I) used--0x4033--should be inserted into the Flag area. And for some strange reason, the value you(I) used in the setvar command(setvar 0x4033 0x1) has to be subtracted by one.


Since I used 0x1, I subtract 1 and get 0x0. so I put 0x0 into the Value box.
It does not have to be subtracted by 1. The reason we use 0x0 in the Value box is because the var starts at 0. The Value box dictates which value the var has to be to start the script. After the script, you set it to 1 (or indeed any other value if you choose to), and this means it no longer equals zero, so no longer activates.

Wow, the level script really worked!!!
But...
http://i36.tinypic.com/2vrss37.jpg

Advance Map overwrites the 0000 that you put into the Value box, with FFFF.
Actually, it overwrites a completely separate number with FFFF, one for which there was no input box (as it was thought to be unused). This is not such a mistake in the tutorial, but for future reference it should always be set to zero, not whatever you set the "Value" box to.

cooley
October 16th, 2009, 12:34 PM
Quick question, what is a Level Script and what is it used for? noob question probably, but I hang out more in the Game Developing section.
A level script is a script that activates when the map is loaded. Simply put...

Thanks a lot!
This tut works for me!

But I have problems with
the "03 On entering map/not on menu close" thing . . .
Er.. What's the problem?

Some of the technicalities here are a little off... D:

It does not have to be subtracted by 1. The reason we use 0x0 in the Value box is because the var starts at 0. The Value box dictates which value the var has to be to start the script. After the script, you set it to 1 (or indeed any other value if you choose to), and this means it no longer equals zero, so no longer activates.
Actually, it overwrites a completely separate number with FFFF, one for which there was no input box (as it was thought to be unused). This is not such a mistake in the tutorial, but for future reference it should always be set to zero, not whatever you set the "Value" box to.
1. I didn't know that. I'll add it to the first post ;)
2. Ahh, Okay. I assumed that it overwrote the value box because it worked whenever I changed it back to 0000. But I'll change that too.

But, I have a question for you. Have you found a way to allow more than one level script (type: 02) activate on a map?

Reygok
October 16th, 2009, 12:36 PM
And why don't you answer my post, cooley XD
Perhaps you dont know an answer...

Okay, thanks for the answer, I'm pretty sure it should work now, but I cannot test it XD
Actually, every time I open up a script with XSE, the pointers are shown as I named them, like '@start', and there are no offsets! Even when I open the Map script offset, the pointers are called '@swizzle' or something like that. That means when I change the FFFF after the pointer, and then klick compile, it says: 'no Dynamic offset'
Have I switched an option somewhere? I dont think so... Or could it be that I dont know any more how the whole thing works, because I didn't script for 2 months :p

cooley
October 16th, 2009, 01:02 PM
And why don't you answer my post, cooley XD
Perhaps you dont know an answer...
Or perhaps, it could be I didn't see your question.. :D.... :tired:
To answer your question, it's not really a script related question.
I think it may be the XSE settings you have. It's called the "Refactoring function" So press Ctrl+D and uncheck the option. It appends all the static offsets you decompile, into dynamic "@snippet" labels so that you can easily repoint.

When it says "No dynamic offset", it means there's no dynamic offset there.... I thought you would've figured it out by now.

Tropical Sunlight
October 17th, 2009, 08:03 AM
I have a problem, you see.
Here's my script. I have set the level script type to 02.
#dynamic 0x66666666666666666666666666

#org @start
lock
checkgender
compare LASTRESULT 0x1
if B_BOY goto @boy
setvar 0x4033 0x1
applymovement MOVE_PLAYER @movepl
applymovement 0x12 @mover
waitmovement 0x0
msgbox @whiomg MSG_NORMAL
applymovement 0x13 @moveprof
msgbox @proftalk MSG_NORMAL
applymovement MOVE_PLAYER @facedown
applymovement 0x12 @facedown
msgbox @pchoose MSG_NORMAL
msgbox @meg MSG_NORMAL
release
end

#org @movepl
#raw 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x2 0xFE

#org @mover
#raw 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x12 0x11 0x3 0xFE

#org @facedown
#raw 0x4 0x62 0xFE

#org @boy
setvar 0x4033 0x1
applymovement MOVE_PLAYER @movepl
applymovement 0x11 @mover
waitmovement 0x0
msgbox @whiomb MSG_NORMAL
applymovement 0x13 @moveprof
msgbox @proftalk MSG_NORMAL
applymovement MOVE_PLAYER @facedown
applymovement 0x13 @facedown
msgbox @pchoose MSG_NORMAL
msgbox @meb MSG_NORMAL
release
end

#org @moveprof
#raw 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x63 0xFE

#org @whiomb
= JACK: So, where is that old man?\nHe should've been here by now.

#org @whiomg
= LUCIA: So, where is that old man?\nHe should've been here by now.

#org @proftalk
= MANGO: Old? Me?\nI prefer the word ["]experienced".

#org @pchoose
= MANGO: Well, young lads.\nYou are here to get your first\lPOKéMON, right?\pWell, I've got three POKéMON and\neach of you may only get one.\lThe POKéMON are the following:\p[red_fr]LITSCORP,\n[black_fr]the FIRE-type POKéMON,\p[blue_fr]TADTURP,\n[black_fr]the GRASS-type POKéMON and\p[blue_fr]TARNAQUAX,\n[black_fr]the WATER-type POKéMON.

#org @meb
= JACK: It's okay, [player].\nYou can choose your POKéMON first.

#org @meg
= LUCIA: It's okay, [player].\nYou can choose your POKéMON first.
The problem is, the movements for 0x11, 0x12 and 0x13 don't work.
Yes, the player does move.
How do I fix this?

cooley
October 18th, 2009, 08:25 AM
I have a problem, you see.
Here's my script. I have set the level script type to 02.
#dynamic 0x66666666666666666666666666

#org @start
lock
checkgender
compare LASTRESULT 0x1
if B_BOY goto @boy
setvar 0x4033 0x1
applymovement MOVE_PLAYER @movepl
applymovement 0x12 @mover
waitmovement 0x0
msgbox @whiomg MSG_NORMAL
applymovement 0x13 @moveprof
msgbox @proftalk MSG_NORMAL
applymovement MOVE_PLAYER @facedown
applymovement 0x12 @facedown
msgbox @pchoose MSG_NORMAL
msgbox @meg MSG_NORMAL
release
end

#org @movepl
#raw 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x2 0xFE

#org @mover
#raw 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x12 0x11 0x3 0xFE

#org @facedown
#raw 0x4 0x62 0xFE

#org @boy
setvar 0x4033 0x1
applymovement MOVE_PLAYER @movepl
applymovement 0x11 @mover
waitmovement 0x0
msgbox @whiomb MSG_NORMAL
applymovement 0x13 @moveprof
msgbox @proftalk MSG_NORMAL
applymovement MOVE_PLAYER @facedown
applymovement 0x13 @facedown
msgbox @pchoose MSG_NORMAL
msgbox @meb MSG_NORMAL
release
end

#org @moveprof
#raw 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x63 0xFE

#org @whiomb
= JACK: So, where is that old man?\nHe should've been here by now.

#org @whiomg
= LUCIA: So, where is that old man?\nHe should've been here by now.

#org @proftalk
= MANGO: Old? Me?\nI prefer the word ["]experienced".

#org @pchoose
= MANGO: Well, young lads.\nYou are here to get your first\lPOKéMON, right?\pWell, I've got three POKéMON and\neach of you may only get one.\lThe POKéMON are the following:\p[red_fr]LITSCORP,\n[black_fr]the FIRE-type POKéMON,\p[blue_fr]TADTURP,\n[black_fr]the GRASS-type POKéMON and\p[blue_fr]TARNAQUAX,\n[black_fr]the WATER-type POKéMON.

#org @meb
= JACK: It's okay, [player].\nYou can choose your POKéMON first.

#org @meg
= LUCIA: It's okay, [player].\nYou can choose your POKéMON first.
The problem is, the movements for 0x11, 0x12 and 0x13 don't work.
Yes, the player does move.
How do I fix this?
You should've posted this in the script help thread.
11 = 0xB in hex, 12 = 0xC, 13 = 0xD so if your person number is 11, you should put 0xB, 12 you should put 0xC, and so on...

0x11 = 17
0x12 = 18
0x13 = 19

So if there's no person number 17 on the map, nothing will happen :\

Tropical Sunlight
October 19th, 2009, 12:06 AM
You should've posted this in the script help thread.
11 = 0xB in hex, 12 = 0xC, 13 = 0xD so if your person number is 11, you should put 0xB, 12 you should put 0xC, and so on...

0x11 = 17
0x12 = 18
0x13 = 19

So if there's no person number 17 on the map, nothing will happen :\
Oh. Thanks cooley!
You're cool really helpful!
Thanks! Sorry for not posting this in the Script Help Thread, I thought it might've been releated to the fact that it's a level script...
thanks again!

bigtukker
October 29th, 2009, 04:21 AM
I don't really get it.
I have this code:


'---------------
#org 0x800000
msgbox 0x8800010 MSG_NORMAL '"You see?\nThe level script worked!"
setvar 0x4033 0x1
release
end


'---------
' Strings
'---------
#org 0x800010
= You see?\nThe level script worked!

and i put 800000 in the script offset 2 screen
and 4033 in flag
Still, when I go from home i don't see any textbox at all

cooley
November 1st, 2009, 11:19 AM
I don't really get it.
I have this code:


'---------------
#org 0x800000
msgbox 0x8800010 MSG_NORMAL '"You see?\nThe level script worked!"
setvar 0x4033 0x1
release
end


'---------
' Strings
'---------
#org 0x800010
= You see?\nThe level script worked!

and i put 800000 in the script offset 2 screen
and 4033 in flag
Still, when I go from home i don't see any textbox at all
What type of Level script did you try to use?

Liquid Shadow
November 1st, 2009, 01:43 PM
OMG.... All this time.... For trying to make that level script to work only after a certain event.... That solution is so simple! I can't believe I never thought of it!

Good work, Cooley!

Dratii
November 1st, 2009, 09:41 PM
Thanks for this cooley. It helped in filling in the fine gaps in my level script knowledge.

bigtukker
November 2nd, 2009, 02:10 AM
I used the 02-type (like in your example)

Patrick1463
December 5th, 2009, 06:31 AM
Uhm..hi.
Your great tutorial helped me very much. My levelscripts worked great so far.
But now I habe a little question. I wanted to set some tiles after a flag was activated.
I tried it a long time, but it dont worked...
Is there something special, that I have to use, when I want to use the command setmaptile in a levelscript?
(I tried it with script-type 03)

Metroid Die
May 14th, 2010, 03:31 AM
Hey, great tutorial, but my advance map doesn't show the map script options under header view... I'm using version 1.92, and I can't find the map script option box anywhere.

If someone could help me out it'd be awesome :)

adam60961
May 14th, 2010, 12:03 PM
Can I get some help please? I can't figure out how to even start off with a level-script! :D SOMEONE PLEASE REPLY AND HELP ME!!! Thanks

SOMEONE please tell me how to make a level script using Pokescript!
Thanks! :)

Can someone please help? I made a script using Pokescript and I did everything like it was on the tutorial... Is it bad to mix XSE with Pokescript? I made this script, here it is...

#org $start
jingle
applymovement 0xFF $oh
$oh 1 ; #binary 0x62 0xFE
pausemove 0
applymovement 5 $s
$s 1 ; #binary 0x11 0xFE
pausemove 0
message $1
$1 1 = See!
boxset 6
setflag 0x1000
setvar 0x4033 0x0001
release
end

Anyway, I did everything said on this tutorial and I can't figure out why it won't work when I come out of the players house and it doesn't work... But, when I step back onto the script box, it works... I want it where when the player steps out of the house, it triggers the script... PLEASE HELP!!! Thanks! :P

Metroid Die
May 16th, 2010, 08:22 AM
Can I get some help please? I can't figure out how to even start off with a level-script! :D SOMEONE PLEASE REPLY AND HELP ME!!! Thanks

SOMEONE please tell me how to make a level script using Pokescript!
Thanks! :)

Can someone please help? I made a script using Pokescript and I did everything like it was on the tutorial... Is it bad to mix XSE with Pokescript? I made this script, here it is...

#org $start
jingle
applymovement 0xFF $oh
$oh 1 ; #binary 0x62 0xFE
pausemove 0
applymovement 5 $s
$s 1 ; #binary 0x11 0xFE
pausemove 0
message $1
$1 1 = See!
boxset 6
setflag 0x1000
setvar 0x4033 0x0001
release
end

Anyway, I did everything said on this tutorial and I can't figure out why it won't work when I come out of the players house and it doesn't work... But, when I step back onto the script box, it works... I want it where when the player steps out of the house, it triggers the script... PLEASE HELP!!! Thanks! :P

I have the exact same problem

Someone help please

Elite Trainer Red
May 16th, 2010, 10:33 AM
thanks this really helped,
=P im gonna use this in my hack

metapod23
March 15th, 2011, 03:03 PM
I thought I'd post this here since I haven't really read it anywhere else, and I just learned how to do it :)

If anyone has ever wanted to have multiple "02 Validates values" scripts in one map, you've probably realized that just adding another map script in A-Map doesn't work. However, it is possible to have multiple 02 scripts in one map.

Go to professional header viewer and copy the Map Script Offset and open it in XSE. Got to the offset for the pointer of your 02 script - it will say:

#raw 0x2
#raw pointer ...

and then list the offset.

Re-write the script for the offset manually (you will likely have to use dynamic offsets, so change what's above to something like:

#raw 0x2
#raw pointer @go

And under your new dynamic offset, add your multiple script offsets. Basically, if the original is:

#raw word 0x5050
#raw word 0x1
#raw pointer 0x800000
#raw word 0x0

(And we know that his means that the script at 0x800000 will activate the instant you enter this map if variable 0x5050 is set to 0x1) ... and we have another script at 0x800100 that we want to activate in the same map when var 0x5050 is set to 0x2, we world write:

#raw word 0x5050
#raw word 0x1
#raw pointer 0x800000
#raw word 0x5050
#raw word 0x2
#raw pointer 0x800100
#raw word 0x0

^ And so on for any additional scripts you want to activate. Once it's compiled, all the scripts should work once the variables you indicated are activated without any freezing or errors, etc. It won't show up properly in A-Map or XSE, but it works :)

Don't know if this info is known well or not, as I haven't come across it yet, so I'm just posting it for it to be out there.

[I]-Hac*ker.
July 3rd, 2011, 02:09 AM
I thought I'd post this here since I haven't really read it anywhere else, and I just learned how to do it :)

If anyone has ever wanted to have multiple "02 Validates values" scripts in one map, you've probably realized that just adding another map script in A-Map doesn't work. However, it is possible to have multiple 02 scripts in one map.

Go to professional header viewer and copy the Map Script Offset and open it in XSE. Got to the offset for the pointer of your 02 script - it will say:

#raw 0x2
#raw pointer ...

and then list the offset.

Re-write the script for the offset manually (you will likely have to use dynamic offsets, so change what's above to something like:

#raw 0x2
#raw pointer @go

And under your new dynamic offset, add your multiple script offsets. Basically, if the original is:

#raw word 0x5050
#raw word 0x1
#raw pointer 0x800000
#raw word 0x0

(And we know that his means that the script at 0x800000 will activate the instant you enter this map if variable 0x5050 is set to 0x1) ... and we have another script at 0x800100 that we want to activate in the same map when var 0x5050 is set to 0x2, we world write:

#raw word 0x5050
#raw word 0x1
#raw pointer 0x800000
#raw word 0x5050
#raw word 0x2
#raw pointer 0x800100
#raw word 0x0

^ And so on for any additional scripts you want to activate. Once it's compiled, all the scripts should work once the variables you indicated are activated without any freezing or errors, etc. It won't show up properly in A-Map or XSE, but it works :)

Don't know if this info is known well or not, as I haven't come across it yet, so I'm just posting it for it to be out there.


Thank you sooo much :O I've been looking all over for this. Though only the first script is working, the second freezes :/
What I did: script1: compiled --> A-Map: header view--> 02 validates..... put in flag & offset, copied the map offset. Opened it in XSE, added the text metapod23 gave, and decompiled. What am I doing wrong?

metapod23
July 3rd, 2011, 06:19 AM
-Hac*ker.;6725323']Thank you sooo much :O I've been looking all over for this. Though only the first script is working, the second freezes :/
What I did: script1: compiled --> A-Map: header view--> 02 validates..... put in flag & offset, copied the map offset. Opened it in XSE, added the text metapod23 gave, and decompiled. What am I doing wrong?

Could you post the script that isn't working and also the Map Script Offset that you rewrote to include it?

[I]-Hac*ker.
July 4th, 2011, 07:01 AM
Sorry for the late reply. Here is the script.


'-----------------------
#org 0x71B598
#raw 02
#raw pointer 0x871B658
#raw 02
#raw pointer 0x871B5A3
#raw 00

'-----------------------
#org 0x71B658
#raw word 0x7001
#raw word 0x0
#raw pointer 0x880EEEF
#raw word 0x0

'-----------------------
#org 0x71B5A3
#raw word 0x7001
#raw word 0x1
#raw pointer 0x880EEEF
#raw word 0x0

'-----------------------
#org 0x80EEEF
compare 0x7001 0x0
if 0x1 goto 0x880EF08
compare 0x7001 0x1
if 0x1 goto 0x880F05B
release
end

'-----------------------
#org 0x80EF08
setvar 0x7001 0x1
checkflag 0x828
if 0x0 goto 0x880EF19
release
end

'-----------------------
#org 0x80F05B
setvar 0x7001 0x2
checkflag 0x8C6
if 0x0 goto 0x880F5DF
checkflag 0x8C8
if 0x0 goto 0x880F0CE
checkflag 0x8CA
if 0x1 goto 0x880F07E
release
end

'-----------------------
#org 0x80EF19
lockall
applymovement MOVE_PLAYER 0x880F053
waitmovement 0x0
msgbox 0x880F033 '"Prof. Cypress: Hey!\n[player]! Wait..."
callstd 0x6
applymovement 0x3 0x880F02A
waitmovement 0x0
msgbox 0x880EFD6 '"Prof. Cypress: Ah, [player].\nI've ..."
callstd 0x6
setdooropened 0x14 0x17
playsong 0x13E 0x0
applymovement 0x3 0x880EFB5
applymovement MOVE_PLAYER 0x880EF94
waitmovement 0x0
doorchange
applymovement 0x3 0x880EF91
waitmovement 0x0
setdoorclosed 0x14 0x17
doorchange
setdooropened 0x14 0x17
doorchange
applymovement MOVE_PLAYER 0x880EF8D
waitmovement 0x0
fadesong 0x12C
warp 0x4 0x3 0xFF 0x6 0xC
setdoorclosed 0x14 0x17
doorchange
release
end

'-----------------------
#org 0x80F5DF
showsprite 0x4
clearflag 0x8C7
lockall
applymovement MOVE_PLAYER 0x880F7A4
waitmovement 0x0
applymovement 0x4 0x880F770
msgbox 0x880F782 '"[rival]: Psh. Try to tell me how to..."
callstd 0x6
waitmovement 0x0
compare 0x7005 0x1
if 0x1 goto 0x880F63D
compare 0x7005 0x2
if 0x1 goto 0x880F62C
setflag 0x8C6
trainerbattle 0x0 0x2 0x0 0x880F69B 0x880F691
release
end

'-----------------------
#org 0x80F0CE
setflag 0x8C8
lock
faceplayer
msgbox 0x880F65A '"[rival]: Ugh! That didn't\nhelp at ..."
callstd 0x6
applymovement 0x4 0x880F64E
waitmovement 0x0
hidesprite 0x4
setflag 0x8C7
showsprite 0x3
clearflag 0x8C3
showsprite 0x4
clearflag 0x8C9
applymovement 0x3 0x880F58A
pause 0x50
applymovement 0x5 0x880F59D
msgbox 0x880F5B4 '"???: [rival], wait!\nYou forgot you..."
callstd 0x6
waitmovement 0x0
msgbox 0x880F4E2 '"Prof. Cypress: Is everything okay?\..."
callstd 0x6
applymovement 0x5 0x880F4DF
applymovement 0x3 0x880F4D4
waitmovement 0x0
msgbox 0x880F4A2 '"Prof. Cypress: [player]!\nCome over..."
callstd 0x6
applymovement MOVE_PLAYER 0x880F49D
waitmovement 0x0
msgbox 0x880F404 '"[rival]'s Mom: Oh, hello, [player]...."
callstd 0x6
msgbox 0x880F3D6 '"[rival]'s Mom: Really? Would you do..."
callstd 0x5
compare LASTRESULT 0x1
if 0x0 goto 0x880F1A3
msgbox 0x880F35A '"[rival]'s Mom: Oh, thank you so\nmu..."
callstd 0x6
giveitem 0x169 0x1 0x0
msgbox 0x880F297 '"[rival]'s Mom: You need that to\nge..."
callstd 0x6
applymovement 0x3 0x880F28D
waitmovement 0x0
hidesprite 0x3
setflag 0x8C3
msgbox 0x880F20B '"[rival]'s Mom: Good luck and\ngoodb..."
callstd 0x6
setflag 0x8CA
applymovement 0x5 0x880F200
waitmovement 0x0
hidesprite 0x5
setflag 0x8C9
release
end

'-----------------------
#org 0x80F07E
lock
msgbox 0x880F097 '"Remember what [rival]'s Mom said,\n..."
callstd 0x6
applymovement MOVE_PLAYER 0x880F094
waitmovement 0x0
release
end

'-----------------------
#org 0x80F63D
trainerbattle 0x0 0x2 0x0 0x880F69B 0x880F691
release
end

'-----------------------
#org 0x80F62C
trainerbattle 0x0 0x2 0x0 0x880F69B 0x880F691
release
end

'-----------------------
#org 0x80F1A3
msgbox 0x880F38F '"[rival]'s Mom: Are you sure?\nYou c..."
callstd 0x5
compare LASTRESULT 0x1
if 0x0 goto 0x880F1A3
msgbox 0x880F35A '"[rival]'s Mom: Oh, thank you so\nmu..."
callstd 0x6
giveitem 0x169 0x2 0x0
msgbox 0x880F297 '"[rival]'s Mom: You need that to\nge..."
callstd 0x6
applymovement 0x3 0x880F28D
waitmovement 0x0
hidesprite 0x3
setflag 0x8C3
msgbox 0x880F20B '"[rival]'s Mom: Good luck and\ngoodb..."
callstd 0x6
setflag 0x8CA
applymovement 0x5 0x880F200
waitmovement 0x0
hidesprite 0x5
setflag 0x8C9
release
end


'-----------
' Movements
'-----------
#org 0x80F053
#raw 62 'Exclamation Mark (!)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw FE 'End of Movements

#org 0x80F02A
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0x80EFB5
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw FE 'End of Movements

#org 0x80EF94
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw FE 'End of Movements

#org 0x80EF91
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0x80EF8D
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0x80F7A4
#raw 62 'Exclamation Mark (!)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 2 'Face Left
#raw FE 'End of Movements

#org 0x80F770
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 55 'Jump in Place (Facing Right)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 62 'Exclamation Mark (!)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw FE 'End of Movements

#org 0x80F64E
#raw 1D 'Step Down (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw FE 'End of Movements

#org 0x80F58A
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 1 'Face Up
#raw FE 'End of Movements

#org 0x80F59D
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 0 'Face Down
#raw FE 'End of Movements

#org 0x80F4DF
#raw 3 'Face Right
#raw FE 'End of Movements

#org 0x80F4D4
#raw 3 'Face Right
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 62 'Exclamation Mark (!)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw FE 'End of Movements

#org 0x80F49D
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw FE 'End of Movements

#org 0x80F28D
#raw 12 'Step Left (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw FE 'End of Movements

#org 0x80F200
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw FE 'End of Movements

#org 0x80F094
#raw 12 'Step Left (Normal)
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x80F033
= -

#org 0x80EFD6
= -

#org 0x80F782
= -

#org 0x80F69B
= -

#org 0x80F691
= -

#org 0x80F65A
= -

#org 0x80F5B4
= -

#org 0x80F4E2
= -

#org 0x80F4A2
= -

#org 0x80F404
= -

#org 0x80F3D6
= -

#org 0x80F35A
= -

#org 0x80F297
= --

#org 0x80F20B
= ---

#org 0x80F097
= -

#org 0x80F38F
= --

The Map Script Offset : $0071B598

I wasn't quite sure about what I was doing. I made 2 '[2]Validates value...' in the header view, both for the flag 7001, one for 0000 and the other for 0001. Sounded right to me ;)

Thanks for helping, Metapod23!!

colcolstyles
July 4th, 2011, 08:12 AM
-Hac*ker.;6727667']Sorry for the late reply. Here is the script.


'-----------------------
#org 0x71B598
#raw 02
#raw pointer 0x871B658
#raw 02
#raw pointer 0x871B5A3
#raw 00

'-----------------------
#org 0x71B658
#raw word 0x7001
#raw word 0x0
#raw pointer 0x880EEEF
#raw word 0x0

'-----------------------
#org 0x71B5A3
#raw word 0x7001
#raw word 0x1
#raw pointer 0x880EEEF
#raw word 0x0

'-----------------------
#org 0x80EEEF
compare 0x7001 0x0
if 0x1 goto 0x880EF08
compare 0x7001 0x1
if 0x1 goto 0x880F05B
release
end

'-----------------------
#org 0x80EF08
setvar 0x7001 0x1
checkflag 0x828
if 0x0 goto 0x880EF19
release
end

'-----------------------
#org 0x80F05B
setvar 0x7001 0x2
checkflag 0x8C6
if 0x0 goto 0x880F5DF
checkflag 0x8C8
if 0x0 goto 0x880F0CE
checkflag 0x8CA
if 0x1 goto 0x880F07E
release
end

'-----------------------
#org 0x80EF19
lockall
applymovement MOVE_PLAYER 0x880F053
waitmovement 0x0
msgbox 0x880F033 '"Prof. Cypress: Hey!\n[player]! Wait..."
callstd 0x6
applymovement 0x3 0x880F02A
waitmovement 0x0
msgbox 0x880EFD6 '"Prof. Cypress: Ah, [player].\nI've ..."
callstd 0x6
setdooropened 0x14 0x17
playsong 0x13E 0x0
applymovement 0x3 0x880EFB5
applymovement MOVE_PLAYER 0x880EF94
waitmovement 0x0
doorchange
applymovement 0x3 0x880EF91
waitmovement 0x0
setdoorclosed 0x14 0x17
doorchange
setdooropened 0x14 0x17
doorchange
applymovement MOVE_PLAYER 0x880EF8D
waitmovement 0x0
fadesong 0x12C
warp 0x4 0x3 0xFF 0x6 0xC
setdoorclosed 0x14 0x17
doorchange
release
end

'-----------------------
#org 0x80F5DF
showsprite 0x4
clearflag 0x8C7
lockall
applymovement MOVE_PLAYER 0x880F7A4
waitmovement 0x0
applymovement 0x4 0x880F770
msgbox 0x880F782 '"[rival]: Psh. Try to tell me how to..."
callstd 0x6
waitmovement 0x0
compare 0x7005 0x1
if 0x1 goto 0x880F63D
compare 0x7005 0x2
if 0x1 goto 0x880F62C
setflag 0x8C6
trainerbattle 0x0 0x2 0x0 0x880F69B 0x880F691
release
end

'-----------------------
#org 0x80F0CE
setflag 0x8C8
lock
faceplayer
msgbox 0x880F65A '"[rival]: Ugh! That didn't\nhelp at ..."
callstd 0x6
applymovement 0x4 0x880F64E
waitmovement 0x0
hidesprite 0x4
setflag 0x8C7
showsprite 0x3
clearflag 0x8C3
showsprite 0x4
clearflag 0x8C9
applymovement 0x3 0x880F58A
pause 0x50
applymovement 0x5 0x880F59D
msgbox 0x880F5B4 '"???: [rival], wait!\nYou forgot you..."
callstd 0x6
waitmovement 0x0
msgbox 0x880F4E2 '"Prof. Cypress: Is everything okay?\..."
callstd 0x6
applymovement 0x5 0x880F4DF
applymovement 0x3 0x880F4D4
waitmovement 0x0
msgbox 0x880F4A2 '"Prof. Cypress: [player]!\nCome over..."
callstd 0x6
applymovement MOVE_PLAYER 0x880F49D
waitmovement 0x0
msgbox 0x880F404 '"[rival]'s Mom: Oh, hello, [player]...."
callstd 0x6
msgbox 0x880F3D6 '"[rival]'s Mom: Really? Would you do..."
callstd 0x5
compare LASTRESULT 0x1
if 0x0 goto 0x880F1A3
msgbox 0x880F35A '"[rival]'s Mom: Oh, thank you so\nmu..."
callstd 0x6
giveitem 0x169 0x1 0x0
msgbox 0x880F297 '"[rival]'s Mom: You need that to\nge..."
callstd 0x6
applymovement 0x3 0x880F28D
waitmovement 0x0
hidesprite 0x3
setflag 0x8C3
msgbox 0x880F20B '"[rival]'s Mom: Good luck and\ngoodb..."
callstd 0x6
setflag 0x8CA
applymovement 0x5 0x880F200
waitmovement 0x0
hidesprite 0x5
setflag 0x8C9
release
end

'-----------------------
#org 0x80F07E
lock
msgbox 0x880F097 '"Remember what [rival]'s Mom said,\n..."
callstd 0x6
applymovement MOVE_PLAYER 0x880F094
waitmovement 0x0
release
end

'-----------------------
#org 0x80F63D
trainerbattle 0x0 0x2 0x0 0x880F69B 0x880F691
release
end

'-----------------------
#org 0x80F62C
trainerbattle 0x0 0x2 0x0 0x880F69B 0x880F691
release
end

'-----------------------
#org 0x80F1A3
msgbox 0x880F38F '"[rival]'s Mom: Are you sure?\nYou c..."
callstd 0x5
compare LASTRESULT 0x1
if 0x0 goto 0x880F1A3
msgbox 0x880F35A '"[rival]'s Mom: Oh, thank you so\nmu..."
callstd 0x6
giveitem 0x169 0x2 0x0
msgbox 0x880F297 '"[rival]'s Mom: You need that to\nge..."
callstd 0x6
applymovement 0x3 0x880F28D
waitmovement 0x0
hidesprite 0x3
setflag 0x8C3
msgbox 0x880F20B '"[rival]'s Mom: Good luck and\ngoodb..."
callstd 0x6
setflag 0x8CA
applymovement 0x5 0x880F200
waitmovement 0x0
hidesprite 0x5
setflag 0x8C9
release
end


'-----------
' Movements
'-----------
#org 0x80F053
#raw 62 'Exclamation Mark (!)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw FE 'End of Movements

#org 0x80F02A
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0x80EFB5
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw FE 'End of Movements

#org 0x80EF94
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw FE 'End of Movements

#org 0x80EF91
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0x80EF8D
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0x80F7A4
#raw 62 'Exclamation Mark (!)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 2 'Face Left
#raw FE 'End of Movements

#org 0x80F770
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 55 'Jump in Place (Facing Right)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 62 'Exclamation Mark (!)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw FE 'End of Movements

#org 0x80F64E
#raw 1D 'Step Down (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw FE 'End of Movements

#org 0x80F58A
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 1 'Face Up
#raw FE 'End of Movements

#org 0x80F59D
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 0 'Face Down
#raw FE 'End of Movements

#org 0x80F4DF
#raw 3 'Face Right
#raw FE 'End of Movements

#org 0x80F4D4
#raw 3 'Face Right
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 62 'Exclamation Mark (!)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw FE 'End of Movements

#org 0x80F49D
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw FE 'End of Movements

#org 0x80F28D
#raw 12 'Step Left (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw FE 'End of Movements

#org 0x80F200
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw FE 'End of Movements

#org 0x80F094
#raw 12 'Step Left (Normal)
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x80F033
= -

#org 0x80EFD6
= -

#org 0x80F782
= -

#org 0x80F69B
= -

#org 0x80F691
= -

#org 0x80F65A
= -

#org 0x80F5B4
= -

#org 0x80F4E2
= -

#org 0x80F4A2
= -

#org 0x80F404
= -

#org 0x80F3D6
= -

#org 0x80F35A
= -

#org 0x80F297
= --

#org 0x80F20B
= ---

#org 0x80F097
= -

#org 0x80F38F
= --

The Map Script Offset : $0071B598

I wasn't quite sure about what I was doing. I made 2 '[2]Validates value...' in the header view, both for the flag 7001, one for 0000 and the other for 0001. Sounded right to me ;)

Thanks for helping, Metapod23!!


It's been a while since I've dealt with level scripts but try the following (red = cut, blue = add):


'-----------------------
#org 0x71B598
#raw 02
#raw pointer 0x871B658
#raw 02
#raw pointer 0x871B5A3
#raw 00

'-----------------------
#org 0x71B658
#raw word 0x7001
#raw word 0x0
#raw pointer 0x880EEEF
#raw word 0x7001
#raw word 0x1
#raw pointer 0x880EEEF
#raw word 0x0

'-----------------------
#org 0x71B5A3
#raw word 0x7001
#raw word 0x1
#raw pointer 0x880EEEF
#raw word 0x0

'-----------------------
#org 0x80EEEF
compare 0x7001 0x0
if 0x1 goto 0x880EF08
compare 0x7001 0x1
if 0x1 goto 0x880F05B
release
end

'-----------------------
#org 0x80EF08
setvar 0x7001 0x1
checkflag 0x828
if 0x0 goto 0x880EF19
release
end

'-----------------------
#org 0x80F05B
setvar 0x7001 0x2
checkflag 0x8C6
if 0x0 goto 0x880F5DF
checkflag 0x8C8
if 0x0 goto 0x880F0CE
checkflag 0x8CA
if 0x1 goto 0x880F07E
release
end

'-----------------------
#org 0x80EF19
lockall
applymovement MOVE_PLAYER 0x880F053
waitmovement 0x0
msgbox 0x880F033 '"Prof. Cypress: Hey!\n[player]! Wait..."
callstd 0x6
applymovement 0x3 0x880F02A
waitmovement 0x0
msgbox 0x880EFD6 '"Prof. Cypress: Ah, [player].\nI've ..."
callstd 0x6
setdooropened 0x14 0x17
playsong 0x13E 0x0
applymovement 0x3 0x880EFB5
applymovement MOVE_PLAYER 0x880EF94
waitmovement 0x0
doorchange
applymovement 0x3 0x880EF91
waitmovement 0x0
setdoorclosed 0x14 0x17
doorchange
setdooropened 0x14 0x17
doorchange
applymovement MOVE_PLAYER 0x880EF8D
waitmovement 0x0
fadesong 0x12C
warp 0x4 0x3 0xFF 0x6 0xC
setdoorclosed 0x14 0x17
doorchange
release
end

'-----------------------
#org 0x80F5DF
showsprite 0x4
clearflag 0x8C7
lockall
applymovement MOVE_PLAYER 0x880F7A4
waitmovement 0x0
applymovement 0x4 0x880F770
msgbox 0x880F782 '"[rival]: Psh. Try to tell me how to..."
callstd 0x6
waitmovement 0x0
compare 0x7005 0x1
if 0x1 goto 0x880F63D
compare 0x7005 0x2
if 0x1 goto 0x880F62C
setflag 0x8C6
trainerbattle 0x0 0x2 0x0 0x880F69B 0x880F691
release
end

'-----------------------
#org 0x80F0CE
setflag 0x8C8
lock
faceplayer
msgbox 0x880F65A '"[rival]: Ugh! That didn't\nhelp at ..."
callstd 0x6
applymovement 0x4 0x880F64E
waitmovement 0x0
hidesprite 0x4
setflag 0x8C7
showsprite 0x3
clearflag 0x8C3
showsprite 0x4
clearflag 0x8C9
applymovement 0x3 0x880F58A
pause 0x50
applymovement 0x5 0x880F59D
msgbox 0x880F5B4 '"???: [rival], wait!\nYou forgot you..."
callstd 0x6
waitmovement 0x0
msgbox 0x880F4E2 '"Prof. Cypress: Is everything okay?\..."
callstd 0x6
applymovement 0x5 0x880F4DF
applymovement 0x3 0x880F4D4
waitmovement 0x0
msgbox 0x880F4A2 '"Prof. Cypress: [player]!\nCome over..."
callstd 0x6
applymovement MOVE_PLAYER 0x880F49D
waitmovement 0x0
msgbox 0x880F404 '"[rival]'s Mom: Oh, hello, [player]...."
callstd 0x6
msgbox 0x880F3D6 '"[rival]'s Mom: Really? Would you do..."
callstd 0x5
compare LASTRESULT 0x1
if 0x0 goto 0x880F1A3
msgbox 0x880F35A '"[rival]'s Mom: Oh, thank you so\nmu..."
callstd 0x6
giveitem 0x169 0x1 0x0
msgbox 0x880F297 '"[rival]'s Mom: You need that to\nge..."
callstd 0x6
applymovement 0x3 0x880F28D
waitmovement 0x0
hidesprite 0x3
setflag 0x8C3
msgbox 0x880F20B '"[rival]'s Mom: Good luck and\ngoodb..."
callstd 0x6
setflag 0x8CA
applymovement 0x5 0x880F200
waitmovement 0x0
hidesprite 0x5
setflag 0x8C9
release
end

'-----------------------
#org 0x80F07E
lock
msgbox 0x880F097 '"Remember what [rival]'s Mom said,\n..."
callstd 0x6
applymovement MOVE_PLAYER 0x880F094
waitmovement 0x0
release
end

'-----------------------
#org 0x80F63D
trainerbattle 0x0 0x2 0x0 0x880F69B 0x880F691
release
end

'-----------------------
#org 0x80F62C
trainerbattle 0x0 0x2 0x0 0x880F69B 0x880F691
release
end

'-----------------------
#org 0x80F1A3
msgbox 0x880F38F '"[rival]'s Mom: Are you sure?\nYou c..."
callstd 0x5
compare LASTRESULT 0x1
if 0x0 goto 0x880F1A3
msgbox 0x880F35A '"[rival]'s Mom: Oh, thank you so\nmu..."
callstd 0x6
giveitem 0x169 0x2 0x0
msgbox 0x880F297 '"[rival]'s Mom: You need that to\nge..."
callstd 0x6
applymovement 0x3 0x880F28D
waitmovement 0x0
hidesprite 0x3
setflag 0x8C3
msgbox 0x880F20B '"[rival]'s Mom: Good luck and\ngoodb..."
callstd 0x6
setflag 0x8CA
applymovement 0x5 0x880F200
waitmovement 0x0
hidesprite 0x5
setflag 0x8C9
release
end


'-----------
' Movements
'-----------
#org 0x80F053
#raw 62 'Exclamation Mark (!)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw FE 'End of Movements

#org 0x80F02A
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0x80EFB5
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw FE 'End of Movements

#org 0x80EF94
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw FE 'End of Movements

#org 0x80EF91
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0x80EF8D
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0x80F7A4
#raw 62 'Exclamation Mark (!)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 2 'Face Left
#raw FE 'End of Movements

#org 0x80F770
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 55 'Jump in Place (Facing Right)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 62 'Exclamation Mark (!)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw FE 'End of Movements

#org 0x80F64E
#raw 1D 'Step Down (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw FE 'End of Movements

#org 0x80F58A
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 1 'Face Up
#raw FE 'End of Movements

#org 0x80F59D
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 0 'Face Down
#raw FE 'End of Movements

#org 0x80F4DF
#raw 3 'Face Right
#raw FE 'End of Movements

#org 0x80F4D4
#raw 3 'Face Right
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 62 'Exclamation Mark (!)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw FE 'End of Movements

#org 0x80F49D
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw FE 'End of Movements

#org 0x80F28D
#raw 12 'Step Left (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw FE 'End of Movements

#org 0x80F200
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw FE 'End of Movements

#org 0x80F094
#raw 12 'Step Left (Normal)
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x80F033
= -

#org 0x80EFD6
= -

#org 0x80F782
= -

#org 0x80F69B
= -

#org 0x80F691
= -

#org 0x80F65A
= -

#org 0x80F5B4
= -

#org 0x80F4E2
= -

#org 0x80F4A2
= -

#org 0x80F404
= -

#org 0x80F3D6
= -

#org 0x80F35A
= -

#org 0x80F297
= --

#org 0x80F20B
= ---

#org 0x80F097
= -

#org 0x80F38F
= --

[I]-Hac*ker.
July 4th, 2011, 08:31 AM
It's been a while since I've dealt with level scripts but try the following (red = cut, blue = add):


'-----------------------
#org 0x71B598
#raw 02
#raw pointer 0x871B658
#raw 02
#raw pointer 0x871B5A3
#raw 00

'-----------------------
#org 0x71B658
#raw word 0x7001
#raw word 0x0
#raw pointer 0x880EEEF
#raw word 0x7001
#raw word 0x1
#raw pointer 0x880EEEF
#raw word 0x0

'-----------------------
#org 0x71B5A3
#raw word 0x7001
#raw word 0x1
#raw pointer 0x880EEEF
#raw word 0x0

'-----------------------
#org 0x80EEEF
compare 0x7001 0x0
if 0x1 goto 0x880EF08
compare 0x7001 0x1
if 0x1 goto 0x880F05B
release
end

'-----------------------
#org 0x80EF08
setvar 0x7001 0x1
checkflag 0x828
if 0x0 goto 0x880EF19
release
end

'-----------------------
#org 0x80F05B
setvar 0x7001 0x2
checkflag 0x8C6
if 0x0 goto 0x880F5DF
checkflag 0x8C8
if 0x0 goto 0x880F0CE
checkflag 0x8CA
if 0x1 goto 0x880F07E
release
end

'-----------------------
#org 0x80EF19
lockall
applymovement MOVE_PLAYER 0x880F053
waitmovement 0x0
msgbox 0x880F033 '"Prof. Cypress: Hey!\n[player]! Wait..."
callstd 0x6
applymovement 0x3 0x880F02A
waitmovement 0x0
msgbox 0x880EFD6 '"Prof. Cypress: Ah, [player].\nI've ..."
callstd 0x6
setdooropened 0x14 0x17
playsong 0x13E 0x0
applymovement 0x3 0x880EFB5
applymovement MOVE_PLAYER 0x880EF94
waitmovement 0x0
doorchange
applymovement 0x3 0x880EF91
waitmovement 0x0
setdoorclosed 0x14 0x17
doorchange
setdooropened 0x14 0x17
doorchange
applymovement MOVE_PLAYER 0x880EF8D
waitmovement 0x0
fadesong 0x12C
warp 0x4 0x3 0xFF 0x6 0xC
setdoorclosed 0x14 0x17
doorchange
release
end

'-----------------------
#org 0x80F5DF
showsprite 0x4
clearflag 0x8C7
lockall
applymovement MOVE_PLAYER 0x880F7A4
waitmovement 0x0
applymovement 0x4 0x880F770
msgbox 0x880F782 '"[rival]: Psh. Try to tell me how to..."
callstd 0x6
waitmovement 0x0
compare 0x7005 0x1
if 0x1 goto 0x880F63D
compare 0x7005 0x2
if 0x1 goto 0x880F62C
setflag 0x8C6
trainerbattle 0x0 0x2 0x0 0x880F69B 0x880F691
release
end

'-----------------------
#org 0x80F0CE
setflag 0x8C8
lock
faceplayer
msgbox 0x880F65A '"[rival]: Ugh! That didn't\nhelp at ..."
callstd 0x6
applymovement 0x4 0x880F64E
waitmovement 0x0
hidesprite 0x4
setflag 0x8C7
showsprite 0x3
clearflag 0x8C3
showsprite 0x4
clearflag 0x8C9
applymovement 0x3 0x880F58A
pause 0x50
applymovement 0x5 0x880F59D
msgbox 0x880F5B4 '"???: [rival], wait!\nYou forgot you..."
callstd 0x6
waitmovement 0x0
msgbox 0x880F4E2 '"Prof. Cypress: Is everything okay?\..."
callstd 0x6
applymovement 0x5 0x880F4DF
applymovement 0x3 0x880F4D4
waitmovement 0x0
msgbox 0x880F4A2 '"Prof. Cypress: [player]!\nCome over..."
callstd 0x6
applymovement MOVE_PLAYER 0x880F49D
waitmovement 0x0
msgbox 0x880F404 '"[rival]'s Mom: Oh, hello, [player]...."
callstd 0x6
msgbox 0x880F3D6 '"[rival]'s Mom: Really? Would you do..."
callstd 0x5
compare LASTRESULT 0x1
if 0x0 goto 0x880F1A3
msgbox 0x880F35A '"[rival]'s Mom: Oh, thank you so\nmu..."
callstd 0x6
giveitem 0x169 0x1 0x0
msgbox 0x880F297 '"[rival]'s Mom: You need that to\nge..."
callstd 0x6
applymovement 0x3 0x880F28D
waitmovement 0x0
hidesprite 0x3
setflag 0x8C3
msgbox 0x880F20B '"[rival]'s Mom: Good luck and\ngoodb..."
callstd 0x6
setflag 0x8CA
applymovement 0x5 0x880F200
waitmovement 0x0
hidesprite 0x5
setflag 0x8C9
release
end

'-----------------------
#org 0x80F07E
lock
msgbox 0x880F097 '"Remember what [rival]'s Mom said,\n..."
callstd 0x6
applymovement MOVE_PLAYER 0x880F094
waitmovement 0x0
release
end

'-----------------------
#org 0x80F63D
trainerbattle 0x0 0x2 0x0 0x880F69B 0x880F691
release
end

'-----------------------
#org 0x80F62C
trainerbattle 0x0 0x2 0x0 0x880F69B 0x880F691
release
end

'-----------------------
#org 0x80F1A3
msgbox 0x880F38F '"[rival]'s Mom: Are you sure?\nYou c..."
callstd 0x5
compare LASTRESULT 0x1
if 0x0 goto 0x880F1A3
msgbox 0x880F35A '"[rival]'s Mom: Oh, thank you so\nmu..."
callstd 0x6
giveitem 0x169 0x2 0x0
msgbox 0x880F297 '"[rival]'s Mom: You need that to\nge..."
callstd 0x6
applymovement 0x3 0x880F28D
waitmovement 0x0
hidesprite 0x3
setflag 0x8C3
msgbox 0x880F20B '"[rival]'s Mom: Good luck and\ngoodb..."
callstd 0x6
setflag 0x8CA
applymovement 0x5 0x880F200
waitmovement 0x0
hidesprite 0x5
setflag 0x8C9
release
end


'-----------
' Movements
'-----------
#org 0x80F053
#raw 62 'Exclamation Mark (!)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw FE 'End of Movements

#org 0x80F02A
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0x80EFB5
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw FE 'End of Movements

#org 0x80EF94
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw FE 'End of Movements

#org 0x80EF91
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0x80EF8D
#raw 12 'Step Left (Normal)
#raw 11 'Step Up (Normal)
#raw FE 'End of Movements

#org 0x80F7A4
#raw 62 'Exclamation Mark (!)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 2 'Face Left
#raw FE 'End of Movements

#org 0x80F770
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 55 'Jump in Place (Facing Right)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 62 'Exclamation Mark (!)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw FE 'End of Movements

#org 0x80F64E
#raw 1D 'Step Down (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw 20 'Step Right (Fast)
#raw FE 'End of Movements

#org 0x80F58A
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 1 'Face Up
#raw FE 'End of Movements

#org 0x80F59D
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 0 'Face Down
#raw FE 'End of Movements

#org 0x80F4DF
#raw 3 'Face Right
#raw FE 'End of Movements

#org 0x80F4D4
#raw 3 'Face Right
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 62 'Exclamation Mark (!)
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw 1C 'Delay5
#raw FE 'End of Movements

#org 0x80F49D
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw 13 'Step Right (Normal)
#raw FE 'End of Movements

#org 0x80F28D
#raw 12 'Step Left (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw 10 'Step Down (Normal)
#raw FE 'End of Movements

#org 0x80F200
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw FE 'End of Movements

#org 0x80F094
#raw 12 'Step Left (Normal)
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x80F033
= -

#org 0x80EFD6
= -

#org 0x80F782
= -

#org 0x80F69B
= -

#org 0x80F691
= -

#org 0x80F65A
= -

#org 0x80F5B4
= -

#org 0x80F4E2
= -

#org 0x80F4A2
= -

#org 0x80F404
= -

#org 0x80F3D6
= -

#org 0x80F35A
= -

#org 0x80F297
= --

#org 0x80F20B
= ---

#org 0x80F097
= -

#org 0x80F38F
= --

Thanks for replying! But it didn't change anything, the first script works great, but the second freezes. The music & other sprites continue on playing and moving, only the player freezes, I can't move :S

I appreciate the help, though =)(

colcolstyles
July 4th, 2011, 08:54 AM
-Hac*ker.;6727763']Thanks for replying! But it didn't change anything, the first script works great, but the second freezes. The music & other sprites continue on playing and moving, only the player freezes, I can't move :S

I appreciate the help, though =)(

Wait, why do you have a branching segment at the beginning of your level script? The thing with having multiple type 2 level scripts is that the game will automatically compare your variable ('0x7000') for you and branch to the correct script. Something else to note: if you set '0x7000' to 1 right after the first level script, it will trigger the second level script immediately after the first one finishes.

Anyway, I just tested it out and it worked so if there's a problem, you're doing something else wrong. I'm afraid I can't help you with that.

[I]-Hac*ker.
July 4th, 2011, 09:56 AM
Wait, why do you have a branching segment at the beginning of your level script? The thing with having multiple type 2 level scripts is that the game will automatically compare your variable ('0x7000') for you and branch to the correct script. Something else to note: if you set '0x7000' to 1 right after the first level script, it will trigger the second level script immediately after the first one finishes.

Anyway, I just tested it out and it worked so if there's a problem, you're doing something else wrong. I'm afraid I can't help you with that.

1. Why I did that I don't know actually, 'cause I know it checks that itself...

2. I know it will trigger the second one right after that, I want that to happen actually.

3. I think I know what's wrong... I just messed something up with another script... I think I know how to fix it, damn I hope so....

colcolstyles
July 4th, 2011, 10:14 AM
If you want the second one to start right after the first, why not just combine the two into one?

Nate VonGrimm
November 9th, 2011, 09:00 PM
I'm having a problem with my script.
Every I try to use it as a level script, I don't get the results I should see in XSE when pasting the maps offset script into it.
This is the script that I'm trying to use:
#org $testmovementscript
lock
message $whereami
boxset 6
applymovement 0xFF $huh
pausemove 0x0
message $whatisthat
boxset 6
applymovement 0xFF $runup
pause 0x30
setvar 0x5000 0x0001
release
end

#org $whereami
$whereami =Where am I?

#org $huh
#raw 0x56
#raw 0xFE

#org $whatisthat
$whatisthat =What is that?

#org $runup
#raw 0x36
#raw 0xFE

(I'm using Pokescript)

When I decompile the map offset in XSE (Level Script toggled), this is what I get:

'---------------
#org 0x6B20
#raw 0x0

I have repeated all the steps over and over again but still end up with this result and my game crashing every time.
I have removed all maps scripts so this is the only one on it.
Any help would be gratefully appreciated!

-------------------------------------------------------------------------------------------------------------------------------------------------------------
EDIT:
I figured out what my problem was, When copying the map script offset, I was copying the double '00' at the beginning of the offset.
Level scripts works perfectly now. Thank you for a great tut!

阴魂君
November 15th, 2012, 09:30 PM
Thank a lot ,but I have a question to ask you.I want the level sprite to go work when I go to a town every time,(for example,I want the weather changes at random every time I come to a town),so how to write the sprite?

itman
November 16th, 2012, 10:56 AM
Thank a lot ,but I have a question to ask you.I want the level sprite to go work when I go to a town every time,(for example,I want the weather changes at random every time I come to a town),so how to write the sprite?

Lol, Cooley isn't around anymore...:/

But it sounds to me that you just want the level script to repeat itself everytime, which is simple.
Don't use a setvar (or you can if you need to remember).
But in that case, (we'll use 0x5000 as an example), I'd setvar 0x5000 0x0.
THEN, when I put in the Flag and Value, I'd put Flag: 5000, Value: 0000.

If the value is set to zero, then the level script will always repeat itself because that variable will always be zero (unless you use an addvar command, it'll stay 0).

阴魂君
November 16th, 2012, 05:42 PM
Lol, Cooley isn't around anymore...:/

But it sounds to me that you just want the level script to repeat itself everytime, which is simple.
Don't use a setvar (or you can if you need to remember).
But in that case, (we'll use 0x5000 as an example), I'd setvar 0x5000 0x0.
THEN, when I put in the Flag and Value, I'd put Flag: 5000, Value: 0000.

If the value is set to zero, then the level script will always repeat itself because that variable will always be zero (unless you use an addvar command, it'll stay 0).

Thanks a lot (>_<)ノシI'm going to set some spirits about changing weather and weather forecast...

bluedeedrocks
November 26th, 2012, 12:23 PM
How can I create a levelscript that will run every time you enter a room until a certain flag is set?

cooley
November 28th, 2012, 06:29 AM
How can I create a levelscript that will run every time you enter a room until a certain flag is set?
Follow everything after this part on my first page post:

"Make a level script inactive until a certain event happens"
...
...
...

xutrik
February 3rd, 2013, 08:54 AM
why is to hard for mee anyone can help me PM

pokemaniaco
June 1st, 2014, 03:14 AM
I'm so sorry if I shouldn't ask in this thread... but here it goes...

My level script only works with the applymovement.The msgbox doesn't open. What's wrong? Thanks in advance ;)

#org 0x8C523B
applymovement MOVE_PLAYER 0x88C8F2B
waitmovement 0xFF
msgbox 0x89C14B0 '"Hello! I'm PROF. IVY!\nThis is a te..."
setvar 0x4033 0x1
release
end

'-----------
' Movements
'-----------
#org 0x8C8F2B
#raw 9 'Step Up (Normal)
#raw 9 'Step Up (Normal)
#raw 9 'Step Up (Normal)
#raw 9 'Step Up (Normal)
#raw 9 'Step Up (Normal)
#raw 9 'Step Up (Normal)
#raw 9 'Step Up (Normal)
#raw FE 'End of Movements


'---------
' Strings
'---------
#org 0x9C14B0
= Hello! I'm PROF. IVY!\nThis is a test to see if it all\lworks!

Spherical Ice
June 1st, 2014, 03:45 AM
#dynamic 0x800000

#org @start
applymovement MOVE_PLAYER @move1
waitmovement 0x0
msgbox @string1 0x6 '"Hello! I'm PROF. IVY!\nThis is a te..."
setvar 0x4033 0x1
release
end

'-----------
' Movements
'-----------
#org @move1
#raw 0x9 'Step Up (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0x9 'Step Up (Normal)
#raw 0xFE 'End of Movements


'---------
' Strings
'---------
#org @string1
= Hello! I'm PROF. IVY!\nThis is a test to see if it all\lworks!The above is a refactored version of your script with a few adjustments that should make it work fine. First, I changed waitmovement 0x0 to waitmovement 0xFF. While it wasn't wrong, in general it's better (and quicker) to to keep the parameter as 0x0. I've also prefaced each of the movement #raws with 0x so that XSE recognises it's in hexadecimal. The main problem I could see was your script, however, was that there was only one parameter for the msgbox command, and so I fixed that by adding 0x6. I also wonder what version of XSE you're using; to be safe, download this version, XSE 1.1.1 (https://www.dropbox.com/s/3by72bwg4zocwj8/XSE.zip), and use it instead.

pokemaniaco
June 1st, 2014, 04:40 AM
Thank you for your answer... however i've already tried before what you've said and nothing happens... I don't know If i should change the setvar number... maybe the problem is with that..

I was using the XSE 1.0.0, so thank you for your link. ;)

However, I've download it, and it shows me this picture. I don't know how to change it. Can you help me?

http://tinypic.com/view.php?pic=nn4awl&s=8#.U4se9fldUrg

Thank you so much again ;)

Spherical Ice
June 1st, 2014, 04:55 AM
Oh, just change the font. It's in the Format menu, then click "Font..." and select a nice font. I like Courier New at size 10.

pokemaniaco
June 1st, 2014, 05:27 AM
It worked! I think the problem was the XSE version :P

Thank you sooo much! ;)

Zed™
October 26th, 2014, 01:17 PM
Hi! Can anyone help me?

I do all what is explain on the first page of this topic:
I want to show a message box when I come into Pallet town, so this is my very simple script:

#dynamic 0x800000

#org @start
msgbox @hello 0x6
setvar 0x4033 0x1
release
end

#org @hello
= Hi everyone!


I've inserted it, choosing the second type of level script (Validates values, loads handler to 0x03000EB0 (playback) [02]), putting on "Flag" the number 4033 and mantaining on $0000 the "value box";

Well, now testing the rom it should appear, when I come to Pallet town, the message "Hello everyone!" following strange symbols, due to the fact that Amap overwrites the 0000 that I've put into the Value box, with FFFF.

But in practice "Hello everyone" doesn't appear, in the message box there are only the symbols.
Anyway I've opened the level script on XSE and I've changed the value:

#raw word 0xFFFF

to

#raw word 0x0.

I've compiled it and saved on Amap, but now, when I come to Pallet town, no message appear, as if there weren't a script!


This is the original level script take from "Map Script Offset":

'---------------
#org 0x71A23C
#raw 0x2
#raw pointer 0x871A242
#raw 0x0

'---------------
#org 0x71A242
#raw word 0x4033
#raw word 0x0
#raw pointer 0x8800000
#raw word 0xFFFF

'---------------
#org 0x800000
msgbox 0x8800010 MSG_NORMAL '"Hi everyone!"
setvar 0x4033 0x1
release
end


'---------
' Strings
'---------
#org 0x800010
= Hi everyone!.


I'm using XSE 1.1.1 and Amap 1.95, thanks for the help!