Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Reload this Page [Tutorial] diegoisawesome's MEGA-HUGE XSE Scripting Tutorial

Notices
For all updates, view the main page.

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.



Reply
 
Thread Tools
  #701    
Old December 25th, 2011 (12:05 AM).
AustinWolff's Avatar
AustinWolff AustinWolff is offline
has left
 
Join Date: Aug 2011
Location: LA, California
Age: 17
Gender: Male
Nature: Brave
Posts: 100
Quote originally posted by colcolstyles:
Did you make sure that flag 0x405 is not set before stepping on the tile? Because if it's set, the script won't activate.
thanks but I found the problem. I was setting the var number/value to *0405* when it SHOULD HAVE BEEN *4050* now it works perfectly and I am quickly advancing in scripting.
__________________
I have left. Feel free to disable my account.
Reply With Quote
  #702    
Old January 15th, 2012 (01:20 PM).
droomph's Avatar
droomph droomph is offline
mmm gurl that 90s
Crystal Tier
 
Join Date: Sep 2011
Location: bar'jách
Age: 18
Gender: Male
Nature: Impish
Posts: 4,289
At the OP:

For the Hex Codes for Characters table, Ææ is actually Œœ. Just thought I'd tell you.
__________________
did u no there r 21 letters in the alphabet
o i forgot 5
uraqt


Reply With Quote
  #703    
Old January 16th, 2012 (10:23 AM). Edited January 16th, 2012 by JonathonPetruk.
JonathonPetruk JonathonPetruk is offline
 
Join Date: Jan 2012
Gender: Male
Posts: 4
are you able to take a pokemon out of your party with a script? like your give pokemon script, but in reverse pretty much at the beginning i want to be lent a pokemon to save the professer then he rewards you with a pokemon and you give the other one back xD
Reply With Quote
  #704    
Old January 16th, 2012 (04:30 PM).
droomph's Avatar
droomph droomph is offline
mmm gurl that 90s
Crystal Tier
 
Join Date: Sep 2011
Location: bar'jách
Age: 18
Gender: Male
Nature: Impish
Posts: 4,289
Quote originally posted by JonathonPetruk:
are you able to take a pokemon out of your party with a script? like your give pokemon script, but in reverse pretty much at the beginning i want to be lent a pokemon to save the professer then he rewards you with a pokemon and you give the other one back xD
"Release" Specific Pokémon from Party Script by metapod23

Taking Pokémon away by HackMew

Might help you. You can build your script from there.
__________________
did u no there r 21 letters in the alphabet
o i forgot 5
uraqt


Reply With Quote
  #705    
Old January 27th, 2012 (10:33 PM).
Meez's Avatar
Meez Meez is offline
 
Join Date: May 2010
Location: Somewhere in the world
Age: 14
Gender: Male
Nature: Bold
Posts: 25
\h is used with hex values. Here's an example:
Quote:
Here's \hB7100!
That \hB7 is the currency sign of the Pokemon world.
So in this example, I'm going to use "$":
Quote:
Here's $100!
Here's a table of all the hex codes for each symbol:
Spoiler:
00=
01=À
02=Á
03=Â
04=Ç
05=È
06=É
07=Ê
08=Ë
09=Ì
0B=Î
0C=Ï
0D=Ò
0E=Ó
0F=Ô
10=Æ
11=Ù
12=Ú
13=Û
14=Ñ
15=ß
16=à
17=á
19=ç
1A=è
1B=é
1C=ê
1D=ë
1E=ì
20=î
21=ï
22=ò
23=ó
24=ô
25=æ
26=ù
27=ú
28=û
29=ñ
2A=º
2B=ª
2C=·
2D=&
2E=+
34=[Lv]
35==
36=;
51=¿
52=¡
53=[PK]
54=[MN]
55=[PO]
56=[Ke]
57=[BL]
58=[OC]
59=[K]
5A=Í
5B=%
5C=(
5D=)
68=â
6F=í
79=[u]
7A=[D]
7B=[L]
7C=[R]
A1=0
A2=1
A3=2
A4=3
A5=4
A6=5
A7=6
A8=7
A9=8
AA=9
AB=!
AC=?
AD=.
AE=-
AF=·
B0=[...]
B1="
B2=["]
B3='
B4=[']
B5=[m]
B6=[f]
B7=$
B8=,
B9=[x]
BA=/
BB=A
BC=B
BD=C
BE=D
BF=E
C0=F
C1=G
C2=H
C3=I
C4=J
C5=K
C6=L
C7=M
C8=N
C9=O
CA=P
CB=Q
CC=R
CD=S
CE=T
CF=U
D0=V
D1=W
D2=X
D3=Y
D4=Z
D5=a
D6=b
D7=c
D8=d
D9=e
DA=f
DB=g
DC=h
DD=i
DE=j
DF=k
E0=l
E1=m
E2=n
E3=o
E4=p
E5=q
E6=r
E7=s
E8=t
E9=u
EA=v
EB=w
EC=x
ED=y
EE=z
EF=[>]
F0=:
F1=Ä
F2=Ö
F3=Ü
F4=ä
F5=ö
F6=ü
F7=[u]
F8=[d]
F9=[l]
FA=\l
FB=\p
FC=\c
FD=\v
FE=\n
FF=\x
i so did not understand can anyone help
__________________
Meezy
Reply With Quote
  #706    
Old January 27th, 2012 (11:23 PM).
droomph's Avatar
droomph droomph is offline
mmm gurl that 90s
Crystal Tier
 
Join Date: Sep 2011
Location: bar'jách
Age: 18
Gender: Male
Nature: Impish
Posts: 4,289
Quote originally posted by Meez:
Spoiler:
\h is used with hex values. Here's an example:
Quote:
Here's \hB7100!
That \hB7 is the currency sign of the Pokemon world.
So in this example, I'm going to use "$":
Quote:
Here's $100!
Here's a table of all the hex codes for each symbol:
Spoiler:
Code:
00= 
01=À
02=Á
03=Â
04=Ç
05=È
06=É
07=Ê
08=Ë
09=Ì
0B=Î
0C=Ï
0D=Ò
0E=Ó
0F=Ô
10=Æ
11=Ù
12=Ú
13=Û
14=Ñ
15=ß
16=à
17=á
19=ç
1A=è
1B=é
1C=ê
1D=ë
1E=ì
20=î
21=ï
22=ò
23=ó
24=ô
25=æ
26=ù
27=ú
28=û
29=ñ
2A=º
2B=ª
2C=·
2D=&
2E=+
34=[Lv]
35==
36=;
51=¿
52=¡
53=[PK]
54=[MN]
55=[PO]
56=[Ke]
57=[BL]
58=[OC]
59=[K]
5A=Í
5B=%
5C=(
5D=)
68=â
6F=í
79=[u]
7A=[D]
7B=[L]
7C=[R]
A1=0
A2=1
A3=2
A4=3
A5=4
A6=5
A7=6
A8=7
A9=8
AA=9
AB=!
AC=?
AD=.
AE=-
AF=·
B0=[...]
B1="
B2=["]
B3='
B4=[']
B5=[m]
B6=[f]
B7=$
B8=,
B9=[x]
BA=/
BB=A
BC=B
BD=C
BE=D
BF=E
C0=F
C1=G
C2=H
C3=I
C4=J
C5=K
C6=L
C7=M
C8=N
C9=O
CA=P
CB=Q
CC=R
CD=S
CE=T
CF=U
D0=V
D1=W
D2=X
D3=Y
D4=Z
D5=a
D6=b
D7=c
D8=d
D9=e
DA=f
DB=g
DC=h
DD=i
DE=j
DF=k
E0=l
E1=m
E2=n
E3=o
E4=p
E5=q
E6=r
E7=s
E8=t
E9=u
EA=v
EB=w
EC=x
ED=y
EE=z
EF=[>]
F0=:
F1=Ä
F2=Ö
F3=Ü
F4=ä
F5=ö
F6=ü
F7=[u]
F8=[d]
F9=[l]
FA=\l
FB=\p
FC=\c
FD=\v
FE=\n
FF=\x

i so did not understand can anyone help
(Make it a spoiler...)

So, in XSE, when you put in \hXX, it translates that directly into hex.

So, for example, when you put "w" in XSE, it actually inputs "EB" into the file.

But when you put "\hEB", it actually puts "EB" into the file.

So using that, you can put in all the weird symbols (like Æ, or ô) into the game without using a Unicode input table to find them first.
__________________
did u no there r 21 letters in the alphabet
o i forgot 5
uraqt


Reply With Quote
  #707    
Old January 28th, 2012 (05:06 AM).
Meez's Avatar
Meez Meez is offline
 
Join Date: May 2010
Location: Somewhere in the world
Age: 14
Gender: Male
Nature: Bold
Posts: 25
2 things hw do we make a spoiler and it is pretttty complicating though if i am makin a hack i will have a team so i ll hv to assign rite so i rll will not take this
__________________
Meezy
Reply With Quote
  #708    
Old February 1st, 2012 (12:55 PM).
jukin8's Avatar
jukin8 jukin8 is offline
Suicune Man
 
Join Date: Jan 2012
Location: Ontario, Canada
Age: 18
Gender: Male
Nature: Brave
Posts: 18
great thanks this helped me sooo much
Reply With Quote
  #709    
Old February 5th, 2012 (11:50 AM).
wierddude22's Avatar
wierddude22 wierddude22 is offline
New hacker
 
Join Date: Aug 2011
Location: My house
Age: 19
Gender: Male
Nature: Jolly
Posts: 24
Send a message via Windows Live Messenger to wierddude22 Send a message via Skype™ to wierddude22
My script doesn't work, its meant to give you a Pokémon depending on your gender but the guy doesn't talk to me

The code is,
Spoiler:
#dynamic 0x425336

#org @start
lock
faceplayer
checkflag 0x828
if 0x0 goto @gender
if 0x1 goto @sorry
release
end

#org @gender
checkgender
if 0x0 goto @boy
if 0x1 goto @girl
release
end

#org @boy
= Here you go.
givepokemon 0x1d 0x05 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
setflag 0x828

#org @girl
= Here have this.
givepokemon 0x20 0x05 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
setflag 0x828

#org @sorry
= I can't give you another


Can anyone give me help
Reply With Quote
  #710    
Old February 5th, 2012 (01:08 PM).
droomph's Avatar
droomph droomph is offline
mmm gurl that 90s
Crystal Tier
 
Join Date: Sep 2011
Location: bar'jách
Age: 18
Gender: Male
Nature: Impish
Posts: 4,289
Quote originally posted by wierddude22:
My script doesn't work, its meant to give you a Pokémon depending on your gender but the guy doesn't talk to me

The code is,
Spoiler:
#dynamic 0x425336

#org @start
lock
faceplayer
checkflag 0x828
if 0x0 goto @gender
if 0x1 goto @sorry
release
end

#org @gender
checkgender
if 0x0 goto @boy
if 0x1 goto @girl
release
end

#org @boy
= Here you go.
givepokemon 0x1d 0x05 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
setflag 0x828

#org @girl
= Here have this.
givepokemon 0x20 0x05 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
setflag 0x828

#org @sorry
= I can't give you another


Can anyone give me help
The problem is that you can't mix data types. Strings can only contain strings, and scripts can only contain scripts.
__________________
did u no there r 21 letters in the alphabet
o i forgot 5
uraqt


Reply With Quote
  #711    
Old February 6th, 2012 (09:18 AM).
wierddude22's Avatar
wierddude22 wierddude22 is offline
New hacker
 
Join Date: Aug 2011
Location: My house
Age: 19
Gender: Male
Nature: Jolly
Posts: 24
Send a message via Windows Live Messenger to wierddude22 Send a message via Skype™ to wierddude22
Thanks, sorry to be a pain but is there a way i could do it?
Reply With Quote
  #712    
Old February 6th, 2012 (01:35 PM).
gear2's Avatar
gear2 gear2 is offline
 
Join Date: Feb 2012
Gender: Male
Posts: 19
hi guys i made a script and i want the player to disappear after talking to him how can i do it?This is what i made with the guide

#dynamic 0x800000

#org @start
lock
faceplayer
message @1 0x6
applymovement 0x7 @move1
waitmovement 0x7
release
end

#org @1
= Hey [player].\nI am MITSOTAKIS.I traver.....

#org @move1
#raw 0x08
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x54
#raw 0xFE
Reply With Quote
  #713    
Old February 6th, 2012 (03:05 PM).
droomph's Avatar
droomph droomph is offline
mmm gurl that 90s
Crystal Tier
 
Join Date: Sep 2011
Location: bar'jách
Age: 18
Gender: Male
Nature: Impish
Posts: 4,289
Quote originally posted by gear2:
hi guys i made a script and i want the player to disappear after talking to him how can i do it?This is what i made with the guide
(Add a spoiler, I guess?)

Spoiler:
Code:
#dynamic 0x800000

#org @start
lock
faceplayer
message @1 0x6
applymovement 0x7 @move1
waitmovement 0x7
hidesprite 0x7
setflag xxxx
release
end

#org @1
= Hey [player].\nI am MITSOTAKIS.I traver.....

#org @move1
#raw 0x08 
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x54
#raw 0xFE


Highlighted what I added.

xxxx is what the visibility flag of the sprite (check on Advance-Map) is.
__________________
did u no there r 21 letters in the alphabet
o i forgot 5
uraqt


Reply With Quote
  #714    
Old February 11th, 2012 (09:25 PM).
BladeRush BladeRush is offline
 
Join Date: Feb 2012
Gender: Male
Posts: 2
I just started hacking today, can someone please help me get this script working properly?

#dynamic 0x71AA49

#org @start
lock
faceplayer
checkflag 0x3A
if 0x1 goto @done
msgbox @story 0x6
release
end

#org @story
msgbox @1 0x6
giveitem 0x1 0x1 0x0
msgbox @2 0x6
setflag 0x3A
release
end

#org @done
msgbox @3 0x6
release
end

#org @1
= Hey [player].\nHappy birthday honey \pI have a gift for you for your birthday!

#org @2
= I hope you make good use of it.\pBy the way,\nProf. Carbon wanted to see you!\nHe said it was important.\pI wonder what he could want?\nYou should go visit his lab\nat the bottom on this town.\pSee you later!

#org @3
= Prof. Carbon is waiting!
Reply With Quote
  #715    
Old February 11th, 2012 (09:47 PM).
masterquestmq's Avatar
masterquestmq masterquestmq is offline
Enthusiastic Rom Hacker
 
Join Date: Nov 2010
Gender: Male
Posts: 125
try this


#dynamic 0x71AA49

#org @start
lock
faceplayer
checkflag 0x3A
if 0x0 goto @story
if 0x1 goto @done


#org @story
msgbox @1 0x6
giveitem 0x1 0x1 0x0
msgbox @2 0x6
setflag 0x3A
release
end

#org @done
msgbox @3 0x6
release
end

#org @1
= Hey [player].\nHappy birthday honey \pI have a gift for you for your birthday!

#org @2
= I hope you make good use of it.\pBy the way,\nProf. Carbon wanted to see you!\nHe said it was important.\pI wonder what he could want?\nYou should go visit his lab\nat the bottom on this town.\pSee you later!

#org @3
= Prof. Carbon is waiting![/QUOTE]
Reply With Quote
  #716    
Old February 11th, 2012 (09:50 PM).
DrFuji's Avatar
DrFuji DrFuji is offline
Helfen, Wehren, Heilen
Crystal Tier
 
Join Date: Sep 2009
Location: Downia-upside
Age: 22
Gender: Male
Nature: Jolly
Posts: 1,322
Quote originally posted by BladeRush:
I just started hacking today, can someone please help me get this script working properly?
Spoiler:
#dynamic 0x800000

#org @start
checkflag 0x3A
if 0x1 goto @done
msgbox @1 0x2
giveitem 0x1 0x1 0x0
msgbox @2 0x2
setflag 0x3A
release
end

#org @done
msgbox @3 0x2
release
end

#org @1
= Hey [player].\nHappy birthday honey :)\pI have a gift for you for your birthday!

#org @2
= I hope you make good use of it.\pBy the way,\nProf. Carbon wanted to see you!\nHe said it was important.\pI wonder what he could want?\nYou should go visit his lab\nat the bottom on this town.\pSee you later!

#org @3
= Prof. Carbon is waiting!


Changes in red.

Your 'story' pointer wasn't text for a message box like @1, @2 or @3, but a continuation of the script so I merged it with the first part. The lock and faceplayer commands aren't necessary if you use the 0x2 type message box as the NPC you are talking to will automatically turn towards you and lock their movements when they start to talk. It is also better to begin your free space search from an offset which is known to have plenty of space beyond it - In FR's case people generally start from 0x800000.
__________________
Reply With Quote
  #717    
Old February 11th, 2012 (10:22 PM).
BladeRush BladeRush is offline
 
Join Date: Feb 2012
Gender: Male
Posts: 2
Thanks!! I will go edit it now and continue my hack :D
Reply With Quote
  #718    
Old February 17th, 2012 (12:29 AM). Edited February 17th, 2012 by Editman.
Editman's Avatar
Editman Editman is offline
Pokemon Collector
Crystal Tier
 
Join Date: Jan 2009
Posts: 346
#dynamic 0x80000

#org @start 0x3BCD58
lockall
faceplayer
checkflag 0x824
= if 0x1 goto @end
msgbox @002 0x6
trainerbattle 0x1 0x3BCD58 0x0 @before @after
msgbox @beaten 0x6
end

#org @beforematch
= Hm,My name is Zane; but you can call me Z./n No more talking/n let's begin.
#org @aftermatch
= Wow, I didn't expect to be defeated.)
#org @later
msgbox @003 0x6
fanfare 0x13E
msgbox @004 0x4
waitfanfare
closeonkeypress
msgbox @005 0x6
setflag 0x824
releaseall
end

#org @done
msgbox @001 0x6
release
end

#org @001
= "Your next gym battle won't be so easy/n with that said good luck.

#org @002
= My name is Zane, but you can call me Z/n No more talking,/n let's begin.

#org @003
= You got the marshbadge

#org @004
= [Player] recieved marshbadge

#org @5
= Take this too!


Can someone please explain to me, what exactly it is that i'm doing wrong?
__________________






"I don't use Legendary Pokemon, i prefer to make regular Pokemon Legendary"
Reply With Quote
  #719    
Old February 17th, 2012 (01:22 AM).
Satoshi Ookami's Avatar
Satoshi Ookami Satoshi Ookami is offline
Memento Mori
Gold Tier
 
Join Date: Jul 2008
Location: Abyss of Time, Great Seal
Age: 22
Gender: Male
Nature: Calm
Posts: 13,295
Quote originally posted by Editman:
#dynamic 0x80000

#org @start 0x3BCD58
lockall
faceplayer
checkflag 0x824
= if 0x1 goto @end
msgbox @002 0x6
trainerbattle 0x1 0x3BCD58 0x0 @before @after @done
msgbox @beaten 0x6
end

#org @beforematch
= Hm,My name is Zane; but you can call me Z./n No more talking/n let's begin.
#org @aftermatch
= Wow, I didn't expect to be defeated.)

You are missing @beaten string.

#org @later end
msgbox @003 0x6
fanfare 0x13E
msgbox @004 0x4
waitfanfare
closeonkeypress
msgbox @005 0x6
setflag 0x824
releaseall
end

#org @done
msgbox @001 0x6
setflag 0x824
release
end

#org @001
= "Your next gym battle won't be so easy/n with that said good luck.

#org @002
= My name is Zane, but you can call me Z/n No more talking,/n let's begin.
You are using wrong slash. It's supposed to be \n not /n

#org @003
= You got the marshbadge

#org @004
= [Player] recieved marshbadge

#org @005
= Take this too!


Can someone please explain to me, what exactly it is that i'm doing wrong?
Huh... too many to explain o.O
Changes in red.
__________________
ROM hacking FAQ - Read before asking how to play a hack. | Previous Sign 2 | Previous Sign

Anime List | PSN Trophy List
Reply With Quote
  #720    
Old February 17th, 2012 (01:23 AM). Edited February 17th, 2012 by DrFuji.
DrFuji's Avatar
DrFuji DrFuji is offline
Helfen, Wehren, Heilen
Crystal Tier
 
Join Date: Sep 2009
Location: Downia-upside
Age: 22
Gender: Male
Nature: Jolly
Posts: 1,322
Quote originally posted by Editman:
Spoiler:
#dynamic 0x80000

#org @start 0x3BCD58
lockall
faceplayer
checkflag 0x824
= if 0x1 goto @end
msgbox @002 0x6
trainerbattle 0x1 0x3BCD58 0x0 @before @after
msgbox @beaten 0x6
end

#org @beforematch
= Hm,My name is Zane; but you can call me Z./n No more talking/n let's begin.
#org @aftermatch
= Wow, I didn't expect to be defeated.)
#org @later
msgbox @003 0x6
fanfare 0x13E
msgbox @004 0x4
waitfanfare
closeonkeypress
msgbox @005 0x6
setflag 0x824
releaseall
end

#org @done
msgbox @001 0x6
release
end

#org @001
= "Your next gym battle won't be so easy/n with that said good luck.

#org @002
= My name is Zane, but you can call me Z/n No more talking,/n let's begin.

#org @003
= You got the marshbadge

#org @004
= [Player] recieved marshbadge

#org @5
= Take this too!



Can someone please explain to me, what exactly it is that i'm doing wrong?
You have a lot of misplaced pointers and have input some incorrect/ unnecessary commands. Below should be a fully functioning script once you change/ delete some of the commands and their values.

Red = I have changed it/ you have to edit it depending on what you want. Blue = Delete it. Messages after '//' are my specific comments on what you should do.

Spoiler:
#dynamic 0x800000

#org @start
lockall
faceplayer
checkflag 0x824
= if 0x1 goto @end // Don't put an equal sign in front of the 'if' command
msgbox @002 0x6 // Your '@002' msgbox says the exact same thing as your '@before' pointer which going to be said anyway. It is best to delete it for this reason
trainerbattle 0x1 0x3BCD58 0x0 @before @after @later // You need to add in an actual trainer number which you can find in Advance Trainer (Numbers range from 0x01 to 0xFF)
// Also, since you're using a 0x1 type trainerbattle (Script continues once the battle is over) you need to add another pointer after the @before and @after pointers
msgbox @001 0x6 // You don't have a '@beaten' pointer but your '@001' was unused and seemed to fit
releaseall // You need this to counteract the 'lockall' command
end

#org @before
= Hm. My name is Zane; but you can call me Z.\nNo more talking, let's begin.

#org @after
= Wow, I didn't expect to be defeated.

#org @later
msgbox @003 0x6
fanfare 0x13E
msgbox @004 0x4
waitfanfare
closeonkeypress
msgbox @005 0x6
??? // Your script isn't giving the player anything, despite what '@005' says
setflag 0x824
releaseall
end

#org @done
msgbox @001 0x6
release
end

#org @001
= Your next gym battle won't be so easy.\nWith that said, good luck.

#org @002
= My name is Zane, but you can call me Z/n No more talking,/n let's begin.
// Explained above

#org @003
= You got the Marshbadge

#org @004
= [Player] recieved Marshbadge

#org @005
= Take this too!


Try not to rush while making scripts and make sure that you study the structure of scripts already in the game. Alot of the mistakes in your script were quite simple and could be dealt with easily if you slowed down and took the time to comb through it :)
__________________
Reply With Quote
  #721    
Old February 17th, 2012 (10:12 AM).
Editman's Avatar
Editman Editman is offline
Pokemon Collector
Crystal Tier
 
Join Date: Jan 2009
Posts: 346
Quote originally posted by DrFuji:
You have a lot of misplaced pointers and have input some incorrect/ unnecessary commands. Below should be a fully functioning script once you change/ delete some of the commands and their values.

Red = I have changed it/ you have to edit it depending on what you want. Blue = Delete it. Messages after '//' are my specific comments on what you should do.

Spoiler:
#dynamic 0x800000

#org @start
lockall
faceplayer
checkflag 0x824
= if 0x1 goto @end // Don't put an equal sign in front of the 'if' command
msgbox @002 0x6 // Your '@002' msgbox says the exact same thing as your '@before' pointer which going to be said anyway. It is best to delete it for this reason
trainerbattle 0x1 0x3BCD58 0x0 @before @after @later // You need to add in an actual trainer number which you can find in Advance Trainer (Numbers range from 0x01 to 0xFF)
// Also, since you're using a 0x1 type trainerbattle (Script continues once the battle is over) you need to add another pointer after the @before and @after pointers
msgbox @001 0x6 // You don't have a '@beaten' pointer but your '@001' was unused and seemed to fit
releaseall // You need this to counteract the 'lockall' command
end

#org @before
= Hm. My name is Zane; but you can call me Z.\nNo more talking, let's begin.

#org @after
= Wow, I didn't expect to be defeated.

#org @later
msgbox @003 0x6
fanfare 0x13E
msgbox @004 0x4
waitfanfare
closeonkeypress
msgbox @005 0x6
??? // Your script isn't giving the player anything, despite what '@005' says
setflag 0x824
releaseall
end

#org @done
msgbox @001 0x6
release
end

#org @001
= Your next gym battle won't be so easy.\nWith that said, good luck.

#org @002
= My name is Zane, but you can call me Z/n No more talking,/n let's begin.
// Explained above

#org @003
= You got the Marshbadge

#org @004
= [Player] recieved Marshbadge

#org @005
= Take this too!


Try not to rush while making scripts and make sure that you study the structure of scripts already in the game. Alot of the mistakes in your script were quite simple and could be dealt with easily if you slowed down and took the time to comb through it
Well this is my first, I just so happened to have been looking at Sabrina's scrip when i accidentally deleted it. That's what made me want to put a new trainer in that spot. So what do I do, when i finish it?
__________________






"I don't use Legendary Pokemon, i prefer to make regular Pokemon Legendary"
Reply With Quote
  #722    
Old February 21st, 2012 (01:37 PM).
gear2's Avatar
gear2 gear2 is offline
 
Join Date: Feb 2012
Gender: Male
Posts: 19
Hi i wrote a code but xse doesn't compile it. What's wrong with it?

Spoiler:
Code:
#dynamic 0x800000

#org @start
msgbox @1 0x6
applymovement 0x04 @move
waitmovement 0x0
applymovement 0xFF @move2
pause 0x30
msgbox @3 0x6
trainerbattle 0x1 0x047 0x0 @after
trainerbattle 0x1 0x048 0x0 @after2
msgbox @2 0x6
playsong 0x13E 0x0
applymovement 0x04 @move3
applymovement 0xFF @move3
waitmovement 0x0
movesprite 0x2 0x0 0x4
movesprite 0x1 0x0 0x4
hidesprite 0x13BA
setflag 0x1AB1
release
end


#org @move
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @move2
#raw 0x03
#raw 0xFE

#org @move3
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE
#org @1
= You are about to ...

#org @3
= Look what ...

#org @2
= POKEMON: You ....

#org @after
= Damn you.

#org @after2
= You won't ....
Reply With Quote
  #723    
Old February 22nd, 2012 (02:56 AM).
DrFuji's Avatar
DrFuji DrFuji is offline
Helfen, Wehren, Heilen
Crystal Tier
 
Join Date: Sep 2009
Location: Downia-upside
Age: 22
Gender: Male
Nature: Jolly
Posts: 1,322
Quote originally posted by gear2:
Hi i wrote a code but xse doesn't compile it. What's wrong with it?

Spoiler:
Code:
#dynamic 0x800000

#org @start
msgbox @1 0x6
applymovement 0x04 @move
waitmovement 0x0
applymovement 0xFF @move2
pause 0x30
msgbox @3 0x6
trainerbattle 0x1 0x047 0x0 @after
trainerbattle 0x1 0x048 0x0 @after2
msgbox @2 0x6
playsong 0x13E 0x0
applymovement 0x04 @move3
applymovement 0xFF @move3
waitmovement 0x0
movesprite 0x2 0x0 0x4
movesprite 0x1 0x0 0x4
hidesprite 0x13BA
setflag 0x1AB1
release
end


#org @move
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @move2
#raw 0x03
#raw 0xFE

#org @move3
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE
#org @1
= You are about to ...

#org @3
= Look what ...

#org @2
= POKEMON: You ....

#org @after
= Damn you.

#org @after2
= You won't ....
Try this script. Changes in red and explanations are marked by '//'.

Spoiler:
[CODE]#dynamic 0x800000

#org @start
msgbox @1 0x6
applymovement 0x04 @move
waitmovement 0x0
applymovement 0xFF @move2
pause 0x30
trainerbattle 0x1 0x47 0x0 @3 @after @later

// You need to add a message that the OW will display before you battle - In this case I made it '@3' as it was going to be displayed beforehand anyway
// When using a 0x1 type trainerbattle, you also need to add an extra pointer to the end of the command to tell the script where to continue once the battle is over. In both cases I have added '@later' and added it as a new #org directive further on in the script

#org @later
trainerbattle 0x1 0x48 0x0 @before2 @after2 @later2

#org @later2
msgbox @2 0x6
playsong 0x13E 0x0
applymovement 0x04 @move3
applymovement 0xFF @move3
waitmovement 0x0
movesprite 0x2 0x0 0x4
movesprite 0x1 0x0 0x4
hidesprite 0xXX // Use the 'Person event No.' for whichever OW you want to disappear, not a flag.
setflag 0xXXX // Flags 0x28 - 0x4BC are the safest to use in FR as they are used by the original scripts within the game
release
end

#org @move
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @move2
#raw 0x03
#raw 0xFE

#org @move3
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @1
= You are about to ...

#org @3
= Look what ...

#org @2
= POKEMON: You ...

#org @after
= Damn you.

#org @after2
= You won't ...

#org @before2
= text
__________________
Reply With Quote
  #724    
Old February 22nd, 2012 (08:11 AM).
gear2's Avatar
gear2 gear2 is offline
 
Join Date: Feb 2012
Gender: Male
Posts: 19
Thank you DrFuji it works great !
Reply With Quote
  #725    
Old March 6th, 2012 (09:32 AM).
Ninjutsu95's Avatar
Ninjutsu95 Ninjutsu95 is offline
Bad decisions = Good stories
 
Join Date: Apr 2011
Location: Georgia, USA
Age: 20
Gender: Male
Nature: Modest
Posts: 44
Okay so I decided to add 3 people on my map. And i made the free space for each about 250 bytes. And I typed this

'---------------
#org 0xE3E604
lock
faceplayer
msgbox 0x8E3E611 MSG_NORMAL '"Hello!\nMy name is Alder."
release
end

'---------
' Strings
'---------
#org 0xE3E611
= Hello!\nMy name is Alder.


and when i compiled it by pressing the complile button on XSE 1.1.1 i loaded it up again to see if the changes saved it did. So i loaded up VBA and went to talk to the first person and it worked. And then on the second person i talked to and the screen froze and turned red. And when i looked at the coding for the person, it changed to different things. The first person's code showed this after compiling

'---------------
#org 0x3EA000
bufferboxname 0xE3 0xDBE2
nop
cmdd5 0xE3DB
nop


which doesn't make any sense to me

and the second person's code sais this

'---------------
#org 0xE3E274
callstd 0x6
cmd24 0x11061106

which also doesn't make any sense.
But the third person's code compiled correctly.

And now when i still try to talk to the first person, he doesn't even respond whether to look at me or to just freeze my game like a jerk. Whats wrong. Am i doing something?
__________________
Thought provoking quotes:
_________________________________________
- Even a clock that does not work is right twice a day.
_________________________________________
- The moment a little boy is concerned with which is a jay and which is a sparrow, he can no longer see the birds or hear them sing.
_________________________________________
- Do nothing which is of no use.
_________________________________________
Reply With Quote
Reply
Quick Reply

Sponsored Links

You may also like.. (Beta)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC -8. The time now is 03:42 AM.