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
  #4876    
Old November 2nd, 2010, 06:12 PM
Tannecho51's Avatar
Tannecho51
Pokemon Lion's Eye
 
Join Date: Oct 2010
Location: Illinois
Gender: Male
Nature: Hardy
Hello, I'm new here. Generally, I just can't get applymovements to work. This is a script I've been trying again and again to get to work, but to no avail. Instead of the normal approach to giving starters, it's just a series of yes/no questions. I'm just a newb and I know I've done something horribly wrong in this script and that my problem has probably been answered in one of the 196 pages that I'm too lazy to read, but please bear with me.
Game: Ruby
Type: Starter Script
Editor: XSE
Script:
Spoiler:
msgbox @treecko 0x5

#org @move1
#raw 0x30
#raw 0x30
#raw 0x18
#raw 0x08
#raw 0xFE

#org @move2
#raw 0x09
#raw 0x2F
#raw 0x2F
#raw 0x17
#raw 0xFE

#org @intro
=text omitted

#org @treecko
showpokepic 0x115 0xA 0x3
msgbox @treeckom 0x5
compare LASTRESULT 0x1
if 0x1 goto @treeckoget
goto @torchic

#org @treeckoget
givepokemon 0x115 0x5 0x0 0x0 0x0 0x0
setflag 0x1201
goto @name
release
end

#org @treeckom
=text omitted

#org @torchic
showpokepic 0x118 0xA 0x3
msgbox @torchicm 0x5
compare LASTRESULT 0x1
if 0x1 goto @torchicget
goto @mudkip

#org @torchicget
givepokemon 0x118 0x5 0x0 0x0 0x0 0x0
setflag 0x1203
goto @name

#org @torchicm
=text omitted
#org @mudkip
showpokepic 0x11B 0xA 0x3
msgbox @mudkipm 0x6
givepokemon 0x11B 0x5 0x0 0x0 0x0 0x0
setflag 0x1203
goto @name

#org @mudkipm
= text omitted
#org @name
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 call @naming
msgbox @2 0x6
applymovement 0x9 @move2
release
end

#org @naming
special 0x166
waitstate
return

#org @1
= text omitted

#org @2
= text omitted

#org @done
release
end


It's a long script. Instead of posting a screenshot or video of what it does, I'll just tell you what it does: nothing. Even when I put 300 and 4050 for an applymovement, it still doesn't work. And I do have a dynamic offset, but I took it out to save space. Again, please bear with me, I'm just a newb. =D
  #4877    
Old November 3rd, 2010, 08:29 AM
Jm20's Avatar
Jm20
A.k.a. Zig :-)
 
Join Date: Sep 2009
Location: The Netherlands
Age: 21
Gender: Male
Quote:
Originally Posted by Tannecho51 View Post
Hello, I'm new here. Generally, I just can't get applymovements to work. This is a script I've been trying again and again to get to work, but to no avail. Instead of the normal approach to giving starters, it's just a series of yes/no questions. I'm just a newb and I know I've done something horribly wrong in this script and that my problem has probably been answered in one of the 196 pages that I'm too lazy to read, but please bear with me.
Game: Ruby
Type: Starter Script
Editor: XSE
Script:
Spoiler:
msgbox @treecko 0x5

#org @move1
#raw 0x30
#raw 0x30
#raw 0x18
#raw 0x08
#raw 0xFE

#org @move2
#raw 0x09
#raw 0x2F
#raw 0x2F
#raw 0x17
#raw 0xFE

#org @intro
=text omitted

#org @treecko
showpokepic 0x115 0xA 0x3
msgbox @treeckom 0x5
compare LASTRESULT 0x1
if 0x1 goto @treeckoget
goto @torchic

#org @treeckoget
givepokemon 0x115 0x5 0x0 0x0 0x0 0x0
setflag 0x1201
goto @name
release
end

#org @treeckom
=text omitted

#org @torchic
showpokepic 0x118 0xA 0x3
msgbox @torchicm 0x5
compare LASTRESULT 0x1
if 0x1 goto @torchicget
goto @mudkip

#org @torchicget
givepokemon 0x118 0x5 0x0 0x0 0x0 0x0
setflag 0x1203
goto @name

#org @torchicm
=text omitted
#org @mudkip
showpokepic 0x11B 0xA 0x3
msgbox @mudkipm 0x6
givepokemon 0x11B 0x5 0x0 0x0 0x0 0x0
setflag 0x1203
goto @name

#org @mudkipm
= text omitted
#org @name
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 call @naming
msgbox @2 0x6
applymovement 0x9 @move2
release
end

#org @naming
special 0x166
waitstate
return

#org @1
= text omitted

#org @2
= text omitted

#org @done
release
end


It's a long script. Instead of posting a screenshot or video of what it does, I'll just tell you what it does: nothing. Even when I put 300 and 4050 for an applymovement, it still doesn't work. And I do have a dynamic offset, but I took it out to save space. Again, please bear with me, I'm just a newb. =D
It's very simple: after every applymovement command you should insert "waitmovement 0x0". It will work then. (The movements I mean, I don't know about the rest of the script.)

My problem: XSE gives "error 13: 'Type Mismatch' at line 37. No dynamic label.'" while debugging this script:
Spoiler:
Code:
#dynamic 0x16BA7C

#org @start
lockall
applymovement 0xFF @moveplayer1
waitmovement 0x0
pause 0x30
special 0x113
applymovement 0x7F @movecam1
waitmovement 0x0
applymovement 0x2 @moves1
waitmovement 0x0
msgbox @talk1 0x6
applymovement 0x1 @moveunknown1
waitmovement 0x0
msgbox @talk2 0x6
msgbox @talk2a 0x6
msgbox @talk2b 0x6
applymovement 0xFF @moveplayer2
applymovement 0x1 @moveunknown2
applymovement 0x2 @moves2
waitmovement 0x0
msgbox @talk3 0x6
applymovement 0x1 @moveunknown3
waitmovement 0x0
msgbox @talk4 0x6
applymovement 0x1 @moveunknown4
waitmovement 0x0
msgbox @talk5 0x6
applymovement 0x1 @moveunknown5
waitmovement 0x0
trainerbattle 0x1 0x001 0x0 @before @after @later
end

#org @later
msgbox @talk6 0x6
applymovement 0x1 @moveunknown6 (line 37)
applymovement 0x2 @moves3
waitmovement 0x0
applymovement 0xFF @moveplayer3
applymovement 0x2 @moves4
waitmovement 0x0
msgbox @talk7 0x6
applymovement 0x2 @movepeople
applymovement 0xFF @movepeople
waitmovement 0x0
special 0x0
setflag 0x1011
special 0x114
releaseall
warp 0x4 0x3 0xFF 0x08 0x0C
end

#org @movecam1
#raw 0x11
#raw 0x11
#raw 0xFE

#org @moveplayer1
#raw 0x62
#raw 0xFE

#org @moveplayer2
#raw 0x11
#raw 0x11
#raw 0xFE

#org @moves1
#raw 0x27
#raw 0x27
#raw 0xFE

#org @moves2
#raw 0x4
#raw 0xFE

#org @moveunknown1
#raw 0x24
#raw 0xFE

#org @moveunknown2
#raw 0x4
#raw 0x62
#raw 0xFE

#org @moveunknown3
#raw 0x7
#raw 0xFE

#org @moveunknown4
#raw 0x4
#raw 0x62
#raw 0xFE

#org @moveunknown5
#raw 0x10
#raw 0xFE

#org @talk1
= 

#org @talk2
= 

#org @talk2a
= 

#org @talk2b
= 

#org @talk3
= 

#org @talk4
= 

#org @talk5
= 

#org @before
= 

#org @after
= 

#org @talk6
=

(You understand that I deleted the text only for this post.)
Line 37 is bold. I don't quite understand why it is giving an error. Oh, and if someone could, please take a look at the trainerbattle command. It's at the bottom of the first part. Thanks in advance!
  #4878    
Old November 3rd, 2010, 08:41 AM
Ooka's Avatar
Ooka
<3
Community Supporter
 
Join Date: Aug 2007
Location: Challenging The E4
Age: 21
Gender: Male
Nature: Relaxed
Send a message via Skype™ to Ooka
@Tannecho51

As jm said, use waitmovement 0x0 after all of your applymovements. Also, make sure to set the sprite in advancemap to 4050 (var number) and 0300 (Top Unknown)


@jm - Simple mistake, you don't have moveunknown6 defined in the bottom of the script.
  #4879    
Old November 3rd, 2010, 11:32 AM
Jm20's Avatar
Jm20
A.k.a. Zig :-)
 
Join Date: Sep 2009
Location: The Netherlands
Age: 21
Gender: Male
Quote:
Originally Posted by Ooka View Post
@Tannecho51

@jm - Simple mistake, you don't have moveunknown6 defined in the bottom of the script.
Wow, common sense is most important after all :D And I see that some other movements aren't deifned either. Thanks a lot!
  #4880    
Old November 3rd, 2010, 02:11 PM
Tannecho51's Avatar
Tannecho51
Pokemon Lion's Eye
 
Join Date: Oct 2010
Location: Illinois
Gender: Male
Nature: Hardy
Quote:
Originally Posted by Jm20 View Post
It's very simple: after every applymovement command you should insert "waitmovement 0x0". It will work then. (The movements I mean, I don't know about the rest of the script.)
I know that, for some reason not all of the script made it to the quote box. Here's the part of the script that got cut off:
Spoiler:

#dynamic 0x800000

#org @start
lock
checkflag 0x1201
if 0x1 goto @done
checkflag 0x1202
if 0x1 goto @done
checkflag 0x1203
if 0x1 goto @done
applymovement 0x9 @move1
waitmovement 0x0
msgbox @intro 0x6
goto @begin

#org @begin


Apparently I did something wrong with the beginning because it is just not working.
  #4881    
Old November 5th, 2010, 08:59 PM
MechaTrainer
Beginning Trainer
 
Join Date: Jun 2010
Gender: Male
Sorry if this question doesn't go here but what is the flag for the national dex in Emerald?
  #4882    
Old November 5th, 2010, 09:31 PM
Ooka's Avatar
Ooka
<3
Community Supporter
 
Join Date: Aug 2007
Location: Challenging The E4
Age: 21
Gender: Male
Nature: Relaxed
Send a message via Skype™ to Ooka
Quote:
special 0x1F3
Under the specials section here:
http://www.pokecommunity.com/showthread.php?t=164276
  #4883    
Old November 6th, 2010, 08:15 AM
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter Tier 2
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 22
Gender: Male
Nature: Modest
Quote:
Originally Posted by Tannecho51 View Post
I know that, for some reason not all of the script made it to the quote box. Here's the part of the script that got cut off:
Spoiler:

#dynamic 0x800000

#org @start
lock
checkflag 0x1201
if 0x1 goto @done
checkflag 0x1202
if 0x1 goto @done
checkflag 0x1203
if 0x1 goto @done
applymovement 0x9 @move1
waitmovement 0x0
msgbox @intro 0x6
goto @begin

#org @begin


Apparently I did something wrong with the beginning because it is just not working.
You need to make you set the Variable to 4050 and the Unknown value to 0003 (on the script tile), otherwise applymovement scripts don't work.
__________________
あなた は しきしゃ です
わたし は ばか です
  #4884    
Old November 6th, 2010, 09:45 AM
bobashnabala
Beginning Trainer
 
Join Date: Nov 2010
Gender: Male
I'm new to scripting and i tried to make this script. it is supposed to make it so that when you talk to a person he doesnt let you pass and then after you get birches bag he moves. the talking all works and i followed all the tutorials but the person im trying to make move doesnt move. could anyone please explain why it doesnt work or maybe fix it and show me how to do it? any help would be greatly apreciated thanks!


Here is the script-


'---------------
#org 0x6B12F4
checkflag 0x1000
if 0x0 call 0x8800071
msgbox 0x88000FA MSG_FACE '"You may pass."
applymovement 0x1234 0x80C3500
end

'---------------
#org 0x800071
msgbox 0x88000DF MSG_FACE '"I can't let you through."
end


'---------
' Strings
'---------
#org 0x8000FA
= You may pass.

#org 0x8000DF
= I can't let you through.


'-----------
' Movements
'-----------
#org 0xC3500
#raw 0x4 'Step Down (Slow)
#raw 0xFE 'End of Movements
  #4885    
Old November 6th, 2010, 09:56 AM
bobashnabala
Beginning Trainer
 
Join Date: Nov 2010
Gender: Male
I'm new to scripting and i tried to make this script. it is supposed to make it so that when you talk to a person he doesnt let you pass and then after you get birches bag he moves. the talking all works and i followed all the tutorials but the person im trying to make move doesnt move. could anyone please explain why it doesnt work or maybe fix it and show me how to do it? any help would be greatly apreciated thanks!


Here is the script-


'---------------
#org 0x6B12F4
checkflag 0x1000
if 0x0 call 0x8800071
msgbox 0x88000FA MSG_FACE '"You may pass."
applymovement 0x1234 0x80C3500
end

'---------------
#org 0x800071
msgbox 0x88000DF MSG_FACE '"I can't let you through."
end


'---------
' Strings
'---------
#org 0x8000FA
= You may pass.

#org 0x8000DF
= I can't let you through.


'-----------
' Movements
'-----------
#org 0xC3500
#raw 0x4 'Step Down (Slow)
#raw 0xFE 'End of Movements
  #4886    
Old November 6th, 2010, 12:39 PM
ASuch
Beginning Trainer
 
Join Date: May 2010
Gender: Male
I put in my script offset in the game, and I assigned it to a rocket grunt. When I went to test it out, my sprite for the guy wasn't there, not even an invisible person. Can someone please tell me what could've went wrong? Here's the script:

#org $rocketmajor
lock
faceplayer
checkflag 0x1209
if 0x01 goto $after
message $pie
$pie 1 = Do you want to know\lthe operation?
boxset 5
compare 0x800D 0x0001
if 0x01 goto $okay
$don't 1 = You already know?\nOkay then,\pGet to work!
boxset 6
release
end

#org $okay
message $okay1
$okay1 1 = Our Operation is to\n invade Viridian City,\lbut there's this\nlittle punk that's\l stopping us.\pHer name is May.
message $blabla
$blabla 1 = Do you want to know how\nto leave from the\lnorth and east?
boxset 5
compare 0x800D 0x0001
if 0x01 goto $yeah
$nah 1 = Get back to/nwork!
boxset 6
release
end

#org $yeah
message $yeah1
$yeah1 1 = For the north you'll/nneed a key from a/lme./pYou can't exit from the/neast.
boxset 6
release
end


#org $after
checkflag 0x1210
if 0x01 goto $woot
message $awesome
$awesome 1 = Good job soldier!\p For your service, I'll give you\n an item to show to\l the guard.
boxset 6
give item 0x106 0x01
message $sweet
$sweet 1 = Now get your pokemon ready for/nPewter City!
boxset 6
release
end

#org $woot
message $omg
$omg 1 = Now get your pokemon ready for/nPewter City!
boxset 6
release
end
  #4887    
Old November 6th, 2010, 02:14 PM
jota_rdk's Avatar
jota_rdk
Spanish hacker [Javi4315]
 
Join Date: Jul 2010
Location: Spain
Gender: Male
Nature: Timid
Quote:
Originally Posted by ASuch View Post
I put in my script offset in the game, and I assigned it to a rocket grunt. When I went to test it out, my sprite for the guy wasn't there, not even an invisible person. Can someone please tell me what could've went wrong? Here's the script:

#org $rocketmajor
lock
faceplayer
checkflag 0x1209
if 0x01 goto $after
message $pie
$pie 1 = Do you want to know\lthe operation?
boxset 5
compare 0x800D 0x0001
if 0x01 goto $okay
$don't 1 = You already know?\nOkay then,\pGet to work!
boxset 6
release
end

#org $okay
message $okay1
$okay1 1 = Our Operation is to\n invade Viridian City,\lbut there's this\nlittle punk that's\l stopping us.\pHer name is May.
message $blabla
$blabla 1 = Do you want to know how\nto leave from the\lnorth and east?
boxset 5
compare 0x800D 0x0001
if 0x01 goto $yeah
$nah 1 = Get back to/nwork!
boxset 6
release
end

#org $yeah
message $yeah1
$yeah1 1 = For the north you'll/nneed a key from a/lme./pYou can't exit from the/neast.
boxset 6
release
end


#org $after
checkflag 0x1210
if 0x01 goto $woot
message $awesome
$awesome 1 = Good job soldier!\p For your service, I'll give you\n an item to show to\l the guard.
boxset 6
give item 0x106 0x01
message $sweet
$sweet 1 = Now get your pokemon ready for/nPewter City!
boxset 6
release
end

#org $woot
message $omg
$omg 1 = Now get your pokemon ready for/nPewter City!
boxset 6
release
end
Have you put something in "People id" in advance map? I think that is the problem.
__________________
Pokémon Golden Legend // Pokémon Silver Legend


My tutorials:

__________________
My english is very bad, I know. Sorry! xD
  #4888    
Old November 6th, 2010, 02:53 PM
DrFuji's Avatar
DrFuji
repeat repeat repeat
Community Supporter
 
Join Date: Sep 2009
Location: Upside-downia
Age: 21
Gender: Male
Nature: Jolly
Quote:
Originally Posted by bobashnabala
applymovement 0x1234 0x80C3500
I'd say that this line is your problem. Your Person Event Number (1234) is incredibly large and as such is unlikey to actually be used on the map. Have a look at the person you are trying to move in Advance Map and write down their real event number to be used in the script.

If you have changed their event number for some reason, you should have to remember that you have to write it down in HEX in XSE. So therefore the person you're trying to move doesn't have the event number '1234' assigned to them, but '4D2'.

Last edited by DrFuji; November 6th, 2010 at 03:25 PM.
  #4889    
Old November 6th, 2010, 03:18 PM
Jm20's Avatar
Jm20
A.k.a. Zig :-)
 
Join Date: Sep 2009
Location: The Netherlands
Age: 21
Gender: Male
Can someone explain me how the appear/disappear value (flag/variable) works with script-tile events. I'm using FR. Should I enter a variable or flag in the "Var number" box, just like People ID with person events? Because when I do that, the script won't appear at all. Besides, I've seen screenshots of people entering 4050 in that box. So, can someone just explain these things to me? Thanks in advance.
  #4890    
Old November 6th, 2010, 03:20 PM
ASuch
Beginning Trainer
 
Join Date: May 2010
Gender: Male
I sort of fixed it, but now its glitching up. Like when I first enter the town, there is a rocket where there shouldn't be one. I know I put in the correct offset, and when I re-enter the town, the rocket is where I put him, but he says something different then he's supposed to do. I really don't know why its screwing up so much....
  #4891    
Old November 6th, 2010, 04:18 PM
Ooka's Avatar
Ooka
<3
Community Supporter
 
Join Date: Aug 2007
Location: Challenging The E4
Age: 21
Gender: Male
Nature: Relaxed
Send a message via Skype™ to Ooka
Quote:
Originally Posted by ASuch View Post
I sort of fixed it, but now its glitching up. Like when I first enter the town, there is a rocket where there shouldn't be one. I know I put in the correct offset, and when I re-enter the town, the rocket is where I put him, but he says something different then he's supposed to do. I really don't know why its screwing up so much....
What program are you using to compile the script?
  #4892    
Old November 6th, 2010, 10:07 PM
masterquestmq's Avatar
masterquestmq
Enthusiastic Rom Hacker
 
Join Date: Nov 2010
Gender: Male
need some help with this
when i complie this script and try to test it all i get is the item.... what did i do wrong. and is the command for national dex rite in this script?

#dynamic 0x161600

#org @start
lock
faceplayer
checkflag 0x200
if 0x0 goto @give
if 0x1 goto @gl

#org @give
msgbox @talk1 0x6
givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
waitfanfare
giveitem 0x4 0x5 0x0
special 0x16F
fanfare 0x13E
waitfanfare
setflag 0x200
msgbox @yay 0x6
release
end

#org @gl
msgbox @talk2 0x6
end

#org @talk1
= Ah, finaly you are the fifth\ntrainer to leave Pallet Town\ltoday. Fortunately I have Pokemon\lleft. Take it it's yours! Here\lis a Pokedex and some Pokeballs to\lget you started!

#org @yay
= You got an Eevee, Pokedex and 5\nPokeballs!

#org @talk2
= Your journey awaits!
  #4893    
Old November 6th, 2010, 10:52 PM
Ooka's Avatar
Ooka
<3
Community Supporter
 
Join Date: Aug 2007
Location: Challenging The E4
Age: 21
Gender: Male
Nature: Relaxed
Send a message via Skype™ to Ooka
And the national dex and stuff worked too? o.o

Code:
#dynamic 0x161600

#org @start
lock
faceplayer
checkflag 0x200
if 0x0 goto @give
if 0x1 goto @gl

#org @give
msgbox @talk1 0x6
givepokemon 85 5 0 0 0 0
setflag 0x828
fanfare 0x13E
waitfanfare
giveitem 4 5 0
special 0x16F
setflag 0x829
fanfare 0x13E
waitfanfare
setflag 0x200
msgbox @yay 0x6
release
end

#org @gl
msgbox @talk2 0x6
end

#org @talk1
= Ah, finaly you are the fifth\ntrainer to leave Pallet Town\ltoday. Fortunately I have Pokemon\lleft. Take it it's yours! Here\lis a Pokedex and some Pokeballs to\lget you started!

#org @yay
= You got an Eevee, Pokedex and 5\nPokeballs!

#org @talk2
= Your journey awaits!
This script should work right for everything. Try it if you want.
  #4894    
Old November 6th, 2010, 11:45 PM
masterquestmq's Avatar
masterquestmq
Enthusiastic Rom Hacker
 
Join Date: Nov 2010
Gender: Male
Just started XSE so im gonna be here regularly

im tryin to make a script where the player will be blocked from leaving the town till he gets his 1st pokemon...
'i went through tutorials and i cant find a command to make the player turn back (unless its an apply movement script ?)

either way i tried making this script
and it didnt really work..
would appreciate some help
thanks


#dynamic 0x161B00

#org @start
lock
faceplayer
checkflag 0x200
if 0x0 goto @stop
if 0x1 goto @proceed

#org @stop
msgbox @talk1 0x6
release
end

#org @proceed
release
end

#org @talk1
= Must not leave without a Pokemon
  #4895    
Old November 6th, 2010, 11:55 PM
Ooka's Avatar
Ooka
<3
Community Supporter
 
Join Date: Aug 2007
Location: Challenging The E4
Age: 21
Gender: Male
Nature: Relaxed
Send a message via Skype™ to Ooka
That's a lot more difficult to explain. It does involve applymovement so your best bet is reading up on that subject. It involves moving a sprite up to your hero, the sprite talking, then the sprite leaving and you stepping down off the script event (So that when you walk on it again the same script activates unless you've met your condition [i.e. checkflag]).

Example script:

Code:
#dynamic 0x804828

#org @block
checkflag 0x860
if 0x1 goto @done
applymovement 0x01 @move
waitmovement 0x0
applymovement 0xFF @firstmove
waitmovement 0x0
msgbox @cant 0x6
applymovement 0x01 @secmove
waitmovement 0x0
applymovement 0xFF @playermove
waitmovement 0x0
release
end

#org @move
#raw 0x03
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x01
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @firstmove
#raw 0x00
#raw 0x12
#raw 0xFE

#org @cant
= Hey, you can't go up there. \nYou need a Pokemon first.

#org @secmove
#raw 0x02
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x00
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @playermove
#raw 0x00
#raw 0x08
#raw 0x12
#raw 0x12
#raw 0xFE

#org @done
release
end
  #4896    
Old November 7th, 2010, 04:35 AM
ASuch
Beginning Trainer
 
Join Date: May 2010
Gender: Male
I'm using Poketscript. Is there anything maybe wrong with the script I made?
  #4897    
Old November 7th, 2010, 05:01 PM
Tannecho51's Avatar
Tannecho51
Pokemon Lion's Eye
 
Join Date: Oct 2010
Location: Illinois
Gender: Male
Nature: Hardy
Well, it turns out the script wasn't actually compiled to the ROM I was testing in. Hehe, sorry for your trouble. I got it to work... sort of. This time the script actually does the first msgbox 0x6, but then kinda messes up.
The script again, just for reference:
Spoiler:

#org @start
lock
checkflag 0x1201
if 0x1 goto @done
checkflag 0x1202
if 0x1 goto @done
checkflag 0x1203
if 0x1 goto @done
applymovement 0x9 @move1
waitmovement 0x0
msgbox @intro 0x6
goto @begin

#org @begin
msgbox @treecko 0x5

#org @move1
#raw 0x30
#raw 0x30
#raw 0x18
#raw 0x08
#raw 0xFE

#org @move2
#raw 0x09
#raw 0x2F
#raw 0x2F
#raw 0x17
#raw 0xFE

#org @intro
=text omitted

#org @treecko
showpokepic 0x115 0xA 0x3
msgbox @treeckom 0x5
compare LASTRESULT 0x1
if 0x1 goto @treeckoget
goto @torchic

#org @treeckoget
givepokemon 0x115 0x5 0x0 0x0 0x0 0x0
setflag 0x1201
goto @name
release
end

#org @treeckom
=text omitted

#org @torchic
showpokepic 0x118 0xA 0x3
msgbox @torchicm 0x5
compare LASTRESULT 0x1
if 0x1 goto @torchicget
goto @mudkip

#org @torchicget
givepokemon 0x118 0x5 0x0 0x0 0x0 0x0
setflag 0x1203
goto @name

#org @torchicm
=text omitted
#org @mudkip
showpokepic 0x11B 0xA 0x3
msgbox @mudkipm 0x6
givepokemon 0x11B 0x5 0x0 0x0 0x0 0x0
setflag 0x1203
goto @name

#org @mudkipm
= text omitted
#org @name
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 call @naming
msgbox @2 0x6
applymovement 0x9 @move2
release
end

#org @naming
special 0x166
waitstate
return

#org @1
= text omitted

#org @2
= text omitted

#org @done
release
end


When I open the script in Advance Map:
Spoiler:

'---------------
#org 0x8004BE
lock
checkflag 0x1201
if 0x1 goto 0x8800892
checkflag 0x1202
if 0x1 goto 0x8800892
checkflag 0x1203
if 0x1 goto 0x8800892
applymovement 0x9 0x88004FB
waitmovement 0x0
msgbox 0x8800507 MSG_NORMAL '"text om..."
goto 0x88004F2

'---------------
#org 0x800892
release
end

'---------------
#org 0x8004F2
msgbox 0x88005D9 MSG_YESNO '"\h75ßÀ\h0AÂÔ ÙÉ\h80ËÌÈïÒ\h80À ÉÀ\h..."

'---------
' Strings
'---------
#org 0x800507
= text omitted

#org 0x8005D9
= \h75ßÀ\h0AÂÔ ÙÉ\h80ËÌÈïÒ\h80À ÉÀ\hF7È\h80ËÈ\h6BÉ\h80Ë


'-----------
' Movements
'-----------
#org 0x8004FB
#raw 0x30 'Slide Right
#raw 0x30 'Slide Right
#raw 0x18 'Slide Right
#raw 0x8 'Step Down (Normal)
#raw 0xFE 'End of Movements


Thanks.
  #4898    
Old November 7th, 2010, 06:13 PM
colcolstyles's Avatar
colcolstyles
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Quote:
Originally Posted by Tannecho51 View Post
Well, it turns out the script wasn't actually compiled to the ROM I was testing in. Hehe, sorry for your trouble. I got it to work... sort of. This time the script actually does the first msgbox 0x6, but then kinda messes up.
The script again, just for reference:
Spoiler:

#org @start
lock
checkflag 0x1201
if 0x1 goto @done
checkflag 0x1202
if 0x1 goto @done
checkflag 0x1203
if 0x1 goto @done
applymovement 0x9 @move1
waitmovement 0x0
msgbox @intro 0x6
goto @begin

#org @begin
msgbox @treecko 0x5

#org @move1
#raw 0x30
#raw 0x30
#raw 0x18
#raw 0x08
#raw 0xFE

#org @move2
#raw 0x09
#raw 0x2F
#raw 0x2F
#raw 0x17
#raw 0xFE

#org @intro
=text omitted

#org @treecko
showpokepic 0x115 0xA 0x3
msgbox @treeckom 0x5
compare LASTRESULT 0x1
if 0x1 goto @treeckoget
goto @torchic

#org @treeckoget
givepokemon 0x115 0x5 0x0 0x0 0x0 0x0
setflag 0x1201
goto @name
release
end

#org @treeckom
=text omitted

#org @torchic
showpokepic 0x118 0xA 0x3
msgbox @torchicm 0x5
compare LASTRESULT 0x1
if 0x1 goto @torchicget
goto @mudkip

#org @torchicget
givepokemon 0x118 0x5 0x0 0x0 0x0 0x0
setflag 0x1203
goto @name

#org @torchicm
=text omitted
#org @mudkip
showpokepic 0x11B 0xA 0x3
msgbox @mudkipm 0x6
givepokemon 0x11B 0x5 0x0 0x0 0x0 0x0
setflag 0x1203
goto @name

#org @mudkipm
= text omitted
#org @name
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 call @naming
msgbox @2 0x6
applymovement 0x9 @move2
release
end

#org @naming
special 0x166
waitstate
return

#org @1
= text omitted

#org @2
= text omitted

#org @done
release
end


When I open the script in Advance Map:
Spoiler:

'---------------
#org 0x8004BE
lock
checkflag 0x1201
if 0x1 goto 0x8800892
checkflag 0x1202
if 0x1 goto 0x8800892
checkflag 0x1203
if 0x1 goto 0x8800892
applymovement 0x9 0x88004FB
waitmovement 0x0
msgbox 0x8800507 MSG_NORMAL '"text om..."
goto 0x88004F2

'---------------
#org 0x800892
release
end

'---------------
#org 0x8004F2
msgbox 0x88005D9 MSG_YESNO '"\h75ßÀ\h0AÂÔ ÙÉ\h80ËÌÈïÒ\h80À ÉÀ\h..."

'---------
' Strings
'---------
#org 0x800507
= text omitted

#org 0x8005D9
= \h75ßÀ\h0AÂÔ ÙÉ\h80ËÌÈïÒ\h80À ÉÀ\hF7È\h80ËÈ\h6BÉ\h80Ë


'-----------
' Movements
'-----------
#org 0x8004FB
#raw 0x30 'Slide Right
#raw 0x30 'Slide Right
#raw 0x18 'Slide Right
#raw 0x8 'Step Down (Normal)
#raw 0xFE 'End of Movements


Thanks.
Try replacing "goto @begin" with "goto @treecko" and deleting the whole "#org @begin" segment.
__________________

Brother of Vrai
  #4899    
Old November 8th, 2010, 11:59 AM
ASuch
Beginning Trainer
 
Join Date: May 2010
Gender: Male
Can someone please look at the script I made to see if it has any errors? After I put the script in the game the script started screwing up, like with a yes or no question. If you click yes for the first yes or no in the script, it goes to the next yes or no question that it would ask, and if you click no it repeats the line with the yes or no just without it saying yes or no, then it ends fine. I compiled it using Poketscript and its for FireRed. Its supposed to be for a Rocket general that tells you what to do and info about the attack on Viridian. Once you defeat May he gives you an item that allows you to leave Viridian City and then he just says get ready for Pewter. This is my script:

Spoiler:
#org $rocketmajor
lock
faceplayer
checkflag 0x1209
if 0x01 goto $after
message $pie
$pie 1 = Do you want to know\lthe operation?
boxset 5
compare 0x800D 0x0001
if 0x01 goto $okay
$don't 1 = You already know?\nOkay then,\pGet to work!
boxset 6
release
end

#org $okay
message $okay1
$okay1 1 = Our Operation is to\n invade Viridian City,\lbut there's this\nlittle punk that's\l stopping us.\pHer name is May.
message $blabla
$blabla 1 = Do you want to know how\nto leave from the\lnorth and east?
boxset 5
compare 0x800D 0x0001
if 0x01 goto $yeah
$nah 1 = Get back to/nwork!
boxset 6
release
end

#org $yeah
message $yeah1
$yeah1 1 = For the north you'll/nneed a key from a/lme./pYou can't exit from the/neast.
boxset 6
release
end


#org $after
checkflag 0x1210
if 0x01 goto $woot
message $awesome
$awesome 1 = Good job soldier!\p For your service, I'll give you\n an item to show to\l the guard.
boxset 6
give item 0x106 0x01
message $sweet
$sweet 1 = Now get your pokemon ready for/nPewter City!
boxset 6
release
end

#org $woot
message $omg
$omg 1 = Now get your pokemon ready for/nPewter City!
boxset 6
release
end
  #4900    
Old November 8th, 2010, 04:46 PM
colcolstyles's Avatar
colcolstyles
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Quote:
Originally Posted by ASuch View Post
Can someone please look at the script I made to see if it has any errors? After I put the script in the game the script started screwing up, like with a yes or no question. If you click yes for the first yes or no in the script, it goes to the next yes or no question that it would ask, and if you click no it repeats the line with the yes or no just without it saying yes or no, then it ends fine. I compiled it using Poketscript and its for FireRed. Its supposed to be for a Rocket general that tells you what to do and info about the attack on Viridian. Once you defeat May he gives you an item that allows you to leave Viridian City and then he just says get ready for Pewter. This is my script:

Spoiler:
#org $rocketmajor
lock
faceplayer
checkflag 0x1209
if 0x01 goto $after
message $pie
$pie 1 = Do you want to know\lthe operation?
boxset 5
compare 0x800D 0x0001
if 0x01 goto $okay
$don't 1 = You already know?\nOkay then,\pGet to work!
boxset 6
release
end

#org $okay
message $okay1
$okay1 1 = Our Operation is to\n invade Viridian City,\lbut there's this\nlittle punk that's\l stopping us.\pHer name is May.
message $blabla
$blabla 1 = Do you want to know how\nto leave from the\lnorth and east?
boxset 5
compare 0x800D 0x0001
if 0x01 goto $yeah
$nah 1 = Get back to/nwork!
boxset 6
release
end

#org $yeah
message $yeah1
$yeah1 1 = For the north you'll/nneed a key from a/lme./pYou can't exit from the/neast.
boxset 6
release
end


#org $after
checkflag 0x1210
if 0x01 goto $woot
message $awesome
$awesome 1 = Good job soldier!\p For your service, I'll give you\n an item to show to\l the guard.
boxset 6
give item 0x106 0x01
message $sweet
$sweet 1 = Now get your pokemon ready for/nPewter City!
boxset 6
release
end

#org $woot
message $omg
$omg 1 = Now get your pokemon ready for/nPewter City!
boxset 6
release
end
I remember that I had a lot of trouble getting PokeScript to work when I was just starting out. Actually, I remember experiencing difficulties with Yes/No textboxes specifically. My advice would be to switch to either XSE or PKSV. PokeScript is pretty much obsolete these days. I'm not quite sure why people still use it.
__________________

Brother of Vrai

Last edited by colcolstyles; November 9th, 2010 at 04:13 PM.
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 01:19 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.