Author Id: 14760 Author Name: Wade Post Content: Hola gente! Este es mi primer Post y como tal he decidido empezar a lo GRANDE...^^ Lo que os voy a mostrar es una recopilación de tutoriales que he encontrado por la web desde lo más simple hasta lo más complicado. Ha cualquiera que acabe de empezar (como yop) le será de gran ayuda y a los que ya sepais pues... supongo que también os será útil. *EDITO: Un autor es Diegoisawesome de PokéCommunity. Hay mas autores pero sigo diciendo lo mismo, no apunté las fuentes cuando hice la recopilación. Si por ello hay que borrar el post pues se borra^^ no pensé que fuera tan grave. Mi única intención era ayudar a otros noobs como yop. Tenéis dos opciones: Opción nº1 - Podéis ver los tutoriales en este post. Opción nº2 - Podéis descargar este [url=http://www.megaupload.com/?d=E9945CD1]PDF[/url]: Título: Mega Huge XSE scripting tutorial compilation (by Wade) Idioma: Inglés (se que es una putada para algunos, pero es el idioma internacional asi que... ¿a qué esperáis para aprender? Contenido: Tutoriales sobre scripting Páginas: 113 Link descarga: http://www.megaupload.com/?d=E9945CD1 No llevo ni un mes en esto del hacking asique como buen noob que soy no respondere preguntas ^^ (tampoco he probado todos los tutoriales). ¿EMPEZAMOS YA NO? *Update XSE To Latest Version And Extract All Files Or Else This Tutorial May Not Be Compatible XSE is a program created by Hackmew. This program is, in my opinion, the best scripting program there is, having many advantages over ScriptED, PokeScript, Diamond Cutter, and the likes. Some of the important features of XSE are: - Dynamic Offsets All you need to find is the starting offset. XSE will find the rest. - Less Raws, More Commands It's to make it easier. Instead of having to use #raw 0x53 0x07, you can just use hidesprite 0x07. This tutorial is going to cover a lot. I'll show a script at the beginning and then explain everything "new" after it. Please note that because I hack Fire Red, most scripts are written to suit Fire Red/Leaf Green, and NOT Ruby/Sapphire/Emerald. I think I'll start with pointers. Pointers XSE is great in the way that it uses dynamic offsets. You just put the starting offset (found in FSF {Free Space Finder}) and XSE will do the rest. You can use any random name for the pointer. It could be, for example... @blah ; @iliketoeatcheese ; @1234567890 As long as there are no spaces in it, and there aren't two exact same pointers, the pointer will work. So, for example, these won't work @mr potato head ; @i like mews ; @pikachu rocks. Message Scripts Now I can move onto a normal message script. Code: [quote]#dynamic 0x(FSF Offset) #org @start lock faceplayer msgbox @1 0x6 release end #org @1 = Hi.\nMy name is Diego.[/quote] I'll begin at the top of the script and work my way down. #dynamic 0x(FSF Offset) is the starting offset for your script. XSE will do the rest. #org @start marks the start of the script, obviously. It shows that it's the beginning. lock will lock your player so that while this script is "in motion" the player won't be able to move. faceplayer is used to make the sprite you are talking with face you. message is used when you want a message to display on the screen. It's followed by a pointer that will be placed at the bottom as shown. The actual message will appear like this. [quote]Hi. My name is Diego.[/quote] I'll explain the other types, like \p and \l and others, a little later. Now the number after the pointer. That number MUST follow a msgbox pointer. Without this, the message box won't appear. In this case, I've used 0x6. I'll cover more numbers later. Now we use release. This will release the locked player. end will end the script, stopping it from reading any bytes past it that could crash your game when used. Extra Message Info There are lots of other little add-ons that can be used with the message. Here's a short list of them: [quote]\c \h \n \l \p \v[/quote] I'll go in order of this list. \c usually refers to a color. This message: [quote]\c\h01\h02You received a Pokémon![/quote] will appear in a black text. There's also a new way to write colors. Here's a short list of the new ones: Fire Red/Leaf Green [quote]White - [white_fr] Black - Gray - [grey_fr] Red - [red_fr] Orange - [orange_fr] Green - [green_fr] Light Green - [lightgreen_fr] Blue - Light Blue - [lightblue_fr] Light Blue 2 - [lightblue2_fr] Cyan - [cyan_fr] Light Blue 3 - [lightblue3_fr] Navy Blue - [navyblue_fr] Dark Navy Blue - [darknavyblue_fr][/quote] Ruby/Sapphire [quote]Transparent - [transp_rs] Dark Gray - [darkgrey_rs] Red - [red_rs] Light Green - [lightgreen_rs] Blue - Yellow - [yellow_rs] Cyan - [cyan_rs] Magenta - [magenta_rs] Gray - [grey_rs] Black - Light Gray - [lightgrey_rs] White - [white_rs] Sky Blue - [skyblue_rs] Dark Sky Blue - [darkskyblue_rs][/quote] Emerald [quote]White - [white_em] Dark Gray - [darkgrey_em] Gray - [grey_em] Red - [red_em] Orange - [orange_em] Green - [green_em] Light Green - [lightgreen_em] Blue - Light Blue - [lightblue_em] White 4 - [white4_em] Lime Green- [limegreen_em] Aqua - [aqua_em] Navy - [navy_em][/quote] \h is used with hex values. Here's an example: [quote]Here's \hB7100![/quote] That \hB7 is the currency sign of the Pokemon world. So in this example, I'm going to use "$": [quote]Here's $100![/quote] Here's a table of all the hex codes for each symbol: [quote]00= 01=À 02=Á 03=Â 04=Ç 05=È 06=É 07=Ê 08=Ë 09=Ì 0B=Î 0C=Ï 0D=Ò 0E=Ó 0F=Ô 10=Æ 11=Ù 12=Ú 13=Û 14=Ñ 15=ß 16=à 17=á 19=ç 1A=è 1B=é 1C=ê 1D=ë 1E=ì 20=î 21=ï 22=ò 23=ó 24=ô 25=æ 26=ù 27=ú 28=û 29=ñ 2A=º 2B=ª 2C=• 2D=& 2E=+ 34=[Lv] 35== 36=; 51=¿ 52=¡ 53=[PK] 54=[MN] 55=[PO] 56=[Ke] 57= 58=[OC] 59=[K] 5A=Í 5B=% 5C=( 5D=) 68=â 6F=í 79= 7A=[D] 7B=[L] 7C=[R] A1=0 A2=1 A3=2 A4=3 A5=4 A6=5 A7=6 A8=7 A9=8 AA=9 AB=! AC=? AD=. AE=- AF=• B0=[...] B1=" B2=["] B3=' B4=['] B5=[m] B6=[f] B7=$ B8=, B9=[x] BA=/ BB=A BC=B BD=C BE=D BF=E C0=F C1=G C2=H C3=I C4=J C5=K C6=L C7=M C8=N C9=O CA=P CB=Q CC=R CD=S CE=T CF=U D0=V D1=W D2=X D3=Y D4=Z D5=a D6=b D7=c D8=d D9=e DA=f DB=g DC=h DD=i DE=j DF=k E0=l E1=m E2=n E3=o E4=p E5=q E6=r E7=s E8=t E9=u EA=v EB=w EC=x ED=y EE=z EF=[>] F0=: F1=Ä F2=Ö F3=Ü F4=ä F5=ö F6=ü F7= F8=[d] F9=[l] FA=\l FB=\p FC=\c FD=\v FE=\n FF=\x[/quote] Instead of using the codes below, I recommend using the Text Adjuster, found under Tools>Text Adjuster. Just type it in, press "Convert", and paste it in. It's that simple! \n is used when we want to go to a new line. So this message: [quote]Hi.\nWelcome.[/quote] would appear like this: [quote]Hi. Welcome.[/quote] \l is used in text for a new line, but it can only be used after \n has already been used. So this message: [quote]Hi.\nI love my bed!\lDon't you dare sleep in\lit![/quote] will appear like this: [quote]Hi. I love my bed! Don't you dare sleep in it![/quote] \p is used when we want the text to continue in a new box. This message: [quote]...\p...\p...\pYup![/quote] will appear like this: ------------ means a new box. [quote]... ------------------------------------------------ ... ------------------------------------------------ ... ------------------------------------------------ Yup![/quote] \v is used when we want display stored text. Here's an example: [quote]Hello, \v\h01!\n\v\h06 is looking for you.[/quote] This would appear like this. [quote]Hello, [PLAYER's name]! [RIVAL's name] is looking for you.[/quote] You could also do it like this: [quote]Hello, [player]!\n[rival] is looking for you.[/quote] Msgbox Numbers Here are the many different types, taken directly from The ROM Hacking Newsletter, also located in the ROM Hacking section. This week's tip comes from HackMew. This time, it's all about msgboxes. Below is a description, script example and in-game shot of the different msgbox types. 0x2 Description: This is the msgbox used for normal people. Using this type means that you don't need to use the lock, faceplayer or release commands. [quote]#dynamic 0x800000 #org @start msgbox @hello 0x2 end #org @hello = Hello, my name is dshayabusa.[/quote] 0x3 Description: Used for signs etc. No lock or faceplayer effect. Only shows the sign textbox when used on an actual sign. [quote]#dynamic 0x800000 #org @start msgbox @sign 0x3 end #org @hello = You are here[/quote] 0x4 Description: A normal msgbox except for the fact that it does not close. Command closeonkeypress must be used to close it. No lock or faceplayer effect. [quote]#org @start msgbox @hello 0x4 end #org @hello = Hello, my name is dshayabusa.[/quote] 0x5 Description: Used for Yes/No questions. No lock or faceplayer effect. [quote]#dynamic 0x800000 #org @start msgbox @question 0x5 end #org @hello = Is this statement false?[/quote] 0x6 Description: Normal textbox. Has no lock or faceplayer effect. [quote]#dynamic 0x800000 #org @start msgbox @Hello 0x6 end #org @hello = Hello, my name is dshayabusa.[/quote] Flags Flags are very useful when you need an event to only occur once or if you want a person to disappear. Let's say you set flag 0x200. If you want an overworld to disappear, we have to assign the set flag (in this example, 0x200) to the overworld's people ID in Advance-Map. I'll go into more detail on that later. Many flags are used within the game already. If you plan on leaving scripts that are already in the ROM, you'll need to be more careful on what flags you use, because flags can only really be used once. If you want some flags that are used in the ROM already, here's a list: Taken directly from the XSE Comprehensive Scripting Guide, found here: Help>Guide Ruby/Sapphire [quote]0x1 0x2 0x3 0x4 0x5 0x6 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F 0x20 0x2B 0x2C 0x2E 0x2F 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3D 0x3E 0x3F 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4A 0x4B 0x4C 0x4D 0x50 0x51 0x52 0x54 0x58 0x59 0x5A 0x5B 0x5C 0x5D 0x5E 0x5F 0x60 0x62 0x63 0x64 0x65 0x66 0x67 0x68 0x69 0x6A 0x6B 0x6D 0x6E 0x6F 0x70 0x71 0x72 0x73 0x74 0x75 0x76 0x77 0x79 0x7A 0x7B 0x7C 0x7D 0x7E 0x7F 0x80 0x81 0x82 0x83 0x84 0x85 0x86 0x87 0x88 0x89 0x8A 0x8B 0x8C 0x8D 0x8E 0x8F 0x90 0x91 0x92 0x93 0x94 0x95 0x96 0x97 0x98 0x99 0x9A 0x9B 0x9C 0x9E 0x9F 0xA0 0xA1 0xA2 0xA3 0xA4 0xA5 0xA6 0xA7 0xA8 0xA9 0xAA 0xAB 0xAC 0xAD 0xAE 0xAF 0xB0 0xB1 0xB2 0xB3 0xB4 0xB5 0xB6 0xB7 0xB8 0xB9 0xBA 0xBB 0xBC 0xBD 0xBE 0xBF 0xC0 0xC1 0xC2 0xC3 0xC4 0xC5 0xC6 0xC7 0xC8 0xC9 0xCA 0xCB 0xCC 0xCD 0xCE 0xD0 0xD1 0xD4 0xD5 0xD6 0xD7 0xD8 0xD9 0xDA 0xDB 0xDC 0xDD 0xDE 0xDF 0xE0 0xE1 0xE2 0xE3 0xE4 0xE5 0xE6 0xE7 0xE8 0xE9 0xEA 0xEB 0xEC 0xED 0xEE 0xEF 0xF0 0xF1 0xF2 0xF3 0xF4 0xF5 0xF6 0xF7 0xF8 0xF9 0xFA 0xFB 0xFC 0xFE 0xFF 0x100 0x101 0x102 0x103 0x104 0x105 0x106 0x107 0x108 0x109 0x10A 0x10B 0x10D 0x10E 0x10F 0x110 0x111 0x112 0x113 0x114 0x115 0x116 0x117 0x118 0x119 0x11A 0x11B 0x11C 0x11D 0x11E 0x11F 0x120 0x121 0x122 0x124 0x125 0x126 0x127 0x128 0x129 0x12A 0x12B 0x12C 0x12D 0x12E 0x138 0x140 0x141 0x142 0x143 0x144 0x163 0x16A 0x16E 0x16F 0x188 0x189 0x190 0x191 0x192 0x194 0x1A7 0x1A8 0x1A9 0x1AA 0x1B6 0x1B7 0x1B8 0x1CE 0x1CF 0x1D0 0x1E5 0x1E6 0x1ED 0x1EE 0x1EF 0x219 0x21A 0x21F 0x230 0x231 0x232 0x233 0x234 0x235 0x236 0x237 0x238 0x239 0x23A 0x23B 0x23C 0x23D 0x23F 0x240 0x241 0x243 0x244 0x245 0x246 0x247 0x248 0x249 0x24A 0x24B 0x24D 0x24E 0x24F 0x250 0x251 0x252 0x253 0x254 0x255 0x256 0x257 0x258 0x259 0x25B 0x25E 0x263 0x264 0x265 0x266 0x267 0x268 0x269 0x26A 0x26B 0x26C 0x26D 0x26E 0x26F 0x270 0x271 0x272 0x273 0x274 0x275 0x276 0x278 0x279 0x27A 0x27B 0x27C 0x27D 0x27E 0x27F 0x280 0x281 0x282 0x283 0x284 0x285 0x286 0x287 0x288 0x289 0x28A 0x28B 0x28C 0x28D 0x28E 0x28F 0x290 0x291 0x292 0x293 0x294 0x295 0x296 0x297 0x298 0x29A 0x29B 0x29C 0x29D 0x29E 0x29F 0x2A0 0x2A1 0x2A2 0x2A3 0x2A5 0x2A6 0x2BB 0x2BC 0x2BD 0x2BE 0x2BF 0x2C0 0x2C1 0x2C2 0x2C3 0x2C4 0x2C5 0x2C6 0x2C7 0x2C8 0x2C9 0x2CA 0x2CB 0x2CC 0x2CD 0x2CE 0x2CF 0x2D0 0x2D1 0x2D2 0x2D3 0x2D4 0x2D5 0x2D6 0x2D7 0x2D8 0x2D9 0x2DA 0x2DB 0x2DC 0x2DD 0x2E1 0x2E2 0x2E3 0x2E4 0x2E5 0x2E6 0x2E7 0x2E8 0x2EC 0x2ED 0x2EE 0x2EF 0x2F0 0x2F1 0x2F2 0x2F3 0x2F4 0x2F5 0x2F6 0x2F7 0x2F8 0x2F9 0x2FA 0x2FB 0x2FC 0x2FD 0x2FE 0x2FF 0x300 0x301 0x302 0x303 0x305 0x307 0x308 0x309 0x30A 0x30B 0x30C 0x30D 0x310 0x311 0x31C 0x31D 0x31E 0x31F 0x320 0x321 0x322 0x323 0x326 0x327 0x328 0x329 0x32E 0x32F 0x330 0x333 0x335 0x336 0x33C 0x33D 0x33F 0x343 0x348 0x349 0x34D 0x34E 0x350 0x351 0x354 0x356 0x357 0x358 0x35A 0x35B 0x35C 0x362 0x364 0x365 0x366 0x36D 0x36E 0x370 0x371 0x372 0x373 0x379 0x37A 0x37B 0x37C 0x37D 0x37E 0x380 0x381 0x382 0x384 0x385 0x386 0x387 0x388 0x389 0x38A 0x38F 0x390 0x391 0x393 0x394 0x395 0x396 0x39E 0x39F 0x3A0 0x3A5 0x3A6 0x3A7 0x3A8 0x3A9 0x3AC 0x3AD 0x3AE 0x3B0 0x3B1 0x3B2 0x3B3 0x3B4 0x3B5 0x3B7 0x3B8 0x3B9 0x3BA 0x3BB 0x3BC 0x3BD 0x3BE 0x3BF 0x3C1 0x3C2 0x3C3 0x3C4 0x3C5 0x3C7 0x3C8 0x3CD 0x3CE 0x3CF 0x3D0 0x3D1 0x3D2 0x3D3 0x3D4 0x3D6 0x3D7 0x3D8 0x3D9 0x3DA 0x3DB 0x3DC 0x3DD 0x3DE 0x3DF 0x436 0x4B0 0x4B1 0x4B2 0x4B3 0x4B4 0x4B5 0x4B6 0x4B7 0x4B8 0x4B9 0x4BA 0x4BB 0x4BC 0x4BD 0x4C1 0x4C9 0x4CD 0x4D4 0x4DD 0x4DE 0x4DF 0x4E0 0x800 0x801 0x802 0x804 0x805 0x806 0x807 0x808 0x809 0x80A 0x80B 0x80C 0x80D 0x80E 0x80F 0x810 0x811 0x812 0x813 0x814 0x815 0x816 0x817 0x818 0x819 0x81A 0x81B 0x81C 0x81D 0x81E 0x820 0x821 0x822 0x823 0x824 0x825 0x826 0x827 0x828 0x829 0x82A 0x82B 0x82C 0x82D 0x82F 0x830 0x832 0x834 0x83A 0x83B 0x83C 0x83D 0x83E 0x83F 0x840 0x841 0x842 0x843 0x844 0x845 0x846 0x847 0x848 0x849 0x84A 0x84B 0x84C 0x84F 0x850 0x851 0x852 0x853 0x854 0x855 0x856 0x857 0x858 0x859 0x85A 0x85B 0x85C 0x85E 0x85F 0x860 0x861 0x863 0x890 0x891 0x892 0x893 0x894 0x895 0x896 0x897 0x898 0x899 0x89A 0x89B 0x89C 0x89D 0x89E 0x89F 0x8A0 0x8A1 0x8A2 0x8A3 0x8A4 0x8A5 0x8A6 0x8A7 0x8A8 0x8A9 0x8AA 0x8AB 0x8AC 0x8AD 0x8AE 0x8AF 0x8B0 0x8B1 0x8B2 0x8B3 0x8B4 0x8B5 0x8B6 0x8B7 0x8B8 0x8B9 0x8BA 0x8BB 0x8BC 0x8BD 0x8BE 0x8BF 0x8C0 0x8C1 0x8C2 0x8CA 0x8CB 0x8CC 0x8CD 0x8CE 0x8CF 0x8D0 0x8D1 0x8D2[/quote] Fire Red/Leaf Green: [quote]0x1 0x2 0x3 0x4 0x5 0x6 0x2B 0x2C 0x2E 0x2F 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x39 0x3D 0x3E 0x3F 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4A 0x4B 0x4C 0x4D 0x50 0x52 0x54 0x58 0x59 0x5C 0x5D 0x5F 0x62 0x63 0x64 0x65 0x66 0x67 0x68 0x69 0x6A 0x6B 0x72 0x75 0x7A 0x7B 0x7C 0x7D 0x7E 0x80 0x81 0x82 0x84 0x85 0x86 0x88 0x8B 0x8C 0x8D 0x8E 0x91 0x92 0x93 0x94 0x95 0x96 0x97 0x98 0x99 0x9A 0x9B 0x9C 0x9E 0x9F 0xA0 0xA1 0xA2 0xAA 0xAD 0xAE 0xB1 0xB2 0xB3 0xB4 0xD5 0xD6 0xD7 0xDC 0xEA 0x109 0x10A 0x10B 0x118 0x119 0x11A 0x11B 0x120 0x121 0x124 0x125 0x126 0x127 0x128 0x129 0x142 0x143 0x144 0x163 0x16A 0x16E 0x16F 0x188 0x189 0x190 0x191 0x192 0x1A7 0x1A8 0x1B6 0x1B7 0x1B8 0x1CE 0x1CF 0x1D0 0x219 0x21A 0x21F 0x230 0x231 0x232 0x233 0x234 0x235 0x236 0x237 0x238 0x239 0x23A 0x23B 0x23C 0x23D 0x23F 0x240 0x241 0x243 0x244 0x245 0x246 0x247 0x248 0x249 0x24A 0x24B 0x24D 0x24E 0x24F 0x250 0x251 0x252 0x253 0x254 0x255 0x256 0x257 0x258 0x259 0x25B 0x25E 0x263 0x264 0x265 0x266 0x267 0x268 0x269 0x26A 0x26B 0x26C 0x26D 0x26E 0x26F 0x270 0x271 0x272 0x273 0x274 0x275 0x276 0x278 0x27A 0x27B 0x27C 0x27D 0x27E 0x27F 0x280 0x281 0x282 0x283 0x284 0x285 0x286 0x287 0x288 0x289 0x28A 0x28B 0x28C 0x28D 0x290 0x291 0x292 0x293 0x294 0x295 0x296 0x297 0x298 0x29A 0x29B 0x29C 0x29D 0x29E 0x29F 0x2A0 0x2A1 0x2A2 0x2A3 0x2A5 0x2A6 0x2BB 0x2BC 0x2BD 0x2BE 0x2BF 0x2C0 0x2C1 0x2C2 0x2C3 0x2C4 0x2C5 0x2C6 0x2C7 0x2C8 0x2C9 0x2CA 0x2CB 0x2CC 0x2CD 0x2CE 0x2CF 0x2D0 0x2D1 0x2D2 0x2D3 0x2D4 0x2D5 0x2D6 0x2D7 0x2D8 0x2D9 0x2DA 0x2DB 0x2DC 0x2DD 0x2E1 0x2E2 0x2E3 0x2E4 0x2E5 0x2EC 0x2ED 0x2EE 0x2EF 0x2F0 0x2F1 0x2F2 0x2F3 0x2F4 0x2F5 0x2F6 0x2F7 0x2F8 0x2F9 0x2FA 0x2FB 0x2FC 0x2FD 0x2FE 0x2FF 0x4B0 0x4B1 0x4B2 0x4B3 0x4B4 0x4B5 0x4B6 0x4B7 0x4B8 0x4B9 0x4BA 0x4BB 0x4BC 0x805 0x807 0x820 0x821 0x822 0x823 0x824 0x825 0x826 0x827 0x828 0x829 0x82C 0x82D 0x82F 0x830 0x834 0x83E 0x841 0x842 0x844 0x845 0x846 0x847 0x848 0x849 0x84A 0x84B 0x890 0x891 0x892 0x893 0x894 0x895 0x896 0x897 0x898 0x899 0x89A 0x89B 0x89C 0x89D 0x89E 0x89F 0x8A0 0x8A1 0x8A2 0x8A3 0x8A4 0x8A5 0x8A6 0x8A7 0x8A8 0x8A9 0x8AA 0x8AB 0x8AC 0x8AD 0x8AE 0x8AF 0x8B0 0x8B1 0x8B2 0x8B3 0x8B4 0x8B5 0x8B6 0x8B7 0x8B8 0x8B9 0x8BA 0x8BB 0x8BC 0x8BD 0x8BE 0x8BF 0x8C0 0x8C1 0x8C2 Emerald: Spoiler: 0x1 0x2 0x3 0x4 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1A 0x1B 0x1C 0x1D 0x1E 0x1F 0x38 0x41 0x47 0x48 0x49 0x4A 0x50 0x51 0x52 0x53 0x58 0x59 0x5A 0x5B 0x5C 0x5D 0x5E 0x5F 0x60 0x61 0x62 0x63 0x64 0x65 0x66 0x67 0x69 0x6A 0x6B 0x6C 0x6D 0x6E 0x6F 0x70 0x71 0x73 0x74 0x75 0x76 0x77 0x78 0x79 0x7A 0x7B 0x7C 0x7D 0x7E 0x7F 0x80 0x81 0x82 0x83 0x84 0x85 0x86 0x87 0x88 0x89 0x8A 0x8B 0x8C 0x8D 0x8E 0x8F 0x90 0x91 0x92 0x93 0x94 0x95 0x97 0x98 0x99 0x9A 0x9B 0x9C 0x9D 0x9E 0x9F 0xA0 0xA1 0xA2 0xA3 0xA4 0xA5 0xA6 0xA7 0xA8 0xA9 0xAA 0xAB 0xAC 0xAE 0xAF 0xB0 0xB1 0xB2 0xB3 0xB4 0xB5 0xB6 0xB7 0xB8 0xB9 0xBA 0xBB 0xBC 0xBD 0xBE 0xBF 0xC0 0xC1 0xC2 0xC3 0xC4 0xC5 0xC6 0xC7 0xC8 0xC9 0xCA 0xCB 0xCC 0xCD 0xCE 0xCF 0xD0 0xD1 0xD2 0xD3 0xD4 0xD5 0xD7 0xD8 0xD9 0xDA 0xDB 0xDD 0xDE 0xDF 0xE0 0xE1 0xE2 0xE3 0xE4 0xE5 0xE6 0xE7 0xE8 0xE9 0xEA 0xEB 0xEC 0xED 0xEE 0xEF 0xF0 0xF1 0xF2 0xF3 0xF4 0xF5 0xF6 0xF7 0xF8 0xF9 0xFA 0xFB 0xFC 0xFD 0xFE 0xFF 0x100 0x101 0x102 0x103 0x104 0x105 0x106 0x107 0x108 0x109 0x10A 0x10B 0x10D 0x10E 0x10F 0x110 0x111 0x112 0x113 0x114 0x115 0x116 0x117 0x118 0x119 0x11A 0x11B 0x11C 0x11D 0x11E 0x11F 0x120 0x121 0x122 0x124 0x125 0x126 0x127 0x128 0x129 0x12A 0x12B 0x12C 0x12D 0x12E 0x12F 0x130 0x131 0x132 0x133 0x134 0x135 0x136 0x137 0x138 0x139 0x140 0x141 0x143 0x14E 0x14F 0x150 0x151 0x152 0x153 0x154 0x155 0x156 0x157 0x159 0x15A 0x15B 0x191 0x192 0x194 0x1A9 0x1AA 0x1AC 0x1AD 0x1AE 0x1AF 0x1B0 0x1B1 0x1B2 0x1B3 0x1B4 0x1B5 0x1B6 0x1B7 0x1B8 0x1B9 0x1BA 0x1BB 0x1BC 0x1BD 0x1BE 0x1BF 0x1C0 0x1C1 0x1C2 0x1C3 0x1C4 0x1C5 0x1C6 0x1C7 0x1C8 0x1C9 0x1CA 0x1CB 0x1CC 0x1CD 0x1CE 0x1CF 0x1D0 0x1D1 0x1D2 0x1D4 0x1D5 0x1D6 0x1D7 0x1D8 0x1D9 0x1DB 0x1DC 0x1DD 0x1ED 0x1EE 0x1EF 0x1F5 0x1F6 0x23B 0x23C 0x23D 0x23E 0x23F 0x246 0x247 0x248 0x249 0x24F 0x25E 0x265 0x266 0x281 0x287 0x288 0x289 0x28A 0x28E 0x28F 0x2BC 0x2BD 0x2BF 0x2C0 0x2C1 0x2C2 0x2C3 0x2C4 0x2C5 0x2C6 0x2C7 0x2C8 0x2C9 0x2CA 0x2CB 0x2CC 0x2CE 0x2CF 0x2D0 0x2D1 0x2D2 0x2D6 0x2D8 0x2DA 0x2DC 0x2DF 0x2E0 0x2E1 0x2E2 0x2E3 0x2E4 0x2E5 0x2E6 0x2E7 0x2E8 0x2E9 0x2EA 0x2F1 0x2F2 0x2F3 0x2F4 0x2F6 0x2F7 0x2F8 0x2F9 0x2FA 0x2FB 0x2FC 0x2FE 0x2FF 0x300 0x301 0x302 0x303 0x307 0x308 0x309 0x30A 0x30B 0x30C 0x30D 0x30E 0x30F 0x310 0x311 0x313 0x314 0x319 0x31C 0x31D 0x31E 0x31F 0x320 0x321 0x322 0x323 0x326 0x327 0x328 0x329 0x32E 0x32F 0x330 0x331 0x332 0x333 0x335 0x336 0x337 0x33A 0x33B 0x33C 0x33D 0x33E 0x33F 0x340 0x343 0x347 0x348 0x349 0x34A 0x34B 0x34C 0x34D 0x34E 0x34F 0x350 0x351 0x354 0x356 0x357 0x358 0x359 0x35A 0x35B 0x35C 0x35E 0x35F 0x360 0x361 0x362 0x365 0x366 0x369 0x36A 0x36D 0x36E 0x370 0x371 0x372 0x373 0x379 0x37A 0x37B 0x37C 0x37D 0x37E 0x380 0x381 0x382 0x384 0x385 0x386 0x387 0x388 0x389 0x38A 0x390 0x391 0x393 0x394 0x395 0x396 0x39C 0x39E 0x39F 0x3A0 0x3A1 0x3A5 0x3A6 0x3A7 0x3A8 0x3A9 0x3AC 0x3AD 0x3AE 0x3B0 0x3B1 0x3B2 0x3B3 0x3B4 0x3B5 0x3B7 0x3B8 0x3B9 0x3BA 0x3BB 0x3BC 0x3BD 0x3BE 0x3BF 0x3C1 0x3C2 0x3C3 0x3C4 0x3C5 0x3C7 0x3C8 0x3CD 0x3CE 0x3CF 0x3D0 0x3D1 0x3D2 0x3D3 0x3D4 0x3D7 0x3D8 0x3DF 0x3E0 0x3E1 0x3E2 0x3E5 0x3E6 0x3E7 0x436 0x4F0 0x4F1 0x4F2 0x4F3 0x4F4 0x4F5 0x4F6 0x4F7 0x4F8 0x4FB 0x4FC 0x4FD 0x4FE 0x860 0x861 0x862 0x864 0x865 0x866 0x867 0x868 0x869 0x86A 0x86B 0x86C 0x86D 0x86E 0x870 0x871 0x872 0x873 0x874 0x875 0x876 0x877 0x878 0x879 0x87A 0x87B 0x87C 0x87E 0x880 0x889 0x88A 0x88B 0x892 0x89A 0x89B 0x89C 0x89D 0x89E 0x89F 0x8A0 0x8A1 0x8A3 0x8A4 0x8A5 0x8A6 0x8A7 0x8A8 0x8A9 0x8AA 0x8AB 0x8AF 0x8B0 0x8B1 0x8B2 0x8B3 0x8B4 0x8B5 0x8B6 0x8B7 0x8B8 0x8B9 0x8BA 0x8BB 0x8BC 0x8BE 0x8BF 0x8C0 0x8C1 0x8C3 0x8C4 0x8C5 0x8C6 0x8C7 0x8C8 0x8C9 0x8CA 0x8CB 0x8CC 0x8CD 0x8CE 0x8CF 0x8D0 0x8D1 0x8D2 0x8D3 0x8D4 0x8D5 0x8D6 0x8D8 0x8D9 0x8DA 0x8DC 0x8DD 0x8DE 0x8DF 0x8E0 0x8E1 0x8E2 0x921 0x92A 0x92B 0x92C 0x92D 0x92E 0x92F 0x930 0x931 0x932 0x934[/quote] I'll have to do a bit of explaining here, so I'll start with preventing events to happen. I'll use #dynamic 0x800000 for the rest of my examples. [quote]#dynamic 0x800000 #org @start lock faceplayer checkflag 0x200 if 0x1 goto @done msgbox @1 0x6 setflag 0x200 release end #org @done msgbox @2 0x6 clearflag 0x200 release end[/quote] We've already covered lock and faceplayer, so we'll go to checkflag. checkflag checks if a flag has been set. Checkflag is always followed by an if line. When using the if line after checkflag, it contains either a 0x1 or 0x0. 0x1, means that if the flag is set goto @(pointer), and if it's not set, it will continue with the script. Similarly, 0x0 checks if the flag is not set, and if it isn't, it will goto @(pointer), and if the flag is set, the script will continue normally. As you can see, the if 0x1 goto @done points to a different part of a script, as shown with the #org @done . At #org @done, we have both a message and a new command, clearflag. Once flags are set they can be "cleared" with the command clearflag. Clearflag has to be followed by the flag number, which in this case is 0x200. There is more than one way to use a flag. Some flags have some sort of game function, like these: Flags Fire Red: [quote]0x820 – Activates First Badge 0x821 - Activates Second Badge 0x822 - Activates Third Badge 0x823 - Activates Fourth Badge 0x824 - Activates Fifth Badge 0x825 - Activates Sixth Badge 0x826 - Activates Seventh Badge 0x827 - Activates Eighth Badge 0x828 - Activates Pokemon Menu 0x829 - Activates Pokedex Menu 0x82F - Activates Running Shoes[/quote] Ruby/Sapphire: [quote]0x800 - Activates Pokemon Menu 0x801 - Activates Pokedex Menu 0x802 - Activates Pokenav Menu 0x807 - Activates First Badge 0x808 - Activates Second Badge 0x809 - Activates Third Badge 0x80A - Activates Fourth Badge 0x80B - Activates Fifth Badge 0x80C - Activates Sixth Badge 0x80D - Activates Seventh Badge 0x80E - Activates Eighth Badge 0x860 - Activates Running Shoes[/quote] Emerald: [quote]0x860 - Activates Pokemon Menu 0x861 - Activates Pokedex Menu 0x862 - Activates Pokenav Menu 0x867 - Activates First Badge 0x868 - Activates Second Badge 0x869 - Activates Third Badge 0x86A - Activates Fourth Badge 0x86B - Activates Fifth Badge 0x86C - Activates Sixth Badge 0x86D - Activates Seventh Badge 0x86E - Activates Eighth Badge 0x8C0 - Activates Running Shoes[/quote] I'll explain these in the next part. Givepokemon Givepokemon does exactly what it says. It gives the player a Pokemon. Here's my example script. There are lots of new commands to look at here. [quote]#dynamic 0x800000 #org @start checkflag 0x828 if 0x1 goto @done msgbox @1 0x5 compare LASTRESULT 0x1 if 0x1 goto @take msgbox @2 0x6 release end #org @take givepokemon 0x4 0x5 0x0 0x0 0x0 0x0 fanfare 0x13E msgbox @3 0x4 waitfanfare closeonkeypress setflag 0x828 msgbox @4 0x5 compare LASTRESULT 0x1 if 0x1 gosub @name msgbox @5 0x6 release end #org @name call 0x1A74EB return #org @done msgbox @6 0x6 release end #org @1 = Hello.\nSorry to trouble you.\nI can't take care\nof my Charmander.\pCan you take care of\nit for me? #org @2 = That's okay.\pI'm sure someone else will\ntake it. #org @3 = You received a Charmander! #org @4 = Would you like to give a\nnickname to Charmander? #org @5 = Please take care of\nCharmander. #org @6 = Are you taking good care\nof Charmander?[/quote] Okay. There's a lot here I need to explain. I'll start from the top. We've already covered checkflag and the if line, as well as msgbox. For info on 0x5, read the section labeled Msgbox Numbers. 0x5 is always followed by a compare line. compare needs a variable, which in this case is 0x800D, and a value, which in this case is 0x1. 0x800D is a useful variable that most commands store values in. When using compare after a msgbox @(text) 0x5 line, you only have two options for the value. They're 0x0, which is the value set to 0x800D when you choose NO, and 0x1, which is the value set to 0x800D when you choose YES. A compare 0x800D 0x1 line will check if you pressed YES and, of course, compare 0x800D 0x0 will check if you pressed NO. The if line that follows the compare line does the same thing as what it does for checkflag. if 0x1 will check if the button pressed matches the compared value. If it matches, it will goto @(pointer). If not, it will continue the script. Then we have a normal msgbox. The first new command here is givepokemon. givepokemon uses six values. The first is the Pokemon, the second being the level, the third being the Item Held, and the last three being buffers. So in the script above, mine shows.... [quote]givepokemon 0x4 (Charmander) 0x5 (Level 5) 0x0 (no item) 0x0 0x0 0x0 (buffers)[/quote] Here's two lists of Pokemon and Items. Pokemon Convert them to HEX first and put 0x in front of them. [quote]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|f| 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[/quote] Items Same as above. [quote]Master Ball 1 Ultra Ball 2 Great Ball 3 Poké Ball 4 Safari Ball 5 Net Ball 6 Dive Ball 7 Nest Ball 8 Repeat Ball 9 Timer Ball 10 Luxury Ball 11 Premier Ball 12 Potion 13 Antidote 14 Burn Heal 15 Ice Heal 16 Awakening 17 Parlyz Heal 18 Full Restore 19 Max Potion 20 Hyper Potion 21 Super Potion 22 Full Heal 23 Revive 24 Max Revive 25 Fresh Water 26 Soda Pop 27 Lemonade 28 Moomoo Milk 29 Energypowder 30 Energy Root 31 Heal Powder 32 Revival Herb 33 Ether 34 Max Ether 35 Elixir 36 Max Elixir 37 Lava Cookie 38 Blue Flute 39 Yellow Flute 40 Red Flute 41 Black Flute 42 White Flute 43 Berry Juice 44 Sacred Ash 45 Shoal Salt 46 Shoal Shell 47 Red Shard 48 Blue Shard 49 Yellow Shard 50 Green Shard 51 HP Up 63 Protein 64 Iron 65 Carbos 66 Calcium 67 Rare Candy 68 PP Up 69 Zinc 70 PP Max 71 Guard Spec. 73 Dire Hit 74 X Attack 75 X Defend 76 X Speed 77 X Accuracy 78 X Special 79 Poké Doll 80 Fluffy Tail 81 Super Repel 83 Max Repel 84 Escape Rope 85 Repel 86 Sun Stone 93 Moon Stone 94 Fire Stone 95 Thunderstone 96 Water Stone 97 Leaf Stone 98 Tinymushroom 103 Big Mushroom 104 Pearl 106 Big Pearl 107 Stardust 108 Star Piece 109 Nugget 110 Heart Scale 111 Orange Mail 121 Harbor Mail 122 Glitter Mail 123 Mech Mail 124 Wood Mail 125 Wave Mail 126 Bead Mail 127 Shadow Mail 128 Tropic Mail 129 Dream Mail 130 Fab Mail 131 Retro Mail 132 Cheri Berry 133 Chesto Berry 134 Pecha Berry 135 Rawst Berry 136 Aspear Berry 137 Leppa Berry 138 Oran Berry 139 Persim Berry 140 Lum Berry 141 Sitrus Berry 142 Figy Berry 143 Wiki Berry 144 Mago Berry 145 Aguav Berry 146 Iapapa Berry 147 Razz Berry 148 Bluk Berry 149 Nanab Berry 150 Wepear Berry 151 Pinap Berry 152 Pomeg Berry 153 Kelpsy Berry 154 Qualot Berry 155 Hondew Berry 156 Grepa Berry 157 Tamato Berry 158 Cornn Berry 159 Magost Berry 160 Rabuta Berry 161 Nomel Berry 162 Spelon Berry 163 Pamtre Berry 164 Watmel Berry 165 Durin Berry 166 Belue Berry 167 Liechi Berry 168 Ganlon Berry 169 Salac Berry 170 Petaya Berry 171 Apicot Berry 172 Lansat Berry 173 Starf Berry 174 Enigma Berry 175 Brightpowder 179 White Herb 180 Macho Brace 181 Exp. Share 182 Quick Claw 183 Soothe Bell 184 Mental Herb 185 Choice Band 186 King's Rock 187 Silverpowder 188 Amulet Coin 189 Cleanse Tag 190 Soul Dew 191 Deepseatooth 192 Deepseascale 193 Smoke Ball 194 Everstone 195 Focus Band 196 Lucky Egg 197 Scope Lens 198 Metal Coat 199 Leftovers 200 Dragon Scale 201 Light Ball 202 Soft Sand 203 Hard Stone 204 Miracle Seed 205 Blackglasses 206 Black Belt 207 Magnet 208 Mystic Water 209 Sharp Beak 210 Poison Barb 211 Nevermeltice 212 Spell Tag 213 Twistedspoon 214 Charcoal 215 Dragon Fang 216 Silk Scarf 217 Up-grade 218 Shell Bell 219 Sea Incense 220 Lax Incense 221 Lucky Punch 222 Metal Powder 223 Thick Club 224 Stick 225 Red Scarf 254 Blue Scarf 255 Pink Scarf 256 Green Scarf 257 Yellow Scarf 258 Mach Bike 259 Coin Case 260 Itemfinder 261 Old Rod 262 Good Rod 263 Super Rod 264 S.S. Ticket 265 Contest Pass 266 Wailmer Pail 268 Devon Goods 269 Soot Sack 270 Basement Key 271 Acro Bike 272 PokéBlock Case 273 Letter 274 Eon Ticket 275 Red Orb 276 Blue Orb 277 Scanner 278 Go-goggles 279 Meteorite 280 Rm. 1 Key 281 Rm. 2 Key 282 Rm. 4 Key 283 Rm. 6 Key 284 Storage Key 285 Root Fossil 286 Claw Fossil 287 Devon Scope 288 TM01 289 TM02 290 TM03 291 TM04 292 TM05 293 TM06 294 TM07 295 TM08 296 TM09 297 TM10 298 TM11 299 TM12 300 TM13 301 TM14 302 TM15 303 TM16 304 TM17 305 TM18 306 TM19 307 TM20 308 TM21 309 TM22 310 TM23 311 TM24 312 TM25 313 TM26 314 TM27 315 TM28 316 TM29 317 TM30 318 TM31 319 TM32 320 TM33 321 TM34 322 TM35 323 TM36 324 TM37 325 TM38 326 TM39 327 TM40 328 TM41 329 TM42 330 TM43 331 TM44 332 TM45 333 TM46 334 TM47 335 TM48 336 TM49 337 TM50 338 HM01 339 HM02 340 HM03 341 HM04 342 HM05 343 HM06 344 HM07 345 HM08 346 Oak's Parcel 349 Poké Flute 350 Secret Key 351 Bike Voucher 352 Gold Teeth 353 Old Amber 354 Card Key 355 Lift Key 356 Helix Fossil 357 Dome Fossil 358 Silph Scope 359 Bicycle 360 Town Map 361 VS Seeker 362 Fame Checker 363 TM Case 364 Berry Pouch 365 Teachy TV 366 Tri-pass 367 Rainbow Pass 368 Tea 369 Mysticticket 370 Auroraticket 371 Powder Jar 372 Ruby 373 Sapphire 374[/quote] Now, we have fanfare 0x13E. This is a jingle. It's a short bit of music that's played when you receive something, like a Pokemon or an item. Then we have a msgbox. The only difference here is that we have used 0x4. But if it doesn't close, why would I use it? You'll just have to keep reading to find out. waitfanfare will do what it's name displays. It will wait for the fanfare to finish before it allows the script to continue. 0x4 left the box open while the fanfare plays. closeonkeypress is a very useful command. This is extremely useful when bundled with 0x4. It will basically make the 0x4 act as an 0x6, which allows for it to be closed with the press of a button. setflag 0x828... Do you remember what it's for? In Fire Red and Leaf Green, it activates the Pokemon Menu. Now, here's this part: [quote]msgbox @4 0x5 compare LASTRESULT 0x1 if 0x1 gosub @name[/quote] We have something slightly different there. Instead of, if 0x1 goto @name, we have if 0x1 gosub @name. If you use ScriptED, this would just be if2 to you. Gosub is somthing used in other programming languages and is just used to say, "go to @offset, but you have to return." Let's look at what we have there. gosub @name. That means that we're going to go look at @name. Here, we have call 0x1A74EB. Call is used to call some other script within a ROM. It can also call a part of your script. In that case, it would appear like this: [quote]call @(pointer)[/quote] I know what you're asking. What's at 0x1A74EB? The offset 0x1A74EB contains a script which is used to name a Pokemon. Now we have return. It makes the script return to wherever it was called from or gosubed from. I didn't mention it earlier, but call should have a return to wherever it is called from. That return has brought us back to msgbox @5 0x6. The rest is already explained, so now we can move onto the next part. I think we'll move onto something similar and go to... Wildbattle [quote]#dynamic 0x800000 #org @start lock faceplayer msgbox @1 0x6 cry 0x6 0x0 wildbattle 0x6 0x1E 0x8B fadescreen 0x1 fadescreen 0x0 hidesprite 0x800F setflag 0x200 release end #org @1 = CHARIZARD: Raaarrgghh![/quote] I'll just start straight with cry, since you already know about everything before it. I have to get a little "advanced" here. Hopefully, I'll explain it well enough so that it sounds simple. When we script cry, it takes 6 bytes: [quote]cry [pkmn #] 0x0[/quote] First we have the command. That's followed by the Pokemon number, which in this case is a Charizard. The last 0x0 is supposed to determine the "effect number", but play it safe and stick with 0x0. Now, we have the command wildbattle. In my script, we have: [quote]wildbattle 0x06 (Charizard) 0x1E (Level 30) 0x8B (Oran Berry)[/quote] From there, I can explain. The first two bytes are the Pokemon's numbers, the second is the level, and finally, the third is the item. fadescreen is a command that is used to make the screen fade to black or white and back. fadescreen 0x1 will fade the screen out to black. There are some more fadescreens, listed here: [quote]0x0 - fade from black to normal 0x1 – fade from normal to black 0x2 – fade from white to normal 0x3 – fade from normal to white[/quote] Now we can move onto hidesprite 0x800F. This is very useful, as it makes the overworld you're interacting with disappear. Here's some in-depth info on hidesprite 0x800F: When we interact/talk with an OW, the people number is assigned to the variable 0x800F. In the case of hidesprite 0x800F, it's saying, "hide sprite, (variable) 0x800F" It isn't actually a people no. 0x800F is just the variable that's assigned to the sprite currently being interacted with. hidesprite can also be used a little differently. I'll explain that a little later in the tutorial. Remember how I mentioned something about the People ID in Advance-Map? This is where I'll be explaining that. Let's say you set flag number 0x200. We are going to change the script's overworld's People ID to 0200. The People ID is used to make sure that the overworld doesn't continue to re-appear. That's it! I guess we can move onto something else now. Checkgender [quote]#dynamic 0x800000 #org @start lock faceplayer checkgender compare 0x800D 0x0 if 0x1 goto @boy compare 0x800D 0x1 if 0x1 goto @girl end #org @boy msgbox @1 0x6 release end #org @girl msgbox @2 0x6 release end #org @1 = Hello, Mr. \v\h01! #org @2 = Hello, Ms. \v\h01![/quote] checkgender, huh? I guess there isn't too much for me to explain here. So we have the command checkgender. Like most commands, it assigns a value to 0x800D. We check what this value is with compare 0x800D 0x*. The asterisk just stands for what we are checking for. checkgender assigns 0x0 to 0x800D for a male, and assigns 0x1 to 0x800D for a female. I've used two compares but it could have alternatively been written like this: [quote]#dynamic 0x800000 #org @start lock faceplayer checkgender compare 0x800D 0x0 if 0x1 goto @boy msgbox @2 0x6 release end #org @boy msgbox @1 0x6 release end #org @1 = Hello, Mr. \v\h01! #org @2 = Hello, Ms. \v\h01![/quote] Or like this... [quote]#dynamic 0x800000 #org @start lock faceplayer checkgender compare 0x800D 0x1 if 0x1 goto @girl msgbox @1 0x6 release end #org @girl msgbox @2 0x6 release end #org @1 = Hello, Mr. \v\h01! #org @2 = Hello, Ms. \v\h01![/quote] It really just comes down to preference. Almost nothing is set in stone when it comes to scripting. There's almost always more than one way to do something, and I'll show some more examples of this later. I think that's all that I need to explain for this. Giveitem [quote]#dynamic 0x800000 #org @start lock faceplayer checkflag 0x200 if 0x1 goto @done msgbox @1 0x5 compare 0x800D 0x1 if 0x1 goto @take msgbox @2 0x6 release end #org @done msgbox @3 0x6 release end #org @take giveitem 0xD 0x1 MSG_OBTAIN msgbox @3 0x6 setflag 0x200 release end #org @1 = Hi!\pI'm from the Cherrygrove\nPokeMart.\pWhy don't you take this\nfree sample? #org @2 = That's okay. I'm sure someone\nelse will enjoy it. #org @3 = If you want more, you'll\nhave to go to the PokeMart\nto buy them.[/quote] One thing you may notice about this script is that I've pointed different parts of the script to the same pointer. This is not a mistake! You can do this. I added that here because I think it's a good thing for someone to know about. Now, onto the new things in this script. We have the giveitem command. Giveitem uses three values, the item no., the amount, and the message type. The message type can be either MSG_FIND or MSG_OBTAIN. In my script, I used these: [quote]giveitem 0xD (Potion) 0x1 (One of them) MSG_OBTAIN (Obtaining from a person message)[/quote] That's actually all you need to do for this command. It will automatically play a jingle and display a message saying "[PLAYER] received ............". That's actually all I need to explain. Let's move onto some simple specials now. Special [quote]#dynamic 0x800000 #org @start lock faceplayer msgbox @10 0x4 closeonkeypress fadescreen 0x1 fanfare 0x100 special 0x0 waitfanfare fadescreen 0x0 msgbox @11 0x6 release end #org @10 = What wonderful Pokèmon you\nhave there!\pThey look like\nthey could use a long rest. #org @11 = Now they look better!\nDon't forget to visit![/quote] Looks like I've used 0x4 and closeonkeypress again. I've also used fadescreen 0x1 as well as fadescreen 0x0, another fanfare and special 0x0. I'm going to do something different here. I'm going to start with the fadescreens. Do you still remember what fadescreen 0x0 does? It fades from black to normal. Now, we can move backwards and look at, “Why I used 0x4 instead of 0x6.” For some reason that I can't explain, if we use 0x6 before we use fadescreen 0x1, the box will remain open until we return to our normal screen with fadescreen 0x0. Once we are there, we will see it close, but we don't want that, do we? It doesn't look very good. We want it to close before we come back from our black screen. I also can't explain this, but for some reason, when we use 0x4 and closeonkeypress, it does just that. So whenever you have a script like this, use 0x4 and closeonkeypress before a fadescreen. The fanfare is very useful in this script. In theory, I could have used pause (which is a command I haven't covered yet), but I wanted to use the combination of fanfare 0x100 and waitfanfare. For those of you who don't know, fanfare 0x100 is the healing jingle that is played when someone heals your Pokemon. So with the help of waitfanfare, the screen will not return to normal until that jingle is completed. Now all that's left is, of course, special 0x0. This is a special command that will fully heal the Pokemon within your party. Useful, isn't it? I'm also going to include a short list of specials in a spoiler right here, for whoever may want it. Specials [quote]special 0x0 - Heal Pokemon special 0x3C - Access Bill's PC (FR/LG) special 0x98 - Going up to Mountain (R/S) special 0x9C - Wally Catch (R/S) special 0x9F - choose A Pokemon (R/S) special 0xE0 - PokeBlock Case (R/S) special 0x10F - Restart Game special 0x110 - Hall of Fame and Credits special 0x111 - Elevator Animation special 0x119 - Groudon's Orb effect (R/S) special 0x131 - Earthquake (R/S) special 0x132 - Show Floors special 0x133 - Long Earthquake (Emerald) special 0x136 - Earthquake (FR/LG) special 0x137 - Lava Battle special 0x13D - Short Earthquake (Emerald) special 0x156 - Battle with Ghost (FR/LG) special 0x157 - Get on Bike (FR/LG) special 0x161 - Start Surfing (FR/LG) special 0x166 - Nickname special 0x16F - Activate National Dex (FR/LG) special 0x17B - Seagallop Animation special 0x191 - SS. Anne Leaving special 0x1F3 - Activate National Dex (Emerald)[/quote] For all of you who can't seem to get the earthquake to work, here's a little bit on it, from Pokepal17: A few variables can affect the power. Put these before special 0x136: [quote]setvar 0x8004 0xF setvar 0x8005 0xF setvar 0x8006 0xF setvar 0x8007 0xF[/quote] This should make a strong earthquake. Experiment with those variable values to make the earthquakes stronger/weaker. Applymovement [quote]#dynamic 0x800000 #org @start checkflag 0x828 if 0x1 goto @done msgbox @1 0x6 applymovement 0x04 @move waitmovement 0x0 applymovement 0xFF @move2 pause 0x30 msgbox @2 0x6 playsong 0x13E 0x0 applymovement 0x04 @move3 applymovement 0xFF @move3 waitmovement 0x0 fadesong 0x12C release end #org @done release end #org @move #raw 0x62 #raw 0x12 #raw 0x12 #raw 0x12 #raw 0x12 #raw 0xFE #org @move2 #raw 0x03 #raw 0xFE #org @move3 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0xFE #org @1 = Waaaiiiitttt!!! #org @2 = You can't go out there\nwithout your own Pokemon.\pWild Pokemon will hurt you.[/quote] What's new here? Applymovement, waitmovement, pause, playsong and fadesong. I guess I'll explain them all in that order. Applymovement is a very useful command that allows to show an overworld walking or running depending on what we want. When we use applymovement, it has to be followed by a People Number, which is found in Advance Map on the right behind number of sprite (i guess). It also needs a pointer to where our movements are. An overworld with a people number of "4" seems normal, doesn't it? But what about one with 0xFF (255). There's almost never 255 overworlds on one map. 0xFF is the “hero's” people number. Now, let's look at this movements list: (credit to HackMew for finding them and including them in XSE) Ruby/Sapphire/Emerald [quote]#raw 0x00 = Face Down #raw 0x01 = Face Up #raw 0x02 = Face Left #raw 0x03 = Face Right #raw 0x04 = Step Down (Slow) #raw 0x05 = Step Up (Slow) #raw 0x06 = Step Left (Slow) #raw 0x07 = Step Right (Slow) #raw 0x08 = Step Down (Normal) #raw 0x09 = Step Up (Normal) #raw 0x0A = Step Left (Normal) #raw 0x0B = Step Right (Normal) #raw 0x0C = Jump2 Down #raw 0x0D = Jump2 Up #raw 0x0E = Jump2 Left #raw 0x0F = Jump2 Right #raw 0x10 = Delay1 #raw 0x11 = Delay2 #raw 0x12 = Delay3 #raw 0x13 = Delay4 #raw 0x14 = Delay5 #raw 0x15 = Slide Down #raw 0x16 = Slide Up #raw 0x17 = Slide Left #raw 0x18 = Slide Right #raw 0x19 = Step on the Spot Down (Slow) #raw 0x1A = Step on the Spot Up (Slow) #raw 0x1B = Step on the Spot Left (Slow) #raw 0x1C = Step on the Spot Right (Slow) #raw 0x1D = Step on the Spot Down (Normal) #raw 0x1E = Step on the Spot Up (Normal) #raw 0x1F = Step on the Spot Left (Normal) #raw 0x20 = Step on the Spot Right (Normal) #raw 0x21 = Step on the Spot Down (Faster) #raw 0x22 = Step on the Spot Up (Faster) #raw 0x23 = Step on the Spot Left (Faster) #raw 0x24 = Step on the Spot Right (Faster) #raw 0x25 = Step on the Spot Down (Fastest) #raw 0x26 = Step on the Spot Up (Fastest) #raw 0x27 = Step on the Spot Left (Fastest) #raw 0x28 = Step on the Spot Right (Fastest) #raw 0x29 = Slide Down #raw 0x2A = Slide Up #raw 0x2B = Slide Left #raw 0x2C = Slide Right #raw 0x2D = Slide Down #raw 0x2E = Slide Up #raw 0x2F = Slide Left #raw 0x30 = Slide Right #raw 0x31 = Slide Down #raw 0x32 = Slide Up #raw 0x33 = Slide Left #raw 0x34 = Slide Right #raw 0x35 = Slide Running Down #raw 0x36 = Slide Running Up #raw 0x37 = Slide Running Left #raw 0x38 = Slide Running Right #raw 0x3A = Jump Facing Left (Down) #raw 0x3B = Jump Facing Down (Up) #raw 0x3C = Jump Facing Up (Left) #raw 0x3D = Jump Facing Left (Right) #raw 0x3E = Face Player #raw 0x3F = Face Against Player #raw 0x42 = Jump Down #raw 0x43 = Jump Up #raw 0x44 = Jump Left #raw 0x45 = Jump Right #raw 0x46 = Jump in Place (Facing Down) #raw 0x47 = Jump in Place (Facing Up) #raw 0x48 = Jump in Place (Facing Left) #raw 0x49 = Jump in Place (Facing Right) #raw 0x4A = Jump in Place (Facing Down/Up) #raw 0x4B = Jump in Place (Facing Up/Down) #raw 0x4C = Jump in Place (Facing Left/Right) #raw 0x4D = Jump in Place (Facing Right/Left) #raw 0x4E = Face Left #raw 0x54 = Hide Sprite #raw 0x55 = Show Sprite #raw 0x56 = Exclamation Mark (!) #raw 0x57 = Question Mark (?) #raw 0x58 = Love (<3) #raw 0x62 = Walk Down #raw 0x63 = Walk Down #raw 0x64 = Face Down (Delayed) #raw 0x65 = Face Up (Delayed) #raw 0x66 = Face Left (Delayed) #raw 0x67 = Face Right (Delayed) #raw 0x70 = Jump in Place (Facing Down) #raw 0x71 = Jump in Place (Facing Up) #raw 0x72 = Jump in Place (Facing Left) #raw 0x73 = Jump in Place (Facing Right) #raw 0x74 = Jump Down Running #raw 0x75 = Jump Up Running #raw 0x76 = Jump Left Running #raw 0x77 = Jump Right Running #raw 0x78 = Jump2 Down Running #raw 0x79 = Jump2 Up Running #raw 0x7A = Jump2 Left Running #raw 0x7B = Jump2 Right Running #raw 0x7C = Walk on the Spot (Down) #raw 0x7D = Walk on the Spot (Up) #raw 0x7E = Walk on the Spot (Lef) #raw 0x7F = Walk on the Spot (Right) #raw 0x80 = Slide Down Running #raw 0x81 = Slide Up Running #raw 0x82 = Slide Left Running #raw 0x83 = Slide Right Running #raw 0x84 = Slide Down #raw 0x85 = Slide Up #raw 0x86 = Slide Left #raw 0x87 = Slide Right #raw 0x88 = Slide Down on Left Foot #raw 0x89 = Slide Up on Left Foot #raw 0x8A = Slide Left on Left Foot #raw 0x8B = Slide Right on Left Foot #raw 0x8C = Slide Left diagonally (Facing Up) #raw 0x8D = Slide Right diagonally (Facing Up) #raw 0x8E = Slide Left diagonally (Facing Down) #raw 0x8F = Slide Right diagonally (Facing Down) #raw 0x90 = Slide2 Left diagonally (Facing Up) #raw 0x91 = Slide2 Right diagonally (Facing Up) #raw 0x92 = Slide2 Left diagonally (Facing Down) #raw 0x93 = Slide2 Right diagonally (Facing Down) #raw 0x96 = Walk Left #raw 0x97 = Walk Right #raw 0x98 = Levitate #raw 0x99 = Stop Levitating #raw 0x9C = Fly Up Vertically #raw 0x9D = Land #raw 0xFE = End of Movements[/quote] Fire Red/Leaf Green [quote]#raw 0x0 = Face Down #raw 0x1 = Face Up #raw 0x2 = Face Left #raw 0x3 = Face Right #raw 0x4 = Face Down (Faster) #raw 0x5 = Face Up (Faster) #raw 0x6 = Face Left (Faster) #raw 0x7 = Face Right (Faster) #raw 0x8 = Step Down (Very Slow) #raw 0x9 = Step Up (Very Slow) #raw 0xA = Step Left (Very Slow) #raw 0xB = Step Right (Very Slow) #raw 0xC = Step Down (Slow) #raw 0xD = Step Up (Slow) #raw 0xE = Step Left (Slow) #raw 0xF = Step Right (Slow) #raw 0x10 = Step Down (Normal) #raw 0x11 = Step Up (Normal) #raw 0x12 = Step Left (Normal) #raw 0x13 = Step Right (Normal) #raw 0x14 = Jump2 Down #raw 0x15 = Jump2 Up #raw 0x16 = Jump2 Left #raw 0x17 = Jump2 Right #raw 0x18 = Delay1 #raw 0x19 = Delay2 #raw 0x1A = Delay3 #raw 0x1B = Delay4 #raw 0x1C = Delay5 #raw 0x1D = Step Down (Fast) #raw 0x1E = Step Up (Fast) #raw 0x1F = Step Left (Fast) #raw 0x20 = Step Right (Fast) #raw 0x21 = Step on the Spot Down (Normal) #raw 0x22 = Step on the Spot Up (Normal) #raw 0x23 = Step on the Spot Left (Normal) #raw 0x24 = Step on the Spot Right (Normal) #raw 0x25 = Step on the Spot Down (Faster) #raw 0x26 = Step on the Spot Up (Faster) #raw 0x27 = Step on the Spot Left (Faster) #raw 0x28 = Step on the Spot Right (Faster) #raw 0x29 = Step on the Spot Down (Fastest) #raw 0x2A = Step on the Spot Up (Fastest) #raw 0x2B = Step on the Spot Left (Fastest) #raw 0x2C = Step on the Spot Right (Fastest) #raw 0x2D = Face Down (Delayed) #raw 0x2E = Face Up (Delayed) #raw 0x2F = Face Left (Delayed) #raw 0x30 = Face Right (Delayed) #raw 0x31 = Slide Down (Slow) #raw 0x32 = Slide Up (Slow) #raw 0x33 = Slide Left (Slow) #raw 0x34 = Slide Right (Slow) #raw 0x35 = Slide Down (Normal) #raw 0x36 = Slide Up (Normal) #raw 0x37 = Slide Left (Normal) #raw 0x38 = Slide Right (Normal) #raw 0x39 = Slide Down (Fast) #raw 0x3A = Slide Up (Fast) #raw 0x3B = Slide Left (Fast) #raw 0x3C = Slide Right (Fast) #raw 0x3D = Slide Running on Right Foot (Down) #raw 0x3E = Slide Running on Right Foot (Up) #raw 0x3F = Slide Running on Right Foot (Left) #raw 0x40 = Slide Running on Right Foot (Right) #raw 0x41 = Slide Running on Left Foot (Down) #raw 0x42 = Slide Running on Left Foot (Up) #raw 0x43 = Slide Running on Left Foot (Left) #raw 0x44 = Slide Running on Left Foot (Right) #raw 0x46 = Jump Facing Left (Down) #raw 0x47 = Jump Facing Down (Up) #raw 0x48 = Jump Facing Up (Left) #raw 0x49 = Jump Facing Left (Right) #raw 0x4A = Face Player #raw 0x4B = Face Against Player #raw 0x4E = Jump Down #raw 0x4F = Jump Up #raw 0x50 = Jump Left #raw 0x51 = Jump Right #raw 0x52 = Jump in Place (Facing Down) #raw 0x53 = Jump in Place (Facing Up) #raw 0x54 = Jump in Place (Facing Left) #raw 0x55 = Jump in Place (Facing Right) #raw 0x56 = Jump in Place (Facing Down/Up) #raw 0x57 = Jump in Place (Facing Up/Down) #raw 0x58 = Jump in Place (Facing Left/Right) #raw 0x59 = Jump in Place (Facing Right/Left) #raw 0x60 = Hide Sprite #raw 0x61 = Show Sprite #raw 0x62 = Exclamation Mark (!) #raw 0x63 = Question Mark (?) #raw 0x64 = Cross (X) #raw 0x65 = Double Exclamation Mark (!!) #raw 0x66 = Happy (^_^) #raw 0xFE = End of Movements[/quote] Before we look at the movements in a different view, I should explain the layout of the movements at the pointer. It's set out in a similar way to a message. We have #org @pointer first and what's being written to the ROM below that. You put #raw, then the movement that you want. You have to put #raw 0xFE at the end of the movements, or else the movements won't work. Now, we're going to look at waitmovement and pause. waitmovement is one of the best commands that you will ever find. It's the "perfect pause"! When used as waitmovement 0x0, it will wait for the exact amount of time that it takes for the movements to move the sprite. Really helpful, isn't it? Now, we have pause. pause will wait for a set amount of time. You have to add the amount that it will wait for. If you want to calculate pause time vs. seconds, here's a (not very good) conversion thingy: 0x20 Pause time = approx. 1 sec. real time I don't use this very often. I prefer to use waitmovement almost all of the time. Okay now, no more sidetracking. Let's look at the movements. Let's look at the script without anything but the applymovements, pause and waitmovements. This leaves us with this: [quote]#dynamic 0x800000 #org @start applymovement 0x04 @move waitmovement 0x0 applymovement 0xFF @move2 pause 0x30 applymovement 0x04 @move3 applymovement 0xFF @move3 waitmovement 0x0 release end #org @move #raw 0x62 #raw 0x12 #raw 0x12 #raw 0x12 #raw 0x12 #raw 0xFE #org @move2 #raw 0x03 #raw 0xFE #org @move3 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0xFE[/quote] The first two applymovements are in a completely normal setup. ie. applymovement 0xXX @YYYYYY waitmovement/pause But let's look at the next set of movements. It's set up differently. We have two applymovements before we have some sort of pause. What would happen if I did that? They would both move at the same time. This is sometimes referred to as "follow-me." With a "follow-me", we can use as many applymovements before the pause as we want. This can be useful if we wanted a "group" to walk together. We can have three, four, five, six, or however many you want in a "group". I think that's all there is to the applymovement command. Now we can move onto that playsong. When we script playsong, we need a few bytes to get it to work. Here's a short summary of what we need: [quote]playsong [song #] 0x0[/quote] That 0x0 is a buffer. We need it in order for the command to work. Whatever game you're hacking, you can find the song numbers in A-Map. Now we have fadesong. What's that do? It's set up similar to playsong and will fade into the sound displayed. If you want more detail on how it works, just refer back to playsong. The only thing different is that it does not need that extra buffer. I thought I might point out something about the checkflag in this script. We actually have no setflag in this script. So why do I have a checkflag? In one script, we can check if a flag was set in a different script. In this section, we check if the Pokemon menu has been activated before the script will end (@done). Okay. Compile the script, assign it to a script tile (green with an S) and not a person. Now test it in the ROM. Then look at this spoiler. Didn't work, did it? Froze on the spot. You're going to need to change in advance map unknown from 0000 to 0300 and var number from 0000 to 4050. Try it now. Worked perfectly, didn't it? So, what's next? Countpokemon I'm not going to show just one script. There's too much to explain in just one script. Here's the most basic example. [quote]countpokemon compare 0x800D 0x6 if 0x1 goto @continue[/quote] This is the most basic form. Before I explain this fragment of a script, I should go into a little more detail on the command countpokemon itself. countpokemon checks how many Pokemon are in your party and assigns the value to 0x800D. If we have six Pokemon in our party, it would assign 0x06 to 0x800D, and if we had 3 Pokemon in our party, it would assign 0x03 to 0x800D. Now back to that part of a script. compare 0x800D 0x6 checks to see if there are six Pokemon in the player's party. Then, with if 0x1 goto @continue, it says, "if there are six Pokemon in your party, go to @continue". That's the simplest and easiest form of countpokemon. I'll add one more example just to help the information sink in. [quote]countpokemon compare 0x800D 0x2 if 0x1 goto @continue[/quote] In this example, it checks if you have two Pokemon. If you have a number of Pokemon other than two, the script won't continue to @continue. Trainerbattle 0x0 Just a simple trainerbattle script: [quote]#dynamic 0x800000 #org @start trainerbattle 0x0 0x001 0x0 @before @after msgbox @beaten 0x6 release end #org @before = Go, all my PIKACHUs! #org @after = Nooo! My PIKACHUs!!!!! #org @beaten = My PIKACHUs can be used to\ncharge my Nintendo DS Lite.[/quote] trainerbattle is a battle with a trainer. trainerbattle is great because the game keeps track of whether you have beaten a trainer or not. In this script, we have no need for a checkflag/setflag situation. Now to explaining these values after the trainerbattle. These are: trainerbattle 0x0 [Type of battle] 0x001 [Trainer ID] 0x0 [Reserved Byte (normally 0x0)] @before [Pointer to Message When Seen] @after [Pointer to Winning Message] I guess I'll explain the type of battle. This byte determines whether it's a double battle, Gym Leader Battle, or another type. A normal trainerbattle is 0x0. The trainer will "see you", then go to the beginning message, then the battle, and then goes to the message when you win. Now we'll move onto the Trainer ID. This is the ID of a trainer that's found in PET. For example, Brock can be found with with a Trainer ID of 0x19E, and Blaine can be found with 0x1A3. Now, there are two pointers, @before & @after. I've labeled these to help display what they are used for. The first pointer, @before, shows the pointer to the message displayed before the battle. Now onto @after. It's the pointer to the message after the battle, obviously! This message appears while we are still in the battle itself. Remember the colors that were mentioned towards the beginning of this tutorial? Well, we can use colors with this too! They're different, though. Sadly, I don't have a list for those values. Now, if I were to test it in a ROM, what would happen after the trainerbattle? Nothing. The script ends. So why do I have a msgbox after it? Remember how I talked about trainerbattle keeping track of whether you have beaten them or not? Well, once you beat the trainer, the trainerbattle will be skipped, so when you speak to them after beating them in a battle, it'll be treated like a normal message script. Wait! Why don't I have a lock and faceplayer after the trainerbattle? The reason is that once you have beaten that trainer, trainerbattle will also act as the lock/faceplayer combo, and you don't have to worry about them in this script. That's the scripting side of this command done. Now the A-Map side. Now compile this script, and test it in a ROM. Did it work like a normal in-game trainer battle? I bet your answer is no. You'll need to fill in these boxes: In advance map on righ