PDA

View Full Version : [Tutorial] XSE Scripting Tutorial


Pages : [1] 2

Darthatron
February 23rd, 2008, 11:12 PM
Hello, welcome to my XSE Tutorial, I hope some people ind it helpful. XSE is the revolutionary Script Editing Tool by - HackMew -. Please leave comments on how helpful this was to you. :) Here is a quick OverVeiw of XSE:
http://img184.imageshack.us/img184/2396/27831120ep2.png

XSE will be available for download in the ToolBox shortly, I have the Release Candidate version and it is simply fantastic. When you all have the chance to download XSE I'm sure you'll fall in love with it as much as I did. :D Look in the spoiler for the very basics of scripting in XSE.

XSE has a new Automatic Offset Location system, not unlike PokeScript. But instead of using the "$" sign it uses the "@" sign, in my eyes it makes more sense to use the "@" sign because it is "at" the location. Anyway, it is farely simple to use and I will just give you a brief description on it.

Basically, if you used PokeScript you will get the gist of this system. At the start of your script put something like this: #Dynamic 0xOffset but replace the word "Offset" with the Hexadecimal offset with free space (FF for FireRed and LeafGreen, 00 for Ruby and Sapphire).

Example: In FSF (Free Space Finder) you have to find a certain amount of "Free Space", depending on how large your script is. For simplicity just search for a large number, something between 100 and 300 should be plenty. Next click the "Search" button in the ListBox you should see something like this:
http://img205.imageshack.us/img205/2225/26746516xs1.png
Click the "Copy" button and replace the word "Offset", in our script above, with that Value.

So far our script should look something like this: #Dynamic 0x3B4D84 Ok, next we are going to get to the actual scripting! Ho-rah!

Ok, to start a script you must put the following line of code, no matter what kind of script you are doing: #ORG @Start Feel free to replace the word "Start" with any other word, it really doesn't matter what word you use, it is just for reference. Anyway, so far the script should look something like this: #Dynamic 0x3B4D84

#ORG @Start It doesn't have to look exactly like that, but it should look similar.
Presuming you already know the basics I will start explaining how the actual scripting works, it is nearly completely the same as ScriptEd and PokeScript but with some differences that you will find out during this tutorial.

1. A basic talking script!
________________________

Ok, as usual we will start with the Important parts, the begining. So, your script should look something like this: #Dynamic 0x800000

#ORG @MainIn talking scripts, and in some others, you must have these 2 lines. Lock
FacePlayer I'll now explain what these lines of code do...
"Lock" = Makes it so the Player can't move and the NPC you are talking to also won't be able to move.
"FacePlayer" = This code makes it so the NPC you are talking to looks at the Player.

So now your script should look something like this: #Dynamic 0x800000

#ORG @Main
Lock
FacePlayerNext we will be adding the "Offset" where the text is "Saved". So add these 2 lines of code and then I will explain them shortly: Message @Speak
BoxSet 0x6 Once again, you may replace the word "Speak" with any other word as it is just for reference. Now to explain to you what these lines of code mean...
"Message" = This is just a simple word that allows you to incert a message, this would have to be one of the most used functions in Pokemon Scripting.
"@Speak" = This is the offset at which the "Message" will be saved, of course you can use any word instead of "Speak" as it is just for reference.
"BoxSet 0x6" = This is merely a function used to show you how the message is shown in the game. The "0x6" means it is just a normal TextBox, you can also use "0x5" which is a "Yes/No" Box, I will go into more detail for that at a later time.

So now your script should look similar to this: #Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
Message @Speak
BoxSet 0x6Rightio, next we are going to add 2 more new lines, get ready: Release
End Now these 2 lines are very important, especially the later. Now, once more I will explain what these lines mean!
"Release" = This function give your Player the ability to move again, it also allows the NPC you are talking to the ability to walk around as well.
"End" = This simply means that it is the End of the script and makes it so the Game doesn't continue to read the data. Don't worry, we are almost finished, just 2 more lines of code.

Your Script should look something like this now: #Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
Message @Speak
BoxSet 0x6
Release
EndNow we are going to put what the actual Message is, this is the part we have all been waiting for! Put these 2 lines of code at the bottom of your script: #ORG @Speak
= This is a message! And for the last time today I will explain what there lines of code mean!
"#ORG @Speak" = This is merely the place that you pointed to earlier in the script, if you didn't use the word "Speak" before, you must change this "Speak" to the same word.
"= This is a message!" = This the message that will be displayed in-game. Feel free to change the "This is a message!" text to whatever you want the person you are talking to, to say.

Well, that's all I have time for today, but I will edit this post and add some more tutorials in the future. Until then, I'll be programming. :D

2. Compiling the script!
________________________

To compile a script into a ROM you just have to follow 3 simple steps.

Make sure the script you want to compile is open in XSE.
Go into the "File" menu and click "Open...", select the ROM you want to compile the script into.
Then click the Compile button http://img148.imageshack.us/img148/3746/41551228tr2.png, and that's it. Your script is comiled into your ROM.

thethethethe
February 24th, 2008, 12:55 AM
You got this up quick. Maybe a little too early, but still good.
Hmmm. A tool, that a tool maker loves.
If you're writing this one up, you've got a lot of commands to work with. I wish I'd seen it sooner, I couldn't figure out the dynamic offset thing on my own.

ZodiacDaGreat
February 24th, 2008, 01:02 AM
Great Darthathron cause in XSE, some commands have new parameters like wildbattle
Anyways great job putting this up!!!
Looking forward to see it completed

Darthatron
February 24th, 2008, 01:02 AM
You got this up quick. Maybe a little too early, but still good.
Hmmm. A tool, that a tool maker loves.
If you're writing this one up, you've got a lot of commands to work with. I wish I'd seen it sooner, I couldn't figure out the dynamic offset thing on my own.
Yes, I realize it's out early but I want whoever else who might test it to be able to do it well, right?
I love all - HackMew -'s tools, I also have no doubt that he is a best programmer than myself. :D

Thanks for commenting. :)

Great Darthathron cause in XSE, some commands have new parameters like wildbattle
Anyways great job putting this up!!!
Looking forward to see it completed
I have realized that too. I won't be doing anymore of this tutorial tonight however, I think I should find my Visual Basic install disk and release the new PEP... Thanks for commenting.

destinedjagold
February 24th, 2008, 01:04 AM
I don't understand how the compiling is... I guess what I'm trying to say is that I think I need some screen/visual help... :\

And thanks for the quick tutorial though. :D

Darthatron
February 24th, 2008, 01:13 AM
Here is a very quick outveiw of XSE I made in Paint is about 12 seconds:
http://img184.imageshack.us/img184/2396/27831120ep2.png

cooley
February 26th, 2008, 01:21 PM
Well, I understand now, and 'm already used to it.
It's just I'm still waiting on m Unlock Key for a different computer.

But I've still tried it, and Nice tutorial!

zolo1243
February 26th, 2008, 04:15 PM
where can i download XSE?

/Circa
February 26th, 2008, 09:47 PM
Would it matter if we put normal commands as lowercase?
Such as lock, faceplayer.

Because I figure, it's like scriptEd, but much better, you cant find your own offset and all you need is the #dynamic 0x000000 at the start. It's a good idea :P.

Darthatron
February 26th, 2008, 09:58 PM
Yeah, LowerCase still works, infact that's how it descripts it. I just think it is easier to read and learn with UpperCase in the right positions. :) I plan to update this later in the week, by the way.

rsr13
February 27th, 2008, 11:49 AM
It's good that you discoverd it a little to early..
I like it .. Thanx for the tutorial

Vegeta™
February 27th, 2008, 02:01 PM
#ORG $begin
lock
faceplayer
checkflag 0x200
if B_true goto $done
message $person
boxset 6
givepokemon 1 5 0
setflag 0x200
release
end

#org $done
message $person2
boxset 6
release
end

#org $person
$person = Hello,

I have done this to get give pokemon

but what do i put for the players name is it h01?

Darthatron
February 27th, 2008, 04:51 PM
#ORG $begin
lock
faceplayer
checkflag 0x200
if B_true goto $done
message $person
boxset 6
givepokemon 1 5 0
setflag 0x200
release
end

#org $done
message $person2
boxset 6
release
end

#org $person
$person = Hello,

I have done this to get give pokemon

but what do i put for the players name is it h01?
That is a pokescript script, this tutorial is for XSE. Plus this should go into the Script Help thread anyway.

SerenadeDS
February 27th, 2008, 05:02 PM
Thanks for the tut Darthatron! XSE is an awsome program, so this should help some people that decide to use XSE get started.

Vegeta™
February 27th, 2008, 05:08 PM
This looks much more easy where can i donwload this

Green Charizard
March 1st, 2008, 05:57 AM
You can not currently download this as HackMew has not released it publicly. Only "Pre-Release Candidates" have a copy.

But, nice tutorial Darthatron it should prevent some confusion on it's release.

/Circa
March 3rd, 2008, 12:18 AM
I beleive he released it, but you need an activation key?
I have a script i'm having problems with, when I land on the tile, the game freezes.
All I have to click is compile, and put the dynamic offset into A map right?

#dynamic 0x800000

#org @begin
lock
checkflag 0x200
if 1 goto @done
message @stop
boxset 0x6
applymovement 0x3 @coming
waitmovement 0
message @dontgo
boxset 0x6
applymovement 0x3 @going
applymovement 0xFF @follow
waitmovement 0
message @dangerous
boxset 6
release
end

#org @stop
= Wait \v\h01!

#org @dontgo
= Don't go out there!

#org @dangerous
= Wild Pokemon jump out of\n the grass on the way\p to the next town.

#org @coming
#raw 0A
#raw 0A
#raw 0A
#raw 0A
#raw FE

#org @going
#raw 0B
#raw 0B
#raw 0B
#raw 0B
#raw 02
#raw FE

#org @follow
#raw 0B
#raw 0B
#raw 0B
#raw FE

#org @done
release
end

Νιτραμ
March 3rd, 2008, 12:35 AM
I thought it was a rumour (it wasn't there in early beta versions) but you need to get an activation key from HackMew but you won't get it if you aren't chosen as a beta tester.

Anyway, I had a chance to test it out in early beta stages and later when Andrea added dynamic offsets (which are better than Pokéscript's - you can even use mixed offsets - dynamic AND static) and I am happy with it. This tutorial is neat and I like it.

Keep it up!

[css-div="padding: 5px; border: 1px solid navy; background-color: #CDCDCD;"]Offtopic comment:
Why do you write some words weird way, Darthatron? In scripting editor or sometimes in post... For example BoxSet or LowerCase, it looks silly. Sorry :x[/css-div]

HackMew
March 3rd, 2008, 11:18 AM
Well, thanks for your efforts Darthatron. Anyway, I'd like to say I'm already preparing a complete readme/guide for XSE (which will be included in the final release, obviously) to explain all the features and commands XSE has. And since you're not the programmer you would sure miss a lot of hidden or kinda "undocumented" features.
Feel free to continue your tutorial as long as you won't blame me to make something more complete.

/Circa
March 16th, 2008, 01:59 AM
I just noticed, basic scriptEd works in XSE aswell.
And the dynamic offset really isn't needed, a scriptEd script would work fine.
For instance using a basic pointer would work.

#org 0x800000
Good tut though.

NTA
March 26th, 2008, 05:31 AM
who does the XSE belong to HackMew or Darthatron? i feel confused

Black Charizard.
March 26th, 2008, 07:48 AM
Well this is not a questions thread actulie.

but okay HackMew is the maker of XSE Darthatron just maked the tut.

Totypoke1
May 14th, 2008, 04:14 AM
Hey Darthatron, where can i download XSE script editor
i'm a n00b scripter so ow bout telling me where to download
it.

Darthatron
May 14th, 2008, 04:28 AM
Hey Darthatron, where can i download XSE script editor
i'm a n00b scripter so ow bout telling me where to download
it.

It's not available for download yet. I just have the BETA. :) It should be released soon.

Jawash
May 18th, 2008, 05:59 PM
It's not available for download yet. I just have the BETA. :) It should be released soon.

really now?
there is only a beta. interesting =]
where is that even?
but i've heard news on this, only a teency bit, but is sounds like it'll be worth while.
i REALLY look forward to it's completion ;D

Master_Track
June 1st, 2008, 02:52 AM
~problem eliminated~
sry, everythings fine now xD

Tropical Sunlight
June 1st, 2008, 08:54 AM
It's not available for download yet. I just have the BETA. :) It should be released soon.
Yeah, very soon (I hope)

(lessthan25characters)

liuyanghejerry
June 1st, 2008, 09:02 PM
Well,this is my first time to see XSE scripts,it looks more like scriptED's style...
Hope more useful commands~

Zeikku™
June 2nd, 2008, 03:07 AM
To those asking if its out..its out dudes...go download :)

Master_Track
June 2nd, 2008, 05:08 AM
I have a question: How can u use the comman "multichoice"?
I can script the normal things quite good, but I just don't understand this one ^^''

Tyrantrum
June 2nd, 2008, 05:55 AM
This tut is kool!
But, r u gonna add more to it?
Like, what about signpost scripts?
Follow-me, applymovement, etc.

X-Buster
June 2nd, 2008, 05:57 AM
when will the full XSE tut be created..?

BlackRainbow*
June 2nd, 2008, 06:05 AM
i don't see any need to make it. Its actualy the same as pokescript or scripted but much better. you only need to use #Dynamic 0x?????? at the start of the script
and you only use @start or something, not 0x900100

Master_Track
June 2nd, 2008, 06:39 AM
yeah, but there all many commands included most of us didn't even know ^^
for example, I knew there's the possibility to make a list of things the player can choose.
but I didn't know HOW to do it, and I saw the command included in XSE ^^
so there'll be MANY questions here since many newbies don't know much commands.

mat1554
June 2nd, 2008, 10:04 AM
Sorry my english is not good lol :D

How to choose the offset, because we must choose the number of bytes that are needed .

BlackRainbow*
June 2nd, 2008, 10:43 AM
yeah, but there all many commands included most of us didn't even know ^^
for example, I knew there's the possibility to make a list of things the player can choose.
but I didn't know HOW to do it, and I saw the command included in XSE ^^
so there'll be MANY questions here since many newbies don't know much commands.

yeah you're right but if you click F1 you have command help there.

Tyrantrum
June 2nd, 2008, 12:37 PM
For the #Dynamic 0x?????? part of the script, how will we know what to put for the ?s...?

Master_Track
June 2nd, 2008, 12:46 PM
put the programm Free Space Finder by hackmew into the same folder as XSE.
Now if you open XSE you can go to "tools" and free space finder.
there, u open your rom, insert the number of bytes u need (i expect 100-200) and klick search.
the found offset will be copied, and u just have to insert it ^^

Tyrantrum
June 2nd, 2008, 01:49 PM
Oh, cool! ^^
I made a test rom to see if scripts work on my comp. too.

One Winged Angel
June 2nd, 2008, 01:57 PM
Hey, an easy way to translate your pokescripts is.
Get a ROM just for test. Then go to A Map, then go to
settings. Next, you select Choose a Scripting Program.
Then search for XSE. When the prompt shows up saying something
Press yes. Next make a script that you want to translate,
then insert it in your test ROM. Then when its inserted, just
click on the script in A-Map and click Edit Script. This will
pop up XSE and you will now be able to see your Pokescript
Commands in XSE format. Hope this helped and Sorry to
Darthatron if this Spam and I will delete it. If not you can put it in your
first post xD

Tyrantrum
June 2nd, 2008, 02:07 PM
Yea, I get that now...
Now I'm trying to compile it.
But now it's saying this:
Unknown keyword "@hotel" at line 10

~EDIT~
It worked!
Thanx yunghove, hackmew, and dartatron!
I can script, except it showed the /p lol...

One Winged Angel
June 2nd, 2008, 02:57 PM
It showed the /p becuase its supposed to be\pwith no spaces.

heres an example.

hey, whats up? hows\pyour brother doing?

Darthatron
June 2nd, 2008, 09:11 PM
Wow... Soo many posts... :o

I have a question: How can u use the comman "multichoice"?
I can script the normal things quite good, but I just don't understand this one ^^''
MultiChoice is something that you should really only do when you know all of the basics. You see it needs to use Variables, which may be difficult to some. I'll show you how to make a working script with multichoice, however I won't go into too much detail.
Ok, so first we will set a #Dynamic.
#Dynamic 0x800000
Next we want to lock the Player so he/she can't move. Also make the Person we are talking to Face the Player.
Lock
FacePlayer
Next we will call the MultiChoice Command.
MultiChoice 0xA 0x4 0x1 B_True
Ok, you should know what each of those means, because it's explained in the Command Help...

Next we need to copy the Value "LASTRESULT" into another Var, so we can use it. Today I will be using 0x4003
CopyVar 0x4003 LASTRESULT
Now, we are going to "Check" if the Value of 0x4003 is 0. If it is we will goto another script.
Compare 0x4003 0x0
If B_TRUE Call @Choice1
Pretty much we just go that for as many results as the MultiChoice Box has. This certain Multichoice has 5 Options. So...
Compare 0x4003 0x1
If B_TRUE Call @Choice2
Compare 0x4003 0x2
If B_TRUE Call @Choice3
Compare 0x4003 0x3
If B_TRUE Call @Choice4
Compare 0x4003 0x4
If B_TRUE Call @Choice5
Next we are going to Release the Lock Command, giving control back to the player. And also End the script.
Release
End

Ok... That's pretty much it, all you really hae to do now is decide what you want each choice to do... Here is my beautiful example.
#Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
MultiChoice 0xA 0x4 0x1 0x1
CopyVar 0x4003 LASTRESULT
Compare 0x4003 0x0
If B_TRUE Call @Choice1
Compare 0x4003 0x1
If B_TRUE Call @Choice2
Compare 0x4003 0x2
If B_TRUE Call @Choice3
Compare 0x4003 0x3
If B_TRUE Call @Choice4
Compare 0x4003 0x4
If B_TRUE Call @Choice5
Release
End

#ORG @Choice1
Message @Text1
BoxSet 6
Return

#ORG @Choice2
Message @Text2
BoxSet 6
Return

#ORG @Choice3
Message @Text3
BoxSet 6
Return

#ORG @Choice4
Message @Text4
BoxSet 6
Return

#ORG @Choice5
Message @Text5
BoxSet 6
Return

#ORG @Text1
= Message 1.

#ORG @Text2
= Message 2.

#ORG @Text3
= Message 3.

#ORG @Text4
= Message 4.

#ORG @Text5
= Message 5.
when will the full XSE tut be created..?
HackMew is writing it up as we speak.

~Teh Panda~
June 2nd, 2008, 09:28 PM
Wow... Soo many posts... :o


MultiChoice is something that you should really only do when you know all of the basics. You see it needs to use Variables, which may be difficult to some. I'll show you how to make a working script with multichoice, however I won't go into too much detail.
Ok, so first we will set a #Dynamic.
#Dynamic 0x800000
Next we want to lock the Player so he/she can't move. Also make the Person we are talking to Face the Player.
Lock
FacePlayer
Next we will call the MultiChoice Command.
MultiChoice 0xA 0x4 0x1 B_True
Ok, you should know what each of those means, because it's explained in the Command Help...

Next we need to copy the Value "LASTRESULT" into another Var, so we can use it. Today I will be using 0x4003
CopyVar 0x4003 LASTRESULT
Now, we are going to "Check" if the Value of 0x4003 is 0. If it is we will goto another script.
Compare 0x4003 0x0
If B_TRUE Call @Choice1
Pretty much we just go that for as many results as the MultiChoice Box has. This certain Multichoice has 5 Options. So...
Compare 0x4003 0x1
If B_TRUE Call @Choice2
Compare 0x4003 0x2
If B_TRUE Call @Choice3
Compare 0x4003 0x3
If B_TRUE Call @Choice4
Compare 0x4003 0x4
If B_TRUE Call @Choice5
Next we are going to Release the Lock Command, giving control back to the player. And also End the script.
Release
End

Ok... That's pretty much it, all you really hae to do now is decide what you want each choice to do... Here is my beautiful example.
#Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
MultiChoice 0xA 0x4 0x1 0x1
CopyVar 0x4003 LASTRESULT
Compare 0x4003 0x0
If B_TRUE Call @Choice1
Compare 0x4003 0x1
If B_TRUE Call @Choice2
Compare 0x4003 0x2
If B_TRUE Call @Choice3
Compare 0x4003 0x3
If B_TRUE Call @Choice4
Compare 0x4003 0x4
If B_TRUE Call @Choice5
Release
End

#ORG @Choice1
Message @Text1
BoxSet 6
Return

#ORG @Choice2
Message @Text2
BoxSet 6
Return

#ORG @Choice3
Message @Text3
BoxSet 6
Return

#ORG @Choice4
Message @Text4
BoxSet 6
Return

#ORG @Choice5
Message @Text5
BoxSet 6
Return

#ORG @Text1
= Message 1.

#ORG @Text2
= Message 2.

#ORG @Text3
= Message 3.

#ORG @Text4
= Message 4.

#ORG @Text5
= Message 5.

HackMew is writing it up as we speak.

Nice, something else to work on now. i cannot wait until Hackmew is done! :)

Darthatron
June 2nd, 2008, 10:05 PM
Nice, something else to work on now. i cannot wait until Hackmew is done! :)
He is done. Check XSE out here (http://www.pokecommunity.com/showpost.php?p=3634208&postcount=333). Have fun with it. :)

Master_Track
June 2nd, 2008, 10:43 PM
thx darthatron, I already know all the basics since I scripted with pokescript very much and quite advanced.(so I understood what u wrote there ^^)
I just don't know how some things are set in XSE, but I believe the tut will help? :D

Darthatron
June 3rd, 2008, 02:19 AM
thx darthatron, I already know all the basics since I scripted with pokescript very much and quite advanced.(so I understood what u wrote there ^^)
I just don't know how some things are set in XSE, but I believe the tut will help? :D
Yes, from what I've seen the guide HackMew is making is very detailed. :)

Tré
June 3rd, 2008, 02:31 AM
wow..this XSE is too easy to use..but is there an alternative..were basic pokescript can stick here
it..confuses me...

Darthatron
June 3rd, 2008, 02:53 AM
wow..this XSE is too easy to use..but is there an alternative..were basic pokescript can stick here
it..confuses me...
It's pretty much the same, all that has changed dramatically is "$" to "@". Everything else is just easier. :P

/Circa
June 3rd, 2008, 02:57 AM
Im addicted to the new uses of XSE, but I think i'll stick to using 0x?????? offsets instead of Dynamic, I can track where im going with that.

Tyrantrum
June 3rd, 2008, 07:24 PM
I tried to make a script with a different color, but it stayed at red instead of Dark Green.
What would color scripts on XSE look like?

~Teh Panda~
June 3rd, 2008, 08:15 PM
How can you give pokemon, I have tried the default one for poketscript and scripted but no luck. I hope there is more coverage in this and follow me scripts in following tutorials!

destinedjagold
June 3rd, 2008, 09:14 PM
Darthatron, care to add more tuts in the first page? :\

Darthatron
June 3rd, 2008, 09:18 PM
I tried to make a script with a different color, but it stayed at red instead of Dark Green.
What would color scripts on XSE look like?
What game are you hacking?
How can you give pokemon, I have tried the default one for poketscript and scripted but no luck. I hope there is more coverage in this and follow me scripts in following tutorials!
It's rather simple really:

The GivePokemon Command is set out like this:
Byte1 = Pokemon Number
Byte2 = Pokemon Level
Byte3 = Held Item
Byte4 = ?
Byte5 = ?
Byte6 = ?
So to make a basic script to give the Player a Level 5 Pikachu, holding a Pokeball, we would do this:
#Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
GivePokemon 25 5 4 0 0 0
Release
End
Tada! :D

Satoshi-Ash
June 3rd, 2008, 09:31 PM
Thanks so much. This really helps people like me with scripting using this awesome program.

I do have one question:
"#Dynamic 0x800000" would be the offset for the event, right?

~Teh Panda~
June 3rd, 2008, 09:35 PM
What game are you hacking?

It's rather simple really:

The GivePokemon Command is set out like this:
Byte1 = Pokemon Number
Byte2 = Pokemon Level
Byte3 = Held Item
Byte4 = ?
Byte5 = ?
Byte6 = ?
So to make a basic script to give the Player a Level 5 Pikachu, holding a Pokeball, we would do this:
#Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
GivePokemon 25 5 4 0 0 0
Release
End
Tada! :D

Dang, thanks man! :D, gonna try a script for this now!

one more thing, are flags the same as others, i have not tried, can someone confirm or show an example of how to use flags in xsc and do the same movement codes apply?

ZodiacDaGreat
June 3rd, 2008, 09:55 PM
Dang, thanks man! :D, gonna try a script for this now!

one more thing, are flags the same as others, i have not tried, can someone confirm or show an example of how to use flags in xsc and do the same movement codes apply?

Everything's same and remains unchanged, - flags will never change, they carry the same value, unless the flag base is modified..., movements also remain unchange. Other then a few, only some commands area changed, like multi, startwildbattle etc, as the more accurate parameters for the command was discovered and so changes had to be made. If you're not sure, check the command database - it should answer most of these questions.

Tré
June 3rd, 2008, 11:13 PM
hey i understand now....you can only change the $ to @...whoa...this is addicting...xD

Qwerty-117
June 3rd, 2008, 11:48 PM
now that XSE has been released, will the beta tut still work for the full version?

~Teh Panda~
June 4th, 2008, 06:16 AM
So according to you Zodiac something like this would work!


#Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
checkflag 0x200
if b_true goto @gotit
GivePokemon 25 5 4 0 0 0
message @recieved
setflag 0x200
Release
End

#ORG @gotit
message @howis
Release
End

#ORG @recieved
=Here is pikachu!

#ORG @howis
=How is pikachu doing?

Tyrantrum
June 4th, 2008, 07:10 AM
Oh, I'm using a script test Rom for Fire Red.

Darthatron
June 4th, 2008, 07:10 AM
So according to you Zodiac something like this would work!


#Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
checkflag 0x200
if b_true goto @gotit
GivePokemon 25 5 4 0 0 0
message @recieved
setflag 0x200
Release
End

#ORG @gotit
message @howis
Release
End

#ORG @recieved
=Here is pikachu!

#ORG @howis
=How is pikachu doing?


That will work fine. Except I think you need a space after the "=" in Text Scripts. #ORG @recieved
=Here is pikachu!

#ORG @howis
=How is pikachu doing? Should be #ORG @recieved
= Here is pikachu!

#ORG @howis
= How is pikachu doing?

Oh, I'm using a script test Rom for Fire Red.
Oh, well... If it can wait a few days the new version of XSE will have color codes included. :) Otherwise, PM me, and I'll explain.

Master_Track
June 4th, 2008, 07:22 AM
I'm quite sure I used colour codes with XSE O.o
I'll try it out again, but I'm sure it was with XSE......
just wrote \c\h01\h04 (code for red).

Jamiras843
June 4th, 2008, 08:24 AM
I need halp with a script I made... To get your first pokemon you talk to this guy, he just says "test blah blah blah" then you get a Houndour and music plays and a txt box pops up saying "[PLAYER] recieved a HOUNDOUR!" but after that box the "test blah blah blah" box comes back and so does the "[PLAYER] recieved a HOUNDOUR!" then it just stops. How do I make it not repeat the second time? this is the script its not fully complete but the whole repeat thing bugs me...

#dynamic 800109

#org @starterpkm
lock
faceplayer
checkflag 0x200
if 0x1 goto @father1
msgbox @houndour
callstd 0x6
goto @houndourget
release
end

#org @father1
lock
faceplayer
msgbox @well
callstd 0x6
release
end

#org @houndour
= test blah blah blah

#org @houndourget
lock
fanfare 0x13E
msgbox2 @houndourget2
waitmsgbox
waitfanfare
callstd 0x6
givepokemon 0xE4 0x5 0x0 0x0 0x0 0x000000 0x00
setflag 0x200
setflag 0x828
release
end

#org @houndourget2
= \v\h01 received a HOUNDOUR!

#org @well
= You already have a pokemon

Dr.Razor
June 4th, 2008, 09:57 AM
I show my method tu use XSE:
-Insert script with Poketscript
-Then decompile the script with XSE
-Edit it
-Compile it.

I use this way because i don't like very much dynamic system
and i can edit the script easily with XSE

Hope it will help someone^^

Ps:Sorry for my english.

Mike2494
June 4th, 2008, 10:01 AM
Well, why do you have two setflags, try giving the 0x828 just away. I am not a XSE-Pro, I am also only learning right now, but I know some stuff about PokeScript..so yeah..

Jamiras843
June 4th, 2008, 10:17 AM
Well, why do you have two setflags, try giving the 0x828 just away. I am not a XSE-Pro, I am also only learning right now, but I know some stuff about PokeScript..so yeah..

The 0x828 flag is the flag that enables you to view your pokemon status, this flag is enabled when you choose your starter pokemon. Since this is your starter pokemon I need to enable that flag, or else you just get the pokemon and can't check its status.

~Teh Panda~
June 4th, 2008, 03:49 PM
That will work fine. Except I think you need a space after the "=" in Text Scripts. #ORG @recieved
=Here is pikachu!

#ORG @howis
=How is pikachu doing? Should be #ORG @recieved
= Here is pikachu!

#ORG @howis
= How is pikachu doing?


Oh, well... If it can wait a few days the new version of XSE will have color codes included. :) Otherwise, PM me, and I'll explain.

My script glitches, when I talk to the person assigned with this it shows no text but gives the poke, then when I go to bag, you change your character to the giver of the pokemon! What did I do wrong, here is my improved script

#Dynamic 0x71A2EC

#ORG @Main
Lock
FacePlayer
checkflag 0x200
if b_true goto @gotit
GivePokemon 25 5 4 0 0 0
message @recieved
setflag 0x200
Release
End

#ORG @gotit
message @howis
Release
End

#ORG @recieved
= Here is pikachu!

#ORG @howis
= How is pikachu doing?

Jamiras843
June 4th, 2008, 07:44 PM
My script glitches, when I talk to the person assigned with this it shows no text but gives the poke, then when I go to bag, you change your character to the giver of the pokemon! What did I do wrong, here is my improved script

#Dynamic 0x71A2EC

#ORG @Main
Lock
FacePlayer
checkflag 0x200
if b_true goto @gotit
GivePokemon 25 5 4 0 0 0
message @recieved
setflag 0x200
Release
End

#ORG @gotit
message @howis
Release
End

#ORG @recieved
= Here is pikachu!

#ORG @howis
= How is pikachu doing?

This happened to me, If you change maps before going to the bag it shouldnt switch characters. I wish I could tell you how to fix it, but if you do let me know I would like to fix that on mine too :)

~Teh Panda~
June 4th, 2008, 07:51 PM
This happened to me, If you change maps before going to the bag it shouldnt switch characters. I wish I could tell you how to fix it, but if you do let me know I would like to fix that on mine too :)

Ya I fixed the change character thing by making it say if b_false goto @recieved instead of message @recieved after the givepokemon but placed it before the givepokemon! Now I am giong to try to move the givepokemon script to one of the subscripts and see if any positive results happen.

ZodiacDaGreat
June 4th, 2008, 08:16 PM
#Dynamic 0x71A2EC

#ORG @Main
Lock
FacePlayer
checkflag 0x200
if b_true goto @gotit
GivePokemon 0x25 0x5 0x4 0x0 0x0 0x0
message @recieved
boxset 0x2
setflag 0x200
Release
End

#ORG @gotit
message @howis
boxset 0x2
End

#ORG @recieved
= Here is pikachu!

#ORG @howis
= How is pikachu doing?
here, its a bit improved, I did it in a rush, tell me if there's errors. Um, you've forgot to put boxset under message. There's no need to use CAPs(Uppercase) but thats upto you.

~Teh Panda~
June 4th, 2008, 08:22 PM
here, its a bit improved, I did it in a rush, tell me if there's errors. Um, you've forgot to put boxset under message. There's no need to use CAPs(Uppercase) but thats upto you.

Thanks, it worked, time to add my movement script, this is gonna be the beginning of new hack!

My Movement script is like this and when I compile and open it adds every movement so it confuses itself while moving and freezes, why is it doing this!

#dynamic 0x71A2E0

#org @beginning
lockall
checkflag 0x200
if b_true goto @gotit
applymovement 0x2 0x71A2E0
applymovement MOVE_PLAYER 0x71A41C
waitmovement 0x0
call 0x71A41C
boxset 0x2
releaseall
end

'-----------
' Movements
'-----------
#org 0x71A2E0
#raw 12 'Step Left (Normal)
#raw 4A 'Face player
#raw FE 'End of Movements

#org @gotit
release
end

Darthatron
June 4th, 2008, 10:50 PM
Thanks, it worked, time to add my movement script, this is gonna be the beginning of new hack!

My Movement script is like this and when I compile and open it adds every movement so it confuses itself while moving and freezes, why is it doing this!

#dynamic 0x71A2E0

#org @beginning
lockall
checkflag 0x200
if b_true goto @gotit
applymovement 0x2 0x71A2E0
applymovement MOVE_PLAYER 0x71A41C
waitmovement 0x0
call 0x71A41C
boxset 0x2
releaseall
end

'-----------
' Movements
'-----------
#org 0x71A2E0
#raw 12 'Step Left (Normal)
#raw 4A 'Face player
#raw FE 'End of Movements

#org @gotit
release
end

First off, you really shouldn't be using a mix of Dynamic and Static Offsets in your script. This makes it kind of difficult to read...

If possible could you show me the fully non-compiled script? Unless you don't have one... In which case please PM me with exactly what you want the script to do and I'll write you up a script and show you exactly what each command does. :)

Charliezard
June 5th, 2008, 01:02 AM
#Dynamic 0x3B4D84

#org @Main
Lock
FacePlayer
Message @Speak
BoxSet 0x06
release
end
#org @Speak
= "Hey!"

That's my script. :)
On Advance Map I create a person, Their Offset is 71A284
Their script offset is 3B4D84.
I click "Open script" in advance map and XSE opens up with FireRed as file and 3B4D84 as the offset.
That's when I put this in
#Dynamic 0x3B4D84

#org @Main
Lock
FacePlayer
Message @Speak
BoxSet 0x06
release
end
#org @Speak
= "Hey!" Same code again :P
And hit Compile. It says it worked but it doesn't...Whenever I re open the script offset 3B4D84 It gives me a blank page...almost
'-----------------------
#org 0x3B4D84

And the person doesn't talk to me ingame. What am I doing wrong?

ZodiacDaGreat
June 5th, 2008, 01:24 AM
And the person doesn't talk to me ingame. What am I doing wrong?

lol, you're not supposed to use offsets anyhow, try looking for lot of FF's(byte 0xFF), FF means free space, other than that it means its used. Try to optimise your script also:

#Dynamic 0x3B4D84

#org @Main
Lock
FacePlayer
Message @Speak
BoxSet 0x06
release
end
#org @Speak
= "Hey!"
to:

#dynamic 0xYour Free Space Offset
#org @Main
message @speak
boxset 0x2 ' 0x2 contains a builtin faceplayer and lock
end

#org @speak
= "Hey!"

Tré
June 5th, 2008, 01:55 AM
#Dynamic 0x800000
#org @battlepika
lock
faceplayer
checkflag 0x200
if 0x1 goto @done
message @poke
@poke 1 =Hey!!! \pIt's A Pikachu!!! \pBattle it???
boxset 0x5
compare LASTRESULT 0x1
if 0x1 goto @battle
message @no
@no 1 =Maybe This Pikachu Has an \nOwner...
boxset 0x6
release
end
#org @done
#raw 0x53 0x04 0x00 0xFE
release
end
#org @battle
lock
faceplayer
message @pikachuu
@pikachuu 1 =Pika....Pikachuuuu!!!!
boxset 0x6
wildbattle 25 7 0
setflag 0x200
fadescreen 0x0
release
end


uhhh...what's wrong with these it says....
"unknown keyword "@poke" at line 9"

ZodiacDaGreat
June 5th, 2008, 02:33 AM
uhhh...what's wrong with these it says....
"unknown keyword "@poke" at line 9"
of course there's something wrong, you've completely mistaken XSE as pokewitch, XSE uses the original method for msgbox scripts. Here's the code

#dynamic 0x800000
#org @Start
msgbox @msg
boxset 0x2
end

#org @msg
= ....
Once again, this here's XSE, not pokewitch. Plus there's command help, just press F1 if you don't understand any command or if it says unknown keyword-honestly do anyone ever bother reading the command database before scripting?

Tré
June 5th, 2008, 02:43 AM
uh... so that's why....i'll try it...
hey it workred....thanks pal...woohoo

Charliezard
June 5th, 2008, 04:03 PM
lol, you're not supposed to use offsets anyhow, try looking for lot of FF's(byte 0xFF), FF means free space, other than that it means its used. Try to optimise your script also:


to:

Thanks, but I already had an offset in the top part that I found uses FsF. I got it to work by looking at other scripts already in Pokemon.
Made it like this
'-----------------------
#org 0x3B4D84
lock
faceplayer
msgbox2 0x8456734 '""
callstd 0x6
release
end


'---------
' Strings
'---------
#org 0x456734
= Hey! How are you?

XSE gave me a hand and put thre strings part in automatically :D Hazzam lol

~Teh Panda~
June 5th, 2008, 04:37 PM
Lol my warp goes to nowhere, well to a black map where I cant see anything not even the character! i got everything else to work how I wanted it too!

here is my code


#dynamic 0x71A5F8

#org @start
lock
faceplayer
checkflag 0x829
checkflag 0x828
if b_true goto @letin
message @message
callstd 0x6
release
end

#org @letin
message @open
boxset 0x6
warp 0x3 0x66 0xFF 0x6 0x17
release
end

#org @message
= I cannot let you pass\nGet your pokemon from\pJesse outside and your\npokedex from that\ptable.

#org @open
= You may proceed.

ℜªℳ
June 5th, 2008, 06:46 PM
I've heard that someone can use XSE to get night and day in Firered adn or leafgreen. Is this possible or is this a rumor? If it is possible has it been dun before?

ZodiacDaGreat
June 5th, 2008, 06:52 PM
@hockeypanda32 - is the map bank, map number, and warp number in hex?

@KanouKono - You can't, there's no such thing. Day and Night can only be achieved by ASM.

/Circa
June 5th, 2008, 06:52 PM
You cant use a normal script to make a day night system in FireRed.
The only way, of which I know, is to use a level script in every single map, which would of worked like thethethethe's weather script, but the day and night would go by too fast, and it would require too much space. People just need to give up on this until someone can figure out a way to input a real time clock into FireRed. Which so far doesnt exist.

~Teh Panda~
June 5th, 2008, 07:03 PM
@hockeypanda32 - is the map bank, map number, and warp number in hex?

@KanouKono - You can't, there's no such thing. Day and Night can only be achieved by ASM.

I am trying to warp to map Route 1 and have it at X: 6 Y:17

its this line


warp 0x3 0x66 0xFF 0x6 0x17

Hardy Har Har
June 5th, 2008, 07:11 PM
i tried to compile this script(in the spoiler):
#Dynamic 0x80830C

#ORG @Main
callasm 0x71B771
nop
Lock
Faceplayer
Message @rar
boxset 0x6
wildbattle 130 30 1
setflag 0x1000
fadescreen 0
release
end

#ORG @rar
= Bishaan!
Then a window pops out, saying:
Error 13 'Type mismatch' on line 10
Missing #define or parameter
Line: wildbattle 130 30 1

/Circa
June 5th, 2008, 07:13 PM
Hockeypanda:

You'll need to convert it to hex if you put 0x infront of it.
17 should be 0x11. I think Advance Map has is in decimal, if not, im wrong. Try it anyways though.

Psyduck007:

Why did you add a nop? It doesnt mean anything.
Also, there must be something wrong with your command if it says that.
Try this:

startwildbattle 0x82 0x1E 0x0

Instead of wildbattle, remember XSE has some differences to other scripting programs.

ZodiacDaGreat
June 5th, 2008, 07:20 PM
I am trying to warp to map Route 1 and have it at X: 6 Y:17

its this line

and which warp?

but this should work:

warp 0x3 0x13 0xFF 0x6 0x11
remember the values should be in hex, use XSE's built in calculator to find the values.

Line: wildbattle 130 30 1
wildbattle is a construct, why don't you check the database to see what's wrong, but, I think you're trying to use this:
startwildbattle 0xPK 0xLV 0xItem

~Teh Panda~
June 5th, 2008, 07:23 PM
and which warp?

but this should work:

remember the values should be in hex, use XSE's built in calculator to find the values.


wildbattle is a construct, why don't you check the database to see what's wrong, but, I think you're trying to use this:
startwildbattle 0xPK 0xLV 0xItem

Great how do I post pone it til after my message?

ZodiacDaGreat
June 5th, 2008, 07:25 PM
Great how do I post pone it til after my message?

You can't, therefore warp is always used at the end of the script.

Charliezard
June 5th, 2008, 07:45 PM
My earlier script, that I tried jsut had a girl saying "Hey, how are you?"
Now I tried to make one that gave you a Pikachu then asked how the Pikachu was...
I clicked open script in advance map and opened the old script in XSE
'-----------------------
#org 0x3B4D84
lock
faceplayer
msgbox2 0x8456734 '"Hey! How are you?"
callstd 0x6
release
end


'---------
' Strings
'---------
#org 0x456734
= Hey! How are you?

That one works, I had the offset in XSE as 3B4D84 and comiled it into Fire Red

Now my new script is

'-----------------------
#Dynamic 0x3B4D84

#org @Talk
lock
faceplayer
checkflag 0x910
if b_true goto @Speak
message @message
givepokemon 0x19 0xA 0x0 0x0 0x0 0x0
setflag 0x910
release
end

#org @Speak
message @Pika
boxset 0x6
release
end

#org @message
= Here, this pikachu\nIs lonely.\nYou take it.

#org @Pika
= How is the Pikachu?

I deleted the old script, and wrote this one in. It doesn't have any errors in it that I know of as it gives me this
Version\1636 - Pokemon - Fire Red Version.gba...
Processing input script...
2 - DYNAMIC
> lDynamicStart = 0x3B4D84
4 - ORG
> lNewOffset = 0x47B0E7
5 - (6A) - LOCK
6 - (5A) - FACEPLAYER
7 - (2B) - CHECKFLAG
> iWord = 0x910
8 - (??) IF (native)
> bCondition = 0x1
This is a jumping IF, 0x06.
> pTarget = 0x847B139
9 - (0F) MSGBOX (native)
> pText = 0x847B22F
10 - (79) - GIVEPOKEMON
> iWord = 0x19
> bByte = 0xA
> iWord = 0x0
> lDword = 0x0
> lDword = 0x0
> bByte = 0x0
11 - (29) - SETFLAG
> iWord = 0x910
12 - (6C) - RELEASE
13 - (02) - END
15 - ORG
> lNewOffset = 0x47B139
16 - (0F) MSGBOX (native)
> pText = 0x847B4C7
17 - (09) BOXSET (native)
> bType = 0x6
18 - (6C) - RELEASE
19 - (02) - END
21 - ORG
> lNewOffset = 0x47B22F
22 - RAW TEXT
> sText = "Here, this pikachu\nIs lonely.\nYou take it."
24 - ORG
> lNewOffset = 0x47B4C7
25 - RAW TEXT
> sText = "How is the Pikachu?"
-------------------------------
DYNAMIC_OFFSET 1
> sLabel = @Pika
> lOffset = 0x47B4C7
DYNAMIC_OFFSET 2
> sLabel = @Speak
> lOffset = 0x47B139
DYNAMIC_OFFSET 3
> sLabel = @Talk
> lOffset = 0x47B0E7
DYNAMIC_OFFSET 4
> sLabel = @message
> lOffset = 0x47B22F
-------------------------------
Cleaning up...
Closing output...
Finished processing input in 0.145 seconds.

BUT when I close it and go into advance map and reopen the script it still has the first one...and ingame all she says is "Hey, how are you?"
:/ I get this whenever I use #Dynamic 0xOffset
If I start it with #org 0xOffset it works BUT I can't use stuff like #org @message I have to use other offsets :/

~Teh Panda~
June 5th, 2008, 07:51 PM
My earlier script, that I tried jsut had a girl saying "Hey, how are you?"
Now I tried to make one that gave you a Pikachu then asked how the Pikachu was...
I clicked open script in advance map and opened the old script in XSE
'-----------------------
#org 0x3B4D84
lock
faceplayer
msgbox2 0x8456734 '"Hey! How are you?"
callstd 0x6
release
end


'---------
' Strings
'---------
#org 0x456734
= Hey! How are you?

That one works, I had the offset in XSE as 3B4D84 and comiled it into Fire Red

Now my new script is

'-----------------------
#Dynamic 0x3B4D84

#org @Talk
lock
faceplayer
checkflag 0x910
if b_true goto @Speak
message @message
givepokemon 0x19 0xA 0x0 0x0 0x0 0x0
setflag 0x910
release
end

#org @Speak
message @Pika
boxset 0x6
release
end

#org @message
= Here, this pikachu\nIs lonely.\nYou take it.

#org @Pika
= How is the Pikachu?

I deleted the old script, and wrote this one in. It doesn't have any errors in it that I know of as it gives me this
Version\1636 - Pokemon - Fire Red Version.gba...
Processing input script...
2 - DYNAMIC
> lDynamicStart = 0x3B4D84
4 - ORG
> lNewOffset = 0x47B0E7
5 - (6A) - LOCK
6 - (5A) - FACEPLAYER
7 - (2B) - CHECKFLAG
> iWord = 0x910
8 - (??) IF (native)
> bCondition = 0x1
This is a jumping IF, 0x06.
> pTarget = 0x847B139
9 - (0F) MSGBOX (native)
> pText = 0x847B22F
10 - (79) - GIVEPOKEMON
> iWord = 0x19
> bByte = 0xA
> iWord = 0x0
> lDword = 0x0
> lDword = 0x0
> bByte = 0x0
11 - (29) - SETFLAG
> iWord = 0x910
12 - (6C) - RELEASE
13 - (02) - END
15 - ORG
> lNewOffset = 0x47B139
16 - (0F) MSGBOX (native)
> pText = 0x847B4C7
17 - (09) BOXSET (native)
> bType = 0x6
18 - (6C) - RELEASE
19 - (02) - END
21 - ORG
> lNewOffset = 0x47B22F
22 - RAW TEXT
> sText = "Here, this pikachu\nIs lonely.\nYou take it."
24 - ORG
> lNewOffset = 0x47B4C7
25 - RAW TEXT
> sText = "How is the Pikachu?"
-------------------------------
DYNAMIC_OFFSET 1
> sLabel = @Pika
> lOffset = 0x47B4C7
DYNAMIC_OFFSET 2
> sLabel = @Speak
> lOffset = 0x47B139
DYNAMIC_OFFSET 3
> sLabel = @Talk
> lOffset = 0x47B0E7
DYNAMIC_OFFSET 4
> sLabel = @message
> lOffset = 0x47B22F
-------------------------------
Cleaning up...
Closing output...
Finished processing input in 0.145 seconds.

BUT when I close it and go into advance map and reopen the script it still has the first one...and ingame all she says is "Hey, how are you?"
:/ I get this whenever I use #Dynamic 0xOffset
If I start it with #org 0xOffset it works BUT I can't use stuff like #org @message I have to use other offsets :/

notice the dynamics in each you are using the same hex, use a free space finder and change yours, that is what is happening

Charliezard
June 5th, 2008, 07:57 PM
Thanks, but what If I'm trying to replace the first script? Which is what I am trying. Why can't it have the same offset, and replace the older one?

Also I found that offset in fsf, and used it in my first script, that was practically the one in the tutorial and it had the same problem until I made it like the first script in my post there.

Oki, I changed the offset of the script, and the offset of the event's script in advance map to 71A794 and it works :)

So how do I replace scripts offsets? :/

Also the with the script, she always says "How's Pikachu?" :/ What'd I do wrong there? :P

~Teh Panda~
June 5th, 2008, 08:05 PM
Thanks, but what If I'm trying to replace the first script? Which is what I am trying. Why can't it have the same offset, and replace the older one?

Also I found that offset in fsf, and used it in my first script, that was practically the one in the tutorial and it had the same problem until I made it like the first script in my post there.

Oki, I changed the offset of the script, and the offset of the event's script in advance map to 71A794 and it works :)

So how do I replace scripts offsets? :/

Also the with the script, she always says "How's Pikachu?" :/ What'd I do wrong there? :P

In a hex editor totally clean up the hex manually then if you want to overwrite it! Close XSE after and reopen, then compile

Charliezard
June 5th, 2008, 08:12 PM
In a hex editor totally clean up the hex manually then if you want to overwrite it! Close XSE after and reopen, then compile

Thanks :D I had sooooooo much problems with this. Tried rescripting it a bazillion times :P
Now I have another problem
'-----------------------
#org 0x71A794
lock
faceplayer
checkflag 0x910
if 0x1 goto 0x871A7BA
msgbox 0x871A7C5 '"Here, this pikachu\nIs lonely.\nYou..."
givepokemon 0x19 0xA 0x0 0x0 0x0 0x0
setflag 0x910
release
end

'-----------------------
#org 0x71A7BA
msgbox 0x871A7F3 '"How is the Pikachu?"
callstd 0x6
release
end


'---------
' Strings
'---------
#org 0x71A7C5
= Here, this pikachu\nIs lonely.\nYou take it.

#org 0x71A7F3
= How is the Pikachu?

I think The proglem lies in this part...not sure though.
#org 0x71A794
lock
faceplayer
checkflag 0x910
if 0x1 goto 0x871A7BA
msgbox 0x871A7C5 '"Here, this pikachu\nIs lonely.\nYou..."
givepokemon 0x19 0xA 0x0 0x0 0x0 0x0
setflag 0x910
release
end
Whether I make the if 0x1 or 0x0 she still says "How's the pikachu?" From the begining and never gives it to you. :(

#org @Talk
lock
faceplayer
checkflag 0x910
checkflag 0x910
if b_true goto @Speak
message @message
givepokemon 0x19 0xA 0x0 0x0 0x0 0x0
setflag 0x910
release
end

Is the same section not compiled.

Darthatron
June 5th, 2008, 08:17 PM
Thanks, but what If I'm trying to replace the first script? Which is what I am trying. Why can't it have the same offset, and replace the older one?

Also I found that offset in fsf, and used it in my first script, that was practically the one in the tutorial and it had the same problem until I made it like the first script in my post there.

Oki, I changed the offset of the script, and the offset of the event's script in advance map to 71A794 and it works :)

So how do I replace scripts offsets? :/

Also the with the script, she always says "How's Pikachu?" :/ What'd I do wrong there? :P
You can use the Erase Function. It is set out like this:
#Dynamic 0x800000
#Erase 0x812345 0xFF

Just change "0x812345" to the location where your script starts, and also change "0xFF" to how many bytes you want to erase. Hope that helped.

I will edit later and answer the other questions...

Charliezard
June 5th, 2008, 08:24 PM
So I just recompile it with erase and the amount of bytes the offsets held? Cool
I'ma go make cheese muffins. Thanks for the help...I think I'm actually learning things :P...sorta lol

One Winged Angel
June 6th, 2008, 01:11 PM
How many more commands are in here than in Poke script?Also, are they important commands?

ℜªℳ
June 6th, 2008, 01:14 PM
I guess I'm in the wrong section. This'll do later as I script more but is it possible for anyone to help me navigate to the ASM hack tool or to a tutorial because I can't find one. All thanks is aprreciated and sorry for the clueless spamming.

ZodiacDaGreat
June 6th, 2008, 01:35 PM
How many more commands are in here than in Poke script?Also, are they important commands?

@yunghove - check the features, XSE has nearly all included though not all uses have been found, but the fact is pokewitch only had 2-5 new commands while XSE outweighs it. Yes, all commands are important, without which the game won't run proper and you won't be able to script.

I guess I'm in the wrong section. This'll do later as I script more but is it possible for anyone to help me navigate to the ASM hack tool or to a tutorial because I can't find one. All thanks is aprreciated and sorry for the clueless spamming.

@KanouKono - There's no such thing is a specific ASM tool, as ASM itself is unspecific, all you need is a emulator with builtin debugger(VBA-SDL-H), disassembler(VBA has one), assembler(GoldRoad, Devkit Adv, etc) and some knowledge on ASM. Then you fiddle around with it, find stuff amd modifiy it to your desire. There aren't much tutorials on ASM, google it or something, PHO has some.

Charliezard
June 6th, 2008, 06:37 PM
@yunghove - check the features, XSE has nearly all included though not all uses have been found, but the fact is pokewitch only had 2-5 new commands while XSE outweighs it. Yes, all commands are important, without which the game won't run proper and you won't be able to script.



@KanouKono - There's no such thing is a specific ASM tool, as ASM itself is unspecific, all you need is a emulator with builtin debugger(VBA-SDL-H), disassembler(VBA has one), assembler(GoldRoad, Devkit Adv, etc) and some knowledge on ASM. Then you fiddle around with it, find stuff amd modifiy it to your desire. There aren't much tutorials on ASM, google it or something, PHO has some.

There are a lot of very in-depth tutorials on ASM. It's just up to you to gain a decent enough understanding to apply it to roms. The Dark Alliance is a good place to learn basic ASM, and more complicated...Most people who know ASM well, apply their knowkledge in diffrent areas so yeh. Also Cheat engine and it's tutorial are a good place to start. Cheat engine is a memory scanner, that uses ASM. (Some AV's scan it as a trojan -_-. The site warns you).
It's just up to you to learn the basics, then apply em in roms. Btw ASM is not reccomended for a first language :)

ZodiacDaGreat
June 6th, 2008, 06:42 PM
There are a lot of very in-depth tutorials on ASM. It's just up to you to gain a decent enough understanding to apply it to roms. The Dark Alliance is a good place to learn basic ASM, and more complicated...Most people who know ASM well, apply their knowkledge in diffrent areas so yeh. Also Cheat engine and it's tutorial are a good place to start. Cheat engine is a memory scanner, that uses ASM. (Some AV's scan it as a trojan -_-. The site warns you).
It's just up to you to learn the basics, then apply em in roms. Btw ASM is not reccomended for a first language :)
he means ASM as per ROM hacking for pokemon.

mattattack
June 6th, 2008, 09:21 PM
excuse me but does anyone know how to get wild pokemon sprites to fight you (meaning when you fight Mewtwo you have to talk to the sprite)

ZodiacDaGreat
June 6th, 2008, 09:25 PM
excuse me but does anyone know how to get wild pokemon sprites to fight you (meaning when you fight Mewtwo you have to talk to the sprite)
Reply With Quote

I think you're referring to this:

wildbattle 0xSpecies 0xLv 0xItem 0xStyle

Charliezard
June 6th, 2008, 09:39 PM
he means ASM as per ROM hacking for pokemon.

I know that...lol. but how exactly does he plan to hack a rom with ASM if he doesn't know ASM and there are no tuts showing him step by step how to use to hack a pokemon rom?

That would be hard...very hard :/ I was just suggesting that instead of asking for tutorials on how to apply knowledge, he should be looking for tutorials on the basics first. Then once he understands the basics, move on to applying knowledge.

Btw, with scripting, how do you tell how many bytes are needed for a script? Mainly the script I posted before that I'm having problems with :P Where you talk to her and she gives you a pikachu then asks how the pikachu is going...Does each command take up a certain amount of bytes? Or does it vary depending on say how you use the command?

mattattack
June 6th, 2008, 09:45 PM
hey you try to work on a hack with nobody else to help you

ZodiacDaGreat
June 6th, 2008, 09:51 PM
Btw, with scripting, how do you tell how many bytes are needed for a script? Mainly the script I posted before that I'm having problems with :P Where you talk to her and she gives you a pikachu then asks how the pikachu is going...Does each command take up a certain amount of bytes? Or does it vary depending on say how you use the command?

Different commands have different parameters, each bit of a parameter takes up a byte, text data also take up bytes - one character per byte.

GiantGroudon
June 7th, 2008, 08:06 AM
I took the open source script (credits to cheesePeow) and copied it in XSE, changed the $ into @, but when i want to compile it, it says something like :no dynamic startoffset was chosen (this sentence was translated. I'm using german version) That's the script:

#org @begin
lock
faceplayer
message @flightchooser
@flightchooser 1 = Hello, welcome to Heartrow Airport.\nYou can choose where you\nare to fly to.\pHere we go.
boxset 6
message @Izuki
@kanto 1 = Would you like to fly to Izuki?
boxset 5
compare LASTRESULT 1
if 1 goto @flytokanto

release
end

#org @flytokanto
message $enjoyflightkanto
@enjoyflightkanto 1 = Enjoy your flight to Izuki!
boxset 6
warp 0x0 0x0
release
end

And i need to know where to input the mapbankExample: 3.10 and warp number 0. if anyone could posta reply, please insert this stuff where it belongs and correct the script if there are any mistakes.

~Teh Panda~
June 7th, 2008, 08:16 AM
I took the open source script (credits to cheesePeow) and copied it in XSE, changed the $ into @, but when i want to compile it, it says something like :no dynamic startoffset was chosen (this sentence was translated. I'm using german version) That's the script:


And i need to know where to input the mapbankExample: 3.10 and warp number 0. if anyone could posta reply, please insert this stuff where it belongs and correct the script if there are any mistakes.


#dynamic 0x?????? '<----offset you want replaces ??????

#org @begin
lock
faceplayer
message @flightchooser
boxset 6
message @Izuki
boxset 5
compare LASTRESULT 1
if 1 goto @flytokanto
release
end

#org @izuki
= Would you like to fly to Izuki?

#org @flightchooser
= Hello, welcome to Heartrow Airport.\nYou can choose where you\nare to fly to.\pHere we go.

#org @enjoyflightkanto
= Enjoy your flight to Izuki!

#org @flytokanto
message @enjoyflightkanto
boxset 6
warp 0x3 0x19 0xFF 0x5 0x5 '<------ 1st int means bank, 2 no., 3. seperator, 4 x coord, 5 y, what I have would be route 1 at 5x/5y
release
end

GiantGroudon
June 7th, 2008, 08:25 AM
Thanks dude. Now it works.

~Teh Panda~
June 7th, 2008, 08:56 AM
Thanks dude. Now it works.

No problem, if you need command help press F1 in XSE it brings up a popup with all its commands listed so enjoy! I you still need help post here and I will see what I can do about it ;)

GiantGroudon
June 7th, 2008, 08:57 AM
How much bytes do I need for this script? #dynamic 0x??????

#org @begin
lock
faceplayer
message @flightchooser
boxset 6
#define message @Izuki
boxset 5
compare LASTRESULT 1
if 1 goto @flytokanto
release
end

#org @izuki
= Would you like to fly to Izuki?

#org @flightchooser
= Hello, welcome to Heartrow Airport.\nYou can choose where you\nare to fly to.\pHere we go.

#org @enjoyflightkanto
= Enjoy your flight to Izuki!

#org @flytokanto
#define message @enjoyflightkanto
boxset 6
warp 0x3 0x19 0xFF 0x5 0x5 '<------ 1st int means bank, 2 no., 3. seperator, 4 x coord, 5 y, what I have would be route 1 at 5x/5y
release
end

~Teh Panda~
June 7th, 2008, 09:02 AM
How much bytes do I need for this script? #dynamic 0x??????

#org @begin
lock
faceplayer
message @flightchooser
boxset 6
#define message @Izuki
boxset 5
compare LASTRESULT 1
if 1 goto @flytokanto
release
end

#org @izuki
= Would you like to fly to Izuki?

#org @flightchooser
= Hello, welcome to Heartrow Airport.\nYou can choose where you\nare to fly to.\pHere we go.

#org @enjoyflightkanto
= Enjoy your flight to Izuki!

#org @flytokanto
#define message @enjoyflightkanto
boxset 6
warp 0x3 0x19 0xFF 0x5 0x5 '<------ 1st int means bank, 2 no., 3. seperator, 4 x coord, 5 y, what I have would be route 1 at 5x/5y
release
end


Just enter your dynamic offset where the ?'s are and it comes up with a window once you press compile. It already selected the needed offset so press the copy button then in Adv Map go to you event you want to apply it to and paste your offset in the Event's offset box!

Hardy Har Har
June 14th, 2008, 05:11 PM
Hockeypanda:

You'll need to convert it to hex if you put 0x infront of it.
17 should be 0x11. I think Advance Map has is in decimal, if not, im wrong. Try it anyways though.

Psyduck007:

Why did you add a nop? It doesnt mean anything.
Also, there must be something wrong with your command if it says that.
Try this:

startwildbattle 0x82 0x1E 0x0Instead of wildbattle, remember XSE has some differences to other scripting programs.
i added nop to make it shiny

master morty
June 18th, 2008, 06:36 AM
I am good with almost everything but flags how do I use them!?!

Master_Track
June 18th, 2008, 06:54 AM
using flags is something really simple. They are just marks that a script has been activated before.
for example:
#dynamic 0x800000

#org @begin
checkflag 0x200
if B_true goto @other
lock
faceplayer
message @talk
boxset 0x6
setflag 0x200
release
end

#org @talk
= Hi, nice to meet you!

#org @other
lock
faceplayer
message @met
boxset 0x6
release
end

#org @met
= We met before, right?
you first check, if flag 0x200 has been activated. if it was, you give a pointer to another part of the script.
So the first time the script activates, flag 0x200 is activated. The second time, the script will recognize that flag 0x200 has been activated, and jump to another part of the script.
hope that helps ^^

@psyduck: nop to make a wild pokemon shiny? O.o
nop is simply a buffer, it doesn't do ANYTHING. It's useless ^^( at least in XSE, afaik. In pokescript it's sometimes necessary)
To make a wild pokemon shiny u need to use MM_X's shiny hack and the command "callasm".

ℜªℳ
June 18th, 2008, 06:57 AM
I know that...lol. but how exactly does he plan to hack a rom with ASM if he doesn't know ASM and there are no tuts showing him step by step how to use to hack a pokemon rom?

That would be hard...very hard :/ I was just suggesting that instead of asking for tutorials on how to apply knowledge, he should be looking for tutorials on the basics first. Then once he understands the basics, move on to applying knowledge.

That's what I was talking about. I know its a little on topic and 'll stop doing this after this post but where can I get the basic knowledge and advance. I hear people talking but I've never seen anyone around here actually apply it in a pokemon game or try it. There has to be a group or something here that can help me with the basics, is there?

コリンク
June 19th, 2008, 05:47 AM
I hate to be a bother, but how can you script the Pokeballs at the beginning of the game? I keep trying but I get this -

" Error 13 'Type Mismatch' on line 23.
Missing #define or parameter."

Master_Track
June 19th, 2008, 09:31 AM
er...if this message comes up, you've written a command wrong.
XSE should automatically go to the line where the error is (in this case line 23).
so there is the mistake, you need to copy this line and post it here so we know what command it was and what's wrong with the way you wrote it ;)

HackMew
June 19th, 2008, 12:53 PM
In a hex editor totally clean up the hex manually then if you want to overwrite it! Close XSE after and reopen, then compile

Sorry but that's wrong. First of all you wouldn't need to close and reopen XSE. Second, XSE features some cleaning up directives. One of them is called #erase. It will overwrite any number of bytes with FFs, starting from a specified offset.

Example:

#erase 0x800000 0xA


That would erase 10 bytes (0xA) starting from offset 0x800000.

Eventually you can use the #eraserange directive. It's quite the same except you input the starting and the ending offset as parameters.

コリンク
June 19th, 2008, 01:46 PM
er...if this message comes up, you've written a command wrong.
XSE should automatically go to the line where the error is (in this case line 23).
so there is the mistake, you need to copy this line and post it here so we know what command it was and what's wrong with the way you wrote it ;)

It was: givepokemon 0x247 0x05 0x00

I'm aware I've done something wrong, seeing as I'm a noob like that..

Master_Track
June 19th, 2008, 01:51 PM
klick f1 after you write a command, and you'll see how much bytes it needs.
In this case it's givepokemon, and it needs 15 bytes.
So you write givepokemon [number][level][item]0 0 0
givepokemon 247 5 0 0 0 0

hope that's right, I sometimes confuse wildbattle and givepokemon xD

コリンク
June 19th, 2008, 02:05 PM
klick f1 after you write a command, and you'll see how much bytes it needs.
In this case it's givepokemon, and it needs 15 bytes.
So you write givepokemon [number][level][item]0 0 0
givepokemon 247 5 0 0 0 0

hope that's right, I sometimes confuse wildbattle and givepokemon xD


Oh thank you so much!! *hugs* It works!

It works, but when I complie it I get the log but not the offsets.. Unless the 0x?????? is the offset.. oO

lennycharriez315
June 23rd, 2008, 05:48 AM
anybody know the wild battle script for xse? im using firered.....

i need the whole script and maybe a couple tips like how to change the pokemon that apears and the level.........please i need help.

Banjora Marxvile
June 24th, 2008, 11:15 AM
Can someone help me with a Wild Battle script for Ruby. This is the script:

'-----------------------
#org 0x978456
lock
faceplayer
startwildbattle 0x19A 0x46 0x0
checksound
cry 0x19A 0x2
pause 0x28
waitcry
setflag 0x306
setflag 0x862
special 0x139
waitstate
clearflag 0x862
release
end


How can you make it so that you only fight the pokemon once, not over and over again like it is doing?

lennycharriez315
June 24th, 2008, 10:12 PM
Can someone help me with a Wild Battle script for Ruby. This is the script:


How can you make it so that you only fight the pokemon once, not over and over again like it is doing?
ok. i tried your script myself and if give you a wild deoxys lv.70.now i understand what you are talking about that its still there..according to the one of MANY guides i read that were totally useless and thats y im waiting for hack mews guide.

but i do know that you need to add a ''fadescreen 0'' or ''fadescreen 1'' before release. if that dont work then im sorry but itried.

ok i understand most basics of scripting and i wondered if any body would kindly post a script for a wild celebi lv 30 and tell me how to change the pokemon.but it can only appear once in the game...

i hope one of u get the heart to help me. and ill kindly post you a real real good story line that i read about. and believe me you WILL like it.just please help me.

Charliezard
June 25th, 2008, 02:46 AM
ok. i tried your script myself and if give you a wild deoxys lv.70.now i understand what you are talking about that its still there..according to the one of MANY guides i read that were totally useless and thats y im waiting for hack mews guide.

but i do know that you need to add a ''fadescreen 0'' or ''fadescreen 1'' before release. if that dont work then im sorry but itried.

ok i understand most basics of scripting and i wondered if any body would kindly post a script for a wild celebi lv 30 and tell me how to change the pokemon.but it can only appear once in the game...

i hope one of u get the heart to help me. and ill kindly post you a real real good story line that i read about. and believe me you WILL like it.just please help me.

You need to checkflag.
setflag 0x306
setflag 0x862
special 0x139

Are they used anywhere else? If so add another one in I spose, just to be safe :P

Then make it
#Dynamic 0x800000
checkflag 0x862
if 0x1 goto @Battledone
lock
faceplayer
startwildbattle 0x19A 0x46 0x0
checksound
cry 0x19A 0x2
pause 0x28
waitcry
setflag 0x306
setflag 0x862
special 0x139
waitstate
clearflag 0x862
release
end

#ORG @Battledone
code for changing sprite or something lol not to sure. But this'll at least
stop it battling you twice :P

lennycharriez315
June 25th, 2008, 07:26 PM
ok guys i need help understanding the wild pokemon battle maybe someone can write a small tutorial that can help us with wild battles..and im hoping its hackmews tutorial wich im hearing about that will help and im hoping it comes out as soon as possible because i need a quick tutorial.really badly.

especially with the part that you need to add the person id thing.

コリンク
June 26th, 2008, 05:02 AM
Could I get some help with a script? I'm trying to figure out how to script the three Pokeballs in my hacks, does anyone know how?

Flashpoint
June 29th, 2008, 03:40 AM
Whenever I try to compile any script with ''compare LASTRESULT 1'',I always get ''Error 13,'Type Mismatch' on Line 31 missing #define or paramater''
''Line : compare LASTRESULT 1''

Tropical Sunlight
June 29th, 2008, 04:18 AM
Does anyone how to make a givepokemon pokeball disappear after you take it?

'-----------------------
#org 0x26D4E4
lock
faceplayer
msgbox 0x826D506 '"I'd better take my CHARMANDER\nwith..."
callstd 0x6
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
setflag 0x828
release
end

'---------
' Strings
'---------
#org 0x26D506
= I'd better take my CHARMANDER\nwith me!

Master_Track
June 29th, 2008, 05:38 AM
write the hidesprite command with the person number of the pokeball, and in the next line a setflag.
use the setflag as ID for the pokeball.
here's an example:
#raw 0x53 0x01 0x00 (#raw 0x53= hidesprite)( 0x01 0x00 = person number)
setflag 0x828

give it the ID 0828 and it will vanish. It will also vanish without setflag and using setflag as ID, but after one movement it would reappeare.

(I hope I used hidesprite right, it's like this in pokescript and I didn't use hidesprite in XSE yet).

Darthatron
June 29th, 2008, 06:35 AM
write the hidesprite command with the person number of the pokeball, and in the next line a setflag.
use the setflag as ID for the pokeball.
here's an example:
#raw 0x53 0x01 0x00 (#raw 0x53= hidesprite)( 0x01 0x00 = person number)
setflag 0x828

give it the ID 0828 and it will vanish. It will also vanish without setflag and using setflag as ID, but after one movement it would reappeare.

(I hope I used hidesprite right, it's like this in pokescript and I didn't use hidesprite in XSE yet).

It's like this in XSE...
hidesprite 0x1
Everything else is the same. :)

foullump
June 29th, 2008, 01:22 PM
(Sorry if this is a bit off topic) Everyone is saying that XSE is the "revolutionary" scripting program. Well, how exactly is it so great? I've seen many things about this program and I will tell you, diamond cutter, pokescript, and even scripted can do these things! Is there anything unique or special about this program that would give me a reason to use it over any other scripting program? And shouldn't the dynamic offset just create more work? And does this thing even save into individual .RBCs? If not, that's a horrible thing, as I save all of my scripts in a folder.

~Teh Panda~
June 29th, 2008, 01:37 PM
(Sorry if this is a bit off topic) Everyone is saying that XSE is the "revolutionary" scripting program. Well, how exactly is it so great? I've seen many things about this program and I will tell you, diamond cutter, pokescript, and even scripted can do these things! Is there anything unique or special about this program that would give me a reason to use it over any other scripting program? And shouldn't the dynamic offset just create more work? And does this thing even save into individual .RBCs? If not, that's a horrible thing, as I save all of my scripts in a folder.

Great things of XSE to point out

First of all a Command DB in the palm of your hands
Easy compilation
Saves your scripts in .RBC format
Quickest compiler
Decompilation
Open up scripts from the game and edit them
Script checker for bugs.
Tabs for easy access to more and more scripts.

Working Class Hero
June 30th, 2008, 11:50 AM
Great things of XSE to point out

First of all a Command DB in the palm of your hands
Easy compilation
Saves your scripts in .RBC format
Quickest compiler
Decompilation
Open up scripts from the game and edit them
Script checker for bugs.
Tabs for easy access to more and more scripts.

You also forgot that XSE is the only scripting program that works on every computer in circulation. While all the rest (ScriptED,PokeScript,ECT) only work on about 40% of the computers in circulation today. :3 Thank god for XSE or I wouldn't be able to script.

Chimchar 9
June 30th, 2008, 12:01 PM
well this scripting programme is awsome i could not script without this because pokescript and scripted doesnt work on my p.c so without this how could i script thanks for making it i love it thanks for this tutorial is awsome thanks

thethethethe
June 30th, 2008, 10:41 PM
It's like this in XSE...
hidesprite 0x1
Everything else is the same. :)
I always hate to correct the writer of a tutorial, but I asked Hackmew a while ago about this because I was curious, and also too lazy to test myself.
XSE is backwards compatible, and by that I mean that it's compatible with uses from Pokescript and ScriptEd and others which help with a transition over.
So to my point,
hidesprite 0x1
...doesn't have to be this way in XSE.
#raw 0x53 0x01 0x00
Will also work.

Darthatron
June 30th, 2008, 10:45 PM
I always hate to correct the writer of a tutorial, but I asked Hackmew a while ago about this because I was curious, and also too lazy to test myself.
XSE is backwards compatible, and by that I mean that it's compatible with uses from Pokescript and ScriptEd and others which help with a transition over.
So to my point,
hidesprite 0x1
...doesn't have to be this way in XSE.
#raw 0x53 0x01 0x00
Will also work.
I know you can still use #RAW commands, but I thought it would be easier if I told them the actual command for it. >_>

lennycharriez315
July 1st, 2008, 12:01 PM
Does anyone have the basic wildpokemonbattle script for xse...and can you explain it a bit.including the raw and were to put the person num...or how to find the person number..but i do need the script.

~Teh Panda~
July 1st, 2008, 05:18 PM
You also forgot that XSE is the only scripting program that works on every computer in circulation. While all the rest (ScriptED,PokeScript,ECT) only work on about 40% of the computers in circulation today. :3 Thank god for XSE or I wouldn't be able to script.

Not a Mac, too bad... Well woot for Intel Macs and boot camp :D

DPP Rival
July 1st, 2008, 08:03 PM
This is my problem.

I gave this little girl a script saying, What's your favorite pokemon? Mine's Clefairy!

But on Clefairy, only the C shows up. How can I fix this?

Darthatron
July 1st, 2008, 10:13 PM
This is my problem.

I gave this little girl a script saying, What's your favorite pokemon? Mine's Clefairy!

But on Clefairy, only the C shows up. How can I fix this?
It appears that you havn't added a new line, and the game runs out of space, so to fix this, just add a new like command in the text. Like so;
What's your favorite pokemon?\lMine's Clefairy!
Hope that helped. :)

lennycharriez315
July 2nd, 2008, 01:24 AM
Does anyone have the basic wildpokemonbattle script for xse...and can you explain it a bit.including the raw and were to put the person num...or how to find the person number..but i do need the script.

nevermind the explaining just need the script....but please make sure the pokemon DISAPPEARES AFTER the battle..pleeeeeeease

robie392
July 2nd, 2008, 10:07 PM
with xse can you make it so a pokemon cant evolve like in yellow version but only for one spacifiic pokemon not the whole species the reson im asking is because I think that would be an event that you can write with xse.

Darthatron
July 2nd, 2008, 10:12 PM
with xse can you make it so a pokemon cant evolve like in yellow version but only for one spacifiic pokemon not the whole species the reson im asking is because I think that would be an event that you can write with xse.
No, you cannot add that event with a script editor. >_>

robie392
July 2nd, 2008, 10:28 PM
ok thank you for the information, but might I ask how you can do that?

lennycharriez315
July 4th, 2008, 05:51 PM
ok i got the script to the wild pokemon and to get it to work i was supposed to add the HIDESPRITE command.

and none of ya could have told me that.

tharding6
July 5th, 2008, 09:48 PM
k so i am kinda new to scripting but have the basic stuff down, like just adding a talking sprite, i am having trouble with the trainer thing though please tell me what is wrong with this:

#Dynamic 0x799999

#org @start
lock
faceplayer
trainerbattle 1 0x001
message @boo
boxset 6
release
end

#org @before
@before 1 =Check out my bugs

#org @after
@after 1 =Oh no!

#org @boo
@boo 1 =I'll get you back for this.


P.S. it comes up with an error 13 'type miss match on line 6 'trainer battle'

Line: trainerbattle 1 0x001

Darthatron
July 6th, 2008, 02:34 AM
k so i am kinda new to scripting but have the basic stuff down, like just adding a talking sprite, i am having trouble with the trainer thing though please tell me what is wrong with this:

#Dynamic 0x799999

#org @start
lock
faceplayer
trainerbattle 1 0x001
message @boo
boxset 6
release
end

#org @before
@before 1 =Check out my bugs

#org @after
@after 1 =Oh no!

#org @boo
@boo 1 =I'll get you back for this.


P.S. it comes up with an error 13 'type miss match on line 6 'trainer battle'

Line: trainerbattle 1 0x001

Open up XSE, and look in the Command Help. Now, look at the Parameters...

Parameters:
> Byte - Kind of battle.
> Word - Battle # to start.
> Word - Reserved.
> Pointer - Pointer to challenge text.
> Pointer - Pointer to defeat text.

This is what you have...

Parameters:
> Byte - 1
> Word - 0x1
> Word - ?
> Pointer - ?
> Pointer - ?

You're missing some things, right? So, let's fill in the gaps...

Parameters:
> Byte - 1
> Word - 0x1
> Word - 0x1
> Pointer - @before
> Pointer - @after

See? Much better when all the parameters are met. So now convert that back into your script, and you're done.

#Dynamic 0x799999

#org @start
lock
faceplayer
trainerbattle 1 0x1 0x1 @before @after
message @boo
boxset 6
release
end

#org @before
= Check out my bugs

#org @after
= Oh no!

#org @boo
= I'll get you back for this.

:) If you don't understand something, post it here, or PM me.

Also, you're doing the PokeScript way of messages, with XSE you don't need the "@dynamic 1" in there...

#org @before
@before 1 =Check out my bugs
Will be...
#org @before
= Check out my bugs
Etc...

tharding6
July 7th, 2008, 12:45 AM
thanks, you have been a huge help.. one more problem i am having though is i can't get the sprite to come to me to battle, like where they see you.. as soon as i put them as a trainer in Ad-map they just don't work, and the message just comes up as "CeCeCeCeCeCe..." anything you can do to help.

Thanks,
Taylor

wave-guiding riolu_08
July 8th, 2008, 10:25 AM
I'm new at script editing and I'm using XSE.
This script isn't working. Can anyone tell me why?
I'm testing for now so I can get the hang of creating Wild Pokemon events.
#dynamic 0x165858

#org @start
lock
faceplayer
message @suicune
startwildbattle 0x245 0x32 0x0
release
end

#org @suicune
= Cuuuun!
Wait, I left something out. I'll test to see if it works now. If it doesn't, I'll post back.
Nope, still doesn't work......

1KewlDude
July 8th, 2008, 11:19 AM
I'm new at script editing and I'm using XSE.
This script isn't working. Can anyone tell me why?
I'm testing for now so I can get the hang of creating Wild Pokemon events.
#dynamic 0x165858

#org @start
lock
faceplayer
message @suicune
startwildbattle 0x245 0x32 0x0
release
end

#org @suicune
= Cuuuun!
Wait, I left something out. I'll test to see if it works now. If it doesn't, I'll post back.
Nope, still doesn't work...... You missed out the 'callstd' after the message command. Here's what it should look like: #dynamic 0x165858

#org @start
lock
faceplayer
msgbox @suicune
callstd 0x2
startwildbattle 0x245 0x32 0x0
release
end

#org @suicune
= Cuuuun! You should use the 'debug' tool in XSE, it will pick up these little mistakes.

wave-guiding riolu_08
July 8th, 2008, 11:28 AM
Thanks and I'll be sure to use the debug feature more often!

The event still doesn't work.
The offset for my event is supposed to be to the left of the offset of the rival's
mailbox in Pokemon FireRed. I click on the sprite and nothing happens.
Even if I find free space(using Advance Map), the offsets generated aren't
pinpointed on the map.

poke freak 101
July 16th, 2008, 11:35 AM
whenever i do my script and try to compile it it says

unknown keyword "applymovement" at line 4

can someone help me.
i still am a newbie so if its obvious then sorry.....

hey can you do movement scripts on it?

because every time i do it says a error and when i fix them it says &ho

please help?

1KewlDude
July 16th, 2008, 01:38 PM
whenever i do my script and try to compile it it says

unknown keyword "applymovement" at line 4

can someone help me.
i still am a newbie so if its obvious then sorry.....

hey can you do movement scripts on it?

because every time i do it says a error and when i fix them it says &ho

please help?It would really helpful if you posted the script...

Darthatron
July 16th, 2008, 07:38 PM
whenever i do my script and try to compile it it says

unknown keyword "applymovement" at line 4

can someone help me.
i still am a newbie so if its obvious then sorry.....

hey can you do movement scripts on it?

because every time i do it says a error and when i fix them it says &ho

please help?

Please post the script, so we can help you.

Tyrantrum
July 16th, 2008, 07:47 PM
Um, I'm kind of waiting for a full XSE tut to come out, but, what would a give Pokemon script look like?
Also, the script is long.
How would I make it so that someone talks first, gives u the pokemon, then talks some more?
Also, the sound when ur given something?
Sry, I'm still a little new to scripting.

Ryousha
July 16th, 2008, 07:53 PM
#Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
Message @Speak
checkflag 0x200
#include stdpoke.rbh
givepokemon PKMN_SNEASAL 0x5 0x0 0x0 0x0 0x0
BoxSet 0x6
setflag 0x200
Release
End

#ORG @Speak
= There's a note attached!\n Dear [player],\pI known you since you were 6,\nI got this for your b-day.
= Would you like to rename it?

Like that. Don't steal, this is for my hack. :)

also i think mine has a glitch, :\

KhaosKnight
July 16th, 2008, 07:57 PM
Um, I'm kind of waiting for a full XSE tut to come out, but, what would a give Pokemon script look like?
Also, the script is long.
How would I make it so that someone talks first, gives u the pokemon, then talks some more?
Also, the sound when ur given something?
Sry, I'm still a little new to scripting.



#Dynamic 0x800000

#org @main
lock
faceplayer
checkflag 0x200
if 0x1 goto @end
msgbox @msg1
boxset6
givepokemon 0x4 0x5 0x0
msgbox @msg2
boxset 6
setflag 0x200
release
end

#org @end
msgbox @msg3
boxset 6
release
end

#org @msg1
= Here, take this pokemon

#org @msg2
= Take good care of it

#org @msg3
= how is my pokemon doing?



there is a basic cut n' dry give pokemon script(it will give you a lv 5 charmander)
[givepokemon] this tell the script to give a pokemon (duh :D)
[0x4] 4 is charmanders number
[0x5] this one is the pkmns level
[0x0] is the value, just use 0, im not 100% percent on what this does, but i know it wont work without it )

for a more detailed givepokemon script check here (http://www.pokecommunity.com/showthread.php?t=128887)

Ryousha
July 16th, 2008, 07:59 PM
meh, you're more advanced than me, (still learning.)

KhaosKnight
July 16th, 2008, 08:02 PM
#Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
Message @Speak
checkflag 0x200
#include stdpoke.rbh
givepokemon PKMN_SNEASAL 0x5 0x0 0x0 0x0 0x0
BoxSet 0x6
setflag 0x200
Release
End

#ORG @Speak
= There's a note attached!\n Dear [player],\pI known you since you were 6,\nI got this for your b-day.
= Would you like to rename it?

Like that. Don't steal, this is for my hack. :)

also i think mine has a glitch, :\


i think so too, you have flags set but for no reason, there is no B_true or 0x1 line(or B_false 0x0)

But i have never seen a script like that before, especialy the "#stdpoke" thing

Tyrantrum
July 16th, 2008, 08:06 PM
Will it always be checkflag 0x200 and setflag 0x200?

Ryousha
July 16th, 2008, 08:08 PM
Will it always be checkflag 0x200 and setflag 0x200?

No that's just the ID,

but 200 is commonly used,

i think so too, you have flags set but for no reason, there is no B_true or 0x1 line(or B_false 0x0)

But i have never seen a script like that before, especialy the "#stdpoke" thing


Can you try scripting it for me?

I can try to learn from there of yours skill

Tyrantrum
July 16th, 2008, 08:13 PM
Should I always use checkflag and setflag 0x200?
I never understand these. :(

KhaosKnight
July 16th, 2008, 08:14 PM
Can you try scripting it for me?

I can try to learn from there of yours skill

Sorry but no, i am a major nOOb when it comes to scripting, when i get stuck(which happens alot) Dshayabusa helps me(alot)

i just know some of the basics, and i have my own hack to...hack, sorry Ryousha but i cant this time

Should I always use checkflag and setflag 0x200?
I never understand these. :(

give this a read Eveon



THIS WAS TAKEN FROM THEx4's SCRIPTING TUTORIAL, credit goes to THEx4

Before I continue. I'm going to just add something on flags.
Flags are very useful when you need an event to only occur once or if you want a person to disappear.
We can set a flag, and if we want an overworld, to dissappear we have to assign the set flag to the OW's, people ID in advancemap. But I'll go into more detail on that later.
Many flags are used within the game already. So if you plan on leaving scripts that are already in the rom, you'll need to be more careful on what flags you use, because flags can only really be used once.
If you want some flags that are not used in the rom as a start, here's a few. 0x200 - 0x29F, 500-79F, 1000-109F. But you'll find more if you experiment with them.

I'll have to do a bit of explaining here, so I'll start with preventing events to happen.


#org $start
lock
faceplayer
checkflag 0x200
if b_true goto $done
message $1
boxset 6
setflag 0x200
release
end

#org $done
message $2
boxset 6
clearflag 0x200
release
end


We've already covered lock and faceplayer, so we'll go to checkflag.
checkflag checks if a flag has been set. Checkflag is usually followed by an if line.
When using the if line after checkflag it contains either a b_true or b_false. b_true, meaning, that if the flag is set goto ${pointer}, and if not it will continue with the script. Similiarly, b_false checks if the flag is NOT set, and if it isn't it will goto ${pointer}, and if the flag is set, the script will continue without going to the pointer.
This pointer used in if b_true goto $done it points to another part of the script as you can see in the script.

As you can see the if b_true goto $done points to a different part of a script as shown with the #org $done
Here we have a message and a new command, clearflag.
Once flags are set they can be "unset" with the command clearflag.
Clearflag has to be followed by the flag number.
And here we are at the end of the script.

But there is more than one way to use a flag. Some flags have some sort of game function. I'll explain that in the next part.


Remember this tutorial(THEx4's) is for pokescript, you will need to change the $ to @ when using XSE, other than that everything else is pretty much the same

JackTheRipper
July 18th, 2008, 06:11 AM
I'm seriously about to lose my head.
I'm so frustrated that i have to search so endlessly for tutorials and information!!
I wish someone would help me!
I made a ROM hack of Leaf Green with Advance Map, Advance Text, Advance Starter, Overworld Editor, XSE, and FSF. When i test my ROM, it always starts out with "The save file is corrupted blah blah" and i can't get rid of that. If i press continue then it goes to a dark red screen. If i press new game then it puts me through the PROF. OAK lecture stuff(which i've been searching to figure out how to change what PROF. OAK says!) and then when i go out of my house it is a black screen and i can't do anything.
And here's the best part.............this all started happening when i tried to put my script from XSE on the game. The compile button that you said to click does not let me click it so i went to batched compiler or something and did it that way and took one of the 2 offsets that it gave me and put it on a sprite that i made from scratch and so now i can't even play my ROM and i feel like giving up and deleting everything!!!!
SOMEONE HELP ME!
................

Ryousha
July 18th, 2008, 06:26 AM
I'm seriously about to lose my head.
I'm so frustrated that i have to search so endlessly for tutorials and information!!
I wish someone would help me!
I made a ROM hack of Leaf Green with Advance Map, Advance Text, Advance Starter, Overworld Editor, XSE, and FSF. When i test my ROM, it always starts out with "The save file is corrupted blah blah" and i can't get rid of that. If i press continue then it goes to a dark red screen. If i press new game then it puts me through the PROF. OAK lecture stuff(which i've been searching to figure out how to change what PROF. OAK says!) and then when i go out of my house it is a black screen and i can't do anything.
And here's the best part.............this all started happening when i tried to put my script from XSE on the game. The compile button that you said to click does not let me click it so i went to batched compiler or something and did it that way and took one of the 2 offsets that it gave me and put it on a sprite that i made from scratch and so now i can't even play my ROM and i feel like giving up and deleting everything!!!!
SOMEONE HELP ME!
................

Geta new one, XSE is still unstable it may break your rom, get used to it.

Theres a reason called:Backs up ;)

Darthatron
July 18th, 2008, 06:32 AM
I'm seriously about to lose my head.
I'm so frustrated that i have to search so endlessly for tutorials and information!!
I wish someone would help me!
I made a ROM hack of Leaf Green with Advance Map, Advance Text, Advance Starter, Overworld Editor, XSE, and FSF. When i test my ROM, it always starts out with "The save file is corrupted blah blah" and i can't get rid of that. If i press continue then it goes to a dark red screen. If i press new game then it puts me through the PROF. OAK lecture stuff(which i've been searching to figure out how to change what PROF. OAK says!) and then when i go out of my house it is a black screen and i can't do anything.
And here's the best part.............this all started happening when i tried to put my script from XSE on the game. The compile button that you said to click does not let me click it so i went to batched compiler or something and did it that way and took one of the 2 offsets that it gave me and put it on a sprite that i made from scratch and so now i can't even play my ROM and i feel like giving up and deleting everything!!!!
SOMEONE HELP ME!
................
Change your Save Type to 128kb, from 64kb. :)
Geta new one, XSE is still unstable it may break your rom, get used to it.

Theres a reason called:Backs up ;)
XSE is much more stable than any other script editor, and it shouldn't screw up your ROM. :P

But still, BACK UP!

Ryousha
July 18th, 2008, 06:34 AM
Change your Save Type to 128kb, from 64kb. :)

XSE is much more stable than any other script editor, and it shouldn't screw up your ROM. :P

But still, BACK UP!

Yeah Back Up

also XSE does break my rom once in a millenium years day

JackTheRipper
July 18th, 2008, 07:07 AM
What do you mean "Change your Save Type to 128kb, from 64kb."??
On AdvanceMap? or in the game saves?
From my knowledge, i don't even think you CAN save the game on an emulator...can you?
This is all so confusing.
I just want to make my ROM but there's so many errors, bugs, glitches, problems, issues!!!!!!!!! GOD....

Ah.
I changed it and it got rid of the corruption message but my game still blinks different colors varying from red to green to brown to black whenever i step out of my house. And another problem is that i want to be able to edit the message about "you are about to embark on ..blehbleh.." and i want to be able to edit what Oak says in the beginning also. I can't find either of those two things....

Hello???
Can someone help me?!

I'm just going to delete my ROM.
I have to since no one on this careless board will help and if they will, i don't know where the frick to go.

Darthatron
July 18th, 2008, 08:49 PM
What do you mean "Change your Save Type to 128kb, from 64kb."??
On AdvanceMap? or in the game saves?
From my knowledge, i don't even think you CAN save the game on an emulator...can you?
This is all so confusing.
I just want to make my ROM but there's so many errors, bugs, glitches, problems, issues!!!!!!!!! GOD....

Ah.
I changed it and it got rid of the corruption message but my game still blinks different colors varying from red to green to brown to black whenever i step out of my house. And another problem is that i want to be able to edit the message about "you are about to embark on ..blehbleh.." and i want to be able to edit what Oak says in the beginning also. I can't find either of those two things....

Hello???
Can someone help me?!

I'm just going to delete my ROM.
I have to since no one on this careless board will help and if they will, i don't know where the frick to go.
This is a scripting thread. For ROM help ask in the "Simple Questions" thread. >_<

Ooka
July 18th, 2008, 10:29 PM
#dynamic 0x719B18

#org @1
message @2
boxset 6
applymovement 0xFF @creepy
waitmovement 0x0
end

#org @2
= This place is creepy,\nwe should leave....

#org @creepy
#raw 0x00 0x1D 0xFE

So, it compiles fine, however it freezes when I step on the script :/
Question is what am I doing wrong?

(I feel like a nOOb again, even though I've been hacking for a year or so :/)

Tyrantrum
July 18th, 2008, 11:14 PM
In advance map, it has a script tile right?
In it, it has a: Unknown, var number, var value, and another unknown.
Type in these 2 only: the first unknown: 0003
And var number: 4050.

Ooka
July 18th, 2008, 11:21 PM
Well, that helped a little, however now I have this error:

http://i165.photobucket.com/albums/u54/Ooka_100/error-1.png

Tyrantrum
July 18th, 2008, 11:25 PM
Uh oh.
Well, I'm still in learning.
So, I'm sry, I thought that would help make it work. :(

dbrown123
July 19th, 2008, 11:53 AM
Im confused i no how to do it but like how do you chose wat person to give it to

ok i found out how to import it but im confused about 1 thing its about wild pokemon were do you plac it on the map do you place it on a person or do you place it like in random grass is there like any thing i have to do yo make the wild pokemon apperar

thanks for your help

second
July 20th, 2008, 09:39 AM
how do you do a wild battle script and a give pokemon script?

twi1ight
July 22nd, 2008, 04:46 PM
I have a long script I need help with I have already tried the script help thread.#dynamic 0x34EB8C
#org @getcelebi
checkflag 0x828
if 0x0 goto @continue
if 0x1 goto @continue1
release
end
#org @continue
msgbox @help
boxset 0x6
applymovement 0xFF @hurry
waitmovement 0x0
msgbox @idk
boxset 0x6
applymovement 0x05 @kick
waitmovement 0x0
msgbox @udono
boxset 0x6
applymovement 0x06 @4argument1
applymovement 0x07 @4argument11
waitmovement 0x0
msgbox @argument1
boxset 6
applymovement 0x06 @lookdown
applymovement 0x07 @lookdown
waitmovement 0x0
applymovement 0x03 @look
waitmovement 0x0
msgbox @othnkgd
boxset 0x6
givepokemon 0x251 0x5 0x0 0x0 0x0 0x0
setflag 0x828
applymovement 0x05 @2me
applymovement 0x03 @outofway
waitmovement 0x0
trainerbattle 0x1 0x146 0x0 @hah @darn
goto @finish
end
#org @continue1
checktrainerflag 0x146
if 0x0 goto @continue2
if 0x1 goto @done
end
#org @continue2
applymovement 0xFF @hurry
waitmovement 0x0
msgbox @urback
boxset 0x06
applymovement 0x05 @2me
applymovement 0x03 @outofway
waitmovement 0x0
trainerbattle 0x1 0x146 0x0 @heh @darn
goto @finish
end
#org @done
release
end
#org @help
=Somebody Help!
#org @hurry
#raw 0x20
#raw 0x20
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0xFE
#org @idk
=Alder:I don't know what your \ntalking about.\p???SILENCE!
#org @kick
#raw 0x1D
#raw 0x32
#raw 0xFE
#org @udono
=???:You know very well what We're\ntalking about!\pGive me the Celebi!
#org @4argument1
#raw 0x03
#raw 0xFE
#org @4argument11
#raw 0x02
#raw 0xFE
#org @argument1
=???:NO give it to me! \nNo me! \pBoth of you SHUT UP!! \p...\p...\pWe'll talk it over with the \nbosses later.
#org @lookdown
#raw 0x00
#raw 0xFE
#org @look
#raw 0x30 0x2F 0x2D 0x62 0xFE
#org @othnkgd
=Oh \v\h01! \nI am so glad you're here.\nTake this you are probably \nbetter at battling than I am.\p???:I'll battle him!\p???:NO ME! \???:I'm gonna battle him...ect.
#org @2me
#raw 0x10
#raw 0x10
#raw 0xFE
#org @outofway
#raw 0x12
#raw 0xFE
#org @hah
=I'll be your oppponent!
#org @darn
=It seems you are better than me.
#org @urback
=Thank you for coming back!
#org @heh
=???:I wanted to battle\nhim this time.\p???:Ya me too. \p???:Too bad!
#org @finish
msgbox @notovryt
boxset 0x6
fadescreen 0x1
setflag 0x200
hidesprite 0x03
setflag 0x201
hidesprite 0x06
setflag 0x202
hidesprite 0x07
fadescreen 0x0
msgbox @thnx
boxset 0x6
fadescreen 0x1
warp 0x4 0x3 0x0 0x6 0x4
fadescreen 0x0
release
end
#org @notovryt
=THIS ISNT THE END!! ???:Thats right. ???:Yep
#org @thnx
=\v\h01 thank you so much\nfor coming.\nIf you hadn't he would have gotten\nthe CELEBI.\pTo reward you I have \na present back at the\nlab for you.\pCom'on.
Thnx :D

0m3GA ARS3NAL
July 23rd, 2008, 01:21 AM
PEOPLE! This is not the script help thread! If you need script help, go HERE! (http://www.pokecommunity.com/showthread.php?t=120081)
Seriously, I dont want such a great thread being locked down, keep it on topic please. (Also, this Tutorial is great darthatron, I looked it over, and you helped me understand a bit more about XSE, I am still waiting for Hackmew's full tutorial though, but thanks for this, it has helped me!)

[HoN] Jereziah
July 23rd, 2008, 01:24 AM
Wow!
Nice XSE Scripting Tuts yah got there Darth!
.....
Thanks for this tut

twi1ight
July 23rd, 2008, 08:11 AM
i did go to the script help thread and nobody is giving me help!

0m3GA ARS3NAL
July 23rd, 2008, 09:17 AM
i did go to the script help thread and nobody is giving me help!

It happens, but you cant just post it here, you wont get help. If nobody answers your post after a few posts, ask nicely again, if that doesn't work, PM me your script and the problem, I'll see what I can do, but ONLY PM me if you have already tried the Script help thread a few times. (I know how hard it is, I have asked for some help in there before, and I get nothing, usually, I am lucky to get a response, but please try to keep your scripts in the script help tread. (There are more than one if you search for them, just dont accidentally revive an old thread, cuz that is against the rules)

twi1ight
July 23rd, 2008, 03:39 PM
It happens, but you cant just post it here, you wont get help. If nobody answers your post after a few posts, ask nicely again, if that doesn't work, PM me your script and the problem, I'll see what I can do, but ONLY PM me if you have already tried the Script help thread a few times. (I know how hard it is, I have asked for some help in there before, and I get nothing, usually, I am lucky to get a response, but please try to keep your scripts in the script help tread. (There are more than one if you search for them, just dont accidentally revive an old thread, cuz that is against the rules)
ok i'll try again. *sigh* :(

dbrown123
July 23rd, 2008, 05:28 PM
i found out that there are #s that after a batlle with a legendary they dissaper. i no theres a way to do it in the game so does anyone no the numbers that make the pokemon like kyorger to dissaper after the battle

OutOfOrder
August 15th, 2008, 12:31 AM
Well seeing as you are one of the people who have made a XSE guide, i was wondering if you knew how to make a trainer battle script and how to make a wild battle script.


I have looked through this thread and none of these scripts work on and EMERALD rom... so i was wondering if someone knows what the script for a EMERALD ROM would be for the trainer battle and the wild battle.


Thanks!

Semblance
August 15th, 2008, 07:19 PM
'-----------------------
#Dynamic 0x800000

#org 0x800000
lock
faceplayer
checkflag 0x200
if B_true goto @gotit
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
setflag 0x200
release
end

#ORG @gotit
message @speak
release
end

#ORG @recived
= Take this!

#ORG @speak

= How's Squirtle doing?

Can someone tell me whats wrong with this script?
The person doesn't talk, and whenever I try to talk to him the givepokemon repeats...
I think you forgot the if B-False goto @recived
right now in your script theres no pointer to recived

Does anyone get weird dots on the start menu after the input a code into the ROM?

M O M U S U
August 28th, 2008, 05:53 PM
Ok, how do you make a wild battle script? Like, you talk to a Mew on the map and it initiates the legendary battle, with a Mew cry and legendary battle music and everything.

I've tried using Pokescript and changing it to XSE, but that doesn't work.

It says "unknown keyword at line _", then it says that lock, faceplayer, etc. are unknown keywords.

Help please? I'm desperate here.

Ineffable~
September 14th, 2008, 01:14 PM
Here's my script:

#Dynamic 0x1DCBF8

#ORG @Wow!
Lock
FacePlayer
Message @Speak
BoxSet 0x6
Release
End
#ORG @Speak
= This is a message!

When I click compile, it says, "No dynamic start offset specified."
I copied and pasted the code straight from your thread, so I couldn't
have typed something wrong... What's going on?!

machomuu
September 14th, 2008, 02:09 PM
Wow, when I first heard about this, I thought it seemed to complicated, however, When I tried it I found it wasn't all that hard and actally pretty good, plus, I can still use pokescript, which makes this even better, nice one Mew :D!!

HackMew
September 15th, 2008, 01:35 AM
Ok, how do you make a wild battle script? Like, you talk to a Mew on the map and it initiates the legendary battle, with a Mew cry and legendary battle music and everything.

I've tried using Pokescript and changing it to XSE, but that doesn't work.

It says "unknown keyword at line _", then it says that lock, faceplayer, etc. are unknown keywords.

Help please? I'm desperate here.

Do you mind showing use the script you tried to compile? That would sure help.


Here's my script:

#Dynamic 0x1DCBF8

#ORG @Wow!
Lock
FacePlayer
Message @Speak
BoxSet 0x6
Release
End
#ORG @Speak
= This is a message!

When I click compile, it says, "No dynamic start offset specified."
I copied and pasted the code straight from your thread, so I couldn't
have typed something wrong... What's going on?!

Are you sure you're using latest version of XSE (http://www.pokecommunity.com/showthread.php?t=85025#XSE)?

jin14
September 19th, 2008, 06:12 AM
sorry what is wrong in this script:
#dynamic 0x877554
#org @start
lock
faceplayer
applymovement 0x15 @lino
waitmovement 0x15
message @trino
boxset 6
pause 0x30
release
end


#org @lino
#raw 1
#raw 0
#raw 1
#raw FE

#org @trino
= Ciao.

SOMEBODY CAN ANSWER MY QUESTIONS WHY THESE SCRIPT DON'T GO?
PLEASE HELP ME!

Hiche..
September 19th, 2008, 12:32 PM
sorry what is wrong in this script:
#dynamic 0x877554
#org @start
lock
faceplayer
applymovement 0x15 @lino
waitmovement 0x15
message @trino
boxset 6
pause 0x30
release
end


#org @lino
#raw 1
#raw 0
#raw 1
#raw FE

#org @trino
= Ciao.

SOMEBODY CAN ANSWER MY QUESTIONS WHY THESE SCRIPT DON'T GO?
PLEASE HELP ME!

Try this:


#dynamic 0x877554

#org @start
lock
faceplayer
applymovement 0x0F @lino
waitmovement 0
message @trino
boxset 6
release
end

#org @lino
#raw(enter movements here)
#raw 0xFE

#org @trino
= Ciao.


If you want to know proper movements, go to: http://pokehacks.dabomstew.com/index.php?token=srmovements
Just add #raw then the movement(s).

jin14
September 20th, 2008, 04:22 AM
thank's now i try and i hope that it go!

this is correct?
#dynamic 0x877569

#org @start
lock
faceplayer
applymovement 0x0F @lino
waitmovement 0x2
message @trino
boxset 6
release
end

#org @lino
#raw 0x1
#raw 0x1
#raw 0xFE

#org @trino
= Ciao.

these script is correct o no?

Hiche..
September 21st, 2008, 05:20 AM
thank's now i try and i hope that it go!

this is correct?
#dynamic 0x877569

#org @start
lock
faceplayer
applymovement 0x0F @lino
waitmovement 0
message @trino
boxset 6
release
end

#org @lino
#raw 0x01
#raw 0x01
#raw 0xFE

#org @trino
= Ciao.

these script is correct o no?

I just corrected some things. They are in Bold.

jin14
September 21st, 2008, 05:28 AM
ok but if i wuold that after speak paople go in another zone?

Hiche..
September 21st, 2008, 05:46 AM
ok but if i wuold that after speak paople go in another zone?

You want the person to disappear?
Try using hidesprite 0x0F or #raw 0x60.


#dynamic 0x877569

#org @start
lock
faceplayer
applymovement 0x0F @lino
waitmovement 0
message @trino
boxset 6
hidesprite 0x0F
setflag 0x212
release
end

#org @lino
#raw 0x60
#raw 0xFE

#org @trino
= Ciao.


In advance map, put the people ID of the person: 212.

Shadows
September 21st, 2008, 06:03 AM
Okay, just to clear this out, this is not the script help thread...
THIS IS (http://www.pokecommunity.com/showthread.php?t=120081)
if you post a script here, don't expect to get help anymore...

Darthatron
September 21st, 2008, 06:30 AM
Okay, just to clear this out, this is not the script help thread...
THIS IS (http://www.pokecommunity.com/showthread.php?t=120081)
if you post a script here, don't expect to get help anymore...

Okay, just to clear this out, this is not the back seat moderating thread...
THIS IS
Oh... wait... that thread doesn't exist.
_________________________

Keep posting here if you need help. >_>

Chimchar 9
September 22nd, 2008, 07:48 AM
could you update this thread please because it will be helpful to me and the other user's here
well nice tutorial

Platinum Lucario
September 24th, 2008, 11:18 AM
could you update this thread please because it will be helpful to me and the other user's here
well nice tutorial
Well I think there is other tutorials on scripting, you should check them out! ;)

durenloveanju
September 25th, 2008, 10:33 PM
Thank you, You are help me.

bittenka
September 27th, 2008, 12:26 PM
Just tell how is the give pokemon script in XSE

Hiche..
September 27th, 2008, 12:33 PM
Just tell how is the give pokemon script in XSE

givepokemon 0x<pokemon number in hex> 0x<pokemon level> 0x<item held> 0x0 0x0 0x0

For example:

givepokemon 0x25 0x5 0x13 0x0 0x0 0x0

It's giving you a level 5 vulpix. It's carrying Potion.

bittenka
September 27th, 2008, 03:32 PM
thanks, i already done it! :)

how can make when the player pass in the script, the script run, like no clicking!
Sorry for terrible english ^^

0m3GA ARS3NAL
September 28th, 2008, 09:03 PM
thanks, i already done it! :)

how can make when the player pass in the script, the script run, like no clicking!
Sorry for terrible english ^^
Try assigning the script to a "Script" event in Advance Map, then set the first "Unknown" setting to 0300, and the "Var Number" under that to 5040

then, when the player steps on it, the script will work.

-DarK-
September 29th, 2008, 07:28 AM
Try assigning the script to a "Script" event in Advance Map, then set the first "Unknown" setting to 0300, and the "Var Number" under that to 5040

then, when the player steps on it, the script will work.

Um, isn't it 0003 instead of 0300?

Hiche..
September 29th, 2008, 07:56 AM
Um, isn't it 0003 instead of 0300?

I think both can work. It doesn't matter, like it can be: 0003, 0300, 0030.
As long the unknown doesn't remain 0000.

bittenka
September 29th, 2008, 11:54 AM
How can i ''give the pokedex'' to the player?

Hiche..
September 29th, 2008, 12:30 PM
How can i ''give the pokedex'' to the player?
For fire red, it's setflag 0x829.

If you want the national dex, do this:
setflag 0x829
special 0x16F

0m3GA ARS3NAL
September 29th, 2008, 02:01 PM
Um, isn't it 0003 instead of 0300?
Well, I learned my first scripting language from The^4's tutorial (very informative BTW) and he said to use Unknown 0300 and Var Number 5040, and it has always worked for me. and since I have yet to have a problem with it, I continue to use it.
I don't know about other variables, cause I stick with what works for me! ^-^

j_legolas
October 2nd, 2008, 06:15 AM
can anyone help me with the move script?

#dynamic 0x71B15C

#org @stop
message @better
boxset 0x6
applymovement 0xFF @back
waitmovement 0x0
end

#org @back
#raw 0x10 0xFE

#org @better
= Better take my Larvitar first.

I step on the tile and my body just froze forever.
I alr set unknown 0300 var number 5040

Hiche..
October 2nd, 2008, 06:51 AM
can anyone help me with the move script?

#dynamic 0x71B15C

#org @stop
message @better
boxset 0x6
applymovement 0xFF @back
waitmovement 0x0
end

#org @back
#raw 0x10 0xFE

#org @better
= Better take my Larvitar first.

I step on the tile and my body just froze forever.
I alr set unknown 0300 var number 5040

Try this:


#dynamic 0x71B15C

#org @stop
checkflag 0x828
if 0x1 goto @done
message @better
boxset 0x6
applymovement 0xFF @back
waitmovement 0x0
setflag 0x200
release
end

#org @done
release
end

#org @back
#raw 0x10 0xFE

#org @better
= Better take my Larvitar first.

j_legolas
October 2nd, 2008, 07:58 AM
okay thanks. the hang body thing was solved by dunno how, not by editing script.

anyway,
i used your edited script and the script just does not activate when i walk on the tile.
what's the problem now?

Thx for your help alot :D

Hiche..
October 2nd, 2008, 08:03 AM
okay thanks. the hang body thing was solved by dunno how, not by editing script.

anyway,
i used your edited script and the script just does not activate when i walk on the tile.
what's the problem now?

Thx for your help a lot :D

Did you put the unknown: 0003
and the varnumber: 5040

j_legolas
October 2nd, 2008, 08:07 AM
YES i've tried:
0300 5040
0003 5040

i also tried 4050 instead of 5040, but the script still does not activate.

Hiche..
October 2nd, 2008, 08:14 AM
Try removing the setflag 0x200.
And change the #dynamic 0x71B15C to another.
Like #dynamic 0x800000
Find another offset that holds more bytes(free space)

j_legolas
October 2nd, 2008, 02:32 PM
okay now my body freezes when i step on that tile. dang. i switched the dynamic to a 150byte space one. is that enough or shld i just go 200?

#dynamic 0x71B888

#org @stop
checkflag 0x828
if 0x1 goto @done
message @better
boxset 0x6
applymovement 0xFF @back
waitmovement 0x0
release
end

#org @done
release
end

#org @back
#raw 0x10 0xFE

#org @better
= Better take my Larvitar first.

MasterZman
October 3rd, 2008, 06:46 PM
Thanks for this i needed this info now i can do it!

opeious
October 4th, 2008, 03:41 AM
Any idea what wrong with this:-

#Dynamic 0x800000
#org @Startscript
Lock
Faceplayer
message @AskMe
boxset 0x6
giveitem 0x44 0x1 (shows error in this line)
Release
end

#ORG @AskMe
= Here have a RareCandy.

Darthatron
October 4th, 2008, 04:12 AM
Any idea what wrong with this:-

#Dynamic 0x800000
#org @Startscript
Lock
Faceplayer
message @AskMe
boxset 0x6
giveitem 0x44 0x1 (shows error in this line)
Release
end

#ORG @AskMe
= Here have a RareCandy.

You're missing the Message Type param. So, just change that line to either...
giveitem 0x44 0x1 0x0
for the message "Player obtained Rare Candy."
Or change it to...
giveitem 0x44 0x1 0x1
for the message "Player found Rare Candy."

opeious
October 4th, 2008, 04:19 AM
You're missing the Message Type param. So, just change that line to either...
giveitem 0x44 0x1 0x0for the message "Player obtained Rare Candy."
Or change it to...
giveitem 0x44 0x1 0x1for the message "Player found Rare Candy."

K ty, The compile was successful though in game the message box doesn't come and the player freezes

EDIT:We have to put the XXXXXX in #Dynamic 0xXXXXXX as the offset in Advance Map, right?

Darthatron
October 4th, 2008, 06:00 AM
K ty, The compile was successful though in game the message box doesn't come and the player freezes

EDIT:We have to put the XXXXXX in #Dynamic 0xXXXXXX as the offset in Advance Map, right?

No, when you compile a script, you should get a popup that has all the Dynamic values. You need to select the main one, copy it. That's the value you need to put in AMap.

http://img253.imageshack.us/img253/6503/55770717of3.png

HackMew
October 4th, 2008, 07:28 AM
And change the #dynamic 0x71B15C to another.
Like #dynamic 0x800000
Find another offset that holds more bytes(free space)

Wrong. There's no real need to change the #dynamic offset since XSE would scan the whole ROM, starting from its value.
Finding free space is XSE's job, not yours.
The only reason to change the #dynamic offset would be to speed up the free space research.
But speed gains aren't going to be dramatic anyway (especially with the coming updated version).

Hiche..
October 4th, 2008, 07:37 AM
Wrong. There's no real need to change the #dynamic offset since XSE would scan the whole ROM, starting from its value.
Finding free space is XSE's job, not yours.
The only reason to change the #dynamic offset would be to speed up the free space research.
But speed gains aren't going to be dramatic anyway (especially with the coming updated version).

Thanks for clearing that.
I have a question, in XSE and I think PKSV, I saw a command called loadbytefrompointer, and writebytetooffset.
What are the job of these two?
Does it have to do with the RAM thing of the rom?

Daniel A.
October 5th, 2008, 07:12 AM
I have a question, How do I assign a person to say the text? like once we compile it, where is the script offset so we can add it advance map?

EDIT:

YES YES YES YES!!
SCRIPTING FINALLY WORKSS!!!

I'm GONNA FALL IN LOVE!
JEEZ, THANKS!!! SO MUCH!!

Darthatron
October 5th, 2008, 07:37 PM
I have a question, How do I assign a person to say the text? like once we compile it, where is the script offset so we can add it advance map?

EDIT:

YES YES YES YES!!
SCRIPTING FINALLY WORKSS!!!

I'm GONNA FALL IN LOVE!
JEEZ, THANKS!!! SO MUCH!!

Does that mean I don't need to answer your question...? D: Because I posted the answer like 3 posts up. >_>

torferno lvl-X
October 6th, 2008, 08:30 AM
Nice tut i'll use it to help me

HackMew
October 8th, 2008, 04:30 AM
Thanks for clearing that.
I have a question, in XSE and I think PKSV, I saw a command called loadbytefrompointer, and writebytetooffset.
What are the job of these two?
Does it have to do with the RAM thing of the rom?

Yes, they do have to do with the "RAM thing" of the ROM.
In particular, writebytetooffset will write a byte to a specific offset into RAM memory.
loadbytefrompointer will get a byte from a pointer and load it in the specified memory bank instead.
Needless to say you're not really going to use them under normal circumstances.

nick11202
October 8th, 2008, 11:52 AM
once again hackmew makes another great thing

hot_kage
October 12th, 2008, 11:49 AM
once again hackmew makes another great thing
i know XSE to me is much better than pokescript

Lady Berlitz
October 13th, 2008, 05:47 PM
This is a quite useful tutorial. It doesn't give much away, but basics can be very useful.

I'm just curious, but what boxset is a signpost message?
That's a pretty basic question. I've never scripted much in the past.

Darthatron
October 13th, 2008, 05:55 PM
This is a quite useful tutorial. It doesn't give much away, but basics can be very useful.

I'm just curious, but what boxset is a signpost message?
That's a pretty basic question. I've never scripted much in the past.
BoxSet 0x3

That is the signpost boxset. ^^

Lady Berlitz
October 13th, 2008, 06:08 PM
Thanks. Strangely, I figured that out before you even answered...

Also, have any commands, such as the "START" icon or smileys, been discovered yet?

Darthatron
October 13th, 2008, 06:43 PM
Thanks. Strangely, I figured that out before you even answered...

Also, have any commands, such as the "START" icon or smileys, been discovered yet?

Yes, check out this thread. It's really helpful. ^^

http://www.pokecommunity.com/showthread.php?t=143521

Lady Berlitz
October 14th, 2008, 12:51 PM
Hello there, I have another question. Sorry for the bother.

I wrote a tiny script, and I put this: "text".
The problem is, the first " is the sprites used for the ending ", if you know what I mean.

I found this:B1="
B2=["]
But I don't really understand it.

Narcissus Secret
October 18th, 2008, 12:18 PM
I can not compile my script. It says the that word 'lock' is unknown.

Ryousha
October 19th, 2008, 03:58 PM
Hey Darthatron. What's the codes for the pointy arrows?

to show where they go?

HackMew
October 20th, 2008, 02:23 AM
Hello there, I have another question. Sorry for the bother.

I wrote a tiny script, and I put this: "text".
The problem is, the first " is the sprites used for the ending ", if you know what I mean.

I found this:
But I don't really understand it.

Here's an example directly taken from the original games:


#org 0x18DC47
= ["]The lovely and sweet\nCLEFAIRY"


Hey Darthatron. What's the codes for the pointy arrows?

to show where they go?

I think you're talking about [U], [D], [L] and [R], aren't you?

Edit: That "u" should be "U" instead. The forum recognized it as the underline tag.

0m3GA ARS3NAL
October 21st, 2008, 11:57 PM
Does anybody have any information on the release of the XSE total guide? (The one that is currently released with XSE is quite small... I desire a more... informative updated version.)
I only want to know a release date, so I can mark my calendar! ^_^ Or even a preview version. (Cant blame a guy for asking right?)

Also, does anyone know the numbers for the XSE command in emerald,
registernav. I would like to know what the different trainer numbers would be...

HackMew
October 22nd, 2008, 12:50 PM
Does anybody have any information on the release of the XSE total guide? (The one that is currently released with XSE is quite small... I desire a more... informative updated version.)
I only want to know a release date, so I can mark my calendar! ^_^ Or even a preview version. (Cant blame a guy for asking right?)

Also, does anyone know the numbers for the XSE command in emerald,
registernav. I would like to know what the different trainer numbers would be...

Yes, I do. The guide is going on pretty good.
Since the guide is strictly connected to XSE, I'm not able to give you any possible release date so far.

Talking about registernav, there's no reason why the different trainer numbers should be different from the ones used by trainerbattle, for example.

cyberblade
October 22nd, 2008, 06:49 PM
I did exactly what the tutoriaal said for a basic talking script and when i talk to the guy it makes VBA turn to a red screen heres the script

#Dynamic 0x34EB8C

#ORG @Main
Lock
FacePlayer
Message @Speak
BoxSet 0x6
Release
End

#ORG @Speak
= Lets GO! /nHaha your slow.

Any help would be very much appreciated.

Darthatron
October 22nd, 2008, 07:05 PM
I did exactly what the tutoriaal said for a basic talking script and when i talk to the guy it makes VBA turn to a red screen heres the script

#Dynamic 0x34EB8C

#ORG @Main
Lock
FacePlayer
Message @Speak
BoxSet 0x6
Release
End

#ORG @Speak
= Lets GO! /nHaha your slow.

Any help would be very much appreciated.

It would seem your ROM is corrupt. Try putting the script into a new offset, and if it still happens, then you'll need to start again (unless you have back ups).

0m3GA ARS3NAL
October 23rd, 2008, 12:26 AM
Yes, I do. The guide is going on pretty good.
Since the guide is strictly connected to XSE, I'm not able to give you any possible release date so far.

Talking about registernav, there's no reason why the different trainer numbers should be different from the ones used by trainerbattle, for example.
Oh... thanks Hackmew for the information... I dont know why I never though of that... heh, and I am glad to hear that the guide is going well! I cant wait to read it! ^_^

Spherical Ice
October 23rd, 2008, 12:35 AM
I did exactly what the tutoriaal said for a basic talking script and when i talk to the guy it makes VBA turn to a red screen heres the script

#Dynamic 0x34EB8C

#ORG @Main
Lock
FacePlayer
Message @Speak
BoxSet 0x6
Release
End

#ORG @Speak
= Lets GO! /nHaha your slow.

Any help would be very much appreciated.
Wouldn't this work:


#dynamic 0x34EB8C

#org @start
lock
faceplayer
message @speak
boxset 0x6
release
end

#org @speak
= Lets GO!\p[\b]Hahaha![B]\nYou're slow!

Just copy and paste that and try it out!
Edits in bold (not the decapitalization). Also, no need to do:
BoxSet 0x6
Just do:
boxset 0x6
Or even go Dec:
boxset 6

And the such - basically, no need for caps unless it's LASTRESULT and a couple of other comnands.

Hope I helped.

Also, thanks Dartharon! Your (and I'm speaking quite late, now, but) tutorial was the first one clear enough for me to understand the compilation system on XSE and also how a message box works. Now I rely on my notepad infront of me! Thanks! (But, I have to admit, it's kinda short...)

cyberblade
October 23rd, 2008, 02:04 AM
Zaangoose (http://www.pokecommunity.com/member.php?u=67281) Now it doesn't talk when i used your corrected script. Frustrating...

エロカメ
October 23rd, 2008, 02:13 AM
Try this:
#dynamic 0x34EB8C

#org @main
lock
faceplayer
message @speak
callstd 0x6
release
end

#org @speak
= Lets GO!/nHaha your slow.

or

#dynamic 0x34EB8C

#org @main
message @speak
callstd 0x2
release
end

#org @speak
= Lets GO!/nHaha your slow.

HackMew
October 23rd, 2008, 05:19 AM
I did exactly what the tutoriaal said for a basic talking script and when i talk to the guy it makes VBA turn to a red screen heres the script

#Dynamic 0x34EB8C

#ORG @Main
Lock
FacePlayer
Message @Speak
BoxSet 0x6
Release
End

#ORG @Speak
= Lets GO! /nHaha your slow.

It's not "/n" but "\n".
Before trying anything else, try compiling this to a clean ROM:


#dynamic 0x700000

#org @main
message @speak
boxset 0x2
release
End

#org @speak
= Lets GO!\nHaha your slow.


If everything's working fine, try doing the same on your ROM.
If it worked on the clean ROM, it has to work on your ROM as well.
If it didn't, then it's mostly likely your ROM got corrupted or something.

cyberblade
October 24th, 2008, 01:15 PM
I still dont see the text when i talk to the person.

Elitomknee
October 31st, 2008, 08:48 PM
I don't get the adding to ROM part...

Darthatron
October 31st, 2008, 09:36 PM
I don't get the adding to ROM part...

Try a different guide then, because I can't explain it any better than this. :S Sorry.