Sierra's MEGA-HUGE XSE Scripting Tutorial Page 21

Started by Sierraffinity December 26th, 2008 6:55 PM
  • 776138 views
  • 1232 replies
Age 26
Male
Australia
Seen June 19th, 2014
Posted February 18th, 2011
159 posts
12.8 Years
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?

#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

Memento Mori

Age 30
Male
Abyss of Time, Great Seal
Seen August 5th, 2018
Posted July 3rd, 2018
14,253 posts
14.8 Years

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
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List

Saitou

 

Male
Seen August 18th, 2014
Posted May 15th, 2012
118 posts
12.7 Years
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?
Male
Seen February 8th, 2015
Posted September 19th, 2010
3 posts
12.7 Years
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.
Age 26
Male
Australia
Seen June 19th, 2014
Posted February 18th, 2011
159 posts
12.8 Years
if 0x0 is for false case I've already written it xD
What? 0x0 is for False? (We need a confused smilie xD)

EDIT:
#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.

Wallace Berlitz

I'm back for lucks and givin'

Age 28
Battle Frontier
Seen November 15th, 2013
Posted December 6th, 2010
427 posts
15 Years
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...
Pokemon White Friencode: 0131 8408 3699 ウワリ (u wa ri)
Pokemon HeartGold Friendcode: 1076 4793 4716 (Walley)

Anyone is WELCOMED to Battle, Trade or be a Partner! :)[/FONT][/sig-reason]
Seen 4 Hours Ago
Posted January 6th, 2014
56 posts
14.5 Years
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.
why yes I am made of awsome

Satoshi Ookami

Memento Mori

Age 30
Male
Abyss of Time, Great Seal
Seen August 5th, 2018
Posted July 3rd, 2018
14,253 posts
14.8 Years
What? 0x0 is for False? (We need a confused smilie xD)

EDIT:
#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


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.

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.
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List
Age 26
Male
Australia
Seen June 19th, 2014
Posted February 18th, 2011
159 posts
12.8 Years
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?
Male
Seen July 30th, 2011
Posted July 30th, 2011
32 posts
12.7 Years
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?

Echidna

i don't care what's in your hair

Age 28
Male
Illinois
Seen April 27th, 2021
Posted May 22nd, 2019
2,077 posts
12.8 Years
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.
but my taste in music is your face
Male
Seen July 30th, 2011
Posted July 30th, 2011
32 posts
12.7 Years
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

Satoshi Ookami

Memento Mori

Age 30
Male
Abyss of Time, Great Seal
Seen August 5th, 2018
Posted July 3rd, 2018
14,253 posts
14.8 Years
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.
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.
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List

jota_rdk

Spanish hacker [Javi4315]

Male
Spain
Seen September 6th, 2016
Posted October 11th, 2014
98 posts
12.8 Years
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.
Pokémon Golden Legend // Pokémon Silver Legend


My tutorials:

__________________
My english is very bad, I know. Sorry! xD

Echidna

i don't care what's in your hair

Age 28
Male
Illinois
Seen April 27th, 2021
Posted May 22nd, 2019
2,077 posts
12.8 Years
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
1A3F and B3F6 and 1356
and so on all work as long as it's not like:
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.
but my taste in music is your face
Age 26
Male
Australia
Seen June 19th, 2014
Posted February 18th, 2011
159 posts
12.8 Years
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...