Script Help Thread (DO NOT REQUEST SCRIPTS) Page 159

Started by HackMew December 20th, 2008 5:10 AM
  • 625740 views
  • 9682 replies
Male
Seen January 6th, 2017
Posted March 5th, 2016
202 posts
13.2 Years
Well, I'm very green to hacking and scripting, and so I'm having a lot of trouble with this concept. I'm hacking Emerald, and I'd like to add more legendary Pokemon encounters on the map. I hate it when legendary Pokemon are encountered multiple times in the wild.

So, this is a person event on the map, or should be, but the script won't compile. This is a script generated by PKSVUI, but it won't compile in that program or any other. I'd like to make a script that works in XSE, as I'll be using that when my knowledge about scripting grows.

Spoiler:
#dynamic 0xE3CF65
#org @start
special 0x187
compare LASTRESULT 2
if == jump 0x81A7AE0
special 0x188
lock
faceplayer
checksound
cry MEWTWO 2
waitcry
pause 0x14
playsound 0x156 0x0
battle MEWTWO 0x46 TWISTEDSPOON
setflag 0x807
special 0x138
waitspecial
clearflag 0x807
special2 0x800D 0xB4
compare LASTRESULT 1
if == jump 0x8162558
compare LASTRESULT 4
if == jump 0x8162561
compare LASTRESULT 5
if == jump 0x8162561
setflag 0xC1
release
end
Show me that script in XSE and I may be able to help you.
Male
Seen June 29th, 2010
Posted June 16th, 2010
23 posts
13 Years
Here's one that should work in XSE, as I've been following multiple tutorials:

Spoiler:
#dynamic 0xF3CF65

#org @start
lock
faceplayer
msgbox @1 0x6
cry 0x6 0x0
wildbattle 0x96 0x1E 0x214
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x934
release
end

#org @1
= It… moved?!


Here's the error message:
Error 13 'Type mismatch' on line 7.
Missing #define or parameter

Line: wildbattle 0x96 0x1E 0x214

Zeffy

g'day

Male
Seen December 1st, 2022
Posted January 30th, 2021
6,395 posts
14.1 Years
Here's one that should work in XSE, as I've been following multiple tutorials:

Spoiler:
#dynamic 0xF3CF65

#org @start
lock
faceplayer
msgbox @1 0x6
cry 0x6 0x0
wildbattle 0x96 0x1E 0x214
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x934
release
end

#org @1
= It… moved?!


Here's the error message:
Err, there is no #214 item. That's why its been saying that error.

Turn this line:
wildbattle 0x96 0x1E 0x214

To this line:
wildbattle 0x96 0x1E 0x0

...and it'll be OK now.
Male
Seen January 6th, 2017
Posted March 5th, 2016
202 posts
13.2 Years


Err, there is no #214 item. That's why its been saying that error.

Turn this line:
wildbattle 0x96 0x1E 0x214

To this line:
wildbattle 0x96 0x1E 0x0

...and it'll be OK now.
To add to that.

If you intended to have a Pokémon hold an item, it must have the correct item ID, and must be in hex.

Here's a list of the item codes in hex for Fire Red and Leaf Green:

Spoiler:

----------------
ITEMS DIGIT LIST
----------------

Here are all the digits you need to know for the 'Obtain Any Item' code:

0000 = No Item
0001 = Master Ball
0002 = Ultra Ball
0003 = Great Ball
0004 = Poke Ball
0005 = Safari Ball
0006 = Net Ball
0007 = Dive Ball
0008 = Nest Ball
0009 = Repeat Ball
000A = Timer Ball
000B = Luxury Ball
000C = Premier Ball
000D = Potion
000E = Antidote
000F = Burn Heal
0010 = Ice Heal
0011 = Awakening
0012 = Parlyz Heal
0013 = Full Restore
0014 = Max Potion
0015 = Hyper Potion
0016 = Super Potion
0017 = Full Heal
0018 = Revive
0019 = Max Revive
001A = Fresh Water
001B = Soda Pop
001C = Lemonade
001D = MooMoo Milk
001E = Energy Powder
001F = Energy Root
0020 = Heal Powder
0021 = Revival Herb
0022 = Ether
0023 = Max Ether
0024 = Elixer
0025 = Max Elixer
0026 = Lava Cookie
0027 = Blue Flute
0028 = Yellow Flute
0029 = Red Flute
002A = Black Flute
002B = White Flute
002C = Berry Juice
002D = Sacred Ash
002E = Shoal Salt
002F = Shoal Shell
0030 = Red Shard
0031 = Blue Shard
0032 = Yellow Shard
0033 = Green Shard
003F = HP Up
0040 = Protein
0041 = Iron
0042 = Carbos
0043 = Calcium
0044 = Rare Candy
0045 = PP Up
0046 = Zinc
0047 = PP Max
0049 = Guard Spec
004A = Dire Hit
004B = X Attack
004C = X Defend
004D = X Speed
004E = X Accuracy
004F = X Special
0050 = Poke Doll
0051 = Fluffy Tail
0053 = Super Repel
0054 = Max Repel
0055 = Escape Rope
0056 = Repel
005D = Sun Stone
005E = Moon Stone
005F = Fire Stone
0060 = Thunder Stone
0061 = Water Stone
0062 = Leaf Stone
0067 = Tiny Mushroom
0068 = Big Mushroom
006A = Pearl
006B = Big Pearl
006C = Stardust
006D = Star Piece
006E = Nugget
006F = Heart Scale
0079 = Orange Mail
007A = Harbor Mail
007B = Glitter Mail
007C = Mech Mail
007D = Wood Mail
007E = Wave Mail
007F = Bead Mail
0080 = Shadow Mail
0081 = Tropic Mail
0082 = Dream Mail
0083 = Fab Mail
0084 = Retro Mail
0085 = Cheri Berry
0086 = Chesto Berry
0087 = Pecha Berry
0088 = Rawst Berry
0089 = Aspear Berry
008A = Leppa Berry
008B = Oran Berry
008C = Persim Berry
008D = Lum Berry
008E = Sitrus Berry
008F = Figy Berry
0090 = Wiki Berry
0091 = Mago Berry
0092 = Aguav Berry
0093 = Iapapa Berry
0094 = Razz Berry
0095 = Bluk Berry
0096 = Nanab Berry
0097 = Wepear Berry
0098 = Pinap Berry
0099 = Pomeg Berry
009A = Kelpsy Berry
009B = Qualot Berry
009C = Hondew Berry
009D = Grepa Berry
009E = Tamato Berry
009F = Cornn Berry
00A0 = Magost Berry
00A1 = Rabuta Berry
00A2 = Nomel Berry
00A3 = Spelon Berry
00A4 = Pamtre Berry
00A5 = Watmel Berry
00A6 = Durin Berry
00A7 = Belue Berry
00A8 = Liechi Berry
00A9 = Ganlon Berry
00AA = Salac Berry
00AB = Petaya Berry
00AC = Apicot Berry
00AD = Lansat Berry
00AE = Starf Berry
00AF = Enigma Berry
00B3 = Bright Powder
00B4 = White Herb
00B5 = Macho Brace
00B6 = Exp Share
00B7 = Quick Claw
00B8 = Soothe Bell
00B9 = Mental Herb
00BA = Choice Band
00BB = King's Rock
00BC = Silver Powder
00BD = Amulet Coin
00BE = Cleanse Tag
00BF = Soul Dew
00C0 = Deep Sea Tooth
00C1 = Deep Sea Scale
00C2 = Smoke Ball
00C3 = Everstone
00C4 = Focus Band
00C5 = Lucky Egg
00C6 = Scope Lens
00C7 = Metal Coat
00C8 = Leftovers
00C9 = Dragon Scale
00CA = Light Ball
00CB = Soft Sand
00CC = Hard Stone
00CD = Miracle Seed
00CE = Black Glasses
00CF = Black Belt
00D0 = Magnet
00D1 = Mystic Water
00D2 = Sharp Beak
00D3 = Poison Barb
00D4 = Nevermelt Ice
00D5 = Spell Tag
00D6 = Twisted Spoon
00D7 = Charcoal
00D8 = Dragon Fang
00D9 = Silk Scarf
00DA = Up-Grade
00DB = Shell Bell
00DC = Sea Incense
00DD = Lax Incense
00DE = Lucky Punch
00DF = Metal Powder
00E0 = Thick Club
00E1 = Stick
00FE = Red Scarf
00FF = Blue Scarf
0100 = Pink Scarf
0101 = Green Scarf
0102 = Yellow Scarf
0103 = Mach Bike
0104 = Coin Case
0105 = ItemFinder
0106 = Old Rod
0107 = Good Rod
0108 = Super Rod
0109 = S.S. Ticket
010A = Contest Pass
010C = Wailmer Pail
010D = Devon's Goods
010E = Soot Sack
010F = Basement Key
0110 = Acro Bike
0111 = PokeBlock Case
0112 = Letter
0113 = Eon Ticket
0114 = Red Orb
0115 = Blue Orb
0116 = Scanner
0117 = Go-Goggles
0118 = Meteorite
0119 = Rm.1 Key
011A = Rm.2 Key
011B = Rm.4 Key
011C = Rm.6 Key
011D = Storage Key
011E = Root Fossil
011F = Claw Fossil
0120 = Devon Scope
0121 = TM01 (Focus Punch)
0122 = TM02 (Dragon Claw)
0123 = TM03 (Water Pulse)
0124 = TM04 (Calm Mind)
0125 = TM05 (Roar)
0126 = TM06 (Toxic)
0127 = TM07 (Hail)
0128 = TM08 (Bulk Up)
0129 = TM09 (Bullet Seed)
012A = TM10 (Hidden Power)
012B = TM11 (Sunny Day)
012C = TM12 (Taunt)
012D = TM13 (Ice Beam)
012E = TM14 (Blizzard)
012F = TM15 (Hyper Beam)
0130 = TM16 (Light Screen)
0131 = TM17 (Protect)
0132 = TM18 (Rain Dance)
0133 = TM19 (Giga Drain)
0134 = TM20 (Safeguard)
0135 = TM21 (Frustration)
0136 = TM22 (Solar Beam)
0137 = TM23 (Iron Tail)
0138 = TM24 (Thunderbolt)
0139 = TM25 (Thunder)
013A = TM26 (Earthquake)
013B = TM27 (Return)
013C = TM28 (Dig)
013D = TM29 (Psychic)
013E = TM30 (Shadow Ball)
013F = TM31 (Brick Break)
0140 = TM32 (Double Team)
0141 = TM33 (Reflect)
0142 = TM34 (Shock Wave)
0143 = TM35 (Flamethrower)
0144 = TM36 (Sludge Bomb)
0145 = TM37 (Sandstorm)
0146 = TM38 (Fire Blast)
0147 = TM39 (Rock Tomb)
0148 = TM40 (Aerial Ace)
0149 = TM41 (Torment)
014A = TM42 (Facade)
014B = TM43 (Secret Power)
014C = TM44 (Rest)
014D = TM45 (Attract)
014E = TM46 (Thief)
014F = TM47 (Steel Wing)
0150 = TM48 (Skill Swap)
0151 = TM49 (Snatch)
0152 = TM50 (Overheat)
0153 = HM01 (Cut)
0154 = HM02 (Fly)
0155 = HM03 (Surf)
0156 = HM04 (Strength)
0157 = HM05 (Flash)
0158 = HM06 (Rock Smash)
0159 = HM07 (Waterfall)
015A = HM08 (Dive)
015D = {Oak's Parcel}
015E = {Poke Flute}
015F = {Secret Key}
0160 = {Bike Voucher}
0161 = {Gold Teeth}
0162 = {Old Amber}
0163 = {Card Key}
0164 = {Elevator Key}
0165 = {Dome Fossil}
0166 = {Helix Fossil}
0167 = {Silph Scope}
0168 = {Bicycle}
0169 = {Town Map}
016A = {Battle Searcher}
016B = {Voice Checker}
016C = {TM Case}
016D = {Berry Bag}
016E = {Help TV}
016F = {Tri-Pass}
0170 = {Rainbow Pass}
0171 = {Tea}
0172 = {Mystery Ticket}
0173 = {Aurora Ticket}
0174 = {Konaire}
0175 = {Ruby Plate}
0176 = {Sapphire Plate}
01F4 = [Jail Key]
01F5 = [Elevator Key]
01F6 = [Small Tablet]
01F7 = [F-Disk]
01F8 = [R-Disk]
01F9 = [L-Disk]
01FA = [D-Disk]
01FB = [U-Disk]
01FC = [Subway Key]
01FD = [Maingate Key]
01FE = [Card Key]
01FF = [Down St. Key]
0200 = [DNA Sample 1]
0201 = [Bayleef DNA]
0202 = [DNA Sample 2]
0203 = [Quilava DNA]
0204 = [DNA Sample 3]
0205 = [Croconaw DNA]
0206 = [DNA Sample 4]
0207 = [Sudowoodo DNA]
0208 = [DNA Sample 5]
0209 = [Misdreavus DNA]
020A = [DNA Sample 6]
020B = [Mightyena DNA]
020C = [DNA Sample 7]
020D = [Raikou DNA]
020E = [DNA Sample 8]
020F = [Entei DNA]
0210 = [DNA Sample 9]
0211 = [Suicune DNA]
0212 = [Data ROM]
0213 = [Steel Teeth]
0214 = [Gear]
0215 = [Red ID Badge]
0216 = [Green ID Badge]
0217 = [Blue ID Badge]
0218 = [Yellow ID Badge]
0219 = [Time Flute]
021A = [Ein File S]
021B = [Ein File H]
021C = [Ein File C]
021D = [Ein File P]
021E = [Cologne Case]
021F = [Joy Scent]
0220 = [Excite Scent]
0221 = [Vivid Scent]
0222 = [Powerup Part]
0223 = [Ein File F]


Quoted from SilverKadabra of GameFaqs http://www.gamefaqs.com/gba/918915-pokemon-firered-version/faqs/32496
That specific list is for the gain any item cheat, but those item IDs work when scripting, as they are the actual item IDs. (Don't go on that website, it is just to give credit for the list)
Male
Seen June 29th, 2010
Posted June 16th, 2010
23 posts
13 Years
Thanks for the information about items, but now I'm having a different issue.

I've edited the script a bit.

Spoiler:
'-----------------------
'-----------------------
#dynamic 0xE3CF6D
#org @start
lock
faceplayer
message $1
boxset 6
cry 0x6 0x0
nop
nop
wildbattle 0x96 0x1E 0x0 0x1
fadescreen 0
#raw 0x53 0x0F 0x80
setflag 0x1000
release
end

#org @1
= It... moved?!


When coming in contact with the sprite, the message box appears splendidly, but the sprite disappears without starting a battle. When walking away, the sprite reappears, but pressing A just repeats the problem.
Seen April 19th, 2011
Posted February 9th, 2011
5 posts
14.9 Years
Hey Guys ^^
My Script:

#org $start
Trainerbattle 0 0x007 $before $after
Message $beaten
boxset 6
release
end

#org $before
$before 1 = So! You are \v\h01. Hehe\nI have heard much from you!\pI'm Giovanni. Team Rocket's Leader!\nI have the strongest Pokemon\pof the World!\nGood luck for you!

#org $after
$after 1 = You Win? WTF???\nThats Impossible!\pMy Pokemon was defeat?\nYour good!\pYour beat the starter from\nthe Hoenn Region!

#org $beaten
$beaten 1 = So you have defeat me.\nBut the another two will you lose!\pMuhahahahaha!


I will have in Fire Red from the (Fire Red Battle Sound [Battle 4] to Emerald Battle Sound [Battle 2])?
Seen May 21st, 2011
Posted January 15th, 2011
54 posts
14.2 Years
Ok, so after the @play3 offset, the script stops working. However, my player is able to move, so the game isn't frozen. Did I miss a command?

Spoiler:
#dynamic 0x8033A1

#org @start
checkflag 0x828
if 0x1 goto @end
showpokepic 0x4 0x3 0x3
msgbox @char 0x5
compare 0x800D 0x1
if 0x0 goto @end
hidesprite 0x8
setflag 0x1000
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
hidepokepic
msgbox @rec 0x4
waitfanfare
closeonkeypress
msgbox @nick 0x5
compare 0x800D 0x1
if 0x1 gosub @name
closeonkeypress
applymovement 0xFF @play1
waitmovement 0x0
applymovement 0x5 @redwood
waitmovement 0x0
applymovement 0x4 @james
waitmovement 0x0
msgbox @redwood2 0x2
applymovement 0x4 @james2
waitmovement 0x0
applymovement 0xFF @play2
waitmovement 0x0
applymovement 0x4 @james3
waitmovement 0x0
applymovement 0xFF @play3
waitmovement 0x0
applymovement 0x5 @redwood3
waitmovement 0x0
applymovement 0x4 @james4
waitmovement 0x0
setflag 0x828
end

#org @char
= Redwood: So you choose the\nCharmander then? A worthy choice\lfor a worthy trainer!

#org @end
closeonkeypress
hidepokepic
end

#org @rec
= [player] received the Charmander!

#org @name
call 0x1A74EB
return

#org @nick
= Would you like to give a\nnickname to Charmander?

#org @play1
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x01
#raw 0xFE

#org @redwood
#raw 0x0
#raw 0xFE

#org @james
#raw 0x1
#raw 0xFE

#org @james2
#raw 0x10
#raw 0x12
#raw 0xFE

#org @play2
#raw 0x0
#raw 0xFE

#org @james3
#raw 0x12
#raw 0x11
#raw 0xFE

#org @play3
#raw 0x02
#raw 0xFE

#org @redwood3
#raw 0x02
#raw 0xFE

#org @james4
#raw 0x11
#raw 0x12
#raw 0x12
#raw 0x01
#raw 0xFE

#org @redwood2
= Redwood: Good choice! Now it's your\nturn James.

vietazn654

A sound soul dwells within me

Age 28
Male
Virginia
Seen August 21st, 2014
Posted July 26th, 2010
371 posts
13.2 Years
Alright, I decompiled a script, and I compiled it. But it turns out the same =\ I'm using XSE. Anyone know how to resave it? Or do I have to decompile it, copy and paste it on a new fresh script <.<

I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.
Male
Seen January 6th, 2017
Posted March 5th, 2016
202 posts
13.2 Years
Ooft busy day.

@melosfox
1. Remove the nops.
2. Make sure the overworld's Person ID is set to 1000 (same as the flag you set)
2.5. A little tip. Underneath the "wildpokémonbattle" part, put in "playsong 0xXXX". Replace XXX with any song (there is a list of them in any header in Advance Map). This will make the battle theme when fighting the Pokémon whatever you want.

@smashking
What are you asking smashking? Be a little clearer.

@metroid die
The "waitmovement 0x0" part is supposed to be the same as the applymovement.

So for move player it's
applymovement 0xFF
waitmovement 0xFF

And you can still move about because you didn't use the "lock" command at the start of your script.

@viet
Decompile isn't the opposite of compile in this case. Decompile simply translates the script into something that is more readable (if it is already readable, then nothing happens).

So yeah, you need to make the script in a new offset.
Male
Seen June 29th, 2010
Posted June 16th, 2010
23 posts
13 Years
Nicolai Fox, you've been a great help so far!

The sprite now disappears and stays gone. When you press A on the sprite, the message appears, then the screen flashes and you hear the cry as you're supposed to. . .

but there's no battle. It just disappears.

Spoiler:
'-----------------------
#dynamic 0xE3CF6D
#org @start
lock
faceplayer
message $1
boxset 6
cry 0x6 0x0
wildbattle 0x96 0x1E 0x0 0x1
fadescreen 0
#raw 0x53 0x0F 0x80
setflag 0x1000
release
end

#org @1
= It... moved?!


I'm so close to the breakthrough that will allow me to do a complete edit.
Male
Seen January 6th, 2017
Posted March 5th, 2016
202 posts
13.2 Years
@melosfox

Just to clarify. You want to fight a level 30 Drowsee, which is holding an energy powder? That is what that battle script seems to be telling me lol.

The Wild Pokémon data should only have three values, yours has four.

wildbattle 0xX(pokemon species) 0xX(level of pokemon) 0xX(held item)

Bare in mind, all of the number values must be in hexidecimal format.
Male
Seen June 29th, 2010
Posted June 16th, 2010
23 posts
13 Years
No, actually, I'm trying to fight a level 80 Mewtwo with a twistedspoon. (In Emerald) I have actually figured out most of the code and come up with a couple extra commands which work pretty well, except the battle begins with a strange fight intro on rocky soil. How do I change the fight background? Also, the sunlight is very strong, something else I'd like to change. Thanks!

Spoiler:
'-----------------------
#org 0xE3DB70
lockall
faceplayer
checksound
msgbox 0x8000001 '"It... moved?!"
callstd 0x6
cry 0x96 0x2
pause 0x28
waitcry
startwildbattle 0x96 0x50 0x0
setflag 0x1001
special 0x13A
waitstate
clearflag 0x1001
special2 LASTRESULT 0xB7
compare LASTRESULT 0x1
if 0x1 goto 0x8E3CF6D
compare LASTRESULT 0x4
if 0x1 goto 0x8E3CF8B
compare LASTRESULT 0x5
if 0x1 goto 0x8E3CF8B
setflag 0x1002
releaseall
end

'-----------------------
#org 0xE3CF6D
setflag 0x1002
goto 0x823977C
end

'-----------------------
#org 0xE3CF8B
setvar 0x8004 0x096
goto 0xE3CF9B
end

'-----------------------
#org 0x23977C
fadescreen3 0x1
hidesprite LASTTALKED
fadescreen3 0x0
releaseall
end

'-----------------------
#org 0xE3CF9B
fadescreen3 0x1
hidesprite LASTTALKED
fadescreen3 0x0
bufferpokemon 0x0 0x8004
msgbox 0x8273204 '"The [buffer1] flew away!"
callstd 0x4
releaseall
end


'---------
' Strings
'---------
#org 0x1
= It... moved?!

#org 0x273204
= The [buffer1] flew away!


(Am I a fast learner?)
Male
Seen January 6th, 2017
Posted March 5th, 2016
202 posts
13.2 Years
Best to learn how to do your own, than to copy Nintendo's (you will need less help in the future).

Here's what you're looking for:

wildbattle 0x96 0x50 0xD6

That is all. (And of course you need the setflag business etc, and maybe a custom song before wildbattle if you want a custom song).

#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @1 0x6
cry 0x96 0x0
wildbattle 0x96 0x50 0xD6
fadescreen 0x1
fadescreen 0x0
hidesprite 0x800F
setflag 0x200
release
end

#org @1
= MEWTWO: Argh you beat me hax!
Male
Seen June 29th, 2010
Posted June 16th, 2010
23 posts
13 Years
Thanks, but it doesn't work, same problem as last time. The cry happens, then the sprite disappears. That's why I copied Nintendo's basic structure and edited it until it fit my needs. It's fairly close now, just the battle background is wrong.

EDIT: I fixed the background. I had overlooked the weather of the map in Advancemap. It had nothing to do with the script. I feel foolish.

vietazn654

A sound soul dwells within me

Age 28
Male
Virginia
Seen August 21st, 2014
Posted July 26th, 2010
371 posts
13.2 Years
Geez I actually thought this one would work =p

#dynamic 0x2DFD25

#org @start
checkflag 0x1004
if 0x1 goto @done
msgbox @1 0x6
applymovement 0x5 @move
waitmovement 0x0
msgbox @2 0x6
call @pokedex
msgbox @3 0x6
call @run
msgbox @6 0x6
applymovement 0x5 @done0
waitmovement 0x0
hidesprite 0x800F
setflag 0x1004
release
end

#org @done
release
end

#org @move
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @1
= [blue_fr]\v\h01!

#org @2
= [blue_fr]PROF. BIRCH: I was looking for\nyou!\pRemember when I gave you that\nPOKEDEX?\pPROF. ROWAN of SINNOH gave me the\nNATIONAL DEX, so I want to update\lyour POKEDEX for you!\pLet's see... I put this here, and\ntake this our and... Ker-chunk!

#org @pokedex
fanfare 0x13E
msgbox @4 0x4
waitfanfare
closeonkeypress
special 0x16F
return

#org @3
= [blue_fr]Your MOM also wanted me to give\nyou these new shoes.

#org @run
fanfare 0x13E
msgbox @5 0x4
waitfanfare
closeonkeypress
setflag 0x82F
return

#org @4
= \v\h01's POKEDEX has been upgraded\nto NATIONAL MODE!

#org @5
= \v\h01 recieved the RUNNING SHOES!

#org @6
= [blue_fr]Well, that's all for now, \v\h01!\nI'll see you back at the lab!

#org @done0
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE
Errors:
-PROF. BIRCH is disappeared. (I thought the hidesprite meant that it would hide afterwards =p)

-The Running Shoe don't work =\

Anymore that you find wrong you can fix also. Thanks ;]

I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.
Age 28
Seen April 7th, 2014
Posted April 2nd, 2014
3,977 posts
15.8 Years
-PROF. BIRCH is disappeared. (I thought the hidesprite meant that it would hide afterwards =p)
There could be only (I think) two reasons. Either the flag has already been set, for which you'll have to use another flag or a level script is causing this problem, for which you have to delete any level scripts on the map.

-The Running Shoe don't work =\
Try putting setflag 0x82F in the main script block.

Also, you should put all your movements and text at the bottom.
Male
Seen January 6th, 2017
Posted March 5th, 2016
202 posts
13.2 Years
[email protected] I am truly stumped. I tried that script myself and it worked :s

What is this there for?
#raw 0x53 0x0F 0x80

[email protected] In addition to what Binary said.

One cause of your Running Shoes not working could actually be the headers outside.

Make sure your outside headers have the label "Show village names". If that doesn't work try more.

The running shoes script might work you just may have some maps that don't have the header set up right.

As for Birch, exactly what Binary said. If you have set a Person ID for Birch with no particular reason, then change it to something else, or 0000.

gl3500

Glcelebi The Rom Hacker

Male
South Africa
Seen January 23rd, 2015
Posted June 3rd, 2010
11 posts
14 Years
I am sure something is wrong, i am just not too familiar with these kind of scripts, so i am not definite yet, what i wanted was that when the player steps on a particular tile very close to prof.oaks lab in firered, another sprite next to the lab will go inside the lab and the player will say "....." after the sprite has gone into the lab. Can somebody please explain what i am doing wrong and explain exactly how the commands work for the door opening and closing thing, i tried something and it is not coming out right.
Spoiler:
#dynamic 0x71B364
#org @start
checkflag 0x202
if 0x1 goto @hi2
goto @hi
closeonkeypress
release
end
#org @clone
#raw 0x13
#raw 0x01
#raw FE

#org @clonefinal
#raw 0x11
#raw 0x11
#raw 0xFE

#org @hi
lockall
applymovement 0x03 @clone
setdooropened 0x10 0xD
doorchange
applymovement 0x03 @clonefinal
setdoorclosed 0x10 0xD
doorchange
setflag 0x202
releaseall
end


#org @hi2
lockall
msgbox @weird 0x6
closeonkeypress
releaseall


#org @weird
= .......

I cannot compile script to test it, it says error 13 type mismatch on line 12. Appreciate help if i can get any. Thanx
[SIGPIC]
Click here to level up my license!


Waaaaaaaah! I used to be special as i was the only one that could travel through time, and then along comes dialga...

vietazn654

A sound soul dwells within me

Age 28
Male
Virginia
Seen August 21st, 2014
Posted July 26th, 2010
371 posts
13.2 Years
@gl3500 You forgot to put it in HEX.

#dynamic 0x71B364
#org @start
checkflag 0x202
if 0x1 goto @hi2
goto @hi 
closeonkeypress
release
end
#org @clone
#raw 0x13
#raw 0x01
#raw 0xFE

#org @clonefinal
#raw 0x11
#raw 0x11
#raw 0xFE

#org @hi
lockall
applymovement 0x03 @clone
setdooropened 0x10 0xD
doorchange
applymovement 0x03 @clonefinal
setdoorclosed 0x10 0xD
doorchange
setflag 0x202
releaseall
end


#org @hi2
lockall
msgbox @weird 0x6
closeonkeypress
releaseall


#org @weird
= .......

I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this in your signature.
Male
Seen January 6th, 2017
Posted March 5th, 2016
202 posts
13.2 Years
How do you set one variable to a value, and then change it to another value?

I am using the Fire Red Hacked engine, and I used this code which changes the level of the Pokémon a gym leader has to three levels higher than your highest level Pokémon.

setvar 0x4052 0x203
trainerbattle 0x1 etc
setvar 0x4052 0x0

The var first gets set to the value that makes the Pokélevels what I wanted them to be, which worked. But after the battle, all trainer Pokémon levels are still 3 levels higher than my highest level Pokémon. If the value of 4052 is 0, it should cancel the change?

Thanks.
Seen May 21st, 2011
Posted January 15th, 2011
54 posts
14.2 Years
Ooft busy day.

@melosfox
1. Remove the nops.
2. Make sure the overworld's Person ID is set to 1000 (same as the flag you set)
2.5. A little tip. Underneath the "wildpokémonbattle" part, put in "playsong 0xXXX". Replace XXX with any song (there is a list of them in any header in Advance Map). This will make the battle theme when fighting the Pokémon whatever you want.

@smashking
What are you asking smashking? Be a little clearer.

@metroid die
The "waitmovement 0x0" part is supposed to be the same as the applymovement.

So for move player it's
applymovement 0xFF
waitmovement 0xFF

And you can still move about because you didn't use the "lock" command at the start of your script.

@viet
Decompile isn't the opposite of compile in this case. Decompile simply translates the script into something that is more readable (if it is already readable, then nothing happens).

So yeah, you need to make the script in a new offset.

I changed the waitmovements to what you said, but the error persists... Nothing I do changes it. Can you help out with this?

gl3500

Glcelebi The Rom Hacker

Male
South Africa
Seen January 23rd, 2015
Posted June 3rd, 2010
11 posts
14 Years
@gl3500 You forgot to put it in HEX.
Thanx for the help, i will give it a try and see if it works. Again, Thanx. :-)

@gl3500 You forgot to put it in HEX.

#dynamic 0x71B364
#org @start
checkflag 0x202
if 0x1 goto @hi2
goto @hi 
closeonkeypress
release
end
#org @clone
#raw 0x13
#raw 0x01
#raw 0xFE

#org @clonefinal
#raw 0x11
#raw 0x11
#raw 0xFE

#org @hi
lockall
applymovement 0x03 @clone
setdooropened 0x10 0xD
doorchange
applymovement 0x03 @clonefinal
setdoorclosed 0x10 0xD
doorchange
setflag 0x202
releaseall
end


#org @hi2
lockall
msgbox @weird 0x6
closeonkeypress
releaseall


#org @weird
= .......
Thanx, whoops, i actually missed that, sometimes, i actually dont see things as simple as that, i will give it a try, thanx for the help. :-)

Hi, i have another problem now, i was able to compile the script and everything, but it is not working properly. the sprite does not move, the door opens and closes, but the "...." shows up. Why did the sprite not go through the door and into the lab. Please help again. I am trying, but i cannot get script working correctly, i am still quite new to the door command. Can somebody please show me what i am now doing wrong. Appreciate help. Thanx
Spoiler:
#dynamic 0x71B364
#org @start
checkflag 0x202
if 0x1 goto @hi2
goto @hi
closeonkeypress
release
end
#org @clone
#raw 0x13
#raw 0x01
#raw 0xFE

#org @clonefinal
#raw 0x11
#raw 0x11
#raw 0xFE

#org @hi
lockall
applymovement 0x03 @clone
setdooropened 0x10 0xD
doorchange
applymovement 0x03 @clonefinal
setdoorclosed 0x10 0xD
doorchange
setflag 0x202
releaseall
end


#org @hi2
lockall
msgbox @weird 0x6
closeonkeypress
releaseall


#org @weird
= .......

[SIGPIC]
Click here to level up my license!


Waaaaaaaah! I used to be special as i was the only one that could travel through time, and then along comes dialga...
Male
Seen January 6th, 2017
Posted March 5th, 2016
202 posts
13.2 Years
@gl3500

Spoiler:


#dynamic 0x71B364
#org @start
checkflag 0x202
if 0x1 goto @hi2
goto @hi
closeonkeypress
release
end


#org @hi
lockall
applymovement 0x03 @clone
setdooropened 0x10 0xD
doorchange
applymovement 0x03 @clonefinal
setdoorclosed 0x10 0xD
doorchange
msgbox @weird 0x6
setflag 0x202
releaseall
end


#org @hi2
lockall
releaseall

#org @clone
#raw 0x13
#raw 0x01
#raw 0xFE

#org @clonefinal
#raw 0x11
#raw 0x11
#raw 0xFE

#org @weird
= .......


I think that is what you want.

If not. What exactly do you want to happen?
Age 28
Seen April 7th, 2014
Posted April 2nd, 2014
3,977 posts
15.8 Years
@gl3500:
Spoiler:
#dynamic 0x71B364

#org @start
checkflag 0x202
if 0x1 goto @hi2
goto @hi
closeonkeypress
release
end
#org @clone
#raw 0x13
#raw 0x01
#raw 0xFE

#org @clonefinal
#raw 0x11
#raw 0x11
#raw 0xFE

#org @hi
lockall
applymovement 0x03 @clone
waitmovement 0x0
setdooropened 0x10 0xD
doorchange
applymovement 0x03 @clonefinal
waitmovement 0x0
setdoorclosed 0x10 0xD
doorchange
setflag 0x202
releaseall
end


#org @hi2
lockall
msgbox @weird 0x6
closeonkeypress
releaseall


#org @weird
= .......


EDIT: It would actually be better if you did this instead:
Spoiler:
#dynamic 0x71B364

#org @start
checkflag 0x202
if 0x1 goto @hi
applymovement 0x03 @clone
waitmovement 0x0
setdooropened 0x10 0xD
doorchange
applymovement 0x03 @clonefinal
waitmovement 0x0
setdoorclosed 0x10 0xD
doorchange
setflag 0x202
release
end

#org @hi
msgbox @weird 0x2
release
end


#org @clone
#raw 0x13
#raw 0x01
#raw 0xFE

#org @clonefinal
#raw 0x11
#raw 0x11
#raw 0xFE

#org @weird
= .......

Makes it a little simpler, eh?