Thread: [Tutorial] XSE Scripting Tutorial
View Single Post
  #91    
Old June 5th, 2008 (07:51 PM).
~Teh Panda~'s Avatar
~Teh Panda~ ~Teh Panda~ is offline
Sea of Dreams - Redux
Silver Tier
 
Join Date: Aug 2007
Posts: 906
Quote originally posted by Onvoloper:
My earlier script, that I tried jsut had a girl saying "Hey, how are you?"
Now I tried to make one that gave you a Pikachu then asked how the Pikachu was...
I clicked open script in advance map and opened the old script in XSE
Code:
'-----------------------
#org 0x3B4D84
lock
faceplayer
msgbox2 0x8456734 '"Hey! How are you?"
callstd 0x6
release
end


'---------
' Strings
'---------
#org 0x456734
= Hey! How are you?
That one works, I had the offset in XSE as 3B4D84 and comiled it into Fire Red

Now my new script is

Code:
'-----------------------
#Dynamic 0x3B4D84

#org @Talk
lock
faceplayer
checkflag 0x910
if b_true goto @Speak
message @message
givepokemon 0x19 0xA 0x0 0x0 0x0 0x0
setflag 0x910
release
end

#org @Speak
message @Pika
boxset 0x6
release
end

#org @message
= Here, this pikachu\nIs lonely.\nYou take it.

#org @Pika
= How is the Pikachu?
I deleted the old script, and wrote this one in. It doesn't have any errors in it that I know of as it gives me this
Code:
Version\1636 - Pokemon - Fire Red Version.gba...
Processing input script...
2 - DYNAMIC
 > lDynamicStart = 0x3B4D84
4 - ORG
 > lNewOffset = 0x47B0E7
5 - (6A) - LOCK
6 - (5A) - FACEPLAYER
7 - (2B) - CHECKFLAG
 > iWord = 0x910
8 - (??) IF (native)
 > bCondition = 0x1
 This is a jumping IF, 0x06.
 > pTarget = 0x847B139
9 - (0F) MSGBOX (native)
 > pText = 0x847B22F
10 - (79) - GIVEPOKEMON
 > iWord = 0x19
 > bByte = 0xA
 > iWord = 0x0
 > lDword = 0x0
 > lDword = 0x0
 > bByte = 0x0
11 - (29) - SETFLAG
 > iWord = 0x910
12 - (6C) - RELEASE
13 - (02) - END
15 - ORG
 > lNewOffset = 0x47B139
16 - (0F) MSGBOX (native)
 > pText = 0x847B4C7
17 - (09) BOXSET (native)
 > bType = 0x6
18 - (6C) - RELEASE
19 - (02) - END
21 - ORG
 > lNewOffset = 0x47B22F
22 - RAW TEXT
 > sText = "Here, this pikachu\nIs lonely.\nYou take it."
24 - ORG
 > lNewOffset = 0x47B4C7
25 - RAW TEXT
 > sText = "How is the Pikachu?"
-------------------------------
DYNAMIC_OFFSET 1
 > sLabel = @Pika
 > lOffset = 0x47B4C7
DYNAMIC_OFFSET 2
 > sLabel = @Speak
 > lOffset = 0x47B139
DYNAMIC_OFFSET 3
 > sLabel = @Talk
 > lOffset = 0x47B0E7
DYNAMIC_OFFSET 4
 > sLabel = @message
 > lOffset = 0x47B22F
-------------------------------
Cleaning up...
Closing output...
Finished processing input in 0.145 seconds.
BUT when I close it and go into advance map and reopen the script it still has the first one...and ingame all she says is "Hey, how are you?"
:/ I get this whenever I use #Dynamic 0xOffset
If I start it with #org 0xOffset it works BUT I can't use stuff like #org @message I have to use other offsets :/
notice the dynamics in each you are using the same hex, use a free space finder and change yours, that is what is happening
__________________




Mystic still in work to let you know...