The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary Hack Tutorials (https://www.pokecommunity.com/forumdisplay.php?f=66)
-   -   Sierra's MEGA-HUGE XSE Scripting Tutorial (https://www.pokecommunity.com/showthread.php?t=164276)

Showsni September 12th, 2010 3:54 PM

Hi, I wonder if anyone can help? I can't make people permanently disappear. I've done the whole setflag thing with their ID number; it doesn't work for me. Or, at least, not consistently; sometimes they're gone, and sometimes they reappear.

chriskid198 September 12th, 2010 11:51 PM

Quote:

Originally Posted by Showsni (Post 6150328)
Hi, I wonder if anyone can help? I can't make people permanently disappear. I've done the whole setflag thing with their ID number; it doesn't work for me. Or, at least, not consistently; sometimes they're gone, and sometimes they reappear.

Just make them move into a tree or something... xD

EDIT:
Where do would I define nowhere in this script?

Code:

#org $start
lock
faceplayer
applymovement 0x01 $movement
message $move 0x2
release
end

#org $movement
#raw 0x01 0x62

#org $move
#move 1 =Oh, your up \v\h01.  The Professor\nwas looking for you this morning.\lYou better get to his lab quick!
release
end


EDIT 2: What do I use to check if a flag hasn't been set? You use 0x0 to check if its true, what about if its false?

Satoshi Ookami September 13th, 2010 6:26 AM

Quote:

Originally Posted by chriskid198 (Post 6151202)

EDIT 2: What do I use to check if a flag hasn't been set? You use 0x0 to check if its true, what about if its false?

if 0x0 is for false case I've already written it xD

Saitou September 13th, 2010 6:43 AM

Quote:

Originally Posted by Showsni (Post 6150328)
Hi, I wonder if anyone can help? I can't make people permanently disappear. I've done the whole setflag thing with their ID number; it doesn't work for me. Or, at least, not consistently; sometimes they're gone, and sometimes they reappear.

Umm..I'm new to this, so I don't know if I can help. Shouldn't you use the 'hidesprite 0x[person event number]' construct?

Showsni September 13th, 2010 6:53 PM

Quote:

Originally Posted by Saitou (Post 6151615)
Umm..I'm new to this, so I don't know if I can help. Shouldn't you use the 'hidesprite 0x[person event number]' construct?

I was using that too!

Anyway, I changed which numbers I was using as flags, and it started working. So, don't try using 2000 as a person's ID.

chriskid198 September 14th, 2010 2:25 AM

Quote:

Originally Posted by Ash493 (Post 6151587)
if 0x0 is for false case I've already written it xD

What? 0x0 is for False? (We need a confused smilie xD)

EDIT:
Code:

#org $start
lock
faceplayer
set flag 0x1
checkflag 0x1
if 0x1 goto @never
applymovement 0x01 @movement
message $move 0x2
release
end

#org @movement
#raw 0x01
#raw 0x62

#org $move
#move 1 =Oh, your up \v\h01.  The Professor\nwas looking for you this morning.\lYou better get to his lab quick!
release
end

#org @never
@never 0x1
release
end


XSE says that line 13 wont work.

alalexandros99 September 26th, 2010 11:21 AM

Diego you are awesome :P
YOU HELPED ME AAAAAA LOTTT

Random92 September 28th, 2010 1:29 AM

What is a "level script"? As you described in the beginning of your post. What's the difference between a level script and a normal one?

Wallace Berlitz October 1st, 2010 9:44 AM

Something's wrong in my scripts? I followed the tutorial in here but the script isn't working! =(

Spoiler:
'---------------
#org @start
lockall
setvar 0x4001 0x0
goto @snippet1

'---------------
#org @snippet1
setvar 0x8004 0x0
setvar 0x8005 0x2
special 0x174
textcolor 0x0
pause 0x1E
playsong 0x12E 0x0
preparemsg @string1 '"[player], you forgot something."
waitmsg
pause 0x55
closeonkeypress
applymovement 0xFF @move1
waitmovement 0x0
sound 0x15
applymovement 0xFF @move2
waitmovement 0x0
pause 0x1E
showsprite 0x10
compare 0x4001 0x0
msgbox @string2 0x4 '"So how was your sleep?\pWhat do yo..."
closeonkeypress
pause 0x1E
compare 0x4001 0x0
applymovement 0x10 @move3
applymovement 0xFF @move4
waitmovement 0x0
setdoorclosed 0x15 0xE
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC
waitstate
releaseall
end


'---------
' Strings
'---------
#org @string1
= [player], you forgot something.

#org @string2
= So how was your sleep?\pWhat do you think of Hiore region?\nPeace and nice isn't it?\pLet's go back to our main subject.\pHere, come with me.


'-----------
' Movements
'-----------
#org @move1
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements

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

#org @move3
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x60 'Hide
#raw 0xFE 'End of Movements

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


Nothing's happened! >.< I hope I'm not posting in a wrong section...

madarawolf October 1st, 2010 3:09 PM

OK I would like some help with my script. It's supposed to make it so you fight this guy and after you beat him he gives you a Pokemon. I'm pretty sure this should work but I would just like an experienced scripter to look over it.
Spoiler:
'---------------
#org 0x800008

#dynamic 0x800008
#org @start
trainerbattle 0x0 0x002 0x0 @before @after
msgbox @beaten 0x6
release
end

#org @give
checkflag 0x828
if 0x1 goto @give
compare LASTRESULT 0x1
if 0x1 goto @give
release
end

#org @take
givepokemon 0x109 0x0A 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
closeonkeypress
setflag 0x828
compare LASTRESULT 0x1
if 0x1 gosub @name
release
end

#org @name
call 0x1A74EB
return

#org @beaten
release
end

#org @before
= Yo./nI'm Odd Jobs Gin./nI run the Yorozuya./nI'll do any job./nas long as I get paid./nHey if I beat you then I/nget money, right?

#org @after
= Damn, no money for rent/nthis month.../nHere take this Pokemon/nI don't need another mouth/nto feed.

#org @give -Here XSE says there is a problem.
= [black_fr]"You recieved a Victini!"

#org @beaten
= I gotta go to the store/nand buy this week's JUMP.

Satoshi Ookami October 1st, 2010 11:47 PM

Quote:

Originally Posted by chriskid198 (Post 6153950)
What? 0x0 is for False? (We need a confused smilie xD)

EDIT:
Code:

#org $start
lock
faceplayer
set flag 0x1
checkflag 0x1
if 0x1 goto @never
applymovement 0x01 @movement
message $move 0x2
release
end

#org @movement
#raw 0x01
#raw 0x62

#org $move
#move 1 =Oh, your up \v\h01.  The Professor\nwas looking for you this morning.\lYou better get to his lab quick!
release
end

#org @never
@never 0x1
release
end


XSE says that line 13 wont work.

I gotta point some mistakes you made.
First: setflag must be together (I wonder why XSE did not mention this mistake)
Second: start, org and all the msgboxes also must have @. Not # or $
Third: Never use flags above 200
So in other words re-do your script =D


Quote:

Originally Posted by madarawolf (Post 6195638)
OK I would like some help with my script. It's supposed to make it so you fight this guy and after you beat him he gives you a Pokemon. I'm pretty sure this should work but I would just like an experienced scripter to look over it.
Spoiler:
'---------------
#org 0x800008

#dynamic 0x800008
#org @start
trainerbattle 0x1 0x002 0x0 @before @after @take
release
end

#org @give
checkflag 0x828
if 0x1 goto @give
compare LASTRESULT 0x1
if 0x1 goto @give
release
end
Delete this. There's no reason to have it in your script.

#org @take
msgbox @received 0x6
givepokemon 0x109 0x0A 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
closeonkeypress
setflag 0x828
compare LASTRESULT 0x1
if 0x1 gosub @name
release
end

#org @name
call 0x1A74EB
return


#org @before
= Yo./nI'm Odd Jobs Gin./nI run the Yorozuya./nI'll do any job./las long as I get paid./lHey if I beat you then I/lget money, right?

#org @after
= Put here something what would trainer say after you beat him.

#org @received
= Damn, no money for rent/nthis month.../nHere take this Pokemon/lI don't need another mouth/lto feed./p[black_fr]You recieved a Victini!

#org @beaten
= I gotta go to the store/nand buy this week's JUMP.

Fixes in bold and I'd advise to make him disappear after you receive Victini.

Quote:

Originally Posted by Wallace Berlitz (Post 6195121)
Something's wrong in my scripts? I followed the tutorial in here but the script isn't working! =(

Spoiler:
'---------------
#org @start
lockall
setvar 0x4001 0x0
goto @snippet1

'---------------
#org @snippet1
setvar 0x8004 0x0
setvar 0x8005 0x2
special 0x174
textcolor 0x0
pause 0x1E
playsong 0x12E 0x0
preparemsg @string1 '"[player], you forgot something."
waitmsg
pause 0x55
closeonkeypress
applymovement 0xFF @move1
waitmovement 0x0
sound 0x15
applymovement 0xFF @move2
waitmovement 0x0
pause 0x1E
showsprite 0x10
compare 0x4001 0x0
msgbox @string2 0x4 '"So how was your sleep?\pWhat do yo..."
closeonkeypress
pause 0x1E
compare 0x4001 0x0
applymovement 0x10 @move3
applymovement 0xFF @move4
waitmovement 0x0
setdoorclosed 0x15 0xE
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC
waitstate
releaseall
end


'---------
' Strings
'---------
#org @string1
= [player], you forgot something.

#org @string2
= So how was your sleep?\pWhat do you think of Hiore region?\nPeace and nice isn't it?\pLet's go back to our main subject.\pHere, come with me.


'-----------
' Movements
'-----------
#org @move1
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements

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

#org @move3
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x60 'Hide
#raw 0xFE 'End of Movements

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


Nothing's happened! >.< I hope I'm not posting in a wrong section...

Well... the thing is... you cannot use first setvar this way... Try to do it with flags, it'll be easier and it should work.

Blue4 October 3rd, 2010 6:00 PM

This thread should be stickied.

It's a pretty bloody comprehensive guide, and is one of the best tutorials in this subforum.

Random92 October 3rd, 2010 10:52 PM

Ash493, I've used the flags 200-205, and they work fine for me :P

I also agree with Blue4.

chriskid198 October 3rd, 2010 11:09 PM

Quote:

Originally Posted by Ash493 (Post 6196649)
I gotta point some mistakes you made.
First: setflag must be together (I wonder why XSE did not mention this mistake)
Second: start, org and all the msgboxes also must have @. Not # or $
Third: Never use flags above 200
So in other words re-do your script =D



Fixes in bold and I'd advise to make him disappear after you receive Victini.


Well... the thing is... you cannot use first setvar this way... Try to do it with flags, it'll be easier and it should work.

Why can't you use flags above 200?

Binary October 4th, 2010 3:42 AM

Quote:

Originally Posted by chriskid198 (Post 6201370)
Why can't you use flags above 200?

I think he meant below 0x200.
But, it generally depends on which flags are vacant, and the rom you're using.
I suggest you look up the archive of used flags in XSE's in-built guide.

konman719 October 8th, 2010 4:22 AM

Hey, so does anyone think they can help me out? Im trying to do something as simple as make a pokeball give you an item but when i try this it either freezes my game or the pokeball disappears when i get the item and then reappears after one step? any suggestions... also the trainer view radius in AM doesnt work for me, any suggestions on that either?

Random92 October 8th, 2010 4:27 AM

If the Pokéball disappears and then reappers after one step it could be because you've used the same flag two times. Change flag and try again. 201-205 should be safe to use in FireRed.

Echidna October 8th, 2010 5:10 AM

or just use any flag with four characters as long as the first isn't zero cause almost all flags under a thousand are already used, so set a flag above a thousand and your safe.
Of course you have to know everything about scripting so check out my tutorial which starts from beginner scripting till advance scripting and everything else. OH and super thanks to diegoisawesome for getting me going on scripting in the first place.

konman719 October 8th, 2010 8:50 AM

ok thanks guys i figured out the pokeball problem but does anyone know how to make a trainer you made approach you? whenever i change the view radius of a trainer i made, it brings the trainer to me but i cant stop talking to him and it says unfamiliar letters.... and i know my trainer works bc if i talked to him he would battle me... help plz

cenaice October 8th, 2010 2:25 PM

Can anybody help me?

When i talk to the npc in the game nothing pops up. I just get the sound when you talk to the npc. But no chat box?

Satoshi Ookami October 8th, 2010 10:52 PM

Quote:

Originally Posted by chriskid198 (Post 6201370)
Why can't you use flags above 200?

Quote:

Originally Posted by Binary (Post 6201559)
I think he meant below 0x200.
But, it generally depends on which flags are vacant, and the rom you're using.
I suggest you look up the archive of used flags in XSE's in-built guide.

Yes I meant below xD I made a stupid mistake...
The reason is that flags below 200 are mostly used. So it's advisable to use flags above 200.

chriskid198 October 9th, 2010 2:22 AM

Quote:

Originally Posted by Ash493 (Post 6211006)
Yes I meant below xD I made a stupid mistake...
The reason is that flags below 200 are mostly used. So it's advisable to use flags above 200.

But I'm not using any scripts that are already in the game..

jota_rdk October 9th, 2010 2:43 AM

Quote:

Originally Posted by cenaice (Post 6210210)
Can anybody help me?

When i talk to the npc in the game nothing pops up. I just get the sound when you talk to the npc. But no chat box?

You would should append the script so that we can help you.

Echidna October 9th, 2010 7:50 AM

Quote:

Originally Posted by chriskid198 (Post 6211146)
But I'm not using any scripts that are already in the game..

It doesn't matter any flag you use in one script generally affects its use in another script, so if you set a flag, it's perminantly set, and by the way, almost all flags under 1000 are used, so just use a four character flag where 0 isn't the first character. So
Quote:

1A3F and B3F6 and 1356
and so on all work as long as it's not like:
Quote:

123 or 03B5 or FD3 or 09F4
Oh i mean any hex number under 1000 not decimal, so even 1300 in decimal won't work, if you don't know what the difference between hex and decimal is, no offense, but go away and learn, or check out my tutorial.

chriskid198 October 9th, 2010 7:07 PM

Quote:

Originally Posted by PEDRO12 (Post 6211606)
It doesn't matter any flag you use in one script generally affects its use in another script, so if you set a flag, it's perminantly set, and by the way, almost all flags under 1000 are used, so just use a four character flag where 0 isn't the first character. So
and so on all work as long as it's not like:
Oh i mean any hex number under 1000 not decimal, so even 1300 in decimal won't work, if you don't know what the difference between hex and decimal is, no offense, but go away and learn, or check out my tutorial.

I know that it would affect another script in the game, I am keeping track of what flags I use.

Now, I kinda understand, if you use a checkflag that has one in the game already, it could mess up? Is there anyway to clear every flag/script?

EDIT: And I do know what the difference is between Hex and Decimal...

Echidna October 10th, 2010 8:33 AM

Maybe through complex hex editting or ASM editting but the only way to do that in normal hacking is by making a level script maybe at the plyer's home, where you clear everylast flag one by one, that's like 1400 flags, or more, but I don't see why, just use a flag above 1000. And visit the flag section in my tutorial, i don't remember if it's in part 1 or part 2, but go there, and you'll find a list of all used flags in each game. OK????
If you need any more help, I'll be at your service any time.

EDIT : I'm sorry to have doubted your skills, I just said that in case you didn't know. Again sorry.

chriskid198 October 10th, 2010 10:37 PM

Okay, I guess I'll just use flags over 1000?

Binary October 11th, 2010 2:08 AM

Quote:

Originally Posted by chriskid198 (Post 6216153)
Okay, I guess I'll just use flags over 1000?

XSE has an in-built guide with an archive of used flags. Just avoid the used flags and I think you should be fine.

Echidna October 11th, 2010 8:26 AM

Quote:

Originally Posted by Binary (Post 6216301)
XSE has an in-built guide with an archive of used flags. Just avoid the used flags and I think you should be fine.

You could do that too. But why go through all that trouble when you have like 50000 flags above a thousand and you have an easy time of memorizing the last flag you used when it has a base number of 1 9as in 1003, 1045, 1EF6) Now one, and i mean no one has ever been able to use 1000 flags in one hack, let alone 50000. Any ways you could do what binary said, that comletely works too.

chriskid198 October 11th, 2010 10:37 PM

Quote:

Originally Posted by Binary (Post 6216301)
XSE has an in-built guide with an archive of used flags. Just avoid the used flags and I think you should be fine.

Wow, that seems helpful, does it show flags that you've used?

Destiny. October 11th, 2010 11:31 PM

This tutorial is incredible.
INCREDIBLY helpful.

Thankyou so much! :3

Random92 October 12th, 2010 12:28 AM

Quote:

Originally Posted by chriskid198 (Post 6218590)
Wow, that seems helpful, does it show flags that you've used?

No, it only shows the flags that are used by the game. You have to keep track of your own flags.

chriskid198 October 12th, 2010 1:05 AM

Quote:

Originally Posted by Random92 (Post 6218647)
No, it only shows the flags that are used by the game. You have to keep track of your own flags.

okay, thank you!

I'll use the notes thing in XSE.

DeathYu October 14th, 2010 2:40 AM

I must said your tutorial is the best

Arukia October 27th, 2010 6:57 PM

How do I find the offset I use at the beginning? I'm confident in my scripting ability, except for this certain point...

smilewolfy October 31st, 2010 4:12 AM

Can someone please help me, when i step on a script tyle, it activates fine and moves my character to where i want it to go, but i put another apply movement after that for a different sprite and the sprite doesn't move, the game just continues with the dialogue, and i also used hidesprite but it doesn't hide the sprite, i have the correct person event number aswell but it's not working
edit:nvm, it turns out the person's number has to be less than ten, but how do make an event only happen once

Echidna November 1st, 2010 6:19 AM

use flags, at the end of the script set a flag, and at the beginning of the script check if the flag has been set and if it is, use the if command to take the script to another offset. This is how it'll look
Quote:

#dynamic 0x<FSF OFFSET>

#org @start
checkflag 0x<FLAG NUMBER>
if 0x1 goto @1
command 1
command 2
bla bla bla
setflag 0x<FLAG NUMBER>
end

#org @l
release
end
OK????

EDIT: and for the [ applymovement ] prob, always remember to use [ waitmovement 0x0 ] after each applymovement command unless you want the two movements to happen at the same time.
I hope this helped

smilewolfy November 2nd, 2010 12:59 PM

Thank you very much, i appreciate your help, and one more thing, sorry to annoy everyone with my questions, but i'm a little confused about the dynamic offsets, they're the things that you start the script off with at the top right? Um do you need a different offset for each event or just the same offset the whole game, and if so, the random people you meet who do nothing but talk about their lives, they only need the same offset, is that right, and also what do the offsets range from, like 0x8000 and up i'm guessing, sorry for the long post, and thankyou to anyone who answers my questions

masterquestmq November 3rd, 2010 3:28 AM

Ive been searching for a tutorial in making rival scripts

i knw its a mix of battle and apply movement can u make a small tutorial in doing this?

Felix Kulpa November 3rd, 2010 12:28 PM

Quote:

Originally Posted by masterquestmq (Post 6266256)
Ive been searching for a tutorial in making rival scripts

i knw its a mix of battle and apply movement can u make a small tutorial in doing this?

As in making a script that involves battling your rival and him moving away afterwards?

Baronnecro November 16th, 2010 6:00 PM

I read this site and followed its instructions.
I watched this tutorial and followed it to a T but somehow when I insert it the person EVENT just sits there not text, nothing except the sound of the text beep.


http://www.youtube.com/watch?v=kHEN-MiaO2Q

XSE WRITTEN:

#dynamic 0x71D300

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

#org @talk1
= Hey You smell like farts!


THIS IS WHAT ADVANCE MAP SHOWS COMPILED IN THE ROM:

'-----------------------
#org 0x71D300
lock
faceplayer
msgbox 0x871D30B '"Hey You smell like farts!"
release
end


'---------
' Strings
'---------
#org 0x71D30B
= Hey You smell like farts!

the command msgbox @WORD 0x6 (<---- for some odd reason that "0x6" part wouldnt work in my rom or something.)
i inserted the new line:
boxset 0x6 (instead of the 0x6 part of previous line)

Geogebra December 8th, 2010 3:12 AM

okay so I have tried to search through the forum an google, but haven't found any similar problems. so I hoped someone could answear a problem here..

I am trying to change the whole starterpokemon event, and trying to give the player a pikachu, and the rival an eevee. I have 2 scripts, one on the pokeball, and another one at the entrance(where the bookselfs is in oaks lab).. giving ash and gary the pokemon works fine, and the battle also, however after the battle I want gary to leave, but which he dont. So I wondered if anyone could help me solve this?

here are the script for the pokeball:

Code:

#dynamic 0x3B9820

#org @start
lock
faceplayer
checkflag 0x7000
if 0x0 goto @ferdig
msgbox @janei 0x5
compare LASTRESULT 0x1
if 0x1 goto @pika
msgbox @enr 0x6
release
end

#org @pika
givepokemon 0x19 0x5 0x0 0x0 0x0 0x0
setflag 0x828
fanfare 0x13E
msgbox @trer 0x4
waitfanfare
closeonkeypress
setflag 0x7000
msgbox @pikanavn 0x5
compare LASTRESULT 0x1
if 0x1 gosub @navn
msgbox @firer 0x6
checkflag 0x7000
if 0x1 gosub @gary
release
end

#org @gary
applymovement 0x08 @move1
msgbox @garys 0x6
bufferpokemon 0x00 0x55
msgbox @1 0x4
waitfanfare
closeonkeypress
return

#org @navn
call 0x1A74EB
return

#org @ferdig
msgbox @femr 0x6
release
end

#org @janei
= Oh so you have chosen Chramander.\nIndeed, it is an awesome Pokémon,\lhowever there isn't any\lCharmanders left. Don't worry\lthough here is a pikachu.

#org @enr
= OK, I see..\n..well then, go ahead and choose\lanother one

#org @trer
= Congratulations! [] obtained\ncharmander

#org @pikanavn
= name pika?

#org @firer
= take care

#org @femr
= fo shizzle ma nizzle

#org @1
= me then?

#org @garys
= Gary obtained eevee

#org @move1
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

the script for the trainerbattle:
#dynamic 0x71AABB

#org @start
checkflag 0x4001
if 0x1 goto @ferdig
checkflag 0x828
if 0x1 goto @gary
checkflag 0x4000
if 0x1 goto @oak
setflag 0x4000
end

#org @oak
msgbox @oakspeak 0x4
applymovement 0xFF @player1
closeonkeypress
end

#org @gary
setflag 0x4001
applymovement 0x08 @garymove
trainerbattle 0x0 0x146 0x0 @before @after
msgbox @garyafter 0x4
closeonkeypress
applymovement 0xFF @player2
waitmovement 0x0
applymovement 0x08 @garymove2
releaseall
end

#org @ferdig
end

#org @oakspeak
= Hey kiddo, come over here!

#org @player1
#raw 0x10
#raw 0xFE

#org @garymove
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x10
#raw 0x10
#raw 0xFE

#org @before
= Lets battle!

#org @after
= ahhh, MORRAKNNNNULLAAHH!!

#org @garyafter
= I'm heading for the pokemon league

#org @player2
#raw 0x10
#raw 0x12
#raw 0xFE

#org @garymove2
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x60
#raw 0xFE


I think that the error is in the second script, and again, the script works fine to after the battle, but after that he just dosent move.. would apreciate any help at all :) thanks!

I-shadez December 8th, 2010 6:55 AM

best tutorial ever, it has helped me so much, i got confused for a while but eventualy i got the hang of it

Zapdogre December 8th, 2010 8:09 AM

Can anyone tell me how to add the scripts to the ROMs? I've been trying for ages to no avail :(

G00dbye December 26th, 2010 4:28 AM

Quote:

Originally Posted by Zapdogre (Post 6331078)
Can anyone tell me how to add the scripts to the ROMs? I've been trying for ages to no avail :(

I hope this tutorial can help you: youtube.com/watch?v=kHEN-MiaO2Q


This is I think the best tutorial about XSE ever thank you diegoisawesome!

helmy96 December 27th, 2010 3:53 AM

Imma Still not sure of what you're talking about cause I'm not very good with numbers, but thanks anyway! :)

countryemo December 28th, 2010 12:58 PM

Hey,
I was watching Pokedude's video tuts. When I was on Flags, I saw you comment about how he cant use those in your tut cause their already used.

1) How do you create a new flag number to use (the pointer/offset?)
2) And are we allowed to use the badge/pokedex/ect.. on the 1st post?
______________________________________

New problem, Ursa Major!

I'mtrying to compile a script but the 1st one I tried it gave me this "invalid keyword lock" something like that. SO I tried a script with out the use of lock (it should work, my friend said so!) then it gave me something like this "invalid keyword end"

So basically I cant compile a script

The Scripts:
1.
Spoiler:

#dynamic 0x71A300

#org @start
lock
faceplayer
message @string MSG_NORMAL
release
end

#org @string
= [red_fr]Welcome to the PokéGarden, please\ndont disturb the Pokémon while your\lhere.\lHope you enjoy your stay.

2.
Spoiler:
#dynamic 0x71A300

#org @start
msgbox @string MSG_FACE
end

#org @string
= [red_fr]Welcome to the PokéGarden, please\ndont disturb the Pokémon while your\lhere.\lHope you enjoy your stay.


Felix Kulpa December 31st, 2010 12:20 AM

Let's say I want to make a special character who you can battle. Let's also say that this character can be rematched after beating the Elite 4 but only once, and then you can repeat this procedure. What would this code look like?

NintendoBoyDX December 31st, 2010 12:31 AM

Quote:

Originally Posted by Felix Kulpa (Post 6371008)
Let's say I want to make a special character who you can battle. Let's also say that this character can be rematched after beating the Elite 4 but only once, and then you can repeat this procedure. What would this code look like?

Simple enough.

Start your script like normal, then you'll need to set 2 flags. The first after the first battle, the 2nd after the 2nd battle.

using XSE, something like...
Code:

#dynamic ;<offset >

#org @main
lock
faceplayer
checkflag 0x1200 ;(use any unused flag you want)
if 0x01 goto @final
trainerbattle ;<arguments here>
setflag 0x1200
release
end

#org @final
checkflag 0x1201 ;(use any unused flag yo want)
if 0x01 goto @nobatttle
trainerbattle ;<arguments here>
setflag 0x1201
release
end

#org @nobattle
msgbox @finished 0x6
release
end

;strings
#org @finished
=You have already defeated me twice..


Haven't done a rough test of this but it should work.

G00dbye January 1st, 2011 10:48 AM

Quote:

Originally Posted by countryemo (Post 6365270)
Hey,
I was watching Pokedude's video tuts. When I was on Flags, I saw you comment about how he cant use those in your tut cause their already used.

1) How do you create a new flag number to use (the pointer/offset?)
2) And are we allowed to use the badge/pokedex/ect.. on the 1st post?
______________________________________

New problem, Ursa Major!

I'mtrying to compile a script but the 1st one I tried it gave me this "invalid keyword lock" something like that. SO I tried a script with out the use of lock (it should work, my friend said so!) then it gave me something like this "invalid keyword end"

So basically I cant compile a script

The Scripts:
1.
Spoiler:

#dynamic 0x71A300

#org @start
lock
faceplayer
message @string MSG_NORMAL
release
end

#org @string
= [red_fr]Welcome to the PokéGarden, please\ndont disturb the Pokémon while your\lhere.\lHope you enjoy your stay.

2.
Spoiler:
#dynamic 0x71A300

#org @start
msgbox @string MSG_FACE
end

#org @string
= [red_fr]Welcome to the PokéGarden, please\ndont disturb the Pokémon while your\lhere.\lHope you enjoy your stay.


This script must work:
Code:

#dynamic 0x71A300

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

#org @talk1
= [red_fr]Welcome to the PokéGarden, please\ndont disturb the Pokémon while your\lhere.\lHope you enjoy your stay.


I didn't test it but it should work

1) How do you create a new flag number to use (the pointer/offset?)
You must use a never used flag number

2) And are we allowed to use the badge/pokedex/ect.. on the 1st post?
I don't understand this question

FANOFFIRESTARTERS!!! January 1st, 2011 11:00 PM

Help
 
Here are my scripts

Script 1
Spoiler:

#dynamic 0x800000
#org @start
lock
faceplayer
random 0x3
compare 0x800D 0x0
if 0x1 goto @1
compare 0x800D 0x1
if 0x1 goto @2
compare 0x800D 0x2
if 0x1 goto @3
release
end

#org @3
msgbox @option1 0x6
release
end

#org @1
msgbox @option2 0x6
release
end

#org @2
msgbox @option3 0x6
release
end

#org @option1
= THIS IS RANDOM#1

#org @option 2
= THIS IS RANDOM#2

#org @option3
= THIS IS RANDOM #3


then a simple one
Spoiler:

#dynamic 0x800900
#org @start
lock
faceplayer
msgbox @hello 0x6
release
end

#org @hello
= THIS SHOULD SAY "THIS SHOULD SAY"!


Now what bothers me is ive scripted before and they worked...not these of course...and the game is recognising faceplayer but no msgbox appears for either script. Is my rom funky or do i not have the latest XSE or is my script bad. help

gamesharkhacker January 15th, 2011 6:03 AM

darken screen script
 
This is irrelevant but er.. heres a script to make the screen dark..

Spoiler:


lock
fadescreen 0x0
fadescreen 0x1
fadescreen 0x0
release
end




It works for me on Pokemon RSE.

fizzmaister January 17th, 2011 3:47 AM

So I'm trying to get the Lab in Cinnabar to allow me to revive all three Kanto fossils. I've commented a lot of the original code, and I'm trying to find where it prevents the Dome fossil from being recognized. I've caught the part at the beginning where it checks if either of the story fossils were revived, and I know that part works because after reviving the Old Amber and Helix fossil, the crazy scientist performs says the line if you don't have a fossil, instead of the one when there are no more fossils to revive.

commented original code:
Code:

#include stditems.rbh
#include stdpoke.rbh

//---------------
#org 0x16E459
lock
faceplayer
setvar LASTRESULT 0x0    //clear last result
checkflag 0x2EE            //check if Aerodactyl has been revived
if 0x1 call 0x816E87D    //if revived, check if a story fossil was revived
compare LASTRESULT 0x1
if 0x1 goto 0x816E873    //if a story fossil and Aerodactyl were revived, end script
compare 0x406A 0x2
if 0x1 goto 0x816E712
compare 0x406A 0x1
if 0x1 goto 0x816E708
call 0x816E4C8            //check if Helix Fossil is in inventory
compare LASTRESULT 0x1
if 0x1 goto 0x816E520    //if yes go to check if Old Amber and ask which (if any) of those two to revive
call 0x816E4E0            //check if Dome Fossil is in inventory
compare LASTRESULT 0x1
if 0x1 goto 0x816E562    //if yes, go to check if old Amber and ask which (if any) of the two to revive.
call 0x816E4F8            //check if Old amber is picked up and not revived.
compare LASTRESULT 0x1
if 0x1 goto 0x816E5A4    //if so, ask whether to revive old Amber
msgbox 0x819A25E MSG_KEEPOPEN //"Hiya!\pI am important doctor.\nYes..."
goto 0x816E516

//---------------
#org 0x16E87D
checkflag 0x273            //if we got helix fossil
if 0x1 goto 0x816E895    //return 1 if in inventory, else 0
checkflag 0x272            //if we got dome fossil
if 0x1 goto 0x816E8A4    //return 1 if in inventory, else 0
goto 0x816E510            //else return 0

//---------------
#org 0x16E873
msgbox 0x819A4BD MSG_KEEPOPEN //"Aiyah!\nYou come again!"
release
end

//---------------
#org 0x16E712
compare 0x4069 0x1
if 0x1 goto 0x816E734
compare 0x4069 0x2
if 0x1 goto 0x816E779
compare 0x4069 0x3
if 0x1 goto 0x816E7BE
end

//---------------
#org 0x16E708
msgbox 0x819A487 MSG_KEEPOPEN //"I take a little time!\nYou go for ..."
release
end

//---------------
#org 0x16E4C8
checkflag 0x273            //was helix fossil picked up
if 0x0 goto 0x816E510    //if not
checkflag 0x2ED            //or if already revived
if 0x1 goto 0x816E510    //return 0
setvar LASTRESULT 0x1    //
return                    //else return has Helix Fossil

//---------------
#org 0x16E520
preparemsg 0x819A25E //"Hiya!\pI am important doctor.\nYes..."
waitmsg
call 0x816E4F8            //check if old amber is picked up and not revived
compare LASTRESULT 0x1
if 0x1 goto 0x816E5D6    //if so, go here
multichoice 0x0 0x0 0x15 0x0    //ask if Helix fossil or none
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x816E644    //if Helix Fossil revive it
compare 0x8000 0x1
if 0x1 goto 0x816E516    //if no, end script
compare 0x8000 0x7F
if 0x1 goto 0x816E516    //else, end script
end

//---------------
#org 0x16E4E0
checkflag 0x272            //was dome fossil picked up
if 0x0 goto 0x816E510    //if not
checkflag 0x2EC            //or if already revived
if 0x1 goto 0x816E510    //return 0
setvar LASTRESULT 0x1
return                    //else return has Dome Fossil

//---------------
#org 0x16E562
preparemsg 0x819A25E //"Hiya!\pI am important doctor.\nYes..."
waitmsg
call 0x816E4F8            //check if Old Amber is picked up and not revived
compare LASTRESULT 0x1
if 0x1 goto 0x816E60D    //if so go to Dome and Amber choice
multichoice 0x0 0x0 0x16 0x0    //revive Dome?
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0        //if Dome
if 0x1 goto 0x816E682    //go to Dome revive
compare 0x8000 0x1        //
if 0x1 goto 0x816E516
compare 0x8000 0x7F
if 0x1 goto 0x816E516
end

//---------------
#org 0x16E4F8
checkflag 0x25E            //was Old Amber picked up
if 0x0 goto 0x816E510    //if not
checkflag 0x2EE            //or if already revived
if 0x1 goto 0x816E510    //return 0
setvar LASTRESULT 0x1
return                    //else return has Old Amber

//---------------
#org 0x16E5A4
preparemsg 0x819A25E //"Hiya!\pI am important doctor.\nYes..."
waitmsg
multichoice 0x0 0x0 0x17 0x0    //ask whether to revive old Amber
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x816E6C0        //if Old Amber, revive it
compare 0x8000 0x1
if 0x1 goto 0x816E516        //if none, end script
compare 0x8000 0x7F
if 0x1 goto 0x816E516        //else end script
end

//---------------
#org 0x16E516
msgbox 0x819A2F0 MSG_KEEPOPEN //"No!\nIs too bad!"
release
end

//---------------
#org 0x16E895
checkflag 0x2ED            //check if Helix Fossil is revived
if 0x0 goto 0x816E510    //if not revived, return 0
setvar LASTRESULT 0x1
return                    //else return story fossil revived

//---------------
#org 0x16E8A4
checkflag 0x2EC            //check if Dome Fossil is revived
if 0x0 goto 0x816E510    //if not revived, return 0
setvar LASTRESULT 0x1
return                    //else return story fossil revived

//---------------
#org 0x16E510
setvar LASTRESULT 0x0
return

//---------------
#org 0x16E734
setvar 0x4001 0x8A
bufferpokemon 0x0 PKMN_OMANYTE
msgbox 0x819A32B MSG_KEEPOPEN //"You late.\nWhere were you?\pYour f..."
givepokemon PKMN_OMANYTE 0x5 ITEM_NONE 0x0 0x0 0x0
compare LASTRESULT 0x2
if 0x1 goto 0x81A9258
setflag 0x2ED
compare LASTRESULT 0x0
if 0x1 goto 0x816E803
compare LASTRESULT 0x1
if 0x1 goto 0x816E837
end

//---------------
#org 0x16E779
setvar 0x4001 0x8C
bufferpokemon 0x0 PKMN_KABUTO
msgbox 0x819A32B MSG_KEEPOPEN //"You late.\nWhere were you?\pYour f..."
givepokemon PKMN_KABUTO 0x5 ITEM_NONE 0x0 0x0 0x0
compare LASTRESULT 0x2
if 0x1 goto 0x81A9258
setflag 0x2EC
compare LASTRESULT 0x0
if 0x1 goto 0x816E803
compare LASTRESULT 0x1
if 0x1 goto 0x816E837
end

//---------------
#org 0x16E7BE
setvar 0x4001 0x8E
bufferpokemon 0x0 PKMN_AERODACTYL
msgbox 0x819A32B MSG_KEEPOPEN //"You late.\nWhere were you?\pYour f..."
givepokemon PKMN_AERODACTYL 0x5 ITEM_NONE 0x0 0x0 0x0
compare LASTRESULT 0x2
if 0x1 goto 0x81A9258
setflag 0x2EE
compare LASTRESULT 0x0
if 0x1 goto 0x816E803
compare LASTRESULT 0x1
if 0x1 goto 0x816E837
end

//---------------
#org 0x16E5D6
multichoice 0x0 0x0 0x18 0x0    //ask if Helix Fossil or Old Amber
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x816E644        //if Helix fossil, revive it.
compare 0x8000 0x1
if 0x1 goto 0x816E6C0        //if Old Amber, revive it
compare 0x8000 0x2
if 0x1 goto 0x816E516        //if none, end script
compare 0x8000 0x7F
if 0x1 goto 0x816E516        //else end script
end

//---------------
#org 0x16E644
bufferpokemon 0x0 PKMN_OMANYTE
bufferitem 0x1 ITEM_HELIXFOSSIL
msgbox 0x819A3B0 MSG_YESNO //"Oh!\nThat is [buffer2], it is!\pIt..."
compare LASTRESULT 0x0
if 0x1 goto 0x816E6FE
msgbox 0x819A439 MSG_KEEPOPEN //"So!\nYou hurry and give me that!\p..."
textcolor 0x0
removeitem ITEM_HELIXFOSSIL 0x1
msgbox 0x819A487 MSG_KEEPOPEN //"I take a little time!\nYou go for ..."
setvar 0x406A 0x1
setvar 0x4069 0x1
release
end

//---------------
#org 0x16E60D
multichoice 0x0 0x0 0x19 0x0
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x816E682
compare 0x8000 0x1
if 0x1 goto 0x816E6C0
compare 0x8000 0x2
if 0x1 goto 0x816E516
compare 0x8000 0x7F
if 0x1 goto 0x816E516
end

//---------------
#org 0x16E682
bufferpokemon 0x0 PKMN_KABUTO
bufferitem 0x1 ITEM_DOMEFOSSIL
msgbox 0x819A3B0 MSG_YESNO //"Oh!\nThat is [buffer2], it is!\pIt..."
compare LASTRESULT 0x0
if 0x1 goto 0x816E6FE
msgbox 0x819A439 MSG_KEEPOPEN //"So!\nYou hurry and give me that!\p..."
textcolor 0x0
removeitem ITEM_DOMEFOSSIL 0x1
msgbox 0x819A487 MSG_KEEPOPEN //"I take a little time!\nYou go for ..."
setvar 0x406A 0x1
setvar 0x4069 0x2
release
end

//---------------
#org 0x16E6C0
bufferpokemon 0x0 PKMN_AERODACTYL
bufferitem 0x1 ITEM_OLDAMBER
msgbox 0x819A3B0 MSG_YESNO //"Oh!\nThat is [buffer2], it is!\pIt..."
compare LASTRESULT 0x0
if 0x1 goto 0x816E6FE
msgbox 0x819A439 MSG_KEEPOPEN //"So!\nYou hurry and give me that!\p..."
textcolor 0x0
removeitem ITEM_OLDAMBER 0x1
msgbox 0x819A487 MSG_KEEPOPEN //"I take a little time!\nYou go for ..."
setvar 0x406A 0x1
setvar 0x4069 0x3
release
end

//---------------
#org 0x1A9258
textcolor 0x3
msgbox 0x81A5E0D MSG_KEEPOPEN //"There's no more room for POKéMON!\..."
release
end

//---------------
#org 0x16E803
textcolor 0x3
fanfare 0x101
preparemsg 0x819A37A //"[player] received the [buffer1]\nf..."
waitmsg
waitfanfare
setvar 0x406A 0x0
msgbox 0x81A5683 MSG_YESNO //"Do you want to give a nickname to\..."
compare LASTRESULT 0x0
if 0x1 goto 0x816E871
call 0x81A8C03
call 0x81A74C7
goto 0x816E871

//---------------
#org 0x16E837
textcolor 0x3
fanfare 0x101
preparemsg 0x819A37A //"[player] received the [buffer1]\nf..."
waitmsg
waitfanfare
setvar 0x406A 0x0
msgbox 0x81A5683 MSG_YESNO //"Do you want to give a nickname to\..."
compare LASTRESULT 0x0
if 0x1 goto 0x816E866
call 0x81A8C0F
goto 0x816E866

//---------------
#org 0x16E6FE
msgbox 0x819A4BD MSG_KEEPOPEN //"Aiyah!\nYou come again!"
release
end

//---------------
#org 0x16E871
release
end

//---------------
#org 0x1A8C03
countpokemon
subvar LASTRESULT 0x1
copyvar 0x8004 LASTRESULT
return

//---------------
#org 0x1A74C7
fadescreen 0x1
special 0x9E
waitstate
return

//---------------
#org 0x16E866
call 0x81A8C18
goto 0x816E871

//---------------
#org 0x1A8C0F
fadescreen 0x1
special 0x166
waitstate
lock
faceplayer
return

//---------------
#org 0x1A8C18
bufferboxname 0x0 0x4037
bufferpokemon 0x1 0x4001
checkflag 0x834
if 0x0 call 0x81A8C33
checkflag 0x834
if 0x1 call 0x81A8C5E
return

//---------------
#org 0x1A8C33
special2 LASTRESULT 0x165
compare LASTRESULT 0x1
if 0x1 goto 0x81A8C4C
msgbox 0x81A5CCD MSG_KEEPOPEN //"[buffer2] was transferred to\nSome..."
return

//---------------
#org 0x1A8C5E
special2 LASTRESULT 0x165
compare LASTRESULT 0x1
if 0x1 goto 0x81A8C77
msgbox 0x81A5D0D MSG_KEEPOPEN //"[buffer2] was transferred to\nBILL..."
return

//---------------
#org 0x1A8C4C
special2 LASTRESULT 0x18A
bufferboxname 0x2 LASTRESULT
msgbox 0x81A5D4A MSG_KEEPOPEN //"BOX ["][buffer3]" on\nSomeone's PC..."
return

//---------------
#org 0x1A8C77
special2 LASTRESULT 0x18A
bufferboxname 0x2 LASTRESULT
msgbox 0x81A5D8D MSG_KEEPOPEN //"BOX ["][buffer3]" on\nBILL'S PC wa..."
return

//---------
// Strings
//---------
#org 0x19A25E
= Hiya!\pI am important doctor.\nYes, very much so, indeed.\pHere, I study rare POKéMON fossils.\nAll the time, I study.\pYou!\nHave you a fossil for me?

#org 0x19A4BD
= Aiyah!\nYou come again!

#org 0x19A487
= I take a little time!\nYou go for walk a little while!

#org 0x19A2F0
= No!\nIs too bad!

#org 0x19A32B
= You late.\nWhere were you?\pYour fossil is back to life!\nIt was [buffer1] like I think!

#org 0x19A3B0
= Oh!\nThat is [buffer2], it is!\pIt is fossil of [buffer1],\na POKéMON that is already extinct!\pMy Resurrection Machine will make\nthat POKéMON live again!

#org 0x19A439
= So!\nYou hurry and give me that!\p\c\h06Á[player] handed over the\n[buffer2] to the weird doctor.

#org 0x1A5E0D
= There's no more room for POKéMON!\pThe POKéMON BOXES are full and\ncan't accept any more!

#org 0x19A37A
= [player] received the [buffer1]\nfrom the doctor.

#org 0x1A5683
= Do you want to give a nickname to\nthis [buffer1]?

#org 0x1A5CCD
= [buffer2] was transferred to\nSomeone's PC.\pIt was placed in \nBOX ["][buffer1]."

#org 0x1A5D0D
= [buffer2] was transferred to\nBILL'S PC.\pIt was placed in \nBOX ["][buffer1]."

#org 0x1A5D4A
= BOX ["][buffer3]" on\nSomeone's PC was full.\p[buffer2] was transferred to\nBOX ["][buffer1]."

#org 0x1A5D8D
= BOX ["][buffer3]" on\nBILL'S PC was full.\p[buffer2] was transferred to\nBOX ["][buffer1]."


my replacement code:
Code:

#include stditems.rbh
#include stdpoke.rbh
#dynamic 0x800140

//---------------
#org @Start
lock
faceplayer
setvar LASTRESULT 0x0    //clear last result
checkflag 0x2EE        //check if Aerodactyl has been revived
if 0x1 call @CheckHelix
compare LASTRESULT 0x1
if 0x1 goto 0x816E873    //if a story fossil and Aerodactyl were revived, end script
compare 0x406A 0x2
if 0x1 goto 0x816E712
compare 0x406A 0x1
if 0x1 goto 0x816E708
call @HelixI
compare LASTRESULT 0x1
if 0x1 goto 0x816E520    //if yes go to check if Old Amber and ask which (if any) of those two to revive
call @DomeI
compare LASTRESULT 0x1
if 0x1 goto 0x816E562    //if yes, go to check if old Amber and ask which (if any) of the two to revive.
call 0x816E4F8            //check if Old amber is picked up and not revived.
compare LASTRESULT 0x1
if 0x1 goto 0x816E5A4    //if so, ask whether to revive old Amber
msgbox 0x819A25E MSG_KEEPOPEN //"Hiya!\pI am important doctor.\nYes..."
goto 0x816E516

//------------
#org @CheckHelix
checkflag 0x2ED
if 0x1 goto @CheckDome
return

//--------------
#org @CheckDome
checkflag 0x2EC
if 0x1 goto @Yes
return

//-------------
#org @Yes
setvar LASTRESULT 0x1
return

//-------------
#org @DomeI
checkitem 0x165 0x1
if 0x1 goto @Yes
return

//-------------
#org @HelixI
checkitem 0x166 0x1
if 0x1 goto @Yes
return


Any help would be appreciated.

SPG January 21st, 2011 5:10 PM

how would i make a boat take me to another place? no items are needed exept a starter pokemon and a pokedex and it would be a yes and no question, so i think i would need a 0x5 msgbox script but not realy sure what eles

Echidna January 23rd, 2011 3:26 AM

no one...i mean no one has ever asked that..........i have no idea.....i hope some one does cause you have me excited............but i'll check if i can find out.............open a firered rom and check the script on the islands........there should be some clue..........

masterquestmq January 27th, 2011 10:38 PM

Id just like to thank diegoisawesome, a week ago i only knew msg and give pokemon scripts

today ive been able to replicate nurse joy scripts, battle, apply movement more of the intermediate things that makes a hack look good

most importantly u made me love scripting

it really is simple and very easy to understand when u get the fundamentals which u did a fantastic job delivering

still more to learn but for now thanks 4 everything!

RedGalaxy January 28th, 2011 12:43 PM

Okay, I followed your "GivePokemon" script to the T... and it works just fine...

However, I have a problem. When I try to name my pokemon(bulbasaur), it has me re-nickname my starter(charmander).

However, when I restart the game, and get Bulbasaur first, and Charmander second... when I receive Charmander, it has me re-nickname Bulbasaur.

Is there a way to fix this?

Script
Spoiler:
#dynamic 0x71A480

#org @start
checkflag 0x200
if 0x1 goto @done
msgbox @talk1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @talk2 0x6

#org @take
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @talk3 0x4
waitfanfare
closeonkeypress
setflag 0x200
msgbox @talk4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @talk5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @done
msgbox @talk6 0x6
release
end

#org @talk1
= Hello.\nSorry to trouble you.\lI can't take care of my\lBulbasaur any more.\pCan you take care of\nit for me?

#org @talk2
= That's okay.\pI'm sure someone else will\ntake care of it.\pMaybe the nice man at the daycare.

#org @talk3
= [black_fr]You received a Bulbasaur!

#org @talk4
= [black_fr]Would you like to give a\nnickname to Bulbasaur?

#org @talk5
= Please take care of\nBulbasaur.

#org @talk6
= Are you taking care\nof Bulbasaur?

glowz January 29th, 2011 6:46 AM

Where do i save the script too once ive edited it ? :S

DefiningTheDecade January 29th, 2011 9:31 AM

So I've been attempting the apply movement thing and just doesn't seem to work.. my whole game freezes at the point the script starts

Here's the script:

Code:

#dynamic 0x800000

#org @start
checkflag 0x1000
If 0x1 call @done
msgbox @1 0x6
applymovement 0x9 @move
pause 0x5
applymovement 0xFF @move2
msgbox @2 0x6
setflag 0x1000
release
end

#org @1
= [green_fr]MOVE!!

#org @2
= [red_fr][player]:I wonder what that was about?

#org @done
release
end

#org @move
#raw 0x61
#raw 0x4A
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0xFE

#org @move2
#raw 0x63
#raw 0x13
#raw 0x6
#raw 0x4
#raw 0xFE


Does anyone see a problem?

Satoshi Ookami January 30th, 2011 12:33 AM

You've forgotten waitmovement 0x0 command after applymovement ;)

SPG January 30th, 2011 9:13 AM

i got this far in the script what do i do now (yes some comands are wrong like it says ****ing ship but they will get changed for the real comand) if this helps its for a boat

Spoiler:
#dynamic 0x800000
#org @start
lock
faceplayer
countpokemon
compare 0x800D 0x0
if 0x1 goto @notravel
checkflag 0x82F
if 0x0 goto @notravel
msgbox @1 0x5
compare 0x800D 0x1
if 0x1 goto @travel
msgbox @2 0x6
release
end
#org @travel
msgbox @4 0x6
applymovement 0xFF @moveplayer
'applymovement 0x****INGCAPTAIN @movecap
waitmovement 0xFF
'pause 0xFRIKKENPAUSE
'applymovement 0x****INGSHIP @moveship
'applymovement 0xMOVEFRIGGENPLAYERWITHSHIP @moveplayer2
'applymovement 0xMOVEFRIGGENCAPTAINWITHSHIP @movecap2
'warp 0xSOMEBANK 0xSOMEMAP 0xSOMEEXIT 0xSOMEX 0xSOMEY
release
end
#org @notravel
msgbox @3 0x6
release
end
#org @1
#org @2
@org @3

timaeus222 January 30th, 2011 3:22 PM

Thanks for this guide! I did what Felix Kulpa was trying to do, sort of. I couldn't figure out how to do it until I saw settrainerflag :)

Regeneration January 31st, 2011 1:59 AM

Quote:

Originally Posted by glowz (Post 6425311)
Where do i save the script too once ive edited it ? :S

If you want to save the script as a file somewhere on your PC, just go to File > Save as

I you want to compile the script into your ROM, then click the Compile button.

SHIVO February 22nd, 2011 12:20 PM

This was really helpful :D

But how do I put my scripts into the ROM? It doesn't let me click the compile thing, it's greyed out instead of being blue

Michizcool February 25th, 2011 10:40 AM

Hi guys Im having a bit of a problem, no matter what apply movement script i use, the game just seems to freeze as soo as i tread on the script square, ive made sure my persons id is correct and ive tried the example script in this tutorial and one taken from the game :( any ideas ?

FANOFFIRESTARTERS!!! March 8th, 2011 4:55 PM

OK, so I am currently in the beginning stage a a ROM Hack. And I have the great idea, make the three starters random, so that you don't know if you are going to get Bulbasaur, Chicorita, or Treeko for your grass choice. Now I know how to do a random script, and I know how to set flags. It's just that this is really confusing. I need to set a random flag 1, 2, or 3, that is activated in another script....I don't know if this is making any sense....so I set 1 of 3 flags, go talk to someone that will tell you 1 of 3 things, but no text box shows up but you still hear that all present bleep click sound and the lock faceplayer stuff still works. I just don't know what to do. Help.

papercut210 March 12th, 2011 2:13 AM

Incredible Tutorial! now im gunna try and learn this all tonight so i can de-noob myself & make my awesome game :|

pabioxxx March 27th, 2011 1:05 AM

Hello. Can you tell me how can i make a script like first battle in FR where we can see advice about batteling and there should be no transfer to poke center if we lose...I hope You are know what i mean, my English is not enought good to write it correctly...Thanks for answers

@Edit:
I know how it works let's look
trainerbattle 0x0 0x001 0x0 @1 @2 it's a standart
trainerbattle 0x9 0x001 0x0 @1 @2 I change first byte but there was no efect
trainerbattle 0x9 0x001 0x3 @1 @2 When i change first and third bytes it works like in fr

But if i want to do script without Oak's fighting instructions( I mean the same script so if we lose we are still in map with rival)? What should i do?
Can someone post a description of fight types (first byte). In this tutorial we can find only two descriptions 0x0 and 0x1, and maybe someone can say something more about the third byte ?:)

crispychips279 April 9th, 2011 12:49 AM

Help
 
I made this fairly basic code to let my prof give the player a starter pokemon for my hack. my lab area is the same as FR and my code uses lots of flags as I am not very advanced at scripting yet so do not know how to much else.
As far as I can tell it should work fine but when I try to talk to the prof nothing happens! Here is the code
Code:

#dynamic 0x71A5B4
#org @start
lock
faceplayer
checkflag 0x8C1
if 0x1 goto @repeat
checkflag 0x8C2
if 0x1 goto @getdex
checkflag 0x8C4
if 0x1 goto @go
checkflag 0x8C3
if 0x1 goto @congrats
checkflag 0x8C5
if 0x1 goto @how
msgbox @welcome 0x6
setflag 0x8C1
release
end
#org @repeat
msgbox @getpkmn 0x6
release
end
#org @getdex
msgbox @pokedex 0x6
setflag 0x829
msgbox @nowgo 0x6
setflag 0x8C4
release
end
#org @go
msgbox @nowgo 0x6
release
end
#org @congrats
msgbox @urgreat 0x6
release
end
#org @how
msgbox @howsit 0x6
release
end
#org @welcome
= Aaah you must\nbe [player].\lYour mother said\lyou would be coming.\pAnyway, formalities\naside I assume\lyou know why\lyou're here.\pI want you to\ngo on quest for\lme and explore the\lentire PLAZO region.\pYou see I have been\nworking on a new\lmachine, an electronic\lencyclopedia of all\lpokemon.\lI call it the\l"Pokedex"\lBut there is one\lshortfall of my\linvention.\lIt does not have\lany data programmed\linto it already,\lwhich is where you\lcome in.\pI need you to gain\ndata on every\lpokemon that inhabits\lour world, because\lonly then will my machine be\lcomplete.\pIn order to help\nyou on your quest\lI have had my\laides capture three\lrare pokemon.\lyou may take one\lof these to begin\lyour journey.
#org @getpkmn
= Don't be shy.\pGo on and get one\nof those pokemon!
#org @nowgo
= Now go explore\nthe beautiful landscape\lthat is the\lPLAZO region.
#org @urgreat
= Congratulations!\nI always knew you\lwere destined for\lgreatness [player]!
#org @howsit
= Hows my old\npokemon coming\lalong?
#org @pokedex
= Now listen closely,\nthis pokedex is a\lprototype, and the\lonly one in the\lworld, so treat\lit with EXTREME\lCARE!\pAnyway I'm very\nglad you have decided\lto do this little\ljob for me so\lthankyou


.
Any help would be greatly appreciated

Ninjutsu95 April 14th, 2011 7:04 AM

godangit
 
really ticks me off. ok, so good tutorial however something is wrong with my xse. I did all you said, for example here is my code

'-----------------------
#org 0xE3DCF0
#org @start
msgbox @sign 0x3
end
#org @hello
= WOOT! Testing!




yet, when i compile (i save rubicon thingy, then click compile after loading rom and file). And when i click compile
it says no dynamic offset specified. and i tried typing
#dynamic 0xE3DCF0 in place of #org 0xE3DCF0
and then above it yet it won't let me compile. ARGH! please help...

Olli April 16th, 2011 6:43 AM

Ok, I've got this little problem, I don't know if it has been mentioned yet, but I really want to know.

Whenever I use applymovement on a person with the ID of 10+ it doesn't work.

Here's an example

Spoiler:

#dynamic 0xoffset

#org @start
lock
faceplayer
msgbox @look
boxset 6
applymovement 0x12 @move
waitmovement 0x0
release
end

#org @look
=Look!\pI can move

#org @move
#raw 0x10 0x10 0xFE


Also,

Quote:

#org 0xE3DCF0
#org @start
msgbox @sign 0x3
end
#org @hello
= WOOT! Testing
Your problem is that you have to make one line space before going to #org @start, I think. Also your script is a little bit confusing for me, who mostly put all the #org 's at the bottom.
But here's your fixed script

Code:

#dynamic 0xE3DCF0

#org @start
lock
msgbox @sign 0x3
closeonkeypress
end

#org @sign
=WOOT! Testing


You also have to name the #org the same thing as your msgbox.
You wrote #org @hello, which will make your script unuseable.
If you already have solved the problem, then apologies.

Darthatron April 16th, 2011 7:03 AM

Quote:

Originally Posted by Olli97 (Post 6581471)
Ok, I've got this little problem, I don't know if it has been mentioned yet, but I really want to know.

Whenever I use applymovement on a person with the ID of 10+ it doesn't work.

Here's an example

Spoiler:

#dynamic 0xoffset

#org @start
lock
faceplayer
msgbox @look
boxset 6
applymovement 0x12 @move
waitmovement 0x0
release
end

#org @look
=Look!\pI can move

#org @move
#raw 0x10 0x10 0xFE

It's because your giving it a number in hexadecimal when you prefix it with "0x". The hexadecimal number for 10 is 0xA, or you can just put 10.
Code:

applymovement 0xA @move


Code:

applymovement 0x0A @move


Code:

applymovement 10 @move


^^ They all do the same thing.

Ninjutsu95 April 19th, 2011 7:49 AM

FRIIIIIIIIIIIIIIIIIIICK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! now it won't let me godang save the freaking thing. i saved it, compiled it, and when i try to load up the script (that i used - thanks both of you), for firered my bad, it won't work. this is really ticking me off. (breathes in, breathes out...) nevermind, im not mad. but still, how do you compile it so it will ACTUALLy work?.. sorry for being so dumb. >.<

potasho April 20th, 2011 4:59 AM

Help me.... If anyone knows how to make professor oak (or anyone, for that matter) give you the NATIONALdex without needing all the kanto pokemon, then can someone tell me how? thanks...

Echidna April 22nd, 2011 8:02 AM

use special 0x16F
if u don't know how to insert that into the context, go away and learn :D

pabioxxx April 26th, 2011 9:19 AM

How can I make a "check happines" script? Is it possible?

colcolstyles April 26th, 2011 7:32 PM

Quote:

Originally Posted by pabioxxx (Post 6607379)
How can I make a "check happines" script? Is it possible?

In most (if not all) of the Gen. III games there is a person who will tell the player how happy their lead pokémon is. If you can find that script (Google it or something), then you can decompile the script for that person, examine the code, and make your own.

pabioxxx April 27th, 2011 12:50 AM

Ok i have compared those scripts in different game, and main line of this script is:

special2 LASTRESULT 0xE6

Ok. But now i want to know how to use special 2 in different situations, becouse it is used in scripts like check happines or check catched pokemons (pokedex status). Is there any description of bytes using with special 2 ??

colcolstyles April 27th, 2011 1:29 PM

Quote:

Originally Posted by pabioxxx (Post 6608854)
Ok i have compared those scripts in different game, and main line of this script is:

special2 LASTRESULT 0xE6

Ok. But now i want to know how to use special 2 in different situations, becouse it is used in scripts like check happines or check catched pokemons (pokedex status). Is there any description of bytes using with special 2 ??

Yeah, that seems to be the key line. It seems that the happiness of the first pokémon is stored in LASTRESULT. The commands after the 'special2' branch off to different scripts based on how happy the pokémon is. Here's a table linking each value to each level of happiness (source: Psypokes):

Code:

Value:        Happiness:
0        0
1        1-49
2        50-99
3        100-149
4        150-199
5        200-249
6        250-255


So, for example, if you want to give the player an item if their lead pokémon has at least 200 happiness, the script would look like this:

Code:

...
special LASTRESULT 0xE6
copyvar 0x8000 LASTRESULT    // The game does this so you should do it too
compare 0x8000 0x5
if B_>= goto @happy
...

#org @happy
giveitem blah blah blah



pabioxxx April 28th, 2011 12:37 AM

Thanks for answer, :) It's very helpfull...

TheZerox9 April 30th, 2011 6:09 AM

hey is it possible to script a wildbattle that is inescapable cause i need it 4 my game.
basically, the fact that you cannot proceed until a wild pokemon in your way is beaten.
NO RUNNING AWAY

Ziddia May 1st, 2011 4:39 PM

What about creating a legendary poemon battle? I would guess that it uses something similar to a gym battle, but formatted for Pokemon...

If anyone knows this please PM me, I don't know if I can keep track of this

Quilava's Master May 2nd, 2011 1:57 PM

Quote:

Originally Posted by TheZerox9 (Post 6615302)
hey is it possible to script a wildbattle that is inescapable cause i need it 4 my game.
basically, the fact that you cannot proceed until a wild pokemon in your way is beaten.
NO RUNNING AWAY

Use
"special2 LASTRESULT 0xB4
compare LASTRESULT 0x[insert number here]
if 0x1 goto @pointer"
after the wildbattle command. The special 0xB4 checks for the result of the battle then sets a value to the variable.

comparing 0x1 checks if the pokemon fainted
comparing 0x4 checks if you ran away
comparing 0x7 checks if you caught the Pokemon.

bcrobert May 13th, 2011 11:29 PM

Great tutorial.

Is the list of flags that have been used in the Emerald ROM complete or partial? I've been adding flags from 0x900 to 0x920 since they look unused, but I just want to make sure I'm not screwing myself over for later.

inuside21 May 14th, 2011 7:04 AM

hi, im getting stucked in scripting in emerald than fire red,

'---------------
#org 0x827D52
lock
applymovement 0x9 0x8827D68
waitmovement 0x9
msgbox 0x8827DAD 0x6 '"yoh!"
release
end


'---------
' Strings
'---------
#org 0x827DAD
= yoh!


'-----------
' Movements
'-----------
#org 0x827D68
#raw 0x8 'Step Down (Normal)
#raw 0xFE 'End of Movements


i putted that code (just a example), when i put the offset above and put the 4050 in var num and 0300 (i tried 0003) brendad dont walk and try to talk, its not freezing, but my char just step and, darn! nothing happen, i tried to 4051 to 5000 but nothing work, i tried 0000 to 0003 nothing work, do all combination, nothing work,, what should i put in var number and unknown in emerald, but i tried in fire red, RED walks and talk. but in emerald, nothing happens.

hi, im getting stucked in scripting in emerald than fire red,

'---------------
#org 0x827D52
lock
applymovement 0x9 0x8827D68
waitmovement 0x9
msgbox 0x8827DAD 0x6 '"yoh!"
release
end


'---------
' Strings
'---------
#org 0x827DAD
= yoh!


'-----------
' Movements
'-----------
#org 0x827D68
#raw 0x8 'Step Down (Normal)
#raw 0xFE 'End of Movements


i putted that code (just a example), when i put the offset above and put the 4050 in var num and 0300 (i tried 0003) brendad dont walk and try to talk, its not freezing, but my char just step and, darn! nothing happen, i tried to 4051 to 5000 but nothing work, i tried 0000 to 0003 nothing work, do all combination, nothing work,, what should i put in var number and unknown in emerald, but i tried in fire red, RED walks and talk. but in emerald, nothing happens.

peirau May 25th, 2011 9:32 AM

When I put boxset 5 in my Script it keeps giving me "unknown keyword" -_-....
Anyone a solution?
Thanks,

colcolstyles May 25th, 2011 10:47 AM

Quote:

Originally Posted by peirau (Post 6659573)
When I put boxset 5 in my Script it keeps giving me "unknown keyword" -_-....
Anyone a solution?
Thanks,

'callstd' is the XSE equivalent of 'boxset'. However, if you're using it with a 'msgbox' command, you should be appending the number (0x2, 0x6, etc.) to the end of the 'msgbox' construct instead.

peirau May 25th, 2011 10:51 AM

Quote:

Originally Posted by colcolstyles (Post 6659665)
'callstd' is the XSE equivalent of 'boxset'. However, if you're using it with a 'msgbox' command, you should be appending the number (0x2, 0x6, etc.) to the end of the 'msgbox' construct instead.

Thank you very much brother I will test it :).

Weavile05 June 6th, 2011 7:14 PM

Okay, I would just like to clarify something. I haven't gotten very far in the tutorial yet, but I want to see if I can impress myself with my awesome inference skills.

So I made a givepokemon script. Long story short, your Mom gives you a Houndoom because it is your birthday. After that, she tells you to go see Professor Oak (unless i decide to change the Prof.). What I plan on doing is having the Prof. give you a Pokedex when he sees you have a Pokemon. So in order to do this, would you do something like this?

#org @start
msgbox @1 0x6
checkflag 0x828
if 0x1 goto @pokedex
msgbox @2 0x6
release
end

#org @pokedex
checkflag 0x(pokedex flag, I think it's 829)
if 0x0 goto...

And I'm not sure from there, but it would be whatever code gives you the pokedex. Right? I mean I'm pretty sure that's not exactly right, but am I at least on the right track?

DrFuji June 6th, 2011 7:42 PM

Quote:

Originally Posted by Weavile05 (Post 6681475)
Okay, I would just like to clarify something. I haven't gotten very far in the tutorial yet, but I want to see if I can impress myself with my awesome inference skills.

So I made a givepokemon script. Long story short, your Mom gives you a Houndoom because it is your birthday. After that, she tells you to go see Professor Oak (unless i decide to change the Prof.). What I plan on doing is having the Prof. give you a Pokedex when he sees you have a Pokemon. So in order to do this, would you do something like this?

#org @start
msgbox @1 0x6
checkflag 0x828
if 0x1 goto @pokedex
msgbox @2 0x6
release
end

#org @pokedex
checkflag 0x(pokedex flag, I think it's 829)
if 0x0 goto...

And I'm not sure from there, but it would be whatever code gives you the pokedex. Right? I mean I'm pretty sure that's not exactly right, but am I at least on the right track?

Yes, the Pokedex is activated with flag 0x829.

You're heading in the right direction from what I can see from your script fragment. I can't see any errors and (at this point) it looks like it will be doing what you stated above.

Weavile05 June 6th, 2011 8:03 PM

Quote:

Originally Posted by DrFuji (Post 6681511)
Yes, the Pokedex is activated with flag 0x829.

You're heading in the right direction from what I can see from your script fragment. I can't see any errors and (at this point) it looks like it will be doing what you stated above.

Awesome. Now I've just gotta figure out how to actually give the pokedex... I'm sure that's explained later in the tut though.

ZxC Mirai June 7th, 2011 12:25 AM

T_T why it doesn't COMPILES???

i cant click the Compile Button :(

SORRY I AM NEBIE IN SCRIPTING :(

Look at my screenshot

ZxC Mirai June 7th, 2011 12:29 AM

TAKE A LOOK AT THIS PLEASE :D
 
1 Attachment(s)
T_T why it doesn't COMPILES???

i cant click the Compile Button

SORRY I AM NEBIE IN SCRIPTING

Look at my screenshot

Soory for Double Posting :D

DrFuji June 7th, 2011 12:47 AM

Quote:

Originally Posted by UnForgiven* (Post 6681797)
T_T why it doesn't COMPILES???

i cant click the Compile Button

SORRY I AM NEBIE IN SCRIPTING

Look at my screenshot

Soory for Double Posting :D

You also need to open your ROM in XSE. Use the folder icon to select the ROM you want to insert the script in and then you should be able to compile the script.

You should also put in a viable offset at the top of your script.

ZxC Mirai June 8th, 2011 12:41 AM

Okay got it!! thanks............

ummm when i compile it what do i COPY???

DrFuji June 8th, 2011 1:02 AM

Quote:

Originally Posted by UnForgiven* (Post 6683526)
ummm when i compile it what do i COPY???

You need to do it for the offset which correlates to the start of your script. Copy the offset for 'start'.

ZxC Mirai June 8th, 2011 7:54 PM

Ok.... THANKS..................

pabioxxx June 9th, 2011 9:52 AM

Heh I have another problem...How can I delete scripts which was compiled to ROM by me...Well, there're too many problems witch overwrite it in hex, (ROM is unstable after it...)...So how can I do that ??

ZxC Mirai June 9th, 2011 9:07 PM

what will i gonna do copy the Start offset and then Paste the
offset in a Person in AM????

please Help ME!!

can anyone answer my question PLEASE!!!

:(

aperso June 10th, 2011 4:23 PM

Quote:

Originally Posted by UnForgiven* (Post 6686266)
what will i gonna do copy the Start offset and then Paste the
offset in a Person in AM????

please Help ME!!

can anyone answer my question PLEASE!!!

:(

yes that is what you do if you don't do that the script won't appear was that helpful enough


All times are GMT -8. The time now is 8:11 PM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.