The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

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
Click here to go to the first staff post in this thread.  
Thread Tools
  #6376    
Old January 8th, 2012, 05:54 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 23
Gender: Male
Nature: Modest
Quote:
Originally Posted by Quickster View Post
Thanks very much. And where can you find the values to copy to a variable?
You can only use a handful of variables in this way. Pretty much just 0x8000-0x800F I think.

0x020370B8 is 0x8000, then add #2 for the next variable, 0x020370BA for 0x8001, 0x020370BC for 0x8002, etc.
__________________
あなた は しきしゃ です
わたし は ばか です
  #6377    
Old January 9th, 2012, 04:29 PM
Quicksken's Avatar
Quicksken
Modder/Hacker/Gamer/Dreamer
 
Join Date: Jan 2012
Location: Belgium
Gender: Male
Nature: Bold
Send a message via Skype™ to Quicksken
Hey, I'm having some trouble with a script (obviously, else I wouldn't be posting here). This script:
Spoiler:
#dynamic 0x800000

#org @start
checkflag 0x1000
if 0x1 goto @end
checkflag 0x1005
if 0x1 goto @end
applymovement 0xB @oaktoyou
waitmovement 0x0
applymovement 0xB @bump
applymovement 0xFF @bump
waitmovement 0x0
message @msg1 0x6
applymovement 0xB @oakaway
waitmovement 0x0

#org @end
end

#org @oaktoyou
#raw 0x62
#raw 0x55
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @bump
#raw 0x13
#raw 0xFE

#org @oakaway
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @msg1
= TEXT

Was meant to activate when you walk on the green square with the S and the red selection indicator (screen shot 1). EDIT: When you step on that script, Oak should walk to you, "push" you away, say something, and walk back in. The checkflags are irrelevant at the moment. I didn't know what to give for these values in A-Map (screen shot 2). I have a bit of experience with scripting by now, so I thought my script was good, but I'm not sure, so if anyone could check this for me, it would be great. And if I should post this question in another thread, please say so, because I wasn't sure about that either.
Attached Images
File Type: png SC1.png‎ (2.8 KB, 4 views) (Save to Dropbox)
File Type: png SC2.png‎ (2.1 KB, 4 views) (Save to Dropbox)

Last edited by Quicksken; January 9th, 2012 at 04:41 PM. Reason: Forgot what script was supposed to do
  #6378    
Old January 9th, 2012, 04:35 PM
Quickster's Avatar
Quickster
Dream or Drop?
 
Join Date: Oct 2007
Gender: Male
Nature: Quiet
Quote:
Originally Posted by Quicksken View Post
Hey, I'm having some trouble with a script (obviously, else I wouldn't be posting here). This script:
Spoiler:
#dynamic 0x800000

#org @start
checkflag 0x1000
if 0x1 goto @end
checkflag 0x1005
if 0x1 goto @end
applymovement 0xB @oaktoyou
waitmovement 0x0
applymovement 0xB @bump
applymovement 0xFF @bump
waitmovement 0x0
message @msg1 0x6
applymovement 0xB @oakaway
waitmovement 0x0

#org @end
end

#org @oaktoyou
#raw 0x62
#raw 0x55
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @bump
#raw 0x13
#raw 0xFE

#org @oakaway
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @msg1
= TEXT

Was meant to activate when you walk on the green square with the S and the red selection indicator (screen shot 1). I didn't know what to give for these values in A-Map (screen shot 2). I have a bit of experience with scripting by now, so I thought my script was good, but I'm not sure, so if anyone could check this for me, it would be great. And if I should post this question in another thread, please say so, because I wasn't sure about that either.
Well the unknown should be 0003, and the var number should be 4050. Now for the script, what exactly are you trying to do? Or is that just an unfinished script?
__________________
I laugh looking at this.

But sometimes I want to come back to it...

  #6379    
Old January 9th, 2012, 04:43 PM
Quicksken's Avatar
Quicksken
Modder/Hacker/Gamer/Dreamer
 
Join Date: Jan 2012
Location: Belgium
Gender: Male
Nature: Bold
Send a message via Skype™ to Quicksken
Thanks, Quickster, that did it. Quite a stupid mistake actually :/. Script works just fine now.
  #6380    
Old January 9th, 2012, 09:58 PM
Quickster's Avatar
Quickster
Dream or Drop?
 
Join Date: Oct 2007
Gender: Male
Nature: Quiet
Okay, so I have this script.

Spoiler:

Code:
#dynamic 0x800000

#org @start
call @day
call @hour
copybyte 0x20370C6 0x3005543
buffernumber 0x2 0x8007
compare 0x8006 0xA
if 0x1 goto @ht
compare 0x8006 0xB
if 0x1 goto @ht
compare 0x8006 0xC
if 0x1 goto @ht
compare 0x8006 0x16
if 0x1 goto @ht
compare 0x8006 0x17
if 0x1 goto @ht
compare 0x8006 0x18
if 0x1 goto @ht
compare 0x8007 0xA
if 0x0 goto @nhm
msgbox @00 0x2
release
end


#org @day
copybyte 0x20370C2 0x3005541
compare 0x8005 0x0
if 0x1 call @sunday
compare 0x8005 0x1
if 0x1 call @monday
compare 0x8005 0x2
if 0x1 call @tuesday
compare 0x8005 0x3
if 0x1 call @wednesday
compare 0x8005 0x4
if 0x1 call @thursday
compare 0x8005 0x5
if 0x1 call @friday
compare 0x8005 0x6
if 0x1 call @saturday
return

#org @sunday
bufferstring 0x0 @sunday1
return

#org @monday
bufferstring 0x0 @monday1
return

#org @tuesday
bufferstring 0x0 @tuesday1
return

#org @wednesday
bufferstring 0x0 @wednesday1
return

#org @thursday
bufferstring 0x0 @thursday1
return

#org @friday
bufferstring 0x0 @friday1
return

#org @saturday
bufferstring 0x0 @saturday1
return

#org @sunday1
= Sunday

#org @monday1
= Monday

#org @tuesday1
= Tuesday

#org @wednesday1
= Wednesday

#org @thursday1
= Thursday

#org @friday1
= Friday

#org @saturday1
= Saturday

#org @hour
copybyte 0x20370C4 0x3005542
compare 0x8006 0x18
if 0x1 call @12am
compare 0x8006 0x17
if 0x1 call @11pm
compare 0x8006 0x16
if 0x1 call @10pm
compare 0x8006 0x15
if 0x1 call @9pm
compare 0x8006 0x14
if 0x1 call @8pm
compare 0x8006 0x13
if 0x1 call @7pm
compare 0x8006 0x12
if 0x1 call @6pm
compare 0x8006 0x11
if 0x1 call @5pm
compare 0x8006 0x10
if 0x1 call @4pm
compare 0x8006 0xF
if 0x1 call @3pm
compare 0x8006 0xE
if 0x1 call @2pm
compare 0x8006 0xD
if 0x1 call @1pm
compare 0x8006 0xC
if 0x1 call @12pm
compare 0x8006 0xB
if 0x1 call @am
compare 0x8006 0xA
if 0x1 call @am
compare 0x8006 0x9
if 0x1 call @am
compare 0x8006 0x8
if 0x1 call @am
compare 0x8006 0x7
if 0x1 call @am
compare 0x8006 0x6
if 0x1 call @am
compare 0x8006 0x5
if 0x1 call @am
compare 0x8006 0x4
if 0x1 call @am
compare 0x8006 0x3
if 0x1 call @am
compare 0x8006 0x2
if 0x1 call @am
compare 0x8006 0x1
if 0x1 call @am
return

#org @am
buffernumber 0x1 0x8006
bufferstring 0x3 @amtext
return

#org @12pm
buffernumber 0x1 0x8006
bufferstring 0x3 @pmtext
return

#org @12am
bufferstring 0x1 @12
bufferstring 0x3 @pmtext
return

#org @11pm
bufferstring 0x1 @11
bufferstring 0x3 @pmtext
return

#org @10pm
bufferstring 0x1 @10
bufferstring 0x3 @pmtext
return

#org @9pm
bufferstring 0x1 @9
bufferstring 0x3 @pmtext
return

#org @8pm
bufferstring 0x1 @8
bufferstring 0x3 @pmtext
return

#org @7pm
bufferstring 0x1 @7
bufferstring 0x3 @pmtext
return

#org @6pm
bufferstring 0x1 @6
bufferstring 0x3 @pmtext
return

#org @5pm
bufferstring 0x1 @5
bufferstring 0x3 @pmtext
return

#org @4pm
bufferstring 0x1 @4
bufferstring 0x3 @pmtext
return

#org @3pm
bufferstring 0x1 @3
bufferstring 0x3 @pmtext
return

#org @2pm
bufferstring 0x1 @2
bufferstring 0x3 @pmtext
return

#org @1pm
bufferstring 0x1 @1
bufferstring 0x3 @pmtext
return

#org @ht
compare 0x8007 0xA
if 0x0 goto @mn
msgbox @n0 0x2
release
end

#org @mn
msgbox @nn 0x2
release
end

#org @nhm
msgbox @0n 0x2
release
end

#org @nn
= Today is [buffer1],\n[buffer2]:[buffer3] [buffer4].

#org @n0
= Today is [buffer1],\n[buffer2]:0[buffer3] [buffer4].

#org @0n
= Today is [buffer1],\n0[buffer2]:[buffer3] [buffer4].

#org @00
= Today is [buffer1],\n0[buffer2]:0[buffer3] [buffer4].

#org @amtext
= AM

#org @pmtext
= PM

#org @1
= 1

#org @2
= 2

#org @3
= 3

#org @4
= 4

#org @5
= 5

#org @6
= 6

#org @7
= 7

#org @8
= 8

#org @9
= 9

#org @10
= 10

#org @11
= 11

#org @12
= 12


Whats supposed to happen is this:
Today is Day,
(0)Hour:(0)Minute AM/PM.

The 0 varies...

But What happens is (taken at 12:56 AM):


Can any one help me out here?

EDIT:
Spoiler:

Code:
#dynamic 0x800000

#org @start
call @day
call @hour
copybyte 0x20370C6 0x3005543
buffernumber 0x2 0x8007
compare 0x8006 0xA
if 0x1 goto @ht
compare 0x8006 0xB
if 0x1 goto @ht
compare 0x8006 0xC
if 0x1 goto @ht
compare 0x8006 0x16
if 0x1 goto @ht
compare 0x8006 0x17
if 0x1 goto @ht
compare 0x8006 0x18
if 0x1 goto @ht
compare 0x8007 0xA
if 0x0 goto @nhm
msgbox @0n 0x2
release
end


#org @day
copybyte 0x20370C2 0x3005541
compare 0x8005 0x0
if 0x1 call @sunday
compare 0x8005 0x1
if 0x1 call @monday
compare 0x8005 0x2
if 0x1 call @tuesday
compare 0x8005 0x3
if 0x1 call @wednesday
compare 0x8005 0x4
if 0x1 call @thursday
compare 0x8005 0x5
if 0x1 call @friday
compare 0x8005 0x6
if 0x1 call @saturday
return

#org @sunday
bufferstring 0x0 @sunday1
return

#org @monday
bufferstring 0x0 @monday1
return

#org @tuesday
bufferstring 0x0 @tuesday1
return

#org @wednesday
bufferstring 0x0 @wednesday1
return

#org @thursday
bufferstring 0x0 @thursday1
return

#org @friday
bufferstring 0x0 @friday1
return

#org @saturday
bufferstring 0x0 @saturday1
return

#org @sunday1
= Sunday

#org @monday1
= Monday

#org @tuesday1
= Tuesday

#org @wednesday1
= Wednesday

#org @thursday1
= Thursday

#org @friday1
= Friday

#org @saturday1
= Saturday

#org @hour
copybyte 0x20370C4 0x3005542
compare 0x8006 0x18
if 0x1 call @12am
compare 0x8006 0x17
if 0x1 call @11pm
compare 0x8006 0x16
if 0x1 call @10pm
compare 0x8006 0x15
if 0x1 call @9pm
compare 0x8006 0x14
if 0x1 call @8pm
compare 0x8006 0x13
if 0x1 call @7pm
compare 0x8006 0x12
if 0x1 call @6pm
compare 0x8006 0x11
if 0x1 call @5pm
compare 0x8006 0x10
if 0x1 call @4pm
compare 0x8006 0xF
if 0x1 call @3pm
compare 0x8006 0xE
if 0x1 call @2pm
compare 0x8006 0xD
if 0x1 call @1pm
compare 0x8006 0xC
if 0x1 call @12pm
compare 0x8006 0xB
if 0x1 call @am
compare 0x8006 0xA
if 0x1 call @am
compare 0x8006 0x9
if 0x1 call @am
compare 0x8006 0x8
if 0x1 call @am
compare 0x8006 0x7
if 0x1 call @am
compare 0x8006 0x6
if 0x1 call @am
compare 0x8006 0x5
if 0x1 call @am
compare 0x8006 0x4
if 0x1 call @am
compare 0x8006 0x3
if 0x1 call @am
compare 0x8006 0x2
if 0x1 call @am
compare 0x8006 0x1
if 0x1 call @am
return

#org @am
buffernumber 0x1 0x8006
return

#org @12pm
buffernumber 0x1 0x8006
return

#org @12am
bufferstring 0x1 @12
return

#org @11pm
bufferstring 0x1 @11
return

#org @10pm
bufferstring 0x1 @10
return

#org @9pm
bufferstring 0x1 @9
return

#org @8pm
bufferstring 0x1 @8
return

#org @7pm
bufferstring 0x1 @7
return

#org @6pm
bufferstring 0x1 @6
return

#org @5pm
bufferstring 0x1 @5
return

#org @4pm
bufferstring 0x1 @4
return

#org @3pm
bufferstring 0x1 @3
return

#org @2pm
bufferstring 0x1 @2
return

#org @1pm
bufferstring 0x1 @1
return

#org @ht
compare 0x8007 0xA
if 0x0 goto @mn
msgbox @nn 0x2
release
end

#org @mn
msgbox @n0 0x2
release
end

#org @nhm
msgbox @00 0x2
release
end

#org @nn
= Today is [buffer1],\n[buffer2]:[buffer3].

#org @n0
= Today is [buffer1],\n[buffer2]:0[buffer3].

#org @0n
= Today is [buffer1],\n0[buffer2]:[buffer3].

#org @00
= Today is [buffer1],\n0[buffer2]:0[buffer3].


#org @1
= 1

#org @2
= 2

#org @3
= 3

#org @4
= 4

#org @5
= 5

#org @6
= 6

#org @7
= 7

#org @8
= 8

#org @9
= 9

#org @10
= 10

#org @11
= 11

#org @12
= 12


Here is a slightly revised one, because Im assuming there is no buffer4? It works at 1 pm. Ill just need to see if it doesnt work at 12 again... Does anyone have any idea how I can implement the AM and PM?

Last edited by Quickster; January 9th, 2012 at 10:25 PM.
  #6381    
Old January 10th, 2012, 07:25 AM
Sande
Beginning Trainer
 
Join Date: Jan 2012
Gender: Male
Game: FireRed Type: Finding existing script to replace it Editor: ... Script: Need to find one

1) I need to find the location of the script where I can define the players' and the rivals' name. It's right after prof Oak describes the pokemon world and you can insert your gender, name and rivals' name.
Basically I want to add another rival to the game.
2) Follow-up question - I know there is h01 for player name and h06 (?) for rivals' name. Where could I place the name of rival 2? h07? How many hxx can be used?
3) Can I somehow completeley remove all map data and scripts associated with it so the final hack wouldn't have excess data? World map and pokedex data and pokemon finding data should be removed too so I could re-enter everything myself later.
I want to leave only data about the pokemon, items, tilesets etc that can be used to build up a new world.

  #6382    
Old January 10th, 2012, 05:02 PM
DavidJCobb
RESIDENT RAAAAAAAAAAAAGEMASTER
 
Join Date: Jul 2010
Gender: Male
Nature: Lonely
Quote:
Originally Posted by Sande View Post
Game: FireRed Type: Finding existing script to replace it Editor: ... Script: Need to find one

1) I need to find the location of the script where I can define the players' and the rivals' name. It's right after prof Oak describes the pokemon world and you can insert your gender, name and rivals' name.
Basically I want to add another rival to the game.
2) Follow-up question - I know there is h01 for player name and h06 (?) for rivals' name. Where could I place the name of rival 2? h07? How many hxx can be used?
3) Can I somehow completeley remove all map data and scripts associated with it so the final hack wouldn't have excess data? World map and pokedex data and pokemon finding data should be removed too so I could re-enter everything myself later.
I want to leave only data about the pokemon, items, tilesets etc that can be used to build up a new world.
1. Those aren't done with a script. It's ASM.

2. You'd have to find some free space in RAM to store it, I think, and you'd have to make sure the location you pick is part of the RAM areas that get saved. I'm not aware of any unused buffers (besides the scriptable ones, which are not reliable for persistent storage) you could use.

3. Search for a "clean" patch; those have all OWs, scripts, etc. removed. The maps are still left intact, as are the world map and Pokedex, namely because it's easier and safer to edit these than to delete and rebuild all of them from scratch.
__________________
  #6383    
Old January 10th, 2012, 05:34 PM
AustinWolff's Avatar
AustinWolff
has left
 
Join Date: Aug 2011
Location: LA, California
Age: 17
Gender: Male
Nature: Brave
This might be a n00b question, but so far, I haven't found a way for the game to check if you have a certain wild pokemon before continuing. If there is already a "checkpokemon" command, then can u explain how to use it? If not, I kinda have a hint of where to start:
Spoiler:
somehow, you copy a pokemon's hex number (let's say pikachu --> which would be 0x19) into a variable. Then you could use "copyvar VARIABLE 0x8004" ... Then you could somehow use "compare 0x8004...if 0x1 goto @1"

I dont know exactly how to do it, but I'm on the right track.
Also:
Spoiler:
The script is where 2 people will block your way into a route unless you have that certain pokemon in which you CAN ONLY CATCH IN THE WILD. I'm using ruby and XSE
__________________
I have left. Feel free to disable my account.
  #6384    
Old January 11th, 2012, 07:29 AM
Mickey`
 
Join Date: May 2011
Hello
I'm French and I'm only 14, so my English isn't great x)

I've got a problem to create a new respawn :s
In a script, I write this (I use Pokemon Fire Red) :

Code:
sethealingplace 0x1
After that, when my Pokemon are dead, I go in the player's house.

So, I write this on the place of "sethealingplace 0x1" :

Code:
sethealingplace 0x2
And when my Pokemon are dead, I go in the first Pokemon Center.

So, my question is : How to create a new respawn, for use it in a new map ?

Thx, and sorry for the faults
  #6385    
Old January 11th, 2012, 09:42 AM
Binary's Avatar
Binary
え?
 
Join Date: Aug 2007
Age: 20
Quote:
Originally Posted by AustinWolff View Post
This might be a n00b question, but so far, I haven't found a way for the game to check if you have a certain wild pokemon before continuing. If there is already a "checkpokemon" command, then can u explain how to use it? If not, I kinda have a hint of where to start:
Spoiler:
somehow, you copy a pokemon's hex number (let's say pikachu --> which would be 0x19) into a variable. Then you could use "copyvar VARIABLE 0x8004" ... Then you could somehow use "compare 0x8004...if 0x1 goto @1"

I dont know exactly how to do it, but I'm on the right track.
Also:
Spoiler:
The script is where 2 people will block your way into a route unless you have that certain pokemon in which you CAN ONLY CATCH IN THE WILD. I'm using ruby and XSE
There is no checkpokemon command, but you're on the right track. For checking Pokemon, the code is set out like this:
Code:
setvar 0x8004 0x[pokemon number to check]
special2 0x800D 0x17C
compare 0x800D 0x1
if 0x1 goto @pointer
The value of the Pokemon we want to check for is stored in 0x8004. special2 is like special, but stores a returned value from the event called. We use 0x17C, this checks if the pokemon corresponding to the value we've stored in variable 0x8004 is in our party. Then either 0x0 or 0x1 is stored in 0x800D (LASTRESULT), true or false respectively. compare checks if the value is true, in which case the script goes to @pointer. Also, this is only usable in FireRed. There is no special 0x17C in Ruby.

Sorry. Just realized that you were working on a Ruby ROM. This thread might be of help. The Pokemon checking portion in Hackmew's script will give you a clear idea.
__________________

Last edited by Binary; January 11th, 2012 at 09:55 AM.
  #6386    
Old January 11th, 2012, 10:44 AM
colcolstyles's Avatar
colcolstyles
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Quote:
Originally Posted by Quickster View Post
Okay, so I have this script.

Spoiler:

Code:
#dynamic 0x800000

#org @start
call @day
call @hour
copybyte 0x20370C6 0x3005543
buffernumber 0x2 0x8007
compare 0x8006 0xA
if 0x1 goto @ht
compare 0x8006 0xB
if 0x1 goto @ht
compare 0x8006 0xC
if 0x1 goto @ht
compare 0x8006 0x16
if 0x1 goto @ht
compare 0x8006 0x17
if 0x1 goto @ht
compare 0x8006 0x18
if 0x1 goto @ht
compare 0x8007 0xA
if 0x0 goto @nhm
msgbox @00 0x2
release
end


#org @day
copybyte 0x20370C2 0x3005541
compare 0x8005 0x0
if 0x1 call @sunday
compare 0x8005 0x1
if 0x1 call @monday
compare 0x8005 0x2
if 0x1 call @tuesday
compare 0x8005 0x3
if 0x1 call @wednesday
compare 0x8005 0x4
if 0x1 call @thursday
compare 0x8005 0x5
if 0x1 call @friday
compare 0x8005 0x6
if 0x1 call @saturday
return

#org @sunday
bufferstring 0x0 @sunday1
return

#org @monday
bufferstring 0x0 @monday1
return

#org @tuesday
bufferstring 0x0 @tuesday1
return

#org @wednesday
bufferstring 0x0 @wednesday1
return

#org @thursday
bufferstring 0x0 @thursday1
return

#org @friday
bufferstring 0x0 @friday1
return

#org @saturday
bufferstring 0x0 @saturday1
return

#org @sunday1
= Sunday

#org @monday1
= Monday

#org @tuesday1
= Tuesday

#org @wednesday1
= Wednesday

#org @thursday1
= Thursday

#org @friday1
= Friday

#org @saturday1
= Saturday

#org @hour
copybyte 0x20370C4 0x3005542
compare 0x8006 0x18
if 0x1 call @12am
compare 0x8006 0x17
if 0x1 call @11pm
compare 0x8006 0x16
if 0x1 call @10pm
compare 0x8006 0x15
if 0x1 call @9pm
compare 0x8006 0x14
if 0x1 call @8pm
compare 0x8006 0x13
if 0x1 call @7pm
compare 0x8006 0x12
if 0x1 call @6pm
compare 0x8006 0x11
if 0x1 call @5pm
compare 0x8006 0x10
if 0x1 call @4pm
compare 0x8006 0xF
if 0x1 call @3pm
compare 0x8006 0xE
if 0x1 call @2pm
compare 0x8006 0xD
if 0x1 call @1pm
compare 0x8006 0xC
if 0x1 call @12pm
compare 0x8006 0xB
if 0x1 call @am
compare 0x8006 0xA
if 0x1 call @am
compare 0x8006 0x9
if 0x1 call @am
compare 0x8006 0x8
if 0x1 call @am
compare 0x8006 0x7
if 0x1 call @am
compare 0x8006 0x6
if 0x1 call @am
compare 0x8006 0x5
if 0x1 call @am
compare 0x8006 0x4
if 0x1 call @am
compare 0x8006 0x3
if 0x1 call @am
compare 0x8006 0x2
if 0x1 call @am
compare 0x8006 0x1
if 0x1 call @am
return

#org @am
buffernumber 0x1 0x8006
bufferstring 0x3 @amtext
return

#org @12pm
buffernumber 0x1 0x8006
bufferstring 0x3 @pmtext
return

#org @12am
bufferstring 0x1 @12
bufferstring 0x3 @pmtext
return

#org @11pm
bufferstring 0x1 @11
bufferstring 0x3 @pmtext
return

#org @10pm
bufferstring 0x1 @10
bufferstring 0x3 @pmtext
return

#org @9pm
bufferstring 0x1 @9
bufferstring 0x3 @pmtext
return

#org @8pm
bufferstring 0x1 @8
bufferstring 0x3 @pmtext
return

#org @7pm
bufferstring 0x1 @7
bufferstring 0x3 @pmtext
return

#org @6pm
bufferstring 0x1 @6
bufferstring 0x3 @pmtext
return

#org @5pm
bufferstring 0x1 @5
bufferstring 0x3 @pmtext
return

#org @4pm
bufferstring 0x1 @4
bufferstring 0x3 @pmtext
return

#org @3pm
bufferstring 0x1 @3
bufferstring 0x3 @pmtext
return

#org @2pm
bufferstring 0x1 @2
bufferstring 0x3 @pmtext
return

#org @1pm
bufferstring 0x1 @1
bufferstring 0x3 @pmtext
return

#org @ht
compare 0x8007 0xA
if 0x0 goto @mn
msgbox @n0 0x2
release
end

#org @mn
msgbox @nn 0x2
release
end

#org @nhm
msgbox @0n 0x2
release
end

#org @nn
= Today is [buffer1],\n[buffer2]:[buffer3] [buffer4].

#org @n0
= Today is [buffer1],\n[buffer2]:0[buffer3] [buffer4].

#org @0n
= Today is [buffer1],\n0[buffer2]:[buffer3] [buffer4].

#org @00
= Today is [buffer1],\n0[buffer2]:0[buffer3] [buffer4].

#org @amtext
= AM

#org @pmtext
= PM

#org @1
= 1

#org @2
= 2

#org @3
= 3

#org @4
= 4

#org @5
= 5

#org @6
= 6

#org @7
= 7

#org @8
= 8

#org @9
= 9

#org @10
= 10

#org @11
= 11

#org @12
= 12


Whats supposed to happen is this:
Today is Day,
(0)Hour:(0)Minute AM/PM.

The 0 varies...

But What happens is (taken at 12:56 AM):


Can any one help me out here?

EDIT:
Spoiler:

Code:
#dynamic 0x800000

#org @start
call @day
call @hour
copybyte 0x20370C6 0x3005543
buffernumber 0x2 0x8007
compare 0x8006 0xA
if 0x1 goto @ht
compare 0x8006 0xB
if 0x1 goto @ht
compare 0x8006 0xC
if 0x1 goto @ht
compare 0x8006 0x16
if 0x1 goto @ht
compare 0x8006 0x17
if 0x1 goto @ht
compare 0x8006 0x18
if 0x1 goto @ht
compare 0x8007 0xA
if 0x0 goto @nhm
msgbox @0n 0x2
release
end


#org @day
copybyte 0x20370C2 0x3005541
compare 0x8005 0x0
if 0x1 call @sunday
compare 0x8005 0x1
if 0x1 call @monday
compare 0x8005 0x2
if 0x1 call @tuesday
compare 0x8005 0x3
if 0x1 call @wednesday
compare 0x8005 0x4
if 0x1 call @thursday
compare 0x8005 0x5
if 0x1 call @friday
compare 0x8005 0x6
if 0x1 call @saturday
return

#org @sunday
bufferstring 0x0 @sunday1
return

#org @monday
bufferstring 0x0 @monday1
return

#org @tuesday
bufferstring 0x0 @tuesday1
return

#org @wednesday
bufferstring 0x0 @wednesday1
return

#org @thursday
bufferstring 0x0 @thursday1
return

#org @friday
bufferstring 0x0 @friday1
return

#org @saturday
bufferstring 0x0 @saturday1
return

#org @sunday1
= Sunday

#org @monday1
= Monday

#org @tuesday1
= Tuesday

#org @wednesday1
= Wednesday

#org @thursday1
= Thursday

#org @friday1
= Friday

#org @saturday1
= Saturday

#org @hour
copybyte 0x20370C4 0x3005542
compare 0x8006 0x18
if 0x1 call @12am
compare 0x8006 0x17
if 0x1 call @11pm
compare 0x8006 0x16
if 0x1 call @10pm
compare 0x8006 0x15
if 0x1 call @9pm
compare 0x8006 0x14
if 0x1 call @8pm
compare 0x8006 0x13
if 0x1 call @7pm
compare 0x8006 0x12
if 0x1 call @6pm
compare 0x8006 0x11
if 0x1 call @5pm
compare 0x8006 0x10
if 0x1 call @4pm
compare 0x8006 0xF
if 0x1 call @3pm
compare 0x8006 0xE
if 0x1 call @2pm
compare 0x8006 0xD
if 0x1 call @1pm
compare 0x8006 0xC
if 0x1 call @12pm
compare 0x8006 0xB
if 0x1 call @am
compare 0x8006 0xA
if 0x1 call @am
compare 0x8006 0x9
if 0x1 call @am
compare 0x8006 0x8
if 0x1 call @am
compare 0x8006 0x7
if 0x1 call @am
compare 0x8006 0x6
if 0x1 call @am
compare 0x8006 0x5
if 0x1 call @am
compare 0x8006 0x4
if 0x1 call @am
compare 0x8006 0x3
if 0x1 call @am
compare 0x8006 0x2
if 0x1 call @am
compare 0x8006 0x1
if 0x1 call @am
return

#org @am
buffernumber 0x1 0x8006
return

#org @12pm
buffernumber 0x1 0x8006
return

#org @12am
bufferstring 0x1 @12
return

#org @11pm
bufferstring 0x1 @11
return

#org @10pm
bufferstring 0x1 @10
return

#org @9pm
bufferstring 0x1 @9
return

#org @8pm
bufferstring 0x1 @8
return

#org @7pm
bufferstring 0x1 @7
return

#org @6pm
bufferstring 0x1 @6
return

#org @5pm
bufferstring 0x1 @5
return

#org @4pm
bufferstring 0x1 @4
return

#org @3pm
bufferstring 0x1 @3
return

#org @2pm
bufferstring 0x1 @2
return

#org @1pm
bufferstring 0x1 @1
return

#org @ht
compare 0x8007 0xA
if 0x0 goto @mn
msgbox @nn 0x2
release
end

#org @mn
msgbox @n0 0x2
release
end

#org @nhm
msgbox @00 0x2
release
end

#org @nn
= Today is [buffer1],\n[buffer2]:[buffer3].

#org @n0
= Today is [buffer1],\n[buffer2]:0[buffer3].

#org @0n
= Today is [buffer1],\n0[buffer2]:[buffer3].

#org @00
= Today is [buffer1],\n0[buffer2]:0[buffer3].


#org @1
= 1

#org @2
= 2

#org @3
= 3

#org @4
= 4

#org @5
= 5

#org @6
= 6

#org @7
= 7

#org @8
= 8

#org @9
= 9

#org @10
= 10

#org @11
= 11

#org @12
= 12


Here is a slightly revised one, because Im assuming there is no buffer4? It works at 1 pm. Ill just need to see if it doesnt work at 12 again... Does anyone have any idea how I can implement the AM and PM?
Try this:

Code:
#define V_DAY 0x8005
#define V_HOUR 0x8006
#define V_MIN 0x8007

#erase 0x800000 0x1000
#dynamic 0x800000

#org @main
call @day
call @hour

setvar V_MIN 0
copybyte 0x20370C6 0x3005543
buffernumber 2 V_MIN

compare V_HOUR 10
if B_>= goto @ht

compare V_MIN 010
if B_< goto @nhm

msgbox @0n MSG_FACE
release
end


#org @day
setvar V_DAY 0
copybyte 0x20370C2 0x3005541
compare V_DAY 0
if B_== goto @sunday
compare V_DAY 1
if B_== goto @monday
compare V_DAY 2
if B_== goto @tuesday
compare V_DAY 3
if B_== goto @wednesday
compare V_DAY 4
if B_== goto @thursday
compare V_DAY 5
if B_== goto @friday
compare V_DAY 6
if B_== goto @saturday
return

#org @sunday
bufferstring 0 @sunday1
return

#org @monday
bufferstring 0 @monday1
return

#org @tuesday
bufferstring 0 @tuesday1
return

#org @wednesday
bufferstring 0 @wednesday1
return

#org @thursday
bufferstring 0 @thursday1
return

#org @friday
bufferstring 0 @friday1
return

#org @saturday
bufferstring 0 @saturday1
return

#org @sunday1
= Sunday

#org @monday1
= Monday

#org @tuesday1
= Tuesday

#org @wednesday1
= Wednesday

#org @thursday1
= Thursday

#org @friday1
= Friday

#org @saturday1
= Saturday


#org @hour
setvar V_HOUR 0
copybyte 0x20370C4 0x3005542

compare V_HOUR 12
if B_<= goto @am

subvar V_HOUR 12
goto @am

#org @am
buffernumber 1 V_HOUR
return


#org @ht
compare V_MIN 10
if B_< goto @mn
msgbox @nn MSG_FACE
release
end

#org @mn
msgbox @n0 MSG_FACE
release
end

#org @nhm
msgbox @00 MSG_FACE
release
end

#org @nn
= Today is [buffer1],\n[buffer2]:[buffer3].

#org @n0
= Today is [buffer1],\n[buffer2]:0[buffer3].

#org @0n
= Today is [buffer1],\n0[buffer2]:[buffer3].

#org @00
= Today is [buffer1],\n0[buffer2]:0[buffer3].
__________________

Brother of Vrai
  #6387    
Old January 13th, 2012, 06:44 AM
The Void's Avatar
The Void
Iron hand in a velvet glove
 
Join Date: May 2010
Location: Holy Roman Empire
Gender: Male
Nature: Calm
Quote:
Originally Posted by colcolstyles View Post
Try this:

Code:
#define V_DAY 0x8005
#define V_HOUR 0x8006
#define V_MIN 0x8007

#erase 0x800000 0x1000
#dynamic 0x800000

#org @main
call @day
call @hour

setvar V_MIN 0
copybyte 0x20370C6 0x3005543
buffernumber 2 V_MIN

compare V_HOUR 10
if B_>= goto @ht

compare V_MIN 010
if B_< goto @nhm

msgbox @0n MSG_FACE
release
end


#org @day
setvar V_DAY 0
copybyte 0x20370C2 0x3005541
compare V_DAY 0
if B_== goto @sunday
compare V_DAY 1
if B_== goto @monday
compare V_DAY 2
if B_== goto @tuesday
compare V_DAY 3
if B_== goto @wednesday
compare V_DAY 4
if B_== goto @thursday
compare V_DAY 5
if B_== goto @friday
compare V_DAY 6
if B_== goto @saturday
return

#org @sunday
bufferstring 0 @sunday1
return

#org @monday
bufferstring 0 @monday1
return

#org @tuesday
bufferstring 0 @tuesday1
return

#org @wednesday
bufferstring 0 @wednesday1
return

#org @thursday
bufferstring 0 @thursday1
return

#org @friday
bufferstring 0 @friday1
return

#org @saturday
bufferstring 0 @saturday1
return

#org @sunday1
= Sunday

#org @monday1
= Monday

#org @tuesday1
= Tuesday

#org @wednesday1
= Wednesday

#org @thursday1
= Thursday

#org @friday1
= Friday

#org @saturday1
= Saturday


#org @hour
setvar V_HOUR 0
copybyte 0x20370C4 0x3005542

compare V_HOUR 12
if B_<= goto @am

subvar V_HOUR 12
goto @am

#org @am
buffernumber 1 V_HOUR
return


#org @ht
compare V_MIN 10
if B_< goto @mn
msgbox @nn MSG_FACE
release
end

#org @mn
msgbox @n0 MSG_FACE
release
end

#org @nhm
msgbox @00 MSG_FACE
release
end

#org @nn
= Today is [buffer1],\n[buffer2]:[buffer3].

#org @n0
= Today is [buffer1],\n[buffer2]:0[buffer3].

#org @0n
= Today is [buffer1],\n0[buffer2]:[buffer3].

#org @00
= Today is [buffer1],\n0[buffer2]:0[buffer3].
Problem: XSE keeps on telling me to change the if B_< lines. I tried changing them to a "less than or equal to" thingy, but it still won't work. All I hear is beeping sounds, but no text. Any thoughts here?
__________________
NEMO VIR EST QUI MUNDUM NON REDDAT MELIOREM.
  #6388    
Old January 14th, 2012, 09:40 AM
Vladimir312's Avatar
Vladimir312
Beginning Trainer
 
Join Date: Sep 2011
Location: Las Vegas, Nevada
Gender: Male
Okay, so I was wondering how you would be able to have a sprite, like professor oak in pallet town, be able to be invisible before activating any "disappear" scripts, and then appear at a later time? By the way, I'm using pksv.
__________________
Coming soon(ish):

Last edited by Vladimir312; January 14th, 2012 at 09:43 AM. Reason: Added details
  #6389    
Old January 15th, 2012, 08:01 AM
The Void's Avatar
The Void
Iron hand in a velvet glove
 
Join Date: May 2010
Location: Holy Roman Empire
Gender: Male
Nature: Calm
Quote:
Originally Posted by Vladimir312 View Post
Okay, so I was wondering how you would be able to have a sprite, like professor oak in pallet town, be able to be invisible before activating any "disappear" scripts, and then appear at a later time? By the way, I'm using pksv.
I don't get what you mean here. Do you mean to say like a certain event has to be triggered first before Prof. Oak (or the sprite you want) wants to appear first? For that, you'll be needing some sort of flag or a var.
__________________
NEMO VIR EST QUI MUNDUM NON REDDAT MELIOREM.
  #6390    
Old January 15th, 2012, 11:37 AM
Vladimir312's Avatar
Vladimir312
Beginning Trainer
 
Join Date: Sep 2011
Location: Las Vegas, Nevada
Gender: Male
Quote:
Originally Posted by dragon456 View Post
I don't get what you mean here. Do you mean to say like a certain event has to be triggered first before Prof. Oak (or the sprite you want) wants to appear first? For that, you'll be needing some sort of flag or a var.
I know how to make a sprite disappear and reappear, what I can't seem to figure out is how to make it so that, like professor oak at the beginning of fire red, he begins by not being there, without any scripts (or at least not any that I know of) having activated to make him that way.
__________________
Coming soon(ish):
  #6391    
Old January 15th, 2012, 01:38 PM
Rayson
Beginning Trainer
 
Join Date: Dec 2011
Gender: Male
Quote:
I know how to make a sprite disappear and reappear, what I can't seem to figure out is how to make it so that, like professor oak at the beginning of fire red, he begins by not being there, without any scripts (or at least not any that I know of) having activated to make him that way.
There are map-scripts that trigger when you enter a map. They move and hide sprites or change tiles.
  #6392    
Old January 15th, 2012, 05:18 PM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 23
Gender: Male
Nature: Modest
Quote:
Originally Posted by Vladimir312 View Post
I know how to make a sprite disappear and reappear, what I can't seem to figure out is how to make it so that, like professor oak at the beginning of fire red, he begins by not being there, without any scripts (or at least not any that I know of) having activated to make him that way.
Some flags (such as Oak's one) are set when the New Game option is selected. It's not done by a script, but by Assembly.
__________________
あなた は しきしゃ です
わたし は ばか です
  #6393    
Old January 15th, 2012, 06:37 PM
aar2697
 
Join Date: Jun 2010
Age: 17
Gender: Male
Send a message via Skype™ to aar2697
I'm having major problems with sprites reappearing even when I use setflag and hidesprite. They are gone temporarily, and will appear again some time when I come back to the map. If I leave the map and come back right after the script has occurred, they will be gone. However, if I go off and train my Pokemon, continue on the story, etc, the sprite will reappear when I come back. I am not reusing flags, and the flags are in the 2000's and 4000's ranges, so they're definitely not interfering with flags already put into the game.

I'll just write a random script that would normally hide the sprite:
Code:
#dynamic 8000000

#org @start
trainerbattle 0x1 0xA 0x0 @a @b @c (I have no idea if the 2 and 3 lines are switched up or not; don't even worry about it.)
release
end

#org @c
msgbox @d MSG_FACE
fadescreen 0x1
hidesprite 0x4 (Yes, I know it's the Person Event No.)
setflag 0x2542 (Yes, I know it's the Person ID.)
fadescreen 0x0
release
end

msgbox @a
= Hey!\pLet's battle!

msgbox @b
= Argh!  You won!

msgbox @d
= I'll see you around.\pGoodbye!
When trainers like the above reappear, nothing happens when you interact with them; you just hear a clicking noise.

If it's just a simple one like this..
Code:
#dynamic 8000000

#org @start
checkflag 0x820
if 0x1 goto @did
msgbox @hi MSG_FACE
release
end

#org @did
msgbox @bye MSG_FACE
fadescreen 0x1
hidesprite 0x3
setflag 0x3500
fadescreen 0x0
release
end

#org @hi
= I am the door guarder.\pYou must have the 1st badge\nto enter this door.

#org @bye
= Wow!\pYou got the first badge?\nWell, I guess I must leave.
...the sprite, when it reappears, will perform the script again (says bye, screen fades, sprite disappears). Then, if you come back some random time after you progressed in the game more, he'll be there again.
  #6394    
Old January 15th, 2012, 06:53 PM
Quickster's Avatar
Quickster
Dream or Drop?
 
Join Date: Oct 2007
Gender: Male
Nature: Quiet
Quote:
Originally Posted by aar2697 View Post
I'm having major problems with sprites reappearing even when I use setflag and hidesprite. They are gone temporarily, and will appear again some time when I come back to the map. If I leave the map and come back right after the script has occurred, they will be gone. However, if I go off and train my Pokemon, continue on the story, etc, the sprite will reappear when I come back. I am not reusing flags, and the flags are in the 2000's and 4000's ranges, so they're definitely not interfering with flags already put into the game.

I'll just write a random script that would normally hide the sprite:
Code:
#dynamic 8000000

#org @start
trainerbattle 0x1 0xA 0x0 @a @b @c (I have no idea if the 2 and 3 lines are switched up or not; don't even worry about it.)
release
end

#org @c
msgbox @d MSG_FACE
fadescreen 0x1
hidesprite 0x4 (Yes, I know it's the Person Event No.)
setflag 0x2542 (Yes, I know it's the Person ID.)
fadescreen 0x0
release
end

msgbox @a
= Hey!\pLet's battle!

msgbox @b
= Argh!  You won!

msgbox @d
= I'll see you around.\pGoodbye!
When trainers like the above reappear, nothing happens when you interact with them; you just hear a clicking noise.

If it's just a simple one like this..
Code:
#dynamic 8000000

#org @start
checkflag 0x820
if 0x1 goto @did
msgbox @hi MSG_FACE
release
end

#org @did
msgbox @bye MSG_FACE
fadescreen 0x1
hidesprite 0x3
setflag 0x3500
fadescreen 0x0
release
end

#org @hi
= I am the door guarder.\pYou must have the 1st badge\nto enter this door.

#org @bye
= Wow!\pYou got the first badge?\nWell, I guess I must leave.
...the sprite, when it reappears, will perform the script again (says bye, screen fades, sprite disappears). Then, if you come back some random time after you progressed in the game more, he'll be there again.
This would happen to me whenever I would use flags above 1000 to hide OWs. As far as I know, using flags lower than 1000 is the only way to fix it.
__________________
I laugh looking at this.

But sometimes I want to come back to it...

  #6395    
Old January 15th, 2012, 07:33 PM
aar2697
 
Join Date: Jun 2010
Age: 17
Gender: Male
Send a message via Skype™ to aar2697
Quote:
Originally Posted by Quickster View Post
This would happen to me whenever I would use flags above 1000 to hide OWs. As far as I know, using flags lower than 1000 is the only way to fix it.
Thank you soooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo much! (Each o is a bucket of thanks)

Also, I've used flags in the 1000's range that work just fine. 4000's works fine too. Obviously, 2000's does not.

Last edited by aar2697; January 15th, 2012 at 09:29 PM. Reason: additional info
  #6396    
Old January 16th, 2012, 02:34 PM
Vladimir312's Avatar
Vladimir312
Beginning Trainer
 
Join Date: Sep 2011
Location: Las Vegas, Nevada
Gender: Male
Sorry guys, but I have another question for you pksv users out there. I'm working on a team rocket script in which I want the player to battle a grunt, and, after completing the fight, keep on going with the script, like how gym leaders talk after you have battled them.
I've had to use the script generator to create the battle part of the script, as I don't understand what the values mean in the command:

trainerbattle 0x? 0x? 0x? @intro @defeat

I get that the second value is the trainer id, but what are the first and third ones? And does anyone know how to continue a script after a battle without releasing the player first?
__________________
Coming soon(ish):
  #6397    
Old January 16th, 2012, 02:59 PM
droomph's Avatar
droomph
mmm gurl that 90s
Community Supporter
 
Join Date: Sep 2011
Location: bar'jách
Age: 17
Gender: Male
Nature: Impish
Quote:
Originally Posted by Vladimir312 View Post
Sorry guys, but I have another question for you pksv users out there. I'm working on a team rocket script in which I want the player to battle a grunt, and, after completing the fight, keep on going with the script, like how gym leaders talk after you have battled them.
I've had to use the script generator to create the battle part of the script, as I don't understand what the values mean in the command:

trainerbattle 0x? 0x? 0x? @intro @defeat

I get that the second value is the trainer id, but what are the first and third ones? And does anyone know how to continue a script after a battle without releasing the player first?
From Reference as of 06-03pm 09-24-11, DavidJCobb:
Quote:
Arguments:
byte type
word index
word local_id
pointer intro
pointer loss
pointer extra (run script after battle)
pointer extra2 (not used often)
Quote:
Originally Posted by Vladimir312 View Post
And does anyone know how to continue a script after a battle without releasing the player first?
Set "type" to 1 or 2 and use the last four arguments accordingly.

You should really search around before asking stuff like that.

Quote:
Originally Posted by AustinWolff View Post
This might be a n00b question, but so far, I haven't found a way for the game to check if you have a certain wild pokemon before continuing. If there is already a "checkpokemon" command, then can u explain how to use it? If not, I kinda have a hint of where to start:
Spoiler:
somehow, you copy a pokemon's hex number (let's say pikachu --> which would be 0x19) into a variable. Then you could use "copyvar VARIABLE 0x8004" ... Then you could somehow use "compare 0x8004...if 0x1 goto @1"

I dont know exactly how to do it, but I'm on the right track.
Also:
Spoiler:
The script is where 2 people will block your way into a route unless you have that certain pokemon in which you CAN ONLY CATCH IN THE WILD. I'm using ruby and XSE
Special 0x17C is the special which checks the Pokémon in FireRed. Since 0x15FD60 is the Specials Table, you can use that to find 0x15FD60 + (0x17C x 4). Then you go to where the pointer tells you, go forward six bytes and try finding the next twenty bytes in whichever version you want to do it on. Then find out which special it is.

Once you've got that working, proceed to do it how you would normally do it:
Code:
setvar 0x8004 0x[Pokémon]
special2 0x8004 0x[Special]
etc.
Beware though, because the routine is only complete in FR/LG for sure. You will need to test it before actually using it. (For example, in Emerald the routine is completely bare-bones and will require you to edit it to conform to how it's supposed to work.)
__________________
did u no there r 21 letters in the alphabet
o i forgot 5
uraqt



Last edited by droomph; January 17th, 2012 at 12:14 AM.
  #6398    
Old January 17th, 2012, 08:30 AM
N!elz's Avatar
N!elz
Beginning Hack-maker
 
Join Date: Jul 2007
Nature: Adamant
Game: FireRed v1.0 - All cleaned out of scripts
Scripteditor: PKSV (newest)

What I want to do is to activate the @birthday script as soon as the hero enters the room from upstairs and gets the player to his mom as she will talk to him(for the first time). I can get the right moves to work for myself I think, but not the script that tells him to get to his mom.
But I really don't know how to do get the @birthday script to work as soon as he enters the room, so that's my question! Can you help me with that?

P.S: I think that the @birthday event won't repeat itself because of the checkflag, right? And it's my first script, haven't even debugged it yet, so if there's any mistake in it, please point it out for me :)

Spoiler:

#dyn 0x740000

#org $start
lock
faceplayer
Checkflag 0x828
If true goto @healing
message @birthday
boxset 6
message @pokedex
boxset 5
Compare LASTRESULT1
If true goto @getdex
If false goto @whynot
boxset 6
release
end

#org @birthday
= Mom and Dad: Happy Birthday, dear \v\h01!

#org @pokedex
= Mom: Would you like your own PokéDex?

#org @getdex
setflag 0x829
fanfare 0x13E
message @yay
boxset 6
waitfanfare
release
end

#org @yay
= Mom: Have fun with your Pokédex, honey!\nIt's got the lastest furnware!\pOr something like that...

#org @whynot
message @whynot1
boxset 6
release
end

#org @whynot1
= Mom: *sighs* Why not? Dad and I thought\nyou really wanted to have this...

#org @healing
lockall
message @healmsg
showmsg
waitbutton
fadescreen 1
closemsg
special 0
fadescreen 0
msgbox @bettermsg
callstd MSG_NORMAL
releaseall
end

#org @healmsg
= Your POKéMON look tired[.]\nYou should give them a rest.

#org @bettermsg
= There. All better now!\pHow is your journey coming along?


Greetings,
N!elz
__________________
Working on my very first Pokémon Hack:
Pokémon - The Everlasting Journey

Don't know much about hacking except for the mapping, so it'll take a while before I release the first beta
  #6399    
Old January 17th, 2012, 09:41 AM
Montgomery's Avatar
Montgomery
Beginning Trainer
 
Join Date: Aug 2011
Gender: Male
Nature: Modest
Quote:
Originally Posted by N!elz View Post
Game: FireRed v1.0 - All cleaned out of scripts
Scripteditor: PKSV (newest)

What I want to do is to activate the @birthday script as soon as the hero enters the room from upstairs and gets the player to his mom as she will talk to him(for the first time). I can get the right moves to work for myself I think, but not the script that tells him to get to his mom.
But I really don't know how to do get the @birthday script to work as soon as he enters the room, so that's my question! Can you help me with that?

P.S: I think that the @birthday event won't repeat itself because of the checkflag, right? And it's my first script, haven't even debugged it yet, so if there's any mistake in it, please point it out for me :)

Spoiler:

#dyn 0x740000

#org $start
lock
faceplayer
Checkflag 0x828
If true goto @healing
message @birthday
boxset 6
message @pokedex
boxset 5
Compare LASTRESULT1
If true goto @getdex
If false goto @whynot
boxset 6
release
end

#org @birthday
= Mom and Dad: Happy Birthday, dear \v\h01!

#org @pokedex
= Mom: Would you like your own PokéDex?

#org @getdex
setflag 0x829
fanfare 0x13E
message @yay
boxset 6
waitfanfare
release
end

#org @yay
= Mom: Have fun with your Pokédex, honey!\nIt's got the lastest furnware!\pOr something like that...

#org @whynot
message @whynot1
boxset 6
release
end

#org @whynot1
= Mom: *sighs* Why not? Dad and I thought\nyou really wanted to have this...

#org @healing
lockall
message @healmsg
showmsg
waitbutton
fadescreen 1
closemsg
special 0
fadescreen 0
msgbox @bettermsg
callstd MSG_NORMAL
releaseall
end

#org @healmsg
= Your POKéMON look tired[.]\nYou should give them a rest.

#org @bettermsg
= There. All better now!\pHow is your journey coming along?


Greetings,
N!elz
I think you should use level scripts. I'm still a novice in scripting but I'm pretty sure you need to use level scripts if you want a script to execute upon entering a map. A member, cooley, has compile a nice tutorial in the Tutorials' section, if you like to have a look; however, the scripting environment used is presumably XSE. I doubt you'll have trouble converting as I heard the two syntax are awfully similar. I hope this is what you are looking for.
  #6400    
Old January 17th, 2012, 01:01 PM
N!elz's Avatar
N!elz
Beginning Hack-maker
 
Join Date: Jul 2007
Nature: Adamant
Quote:
Originally Posted by Montgomery View Post
I think you should use level scripts. I'm still a novice in scripting but I'm pretty sure you need to use level scripts if you want a script to execute upon entering a map. A member, cooley, has compile a nice tutorial in the Tutorials' section, if you like to have a look; however, the scripting environment used is presumably XSE. I doubt you'll have trouble converting as I heard the two syntax are awfully similar. I hope this is what you are looking for.
Thanks, I'll check! This is my first "difficult" script, and I only am practising since last night,
so I don't know all the terms yet! But I'll keep levelscripting in thd back of my head! :) And it isn't hard to convert, tried it for a couple of times.
Thanks for the help anyways!
__________________
Working on my very first Pokémon Hack:
Pokémon - The Everlasting Journey

Don't know much about hacking except for the mapping, so it'll take a while before I release the first beta
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 02:17 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.