Sierra's MEGA-HUGE XSE Scripting Tutorial Page 43

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

NG55

Male
Barrie, Ontario, Canada
Seen January 12th, 2023
Posted February 22nd, 2022
88 posts
13.6 Years
Probably your script was wrong. If it was correct, the error define wouldn't appear.
The rest is fine, it just won't do the LASTRESULT thing, so the player has to go into the nickname screen. Shall I PM you the script?

Mana

Age 31
Male
UK
Seen March 25th, 2023
Posted August 18th, 2021
10,075 posts
14.3 Years
LASTRESULT doesn't do work. It's telling me to define something.

Not sure what happened here...

if LASTRESULT doesn't work use 0x800D in its place.


I need help... I'm trying to make scripts in Fire red, but every time I add one, and I walk into the script, the game just crashes. I have no idea what I'm doing wrong. (I'm a noob to scripting, however)

This is a short script I wrote just to paste here:
Spoiler:
'---------------
#org 0x740000
lock
msgbox 0x874000C MSG_NORMAL '"Moo."
release
end


'---------
' Strings
'---------
#org 0x74000C
= Moo.
Put that in a person event and it should work fine :) green script tiles need to have variables selected - I believe there is a tutorial on them by KarateKid.

Squeetz

ROM Hacker

Age 25
Male
Norway
Seen August 9th, 2021
Posted December 16th, 2018
236 posts
9.9 Years
Put that in a person event and it should work fine green script tiles need to have variables selected - I believe there is a tutorial on them by KarateKid.
All right, I'll be sure to check it out, thank you

U.Flame

Maker of Short Games

Age 27
Male
Unknown
Seen 6 Days Ago
Posted January 17th, 2023
1,322 posts
14.9 Years
Having trouble making giveitem commands. I'm getting "Error 13 Type Mismatch on line 29. Missing #define." Here's what I have. Line 29 is the first giveitem command.
#dynamic 0x304F18

#org @essentials
lock
faceplayer
checkflag 0x1200
if 0x1 goto @done
msgbox @message1 0x5
compare 0x800D 0x1
if 0x1 goto @take
msgbox @message3 0x6
release
end

#org @take
setflag 0x807
setflag 0x808
setflag 0x809
setflag 0x80A
setflag 0x80B
setflag 0x80C
setflag 0x80D
setflag 0x80E
setflag 0x800
setflag 0x801
setflag 0x860
givepokemon 0x97 0x64 0x0 0x0 0x0 0x0
givepokemon 0x97 0x64 0x0 0x0 0x0 0x0
giveitem 0x153 0x1 MSG_OBTAIN
giveitem 0x154 0x1 MSG_OBTAIN
giveitem 0x155 0x1 MSG_OBTAIN
giveitem 0x156 0x1 MSG_OBTAIN
giveitem 0x157 0x1 MSG_OBTAIN
giveitem 0x158 0x1 MSG_OBTAIN
giveitem 0x159 0x1 MSG_OBTAIN
giveitem 0x15A 0x1 MSG_OBTAIN
msgbox @message4 0x6
setflag 0x1200
release
end

#org @done
msgbox @message2 0x6
release
end

#org @message4
= All set!

#org @message2
= Good luck!

#org @message1
= Want some testing essentials?

#org @message3
= ...really?

Well, destinedjagold provided me a different version of XSE it fixed the problem. Dunno what caused it or why this one fixed it, but yay.
The more you learn about something, the more you realize just how much you don't know. I've shelved my more ambitious ideas in favor of smaller, more feasible projects and contributions. While I still have an ongoing project, and still intend to experiment with improving Gen 3's multiplayer, it's been much less stressful doing smaller things, like entries for Anthroyd's MAGM contests.

Of which you can check out here:
Naillevaihcam
Magical Altering Gym Menagerie

Squeetz

ROM Hacker

Age 25
Male
Norway
Seen August 9th, 2021
Posted December 16th, 2018
236 posts
9.9 Years
Having another problem. For some reason, the script doesn't move the sprites in-game (This is a script tile) (I am 100% sure they are the same event no. as in the script) The script will only show the messages and the players movements.
Here's the script I composed (after compiling it and re-opening it):
Spoiler:
'---------------
#org 0x755000
lock
checkflag 0x202
if 0x1 goto 0x87550DC
msgbox 0x87550DF MSG_NORMAL '"Wait, [player]!"
movesprite 0x8 0x46 0x10 <---- These right here. Are they in the wrong position or something?
movesprite 0x3 0x46 0x10 I've tried to put them after the flag is checked as well, still doesn't work
applymovement MOVE_PLAYER 0x87550EB
waitmovement 0x0
applymovement 0x8 0x87550EF
waitmovement 0x8
msgbox 0x87550FC MSG_KEEPOPEN '"Charlotte: I'm sorry..\nit came as..."
applymovement 0x3 0x8755137
waitmovement 0x3
closeonkeypress
msgbox 0x8755143 MSG_NORMAL '"David: Charly!\nWhy'd you go after..."
applymovement 0x8 0x8755192
waitmovement 0x8
msgbox 0x8755195 MSG_NORMAL '"Charlotte: Oh, hey\nDavid..\pI did..."
applymovement 0x3 0x8755263
applymovement 0x8 0x8755268
waitmovement 0x8
msgbox 0x875526D MSG_NORMAL '"Charlotte: (Help me)"
applymovement 0x3 0x8755284
applymovement 0x8 0x875528B
waitmovement 0x8
msgbox 0x8755292 MSG_NORMAL '"..."
movesprite 0x8 0x42 0x0
setflag 0x202
applymovement MOVE_PLAYER 0x8755298
waitmovement 0x0
msgbox 0x875529B MSG_NORMAL '"[player]: It sounded\nlike she whi..."
applymovement 0x3 0x87552F3
waitmovement 0x3
applymovement MOVE_PLAYER 0x87552FF
waitmovement 0x0
msgbox 0x8755302 MSG_NORMAL '"David: Back off, dude.\nCharlotte ..."
applymovement 0x3 0x8755368
waitmovement 0x3
movesprite 0x3 0x42 0x0
release
end

'---------------
#org 0x7550DC
release
end


'---------
' Strings
'---------
#org 0x7550DF
= Wait, [player]!

#org 0x7550FC
= Charlotte: I'm sorry..\nit came as a shock to you,\land...

#org 0x755143
= David: Charly!\nWhy'd you go after him?\lHe's leaving anyway! Just\llet him go!

#org 0x755195
= Charlotte: Oh, hey\nDavid..\pI didn't know what to do,\nso I went after him... I'm sorry.\pDavid: You better be. Now,\nlet's leave this guy before he\lgets any second thoughts.\pCharlotte: Ehm.. okay.\nBye, [player]..

#org 0x75526D
= Charlotte: (Help me)

#org 0x755292
= ...

#org 0x75529B
= [player]: It sounded\nlike she whispered something\lto me, but I couldn't hear\lit...\pOh well.

#org 0x755302
= David: Back off, dude.\nCharlotte is mine.\lDon't even think about\lcoming back, I will kick\lyour ass.


'-----------
' Movements
'-----------
Edited out movements because it is irrelevant.

Mana

Age 31
Male
UK
Seen March 25th, 2023
Posted August 18th, 2021
10,075 posts
14.3 Years
I've had problems before with move sprite not working for sprites that are far away. Judging by the large numbers you're using, this might be the case here?
Male
Seen May 30th, 2019
Posted July 14th, 2016
11 posts
8.6 Years
A question.

Why is it that whenever I put in a script using Advanced Map, it changes everything I put in into this format:
Spoiler:
'---------------
#org 0x327B71
lock
faceplayer
msgbox 0x8327B92 MSG_KEEPOPEN '"What wonderful Pok?mon you\nhave t..."
closeonkeypress
fadescreen 0x1
fanfare 0x100
special 0x166
waitfanfare
fadescreen 0x0
msgbox 0x8327BE6 MSG_NORMAL '"Now they look better!\nDon't forge..."
release
end


'---------
' Strings
'---------
#org 0x327B92
= What wonderful Pok?mon you\nhave there!\pThey look like\nthey could use a long rest.

#org 0x327BE6
= Now they look better!\nDon't forget to visit!


I'm a Newbie, a very unexprienced pathetic newbie, So these kind of things confuse me D:

Besides that, Is there anywhere I could learn everything from the very beginning?

Percy

Male
Asia
Seen December 24th, 2021
Posted June 19th, 2021
3,045 posts
8.7 Years
A question.

Why is it that whenever I put in a script using Advanced Map, it changes everything I put in into this format:
Spoiler:
'---------------
#org 0x327B71
lock
faceplayer
msgbox 0x8327B92 MSG_KEEPOPEN '"What wonderful Pok?mon you\nhave t..."
closeonkeypress
fadescreen 0x1
fanfare 0x100
special 0x166
waitfanfare
fadescreen 0x0
msgbox 0x8327BE6 MSG_NORMAL '"Now they look better!\nDon't forge..."
release
end


'---------
' Strings
'---------
#org 0x327B92
= What wonderful Pok?mon you\nhave there!\pThey look like\nthey could use a long rest.

#org 0x327BE6
= Now they look better!\nDon't forget to visit!


I'm a Newbie, a very unexprienced pathetic newbie, So these kind of things confuse me D:

Besides that, Is there anywhere I could learn everything from the very beginning?
Is that the script you made?
Anyway, here's a tutorial for newbies:
http://www.pokecommunity.com/showthread.php?t=185188
i don't want to have a signature
Male
Seen October 24th, 2014
Posted October 24th, 2014
4 posts
8.6 Years
#org 0x8007A6
playsong 0x11A 0x0
applymovement 0x3 0x8800769
applymovement MOVE_PLAYER 0x8800775
waitmovement 0xFF
waitmovement 0x3
msgbox 0x88006CF MSG_NORMAL '"Hi im professor ***** but i'm not\..."
applymovement 0x3 0x880078E
waitmovement 0x3
hidesprite 0x3
setvar 0x2000 0x1
setflag 0x1206
fadesong 0x12C
release
end


'---------
' Strings
'---------
#org 0x8006CF
= Hi im professor ***** but i'm not\none lol. Welcome to my\lvillage this is where i study...\lAnyway i'm meant to give you your\lfirst pokemon so follow me!


'-----------
' Movements
'-----------
#org 0x800769
#raw 0x09 'Step Up (Normal)
#raw 0x09 'Step Up (Normal)
#raw 0x09 'Step Up (Normal)
#raw 0x09 'Step Up (Normal)
#raw 0x09 'Step Up (Normal)
#raw 0x0A 'Step Left (Normal)
#raw 0x0A 'Step Left (Normal)
#raw 0x0A 'Step Left (Normal)
#raw 0x0A 'Step Left (Normal)
#raw 0x0A 'Step Left (Normal)
#raw 0x4A 'Jump in Place (Facing Down/Up)

#org 0x800775
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x09 'Step Up (Normal)
#raw 0xFE 'End of Movements

#org 0x80078E
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x09 'Step Up (Normal)
#raw 0xFE 'End of Movements

Hey guys this is an event i have created i have a problem with it though... When i step on the script tile the event does not activate at all the game just continues can someone please tell me how to fix, thanks... oh btw it's for pokemon RUBY

destinedjagold

You can contact me in PC's discord server...

Age 32
Male
Seen 2 Days Ago
Posted March 24th, 2023
8,579 posts
16 Years
#org 0x8007A6
playsong 0x11A 0x0
applymovement 0x3 0x8800769
applymovement MOVE_PLAYER 0x8800775
waitmovement 0xFF
waitmovement 0x3
msgbox 0x88006CF MSG_NORMAL '"Hi im professor ***** but i'm not\..."
applymovement 0x3 0x880078E
waitmovement 0x3
hidesprite 0x3
setvar 0x2000 0x1
setflag 0x1206
fadesong 0x12C
release
end


'---------
' Strings
'---------
#org 0x8006CF
= Hi im professor ***** but i'm not\none lol. Welcome to my\lvillage this is where i study...\lAnyway i'm meant to give you your\lfirst pokemon so follow me!


'-----------
' Movements
'-----------
#org 0x800769
#raw 0x09 'Step Up (Normal)
#raw 0x09 'Step Up (Normal)
#raw 0x09 'Step Up (Normal)
#raw 0x09 'Step Up (Normal)
#raw 0x09 'Step Up (Normal)
#raw 0x0A 'Step Left (Normal)
#raw 0x0A 'Step Left (Normal)
#raw 0x0A 'Step Left (Normal)
#raw 0x0A 'Step Left (Normal)
#raw 0x0A 'Step Left (Normal)
#raw 0x4A 'Jump in Place (Facing Down/Up)

#org 0x800775
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x09 'Step Up (Normal)
#raw 0xFE 'End of Movements

#org 0x80078E
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x08 'Step Down (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x0B 'Step Right (Normal)
#raw 0x09 'Step Up (Normal)
#raw 0xFE 'End of Movements
Hey guys this is an event i have created i have a problem with it though... When i step on the script tile the event does not activate at all the game just continues can someone please tell me how to fix, thanks... oh btw it's for pokemon RUBY
First, I suggest you wrap your code inside a [CODE] tag, like this...
[CODE]-insert code here-[/CODE]
Anyway, try and putting these values on your script tile.
Spoiler:

Male
Seen October 24th, 2014
Posted October 24th, 2014
4 posts
8.6 Years
Sorry where do i put the code command im really new to this. this is my first movement script as well so i don't really know what to do i put the script on both the actual script
event and the player as well on advance map is that what im meant to do... il take a screenshot if you want, thanks

destinedjagold

You can contact me in PC's discord server...

Age 32
Male
Seen 2 Days Ago
Posted March 24th, 2023
8,579 posts
16 Years
Sorry where do i put the code command im really new to this. this is my first movement script as well so i don't really know what to do i put the script on both the actual script
event and the player as well on advance map is that what im meant to do... il take a screenshot if you want, thanks
I wasn't clear on my post. Sorry about that.

Anyway, your script is the green script tile on Advance Map, right?
If so, then click on that tile and put the values I showed on the screenshot that I posted on my previous post. ;)

destinedjagold

You can contact me in PC's discord server...

Age 32
Male
Seen 2 Days Ago
Posted March 24th, 2023
8,579 posts
16 Years
Yep, do i do that for both the person script and the actual script tile and yes it is the green script tile il take a screenshot of advance map if you want... Oh and sorry if im wasting your time im just really desperate i've been trying to hard to get this to work
well, i think i found the problem after scanning your script (not skimming this time).
...
#org 0x800769
#raw 0x09 'Step Up (Normal)
#raw 0x09 'Step Up (Normal)
#raw 0x09 'Step Up (Normal)
#raw 0x09 'Step Up (Normal)
#raw 0x09 'Step Up (Normal)
#raw 0x0A 'Step Left (Normal)
#raw 0x0A 'Step Left (Normal)
#raw 0x0A 'Step Left (Normal)
#raw 0x0A 'Step Left (Normal)
#raw 0x0A 'Step Left (Normal)
#raw 0x4A 'Jump in Place (Facing Down/Up)
You forgot this line...
...
#raw 0xFE 'End of Movements
Also...

...
waitmovement 0xFF
waitmovement 0x3
...
You'll only need one waitmovement code after applymovements, so you can get rid of [waitmovement 0x3].

Male
Seen October 24th, 2014
Posted October 24th, 2014
4 posts
8.6 Years
Ohh thanks for the values it actually set off my event which im extremely happy about :) before i just walked over the tile and nothign happened at all no game freeze at all much appreciated! :D. Anyway, my script is totally wrong in so many ways basically what im trying to do is when i hop out of the truck like the original event on pokemon ruby when your mum says stuff, but instead professor birch greets me and takes me to his lab where i get to choose my first pokemon. Sorry for my bad grammar btw. :P

Pretty much like the Professor oak thing when you leave the town if you know what i mean on Fire Red

destinedjagold

You can contact me in PC's discord server...

Age 32
Male
Seen 2 Days Ago
Posted March 24th, 2023
8,579 posts
16 Years
Im getting " error 13 type mismatch on line 7. missing #define".
whats this? I'm trying to use pokemon giveaway script
could you post your script here so we can see what's wrong with it?

Blah

Free supporter

Male
Unknown Island
Seen 3 Weeks Ago
Posted February 28th, 2023
1,924 posts
10.3 Years
Can some one help me?
My script don't work. i have no idee what is wrong:
#dynamic 0x800000

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

#org @talk1
= Heey Tom!\nHet is gelukt\pHier vind je alle andere starters!
Weird it compiles for me in XSE version 1.0.0
I think in the newer versions it'd be:

msgbox @talk
callstd 0x6

I'm not sure, maybe they're both fine :o
...
Seen July 21st, 2016
Posted November 3rd, 2014
5 posts
10.3 Years
i have a other one...

have a pokeball but get a hypno lvl 37 i want a Poliwhirl lvl 25 and i want a waterstone get a wepear berry...
this is my script:
#dynamic 0x800015

#org @start
hidesprite 6
msgbox @talk1
boxset 6
fanfare 0x13e
givepokemon 0x61 0x25 0x97 0x0 0x0 0x0
waitfanfare
setflag 0x1251
release
end

#org @talk1
= \v\h01 krijgt een Poliwhirl

nevermind