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.


Advertise here

Closed Thread
Click here to go to the first staff post in this thread.  
Thread Tools
  #5026    
Old December 31st, 2010, 09:32 PM
Johto_legend's Avatar
Johto_legend
Smoochum
 
Join Date: Jan 2010
Gender: Male

Advertise here
Quote:
Originally Posted by Teh Blazer View Post
Here's an idea, remove the setflag/checkflag stuff in the beginning (I bolded it) cuz I think (and I know barely anything about level scripts) it doesn't really need it. Just try it. ^ ^
Tried it. didnt work =/. i guess ill just rewrite it and then recompile it with new offsets.
__________________

Hacking Innovation - Recruiting! Experienced Fakemon Spriters Needed!!!
  #5027    
Old January 2nd, 2011, 04:19 PM
adhdguitar's Avatar
adhdguitar
Newbie Pokémon Hacker
 
Join Date: May 2010
Gender: Male
Nature: Adamant
This freezes the game, and I'm not sure why. :/
Spoiler:
'---------------
#org 0x8001B0
lock
checkflag 0x7
if 0x0 call 0x88001E0
release
end

'---------------
#org 0x8001E0
applymovement 0x4 0x8800300
waitmovement 0x4
applymovement MOVE_PLAYER 0x880030C
waitmovement 0xFF
msgbox 0x8800060 MSG_FACE '"Woah there buddy!\nMiria said she ..."
applymovement MOVE_PLAYER 0x88003A0
waitmovement 0xFF
release
end


'---------
' Strings
'---------
#org 0x800060
= Woah there buddy!\nMiria said she was looking\lfor you! She said she\nwas in Greenvine Town. It'd\lbe best to go find her.\pGreenvine is to the north,\nin case you were wondering.


'-----------
' Movements
'-----------
#org 0x800300
#raw 0x62 'Exclamation Mark (!)
#raw 0x4A 'Face Player
#raw 0xFE 'End of Movements

#org 0x80030C
#raw 0x1 'Face Up
#raw 0x63 'Question Mark (?)
#raw 0xFE 'End of Movements

#org 0x8003A0
#raw 0xF 'Step Right (Slow)
#raw 0xFE 'End of Movements
__________________


Yellow: Complete
Crystal:
Complete
Sapphire: Not Started
Cherrim: Not Started
  #5028    
Old January 2nd, 2011, 10:33 PM
Teh Blazer's Avatar
Teh Blazer
Divider of Zero
 
Join Date: Feb 2009
Location: 'MERICA
Age: 19
Gender: Male
Nature: Relaxed
Quote:
Originally Posted by adhdguitar View Post
This freezes the game, and I'm not sure why. :/
Spoiler:
'---------------
#org 0x8001B0
lock
checkflag 0x7
if 0x0 call 0x88001E0
release
end

'---------------
#org 0x8001E0
applymovement 0x4 0x8800300
waitmovement 0x0
applymovement MOVE_PLAYER 0x880030C
waitmovement 0x0
msgbox 0x8800060 MSG_FACE '"Woah there buddy!\nMiria said she ..."
applymovement MOVE_PLAYER 0x88003A0
waitmovement 0x0
release
end


'---------
' Strings
'---------
#org 0x800060
= Woah there buddy!\nMiria said she was looking\lfor you! She said she\nwas in Greenvine Town. It'd\lbe best to go find her.\pGreenvine is to the north,\nin case you were wondering.


'-----------
' Movements
'-----------
#org 0x800300
#raw 0x62 'Exclamation Mark (!)
#raw 0x4A 'Face Player
#raw 0xFE 'End of Movements

#org 0x80030C
#raw 0x1 'Face Up
#raw 0x63 'Question Mark (?)
#raw 0xFE 'End of Movements

#org 0x8003A0
#raw 0xF 'Step Right (Slow)
#raw 0xFE 'End of Movements
I think for waitmovements you don't need the 0x[Person Id], what you really need there is waitmovement 0x0 (If you're using XSE)

If not, then show us the other parts you filled out in Advance Map (Like the Var Number and such).
__________________
Coming soon...
  #5029    
Old January 3rd, 2011, 03:29 AM
Twiggy's Avatar
Twiggy
Slender snake
Community Supporter
 
Join Date: Dec 2010
Location: Plushies.
Age: 21
Gender: Male
Nature: Hasty
This is weird. I can't even give the player a preset Pokémon. It just crashes the game. Did I mess up somewhere?
Code:
#include stdpoke.rbh
#include stditems.rbh
#dynamic 0x9C1BEC

#org @givepkmn
checkflag 0x1019
if 0x1 call @skip
msgbox @startmsg 0x6
givepokemon PKMN_EEVEE 0xA ITEM_SITRUSBERRY 0x0 0x0 0x0
setflag 0x1019
setflag 0x860
end

#org @startmsg
= (Where am I?)\p(Oh, better check my Pokémon.)\p(I still have that Eevee. That's\ngood.)

#org @skip
end
__________________
Hey, it's Twiggy here. Or Twiggy, if you prefer. I like Servine and Noivern a lot. I'm paired with Kip. I like Katy Perry. I want a Chespin plushie. Also, I'm a total PC geek.
Links
  #5030    
Old January 3rd, 2011, 03:45 AM
Hi-Techneon's Avatar
Hi-Techneon
Trainer
 
Join Date: Dec 2010
Location: Belgium
Age: 16
Gender: Male
Nature: Rash
Quote:
Originally Posted by ♪Twiggy♪ View Post
This is weird. I can't even give the player a preset Pokémon. It just crashes the game. Did I mess up somewhere?
Code:
#include stdpoke.rbh
#include stditems.rbh
#dynamic 0x9C1BEC
 
#org @givepkmn
checkflag 0x1019
if 0x1 call @skip
msgbox @startmsg 0x6
givepokemon PKMN_EEVEE 0xA ITEM_SITRUSBERRY 0x0 0x0 0x0
setflag 0x1019
setflag 0x860
end
 
#org @startmsg
= (Where am I?)\p(Oh, better check my Pokémon.)\p(I still have that Eevee. That's\ngood.)
 
#org @skip
end
I am not sure but you could change 'call @skip' into 'jump @skip' if that command exists in your script editor.
__________________

VDex:
White:
  #5031    
Old January 3rd, 2011, 03:51 AM
Zeffy's Avatar
Zeffy
artificial one-eyed ghoul
 
Join Date: Apr 2009
Send a message via Skype™ to Zeffy
Quote:
Originally Posted by Hi-Techneon View Post
I am not sure but you could change 'call @skip' into 'jump @skip' if that command exists in your script editor.
I think it'd be better it's: "if 0x1 goto @skip"
  #5032    
Old January 3rd, 2011, 04:06 AM
Twiggy's Avatar
Twiggy
Slender snake
Community Supporter
 
Join Date: Dec 2010
Location: Plushies.
Age: 21
Gender: Male
Nature: Hasty
Huh. Deleting the message fixed the problem. Hmm... maybe I should make the message appear sometime else.
__________________
Hey, it's Twiggy here. Or Twiggy, if you prefer. I like Servine and Noivern a lot. I'm paired with Kip. I like Katy Perry. I want a Chespin plushie. Also, I'm a total PC geek.
Links
  #5033    
Old January 3rd, 2011, 06:29 AM
adhdguitar's Avatar
adhdguitar
Newbie Pokémon Hacker
 
Join Date: May 2010
Gender: Male
Nature: Adamant
Quote:
Originally Posted by Teh Blazer View Post
I think for waitmovements you don't need the 0x[Person Id], what you really need there is waitmovement 0x0 (If you're using XSE)

If not, then show us the other parts you filled out in Advance Map (Like the Var Number and such).
The Var Number and Var value were both zero, since I'm not using a variable in the script. Maybe that's the problem?

Edit: I put a random variable there (5000) even though it isn't utilized and whatdaya know, it worked. :D
__________________


Yellow: Complete
Crystal:
Complete
Sapphire: Not Started
Cherrim: Not Started

Last edited by adhdguitar; January 3rd, 2011 at 07:26 AM.
  #5034    
Old January 3rd, 2011, 02:11 PM
avolonsaber
 
Join Date: Oct 2010
I'm not new to scripting(Pokesav user here), but I'm new to doing it via XSE, and I'm having a bit of trouble adjusting. I need to know how to combine two scripts in XSE, or just make a Multiscript? I don't know what the wording word be. I need to combine the Activate Running Shoes script and the Give Pokemon script, is it really as simple as just writing one under the other or do I need to do something special? I've looked at the tutorials, and its just not helping.
  #5035    
Old January 3rd, 2011, 02:34 PM
destinedjagold's Avatar
destinedjagold
Oh Hai Thar~ 'ω'
Community Supporter
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Quote:
Originally Posted by avolonsaber View Post
I'm not new to scripting(Pokesav user here), but I'm new to doing it via XSE, and I'm having a bit of trouble adjusting. I need to know how to combine two scripts in XSE, or just make a Multiscript? I don't know what the wording word be. I need to combine the Activate Running Shoes script and the Give Pokemon script, is it really as simple as just writing one under the other or do I need to do something special? I've looked at the tutorials, and its just not helping.
you can simply write those in one simple script.
Quote:
#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x1000
if 0x1 goto @done
message @1 6
setflag 0x860
message @2 6
givepokemon 0x19 0x5 0x0 0x0 0x0 0x0
setflag 0x1000
release
end

#org @done
message @3 6
release
end

#org @1
= Hi. These are for you!

#org @2
= Those are RUNNING SHOES.\nAnd here. A PIKACHU for you!

#org @3
= Take care!
Script is for Ruby, but you get the idea.
You can combine different commands in a script to your liking.
__________________
  #5036    
Old January 3rd, 2011, 03:40 PM
Metroid Die
Beginning Trainer
 
Join Date: Mar 2009
Hey, I've got a couple of problems, and I can't honestly see what I've done wrong with these scripts...

Problem 1: A level script, when I enter the Professor's lab, a level script activates, then afterwords, it's supposed to deactivate and not repeat. I've set the var with a 0x1 command, but that doesn't seem to work... Could it have something to do with going inside a building rather than outside?

Here's the script:

Spoiler:
#dynamic 0x8145F7

#org 0x80CD4B
applymovement 0xFF 0x880CD91
waitmovement 0x0
applymovement 0x4 0x880CD9A
waitmovement 0x0
applymovement 0x5 0x880CD9D
applymovement 0x4 0x880CDA0
waitmovement 0x0
msgbox 0x880CDA3 0x6 '"[blue_fr]Redwood: Ah, so you are [..."
setvar 0x4001 0x1
release
end


'---------
' Strings
'---------
#org 0x80CDA3
= [blue_fr]Redwood: Ah, so you are [player]?\pI'm glad to finally meet you.\pI've called you and James here to\nhelp me in my research.\pOn this desk are three Pokéballs,\neach containing a Pokémon.\pI'd like you each to choose one\nbefore I tell you your task.\pGo on [player], pick one.


'-----------
' Movements
'-----------
#org 0x80CD91
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements

#org 0x80CD9A
#raw 0x2 'Face Left
#raw 0xFE 'End of Movements

#org 0x80CD9D
#raw 0x21 'Step on the Spot Down (Normal)
#raw 0xFE 'End of Movements

#org 0x80CDA0
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements



Problem 2: This next one is a very basic problem I'm sure, I couldn't find a tutorial for script events though... Anyway, I want my player to walk on the script tile, have a message pop up, then have them walk back, effectively blocking them until the flag is activated. If I set the var number in Advance Map, the player completely ignores the script tile as if it isn't there, yet if I remove the number, the game freezes when I step on it...

Script:
Spoiler:

'---------------
#org 0x81458A
checkflag 0x1010
if 0x1 goto 0x88145A8
msgbox 0x88145AA 0x6 '"Professor Redwood's advice: You sh..."
applymovement 0xFF 0x88145F5
waitmovement 0x0
release
end

'---------------
#org 0x8145A8
end


'---------
' Strings
'---------
#org 0x8145AA
= Professor Redwood's advice: You should\nsee your mother before you leave.


'-----------
' Movements
'-----------
#org 0x8145F5
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements


I don't know if it has to do with setting vars in the script, but I'll try that next anyway.


Any help with these questions would be greatly appreciated.
  #5037    
Old January 3rd, 2011, 04:56 PM
djvbb12
Beginning Trainer
 
Join Date: Jan 2011
Gender: Male
Despite the face that indeed I am requesting a script my request for a new thread was denied and I was directed here. First the specs:
Game: Fire red
Type: US
Script editor: PKSV
What I want my script to accomplish: I am trying to make it so that when the player has two particular Pokemon in their party and talks to a particular character, that character will offer to combine them and create a new Pokemon.
Similar scripts I've been trying to use: I realize that in actuality this script would be very similar to in-game trading, however I can't make heads or tails of the script despite the fact that many other scripts make sense to me. I'm just stumped when I look at it. (In particular I've been looking at the bald guy's script in cerulean city):
Spoiler:
#org 0x816A9B1
'-----------------------------------
lock
faceplayer
setvar 0x8008 0x1
call 0x81A8CAD
checkflag 0x24A
if true jump 0x816AA23 ' Flag is set
msgbox 0x81A59FE ' Hello, there! Do you...
callstd MSG_YESNO ' Yes/No message
compare LASTRESULT NO
if == jump 0x816AA0B ' Equal To
call 0x81A8CBD
compare 0x8004 0x6
if >= jump 0x816AA0B ' Larger Than or Equal To
call 0x81A8CC9
comparevars2 LASTRESULT 0x8009
if != jump 0x816AA15 ' Not Equal To
call 0x81A8CD9
msgbox 0x81A5A9D ' Thanks!
callstd MSG_NOCLOSE ' Non-closing message
setflag 0x24A
release
end

#org 0x81A8CAD
'-----------------------------------
copyvar 0x8004 0x8008
special2 LASTRESULT 0xFC
copyvar 0x8009 LASTRESULT
return

#org 0x816AA23
'-----------------------------------
msgbox 0x81A5AA5 ' The \v\h03 that I tr...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end

#org 0x816AA0B
'-----------------------------------
msgbox 0x81A5A4E ' Well, if you don't w...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end

#org 0x81A8CBD
'-----------------------------------
special 0x9F
waitspecial
lock
faceplayer
copyvar 0x800A 0x8004
return

#org 0x81A8CC9
'-----------------------------------
copyvar 0x8005 0x800A
special2 LASTRESULT 0xFF
copyvar 0x800B LASTRESULT
return

#org 0x816AA15
'-----------------------------------
storepokemon 0x0 0x8009
msgbox 0x81A5A6A ' Hmmm?\nThis isn't a ...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end

#org 0x81A8CD9
'-----------------------------------
copyvar 0x8004 0x8008
copyvar 0x8005 0x800A
special 0xFD
special 0xFE
waitspecial
lock
faceplayer
return


#org 0x81A59FE
= Hello, there! Do you happen to\nhave a \v\h02?\pWould you agree to a trade for\nmy \v\h03?

#org 0x81A5A9D
= Thanks!

#org 0x81A5AA5
= The \v\h03 that I traded you,\nhas it grown stronger?

#org 0x81A5A4E
= Well, if you don't want to[.]

#org 0x81A5A6A
= Hmmm?\nThis isn't a \v\h02.\pThink of me if you get one.

So for me this is a bust. I break it down into what I want to happen. Remove 2 pokemon and add one. It is at this point I discover ASM. I understand ASM less than I do greek and I understand ASM tutorials less than I do ASM. But I happen upon this thread pokecommunity.com/showthread.php?t=167889 and figure I can use it but again I am stuck I have no idea how to make sure that the player is choosing the correct pokemon to trade (I replaced rattata and raticate). So of two options it comes down to me not understanding the code... If anyone can offer ANY help I would GREATLY appreciate it. THANKS IN ADVANCED! And I'm sorry if this is not within the scope of this thread, as I said the moderator would not let me make my own thread.
  #5038    
Old January 3rd, 2011, 08:21 PM
avolonsaber
 
Join Date: Oct 2010
Quote:
Originally Posted by destinedjagold View Post


you can simply write those in one simple script.


Script is for Ruby, but you get the idea.
You can combine different commands in a script to your liking.
Thank you very much! I fiddled around and got it, after much trial and error. I even added a fanfare and fadescreen. Lol. Is it possible to combine any scripts though. I need to make a script where someone would give you a Pokemon, then walk out of the room. I can make the Give Pokemon script fine, and the Apply Movement one, but I don't know how to put them together. Would it be kind of like what you showed me? Ugh, more trial and error.
  #5039    
Old January 4th, 2011, 11:08 AM
metapod23's Avatar
metapod23
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Quote:
Originally Posted by Metroid Die View Post
Hey, I've got a couple of problems, and I can't honestly see what I've done wrong with these scripts...

Problem 1: A level script, when I enter the Professor's lab, a level script activates, then afterwords, it's supposed to deactivate and not repeat. I've set the var with a 0x1 command, but that doesn't seem to work... Could it have something to do with going inside a building rather than outside?

Here's the script:

Spoiler:
#dynamic 0x8145F7

#org 0x80CD4B
applymovement 0xFF 0x880CD91
waitmovement 0x0
applymovement 0x4 0x880CD9A
waitmovement 0x0
applymovement 0x5 0x880CD9D
applymovement 0x4 0x880CDA0
waitmovement 0x0
msgbox 0x880CDA3 0x6 '"[blue_fr]Redwood: Ah, so you are [..."
setvar 0x4001 0x1
release
end


'---------
' Strings
'---------
#org 0x80CDA3
= [blue_fr]Redwood: Ah, so you are [player]?\pI'm glad to finally meet you.\pI've called you and James here to\nhelp me in my research.\pOn this desk are three Pokéballs,\neach containing a Pokémon.\pI'd like you each to choose one\nbefore I tell you your task.\pGo on [player], pick one.


'-----------
' Movements
'-----------
#org 0x80CD91
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements

#org 0x80CD9A
#raw 0x2 'Face Left
#raw 0xFE 'End of Movements

#org 0x80CD9D
#raw 0x21 'Step on the Spot Down (Normal)
#raw 0xFE 'End of Movements

#org 0x80CDA0
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements
In the Header, where you've set up your level script, you placed 4001 as the Flag and 0000 as the Value?


Quote:
Problem 2: This next one is a very basic problem I'm sure, I couldn't find a tutorial for script events though... Anyway, I want my player to walk on the script tile, have a message pop up, then have them walk back, effectively blocking them until the flag is activated. If I set the var number in Advance Map, the player completely ignores the script tile as if it isn't there, yet if I remove the number, the game freezes when I step on it...

Script:
Spoiler:

'---------------
#org 0x81458A
checkflag 0x1010
if 0x1 goto 0x88145A8
msgbox 0x88145AA 0x6 '"Professor Redwood's advice: You sh..."
applymovement 0xFF 0x88145F5
waitmovement 0x0
release
end

'---------------
#org 0x8145A8
end


'---------
' Strings
'---------
#org 0x8145AA
= Professor Redwood's advice: You should\nsee your mother before you leave.


'-----------
' Movements
'-----------
#org 0x8145F5
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements


I don't know if it has to do with setting vars in the script, but I'll try that next anyway.


Any help with these questions would be greatly appreciated.
Which "var number" are you using for this script? If it's, say, 4002, an easier way would probably be to just use variables than flags. Whatever script you're using to set flag 0x1010, try changing it to setvar 0x4002 0x1 (in place of setflag 0x1010).

Then just have the script you want for blocking the player to be var number 4002 and var value 0000. (You can have the variable be whatever you want though - 4002 is just an example).

Then you can just remove the:

Code:
checkflag 0x1010
if 0x1 goto 0x88145A8
part from the script altogether.
__________________
  #5040    
Old January 4th, 2011, 11:47 AM
Hi-Techneon's Avatar
Hi-Techneon
Trainer
 
Join Date: Dec 2010
Location: Belgium
Age: 16
Gender: Male
Nature: Rash
Quote:
Originally Posted by djvbb12 View Post
Despite the face that indeed I am requesting a script my request for a new thread was denied and I was directed here. First the specs:
Game: Fire red
Type: US
Script editor: PKSV
What I want my script to accomplish: I am trying to make it so that when the player has two particular Pokemon in their party and talks to a particular character, that character will offer to combine them and create a new Pokemon.
Similar scripts I've been trying to use: I realize that in actuality this script would be very similar to in-game trading, however I can't make heads or tails of the script despite the fact that many other scripts make sense to me. I'm just stumped when I look at it. (In particular I've been looking at the bald guy's script in cerulean city):
Spoiler:
#org 0x816A9B1
'-----------------------------------
lock
faceplayer
setvar 0x8008 0x1
call 0x81A8CAD
checkflag 0x24A
if true jump 0x816AA23 ' Flag is set
msgbox 0x81A59FE ' Hello, there! Do you...
callstd MSG_YESNO ' Yes/No message
compare LASTRESULT NO
if == jump 0x816AA0B ' Equal To
call 0x81A8CBD
compare 0x8004 0x6
if >= jump 0x816AA0B ' Larger Than or Equal To
call 0x81A8CC9
comparevars2 LASTRESULT 0x8009
if != jump 0x816AA15 ' Not Equal To
call 0x81A8CD9
msgbox 0x81A5A9D ' Thanks!
callstd MSG_NOCLOSE ' Non-closing message
setflag 0x24A
release
end

#org 0x81A8CAD
'-----------------------------------
copyvar 0x8004 0x8008
special2 LASTRESULT 0xFC
copyvar 0x8009 LASTRESULT
return

#org 0x816AA23
'-----------------------------------
msgbox 0x81A5AA5 ' The \v\h03 that I tr...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end

#org 0x816AA0B
'-----------------------------------
msgbox 0x81A5A4E ' Well, if you don't w...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end

#org 0x81A8CBD
'-----------------------------------
special 0x9F
waitspecial
lock
faceplayer
copyvar 0x800A 0x8004
return

#org 0x81A8CC9
'-----------------------------------
copyvar 0x8005 0x800A
special2 LASTRESULT 0xFF
copyvar 0x800B LASTRESULT
return

#org 0x816AA15
'-----------------------------------
storepokemon 0x0 0x8009
msgbox 0x81A5A6A ' Hmmm?\nThis isn't a ...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end

#org 0x81A8CD9
'-----------------------------------
copyvar 0x8004 0x8008
copyvar 0x8005 0x800A
special 0xFD
special 0xFE
waitspecial
lock
faceplayer
return


#org 0x81A59FE
= Hello, there! Do you happen to\nhave a \v\h02?\pWould you agree to a trade for\nmy \v\h03?

#org 0x81A5A9D
= Thanks!

#org 0x81A5AA5
= The \v\h03 that I traded you,\nhas it grown stronger?

#org 0x81A5A4E
= Well, if you don't want to[.]

#org 0x81A5A6A
= Hmmm?\nThis isn't a \v\h02.\pThink of me if you get one.

So for me this is a bust. I break it down into what I want to happen. Remove 2 pokemon and add one. It is at this point I discover ASM. I understand ASM less than I do greek and I understand ASM tutorials less than I do ASM. But I happen upon this thread pokecommunity.com/showthread.php?t=167889 and figure I can use it but again I am stuck I have no idea how to make sure that the player is choosing the correct pokemon to trade (I replaced rattata and raticate). So of two options it comes down to me not understanding the code... If anyone can offer ANY help I would GREATLY appreciate it. THANKS IN ADVANCED! And I'm sorry if this is not within the scope of this thread, as I said the moderator would not let me make my own thread.
If I'm right, then there's a command called checkpokemon. You could first check or the 2 Pokemon are in the party, then use HackMews script do take them away, and then use addpokemon to give the player a new Pokemon.
__________________

VDex:
White:
  #5041    
Old January 4th, 2011, 12:37 PM
Metroid Die
Beginning Trainer
 
Join Date: Mar 2009
Quote:
Originally Posted by metapod23 View Post
In the Header, where you've set up your level script, you placed 4001 as the Flag and 0000 as the Value?




Which "var number" are you using for this script? If it's, say, 4002, an easier way would probably be to just use variables than flags. Whatever script you're using to set flag 0x1010, try changing it to setvar 0x4002 0x1 (in place of setflag 0x1010).

Then just have the script you want for blocking the player to be var number 4002 and var value 0000. (You can have the variable be whatever you want though - 4002 is just an example).

Then you can just remove the:

Code:
checkflag 0x1010
if 0x1 goto 0x88145A8
part from the script altogether.


Thanks for the help. As for the first problem, the flag is set to 4001 and value at 0000 in the header. It's a 02 script type, I don't know if that might be the problem...?
  #5042    
Old January 4th, 2011, 01:29 PM
metapod23's Avatar
metapod23
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Quote:
Originally Posted by Metroid Die View Post
Thanks for the help. As for the first problem, the flag is set to 4001 and value at 0000 in the header. It's a 02 script type, I don't know if that might be the problem...?
You haven't used variable 4001 in the game before, right?
Try a different variable in the script, and make it's the same as the flag in the Header.
Maybe even try moving the setvar command to the top of the script, to make sure it gets set as soon as the script starts.
__________________
  #5043    
Old January 4th, 2011, 03:37 PM
Metroid Die
Beginning Trainer
 
Join Date: Mar 2009
Quote:
Originally Posted by metapod23 View Post
You haven't used variable 4001 in the game before, right?
Try a different variable in the script, and make it's the same as the flag in the Header.
Maybe even try moving the setvar command to the top of the script, to make sure it gets set as soon as the script starts.
Alright, finally got it to work, I think it had to do with an in-use var.

Thanks alot for all the help.
  #5044    
Old January 4th, 2011, 08:07 PM
destinedjagold's Avatar
destinedjagold
Oh Hai Thar~ 'ω'
Community Supporter
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Quote:
Originally Posted by avolonsaber View Post
Thank you very much! I fiddled around and got it, after much trial and error. I even added a fanfare and fadescreen. Lol. Is it possible to combine any scripts though. I need to make a script where someone would give you a Pokemon, then walk out of the room. I can make the Give Pokemon script fine, and the Apply Movement one, but I don't know how to put them together. Would it be kind of like what you showed me? Ugh, more trial and error.
yah, you can make a script with all commands, except for the warp command.
the warp command always ends the script, even though your script still has other commands following the warp...

anyway...

Code:
#dynamic 0x800000

#org @start
lock
faceplayer
message @1 6
givepokemon 0x16 0x5 0x0 0x0 0x0 0x0
message @2 6
applymovement 0x2 @m1
waitmovement 0x2
setflag 0x1001
release
end

#org @1
= You! This POKéMON!\nTake it, now!

#org @2
= Take care of it!\nGoodbye!

#org @m1
#raw 0x05 0x05 0x05 0x54 0xFE
I don't have the movement list, but you get the idea. You can combine any commands, except for the warp command, in one script.
There are tutorials on how to properly use the applymovement command, though.
__________________
  #5045    
Old January 5th, 2011, 08:49 AM
avolonsaber
 
Join Date: Oct 2010
Quote:
Originally Posted by destinedjagold View Post


I don't have the movement list, but you get the idea. You can combine any commands, except for the warp command, in one script.
There are tutorials on how to properly use the applymovement command, though.
I used your script as a base then tried adding things so it would do what I needed it to do, but its a fail. Lol. The Player is supposed to talk to a person in his house, that person is supposed to give him the running shoes, a Pokemon(activate the Pokemon menu along with it), walk over to the Player's Mom and make a face at her, then leave the house. All the walking and the face looks fine, but I can't get the person to leave the house, he just turns invisible on the space in-front of the door. Also the menu account gets all pixelated and see through. Since I can't request a script can you or someone tell me what's wrong with this one?
Spoiler:
#dynamic 0x456734

#org @start
lock
faceplayer
message @1 6
setflag 0x828
setflag 0x82F
givepokemon 0x04 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
message @2 6
applymovement 0x2 @move
waitmovement 0x0
setflag 0x1200
release
end

#org @1
= You! This POKéMON!\nTake it, now!

#org @2
= Take care of it!\nGoodbye!

#org @move
#raw 0xC
#raw 0xC
#raw 0xF
#raw 0xF
#raw 0xF
#raw 0xD
#raw 0x19
#raw 0x66
#raw 0xC
#raw 0xC
#raw 0xE
#raw 0xE
#raw 0xE
#raw 0xE
#raw 0xC
#raw 0x60
#raw 0xFE

I don't know if it'll help anyone help me fix the problem but when the person is talked to he's supposed to give you the stuff, then walk down two, over three, up one, pause, face, down two, 4 left, down one and then either out of the building or just disappear completely(as in not being able to be seen or bumped into).

Gah, I feel like such a noob. Lol.
  #5046    
Old January 5th, 2011, 11:58 AM
Hi-Techneon's Avatar
Hi-Techneon
Trainer
 
Join Date: Dec 2010
Location: Belgium
Age: 16
Gender: Male
Nature: Rash
I've a problem. I tried to make a script similair to the script where Mr. Briney and the player enter the boat, both disappear, and then the boat moves. However, upon making the player disappear, I suddenly gain control of an NPC, which is the sailor that disappeared too which suddenly reappears. The tilesets glitch up too. Here's the script, and if you want, then I can upload a video showing the effect. By the way, this is for PKSV, but 'disappear' has the same effect as 'hidesprite' if I'm right.
Spoiler:
#org 0x8701125
'-----------------------------------
msgbox 0x816D2CB ' Wild POK\eMON will j...
callstd MSG_FACEPLAYER ' Builtin lock/faceplayer
spriteface 0x3 DOWN
applymovement 0x5 0x8702030 ' walk_down_slow end
pauseevent 0x0
applymovement 0x5 0x8702030 ' walk_down_slow end
pauseevent 0x0
applymovement PLAYER 0x8703000 ' walk_left_slow walk_...
pauseevent 0x0
disappear 0x5
disappear 0xFF
end

#org 0x816D2CB
= Wild POK\eMON will jump out at you in\ntall grass.\pIf you want to catch POK\eMON, you have\nto go into the tall grass and search.
#org 0x8702030
M walk_down_slow end
#org 0x8703000
M walk_left_slow walk_down_slow walk_down_slow end


Any help would be appreciated. And I'm still not done, after disappear 0xFF which makes the player disappears is coming an applymovement for the sailer, the player and the boat.
__________________

VDex:
White:
  #5047    
Old January 5th, 2011, 02:17 PM
DrFuji's Avatar
DrFuji
Helfen, Wehren, Heilen
 
Join Date: Sep 2009
Location: Upside-downia
Age: 21
Gender: Male
Nature: Jolly
Quote:
Originally Posted by avolonsaber View Post
I used your script as a base then tried adding things so it would do what I needed it to do, but its a fail. Lol. The Player is supposed to talk to a person in his house, that person is supposed to give him the running shoes, a Pokemon(activate the Pokemon menu along with it), walk over to the Player's Mom and make a ^_^ face at her, then leave the house. All the walking and the face looks fine, but I can't get the person to leave the house, he just turns invisible on the space in-front of the door. Also the menu account gets all pixelated and see through. Since I can't request a script can you or someone tell me what's wrong with this one?
Spoiler:
#dynamic 0x456734

#org @start
lock
faceplayer
message @1 6
setflag 0x828
setflag 0x82F
givepokemon 0x04 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
message @2 6
applymovement 0x2 @move
waitmovement 0x0
setflag 0x1200
release
end

#org @1
= You! This POKéMON!\nTake it, now!

#org @2
= Take care of it!\nGoodbye!

#org @move
#raw 0xC
#raw 0xC
#raw 0xF
#raw 0xF
#raw 0xF
#raw 0xD
#raw 0x19
#raw 0x66
#raw 0xC
#raw 0xC
#raw 0xE
#raw 0xE
#raw 0xE
#raw 0xE
#raw 0xC
#raw 0x60
#raw 0xFE

I don't know if it'll help anyone help me fix the problem but when the person is talked to he's supposed to give you the stuff, then walk down two, over three, up one, pause, ^_^ face, down two, 4 left, down one and then either out of the building or just disappear completely(as in not being able to be seen or bumped into).

Gah, I feel like such a noob. Lol.
You need to hide the NPC you are trying to remove once they have finished their movements. Use the command 'hidesprite' which is constructed in this way:
Code:
hidesprite [Person's HEX number]
As for the pixilated menu, I believe you have overwritten some free space that was actually being used. Have a look at this post to restore it, but keep in mind that you will have to redo the thing that you inserted at that spot.

Quote:
Originally Posted by Hi-Techneon View Post
I've a problem. I tried to make a script similair to the script where Mr. Briney and the player enter the boat, both disappear, and then the boat moves. However, upon making the player disappear, I suddenly gain control of an NPC, which is the sailor that disappeared too which suddenly reappears. The tilesets glitch up too. Here's the script, and if you want, then I can upload a video showing the effect. By the way, this is for PKSV, but 'disappear' has the same effect as 'hidesprite' if I'm right.
Spoiler:
#org 0x8701125
'-----------------------------------
msgbox 0x816D2CB ' Wild POK\eMON will j...
callstd MSG_FACEPLAYER ' Builtin lock/faceplayer
spriteface 0x3 DOWN
applymovement 0x5 0x8702030 ' walk_down_slow end
pauseevent 0x0
applymovement 0x5 0x8702030 ' walk_down_slow end
pauseevent 0x0
applymovement PLAYER 0x8703000 ' walk_left_slow walk_...
pauseevent 0x0
disappear 0x5
disappear 0xFF
end

#org 0x816D2CB
= Wild POK\eMON will jump out at you in\ntall grass.\pIf you want to catch POK\eMON, you have\nto go into the tall grass and search.
#org 0x8702030
M walk_down_slow end
#org 0x8703000
M walk_left_slow walk_down_slow walk_down_slow end


Any help would be appreciated. And I'm still not done, after disappear 0xFF which makes the player disappears is coming an applymovement for the sailer, the player and the boat.
You shouldn't be disappearing the player :<

You could split the script into two pieces - Keep the this part the same, but instead of disappearing the player you warp them to the same place you were going to arrive. Make a level script for when the boat has docked, you have arrived and continue the script on from there. This would make it similar to the script when you're moving between the Sevii Isles.
__________________
  #5048    
Old January 5th, 2011, 02:20 PM
colcolstyles's Avatar
colcolstyles
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Quote:
Originally Posted by Hi-Techneon View Post
I've a problem. I tried to make a script similair to the script where Mr. Briney and the player enter the boat, both disappear, and then the boat moves. However, upon making the player disappear, I suddenly gain control of an NPC, which is the sailor that disappeared too which suddenly reappears. The tilesets glitch up too. Here's the script, and if you want, then I can upload a video showing the effect. By the way, this is for PKSV, but 'disappear' has the same effect as 'hidesprite' if I'm right.
Spoiler:
#org 0x8701125
'-----------------------------------
msgbox 0x816D2CB ' Wild POK\eMON will j...
callstd MSG_FACEPLAYER ' Builtin lock/faceplayer
spriteface 0x3 DOWN
applymovement 0x5 0x8702030 ' walk_down_slow end
pauseevent 0x0
applymovement 0x5 0x8702030 ' walk_down_slow end
pauseevent 0x0
applymovement PLAYER 0x8703000 ' walk_left_slow walk_...
pauseevent 0x0
disappear 0x5
disappear 0xFF
end

#org 0x816D2CB
= Wild POK\eMON will jump out at you in\ntall grass.\pIf you want to catch POK\eMON, you have\nto go into the tall grass and search.
#org 0x8702030
M walk_down_slow end
#org 0x8703000
M walk_left_slow walk_down_slow walk_down_slow end


Any help would be appreciated. And I'm still not done, after disappear 0xFF which makes the player disappears is coming an applymovement for the sailer, the player and the boat.
If you're trying to mimic the Mr. Briney script, then you probably should have taken a look at that script. They (the programmers) used the 'spriteinvisible' command to hide the player. I recommend that you use it as well.
__________________

Brother of Vrai
  #5049    
Old January 5th, 2011, 02:24 PM
destinedjagold's Avatar
destinedjagold
Oh Hai Thar~ 'ω'
Community Supporter
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Quote:
Originally Posted by avolonsaber View Post
I used your script as a base then tried adding things so it would do what I needed it to do, but its a fail. Lol. The Player is supposed to talk to a person in his house, that person is supposed to give him the running shoes, a Pokemon(activate the Pokemon menu along with it), walk over to the Player's Mom and make a face at her, then leave the house. All the walking and the face looks fine, but I can't get the person to leave the house, he just turns invisible on the space in-front of the door. Also the menu account gets all pixelated and see through. Since I can't request a script can you or someone tell me what's wrong with this one?
Spoiler:
#dynamic 0x456734

#org @start
lock
faceplayer
message @1 6
setflag 0x828
setflag 0x82F
givepokemon 0x04 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
message @2 6
applymovement 0x2 @move
waitmovement 0x0
setflag 0x1200
release
end

#org @1
= You! This POKéMON!\nTake it, now!

#org @2
= Take care of it!\nGoodbye!

#org @move
#raw 0xC
#raw 0xC
#raw 0xF
#raw 0xF
#raw 0xF
#raw 0xD
#raw 0x19
#raw 0x66
#raw 0xC
#raw 0xC
#raw 0xE
#raw 0xE
#raw 0xE
#raw 0xE
#raw 0xC
#raw 0x60
#raw 0xFE

I don't know if it'll help anyone help me fix the problem but when the person is talked to he's supposed to give you the stuff, then walk down two, over three, up one, pause, face, down two, 4 left, down one and then either out of the building or just disappear completely(as in not being able to be seen or bumped into).

Gah, I feel like such a noob. Lol.
you really can't make an NPC leave a map. in scripting, you're only supposed to make it seem like the NPC leaves a map.
by the way, with your script, you should put the flag 1200 on the NPC's Person ID to make it disappear forever(not unless you clear the flag 1200) after the script is over...
Spoiler:
__________________
  #5050    
Old January 5th, 2011, 03:09 PM
elhound's Avatar
elhound
Beginning Trainer
 
Join Date: Sep 2010
Gender: Male
Nature: Adamant
I've got a problem, I'm also still very new to scripting but I know the basics I think.

I've been trying to make a simple rival battle script for the last couple hours, winging it along the way, and taking my best guess at it. After following a few tutorials and youtube videos I had a script that somewhat worked.

It would have the rival walk over and talk and everything, go into the battle, but then after the battle it would go back to the map and you couldn't move or talk and it pretty much froze. I was using trainerbattle 0x0 then.

So I tried switching to trainerbattle 0x3 and now it won't work at all.

I just wan't to know what I did wrong, how I could fix it, and how to avoid this issue in the future.

Thank you

Here is the code I was left with at the end:

Spoiler:
#dynamic 0x804B00

#org @start
clearflag 0x1215
showsprite 0xA
applymovement 0xA @move1
waitmovement 0xA
msgbox @talk1 0x6
trainerbattle 0x03 0x14B 0x0 @win
msgbox @talk2 0x6
applymovement 0xA @move2
waitmovement 0xA
hidesprite 0xA
setflag 0x1215
setvar 0x6000 0x0001
end

#org @move1
#raw 0x62
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x3
#raw 0xFE

#org @move2
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0xFE

#org @talk1
= [rival]: = Hey [player]!\nLet's have a battle!

#org @win
= Aww, I lost...

#org @talk2
= [rival]: = You got lucky punk,\nnext time it won't be\lso easy.
Closed Thread
Quick Reply

Sponsored Links


Advertise here
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 05:14 AM.


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.