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


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.