Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Reload this Page [Tutorial] diegoisawesome's MEGA-HUGE XSE Scripting Tutorial

Notices
For all updates, view the main page.

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.



Reply
 
Thread Tools
  #726    
Old March 6th, 2012 (10:21 AM).
Echidna's Avatar
Echidna Echidna is offline
Platinum Tier
 
Join Date: Aug 2010
Location: Vaniville Town
Age: 20
Gender: Male
Nature: Brave
Posts: 1,958
Quote originally posted by Ninjutsu95:
Okay so I decided to add 3 people on my map. And i made the free space for each about 250 bytes. And I typed this

'---------------
#org 0xE3E604
lock
faceplayer
msgbox 0x8E3E611 MSG_NORMAL '"Hello!\nMy name is Alder."
release
end

'---------
' Strings
'---------
#org 0xE3E611
= Hello!\nMy name is Alder.


and when i compiled it by pressing the complile button on XSE 1.1.1 i loaded it up again to see if the changes saved it did. So i loaded up VBA and went to talk to the first person and it worked. And then on the second person i talked to and the screen froze and turned red. And when i looked at the coding for the person, it changed to different things. The first person's code showed this after compiling

'---------------
#org 0x3EA000
bufferboxname 0xE3 0xDBE2
nop
cmdd5 0xE3DB
nop


which doesn't make any sense to me

and the second person's code sais this

'---------------
#org 0xE3E274
callstd 0x6
cmd24 0x11061106

which also doesn't make any sense.
But the third person's code compiled correctly.

And now when i still try to talk to the first person, he doesn't even respond whether to look at me or to just freeze my game like a jerk. Whats wrong. Am i doing something?
250 bytes should be enough for that... 0.o
The only reasonable explanation is that your second and third scripts are getting overwritten by either the compilation or activation of the first. But seeing as how 250 bytes should be enough, try using a custom format rather than copying a default script:
This:
Quote:
'---------------
#org 0xE3E604
lock
faceplayer
msgbox 0x8E3E611 MSG_NORMAL '"Hello!\nMy name is Alder."
release
end

'---------
' Strings
'---------
#org 0xE3E611
= Hello!\nMy name is Alder.
Would be better like this:
Quote:
#dynamic 0x<FSF Offset>

#org @start
lock
faceplayer
msgbox @text1 0x6
release
end

#org @text1
= Hello!\nMy name is Alder.
Try that, with a new offset...
__________________






Reply With Quote
  #727    
Old March 7th, 2012 (09:03 AM).
Ninjutsu95's Avatar
Ninjutsu95 Ninjutsu95 is offline
Bad decisions = Good stories
 
Join Date: Apr 2011
Location: Georgia, USA
Age: 19
Gender: Male
Nature: Modest
Posts: 44
OH MY GOD! IT WORKS! IT WOOOOORKSSS!!!!! I love you! thanks lol now i feel stupid.
__________________
Thought provoking quotes:
_________________________________________
- Even a clock that does not work is right twice a day.
_________________________________________
- The moment a little boy is concerned with which is a jay and which is a sparrow, he can no longer see the birds or hear them sing.
_________________________________________
- Do nothing which is of no use.
_________________________________________
Reply With Quote
  #728    
Old March 22nd, 2012 (07:04 PM).
YouListeningROMs's Avatar
YouListeningROMs YouListeningROMs is offline
 
Join Date: Mar 2012
Gender: Male
Posts: 24
Okay, so I've got a pretty basic, quick question about the pokemart command. Does that automatically generate the "What would you like to do?" message that appears at every Poké Mart?
Reply With Quote
  #729    
Old March 24th, 2012 (10:55 AM).
LudicoloDude's Avatar
LudicoloDude LudicoloDude is offline
 
Join Date: Mar 2012
Location: Hoenn
Age: 17
Gender: Male
Nature: Jolly
Posts: 33
im trying the earthquake command, but i only hear sound and not the shaking. I have the set var before the special and everything. heres the script.

#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x198
if 0x1 goto @done
msgbox @10 0x6
setvar 0x8007 0xF
special 0x136
setflag 0x198
release
end
#org @done
lock
faceplayer
msgbox @11 0x6
release
end
#org @10
= Gee, i hope there is not\nan earthquake.
#org @11
= I hope that does not happen\nagain.
Reply With Quote
  #730    
Old March 24th, 2012 (03:26 PM).
DrFuji's Avatar
DrFuji DrFuji is offline
Helfen, Wehren, Heilen
Crystal Tier
 
Join Date: Sep 2009
Location: Downia-upside
Age: 22
Gender: Male
Nature: Jolly
Posts: 1,322
Quote originally posted by YouListeningROMs:
Okay, so I've got a pretty basic, quick question about the pokemart command. Does that automatically generate the "What would you like to do?" message that appears at every Poké Mart?
Unfortunately no. You can open up a Pokemart clerk's script from Advance Map and see what you may or may not need to add.

Quote originally posted by LudicoloDude:
im trying the earthquake command, but i only hear sound and not the shaking. I have the set var before the special and everything. heres the script.

#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x198
if 0x1 goto @done
msgbox @10 0x6
setvar 0x8007 0xF
special 0x136
setflag 0x198
release
end
#org @done
lock
faceplayer
msgbox @11 0x6
release
end
#org @10
= Gee, i hope there is not\nan earthquake.
#org @11
= I hope that does not happen\nagain.
There are three more variables that you have to set a value to if you want an earthquake to work properly. Add these to your script just prior to special 0x136 and you should be able to see the visual effects of the earthquake as well:

Code:
setvar 0x8004 0xF
setvar 0x8005 0xF
setvar 0x8006 0xF
setvar 0x8007 0xF
Change the '0xF's if you want to make the earthquakes stronger/ weaker as they relate to the frequency and amplitudes of the quakes.
__________________
Reply With Quote
  #731    
Old March 26th, 2012 (01:55 PM).
YouListeningROMs's Avatar
YouListeningROMs YouListeningROMs is offline
 
Join Date: Mar 2012
Gender: Male
Posts: 24
Okay, can anyone explain the "Delay" movement data?
Quote:
#raw 0x18 = Delay1
#raw 0x19 = Delay2
#raw 0x1A = Delay3
#raw 0x1B = Delay4
#raw 0x1C = Delay5
Reply With Quote
  #732    
Old April 3rd, 2012 (01:14 PM). Edited April 3rd, 2012 by YouListeningROMs.
YouListeningROMs's Avatar
YouListeningROMs YouListeningROMs is offline
 
Join Date: Mar 2012
Gender: Male
Posts: 24
So, as far as the trainerbattle command goes, what types do you have?

I know that you've got 0x0 for normal trainers and 0x1 for trainers that continue scripts after you beat them. While I was messing around on AdvanceMap, looking at different trainers scripts, I found that most trainers had commands for trainerbattles structured as follows:
Code:
#org @start
special2 0x8000 0x39 This checks if the Vs Seeker has been used and returns value to the given variable.
compare 0x8000 0x1
if 0x1 goto @1
trainerbattle 0x0 0x9C 0x0 @2 @3
msgbox @4 0x6
release
end

#org @1
trainerbattle 0x5 0x9C @5 @6
release
end

#org. . . etc. etc. etc.
What I've determined so far about the trainerbattle command is as follows:

Code:
trainerbattle 0x0 normal trainer battle, script ends after.
trainerbattle 0x1 special trainer battle (Leader, Rival, etc.), script continues after battle.
trainerbattle 0x4 double battle, script ends after.
trainerbattle 0x5 normal trainer rematch, script ends after.
trainerbattle 0x7 double battle rematch, script ends after.
Reply With Quote
  #733    
Old April 6th, 2012 (07:54 AM).
LugiaMZ's Avatar
LugiaMZ LugiaMZ is offline
 
Join Date: Dec 2011
Gender: Male
Posts: 72
How to make player(own) change ow sprite,who can tell me?Please.Thx~
Reply With Quote
  #734    
Old April 9th, 2012 (07:34 AM). Edited April 9th, 2012 by pikachuFan50.
pikachuFan50's Avatar
pikachuFan50 pikachuFan50 is offline
 
Join Date: May 2010
Gender: Male
Posts: 32
great tut and all but how do i apply those scripts do i go to batch compiler thingy select my rom and compile or what .what do i havce to do.cuz when i put the offset in my fire red when i talk to the person.no text,nothjing.i just can move and nothing ain't happenin.plz help i really want to make a hack.

and do i have something wrong in this script?


#dynamic 0x456734
#org @start
lock
faceplayer
msgbox @1 0x6
release
end

#org @1
= PIKA PIKA
Reply With Quote
  #735    
Old April 10th, 2012 (05:00 AM). Edited April 10th, 2012 by LugiaMZ.
LugiaMZ's Avatar
LugiaMZ LugiaMZ is offline
 
Join Date: Dec 2011
Gender: Male
Posts: 72
Quote originally posted by pikachuFan50:
great tut and all but how do i apply those scripts do i go to batch compiler thingy select my rom and compile or what .what do i havce to do.cuz when i put the offset in my fire red when i talk to the person.no text,nothjing.i just can move and nothing ain't happenin.plz help i really want to make a hack.

and do i have something wrong in this script?


#dynamic 0x456734
#org @start
lock
faceplayer
msgbox @1 0x6
release
end

#org @1
= PIKA PIKA
What are you use?XSE?Pokescript?PSKV or what... your script i think is no wrong.But try mine.
test this:

#dynamic 0x800000

#org @test
lock
faceplayer
msgbox @say 0x6
release
end

#org @say
= Hi!

Test it if you can.

psorry my bad english.Im Chinese.

I need to know how to scripting player change ow sprite to other at game.Please everyone tell me.Thanks.
Reply With Quote
  #736    
Old April 10th, 2012 (08:34 AM).
pikachuFan50's Avatar
pikachuFan50 pikachuFan50 is offline
 
Join Date: May 2010
Gender: Male
Posts: 32
Quote originally posted by LugiaMZ:
What are you use?XSE?Pokescript?PSKV or what... your script i think is no wrong.But try mine.
test this:

#dynamic 0x800000

#org @test
lock
faceplayer
msgbox @say 0x6
release
end

#org @say
= Hi!

Test it if you can.

psorry my bad english.Im Chinese.

I need to know how to scripting player change ow sprite to other at game.Please everyone tell me.Thanks.
Hmm still doesn't work.myba i'm putting the scripts in the game wrong can someone explain how to put scripts in rom
Reply With Quote
  #737    
Old April 15th, 2012 (04:57 PM).
Rocka210's Avatar
Rocka210 Rocka210 is offline
The Code Never Bothered Me Anyway
 
Join Date: Jun 2009
Age: 18
Gender: Male
Posts: 23
Hello, I need a little help.
I am a good scripter but just started learning about level scripts. I have a script where you help the professor and after the battle he teleports you to his lab for the second script, what am I doing wrong?

Script 1
Spoiler:
#dynamic 0x801100

#org @start
checkflag 0x1002
if 0x1 goto @end
hidesprite 0x2
applymovement 0xFF @1
waitmovement 0x0
applymovement 0x1 @2
waitmovement 0x0
msgbox @A 0x6
applymovement 0xFF @3
waitmovement 0x0
msgbox @B 0x6
msgbox @C 0x6
applymovement 0xFF @4
applymovement 0x1 @4
waitmovement 0x0
cry 0x15 0x0
playsong 0x0112 0x0
msgbox @D 0x6
showsprite 0x2
applymovement 0x2 @5
waitmovement 0x0
givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
cry 0x15 0x0
wildbattle 0x15 0x3 0x0
hidesprite 0x2
applymovement 0x1 @6
applymovement 0xFF @7
waitmovement 0x0
msgbox @E 0x6
setvar 0x5001 0x1
warp 0x43 0x3 0xFF 0x6 0x5
waitstate
release
end

#org @name
call 0x1A74EB
return

#org @end
release
end

#org @1
#raw 0x11
#raw 0x11
#raw 0xFE

#org @2
#raw 0x0
#raw 0x62
#raw 0xFE

#org @A
= [green_fr]FIR: Oh! Hi \v\h01!\nWhat are you doing here?\l...\l...\lOh, I see. You want your POKéMON?\lAs a matter of fact I have one\lright here. Come here.

#org @3
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0xFE

#org @B
= [green_fr]FIR: I was holding this POKéMON\nspecial, just for you! Ready to\lget your first POKéMON?

#org @C
= CAW! CAW!

#org @4
#raw 0x2
#raw 0xFE

#org @D
= [green_fr]FIR: Oh no! That was the call of a\nwild SPEAROW! It must feel\lprovoked by us. The only POKéMON I\lhave is the one I was going to\lgive you. Here! Take the POKéMON\land fight! Please save us!

#org @5
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x13
#raw 0xFE

#org @6
#raw 0x0
#raw 0xFE

#org @7
#raw 0x1
#raw 0xFE

#org @E
= [green_fr]FIR: Wow. You did amazing! Let's\ngo back to my lab before another\lPOKéMON attacks!


Script 2
Spoiler:
#dynamic 0x802700

#org @start
msgbox @A 0x6
msgbox @B 0x6
msgbox @C 0x5
compare LASTRESULT 0x6
if 0x1 gosub @name
msgbox @D 0x6
msgbox @E 0x6
applymovement 0x2 @1
waitmovement 0x0
msgbox @F 0x6
applymovement 0x2 @2
waitmovement 0x0
hidesprite 0x2
setflag 0x1003
msgbox @G 0x6
setvar 0x5001 0x2
release
end

#org @name
call 0x1A74EB
return

#org @A
= [green_fr]FIR: Thanks, \v\h\01.\nWe could have been seriously hurt\lback there. \v\h\01!\lYou now have your first POKéMON!

#org @B
= \v\h\01 recieved the\nEEVEE!

#org @C
= Would you like to nickname your\nEEVEE?

#org @D
= [green_fr]FIR: I see your POKéMON has\nalready grown attached to you,\l\v\h01!

#org @E
= [green_fr]???: Gramps? You okay?

#org @1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x11
#raw 0xFE

#org @F
= [green_fr]???: I heard there was a POKéMON\nattack by CEDAR LAKE and I wanted\lto make sure you're okay.\lFIR: Oh. I'm fine!\l\v\h01! This is my grandson,\l\v\h06.\l\v\h06: What? This is the\lkid that you think could be the\lnext champion? He's so weak\llooking!\lFIR: What your mouth! He's the one\lwho saved me.\l\v\h06: Oh. Well, I got\la plan. Meet me in the town west\lof here and we'll battle. Then,\lwe'll see who is better!

#org @2
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

#org @G
= [green_fr]FIR: Would you look at that! You\nalready got a friend! Well, good\lluck on your upcoming journey! I\lexpect to here a lot about you!]


The problem happens when I warp, I get a black screen. Thanks for helping me.
__________________

LET IT GO!!!!

System.Console.WriteLine("The code never bothered me anyway.");

Twitter | YouTube | Steam | PHO
Reply With Quote
  #738    
Old April 16th, 2012 (04:11 AM).
Magic's Avatar
Magic Magic is offline
キュウコン
Moderator
CS
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Posts: 5,277
Quote originally posted by Rocka210:
Hello, I need a little help.
I am a good scripter but just started learning about level scripts. I have a script where you help the professor and after the battle he teleports you to his lab for the second script, what am I doing wrong?

Script 1
Spoiler:
#dynamic 0x801100

#org @start
checkflag 0x1002
if 0x1 goto @end
hidesprite 0x2
applymovement 0xFF @1
waitmovement 0x0
applymovement 0x1 @2
waitmovement 0x0
msgbox @A 0x6
applymovement 0xFF @3
waitmovement 0x0
msgbox @B 0x6
msgbox @C 0x6
applymovement 0xFF @4
applymovement 0x1 @4
waitmovement 0x0
cry 0x15 0x0
playsong 0x0112 0x0
msgbox @D 0x6
showsprite 0x2
applymovement 0x2 @5
waitmovement 0x0
givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
cry 0x15 0x0
wildbattle 0x15 0x3 0x0
hidesprite 0x2
applymovement 0x1 @6
applymovement 0xFF @7
waitmovement 0x0
msgbox @E 0x6
setvar 0x5001 0x1
warp 0x43 0x3 0xFF 0x6 0x5
waitstate
release
end

#org @name
call 0x1A74EB
return

#org @end
release
end

#org @1
#raw 0x11
#raw 0x11
#raw 0xFE

#org @2
#raw 0x0
#raw 0x62
#raw 0xFE

#org @A
= [green_fr]FIR: Oh! Hi \v\h01!\nWhat are you doing here?\l...\l...\lOh, I see. You want your POKéMON?\lAs a matter of fact I have one\lright here. Come here.

#org @3
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0xFE

#org @B
= [green_fr]FIR: I was holding this POKéMON\nspecial, just for you! Ready to\lget your first POKéMON?

#org @C
= CAW! CAW!

#org @4
#raw 0x2
#raw 0xFE

#org @D
= [green_fr]FIR: Oh no! That was the call of a\nwild SPEAROW! It must feel\lprovoked by us. The only POKéMON I\lhave is the one I was going to\lgive you. Here! Take the POKéMON\land fight! Please save us!

#org @5
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x13
#raw 0xFE

#org @6
#raw 0x0
#raw 0xFE

#org @7
#raw 0x1
#raw 0xFE

#org @E
= [green_fr]FIR: Wow. You did amazing! Let's\ngo back to my lab before another\lPOKéMON attacks!


Script 2
Spoiler:
#dynamic 0x802700

#org @start
msgbox @A 0x6
msgbox @B 0x6
msgbox @C 0x5
compare LASTRESULT 0x6
if 0x1 gosub @name
msgbox @D 0x6
msgbox @E 0x6
applymovement 0x2 @1
waitmovement 0x0
msgbox @F 0x6
applymovement 0x2 @2
waitmovement 0x0
hidesprite 0x2
setflag 0x1003
msgbox @G 0x6
setvar 0x5001 0x2
release
end

#org @name
call 0x1A74EB
return

#org @A
= [green_fr]FIR: Thanks, \v\h\01.\nWe could have been seriously hurt\lback there. \v\h\01!\lYou now have your first POKéMON!

#org @B
= \v\h\01 recieved the\nEEVEE!

#org @C
= Would you like to nickname your\nEEVEE?

#org @D
= [green_fr]FIR: I see your POKéMON has\nalready grown attached to you,\l\v\h01!

#org @E
= [green_fr]???: Gramps? You okay?

#org @1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x11
#raw 0xFE

#org @F
= [green_fr]???: I heard there was a POKéMON\nattack by CEDAR LAKE and I wanted\lto make sure you're okay.\lFIR: Oh. I'm fine!\l\v\h01! This is my grandson,\l\v\h06.\l\v\h06: What? This is the\lkid that you think could be the\lnext champion? He's so weak\llooking!\lFIR: What your mouth! He's the one\lwho saved me.\l\v\h06: Oh. Well, I got\la plan. Meet me in the town west\lof here and we'll battle. Then,\lwe'll see who is better!

#org @2
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

#org @G
= [green_fr]FIR: Would you look at that! You\nalready got a friend! Well, good\lluck on your upcoming journey! I\lexpect to here a lot about you!]


The problem happens when I warp, I get a black screen. Thanks for helping me.
I don't have time to check the second script but this looks like the problem:

warp 0x43 0x3 0xFF 0x6 0x5

Surely you want warp 0x4 0x3 0xFF 0x6 0x5

Make sure you insert the second script correctly as well, using the method diegoisawesome runs through in this thread.
__________________
Looking for spriters/pixel artists for a ROM hacking project.
ENQUIRE WITHIN
Reply With Quote
  #739    
Old April 16th, 2012 (02:40 PM).
Rocka210's Avatar
Rocka210 Rocka210 is offline
The Code Never Bothered Me Anyway
 
Join Date: Jun 2009
Age: 18
Gender: Male
Posts: 23
The Map bank is correct. I made the new bank "43"
I might of inserted the second one incorrectly.
Here's two screenshots of the map:
Spoiler:

and
Spoiler:

Thanks again.
__________________

LET IT GO!!!!

System.Console.WriteLine("The code never bothered me anyway.");

Twitter | YouTube | Steam | PHO
Reply With Quote
  #740    
Old April 16th, 2012 (02:44 PM).
Magic's Avatar
Magic Magic is offline
キュウコン
Moderator
CS
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Posts: 5,277
Ah, well in that case your problem is still the same, but with a different answer :3

Map Bank 43 = 0x2B in hex, so replace the 43 with 2B.
__________________
Looking for spriters/pixel artists for a ROM hacking project.
ENQUIRE WITHIN
Reply With Quote
  #741    
Old April 16th, 2012 (02:47 PM). Edited April 17th, 2012 by Rocka210.
Rocka210's Avatar
Rocka210 Rocka210 is offline
The Code Never Bothered Me Anyway
 
Join Date: Jun 2009
Age: 18
Gender: Male
Posts: 23
Thank you much :D
It worked!


New question about the same script. When the 2nd script starts, I get random letters. Is this a result of not inserting it properly.
(Look at last post of mine to see screenshots to see if I inserted it incorrectly)
__________________

LET IT GO!!!!

System.Console.WriteLine("The code never bothered me anyway.");

Twitter | YouTube | Steam | PHO
Reply With Quote
  #742    
Old April 19th, 2012 (06:37 AM).
Magic's Avatar
Magic Magic is offline
キュウコン
Moderator
CS
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Posts: 5,277
Quote originally posted by Rocka210:
Thank you much :D
It worked!


New question about the same script. When the 2nd script starts, I get random letters. Is this a result of not inserting it properly.
(Look at last post of mine to see screenshots to see if I inserted it incorrectly)
It looks like you've done it right, but it is hard to tell - try recompiling with fresh offsets and insert it again following the level tutorial
__________________
Looking for spriters/pixel artists for a ROM hacking project.
ENQUIRE WITHIN
Reply With Quote
  #743    
Old April 21st, 2012 (07:02 AM).
shahariko5 shahariko5 is offline
 
Join Date: Apr 2012
Gender: Male
Posts: 9
How am I editing the first map of the game? ( e/r/s )
Reply With Quote
  #744    
Old April 21st, 2012 (08:35 AM).
machomuu's Avatar
machomuu machomuu is online now
Grant me the power of revolution!
Gold Tier
 
Join Date: Apr 2008
Location: 'Murca
Gender: Male
Nature: Relaxed
Posts: 6,501
Quote originally posted by shahariko5:
How am I editing the first map of the game? ( e/r/s )
With Advancemap, you don't map with XSE. You can via semi-complex scripts, but not in the way you want to do it (or at least, not in a way that would be practical).

If you want to know how to add scripts to the first map, read the first couple post, they will tell you everything.
__________________
Reply With Quote
  #745    
Old April 21st, 2012 (10:55 AM).
shahariko5 shahariko5 is offline
 
Join Date: Apr 2012
Gender: Male
Posts: 9
Quote originally posted by machomuu:
With Advancemap, you don't map with XSE. You can via semi-complex scripts, but not in the way you want to do it (or at least, not in a way that would be practical).

If you want to know how to add scripts to the first map, read the first couple post, they will tell you everything.
I mean whitch script do that after you chhose your name . the game know to send you for the van and no ohter map.
Reply With Quote
  #746    
Old April 29th, 2012 (06:13 PM).
AxeLea AxeLea is offline
 
Join Date: Jan 2012
Gender: Male
Posts: 10
I have been trying to follow this and a few other tutorials but for some reason I just can't do it and it is making me really mad. It's a good tutorial I just have alot of trouble with it as I am new.
Reply With Quote
  #747    
Old April 30th, 2012 (04:56 PM).
Peresozo's Avatar
Peresozo Peresozo is offline
Trainer
 
Join Date: Apr 2012
Location: NY
Gender: Male
Nature: Calm
Posts: 27
i really learned a lot from this
__________________





Reply With Quote
  #748    
Old May 1st, 2012 (11:40 AM).
CCCPancakes's Avatar
CCCPancakes CCCPancakes is offline
 
Join Date: Apr 2012
Age: 18
Gender: Male
Posts: 19
Could anyone tell me what's wrong with this script? It freezes when I activate it.

Spoiler:

#dynamic 0x554433
#org @start
lock
faceplayer
checkflag 0x825
if 0x1 goto @runshoes
msgbox @msg 0x6
applymovement 0x04 @move
applymovement 0xFF @move1
applymovement 0x04 @move2
applymovement 0xFF @move3
msgbox @msg1 0x6
applymovement 0x04 @move4
release
end

#org @runshoes
msgbox @msg2 0x6
fanfare 0x13E
msgbox @msg3 0x6
waitfanfare
closeonkeypress
msgbox @msg4 0x6
setflag 0x82F
release
end

#org @msg
= Hold up!

#org @msg1
= You don't have this towns\nbadge!\lIt could be difficult ahead\lwithout that badge!\pYou should probably visit\lthe gym!

#org @msg2
= Oh! I see you have the\nRainbow Badge!\pHere, take these, they could\lbe useful during your\ljourney!

#org @msg3
= [player] recieved the Running Shoes!\p[player] put on the Running Shoes.

#org @msg4
= Think of these as my gift\nto you for beating Erika.

#org @move
#raw 0xC

#org @move1
#raw 0xE

#org @move2
#raw 0x2

#org @move3
#raw 0x3

#org @move4
#raw 0x9
#raw 0x0
__________________
Reply With Quote
  #749    
Old May 1st, 2012 (11:53 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
Moderator
CS
 
Join Date: Nov 2007
Location: UK
Posts: 3,403
Send a message via Skype™ to Spherical Ice
Code:
#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x825
if 0x1 goto @runshoes
msgbox @msg 0x6
applymovement 0x04 @move
applymovement 0xFF @move1
applymovement 0x04 @move2
applymovement 0xFF @move3
waitmovement 0x0
msgbox @msg1 0x6
applymovement 0x04 @move4
waitmovement 0x0
release
end

#org @runshoes
msgbox @msg2 0x6
fanfare 0x13E
preparemsg @msg3
waitmsg
waitfanfare
msgbox @msg4 0x6
setflag 0x82F
release
end

#org @msg
= Hold up!

#org @msg1
= You don't have this towns\nbadge!\lIt could be difficult ahead\lwithout that badge!\pYou should probably visit\lthe gym!

#org @msg2
= Oh! I see you have the\nRainbow Badge!\pHere, take these, they could\lbe useful during your\ljourney!

#org @msg3
= [player] recieved the Running Shoes!\p[player] put on the Running Shoes.

#org @msg4
= Think of these as my gift\nto you for beating Erika.

#org @move
#raw 0xC
#raw 0xFE

#org @move1
#raw 0xE
#raw 0xFE

#org @move2
#raw 0x2
#raw 0xFE

#org @move3
#raw 0x3
#raw 0xFE

#org @move4
#raw 0x9
#raw 0x0
#raw 0xFE
Okay, I've made some amendments to your script.

Firstly, DON'T put random numbers for the offset. Just use #dynamic 0x800000. When you compile your script, XSE will automatically find and insert the script at an offset with enough free space; you literally only have to copy and paste the first offset it gives you and put it in Advance Map.

After using the applymovement command, you need to use waitmovement 0x0; it makes your script run smoother.

I changed the "obtain running shoes" part a little for professionalism's sake, but what you had would've worked.

Movement #orgs always need #raw 0xFE at the end to notify the end of that set of movements.

Now, your script is probably freezing because of the settings in Advance Map. Click on the Script tile and set the first Unknown to $03, and the Var number to $4050. Save the map; after you've done all that it should work.
__________________
Reply With Quote
  #750    
Old May 1st, 2012 (12:23 PM).
Peresozo's Avatar
Peresozo Peresozo is offline
Trainer
 
Join Date: Apr 2012
Location: NY
Gender: Male
Nature: Calm
Posts: 27
Quote originally posted by CCCPancakes:
Could anyone tell me what's wrong with this script? It freezes when I activate it.

Spoiler:

#dynamic 0x554433
#org @start
lock
faceplayer
checkflag 0x825
if 0x1 goto @runshoes
msgbox @msg 0x6
applymovement 0x04 @move
applymovement 0xFF @move1
applymovement 0x04 @move2
applymovement 0xFF @move3
msgbox @msg1 0x6
applymovement 0x04 @move4
release
end

#org @runshoes
msgbox @msg2 0x6
fanfare 0x13E
msgbox @msg3 0x6
waitfanfare
closeonkeypress
msgbox @msg4 0x6
setflag 0x82F
release
end

#org @msg
= Hold up!

#org @msg1
= You don't have this towns\nbadge!\lIt could be difficult ahead\lwithout that badge!\pYou should probably visit\lthe gym!

#org @msg2
= Oh! I see you have the\nRainbow Badge!\pHere, take these, they could\lbe useful during your\ljourney!

#org @msg3
= [player] recieved the Running Shoes!\p[player] put on the Running Shoes.

#org @msg4
= Think of these as my gift\nto you for beating Erika.

#org @move
#raw 0xC

#org @move1
#raw 0xE

#org @move2
#raw 0x2

#org @move3
#raw 0x3

#org @move4
#raw 0x9
#raw 0x0
It migth be that the movement is not done put #raw 0xFE after each movement see if it workd lol im jst starting with scripting but try tht if doesnt then i cant help u lol but try tht
__________________





Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

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

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

Forum Jump


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