PDA

View Full Version : [Tutorial] [TehTehTehTeh's] XSE Basic/Medium tutorial


~Teh Panda~
June 7th, 2008, 10:54 AM
-Outdated-
May update soon with new XSE commands etc,

[TehTehTehTeh's] XSE Basic/Medium tutorial

Table of Contents

Part 1, Dynamic's
Part 2, Basic Message
Part 3, a yes/no basic script
Part 4, Flags
Part 5, givepokemon

More to come

Part 6, specials
Part 7, movement

To start us off we need to open up XSE and have a blank script tab. Now we may start scripting

Part 1, dynamic's

At the start of any script you must place your dynamic offset to start your script.

A dynamic offset is the hexidecimal your whole script is going to rely on,
Here is how you should place it at the top of your script.


#dynamic 0x800000


800000 = Your offset, it must be an open offset. Use a free space finder to find your offsets. Advance Map has a built in one.

Part 2, A Basic Message

Now before we start remember to include your dynamic.
After this here we place a line of code that states you are making a new script.

#ORG @start

Explanations of these 2 words.

#org = the beggining of a new offset.
@start = the name of your offset, replace start with anything you want to call it.

Now if we want this event to work properly as a message from a person we must include these two lines

lock
faceplayer

Explanations of these 2 words.

lock = you cannot move while script is going
faceplayer = the person faces you

Our next step will be the actual pointer to the message. All we have to type is this...

Message @tutorial

Explanations of these 2 words.

Message = pointer to a message offset
@tutorial = once again the name of the offset, replace it with whatever your message's offsets are.

^This line of code is neccesary or your script wont ever do anything.

Next we type this to signify what kind of message it is.

boxset 6

No need to explain this, now to close of the end of this offset.


release
end


Here is what we should have so far!


#dynamic 0x800000 'or any offset there you want it to be thats open

#org @start
lock
faceplayer
Message @tutorial
boxset 6
release
end


Don't get all happy at your first XSE script yet, we still have to make your message say something.


#org @tutorial
= This is my first script!


Tada, here is the "final" script!


#dynamic 0x800000 'or any offset there you want it to be thats open

#org @start
lock
faceplayer
Message @tutorial
boxset 6
release
end

#org @tutorial
= This is my first script!


Now load your rom in XSE, and press compile. On the pop-up windo press copy, now in Adv-Map make a new person and put the offset you copied in the new person's offset box.

Tada, now we can test it out.

Part 3, is it just me or does it smell like yes/no box time?

Starting us off for a yes/no script we must still place our dynamic offset, our #org @start, and our lock and faceplayer.

You should have this to start off then.


#dynamic 0x800000

#org @start
lock
faceplayer


Now put in a new message offset pointer, and copy the rest, I will explain everything next.


message @tutorial
boxset 5
compare LASTRESULT 1
if b_true goto @yes
compare LASTRESULT 0
if b_true goto @no


We know the first line of code but what do the 5 other's mean?

Definitions

boxset 5 = yes/no box popup with message
compare LASTRESULT 1 = basically means if you pressed yes
if 1 goto @yes = they pressed yes and get reverted to a new offset, which is not a message, it cannot be yet
compare LASTRESULT 0 = basically means if you pressed no
if b_true goto @no = they pressed no and get reverted to a new offset, which is not a message, it cannot be yet


Then place a release and an end and here is what we should have so far, the basis offset point


#dynamic 0x800000

#org @start
lock
faceplayer
message @tutorial
boxset 5
compare LASTRESULT 1
if b_true goto @yes
compare LASTRESULT 0
if b_true goto @no
release
end


Now to place our offsets from the pointer's, lets start out with the messages.

Just like a basic message script and with the pointer provided.
The Message should look like this.


#org @tutorial
= Yes or no?


Now for the offset pointer's yes and no, let's start with yes.


#org @yes
message @pressyes
boxset 6
release
end


That looks familiar, well it is. you really just revert to another message or anything you want it to do! Now for no, if you think you can try it yourself dont look!


#org @no
message @pressno
boxset 6
release
end


Now to make the message's pressyes and no, simple here is what you should get with them!


#org @pressyes
= You pressed YES!

#org @pressno
= You pressed NO!



here should be your final script!


#dynamic 0x800000

#org @start
lock
faceplayer
message @tutorial
boxset 5
compare LASTRESULT 1
if b_true goto @yes
compare LASTRESULT 0
if b_true goto @no
release
end

#org @tutorial
= Yes or no?

#org @yes
message @pressyes
boxset 6
release
end

#org @no
message @pressno
boxset 6
release
end

#org @pressyes
= You pressed YES!

#org @pressno
= You pressed NO!



Chapter 4, Flags

Finally the flags tut is here.

Ok lets start off, flags are based off into 3 basics groups

setflag
checkflag
clearflag

Most of the time you don't see clearflag come up... it is needed sometimes though. You will understand how to use the flags after this!

Lets start with something way simple. Code the normal base to your script from the other parts of the tut.

#dynamic 0xOFFSET HERE

#org @start
lock
faceplayer

Now for the flags. add these lines of code

checkflag 0x200
if b_true goto @flag

This is to check if the flag 0x200 is set and if so going to @flag
Now enter a simple message line in.. whatever the message may be just add it after this. After that we will add our setflag, before that here is how far we should be in the script...

#dynamic 0xOFFSET HERE

#org @start
lock
faceplayer
checkflag 0x200
if b_true goto @flag
Message @hi
boxset 6

Now for the setflag... for flags do not use any number but the flags 200 and up and 900 and up.

Add this line of code now!


setflag 0x200


now we should have


#dynamic 0xOFFSET HERE

#org @start
lock
faceplayer
checkflag 0x200
if b_true goto @flag
Message @hi
boxset 6
setflag 0x200


Now end this part of the scrip and now add your message for hi.

Time for the @flag part. before this here is what you should have...

#dynamic 0xOFFSET HERE

#org @start
lock
faceplayer
checkflag 0x200
if b_true goto @flag
Message @hi
boxset 6
setflag 0x200
release
end

#org @hi
= Hello there.


Now after that add the #org @flag part of this part of the script.

Time for what we want the flag to go to.
Lets make it a message


#org @flag
message @woot
boxset 6
release
end

#org @woot
= What you want????


Now for the finished product!

#dynamic 0xOFFSET HERE

#org @start
lock
faceplayer
checkflag 0x200
if b_true goto @flag
Message @hi
boxset 6
setflag 0x200
release
end

#org @hi
= Hello there.

#org @flag
message @woot
boxset 6
release
end

#org @woot
= What you want????

Chapter 5, GivePokemon

The givepokemon script, a very simple one... i won't go in to as much detail as the other sections since you should now know how to add these commands.

The command itself should be Very Very self explanatory. Of course if you did not get it, it gives a pokemon!

Ok now to show you how it works.


givepokemon [Pokemon no.] [Pokemon lvl.] [item being held] 0 0 0


So here is the code for a level 5 bulbasaur holding nothing.


givepokemon 1 5 0 0 0 0


There you are, the givepokemon script. I would advise using flags if you use this script to avoid gaining infinite items

POkemon no.'s Thanks TheTheTheThe

BULBASAUR 1
IVYSAUR 2
VENUSAUR 3
CHARMANDER 4
CHARMELEON 5
CHARIZARD 6
SQUIRTLE 7
WARTORTLE 8
BLASTOISE 9
CATERPIE 10
METAPOD 11
BUTTERFREE 12
WEEDLE 13
KAKUNA 14
BEEDRILL 15
PIDGEY 16
PIDGEOTTO 17
PIDGEOT 18
RATTATA 19
RATICATE 20
SPEAROW 21
FEAROW 22
EKANS 23
ARBOK 24
PIKACHU 25
RAICHU 26
SANDSHREW 27
SANDSLASH 28
NIDORAN|w| 29
NIDORINA 30
NIDOQUEEN 31
NIDORAN|m| 32
NIDORINO 33
NIDOKING 34
CLEFAIRY 35
CLEFABLE 36
VULPIX 37
NINETALES 38
JIGGLYPUFF 39
WIGGLYTUFF 40
ZUBAT 41
GOLBAT 42
ODDISH 43
GLOOM 44
VILEPLUME 45
PARAS 46
PARASECT 47
VENONAT 48
VENOMOTH 49
DIGLETT 50
DUGTRIO 51
MEOWTH 52
PERSIAN 53
PSYDUCK 54
GOLDUCK 55
MANKEY 56
PRIMEAPE 57
GROWLITHE 58
ARCANINE 59
POLIWAG 60
POLIWHIRL 61
POLIWRATH 62
ABRA 63
KADABRA 64
ALAKAZAM 65
MACHOP 66
MACHOKE 67
MACHAMP 68
BELLSPROUT 69
WEEPINBELL 70
VICTREEBEL 71
TENTACOOL 72
TENTACRUEL 73
GEODUDE 74
GRAVELER 75
GOLEM 76
PONYTA 77
RAPIDASH 78
SLOWPOKE 79
SLOWBRO 80
MAGNEMITE 81
MAGNETON 82
FARFETCH'D 83
DODUO 84
DODRIO 85
SEEL 86
DEWGONG 87
GRIMER 88
MUK 89
SHELLDER 90
CLOYSTER 91
GASTLY 92
HAUNTER 93
GENGAR 94
ONIX 95
DROWZEE 96
HYPNO 97
KRABBY 98
KINGLER 99
VOLTORB 100
ELECTRODE 101
EXEGGCUTE 102
EXEGGUTOR 103
CUBONE 104
MAROWAK 105
HITMONLEE 106
HITMONCHAN 107
LICKITUNG 108
KOFFING 109
WEEZING 110
RHYHORN 111
RHYDON 112
CHANSEY 113
TANGELA 114
KANGASKHAN 115
HORSEA 116
SEADRA 117
GOLDEEN 118
SEAKING 119
STARYU 120
STARMIE 121
MR. MIME 122
SCYTHER 123
JYNX 124
ELECTABUZZ 125
MAGMAR 126
PINSIR 127
TAUROS 128
MAGIKARP 129
GYARADOS 130
LAPRAS 131
DITTO 132
EEVEE 133
VAPOREON 134
JOLTEON 135
FLAREON 136
PORYGON 137
OMANYTE 138
OMASTAR 139
KABUTO 140
KABUTOPS 141
AERODACTYL 142
SNORLAX 143
ARTICUNO 144
ZAPDOS 145
MOLTRES 146
DRATINI 147
DRAGONAIR 148
DRAGONITE 149
MEWTWO 150
MEW 151
CHIKORITA 152
BAYLEEF 153
MEGANIUM 154
CYNDAQUIL 155
QUILAVA 156
TYPHLOSION 157
TOTODILE 158
CROCONAW 159
FERALIGATR 160
SENTRET 161
FURRET 162
HOOTHOOT 163
NOCTOWL 164
LEDYBA 165
LEDIAN 166
SPINARAK 167
ARIADOS 168
CROBAT 169
CHINCHOU 170
LANTURN 171
PICHU 172
CLEFFA 173
IGGLYBUFF 174
TOGEPI 175
TOGETIC 176
NATU 177
XATU 178
MAREEP 179
FLAAFFY 180
AMPHAROS 181
BELLOSSOM 182
MARILL 183
AZUMARILL 184
SUDOWOODO 185
POLITOED 186
HOPPIP 187
SKIPLOOM 188
JUMPLUFF 189
AIPOM 190
SUNKERN 191
SUNFLORA 192
YANMA 193
WOOPER 194
QUAGSIRE 195
ESPEON 196
UMBREON 197
MURKROW 198
SLOWKING 199
MISDREAVUS 200
UNOWN 201
WOBBUFFET 202
GIRAFARIG 203
PINECO 204
FORRETRESS 205
DUNSPARCE 206
GLIGAR 207
STEELIX 208
SNUBBULL 209
GRANBULL 210
QWILFISH 211
SCIZOR 212
SHUCKLE 213
HERACROSS 214
SNEASEL 215
TEDDIURSA 216
URSARING 217
SLUGMA 218
MAGCARGO 219
SWINUB 220
PILOSWINE 221
CORSOLA 222
REMORAID 223
OCTILLERY 224
DELIBIRD 225
MANTINE 226
SKARMORY 227
HOUNDOUR 228
HOUNDOOM 229
KINGDRA 230
PHANPY 231
DONPHAN 232
PORYGON2 233
STANTLER 234
SMEARGLE 235
TYROGUE 236
HITMONTOP 237
SMOOCHUM 238
ELEKID 239
MAGBY 240
MILTANK 241
BLISSEY 242
RAIKOU 243
ENTEI 244
SUICUNE 245
LARVITAR 246
PUPITAR 247
TYRANITAR 248
LUGIA 249
HO-OH 250
CELEBI 251
TREECKO 277
GROVYLE 278
SCEPTILE 279
TORCHIC 280
COMBUSKEN 281
BLAZIKEN 282
MUDKIP 283
MARSHTOMP 284
SWAMPERT 285
POOCHYENA 286
MIGHTYENA 287
ZIGZAGOON 288
LINOONE 289
WURMPLE 290
SILCOON 291
BEAUTIFLY 292
CASCOON 293
DUSTOX 294
LOTAD 295
LOMBRE 296
LUDICOLO 297
SEEDOT 298
NUZLEAF 299
SHIFTRY 300
NINCADA 301
NINJASK 302
SHEDINJA 303
TAILLOW 304
SWELLOW 305
SHROOMISH 306
BRELOOM 307
SPINDA 308
WINGULL 309
PELIPPER 310
SURSKIT 311
MASQUERAIN 312
WAILMER 313
WAILORD 314
SKITTY 315
DELCATTY 316
KECLEON 317
BALTOY 318
CLAYDOL 319
NOSEPASS 320
TORKOAL 321
SABLEYE 322
BARBOACH 323
WHISCASH 324
LUVDISC 325
CORPHISH 326
CRAWDAUNT 327
FEEBAS 328
MILOTIC 329
CARVANHA 330
SHARPEDO 331
TRAPINCH 332
VIBRAVA 333
FLYGON 334
MAKUHITA 335
HARIYAMA 336
ELECTRIKE 337
MANECTRIC 338
NUMEL 339
CAMERUPT 340
SPHEAL 341
SEALEO 342
WALREIN 343
CACNEA 344
CACTURNE 345
SNORUNT 346
GLALIE 347
LUNATONE 348
SOLROCK 349
AZURILL 350
SPOINK 351
GRUMPIG 352
PLUSLE 353
MINUN 354
MAWILE 355
MEDITITE 356
MEDICHAM 357
SWABLU 358
ALTARIA 359
WYNAUT 360
DUSKULL 361
DUSCLOPS 362
ROSELIA 363
SLAKOTH 364
VIGOROTH 365
SLAKING 366
GULPIN 367
SWALOT 368
TROPIUS 369
WHISMUR 370
LOUDRED 371
EXPLOUD 372
CLAMPERL 373
HUNTAIL 374
GOREBYSS 375
ABSOL 376
SHUPPET 377
BANETTE 378
SEVIPER 379
ZANGOOSE 380
RELICANTH 381
ARON 382
LAIRON 383
AGGRON 384
CASTFORM 385
VOLBEAT 386
ILLUMISE 387
LILEEP 388
CRADILY 389
ANORITH 390
ARMALDO 391
RALTS 392
KIRLIA 393
GARDEVOIR 394
BAGON 395
SHELGON 396
SALAMENCE 397
BELDUM 398
METANG 399
METAGROSS 400
REGIROCK 401
REGICE 402
REGISTEEL 403
KYOGRE 404
GROUDON 405
RAYQUAZA 406
LATIAS 407
LATIOS 408
JIRACHI 409
DEOXYS 410
CHIMECHO 411

More to Come, parts 6, and 7!

Charliezard
June 7th, 2008, 07:17 PM
Thanks, but...now I feel like an idiot cuz yes/no is so simple n I couldn't get it. :P

Edit- With the givepokemon, what aspects of it do you plan to cover? The nickname option? Also, in the begining where you don't have the Pokemon option in the start menu, would u show how to make it add that? :P Just a question :P

Ninja Caterpie
June 7th, 2008, 08:12 PM
Hmmm...flag 0x828 opens the POKEMON menu I think...
XSE is awesome but...I'm too used to Pokescript..until some more tuts come out...I'll still be da fail...
Good work getting one up like this...hope more comes fast!

Charliezard
June 7th, 2008, 08:32 PM
Hmmm...flag 0x828 opens the POKEMON menu I think...
XSE is awesome but...I'm too used to Pokescript..until some more tuts come out...I'll still be da fail...
Good work getting one up like this...hope more comes fast!

So use setflag 0x828 when I recieve the pokemon? I'll try it :)
And haha lol I started at the perfect time...when xse was released :P

Edit- Thanks man it worked!!!!! :D

Charliezard
June 7th, 2008, 09:18 PM
Well I just read bout the yes/no and it worked fine. Didn't try any of the b_true so yeh :D...yay
I'm reading around, and they all seem pretty much the same, with slight diffrences that can be easily overcome...Least at the level I am now and the stuff I'm lookin at.

/Circa
June 7th, 2008, 09:48 PM
o.o deleted my post for some reason. I have to retype it xD

Your commands are wrong hockeypanda, you need to learn to use XSE yourself.
There is no such thing as boxset in XSE, it's callstd.

Also, theres no such thing as b_true, it is used as 0x? instead.
You need some serious revision.

This should be locked, I thought HackMew was writing up a tut.

ZodiacDaGreat
June 7th, 2008, 09:53 PM
o.o deleted my post for some reason. I have to retype it xD

Your commands are wrong hockeypanda, you need to learn to use XSE yourself.
There is no such thing as boxset in XSE, it's callstd.

Also, theres no such thing as b_true, it is used as 0x? instead.
You need some serious revision.

What the? Of course there's boxset - all those callstd that is used alongside message is boxset.

here:

#define BOXSET_OBTAIN 0x0
#define BOXSET_FIND 0x1
#define BOXSET_STANDARD 0x2
#define BOXSET_SIGNPOST 0x3
#define BOXSET_DONTCLOSE 0x4
#define BOXSET_YESNO 0x5
#define BOXSET_NORMAL 0x6
The define is for people who use boxset over callstd.

And the b_true thingy-it is included for all noobs. check the std.rbh or something.

@hockeypanda - no offense or something - this is like the 60th scripting tut. Ok, this goes for the rest, there's really no need for a lot of scripting tuts, a gigantic version is coming.

xqnp7
June 8th, 2008, 01:13 AM
While HackMew is making a tutorial, is it so wrong for some people to make basic tutorials beforehand so people can at least learn a little before tutorial arrives? The tutorial will be massive, so it's not like it'll be here tomorrow.

I liked the tutorial. I'm new to scripting myself, and this goes into Yes/No messages, unlike Darthatron's.

ZodiacDaGreat
June 8th, 2008, 01:24 AM
While HackMew is making a tutorial, is it so wrong for some people to make basic tutorials beforehand so people can at least learn a little before tutorial arrives? The tutorial will be massive, so it's not like it'll be here tomorrow.

I liked the tutorial. I'm new to scripting myself, and this goes into Yes/No messages, unlike Darthatron's.
It's not wrong - yes, I agree, I know what its like to wait, but its not like there aren't any tuts on scripting - there are loads. Why don't you use those(ever heard of waste of space) all you've got to do is replace all $ with @. As for other commands that aren't covered check the command database, once you know one or two commands the rest are cake - just need some practice ;)

Darthatron
June 8th, 2008, 01:50 AM
It's not wrong - yes, I agree, I know what its like to wait, but its not like there aren't any tuts on scripting - there are loads. Why don't you use those(ever heard of waste of space) all you've got to do is replace all $ with @. As for other commands that aren't covered check the command database, once you know one or two commands the rest are cake - just need some practice ;)

I totally agree with you, hence why my short tutorial only explains the very basics. :P

Anyway, it's just the same as every other tutorial, but thanks I guess... Someone might use it.

xqnp7
June 8th, 2008, 03:38 AM
From what I've read, it's not just replacing the $ with @, in fact didn't someone try that and it didn't work? I checked the command help, and help it did. I just believe that these tutorials belong here as much as the PokeScript or whatever tutorials.

HackMew
June 8th, 2008, 06:15 AM
Well, pretty basic I would say.. :P
Anyway, I'll give you a tip: save bytes whenever possible.

Example:


...
compare LASTRESULT 0x1
if B_TRUE goto @yes
compare LASTRESULT 0x0
if B_TRUE goto @no
...


It doesn't make a lot of sense to compare the LASTRESULT variable two times, indeed. It can be only 0x0 or 0x1 (using callstd/boxset 0x5, of course). So, if it's 0x0 it can't be 0x1 and vice-versa. The optimized version would be:


...
compare LASTRESULT 0x1
if B_TRUE goto @yes
goto @no
...


Since you're using XSE you can even do this, if you want:


...
compare LASTRESULT 1
if b_true goto @yes
else goto @no
...


Basically it's just the same once compiled, but I think it makes more sense then a simple goto when reading the scipt.

ZodiacDaGreat
June 8th, 2008, 11:19 AM
From what I've read, it's not just replacing the $ with @, in fact didn't someone try that and it didn't work? I checked the command help, and help it did. I just believe that these tutorials belong here
as much as the PokeScript or whatever tutorials.

You're so naive, you just don't understand the parameters but if you do, then its a different case. The only differences between XSE and other tools are:

-daynamic offsets
-commands
-constructs

The older tuts teach almost everything, with only little error due to the older Toolmakers failed to interpret the commands nicely - so here you go.

Charliezard
June 8th, 2008, 05:17 PM
I'm learnin the basics of flags and stuff from thethethe's tutorial, that ain't for xse but it doesn't take a genious to see a few obvious diffrences and change them. I've learnt...now the hard part is to learn again...? To remember -_- :P Suck at that

~Teh Panda~
June 8th, 2008, 05:26 PM
Thanks, but...now I feel like an idiot cuz yes/no is so simple n I couldn't get it. :P

Edit- With the givepokemon, what aspects of it do you plan to cover? The nickname option? Also, in the begining where you don't have the Pokemon option in the start menu, would u show how to make it add that? :P Just a question :P

Regarding your edit questions,

1. I might add this, not sure yet but I think i will.
2. Yes and i will for pokedex too! All you have to do is set a flag for each.

Charliezard
June 8th, 2008, 07:33 PM
Regarding your edit questions,

1. I might add this, not sure yet but I think i will.
2. Yes and i will for pokedex too! All you have to do is set a flag for each.

Cool, I've learnt the flags for the pokedex and pokemon options. The nickname stuff is still unknown to me though.
I noticed in the givepokemon command there was no gender part. Is there a way around that?

~Teh Panda~
June 8th, 2008, 07:47 PM
Cool, I've learnt the flags for the pokedex and pokemon options. The nickname stuff is still unknown to me though.
I noticed in the givepokemon command there was no gender part. Is there a way around that?

About the givepokemon, i actually do not know, I haven't ever tried to fiddle around with the lasr three integers, maybe you could do it like that?!

Tyrantrum
June 8th, 2008, 08:38 PM
Hey, could u plz put up a signpost script?
I used to be able to do it, but now I'm having a little trouble.

Charliezard
June 8th, 2008, 08:41 PM
About the givepokemon, i actually do not know, I haven't ever tried to fiddle around with the lasr three integers, maybe you could do it like that?!

Maybe, but you'd think gender would be a slightly more important thing then to be described as a byte filler in the command guide?

Edit Signpost script
'-----------------------
#org 0x165862
msgbox 0x817D895 '"PALLET TOWN\nShades of your journey..."
callstd 0x3
end


'---------
' Strings
'---------
#org 0x17D895
= PALLET TOWN\nShades of your journey await!

The only diffrence I can see is the callstd 0x3 Guess 0x3 means signpost.

~Teh Panda~
June 8th, 2008, 08:46 PM
Hey, could u plz put up a signpost script?
I used to be able to do it, but now I'm having a little trouble.

Ya here is one


#dynamic 0x

#org @sign
lock
Message @sign
boxset 6
release
end

#org @sign
= This is a signpost script!

Tyrantrum
June 8th, 2008, 08:52 PM
I've never put lock in my signposts, but they've worked fine.
Thanx, but I think the script is right, but when I copy the offset, put it on A-Map, then open script, it doesn't show the script.
Just a #org 0x[offset]...
Weird huh?
I'll try again and report back.

/Circa
June 8th, 2008, 09:06 PM
I've never put lock in my signposts, but they've worked fine.
Thanx, but I think the script is right, but when I copy the offset, put it on A-Map, then open script, it doesn't show the script.
Just a #org 0x[offset]...
Weird huh?
I'll try again and report back.

When you compile a script a box should show at the bottom of the offsets, look for the one next to your first '@?????'. But make sure you've saved your script, and copy that into A-Map. Incase that doesnt work, open your saved script and compile it again in the same offset, it should be right.

If you get it ;S.

Tyrantrum
June 8th, 2008, 09:27 PM
Yea, I know.
I used the wrong rom on the batch compiler.
It works now.
I also released a demo of my hack.

lord_hardware
June 9th, 2008, 01:19 AM
Hey just wondering what the correct scripting TERM is in XSE for the "pokemon nickname" routine?

ZodiacDaGreat
June 9th, 2008, 10:57 AM
Hey just wondering what the correct scripting TERM is in XSE for the "pokemon nickname" routine?

I think you're refering to a command, but there's no such command that nicknames a pokemon - its a special.

~Teh Panda~
June 9th, 2008, 03:33 PM
I think you're refering to a command, but there's no such command that nicknames a pokemon - its a special.

This is the special.

special 0x166

ZodiacDaGreat
June 9th, 2008, 07:58 PM
This is the special.

special 0x166

No, its special 0x9E - 0x166 lets you enter a nickname...feel free to test. Its for both FR & Ruby - not sure about Emerald.

~Teh Panda~
June 9th, 2008, 08:07 PM
No, its special 0x9E - 0x166 lets you enter a nickname...feel free to test. Its for both FR & Ruby - not sure about Emerald.

Oh, Ok, thanks! I am busy with my hack now, then I will continue this tut!

ZodiacDaGreat
June 9th, 2008, 08:15 PM
Oh, Ok, thanks! I am busy with my hack now, then I will continue this tut!
Yeah, sure - just make it as complete as possible, and if anyone wants to help you let them help, so there'll be no other tut, until the official one's complete.

~Teh Panda~
June 9th, 2008, 08:19 PM
Yeah, sure - just make it as complete as possible, and if anyone wants to help you let them help, so there'll be no other tut, until the official one's complete.

Yea, sure, i have written up a lil of the flags tutorial, i have just been busy. Thanks, and if anyone wants to help they can!

jerryonhere
June 10th, 2008, 04:51 AM
how do you make the text change the color?

Master_Track
June 10th, 2008, 04:58 AM
-hackmew- wrote them in his tool thread.
I only hae copied those for FR/LG:
[white_fr]
[white2_fr]
[black_fr]
[grey_fr]
[red_fr]
[orange_fr]
[green_fr]
[lightgreen_fr]
[blue_fr]
[lightblue_fr]
[white3_fr]
[lightblue2_fr]
[cyan_fr]
[lightblue3_fr]
[navyblue_fr]
[darknavyblue_fr]

FireRed/LeafGreen - Trainer battle messages

[darknavy_frt]
[white_frt]
[red_frt]
[navy_frt]
[lightnavy_frt]
[white_frt]
[purple2_frt]
[grey_frt]
[darkpurple_frt]
[black_frt]
[magenta_frt]
[white2_frt]
[magenta_frt]
[gold_frt]
[lightgold_frt]
[darknavy2_frt]

just write it in front of the message.

X-Buster
June 10th, 2008, 05:01 AM
will the whole messgae be colored?

Master_Track
June 10th, 2008, 05:34 AM
yes, but u can change the colour again within the message.
an example:
[red_fr]This is a red message,\nbut [black_fr]this is a black one!

At least it should work like this xD

jerryonhere
June 10th, 2008, 05:41 AM
Thanks guys. I wanted another colour for my text.:)
And I use it on the Firered rom

Ronin180
June 10th, 2008, 10:35 AM
Hi, I am new to hacking and I am a little confused.
Why if I put this...

#dynamic 0x71A514

#org @start
lock
faceplayer
Message @tutorial
boxset 6
release
end

#org @tutorial
= This is my first script!

in to XSE and press compile. It will change in to this...

'-----------------------
#org 0x71A514
lock
faceplayer
msgbox 0x871A639 '"This is my first script!"
callstd 0x6
release
end

'---------
' Strings
'---------
#org 0x71A639
= This is my first script!

when I press open script again?

Also I am using XSE in Advancemap 1.92.
Thanks in advance.

ZodiacDaGreat
June 10th, 2008, 11:13 AM
when I press open script again?

Also I am using XSE in Advancemap 1.92.
Thanks in advance.
Reply With Quote

that's perfectly normal, the script get decompiled is different, due to labelings and the @dynamic erased.

maximum911
June 10th, 2008, 12:53 PM
when i type this
givepokemon 25 5 0
xse gives me this error message
Error 13 Type mismatch on line 16 missing define or parameter

Ronin180
June 10th, 2008, 01:54 PM
that's perfectly normal, the script get decompiled is different, due to labelings and the @dynamic erased.
Ok thanks, but if the script changes when it gets decompiled, why don't people just write the script the decompiled way?

Blitzballer
June 10th, 2008, 04:04 PM
Okay, FLAMING MUCH?
Unless you're the one having to pay for the forum, don't worry about if you think it's a "waste of space."

Anyway...this is a good tutorial. It's good to have an XSE tutorial separate from the PokeScript and ScriptED ones seeing as someone trying to learn might not understand that the commands are relatively the same. Unfortunately, I've already learned everything covered in this tutorial. I was just looking at it because I saw the movement section at the top. For some reason I'm having a really hard time with them [but I know how to do it in PokeScript].


Once HackMew's all-knowing guide is out, these'll start to fade away and if one pops up, then you can get angry.
=)

Peridot
June 10th, 2008, 06:07 PM
oh,I hope u find out the medium and the advanced script so I can learn more

ZodiacDaGreat
June 10th, 2008, 08:16 PM
when i type this
givepokemon 25 5 0
xse gives me this error message
Error 13 Type mismatch on line 16 missing define or parameter
@maximum911: You missed some parameters, namely the fillers, check command help, this should help:

givepokemon 25 5 0 0 0 0

try ;)

@KAWAII'SwhatWEaim4.: I'm not flaming, its called constructive criticism...ever heard of it??? As for the paying part, it shows "How much you care"

oh,I hope u find out the medium and the advanced script so I can learn more

@Peridot: I don't really think there's hard scripts and medium scripts, it all depends on your understanding level.

Blitzballer
June 10th, 2008, 08:26 PM
Sorry ahead of time for the off-topicness. I'm probably going to kill a kitten. =(
@KAWAII'SwhatWEaim4.: I'm not flaming, its called constructive criticism...ever heard of it??? As for the paying part, it shows "How much you care"
Somebody has a guilty conscience?? LOL. Just kidding. Actually, I don't think I was talking about you, or solely about you (Also, I used quotes because someone said "waste of space", where as I never said "How much you care")...??

Anywho, does anyone know if the movement commands are the same as in PokeScript? I've been looking for a list for ScriptED but I can't seem to find it.

~Teh Panda~
June 10th, 2008, 08:33 PM
Somebody has a guilty conscience?? LOL. Just kidding. Actually, I wasn't talking about you...

Anywho, does anyone know if the movement commands are the same as in PokeScript? I've been looking for a list for ScriptED but I can't seem to find it.

Ya here is a basic movements script, this will make your player go 1 step right while the other sprite at 0x0 sprite no. 0 will go two steps down


#dynamic 0x800000

#org @mover
lock
faceplayer
Message @timetomove
applymovement MOVE_PLAYER @moveplayer
waitmovement 0
applymovement 0x0 @movesprite1
waitmovement 0
release
end

#org @timetomove
= MOVE! TIME!

#org @moveplayer
#raw 0x34
#raw 0xFE

#org @movesprite1
#org 0x10
#org 0x10
#org 0xFE

Dr Gregory House
June 11th, 2008, 02:08 AM
i was making a movement script but i don't know what the commands are like 0x10 and such
could you list them?

Darthatron
June 11th, 2008, 03:23 AM
i was making a movement script but i don't know what the commands are like 0x10 and such
could you list them?

They are posted in thethethethe's PS Tutorial, just get them from there. It's not too hard to use the search function either... -.-

~Teh Panda~
June 13th, 2008, 07:27 PM
As soon as I get to the first gym on my hack I solemnly swear that I will make a new tut on part 4, flags! hold tight everybody

Cheers.
Hockeypanda32

Charliezard
June 13th, 2008, 09:29 PM
Hey I was havin problems trying to setflags and vars.
I was trying to set a lot of them from the get go. Like set the Pokemon and Pokedex option in the menu, disable the old man. All that start stuff. Well When I compiled the script it made it into one variable at the end of the givepokemon command. It was a little while ago and since then I deleted too much data in the rom and it stopped functioning and I don't have the script saved. But it compiled all the setvars into the givepokemon command sorta like
givepokemon 0x19 0x5 0x0 0x0 0x0 0x1A567
And then the script didn't work lol. I'll be workin on it again later, but yeh why would it do this?

~Teh Panda~
June 16th, 2008, 10:16 AM
Hey I was havin problems trying to setflags and vars.
I was trying to set a lot of them from the get go. Like set the Pokemon and Pokedex option in the menu, disable the old man. All that start stuff. Well When I compiled the script it made it into one variable at the end of the givepokemon command. It was a little while ago and since then I deleted too much data in the rom and it stopped functioning and I don't have the script saved. But it compiled all the setvars into the givepokemon command sorta like
givepokemon 0x19 0x5 0x0 0x0 0x0 0x1A567
And then the script didn't work lol. I'll be workin on it again later, but yeh why would it do this?

What was your original givepokemon command? Also try it without the 0x like

givepokemon 19 5 0 0 0 0

Tyrantrum
June 17th, 2008, 07:40 PM
Hey, I finally made a yes/no script now.
Haven't been trying to script in a while.
What would a give item script look like?

~Teh Panda~
June 17th, 2008, 07:48 PM
Hey, I finally made a yes/no script now.
Haven't been trying to script in a while.
What would a give item script look like?

A basic one would look like this, just incorporate a givepokemon event into the script where you want it to be.


#dynamic 0x800000

#org @givepokemon
lock
faceplayer
Message @give
boxset 6
givepokemon 1 5 0 0 0 0
release
end

@org @give
= Here is a Bulbasaur

Tyrantrum
June 17th, 2008, 08:08 PM
Um, I said give ITEM..........................

~EDIT~
Wouldn't the running shoes be a special?
How would I make a script to give a player the running shoes, and then not give the player the running shoes again?

Coral
June 18th, 2008, 05:56 AM
My XSE won't recognize @org!

adiktus
June 18th, 2008, 06:04 AM
It's #org, not @org. # is for offsets..

~Teh Panda~
June 18th, 2008, 10:28 AM
Um, I said give ITEM..........................

~EDIT~
Wouldn't the running shoes be a special?
How would I make a script to give a player the running shoes, and then not give the player the running shoes again?

What game are you editing? Ruby, Firered, specials differ in each game

They are flags

Firered: setflag 0x82F
Ruby: setflag 0x860

Tyrantrum
June 18th, 2008, 10:32 AM
Sry it's Fire Red.
What would a script look like that gives the player running shoes, and when u obtain them, u talk to the same person again and they don't give them to u again?

~Teh Panda~
June 18th, 2008, 10:33 AM
Sry it's Fire Red.
What would a script look like that gives the player running shoes, and when u obtain them, u talk to the same person again and they don't give them to u again?

Well that would be a simple setflag and check it, you would set the running shoes flag and check for it. I put the flags up on the last post to

Tyrantrum
June 18th, 2008, 10:47 AM
Well that would be a simple setflag and check it, you would set the running shoes flag and check for it. I put the flags up on the last post to

Well, unfortunately, I don't really understand flags....

adiktus
June 18th, 2008, 03:19 PM
Flags are simple. You use a flag originally unset. When you check the flag the first time (unset, value is 0) you go to the give running shoes script.. in that script, you set the flag (value is 1). Next time you talk to the person, the flag is checked, but because its now set, another script is called..

While we're talking about flags and specials, I've a question..
Lets say in emerald, you receive the national dex.. its special 0x16f.. Does flag 0x16f get set when you receive the dex?

Tyrantrum
June 18th, 2008, 03:44 PM
OH, so u put the same flag as the special?

adiktus
June 18th, 2008, 03:48 PM
I'm not sure. That's why I'm asking if checkflag 0x16f also means checking if you've got the national dex. However, for running shoes, its a flag.. not a special.. so you just check the flag for the running shoes.

Tyrantrum
June 18th, 2008, 03:52 PM
Well, I'm still a little confused and need an example script.
I'm fairly new to scripting since XSE is the only scripting tool that works on my computer.

adiktus
June 18th, 2008, 07:40 PM
@eeveon

#org @start
checkflag 0x82f
if 1 goto @done
setflag 0x82f
message @received
boxset 6
end

#org @done
message @oh
boxset 6
end

#org @received
= You received running shoes.

#org @oh
= Oh, you already have a pair.

~Teh Panda~
June 18th, 2008, 09:09 PM
@eeveon

#org @start
checkflag 0x82f
if 1 goto @done
setflag 0x82f
message @received
boxset 6
end

#org @done
message @oh
boxset 6
end

#org @received
= You received running shoes.

#org @oh
= Oh, you already have a pair.

thanks for showing the example mate, I am too tired to now XD

Coral
June 19th, 2008, 03:55 AM
Hm.
I tried to use this script:

#dynamic 0x800000

#org @givepokemon
lock
faceplayer
Message @Char
boxset 6
givepokemon 4 5 0 0 0 0
release
end

#org @Char
= I'd better take my CHARMANDER with me!

It works perfectly, but it doesn't make a sound and when I press START, there's no POKEMON (just BAG, [player], OPTIONS, SAVE, EXIT)

Is there a special command to do this?

Tropical Sunlight
June 19th, 2008, 04:55 AM
Hey it's 0x828

Try it like this:

#dynamic 0x800000

#org @givepokemon
lock
faceplayer
Message @Char
boxset 6
givepokemon 4 5 0 0 0 0
fanfare 0x13E
setflag 0x828
release
end

#org @Char
= I'd better take my CHARMANDER with me!

But then it doesn't disappear. Strange (or am I just a noob?)

chaotic_soma
June 19th, 2008, 06:03 AM
okay for both the charizards try this i just tested it and it works:

#dynamic 0x2DD2BE

#org @givepokemon
checkflag 0x206
if b_true goto @recieved
lock
faceplayer
Message @give
boxset 6
setflag 0x206
givepokemon 1 5 0 0 0 0
fanfare 0x13E
release
end

#org @give
= Here is a Bulbasaur

#org @recieved
lock
faceplayer
message @cheap
boxset 6
release end

#org @cheap
= don't be cheap!

enjoy :3

Tropical Sunlight
June 19th, 2008, 06:18 AM
I don't understand...

252525252525

chaotic_soma
June 19th, 2008, 06:33 AM
I don't understand...

252525252525

What don't you get? What were you aiming for?

~Teh Panda~
June 19th, 2008, 01:14 PM
Beta 1 should be out soon enough like a week or two after my beta testers get it ready and bug reports flow in.... Than beta 1 than I hopefully continue this tut!

chaotic_soma
June 20th, 2008, 05:25 AM
Hey i know that this is the wrong this is the wrong spot to ask this but i can't for the life of me find where i am supposed to put this i need a simple "don't go into the grass till you have a pokemon" script. obviously for XSE i never learnt it before so yeah help :)

Charliezard
June 20th, 2008, 05:55 AM
Ummm, I'm tired lol an yeh...maybe try something like


#Dynamic 0x80000

#ORG @GrassMaybe

lock
checkflag 0x828
if 0x0 goto @NoEntry
release
end

#ORG @NoEntry
~Talking Script~
~Movement script~

0x828 is the pokemon menu flag so yeh. Sorry, that's all I really know lol, I'm having problems with the movement myself. I got help from Hackmew, made the changes and well he said it worked for him -_- Just me lol. I'll be best to try when I'm not tired lol

chaotic_soma
June 20th, 2008, 06:11 AM
Ummm, I'm tired lol an yeh...maybe try something like


#Dynamic 0x80000

#ORG @GrassMaybe

lock
checkflag 0x828
if 0x0 goto @NoEntry
release
end

#ORG @NoEntry
~Talking Script~
~Movement script~0x828 is the pokemon menu flag so yeh. Sorry, that's all I really know lol, I'm having problems with the movement myself. I got help from Hackmew, made the changes and well he said it worked for him -_- Just me lol. I'll be best to try when I'm not tired lol

Hey thanks *freaks out* I never learned movement either!!!
so hmm maybe i should talk to Hackmew...

Master_Track
June 20th, 2008, 06:20 AM
movements are easy.
a basic don't go out script would look like this:

#dynamic 0x[offset]

#org @begin
checkflag 0x828
if B_true goto @done
lock
message @stop
boxset 0x6
applymovement 0xFF @1
waitmovement 0
release
end

#org @done
release
end

#org @stop
= I shouldn't go out without\na pokemon!

#org @1
#binary 0x10 0xFE

This will make you go done 1 tile.
Movement lists can be found in thethethethe's pokescript tutorial for both FR/BG and R/S/E.

chaotic_soma
June 20th, 2008, 06:26 AM
movements are easy.
a basic don't go out script would look like this:

#dynamic 0x[offset]

#org @begin
checkflag 0x828
if B_true goto @done
lock
message @stop
boxset 0x6
applymovement 0xFF @1
waitmovement 0
release
end

#org @done
release
end

#org @stop
= I shouldn't go out without\na pokemon!

#org @1
#binary 0x10 0xFE

This will make you go done 1 tile.
Movement lists can be found in thethethethe's pokescript tutorial for both FR/BG and R/S/E.


hey omg thank you so much! *crash tackles master_track* you are my new friend!!!

~Teh Panda~
June 21st, 2008, 09:52 AM
Beta 1 is progressing for underground about a week, I just need Mew_Ryn lol. Then Part 4, Flags!

master morty
June 21st, 2008, 10:22 AM
movement is done in XSE almost the same way as rubikon except you use @(something)
my example

#dynamic 0x800000

#org @start
applymovement 0x5 @move
end

#org @move
#raw 0x08
#raw 0x08
#raw 0x08

ZodiacDaGreat
June 21st, 2008, 12:25 PM
#dynamic 0x800000

#org @start
applymovement 0x5 @move
end

#org @move
#raw 0x08
#raw 0x08
#raw 0x08
wrong, you should always end movements with #raw 0xFE, so the game knows when to stop, otherwise it'll crash.

Darthatron
June 21st, 2008, 11:18 PM
movement is done in XSE almost the same way as rubikon except you use @(something)
my example

#dynamic 0x800000

#org @start
applymovement 0x5 @move
end

#org @move
#raw 0x08
#raw 0x08
#raw 0x08
In addition to what Zodiac said, you can also have all the movements on one line, which means less typing:
#dynamic 0x800000

#org @start
applymovement 0x5 @move
end

#org @move
#raw 0x08 0x08 0x08 0xFE

~Teh Panda~
June 29th, 2008, 08:44 AM
In addition to what Zodiac said, you can also have all the movements on one line, which means less typing:
#dynamic 0x800000

#org @start
applymovement 0x5 @move
end

#org @move
#raw 0x08 0x08 0x08 0xFE

Will this save any byes by putting them all on one line?

jakerman999
June 29th, 2008, 08:54 AM
can anyone see what is wrong in this script?
(script that i found is in spoilers, only the code I wrote is visible)

#org 0x168BE5
lock
faceplayer
checkflag 0x800
if 0x0 goto 0x8168D00
checkflag 0x258
if 0x1 goto 0x8168C26
checkgender
compare LASTRESULT 0x0
if 0x1 call 0x8168C14
compare LASTRESULT 0x1
if 0x1 call 0x8168C1D
closeonkeypress
applymovement 0x1 0xD2CC000F
subvar 0x908 0x304
msgbox 0x818D33C '"MOM: [.]Right.\nAll girls dream of ..."
callstd 0x4
return

'-----------------------
#org 0x168D00
checkflag 0x291
if 0x1 goto 0x8168D64
return


'-----------------------
#org 0x168C26
msgbox 0x818D3AD '"MOM: [player]!\nYou should take a q..."
callstd 0x4
closeonkeypress
call 0x81A6C02
msgbox 0x818D3D4 '"MOM: Oh, good! You and your\nPOKéMO..."
callstd 0x4
release
end

'-----------------------
#org 0x168C14
msgbox 0x818D2CC '"MOM: [.]Right.\nBoys leave home evr..."
callstd 0x4
return

'-----------------------
#org 0x168C1D
msgbox 0x818D33C '"MOM: [.]Right.\nAll girls dream of ..."
callstd 0x4
return

'-----------------------
#org 0x168D64
msgbox 0x818D49C '"MOM: PROF.OAK gave you a pokémon?\n..."
givepokemon 0x55 0x5 0x22 0x0 0x0 0x0
setflag 0x800
release
end


'-----------------------
#org 0x1A6C02
fadescreen 0x1
fanfare 0x100
waitfanfare
special 0x0
fadescreen 0x0
return


'---------
' Strings
'---------
#org 0x18D33C
= MOM: [.]Right.\nAll girls dream of traveling.\lIt said so on TV.\pOh, yes. PROF. OAK, next door, was\nlooking for you.

#org 0x18D3AD
= MOM: [player]!\nYou should take a quick rest.

#org 0x18D3D4
= MOM: Oh, good! You and your\nPOKéMON are looking great.

#org 0x18D2CC
= MOM: [.]Right.\nBoys leave home evreyday.\nIt said so on TV.\pOh,yes. PROF.OAK,was searching for\nyou

#org 0x18D49C
= MOM: PROF.OAK gave you a pokémon?\nI better help out to.



the script compiles fine, it just doesn't do anything when I talk to 'mom'
any help?

lennycharriez315
July 1st, 2008, 12:04 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.

dudez
July 2nd, 2008, 10:49 AM
so it works to use movements like this

#raw 0x10 0x13 0xFE

instead of this?

#raw 0x10
#raw 0x13
#raw 0xFE

~Teh Panda~
July 2nd, 2008, 11:15 AM
so it works to use movements like this

#raw 0x10 0x13 0xFE

instead of this?

#raw 0x10
#raw 0x13
#raw 0xFE

Yes it does work that way.

Darthatron
July 2nd, 2008, 08:47 PM
so it works to use movements like this

#raw 0x10 0x13 0xFE

instead of this?

#raw 0x10
#raw 0x13
#raw 0xFE

Yes, it also works without the "0x" because, everything after "#RAW", XSE reads as HEX.
#raw 10 13 FE
Is the same as the other two. >_>

lennycharriez315
July 4th, 2008, 05:53 PM
i found out the script and my error. iwas supposed to add the hidesprite command.

~Teh Panda~
July 6th, 2008, 09:08 PM
i found out the script and my error. iwas supposed to add the hidesprite command.

alright, thats good to hear!

KhaosKnight
July 7th, 2008, 01:30 PM
Here is an edited script with a dude that gives you the National Dex in Emerald.


'-----------------------
#org 0xE3D07E
lock
faceplayer
msgbox 0x8E3D08D '"Here you may need this on your\njou..."
callstd 0x6
special 0x1F3
release
end

'---------
' Strings
'---------
#org 0xE3D08D
= Here you may need this on your\njourney. The Prof. is so\lscatter-brained he forgot to\limplement this feature in your dex.\lIt's the National Dex, use it to\lkeep a record of all your pokemon\lecounters.





i need some help with some movements...there is a lab assistant in Birch's lab...i need him to walk up to you when you are attempting to leave the lab after you get the Hoenn dex from Birch.(just like how the assistant did in GSC when giving you the pokeballs, i want that same effect but with the National Dex)

And after he gives it to you, when you talk to him again he says "I hope you are making good use of that National Dex"

0m3GA ARS3NAL
July 10th, 2008, 02:28 AM
It seems like so far, basic scripts are almost exactly like pokescript, only now it is @ instead of $ and there is a dynamic offset at the beginning... Is there any major differences?

mattattack
July 11th, 2008, 12:00 AM
Hi I'm having a problem scripting every time I click on the guy or pokemon to activate the script it won't active meaning it won't give the the blastoise or I can't fight Ho-oh (note: It was a test run)

#dynamic 0x3B4DF4

#org @emergencygivepokemon
lock
faceplayer
message @give
boxset 6
givepokemon 9 70 0 0 0 0
release
end

#org @give
= Quick!/pTake Blastoise to kill/nHo-oh!

Ho-Oh script:

#dynamic 0x3B4DF5

#org @bossfight
lock
faceplayer
message @Ho-Oh
boxset 6
cry 0xA1 250
nop
nop
wildbattle 250 70 0 0 0 0
fadescreen 0
#raw 53 0F 80
setflag 200
release
end

#org @Ho-Oh
= HO-OH: KYOOOO



and also I can't press the compile button because it won't come up, but the debug thing next to it when I click on it it compiles

also I downloaded this from studio pokemon XSE

Makorin
July 28th, 2008, 05:55 PM
Hi I'm having a problem scripting every time I click on the guy or pokemon to activate the script it won't active meaning it won't give the the blastoise or I can't fight Ho-oh (note: It was a test run)

#dynamic 0x3B4DF4

#org @emergencygivepokemon
lock
faceplayer
message @give
boxset 6
givepokemon 9 70 0 0 0 0
release
end

#org @give
= Quick!/pTake Blastoise to kill/nHo-oh!

Ho-Oh script:

#dynamic 0x3B4DF5

#org @bossfight
lock
faceplayer
message @Ho-Oh
boxset 6
cry 0xA1 250
nop
nop
wildbattle 250 70 0 0 0 0
fadescreen 0
#raw 53 0F 80
setflag 200
release
end

#org @Ho-Oh
= HO-OH: KYOOOO



and also I can't press the compile button because it won't come up, but the debug thing next to it when I click on it it compiles

also I downloaded this from studio pokemon XSE
If u havent already figured it out...

save your scripts then go to tools - batch compiler - ... and choose ur rom
then click browse and go to the folder with your scripts in it
then check all the script u want 2 compile
then press compile and itll give you the offsets to put in A-map
then test it and it should work.

0m3GA ARS3NAL
July 29th, 2008, 02:25 AM
This is a very nice Tutorial, and I cant wait for more!

mattattack
July 30th, 2008, 09:19 AM
Hi I found out my problem in that last question, but

How do you use flags. I'm confused.

Iken
August 8th, 2008, 11:21 PM
Argh ._.''

ok, here's my problem.

I'm trying to make someone give me running shoes.
i know my script works, but i'll use the build in Free Space finder
in Advance Map (1.92) And then it'll come up with a list of like 8 offsets.

i'll make a person event, and then type their script offset as one of the
ones from FSF.

then i'll edit the script in XSE and press compile, then the window pops up,
i press close, and then when i go into A-map, and try to re-open the script
it's empty.

Does anyone know what i'm doing wrong....?

*desperate-ish*

Iken
August 9th, 2008, 07:40 PM
On top of my last post... x_x''...

I'd like to know if anyone has a list of flags for
Fire red/Leaf green and Ruby/Sapphire

i can't seem to find one D:

hackergkenzz
August 25th, 2008, 02:42 PM
can i have a link to a complete XSE tutorial

1KewlDude
August 25th, 2008, 03:01 PM
Argh ._.''

ok, here's my problem.

I'm trying to make someone give me running shoes.
i know my script works, but i'll use the build in Free Space finder
in Advance Map (1.92) And then it'll come up with a list of like 8 offsets.

i'll make a person event, and then type their script offset as one of the
ones from FSF.

then i'll edit the script in XSE and press compile, then the window pops up,
i press close, and then when i go into A-map, and try to re-open the script
it's empty.

Does anyone know what i'm doing wrong....?

*desperate-ish*I'm finding that really hard to understand... sorry, I'm tired. In XSE you start with a dynamic offset:
#dynamic 0x[offset]
That's the only time you need to use an offset from FSF. Then you need to have a pointer which starts the script... normally:
#org @start
Compile the script and you should be given an offset, press copy and paste it into A-Map.

I hope that helped.
On top of my last post... x_x''...

I'd like to know if anyone has a list of flags for
Fire red/Leaf green and Ruby/Sapphire

i can't seem to find one D:
I copied this from thex4's tutorial:

Fire Red:
0x820 - First Badge
0x821 - Second Badge
0x822 - Third Badge
0x823 - Fourth Badge
0x824 - Fifth Badge
0x825 - Sixth Badge
0x826 - Seventh Badge
0x827 - Eighth Badge
0x828 - Pokemon Menu
0x829 - Pokedex Menu
0x82F - Running Shoes

Ruby/Sapphire:
0x800 - Pokemon Menu
0x801 - Pokedex Menu
0x802 - Pokenav Menu
0x807 - First Badge
0x808 - Second Badge
0x809 - Third Badge
0x80A - Fourth Badge
0x80B - Fifth Badge
0x80C - Sixth Badge
0x80D - Seventh Badge
0x80E - Eighth Badge
0x860 - Running Shoes

Emerald:
0x860 - Pokemon Menu
0x861 - Pokedex Menu
0x862 - Pokenav Menu

Please don't double post, edit your last one instead.
can i have a link to a complete XSE tutorialSorry, but there isn't one... You should thethethethe's tut and translate it into XSE using one of the XSE tutorials.

Good luck.

hackergkenzz
August 25th, 2008, 03:12 PM
???umm ok... how do i do that

1KewlDude
August 25th, 2008, 03:22 PM
???umm ok... how do i do thatI know this is impractical, but you should download Pokescript and use thethethethe's tut (because it's really in-depth) to learn the language and then start using XSE because as far as I know there are no good tuts on XSE.

Sorry if that didn't help.

hackergkenzz
August 25th, 2008, 04:02 PM
were can i get a pokescript that i dont need an archiving too for

M O M U S U
August 27th, 2008, 06:31 PM
Do you know how to make a legendary battle script?

An example is a Mew on the map, when you talk to it a battle starts.

I really want to know how to do this, but I can't find any info on it anywhere.

~Teh Panda~
August 28th, 2008, 03:17 PM
Sorry for that dumb thread about my script not working, that guy is a screwball, take out the parts after the " ' " in my guide!

Shadows
August 28th, 2008, 03:48 PM
Do you know how to make a legendary battle script?

An example is a Mew on the map, when you talk to it a battle starts.

I really want to know how to do this, but I can't find any info on it anywhere.
Its the same as wildbattle(Just change the PKMN #),just look at thethethethethe's(did I type too many the's?)tut and change it into XSE.(Example $-into-@)
Unless theres a XSE tut with wildbattle, then check that out.

maximum911
August 29th, 2008, 10:00 AM
hey hockey panda.i have asked a mod to remove my thread. I did not make the thread to insult you or seth's tutorials. I was just trying to help by pointing out some flaws but it appears i was wrong. so forget about it ok?

~Teh Panda~
August 30th, 2008, 08:34 PM
hey hockey panda.i have asked a mod to remove my thread. I did not make the thread to insult you or seth's tutorials. I was just trying to help by pointing out some flaws but it appears i was wrong. so forget about it ok?

Ok, sounds good, hope you get everything sorted out, talk to me if you need any help

mattattack
September 1st, 2008, 02:00 PM
how do i use flags? i don't understand

~Teh Panda~
September 1st, 2008, 07:22 PM
how do i use flags? i don't understand

Basic flag commands

setflag 0x200
most of the time these 2 go together
checkflag 0x200
if b_true goto @blabla

clearflag 0x200

0x200 = the flag number, 200 can be any number for the flag, beware of numbers below 200.

Tyrantrum
September 1st, 2008, 07:34 PM
Hey Hockeypanda, when you gonna add more sections to this? ;)

~Teh Panda~
September 1st, 2008, 08:12 PM
Hey Hockeypanda, when you gonna add more sections to this? ;)

WHen I am less busy and on Windows so I can have XSE by my side while I write it :)

mattattack
September 2nd, 2008, 08:31 PM
I have a question: If you have to go to the prof. before leaving the town would it go like this

#Dynamic 0x offset

#ORG @start
lock
faceplayer
setflag 0x200
if b_true goto @first pokemon
message @can't go
boxset 6
release
end

#ORG @can't go
= I shouldn't go out without a pokemon
release
end

#ORG @first pokemon
=PROF: Here \v\ho1\ is your pokemon
givepokemon 1 5 0 0 0 0
release
end

~Teh Panda~
September 2nd, 2008, 08:54 PM
I have a question: If you have to go to the prof. before leaving the town would it go like this

#Dynamic 0x offset

#ORG @start
lock
faceplayer
setflag 0x200
if b_true goto @first pokemon
message @can't go
boxset 6
release
end

#ORG @can't go
= I shouldn't go out without a pokemon
release
end

#ORG @first pokemon
=PROF: Here \v\ho1\ is your pokemon
givepokemon 1 5 0 0 0 0
release
end

No, this would not be correct, you are missing some key parts.

First of all:

Setflag = where you set your flag

CheckFlag = checking for the flag
^After this you do the "if b_true goto @blabla" so it looks if the flag is set yet.

Clearflag = clearing the flag that may not be in use anymore or anything that you would clear it for.

mavidlol2
September 12th, 2008, 04:01 AM
For some reason every time when i talk to the person which i coded, the words are always blank... can anyone help me?

HackMew
September 15th, 2008, 01:39 AM
For some reason every time when i talk to the person which i coded, the words are always blank... can anyone help me?

Could you please post the script you used? Kinda impossible to help otherwhise.

mavidlol2
September 15th, 2008, 02:43 AM
oh sorry...
well i actually copied and paste the codings from the tut but it still won't work
#Dynamic 0x2FB51C
#Org @talk
Lockall
Faceplayer
Msgbox @hi
BoxSet 0x6
Release
End
#Org @hi
= hi.

The Abyss
September 15th, 2008, 02:46 AM
When you compile it what offset is used?

HackMew
September 15th, 2008, 02:48 AM
oh sorry...
well i actually copied and paste the codings from the tut but it still won't work
#Dynamic 0x2FB51C
#Org @talk
Lockall
Faceplayer
Msgbox @hi
BoxSet 0x6
Release
End
#Org @hi
= hi.

If you want to use lockall, you need to use releaseall as well. So, you should use lock instead in this case.

Anyway, what offset gave you XSE once you compiled the script?
Did you try decompiling that script?
Also what offset did you assign to the person/object that should run the script once talked to?

mavidlol2
September 15th, 2008, 02:52 AM
um... i don't know how to decompile the script
sometimes it gives me a new offset
and i just press copy and paste it in advance map

The Abyss
September 15th, 2008, 02:53 AM
When you compile it what offset do you paste into A-Map? Is it @talk or @hi?

mavidlol2
September 15th, 2008, 02:56 AM
talk .

HackMew
September 15th, 2008, 02:56 AM
When you compile it what offset do you paste into A-Map? Is it @talk or @hi?

If it's @hi it's the wrong one. Simply as that. But since it's not your case, could you show us the offset you used last time?

Also, to decompile a script simply open the ROM, paste the offset in the textbox near the "Offset" label in the toolbar and then press the Decompile button near there.

mavidlol2
September 15th, 2008, 03:02 AM
for 0x2FB51C it gave me 0x305AFD when i compiled it
does it matter if Unknown and people ID in a-map is 00?

can you give me your script and let me try if it works?

HackMew
September 15th, 2008, 03:07 AM
for 0x2FB51C it gave me 0x305AFD when i compiled it
does it matter if Unknown and people ID in a-map is 00?

can you give me your script and let me try if it works?

Okay, I suppose it's the same offset you put in AM, is it right?
Can you post the decompiled script too?

mavidlol2
September 15th, 2008, 03:11 AM
when i decompile it do i type the new offset or the one i typed?
and everytime when i compile the script again it gives me another new offset

this is what i get when i decompile

'-----------------------
#org 0x305AFE
lock
faceplayer
msgbox 0x8305B0B '" "
callstd 0x6
release
end

'---------
' Strings
'---------
#org 0x305B0B
=

HackMew
September 15th, 2008, 04:05 AM
when i decompile it do i type the new offset or the one i typed?
and everytime when i compile the script again it gives me another new offset


The fact you always get a different offset is normal. Try compiling this:

#dynamic 0x2FB51C

#org @start
lock
faceplayer
msgbox @talk
boxset 0x6
release
end

#org @talk
= hi.

Let me know if it worked or not.

mavidlol2
September 16th, 2008, 12:18 AM
The fact you always get a different offset is normal. Try compiling this:

#dynamic 0x2FB51C

#org @start
lock
faceplayer
msgbox @talk
boxset 0x6
release
end

#org @talk
= hi.

Let me know if it worked or not.

Sadly it didn't work ...

GTAPlayer
September 16th, 2008, 02:28 PM
What's wrong with this script?:
#org 0x71A308
lock
faceplayer
startwildbattle 0xF3 0x32 0x0
checksound
cry 0xF3 0x2
pause 0x28
waitcry
setflag 0x305
setflag 0x861
special 0x138
waitstate
clearflag 0x861
release
end

HackMew
September 17th, 2008, 09:53 AM
What's wrong with this script?:
#org 0x71A308
lock
faceplayer
startwildbattle 0xF3 0x32 0x0
checksound
cry 0xF3 0x2
pause 0x28
waitcry
setflag 0x305
setflag 0x861
special 0x138
waitstate
clearflag 0x861
release
end

You should say what you suppose that script to do. And what the script does instead.
Nex time it would be better asking such questions in the proper thread (http://www.pokecommunity.com/showthread.php?t=120081).

Banjora Marxvile
September 17th, 2008, 09:57 AM
Um... I need help. I'm not a good scripter, but I put a givepokemon script in my practice hack. Hoe do I end it as it starts again if I talk to the pokeball to get the pokemon? This is the script (I know it's bad, but I don't understand many scripting tutorials, as they don't give advice for what I want...)

#org 0x800000
givepokemon 0xFC 0x28 0x0 0x0 0x0 0x0
movesprite2 0x1 0x0 0x0
hidesprite 0x1
release
end

... I'm not a good scripter (I'm a better mapper) but any help will be very much appreciated!

HackMew
September 17th, 2008, 10:24 AM
Um... I need help. I'm not a good scripter, but I put a givepokemon script in my practice hack. Hoe do I end it as it starts again if I talk to the pokeball to get the pokemon? This is the script (I know it's bad, but I don't understand many scripting tutorials, as they don't give advice for what I want...)

#org 0x800000
givepokemon 0xFC 0x28 0x0 0x0 0x0 0x0
movesprite2 0x1 0x0 0x0
hidesprite 0x1
release
end

... I'm not a good scripter (I'm a better mapper) but any help will be very much appreciated!

You simply need to use checkflag/setflag. Check the Script Help thread for further info and examples. I posted something a couple of days ago.

GTAPlayer
September 17th, 2008, 02:10 PM
Sorry, I meant, how do I put a flag for a legendary to disappear after you caught it?

jin14
September 19th, 2008, 05:25 AM
hi boy where is a script guide need to me to do a hack room you can help me?

-DarK-
September 20th, 2008, 01:28 AM
EDIT: Nvm, found my mistake

Well, pretty basic I would say.. :P
Anyway, I'll give you a tip: save bytes whenever possible.

Example:



It doesn't make a lot of sense to compare the LASTRESULT variable two times, indeed. It can be only 0x0 or 0x1 (using callstd/boxset 0x5, of course). So, if it's 0x0 it can't be 0x1 and vice-versa. The optimized version would be:



Since you're using XSE you can even do this, if you want:



Basically it's just the same once compiled, but I think it makes more sense then a simple goto when reading the scipt.

I tried that, with the "else goto" thing, and XSE told me it's an incorrect line. Here's my full script:

#Dynamic 0x86962E

#ORG @start
lock
faceplayer
msgbox @pokeball
boxset 5
compare LASTRESULT 0x1
if b_true goto @yes
else goto @no
release
end

#org @pokeball
= This POKéBALL is lying on the\nground. Maybe someone left it\lbehind ...\lPick it up?

#org @yes
msgbox @cyndaquil
boxset 6
fanfare 0x13E
givepokemon 0x9B 0x5 0x0 0x0 0x0 0x0
waitfanfare
hidesprite 0x7
release
end

#org #no
msgbox @untouched
boxset 6
release
end

#org @cyndaquil
= [player] received a CYNDAQUIL.

#org @untouched
= You leave the POKéBALL untouched.

What's wrong with it?

Hiche..
September 20th, 2008, 01:52 AM
Dark Salamance, try this:


#Dynamic 0x86962E

#ORG @start
lock
faceplayer
msgbox @pokeball
boxset 5
compare LASTRESULT 0x1
if b_true goto @yes
message @no
boxset 6
release
end

#org @pokeball
= This POKéBALL is lying on the\nground. Maybe someone left it\lbehind ...\lPick it up?

#org @yes
givepokemon 0x9B 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @cyndaquil
boxset 6
waitfanfare
hidesprite 0x7
release
end

#org @no
= You leave the POKéBALL untouched.

#org @cyndaquil
= [player] received a CYNDAQUIL.

-DarK-
September 20th, 2008, 02:10 AM
EDIT2: I found it! Now I know why the checkflag/setflag didn't work for me!`

Explanation: I never knew you had to insert the hex number you used for setflag in the PersonID thing in A-map, that's why it didn't work.

Here's the final script:
#Dynamic 0x86981D

#ORG @start
checkflag 0x200
if b_true goto @gone
lock
faceplayer
msgbox @pokeball
boxset 5
compare LASTRESULT 0x1
if b_true goto @yes
else goto @no
boxset 6
release
end

#org @pokeball
= This POKéBALL is lying on the\nground. Maybe someone left it\lbehind ...\lPick it up?

#org @yes
givepokemon 0x9B 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @cyndaquil
boxset 6
waitfanfare
hidesprite 0x7
setflag 0x200
release
end

#org @no
msgbox @untouched
boxset 6
release
end

#org @untouched
= You leave the POKéBALL untouched.

#org @cyndaquil
= [player] received a CYNDAQUIL.

#org @gone
hidesprite 0x7
end

Yay!

~Teh Panda~
September 23rd, 2008, 03:10 PM
Ok guys, thanks for posting your scripts here, but just in case you don't get an answer here remember about the script help thread ;)

Chapter 4, Flags

Finally the flags tut is here.

Ok lets start off, flags are based off into 3 basics groups

setflag
checkflag
clearflag

Most of the time you don't see clearflag come up... it is needed sometimes though. You will understand how to use the flags after this!

Lets start with something way simple. Code the normal base to your script from the other parts of the tut.

#dynamic 0xOFFSET HERE

#org @start
lock
faceplayer

Now for the flags. add these lines of code

checkflag 0x200
if b_true goto @flag

This is to check if the flag 0x200 is set and if so going to @flag
Now enter a simple message line in.. whatever the message may be just add it after this. After that we will add our setflag, before that here is how far we should be in the script...

#dynamic 0xOFFSET HERE

#org @start
lock
faceplayer
checkflag 0x200
if b_true goto @flag
Message @hi
boxset 6

Now for the setflag... for flags do not use any number but the flags 200 and up and 900 and up.

Add this line of code now!


setflag 0x200


now we should have


#dynamic 0xOFFSET HERE

#org @start
lock
faceplayer
checkflag 0x200
if b_true goto @flag
Message @hi
boxset 6
setflag 0x200


Now end this part of the scrip and now add your message for hi.

Time for the @flag part. before this here is what you should have...

#dynamic 0xOFFSET HERE

#org @start
lock
faceplayer
checkflag 0x200
if b_true goto @flag
Message @hi
boxset 6
setflag 0x200
release
end

#org @hi
= Hello there.


Now after that add the #org @flag part of this part of the script.

Time for what we want the flag to go to.
Lets make it a message


#org @flag
message @woot
boxset 6
release
end

#org @woot
= What you want????


Now for the finished product!

#dynamic 0xOFFSET HERE

#org @start
lock
faceplayer
checkflag 0x200
if b_true goto @flag
Message @hi
boxset 6
setflag 0x200
release
end

#org @hi
= Hello there.

#org @flag
message @woot
boxset 6
release
end

#org @woot
= What you want????

-DarK-
September 24th, 2008, 02:32 AM
You forgot one thing panda. If you want the checkflag/setflag to work correctly, remember this: When inserting a person event, there's a thing called PersonID on your right (when you clicked at that event). Make sure to insert the numbers you used for setflag, which means 200 in this case. Otherwise, flags wouldn't work correctly.

Tropical Sunlight
September 24th, 2008, 02:51 AM
Yay! When will the other parts arrive?

~Teh Panda~
September 24th, 2008, 03:59 PM
You forgot one thing panda. If you want the checkflag/setflag to work correctly, remember this: When inserting a person event, there's a thing called PersonID on your right (when you clicked at that event). Make sure to insert the numbers you used for setflag, which means 200 in this case. Otherwise, flags wouldn't work correctly.

I am pretty sure I covered that but i will look it over once again.

Zaptinex
September 28th, 2008, 02:53 PM
Hey i typed this script and it said error 13 type mismatch on line 8

#dynamic 0x16A7C8

#org @start
lock
faceplayer
message @tutorial
boxset 5
compare LASTRESULT 1
if b_true goto @yes
compare LASTRESULT 0
if b_true goto @no
release
end

#org @tutorial
= Yes or no?

#org @yes
message @pressyes
boxset 6
release
end

#org @no
message @pressno
boxset 6
release
end

#org @pressyes
= You pressed YES!

#org @pressno
= You pressed NO!

~Teh Panda~
September 28th, 2008, 04:31 PM
Hey i typed this script and it said error 13 type mismatch on line 8

#dynamic 0x16A7C8

#org @start
lock
faceplayer
message @tutorial
boxset 5
compare LASTRESULT 1
if b_true goto @yes
compare LASTRESULT 0
if b_true goto @no
release
end

#org @tutorial
= Yes or no?

#org @yes
message @pressyes
boxset 6
release
end

#org @no
message @pressno
boxset 6
release
end

#org @pressyes
= You pressed YES!

#org @pressno
= You pressed NO!

Mine compiled fine, try to change the compare LASTRESULT 0 and 1 to or just keep trying is that an open offset?

Compare LASTRESULT 0x0
Compare LASTRESULT 0x1

Zaptinex
September 28th, 2008, 08:54 PM
It works now thanks for the help

~Teh Panda~
September 29th, 2008, 03:12 PM
It works now thanks for the help

no problem, just ask me if you need anything!

j_legolas
October 2nd, 2008, 07:56 AM
i tried putting the script but after everything the script does not work in the game.
(i walk over the supposed script tile but nothing happens)

#dynamic 0x??????

#org @begin
lock
message @stop
boxset 0x6
applymovement 0xFF @move
waitmovement 0
release
end

#org @stop
= I should take my pokemon \non the table first.

#org @move
#raw 0x10 0xFE

and how do i make it so that i cannot pass this script without taking my pokemon?
the take pokemon script is success.

'-----------------------
#org 0x??????
lock
faceplayer
msgbox 0x871AED1 '"Guess I'll use Larvitar today."
callstd 0x6
givepokemon 0xF6 0x5 0xCB 0x0 0x0 0x0
hidesprite 0x1
release
end


'---------
' Strings
'---------
#org 0x71AED1
= Guess I'll use Larvitar today.

Makorin
October 2nd, 2008, 02:02 PM
i tried putting the script but after everything the script does not work in the game.
(i walk over the supposed script tile but nothing happens)


#dynamic 0x??????

#org @begin
lock
message @stop
boxset 0x6
applymovement 0xFF @move
waitmovement 0
release
end

#org @stop
= I should take my pokemon \non the table first.

#org @move
#raw 0x10 0xFE

and how do i make it so that i cannot pass this script without taking my pokemon?
the take pokemon script is success.

'-----------------------
#org 0x??????
lock
faceplayer
msgbox 0x871AED1 '"Guess I'll use Larvitar today."
callstd 0x6
givepokemon 0xF6 0x5 0xCB 0x0 0x0 0x0
hidesprite 0x1
release
end


'---------
' Strings
'---------
#org 0x71AED1
= Guess I'll use Larvitar today.


Well its pretty easy 2 say wats wrong
did u compile it with those question marks for the offset? thts wat i goota ask
then if u did go into FSF if u have it or go into AdvanceMap and search for free space (in AdvMap go to the magnifine glass) for this script it would be something like oh probably 500 - 1000 bytes

j_legolas
October 3rd, 2008, 03:59 AM
Well, it's kinda obvious i used an actual offset.

And i just tried using a 500 byte space offset, but my body hangs when i step on the tile while the game music plays as normal.

so it's kinda no diff to all the times i trial and error.
still need help *sobs*

thx anyway

dbrown123
October 3rd, 2008, 02:34 PM
this is the best tut ever i cant wait till the next 3 parts it taught me how to script easily but it will take me some time to remeber all the stuff haha but yea thanks

Makorin
October 3rd, 2008, 05:00 PM
Well, it's kinda obvious i used an actual offset.

And i just tried using a 500 byte space offset, but my body hangs when i step on the tile while the game music plays as normal.

so it's kinda no diff to all the times i trial and error.
still need help *sobs*

thx anyway

well then u have a problem in AdvMap
click on the script tile and you have to fill the variable boxes(i think thts what its called) like if its (Example) in Pallet Town the one where oak gets u to his lab has 4050 in one and 0003 in another (but this would only work in the 3.0 map bank for some reason (thts how it works for me anyway)

Hiche..
October 4th, 2008, 12:55 AM
Well, it's kinda obvious i used an actual offset.

And i just tried using a 500 byte space offset, but my body hangs when i step on the tile while the game music plays as normal.

so it's kinda no diff to all the times i trial and error.
still need help *sobs*

thx anyway



#dynamic 0x8806B0

#org @begin
checkflag 0x828
if 0x1 goto @done
message @stop
callstd 0x6
applymovement 0xFF @move
waitmovement 0x0
release
end

#org @done
release
end

#org @stop
= I should take my pokemon \non the table first.

#org @move
#raw 0x10 0xFE


This worked perfectly on my ROM.
Put the Unknown: 0003
and the varnumber: 5040, 4050, or 7C40.
When you did the givepokemon script, did you put setflag 0x828 before the release command?
Sorry it didn't help.

0m3GA ARS3NAL
October 4th, 2008, 02:02 PM
#dynamic 0x8806B0

#org @begin
checkflag 0x828
if 0x1 goto @done
message @stop
callstd 0x6
applymovement 0xFF @move
waitmovement 0x0
release
end

#org @done
release
end

#org @stop
= I should take my pokemon \non the table first.

#org @move
#raw 0x10 0xFE


This worked perfectly on my ROM.
Put the Unknown: 0003
and the varnumber: 5040, 4050, or 7C40.
When you did the givepokemon script, did you put setflag 0x828 before the release command?
Sorry it didn't help.
Another pointless tidbit of information, when you are scripting a line of movements in XSE (example #raw 0x10 0xFE )
You can get rid of the 0x parts, because anything after #raw, XSE reads as hex.
(#raw 10 FE )
Saves time I think, but try 0300 as the Unknown as well. (If the other one, 0003 doesn't work.
( I know I gave a lot of useless info, but I think removing 0x from movement codes are faster) Lawl

duturnocheese
October 4th, 2008, 02:18 PM
Try this for givepokemon:
givepokemon 0x9 0x70 0x0 0x0 0x0 0x0
and then for battle:
wildbattle 0x250 0x70 0x0 0x0 0x0 0x0

Hi I'm having a problem scripting every time I click on the guy or pokemon to activate the script it won't active meaning it won't give the the blastoise or I can't fight Ho-oh (note: It was a test run)

#dynamic 0x3B4DF4

#org @emergencygivepokemon
lock
faceplayer
message @give
boxset 6
givepokemon 9 70 0 0 0 0
release
end

#org @give
= Quick!/pTake Blastoise to kill/nHo-oh!

Ho-Oh script:

#dynamic 0x3B4DF5

#org @bossfight
lock
faceplayer
message @Ho-Oh
boxset 6
cry 0xA1 250
nop
nop
wildbattle 250 70 0 0 0 0
fadescreen 0
#raw 53 0F 80
setflag 200
release
end

#org @Ho-Oh
= HO-OH: KYOOOO



and also I can't press the compile button because it won't come up, but the debug thing next to it when I click on it it compiles

also I downloaded this from studio pokemon XSE

I am not sure why this does not work.
I would appreciate it if anyone could help me out.
I am only a beginner at scripting.

#Dynamic 0x9C8E80
#org @start
checkflag 0x860
if 0x0 goto @hey!
if 0x1 goto @end
end
#org @hey!
lock
msgbox @icant
boxset 0x6
applymovement 0xFF @back
waitmovement 0x0
release
end
#org @icant
= I can't go out of (name) town/nwithout a pokemon.
#org @back
#raw 0x00 0xFE
#org @end
release
end

0m3GA ARS3NAL
October 4th, 2008, 03:11 PM
Ok, some info to anyone who has trouble compiling scripts in XSE.
When you want to compile, and the compile button doesn't pop up, that means your ROM is not loaded.
But get this, you don't NEED to load your ROM in order to compile.
You can save your script (Like you should anyway) into a folder, somewhere on your computer.
Then, you can go to "Tools" and select "Batch Compiler" Then, simply choose the ROM, and the folder where your scripts are saved.
The scripts will be shown in a list, with check boxes next to them.
Check off each script that you want to compile, and it will compile them to the rom.

There is a bod thing doing this though.
If your Offsets are the same thing. (example, I use the word start for almost all of my beginning offsets.

Example of script:
#dynamic 0x800000

#org @start )
If they are all the same, it will be a bit difficult locating and telling apart your scripts.

The good thing about doing batch compiling, is that you can compile large numbers of scripts into your ROM at once!

GKS
October 4th, 2008, 03:39 PM
This was something I was looking for today!
Thanks a lot, I was thinking of making the transferring of scripting from Poke Script to XSE.

0m3GA ARS3NAL
October 4th, 2008, 04:21 PM
This was something I was looking for today!
Thanks a lot, I was thinking of making the transferring of scripting from Poke Script to XSE.I just realized that that would be a great, and helpful program! (Unfortunately, I can't use Visual Basic, because my PC is just to slow, Almost to slow to even run an emulator to test my ROMs)
But if you need help transferring a Pokescript into XSE format, I could do it.

Also, Does anyone know of a programing language, that I can use to make programs, that would work on a slow PC. (I think mine has like, either 256mb of RAM, or 512mb of RAM, really slow you see...)

Darthatron
October 4th, 2008, 08:58 PM
I just realized that that would be a great, and helpful program! (Unfortunately, I can't use Visual Basic, because my PC is just to slow, Almost to slow to even run an emulator to test my ROMs)
But if you need help transferring a Pokescript into XSE format, I could do it.

Also, Does anyone know of a programing language, that I can use to make programs, that would work on a slow PC. (I think mine has like, either 256mb of RAM, or 512mb of RAM, really slow you see...)
How will it be useful? They aren't even that different, to be honest. If you knew what you were doing in PokeScript, then XSE should be a breeze.

Also VB6 worked fine on my computer for years, and I had 192MB of RAM. >_>

0m3GA ARS3NAL
October 4th, 2008, 11:23 PM
How will it be useful? They aren't even that different, to be honest. If you knew what you were doing in PokeScript, then XSE should be a breeze.

Also VB6 worked fine on my computer for years, and I had 192MB of RAM. >_>
Well, then it must be my processing speed... And I think it would be useful for the people that cant seem to grasp how to convert Pokescript OR ScriptEd into XSE, don't get me wrong, I am very skilled in both.
I just think it would be helpful for preople that for some reason cant learn XSE for some reason...
(My PM box always getting filled with my friends telling me to make there Pokescript stuff work in XSE for them, I tell them to just learn XSE, but they just don't get it...)
But where can I find VB6? I cant find it, Googled it and everything.
(I tried VB6, Visual Basic 6, and a whole bunch of other things, but I can't find it...)

Pokepal17
October 5th, 2008, 08:49 AM
Hi, can somebody please tell me how to do a trainer script and explain it?

PokéHacker
October 21st, 2008, 10:38 PM
hockeypanda 32 why you don't post 5,6,7 chapter?

~Teh Panda~
November 4th, 2008, 11:00 PM
Can a mod change the name of this thread to " [TehTehTehTeh's] XSE Basic/Medium tutorial"

EDIT: Thanks!

Jamiras843
November 7th, 2008, 09:07 PM
I find these tutorials pretty helpfull each one has a little information the others did not.

Cheesymitten
November 9th, 2008, 12:41 PM
A basic one would look like this, just incorporate a givepokemon event into the script where you want it to be.


#dynamic 0x800000

#org @givepokemon
lock
faceplayer
Message @give
boxset 6
givepokemon 1 5 0 0 0 0
release
end

@org @give
= Here is a Bulbasaur


Sorry if anyone else has asked but what would a mareep be for the xse scipt?

-DarK-
November 9th, 2008, 12:47 PM
Sorry if anyone else has asked but what would a mareep be for the xse scipt?

#dynamic 0x800000

#org @givepokemon
lock
faceplayer
Message @give
boxset 6
givepokemon 0xB3 0x5 0x0 0x0 0x0 0x0
release
end

@org @give
= Here is a Mareep

There you go :)

Cheesymitten
November 9th, 2008, 12:49 PM
#dynamic 0x800000

#org @givepokemon
lock
faceplayer
Message @give
boxset 6
givepokemon 0xB3 0x5 0x0 0x0 0x0 0x0
release
end

@org @give
= Here is a Mareep

There you go :)
WOAH! how did you know that?

pokefreak2
November 9th, 2008, 09:54 PM
the reason why i think you can't leave town is
because dynamic is to close to org

Ninja Caterpie
November 10th, 2008, 12:07 AM
WOAH! how did you know that?
Mareep is some number in the Pokedex, then use the hex/dec calculator in XSE to change it to hex. Bingo.

HackMew
November 10th, 2008, 04:21 AM
Mareep is some number in the Pokedex, then use the hex/dec calculator in XSE to change it to hex. Bingo.

Yes, but there's no need. What about:


#include stdpoke.rbh

'something...
givepokemon PKMN_MAREEP 0x5 0x0 0x0 0x0 0x0
'...

Cheesymitten
November 10th, 2008, 09:11 AM
what does that mean sorry i'm really confused by this stuff :D

HackMew
November 10th, 2008, 10:25 AM
what does that mean sorry i'm really confused by this stuff :D

In plain English it means you don't need to remember weird numbers nor to convert them to hex or something.

Cheesymitten
November 10th, 2008, 11:13 AM
ah thanks :) for your help

Bluewarwolf
November 10th, 2008, 08:14 PM
What's wrong with this script? I haven't been able to get it to work..... all the person does is just stand there, and nothing happens. Also, no other script works either :( One other thing..... is it normal that when you start the game after scripting, that the game is a little.... "laggy" I guess you'd say? Like, I can press Left and my character goes Left twice or all the way, even if I let go. Just an example. Anyway, here's the script:


#dynamic 0x71B69C

#org @start
lock
faceplayer
message @1
boxset 0x6
givepokemon 0x6 0x5 0x0 0x0 0x0 0x0
message @2
boxset 0x6
release
end

#org @1
= Have a Charizard\n, on the house :)

#org @2
= You got Charizard!\nWhat a nice guy.

zak
November 11th, 2008, 04:34 AM
hey i've been outa the game for a while, i'm not even 100% sure i should post this here, but yeah, i used to script with pokescript this is like a year+ ago i haven't touched a rom or emulator in ages (runscape got me) and now i wana get back into scripting so i'm working with xse, but i need to know how to find free space for scripts, aby suggestions on a tool or on how i can find free spaces for scripts?

Thanks in avance ~Zak

Hiche..
November 11th, 2008, 05:36 AM
hey i've been outa the game for a while, i'm not even 100% sure i should post this here, but yeah, i used to script with pokescript this is like a year+ ago i haven't touched a rom or emulator in ages (runscape got me) and now i wana get back into scripting so i'm working with xse, but i need to know how to find free space for scripts, aby suggestions on a tool or on how i can find free spaces for scripts?

Thanks in avance ~Zak

You can use Free Space finder.
But I advise you with HEX. Search for a lot of FFFF, and you will see on the left, the offset.
Type it in the #dynamic 0xoffset.

If you want also, XSE has a free space finder( Tools>Free Space Finder)

zak
November 11th, 2008, 06:11 AM
You can use Free Space finder.
But I advise you with HEX. Search for a lot of FFFF, and you will see on the left, the offset.
Type it in the #dynamic 0xoffset.

If you want also, XSE has a free space finder( Tools>Free Space Finder)

wow can't believe i missed that lol, thanks alot.

*edit* i load my rom etc, or even when i open a script with advance map, the free space finder on xse is always grey and i'm unable to click it 0.0 any idea why?

HackMew
November 11th, 2008, 06:17 AM
wow can't believe i missed that lol, thanks alot.

*edit* i load my rom etc, or even when i open a script with advance map, the free space finder on xse is always grey and i'm unable to click it 0.0 any idea why?

Yes, you need to put FSF inside the folder where XSE is. Besides, you will need FSF only one basically.

zak
November 11th, 2008, 06:41 AM
Yes, you need to put FSF inside the folder where XSE is. Besides, you will need FSF only one basically.

fsf being? [message to short]

Christos
November 11th, 2008, 06:56 AM
fsf being? [message to short]

FSF is Free Space Finder. Also, please don't use fillers to bypass the 25 character limit.♥

zak
November 13th, 2008, 07:53 AM
FSF is Free Space Finder. Also, please don't use fillers to bypass the 25 character limit.♥

sorry, been a long time since i posted on ere lol, also in this tutorials am i allowed to ask people to make me a script? obviouslyl ike not every script for my game, but like a few examples that i could fiddle around with? :nervous:

~Teh Panda~
November 13th, 2008, 05:28 PM
sorry, been a long time since i posted on ere lol, also in this tutorials am i allowed to ask people to make me a script? obviouslyl ike not every script for my game, but like a few examples that i could fiddle around with? :nervous:

Tat is the script request / help thread ;) in the scrapbox and it is a sticky

~Teh Panda~
December 1st, 2008, 10:20 PM
Hmmm... Would anyone care for my next tutorial parts?
Or do you guys want this thread to die...

0m3GA ARS3NAL
December 1st, 2008, 10:56 PM
Hmmm... Would anyone care for my next tutorial parts?
Or do you guys want this thread to die...

I would enjoy it.
Seems to have been taking some time, but you know what you are doing, so a continuation of the tut would be a great thing! ^_^

Oh_Delilah
December 2nd, 2008, 02:04 PM
Hmmm... Would anyone care for my next tutorial parts?
Or do you guys want this thread to die...

Agreed, I like it, though I have a couple of questions... Not about the tutorial but about scripting...

One, with the applymovement command, using Advance Map 1.92 (Or something) would you make the script under, Events > Scripts or Events > People ?

Two, are the flags random free space? Or is there a set list of every single different flag value... Can I just choose any number I wish and put it as a flag? For example 0x456 and 0x85F ?

Cheers

0m3GA ARS3NAL
December 2nd, 2008, 04:23 PM
Agreed, I like it, though I have a couple of questions... Not about the tutorial but about scripting...

One, with the applymovement command, using Advance Map 1.92 (Or something) would you make the script under, Events > Scripts or Events > People ?

Two, are the flags random free space? Or is there a set list of every single different flag value... Can I just choose any number I wish and put it as a flag? For example 0x456 and 0x85F ?

Cheers

I'll answer both of your questions.

If you want to make an applymovement script happen when you click on a person, then click on the "Events" tab and increase the number of people by 1, or replace another persons script with yours.

If you want it to activate when you step on a certain spot, then you want to increase the number of "scripts" on the map, and assign your new script to it.
Remember to use:
Unknown 0300
Var Number 4050.


And now question 2...
The flags are not just random space, there are flags already in the game, many not even used by the original game that we refer to as "free flags"

Free Flags :
200 - 29F
500 - 79F
1000 - 109F

It is a bit unsafe using the set of 200 flags, marked in bright red, since they seem to be a bit unsafe, and may cause glitching, and screwiness...
The others, should be fine.
The most safe to use are 1000 - 109F
(Remember that flags are counted in hex)
Hope that answers your question! :t157:

Oh_Delilah
December 2nd, 2008, 10:17 PM
I'll answer both of your questions.

If you want to make an applymovement script happen when you click on a person, then click on the "Events" tab and increase the number of people by 1, or replace another persons script with yours.

If you want it to activate when you step on a certain spot, then you want to increase the number of "scripts" on the map, and assign your new script to it.
Remember to use:
Unknown 0300
Var Number 4050.


And now question 2...
The flags are not just random space, there are flags already in the game, many not even used by the original game that we refer to as "free flags"

Free Flags :
200 - 29F
500 - 79F
1000 - 109F

It is a bit unsafe using the set of 200 flags, marked in bright red, since they seem to be a bit unsafe, and may cause glitching, and screwiness...
The others, should be fine.
The most safe to use are 1000 - 109F
(Remember that flags are counted in hex)
Hope that answers your question! :t157:

Hey Omega Arsenal, You are a true champion mate. Thank you so much, you saved me a lot of time.

I will write those Flags down and remember them. Man, that makes things a lot easier to understand, thank you again.


Binky

~Teh Panda~
December 3rd, 2008, 02:29 PM
Thank you omega arsenal for the open flags list ;)

0m3GA ARS3NAL
December 4th, 2008, 03:53 PM
Well... I sem to have made an error, the free flags are extended...

1000 - 3FFF

Hehe... that is a rough 12287 free flags to use.... that is alot peopel... (Not an exact number btw, but you get the point... hehe!)

Zanzabar
December 4th, 2008, 06:20 PM
Very nice tut, for a scripting noob like myself it was very helpful,
but I have a question not about the tut but about scripting.
How do i make a script for items that are just laying on the ground?

amtrax
December 4th, 2008, 07:10 PM
can someone help me?
see pic for problem

0m3GA ARS3NAL
December 4th, 2008, 11:11 PM
can someone help me?
see pic for problem

I have been in a helping mood these past few days...
^_^

Just add $ in front of the Offset and you will be fine!
Btw... this is very off topic... but is my font the same green color, and written in system font?
This new Browser of mine is strange...

8000EB - WRONG
$8000EB - Right!

s0nido
December 5th, 2008, 02:23 PM
I did exactly as I was told to do with the speaking script, but the character that was following the script didn't speak the words it was supposed to. It just said: '<player's name>, over here! Let's hurry home!'

The the character would run off back to Littleroot town.

Could someone help me here?

amtrax
December 8th, 2008, 11:11 PM
Just add $ in front of the Offset and you will be fine!

Thanks that works but...
when i go 'open script' to check my script has been added all it has is

'-----------------------
#org 0x(offset added to person)

This is the script i have attempting to add:


#dynamic 0x2DD100
#ORG @Main
Lock
FacePlayer
Message @Speak
Boxset 0x6
Release
End
#ORG @Speak
= Triplet's Mom: Hi.\nHave you met my children?\lTheir names are Green, Red and Blue.

Hiche..
December 8th, 2008, 11:15 PM
Thanks that works but...
when i go 'open script' to check my script has been added all it has is

'-----------------------
#org 0x(offset added to person)

This is the script i have attempting to add:


#dynamic 0x2DD100
#ORG @Main
Lock
FacePlayer
Message @Speak
Boxset 0x6
Release
End
#ORG @Speak
= Triplet's Mom: Hi.\nHave you met my children?\lTheir names are Green, Red and Blue.


When the script compiled, did you copy the offset of it to Advance map, like this for example; $2DD100. You should include it.

#dynamic 0x2DD100

#ORG @Main
Message @Speak
Boxset 0x2
End

#ORG @Speak
= Triplet's Mom: Hi.\nHave you met my children?\lTheir names are Green, Red and Blue.

Try this, it saves bytes. Boxset 0x2 acts as a lock, and faceplayer.

pokefreak2
December 15th, 2008, 11:21 AM
everyone this is a rock climb script and TehTehTehTeh
you can put on ur tut


#dynamic 0x800000

#org @start
checkflag 0x828
if b_false goto @false
#raw 0x7C 0x16 0x00
if b_false goto @false
message @noclimb
lock
faceplayer
message @tutorial
boxset 5
compare LASTRESULT 0
if b_true goto @yes
#raw 0x68
#raw 0x9C 0x25 0x00
#raw 0x27
applymovement 0xFF @move
compare LASTRESULT 1
if b_true goto @no
release
end

#org @false
message @noclimb
boxset 6
release
end

#org @noclimb
= these rocks look climable \n a pokemon might be able to \nclimb them

#org @tutorial
= these rocks look climable do you\nclimb up them?

#org @yes
message @pressyes
boxset 6
release
end

#org @no
message @pressno
boxset 6
release
end

#org @pressyes
= You didnt climb

#org @pressno
= You climbed down the rocks

#org @move
#raw 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x1D 0x1D 0x1D 0x1D 0x1D 0xFE

#dynamic 0x800000

#org @start
checkflag 0x800
if b_false goto @false
#raw 0x7C 0x16 0x00
if b_false goto @false
message @noclimb
lock
faceplayer
message @tutorial
boxset 5
compare LASTRESULT 0
if b_true goto @yes
#raw 0x68
#raw 0x9C 0x25 0x00
#raw 0x27
applymovement 0xFF @move
compare LASTRESULT 1
if b_true goto @no
release
end

#org @false
message @noclimb
boxset 6
release
end

#org @noclimb
= these rocks look climable \n a pokemon might be able to \nclimb them

#org @tutorial
= these rocks look climable do you\nclimb up them?

#org @yes
message @pressyes
boxset 6
release
end

#org @no
message @pressno
boxset 6
release
end

#org @pressyes
= You didnt climb

#org @pressno
= You climbed up the rocks

#org @move
#raw 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x1e 0x1e 0x1e 0x1e 0x1e 0xFE

Dr Gregory House
December 16th, 2008, 06:26 AM
hi guys,
i was building a script:

#Dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x828
if b_true goto @done
Message @givepoke
boxset 6
closeonkeypress
givepokemon 0x1 0x5 0xCD 0x0 0x0 0x0
givepokemon 0x4 0x5 0xD7 0x0 0x0 0x0
givepokemon 0x7 0x5 0xD1 0x0 0x0 0x0
Message @receivepoke
boxset 6
closeonkeypress
Message @pokeballs
boxset 6
closeonkeypress
applymovement 0x4 @exclamationmark
waitmovement 0
Message @whataboutme2
boxset 6
closeonkeypress
applymovement 0xFF @whataboutme
waitmovement 0
applymovement 0x4 @move
waitmovement 0
applymovement 0xFF @reface
waitmovement 0
Message @okokok
boxset 6
closeonkeypress
Message @timetogo
boxset 6
closeonkeypress
Message @rivalgo
closeonkeypress
applymovement 0x4 @runoutdoor
waitmovement 0
setflag 0x828
release
end

#org @done
Message @alreadygave
boxset 6
closeonkeypress
release
end

#org @givepoke
= Hello \v\h01, my name is Bard and\nI am the Pokémon Professor here.\pI have 3 Pokémon here for you.\nHere you go!

#org @receivepoke
= \v\h01 received the Charmander, \nSquirtle and Bulbasaur.\pYou can nickname them later.\nI also have these for you.

#org @pokeballs
= \v\h01 received 10 Pokéballs to use\nlater.\pYou can use those to catch Pokémon!

#org @alreadygave
= I've already given you your Pokémon,\nnow get going \v\h01!

#org @whataboutme2
= \v\h06: MY TURN!

#org @okokok
= Bard: Ok \v\h06, here you go.\nBe patient next time!

#org @timetogo
= Well, it seems that it's time for\nyou to go. Your goal is to\pbecome the strongest trainers\never! I'm counting on you!

#org @rivalgo
= \v\h06: Haha, I will be better than\nyou \v\h01! It'll be easy! \pYou'll see!\nSmell ya later!

#org @exclamationmark
#raw 0x62
#raw 0xFE

#org @whataboutme
#raw 0x20
#raw 0x02
#raw 0xFE

#org @move
#raw 0x20
#raw 0x01
#raw 0xFE

#org @reface
#raw 0x01
#raw 0xFE

#org @runoutdoor
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x60
#raw 0xFE

But where it says #raw 0x60 is there another command that I can use to remove the sprite from the map, rather than just making them invisible yet still an obstacle?
oh and does anyone have the codes for the rival music (out of battle) and the givepokemon jingle? and the receive item jingle, if there is one.
also, if i was to use them, how would i insert them into my script.
thanks heaps.

HackMew
December 16th, 2008, 06:56 AM
hi guys,
i was building a script:

#Dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x828
if b_true goto @done
Message @givepoke
boxset 6
closeonkeypress
givepokemon 0x1 0x5 0xCD 0x0 0x0 0x0
givepokemon 0x4 0x5 0xD7 0x0 0x0 0x0
givepokemon 0x7 0x5 0xD1 0x0 0x0 0x0
Message @receivepoke
boxset 6
closeonkeypress
Message @pokeballs
boxset 6
closeonkeypress
applymovement 0x4 @exclamationmark
waitmovement 0
Message @whataboutme2
boxset 6
closeonkeypress
applymovement 0xFF @whataboutme
waitmovement 0
applymovement 0x4 @move
waitmovement 0
applymovement 0xFF @reface
waitmovement 0
Message @okokok
boxset 6
closeonkeypress
Message @timetogo
boxset 6
closeonkeypress
Message @rivalgo
closeonkeypress
applymovement 0x4 @runoutdoor
waitmovement 0
setflag 0x828
release
end

#org @done
Message @alreadygave
boxset 6
closeonkeypress
release
end

#org @givepoke
= Hello \v\h01, my name is Bard and\nI am the Pokémon Professor here.\pI have 3 Pokémon here for you.\nHere you go!

#org @receivepoke
= \v\h01 received the Charmander, \nSquirtle and Bulbasaur.\pYou can nickname them later.\nI also have these for you.

#org @pokeballs
= \v\h01 received 10 Pokéballs to use\nlater.\pYou can use those to catch Pokémon!

#org @alreadygave
= I've already given you your Pokémon,\nnow get going \v\h01!

#org @whataboutme2
= \v\h06: MY TURN!

#org @okokok
= Bard: Ok \v\h06, here you go.\nBe patient next time!

#org @timetogo
= Well, it seems that it's time for\nyou to go. Your goal is to\pbecome the strongest trainers\never! I'm counting on you!

#org @rivalgo
= \v\h06: Haha, I will be better than\nyou \v\h01! It'll be easy! \pYou'll see!\nSmell ya later!

#org @exclamationmark
#raw 0x62
#raw 0xFE

#org @whataboutme
#raw 0x20
#raw 0x02
#raw 0xFE

#org @move
#raw 0x20
#raw 0x01
#raw 0xFE

#org @reface
#raw 0x01
#raw 0xFE

#org @runoutdoor
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x60
#raw 0xFE

But where it says #raw 0x60 is there another command that I can use to remove the sprite from the map, rather than just making them invisible yet still an obstacle?
oh and does anyone have the codes for the rival music (out of battle) and the givepokemon jingle? and the receive item jingle, if there is one.
also, if i was to use them, how would i insert them into my script.
thanks heaps.

You should never use movements to use hide a sprite forever, indeed.
The proper way is to use the hidesprite + setflag combo.
Basically you set the People ID (for example 1001) and then you do this:


hidesprite 0x[People #]
setflag 0x[People ID]


Gone. To make it nicer, you may want to use the fadescreen command.

For the rival music I would suggest you decompiling the original scripts. I'm pretty sure you would find it. Sappy may be useful as well.
To insert a "jingle" you use the fanfare/waitfanfare commands.
Example below:


fanfare 0x13E
' place for givepokemon/giveitem + msgbox
waitfanfare

Dr Gregory House
December 16th, 2008, 07:03 AM
You should never use movements to use hide a sprite forever, indeed.
The proper way is to use the hidesprite + setflag combo.
Basically you set the People ID (for example 1001) and then you do this:


hidesprite 0x[People #]
setflag 0x[People ID]


Gone. To make it nicer, you may want to use the fadescreen command.

For the rival music I would suggest you decompiling the original scripts. I'm pretty sure you would find it. Sappy may be useful as well.
To insert a "jingle" you use the fanfare/waitfanfare commands.
Example below:


fanfare 0x13E
' place for givepokemon/giveitem + msgbox
waitfanfare


thanks hackmew, you're the bestest!
btw, how do we know which people ID's aren't used? i can't find a list for that anywhere.
cheers

HackMew
December 16th, 2008, 09:01 AM
thanks HackMew, you're the bestest!
btw, how do we know which people ID's aren't used? i can't find a list for that anywhere.
cheers

LOL, thanks.
Anyway, People ID are just like flags. So 0x1001, 0x1002 and so on till 0x3FFF.

Juan
December 16th, 2008, 11:29 AM
How functions the special 0x187 and the loadbytefrompointer?

Dr Gregory House
December 17th, 2008, 11:06 AM
basically i've been working on that script...

#Dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x828
if b_true goto @done
Message @givepoke
boxset 6
closeonkeypress
givepokemon 0x4 0x5 0xD7 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
Message @receivepoke
boxset 6
closeonkeypress
fanfare 0x13E
waitfanfare
Message @pokeballs
boxset 6
closeonkeypress
applymovement 0x4 @exclamationmark
waitmovement 0
Message @whataboutme2
boxset 6
closeonkeypress
applymovement 0xFF @whataboutme
waitmovement 0
applymovement 0x4 @move
waitmovement 0
applymovement 0xFF @reface
waitmovement 0
Message @okokok
boxset 6
closeonkeypress
fanfare 0x13E
waitfanfare
Message @rivalreceive
boxset 6
closeonkeypress
applymovement 0x4 @battlestance1
waitmovement 0
applymovement 0xFF @battlestance2
waitmovement 0
call @trainer
applymovement 0x4 @reface
waitmovement 0
applymovement 0xFF @reface
waitmovement 0
Message @timetogo
boxset 6
closeonkeypress
playsong 0x13B 0x0
Message @rivalgo
boxset 6
closeonkeypress
applymovement 0x4 @runoutdoor
waitmovement 0
fadedefault
hidesprite 0x4
setflag 0x1001
setflag 0x828
release
end

#org @done
Message @alreadygave
boxset 6
closeonkeypress
release
end

#org @trainer
trainerbattle 0 0x05A 0x0 @battleme @oh
return

#org @givepoke
= Hello \v\h01, my name is Bard and\nI am the Pokémon Professor here.\pI have a Pokémon here for you.\nHere you go!

#org @receivepoke
= \v\h01 received the Charmander.\n... ... ...\pYou can nickname it later.\nI also have these for you.

#org @pokeballs
= \v\h01 received 10 Pokéballs to use\nlater.\pYou can use those to catch Pokémon!

#org @alreadygave
= I've already given you your Pokémon,\nnow get going \v\h01!

#org @whataboutme2
= Gareth: MY TURN!

#org @okokok
= Bard: Ok \v\h06, here you go.\nBe patient next time!

#org @rivalreceive
= Gareth received the Mudkip.\n... ... ...

#org @battleme
= \v\h01, battle me now!!

#org @oh
= Gareth: Darn, I lost...

#org @timetogo
= Well, it seems that it's time for\nyou to go. Your goal is to\pbecome the strongest trainers\never! I'm counting on you!

#org @rivalgo
= Gareth: I will be better than you\n \v\h01! It'll be easy! \pYou'll see!\nSmell ya later!

#org @exclamationmark
#raw 0x62
#raw 0xFE

#org @whataboutme
#raw 0x20
#raw 0x02
#raw 0xFE

#org @move
#raw 0x20
#raw 0x01
#raw 0xFE

#org @reface
#raw 0x01
#raw 0xFE

#org @battlestance1
#raw 0x03
#raw 0xFE

#org @battlestance2
#raw 0x02
#raw 0xFE

#org @runoutdoor
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0xFE


the problem that i am having is a can do the trainer battle, but after that nothing hapens and i have to walk out of the room and back in again and the script continues normally from after the trainerbattle. is there a way to fix this?
also, what i want to know is are there any shorter lines that i can use in there?
if HackMew or anyone else awesome can help then thanks alot!
cheers

HackMew
December 17th, 2008, 12:08 PM
How functions the special 0x187 and the loadbytefrompointer?

I have no idea about special 0x187 but loadbytefrompointer does just what the Command Help says.


basically i've been working on that script...

#Dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x828
if b_true goto @done
Message @givepoke
boxset 6
closeonkeypress
givepokemon 0x4 0x5 0xD7 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
Message @receivepoke
boxset 6
closeonkeypress
fanfare 0x13E
waitfanfare
Message @pokeballs
boxset 6
closeonkeypress
applymovement 0x4 @exclamationmark
waitmovement 0
Message @whataboutme2
boxset 6
closeonkeypress
applymovement 0xFF @whataboutme
waitmovement 0
applymovement 0x4 @move
waitmovement 0
applymovement 0xFF @reface
waitmovement 0
Message @okokok
boxset 6
closeonkeypress
fanfare 0x13E
waitfanfare
Message @rivalreceive
boxset 6
closeonkeypress
applymovement 0x4 @battlestance1
waitmovement 0
applymovement 0xFF @battlestance2
waitmovement 0
call @trainer
applymovement 0x4 @reface
waitmovement 0
applymovement 0xFF @reface
waitmovement 0
Message @timetogo
boxset 6
closeonkeypress
playsong 0x13B 0x0
Message @rivalgo
boxset 6
closeonkeypress
applymovement 0x4 @runoutdoor
waitmovement 0
fadedefault
hidesprite 0x4
setflag 0x1001
setflag 0x828
release
end

#org @done
Message @alreadygave
boxset 6
closeonkeypress
release
end

#org @trainer
trainerbattle 0 0x05A 0x0 @battleme @oh
return

#org @givepoke
= Hello \v\h01, my name is Bard and\nI am the Pokémon Professor here.\pI have a Pokémon here for you.\nHere you go!

#org @receivepoke
= \v\h01 received the Charmander.\n... ... ...\pYou can nickname it later.\nI also have these for you.

#org @pokeballs
= \v\h01 received 10 Pokéballs to use\nlater.\pYou can use those to catch Pokémon!

#org @alreadygave
= I've already given you your Pokémon,\nnow get going \v\h01!

#org @whataboutme2
= Gareth: MY TURN!

#org @okokok
= Bard: Ok \v\h06, here you go.\nBe patient next time!

#org @rivalreceive
= Gareth received the Mudkip.\n... ... ...

#org @battleme
= \v\h01, battle me now!!

#org @oh
= Gareth: Darn, I lost...

#org @timetogo
= Well, it seems that it's time for\nyou to go. Your goal is to\pbecome the strongest trainers\never! I'm counting on you!

#org @rivalgo
= Gareth: I will be better than you\n \v\h01! It'll be easy! \pYou'll see!\nSmell ya later!

#org @exclamationmark
#raw 0x62
#raw 0xFE

#org @whataboutme
#raw 0x20
#raw 0x02
#raw 0xFE

#org @move
#raw 0x20
#raw 0x01
#raw 0xFE

#org @reface
#raw 0x01
#raw 0xFE

#org @battlestance1
#raw 0x03
#raw 0xFE

#org @battlestance2
#raw 0x02
#raw 0xFE

#org @runoutdoor
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0x1D
#raw 0xFE


the problem that i am having is a can do the trainer battle, but after that nothing hapens and i have to walk out of the room and back in again and the script continues normally from after the trainerbattle. is there a way to fix this?
also, what i want to know is are there any shorter lines that i can use in there?
if HackMew or anyone else awesome can help then thanks alot!
cheers

Answer can be found here (http://www.pokecommunity.com/showpost.php?p=4202128&postcount=2642).

Cheesymitten
December 23rd, 2008, 08:22 AM
Hi
Sorry i'm a bit of a question person O.o but this is really bugging me #Dynamic 0x6B0000
#org @start
lock
faceplayer
= It's a note from the Prof...\n[blue_fr][PLAYER] i think that you will need this\lcertain pokemon on your quest from me\land talking of quests you haven't got the\lfaintest idea i'm talking about are you?\lwell this is my mission for you.\lyou must train up this LARVITAR\lI have captured for you.\lAnd train it up to become what your father once was\la great trainer but seeing as i'm not here and away i want you\l to come to Virdian city were my next letter\lwill be...\lGood lu.....\l[black_fr]the rest of the text is smudged from the rain
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
setflag 0x828
release
end

The player can walk away from the ball and not locking with the pokeball that has the "note and pokeball" inside it :) thanks if you can help me

HackMew
December 23rd, 2008, 09:50 AM
Hi
Sorry i'm a bit of a question person O.o but this is really bugging me #Dynamic 0x6B0000
#org @start
lock
faceplayer
= It's a note from the Prof...\n[blue_fr][PLAYER] i think that you will need this\lcertain pokemon on your quest from me\land talking of quests you haven't got the\lfaintest idea i'm talking about are you?\lwell this is my mission for you.\lyou must train up this LARVITAR\lI have captured for you.\lAnd train it up to become what your father once was\la great trainer but seeing as i'm not here and away i want you\l to come to Virdian city were my next letter\lwill be...\lGood lu.....\l[black_fr]the rest of the text is smudged from the rain
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
setflag 0x828
release
end

The player can walk away from the ball and not locking with the pokeball that has the "note and pokeball" inside it :) thanks if you can help me

Pretty screwed up... See the script below:

#dynamic 0x6B0000

#org @start
msgbox @note
callstd 0x2
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
setflag 0x828
end

#org @note
= It's a note from the Prof...\n[blue_fr][PLAYER] i think that you will need this\lcertain pokemon on your quest from me\land talking of quests you haven't got the\lfaintest idea i'm talking about are you?\lwell this is my mission for you.\lyou must train up this LARVITAR\lI have captured for you.\lAnd train it up to become what your father once was\la great trainer but seeing as i'm not here and away i want you\l to come to Virdian city were my next letter\lwill be...\lGood lu.....\l[black_fr]the rest of the text is smudged from the rain.

Cheesymitten
December 24th, 2008, 01:37 AM
Thanks for taking your time your the best ;)hopefully i won't be asking to many questions next time...O.o

Tropical Sunlight
December 24th, 2008, 09:07 AM
Hey just wondering... When are the other parts coming
??

~Teh Panda~
December 24th, 2008, 01:37 PM
Hey just wondering... When are the other parts coming
??

Well, i am really busy with my hack right now, so after beta 1.

EDIT: Part 5 added :)

iTeruri
December 25th, 2008, 02:53 PM
#dynamic 0x71AABF

#org @start

lock
checkflag 0x828
if b_true goto @recieved
givepokemon 133 5 0 0 0 0
setflag 0x828
release
end

#org @recieved
release
end


This should give the player a eevee (only once) if they live their room. However, It freezes te game! I tried everything I could think off.
This is my first day of scripting in hacks (actualy the first time I hack). The stupid thing is that I worked, then I wanted to add a give item so the player has pokéballs but then the script stoped working. I changed some things around, but now I can't get back to the working script.
Memo to self: always save your script.

Could someone point me in the right deriction?

пзо
December 25th, 2008, 03:19 PM
Fixed. you frogot the 0x0 instead of the 0's

#dynamic 0x71AABF

#org @start
checkflag 0x828
if b_true goto @recieved
givepokemon 133 5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @got
boxset 0x2
waitfanfare
setflag 0x828
release
end

#Org @got
= \c\h01\h02You Recieved a EEVEE!

#org @recieved
release
end

--
This Script will:

Give you a Eevee,
and say, you recieved Eevee.
and it will play a little sound! xD
Good luck..

~Teh Panda~
December 25th, 2008, 03:53 PM
Fixed. you frogot the 0x0 instead of the 0's

#dynamic 0x71AABF

#org @start
checkflag 0x828
if b_true goto @recieved
givepokemon 133 5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @got
boxset 0x2
waitfanfare
setflag 0x828
release
end

#Org @got
= \c\h01\h02You Recieved a EEVEE!

#org @recieved
release
end

--
This Script will:

Give you a Eevee,
and say, you recieved Eevee.
and it will play a little sound! xD
Good luck..

You do not need those x0 at the end. just 0's but I did forget that lol, I was to tired well no excuses thanks

Makorin
December 26th, 2008, 11:47 AM
#dynamic 0x71AABF

#org @start

lock
checkflag 0x828
if b_true goto @recieved
givepokemon 133 5 0 0 0 0
setflag 0x828
release
end

#org @recieved
release
end


This should give the player a eevee (only once) if they live their room. However, It freezes te game! I tried everything I could think off.
This is my first day of scripting in hacks (actualy the first time I hack). The stupid thing is that I worked, then I wanted to add a give item so the player has pokéballs but then the script stoped working. I changed some things around, but now I can't get back to the working script.
Memo to self: always save your script.

Could someone point me in the right deriction?

well just like neo had:

#dynamic 0x71AABF

#org @start
checkflag 0x828
if b_true goto @recieved
givepokemon 133 5 0 0 0 0
fanfare 0x13E
msgbox @got
boxset 0x2
waitfanfare
setflag 0x828
release
end

#Org @got
= \c\h01\h02You recieved a EEVEE!

#org @recieved
release
end


but without the 0x0 just 0 since XSE will change that when you compile...
but if u have that and it still doesnt work (which it should NOT) there is something in A-map that you must do...

if you are putting it on a script tile you must change the Var number and the Unknown number
the most common is 0003 [Unknown] and 4050 [Var Number] (5040 should work for Var number too)

iTeruri
December 26th, 2008, 03:08 PM
Yes, it works. ^^I also made a somewhat bigger script:
Your dad ask you if you need pokéballs. If you answer yes, he will give you 5. If you say no, he says something along the lines of: Ok, just say so when you need them. A flag is set so you can only do it once.

However, I still need some help:

- Trainerbattle, How does it work? I changed an empty trainer with HackMew's A-trainer. How Can I place this trainer on a route? I studied a trainer a bit, but it was very confusing with alot offsets! You should make a tutorial on it.
- How can you make someone heal your pokémon? I guess it's something with special cause that's what I saw in a PokéCenter script.

HackMew
December 27th, 2008, 03:31 AM
Yes, it works. ^^I also made a somewhat bigger script:
Your dad ask you if you need pokéballs. If you answer yes, he will give you 5. If you say no, he says something along the lines of: Ok, just say so when you need them. A flag is set so you can only do it once.

However, I still need some help:

- Trainerbattle, How does it work? I changed an empty trainer with HackMew's A-trainer. How Can I place this trainer on a route? I studied a trainer a bit, but it was very confusing with alot offsets! You should make a tutorial on it.
- How can you make someone heal your pokémon? I guess it's something with special cause that's what I saw in a PokéCenter script.

My I suggest you decompile some in-game scripts with the newest XSE?
I've updated the guide a lot as well.

Like I said in the other thread, I suggest the author downloading latest XSE and adjusting the whole post to adjust or remove anything that's outdated, wrong or misleading. Thanks in advance.

Cheesymitten
December 27th, 2008, 07:08 AM
Quick question (again) :) do i need the newest version of XSE for the givepokemon for some reason the one i'm using isn't working which is a bit wierd O.o

HackMew
December 27th, 2008, 07:32 AM
Quick question (again) :) do i need the newest version of XSE for the givepokemon for some reason the one i'm using isn't working which is a bit wierd O.o

I wonder what are you doing "givepokemon for some reason isn't working" is a bit too generic. Anyways, you don't need the newest version but using the old one doesn't really make sense now.

Pokeplayer50
February 9th, 2009, 03:23 PM
XSE doesn't let me compile it when i try to and says "Too less parameters on line 6. The correct number is 2."

~Teh Panda~
February 9th, 2009, 03:55 PM
XSE doesn't let me compile it when i try to and says "Too less parameters on line 6. The correct number is 2."

Ooh this is outdated...

I may update for the new XSE, please don't post in over month old threads though.

KThxBai

bardock10
February 20th, 2009, 03:14 PM
What do I do when it says too many parameters on line 6.The correct number is 2
help

~Teh Panda~
February 20th, 2009, 03:19 PM
What do I do when it says too many parameters on line 6.The correct number is 2
help

Please dont post here until i make my updates ^.^ i am going to after I take care of my hack, but this is not up to date with some of the XSE updates, your script is pretty much right, you will just need to fix it up with the new param.'s so look at some other tut.'s to fix it on up

Niroshi
May 2nd, 2009, 05:10 AM
i understant most of this, ive read 6 pages of this thread....but when itry to script a simple talk it tells me my message line is missing a dynamic label. heres the script:
#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @ Talk( IT tells me i need 2 parameters, thats why i spaced)
#define BOXSET_NORMAL 0x6
release
end


#org @Talk
= [blue_fr]This is my first script