Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub
Reload this Page Script Help Thread (DO NOT REQUEST SCRIPTS)

Notices
For all updates, view the main page.

ROM Hacking Hub General discussions about ROM Hacking and Emulation. Not sure where to start? This is the place for you.
Posting links to ROMs is illegal and is not tolerated anywhere on the forum.
New threads in this forum are to be approved by a moderator before they are displayed.



Closed Thread
 
Thread Tools
  #8276    
Old May 26th, 2013 (07:53 AM). Edited May 26th, 2013 by BlackHoleJanis.
BlackHoleJanis's Avatar
BlackHoleJanis BlackHoleJanis is offline
 
Join Date: Apr 2013
Gender: Male
Posts: 5
My script for applymovement wont work. It moves me but not the sprite of the NPC. After it moves me it then locks up and doesn't let me move at all.

I'm using XSE.

I'm Using the Firered Rom.

Script:
Spoiler:
#dynamic 0x8016CC

#org @start
msgbox @talk1 0x6
applymovement 2 @walk1
waitmovement 2
applymovement 0xFF @walk2
waitmovement 0xFF
msgbox @talk2 0x6
trainerbattle 0x0 0x1FF 0x0 @before @after
msgbox @talk3 0x6
setflag 0x82F
applymovement 2 @walk3
waitmovement 2
hidesprite 2
setvar 0x6000 0x1
setflag 0x1206
release
end

#org @talk1
= \v\h01!

#org @talk2
= It seems you've already been set\non your way by Master...\pNevermind. Let's Battle!

#org @talk3
= You truly are amazing \v\h01!\pThings might seem strange now but\ndon't worry all will be revealed\lin good time!\pBut for now take this!\p\v\h01 recieved the RUNNING SHOES.\pWell goodbye then. Until we meet\nagain.

#org @walk1
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12

#org @walk2
#raw 0x53
#raw 0x62

#org @walk3
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10

#org @before
= Wow I see that you've already\nchosen a path!

#org @after
= Now I truly believe that you are\nthe right selection.
  #8277    
Old May 26th, 2013 (08:09 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
Moderator
CS
 
Join Date: Nov 2007
Location: Leicester, UK
Posts: 3,501
Send a message via Skype™ to Spherical Ice
You need to add #raw 0xFE to the end of each movement list.
__________________
  #8278    
Old May 26th, 2013 (10:08 AM). Edited May 26th, 2013 by kablam.
kablam kablam is offline
 
Join Date: May 2013
Gender: Male
Posts: 21
Okay so I know most people here prefer to script in the XSE style for a variety of reasons and I do plan on learning XSE when I finish my current project but for now I'm going to continue the way I started out before finding this website.

This script's purpose is to make it so that when the player steps on a certain tile, it will apply movements to two team rocket grunts (person event #s 2 and 3), have them run left, stop, say something about how Team Rocket is the best, then run up, and, after doing so, remove the respective sprites. Then Professor Oak walks up to where they made the turn and stops. The script then ends. After compiling it into the game and testing it out, however, the rom freezes when I step onto the script tile.

#org $script
checkflag 0x1201
if 0x01 goto $nothing
applymovement 2 $rocketonerun
$rocketonerun 1 ; #binary 0x1F 0X1F 0X1F 0X1F 0xFE
applymovement 3 $rockettworun
$rockettworun 1 ; #binary 0x1F 0X1F 0X1F 0X1F 0xFE
pausemove 0
message $talk
$talk 1 = You'll never catch\n us Oak!\p Team Rocket\n will prevail!
boxset 6
applymovement 2 $rocketonerun1
$rocketonerun1 1 ; #binary 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0xFE
applymovement 3 $rockettworun1
$rockettworun1 1 ; #binanry 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0xFE
pausemove 0
removesprite 2
setflag 0x1202
removesprite 3
setflag 0x1203
applymovement 4 $oakwalk
$oakwalk1 ; #binary 0x12 0x12 0x12 0x12 0x12 0xFE
pausemove 0
setflag 0x1201
release
end

#org $nothing
end

edit: I believe I found my own problem. Totally forgot that vars are used with script tiles. With that in mind, would this be correct?

#org $script
applymovement 2 $rocketonerun
$rocketonerun 1 ; #binary 0x1F 0X1F 0X1F 0X1F 0xFE
applymovement 3 $rockettworun
$rockettworun 1 ; #binary 0x1F 0X1F 0X1F 0X1F 0xFE
pausemove 0
message $talk
$talk 1 = You'll never catch\n us Oak!\p Team Rocket\n will prevail!
boxset 6
applymovement 2 $rocketonerun1
$rocketonerun1 1 ; #binary 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0xFE
applymovement 3 $rockettworun1
$rockettworun1 1 ; #binanry 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0xFE
pausemove 0
removesprite 2
setflag 0x1202
removesprite 3
setflag 0x1203
applymovement 4 $oakwalk
$oakwalk1 ; #binary 0x12 0x12 0x12 0x12 0x12 0xFE
pausemove 0
setvar 0x6000 0x0001
release
end

Also if I wanted to have a tile right next to this one and I wanted to make it so that if you stepped on one of the tiles, neither one of them would activate upon stepping on them again, would I use the same var for each tile?
  #8279    
Old May 26th, 2013 (07:10 PM).
buckeyestilidie buckeyestilidie is offline
 
Join Date: May 2013
Gender: Male
Posts: 34
Quote originally posted by karatekid552:
NO FLAGS OVER 900!

How many freaking times do I have to say it?!?

I'm sorry if that comes off as rude, but you can severly cripple your game by using flags over 900 as they overlap the same storage ram used for vars and PC boxes. So unless you want bad eggs and vars that don't work properly, heed my warning. I will very soon have a tutorial published which will describe this completely.

Also, you don't have to convert to hex when writing a script. If you don't put the "0x" before a number, the script editor will read it in decimal. So, in a script:

setflag 0xA

Is the same as:

setflag 10


(Flag 10/0xA is a temporary flag that will not stay set and therefore will not work for the uses in scripts, this is only an example)
So why isn't it working then? Is it operator error? Lol
  #8280    
Old May 27th, 2013 (02:53 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
Moderator
CS
 
Join Date: Nov 2007
Location: Leicester, UK
Posts: 3,501
Send a message via Skype™ to Spherical Ice
Quote originally posted by kablam:
Okay so I know most people here prefer to script in the XSE style for a variety of reasons and I do plan on learning XSE when I finish my current project but for now I'm going to continue the way I started out before finding this website.

This script's purpose is to make it so that when the player steps on a certain tile, it will apply movements to two team rocket grunts (person event #s 2 and 3), have them run left, stop, say something about how Team Rocket is the best, then run up, and, after doing so, remove the respective sprites. Then Professor Oak walks up to where they made the turn and stops. The script then ends. After compiling it into the game and testing it out, however, the rom freezes when I step onto the script tile.

#org $script
checkflag 0x1201
if 0x01 goto $nothing
applymovement 2 $rocketonerun
$rocketonerun 1 ; #binary 0x1F 0X1F 0X1F 0X1F 0xFE
applymovement 3 $rockettworun
$rockettworun 1 ; #binary 0x1F 0X1F 0X1F 0X1F 0xFE
pausemove 0
message $talk
$talk 1 = You'll never catch\n us Oak!\p Team Rocket\n will prevail!
boxset 6
applymovement 2 $rocketonerun1
$rocketonerun1 1 ; #binary 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0xFE
applymovement 3 $rockettworun1
$rockettworun1 1 ; #binanry 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0xFE
pausemove 0
removesprite 2
setflag 0x1202
removesprite 3
setflag 0x1203
applymovement 4 $oakwalk
$oakwalk1 ; #binary 0x12 0x12 0x12 0x12 0x12 0xFE
pausemove 0
setflag 0x1201
release
end

#org $nothing
end

edit: I believe I found my own problem. Totally forgot that vars are used with script tiles. With that in mind, would this be correct?

#org $script
applymovement 2 $rocketonerun
$rocketonerun 1 ; #binary 0x1F 0X1F 0X1F 0X1F 0xFE
applymovement 3 $rockettworun
$rockettworun 1 ; #binary 0x1F 0X1F 0X1F 0X1F 0xFE
pausemove 0
message $talk
$talk 1 = You'll never catch\n us Oak!\p Team Rocket\n will prevail!
boxset 6
applymovement 2 $rocketonerun1
$rocketonerun1 1 ; #binary 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0xFE
applymovement 3 $rockettworun1
$rockettworun1 1 ; #binanry 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0x1E 0xFE
pausemove 0
removesprite 2
setflag 0x1202
removesprite 3
setflag 0x1203
applymovement 4 $oakwalk
$oakwalk1 ; #binary 0x12 0x12 0x12 0x12 0x12 0xFE
pausemove 0
setvar 0x6000 0x0001
release
end

Also if I wanted to have a tile right next to this one and I wanted to make it so that if you stepped on one of the tiles, neither one of them would activate upon stepping on them again, would I use the same var for each tile?
Quote originally posted by karatekid552:
NO FLAGS OVER 900!

How many freaking times do I have to say it?!?

I'm sorry if that comes off as rude, but you can severly cripple your game by using flags over 900 as they overlap the same storage ram used for vars and PC boxes. So unless you want bad eggs and vars that don't work properly, heed my warning. I will very soon have a tutorial published which will describe this completely.
seriously how hard is it to read.
__________________
  #8281    
Old May 27th, 2013 (11:25 AM).
kablam kablam is offline
 
Join Date: May 2013
Gender: Male
Posts: 21
Quote originally posted by Spherical Ice:
seriously how hard is it to read.
I did read. With that said, that doesn't account for the script not working properly. From what it seems the scripts will still work but will cause other parts of the game to run less smoothly/not at all so I still believe that there is a problem evident in the script itself and I would like help regarding that.
  #8282    
Old May 27th, 2013 (11:31 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
Moderator
CS
 
Join Date: Nov 2007
Location: Leicester, UK
Posts: 3,501
Send a message via Skype™ to Spherical Ice
Well, the reason for that is likely because you haven't set a variable number to the script tile - but the point still stands, change your flags. (this question has been asked before, anyway, you could've searched)
__________________
  #8283    
Old May 27th, 2013 (11:33 AM).
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Posts: 1,767
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote originally posted by kablam:
I did read. With that said, that doesn't account for the script not working properly. From what it seems the scripts will still work but will cause other parts of the game to run less smoothly/not at all so I still believe that there is a problem evident in the script itself and I would like help regarding that.
You are also using Pokescript, a script editor that hasn't been updated since 2006. Hacking has changed and most people use either PSKV or XSE. You will find very few people here who use or even know the syntax for Pokescript which makes it much hard to help you.
__________________

Paired with Simba
  #8284    
Old May 27th, 2013 (04:26 PM).
papayaperson's Avatar
papayaperson papayaperson is offline
Intermediate Hackker
 
Join Date: Dec 2011
Location: United States
Age: 16
Gender: Male
Nature: Relaxed
Posts: 50
Soo I'm using PKSV, and I wrote a script that just hasn't been working properly and I can't seem to figure out why. It's for FireRed, and this is it with the dynamic offsets:

Spoiler:
#dyn 0x740000
#org @main
lockall
checkflag 0x11
if == jump :null
applymovement 0x1 @look
pauseevent 0x0
message @talk
callstd msg_normal
setflag 0x11
setvar 0x4010 0x1
:null
releaseall
end

#org @look
m look_right say_!! end

#org @talk
= \v\h01! You slept in!\n\v\h06 has been waiting for you!\lHe lives behind us,\nhurry and see if he's still home!


The problem was originally that it would just freeze up when I entered the room (I set it as a Map Script, and I selected 02), but then I repointed it and it would show this weird text that didn't end, and once I repointed it again, it would display the correct text but it would just completely freeze after the line "He lives behind us,", and so I repointed several more times and it hasn't fixed itself, so I'm not sure what the problem is..
If anyone could help that would be awesome!
  #8285    
Old May 27th, 2013 (04:39 PM).
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Posts: 1,767
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote originally posted by papayaperson:
Soo I'm using PKSV, and I wrote a script that just hasn't been working properly and I can't seem to figure out why. It's for FireRed, and this is it with the dynamic offsets:

Spoiler:
#dyn 0x740000
#org @main
lockall
checkflag 0x11
if == jump :null
applymovement 0x1 @look
pauseevent 0x0
message @talk
callstd msg_normal
setflag 0x11
setvar 0x4010 0x1
:null
releaseall
end

#org @look
m look_right say_!! end

#org @talk
= \v\h01! You slept in!\n\v\h06 has been waiting for you!\lHe lives behind us,\nhurry and see if he's still home!


The problem was originally that it would just freeze up when I entered the room (I set it as a Map Script, and I selected 02), but then I repointed it and it would show this weird text that didn't end, and once I repointed it again, it would display the correct text but it would just completely freeze after the line "He lives behind us,", and so I repointed several more times and it hasn't fixed itself, so I'm not sure what the problem is..
If anyone could help that would be awesome!
Flag 0x11 is a temporary flag, meaning it won't stay set. Look for my tutorial that will come out in the next coming days when DrFuji comes back. It will explain all of this.

I would try using @null instead of :null. It may work both ways, but consistancy helps readablility and accuracy.

Either way, there is no need for a flag at all. By setting the var, it will prevent the script from running again, so you can remove that whole sequence right away.

Other than that, it looks pretty good. Here is a revised script:

Spoiler:
#dyn 0x740000
#org @main
lockall
applymovement 0x1 @look
pauseevent 0x0
message @talk
callstd msg_normal
setvar 0x4010 0x1
end

#org @look
m look_right say_!! end

#org @talk
= \v\h01! You slept in!\n\v\h06 has been waiting for you!\lHe lives behind us,\nhurry and see if he's still home!
__________________

Paired with Simba
  #8286    
Old May 27th, 2013 (05:52 PM).
papayaperson's Avatar
papayaperson papayaperson is offline
Intermediate Hackker
 
Join Date: Dec 2011
Location: United States
Age: 16
Gender: Male
Nature: Relaxed
Posts: 50
Quote originally posted by karatekid552:
Flag 0x11 is a temporary flag, meaning it won't stay set. Look for my tutorial that will come out in the next coming days when DrFuji comes back. It will explain all of this.

I would try using @null instead of :null. It may work both ways, but consistancy helps readablility and accuracy.

Either way, there is no need for a flag at all. By setting the var, it will prevent the script from running again, so you can remove that whole sequence right away.

Other than that, it looks pretty good. Here is a revised script:

Spoiler:
#dyn 0x740000
#org @main
lockall
applymovement 0x1 @look
pauseevent 0x0
message @talk
callstd msg_normal
setvar 0x4010 0x1
end

#org @look
m look_right say_!! end

#org @talk
= \v\h01! You slept in!\n\v\h06 has been waiting for you!\lHe lives behind us,\nhurry and see if he's still home!
I used the new script you gave me and it seems a bit better, as it's not totally locking out, but it keeps starting over and repeating the text after it reaches "he lives behind us," so nothing else can happen :/ Thanks for trying though!
Anyonee else have any idea?
  #8287    
Old May 27th, 2013 (11:51 PM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
Moderator
CS
 
Join Date: Nov 2007
Location: Leicester, UK
Posts: 3,501
Send a message via Skype™ to Spherical Ice
Decompile the offset in the Map script offset box of Professional view (ctrl+h) in Amap. Replace the #raw word 0xFFFF to #raw word 0x0.
__________________
  #8288    
Old May 28th, 2013 (02:04 PM).
ExitWound's Avatar
ExitWound ExitWound is offline
Boggle
 
Join Date: Aug 2007
Age: 23
Posts: 72
I need some help. I'm utterly confused at the moment... I have a script where you can battle somebody 3 different times, each time having stronger Pokémon. He should give you 3 different items each time you beat him, until he is rebattle-able. He's suppose to give you Leftovers the first time you beat him, PP Max the second, and a Master ball the third. When rebattle-able, he should give a PP Up each time you beat him. As of right now, he only gives the Leftovers and Master ball. No PP Max and no PP Up. What is going on with this script?

Code:
#dynamic 0x6C4340

#org @start
checkflag 0x850
if 0x1 goto @start1
trainerbattle 0x1 0xa1 0x0 @before @after @later
end

#org @start1
checkflag 0x851
if 0x1 goto @start2
trainerbattle 0x1 0x29b 0x0 @before1 @after1 @later1
end

#org @start2
settrainerflag 0x29d
trainerbattle 0x1 0x29d 0x0 @before2 @after2 @later2
end

#org @later
setflag 0x850
msgbox @msg1 0x2
giveitem 0xc8 0x1 0x0
release
end

#org @later1
setflag 0x851
msgbox @msg2 0x2
giveitem 0x47 0x1 0x0
release
end

#org @later2
checkflag 0x852
if 0x1 goto @beaten
setflag 0x852
msgbox @msg3 0x2
giveitem 0x1 0x1 0x0
release
end

#org @beaten
msgbox @msg4 0x2
giveitem 0x45 0x1 0x0
release
end

#org @before
= I am legend.

#org @after
= I... am...\pI'm speechless...

#org @msg1
= You are truly gifted...\lBut next time, you will fail.\pTake this, and remember me.

#org @before1
= This time, you will not be so\nlucky.

#org @after1
= How is this possible!?

#org @msg2
= I promise...\nI will defeat you.

#org @before2
= This time, you will lose.

#org @after2
= Again, I am beaten...

#org @msg3
= You are a King among peasants.

#org @msg4
= For the umpteenth time, I have\nfailed.\pClearly, you are the greatest.\pSo long as you defeat me, you\nmay have this.
__________________

+====================Supports====================+


+====================Supports====================+
  #8289    
Old May 28th, 2013 (03:01 PM).
kablam kablam is offline
 
Join Date: May 2013
Gender: Male
Posts: 21
So I understand that Pokescript limits the help I may receive and I also need to change the flag used in this script but I still believe there is another error. I am posting both the Pokescript version and what XSE opens if I click open script through advance map. Maybe that will help. It is supposed to be a simple legendary battle with Mewtwo. After the battle, I want the screen to blink and him to disappear. When I tested this in game, everything works completely fine with the exception of his disappearance. He remains in the same location and is available to battle again.

Pokescript:
Spoiler:

#org $script
lock
faceplayer
cry 0xA1 150
#raw 0x33
pause 0x30
message $cry
$cry 1 = I see now that the circum-\nstances of one's birth are\n irrelevant.\p It is what you do with\n the gift of life that deter-\pmines who you are.
boxset 6
wildbattle 150 25 1
pause 0x60
fadescreen 1
removesprite 0
setflag 0x1200
pause 0x10
fadescreen 0
release
end


XSE through advance map:
Spoiler:

'---------------
#org 0x800D6F
lock
faceplayer
checksound
cry 0x96 0x2833
checksound
nop
msgbox 0x8800DA8 MSG_NORMAL '"I see now that the circum-\nstance..."
wildbattle2 0x96 0x19 0x0 0x0
checktrainerflag 0x9700
fadescreen 0x1
showbox 0x65 0x6D 0x6F 0x76
spritebehave 0x7073 0x72
lockall
clearbox 0x65 0x20 0x30 0x20
setflag 0x1200
pause 0x10
fadescreen 0x0
release
cmdc3 0x0

'---------
' Strings
'---------
#org 0x800DA8
= I see now that the circum-\nstances of one's birth are\n irrelevant.\p It is what you do with\n the gift of life that deter-\pmines who you are.


Any help would be appreciated.
  #8290    
Old May 28th, 2013 (03:44 PM).
buckeyestilidie buckeyestilidie is offline
 
Join Date: May 2013
Gender: Male
Posts: 34
Not sure if this will work, but I currently can't compile scripts. I've downloaded Pokescript and ADV a million times with the updatecheck=0 and still nothing but that's not what I'm asking. I was wondering as long as my script is correct can I convert it into a IPS and patch it in the rom? I did that with someones Nat'l dex and it worked.
  #8291    
Old May 28th, 2013 (05:05 PM).
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Posts: 1,767
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote originally posted by buckeyestilidie:
Not sure if this will work, but I currently can't compile scripts. I've downloaded Pokescript and ADV a million times with the updatecheck=0 and still nothing but that's not what I'm asking. I was wondering as long as my script is correct can I convert it into a IPS and patch it in the rom? I did that with someones Nat'l dex and it worked.
Use XSE or PKSV. Those are much better.
__________________

Paired with Simba
  #8292    
Old May 28th, 2013 (07:45 PM).
buckeyestilidie buckeyestilidie is offline
 
Join Date: May 2013
Gender: Male
Posts: 34
Quote originally posted by karatekid552:
Use XSE or PKSV. Those are much better.
How do I use XSE to go with advanced map to put scripts in?
  #8293    
Old May 28th, 2013 (08:54 PM).
destinedjagold's Avatar
destinedjagold destinedjagold is offline
Oh Hai Thar~ 'ω'
Silver Tier
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Posts: 7,039
Quote originally posted by buckeyestilidie:
How do I use XSE to go with advanced map to put scripts in?
Here's a link to my tutorial.

And to open scripts on A-Map with XSE...
Set XSE as A-Map's default script editor.
Spoiler:
__________________

3DS FC: 0061-1111-6462
TSV: 1364(X), 0790(OR)


  #8294    
Old May 29th, 2013 (02:00 AM).
LusoTrainer's Avatar
LusoTrainer LusoTrainer is offline
 
Join Date: Mar 2013
Gender: Male
Posts: 255
I've created an event for Mew on FireRed using the Mewtwo's script as a basis. It all works fine, but when I'm defeated or catch him, Mew doesn't disappear. It only does when I faint him.

Here's the script:

Spoiler:
Code:
'-----------------------
#org 0x165271
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
special 0x188
lock
faceplayer
checksound
cry 0x97 0x2
msgbox2 0x8177F9F '"Mew!"
waitmsgbox
waitcry
pause 0x14
playsong 0x156 0x0
waitkeypress
startwildbattle 0x97 0x1E 0x0
setflag 0x807
special 0x138
waitstate
clearflag 0x807
special2 LASTRESULT 0xB4
compare LASTRESULT 0x1
if 0x1 goto 0x8162558
compare LASTRESULT 0x4
if 0x1 goto 0x8162561
compare LASTRESULT 0x5
if 0x1 goto 0x8162561
setflag 0x2BC
release
end

'-----------------------
#org 0x1A7AE0
release
end

'-----------------------
#org 0x162558
setflag 0x2BC
goto 0x81A922D
end

'-----------------------
#org 0x162561
setvar 0x8004 0x97
goto 0x81A9236
end

'-----------------------
#org 0x1A922D
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
release
end

'-----------------------
#org 0x1A9236
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
bufferpokemon 0x0 0x8004
msgbox 0x81A63C4 '"The [buffer1] flew away!"
callstd 0x4
release
end


'---------
' Strings
'---------
#org 0x177F9F
= Mew!

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


P.S: I've deleted Deoxys, that's why I'm using its offset (0x165271).
  #8295    
Old May 29th, 2013 (02:27 AM).
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Posts: 1,767
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote originally posted by LusoTrainer:
I've created an event for Mew on FireRed using the Mewtwo's script as a basis. It all works fine, but when I'm defeated or catch him, Mew doesn't disappear. It only does when I faint him.

Here's the script:

Spoiler:
Code:
'-----------------------
#org 0x165271
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
special 0x188
lock
faceplayer
checksound
cry 0x97 0x2
msgbox2 0x8177F9F '"Mew!"
waitmsgbox
waitcry
pause 0x14
playsong 0x156 0x0
waitkeypress
startwildbattle 0x97 0x1E 0x0
setflag 0x807
special 0x138
waitstate
clearflag 0x807
special2 LASTRESULT 0xB4
compare LASTRESULT 0x1
if 0x1 goto 0x8162558
compare LASTRESULT 0x4
if 0x1 goto 0x8162561
compare LASTRESULT 0x5
if 0x1 goto 0x8162561
setflag 0x2BC
release
end

'-----------------------
#org 0x1A7AE0
release
end

'-----------------------
#org 0x162558
setflag 0x2BC
goto 0x81A922D
end

'-----------------------
#org 0x162561
setvar 0x8004 0x97
goto 0x81A9236
end

'-----------------------
#org 0x1A922D
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
release
end

'-----------------------
#org 0x1A9236
fadescreen 0x1
hidesprite LASTTALKED
fadescreen 0x0
bufferpokemon 0x0 0x8004
msgbox 0x81A63C4 '"The [buffer1] flew away!"
callstd 0x4
release
end


'---------
' Strings
'---------
#org 0x177F9F
= Mew!

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


P.S: I've deleted Deoxys, that's why I'm using its offset (0x165271).
That is because Game Freak screwed up. Special 0xB4 does not ever return 0x5 as being captured. It returns 0x7, but in all of GF's scripts, they screwed it up. Also, you probably know this, but the sprite will only stay hidden if you set the flag listed in its person ID and then use hidesprite.
__________________

Paired with Simba
  #8296    
Old May 29th, 2013 (03:11 AM).
LusoTrainer's Avatar
LusoTrainer LusoTrainer is offline
 
Join Date: Mar 2013
Gender: Male
Posts: 255
Quote originally posted by karatekid552:
That is because Game Freak screwed up. Special 0xB4 does not ever return 0x5 as being captured. It returns 0x7, but in all of GF's scripts, they screwed it up.
So, is there any advantage on changing "compare LASTRESULT 0x5" to "compare LASTRESULT 0x7"?

Quote originally posted by karatekid552:
Also, you probably know this, but the sprite will only stay hidden if you set the flag listed in its person ID and then use hidesprite.
I thought about the Person ID, but I can't find it anywhere on the code. Mewtwo's ID is 81.
  #8297    
Old May 29th, 2013 (03:54 AM).
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Posts: 1,767
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote originally posted by LusoTrainer:
So, is there any advantage on changing "compare LASTRESULT 0x5" to "compare LASTRESULT 0x7"?
Give it a try, it may work out.

Quote originally posted by LusoTrainer:
I thought about the Person ID, but I can't find it anywhere on the code. Mewtwo's ID is 81.
Then add it in, it may be in a seperate script you didn't find, but either way, it has to be there. If you don't set the flag in the Person ID, the next step you take, the sprite will just reappear.
__________________

Paired with Simba
  #8298    
Old May 29th, 2013 (11:54 AM).
buckeyestilidie buckeyestilidie is offline
 
Join Date: May 2013
Gender: Male
Posts: 34
#org $begin
lock
faceplayer
checkflag 0x899
if b_true goto $alreadygot
message $getitem
$getitem 1 = Here you go!
boxset 6
giveitem 0x170 0x1
setflag 0x899
release
end

#org $alreadygot
lock
faceplayer
message $onlyone
$onlyone 1 = Only one allowed!
boxset 6
release
end

Trying to give a rainbow pass, but it won't let me. Any ideas why it won't work?
  #8299    
Old May 29th, 2013 (12:49 PM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
Moderator
CS
 
Join Date: Nov 2007
Location: Leicester, UK
Posts: 3,501
Send a message via Skype™ to Spherical Ice
Quote originally posted by buckeyestilidie:
#org $begin
lock
faceplayer
checkflag 0x899
if b_true goto $alreadygot
message $getitem
$getitem 1 = Here you go!
boxset 6
giveitem 0x170 0x1
setflag 0x899
release
end

#org $alreadygot
lock
faceplayer
message $onlyone
$onlyone 1 = Only one allowed!
boxset 6
release
end

Trying to give a rainbow pass, but it won't let me. Any ideas why it won't work?
Please. Just use XSE. WHY are people still using Pokéscript? HOW do you even find it?
__________________
  #8300    
Old May 29th, 2013 (12:50 PM).
LusoTrainer's Avatar
LusoTrainer LusoTrainer is offline
 
Join Date: Mar 2013
Gender: Male
Posts: 255
Quote originally posted by karatekid552:
Give it a try, it may work out.
It now disappears with no message. But now whenever I catch him, the message "Mew flew away" appears (which should only happen when I defeat him) and when I'm defeated, he's still there.
Closed Thread
Quick Reply

Sponsored Links
Thread Tools

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

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

Forum Jump


All times are UTC -8. The time now is 10:22 AM.