Script Help Thread (DO NOT REQUEST SCRIPTS) Page 335

Started by HackMew December 20th, 2008 5:10 AM
  • 625717 views
  • 9682 replies

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
setwildbattle 0x90 0x32 0x0

^ Taken directly from Articuno's Fire Red Battle

I know this seems very simple but can someone just breakdown that command for me please.
Go into XSE and hit F1. You will find a breakdown of every command.

Paired with Simba
Seen January 22nd, 2021
Posted June 19th, 2013
11 posts
12.1 Years
Spoiler:

#dynamic 0x800300
#org @start
checkflag 0x901
if 0x0 goto @go
checkflag 0x900
if 0x1 goto @srs
trainerbattle 0x0 0x1 0x0 @see @defeat
msgbox @loser 0x6
setflag 0x900
end

#org @go
= Move along, sir.
end

#org @srs
= (He doesn't look too good...)
end

#org @see
= I didn't lose my legs in 'Nam\nso illegal filth like you can\lfreeload off of MY country!

#org @defeat
= Agh! My poor old heart!

#org @loser
= Seriously! Get an ambulance,\nplease!


So what I want to happen is, if flag 901 isn't activated (it becomes activated elsewhere), the script continues execution from @go. If it is, a trainer battle ensues. After the battle is done, flag 900 is set and if he is talked to again, script continues execution from @srs.
What happens instead is, for some odd reason, the script compiles into this:

Spoiler:

'---------------
#org 0x800300
checkflag 0x901
if 0x0 goto 0x880032D
checkflag 0x900
if 0x1 goto 0x8800340
trainerbattle 0x0 0x1 0x0 0x8800360 0x88003BA
msgbox 0x88003D4 MSG_NORMAL '"Seriously! Get an ambulance,\nplea..."
setflag 0x900
end

'---------------
#org 0x80032D
textcolor 0xE3
'---------------
#org 0x800340
trainerbattle 0xC2 0xD9 0xE3D8 0xB4E2E7D9 0xE3E000E8

'---------
' Strings
'---------
#org 0x800360
= I didn't lose my legs in 'Nam\nso illegal filth like you can\lfreeload off of MY country!

#org 0x8003BA
= Agh! My poor old heart!

#org 0x8003D4
= Seriously! Get an ambulance,\nplease!


As you can see, @go is gone and turns into that uselessness. What happens in the game is, when I click on the guy, all that happens is the "ding" select sound and nothing else. I'm not even locked to him.

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
Spoiler:

#dynamic 0x800300
#org @start
checkflag 0x901
if 0x0 goto @go
checkflag 0x900
if 0x1 goto @srs
trainerbattle 0x0 0x1 0x0 @see @defeat
msgbox @loser 0x6
setflag 0x900
end

#org @go
= Move along, sir.
end

#org @srs
= (He doesn't look too good...)
end

#org @see
= I didn't lose my legs in 'Nam\nso illegal filth like you can\lfreeload off of MY country!

#org @defeat
= Agh! My poor old heart!

#org @loser
= Seriously! Get an ambulance,\nplease!


So what I want to happen is, if flag 901 isn't activated (it becomes activated elsewhere), the script continues execution from @go. If it is, a trainer battle ensues. After the battle is done, flag 900 is set and if he is talked to again, script continues execution from @srs.
What happens instead is, for some odd reason, the script compiles into this:

Spoiler:

'---------------
#org 0x800300
checkflag 0x901
if 0x0 goto 0x880032D
checkflag 0x900
if 0x1 goto 0x8800340
trainerbattle 0x0 0x1 0x0 0x8800360 0x88003BA
msgbox 0x88003D4 MSG_NORMAL '"Seriously! Get an ambulance,\nplea..."
setflag 0x900
end

'---------------
#org 0x80032D
textcolor 0xE3
'---------------
#org 0x800340
trainerbattle 0xC2 0xD9 0xE3D8 0xB4E2E7D9 0xE3E000E8

'---------
' Strings
'---------
#org 0x800360
= I didn't lose my legs in 'Nam\nso illegal filth like you can\lfreeload off of MY country!

#org 0x8003BA
= Agh! My poor old heart!

#org 0x8003D4
= Seriously! Get an ambulance,\nplease!


As you can see, @go is gone and turns into that uselessness. What happens in the game is, when I click on the guy, all that happens is the "ding" select sound and nothing else. I'm not even locked to him.
First of all, unless you used Jambo's flag hack, no flags over 900. (If you did use it, that info is necessary to share with your script) The problem is the "end" after @srs and @go. Here is a fix:

#dynamic 0x800300
#org @start
checkflag 0x901
if 0x0 goto @go
checkflag 0x900
if 0x1 goto @srs
trainerbattle 0x0 0x1 0x0 @see @defeat
msgbox @loser 0x6
setflag 0x900
end

#org @go
= Move along, sir.

#org @srs
= (He doesn't look too good...)

#org @see
= I didn't lose my legs in 'Nam\nso illegal filth like you can\lfreeload off of MY country!

#org @defeat
= Agh! My poor old heart!

#org @loser
= Seriously! Get an ambulance,\nplease!

Paired with Simba
Seen January 22nd, 2021
Posted June 19th, 2013
11 posts
12.1 Years
First of all, unless you used Jambo's flag hack, no flags over 900. (If you did use it, that info is necessary to share with your script) The problem is the "end" after @srs and @go. Here is a fix:

#dynamic 0x800300
#org @start
checkflag 0x901
if 0x0 goto @go
checkflag 0x900
if 0x1 goto @srs
trainerbattle 0x0 0x1 0x0 @see @defeat
msgbox @loser 0x6
setflag 0x900
end

#org @go
= Move along, sir.

#org @srs
= (He doesn't look too good...)

#org @see
= I didn't lose my legs in 'Nam\nso illegal filth like you can\lfreeload off of MY country!

#org @defeat
= Agh! My poor old heart!

#org @loser
= Seriously! Get an ambulance,\nplease!
You got most of it to work, but it compiles into this:
Spoiler:

'---------------
#org 0x800300
checkflag 0x8C4
if 0x0 goto 0x880032D
checkflag 0x8C3
if 0x1 goto 0x8800340
trainerbattle 0x0 0x1 0x0 0x8800360 0x88003BA
msgbox 0x88003D4 MSG_NORMAL '"Seriously! Get an ambulance,\nplea..."
setflag 0x8C3
end

'---------------
#org 0x80032D
textcolor 0xE3
'---------------
#org 0x800340
trainerbattle 0xC2 0xD9 0xE3D8 0xB4E2E7D9 0xE3E000E8

'---------
' Strings
'---------
#org 0x800360
= I didn't lose my legs in 'Nam\nso illegal filth like you can\lfreeload off of MY country!

#org 0x8003BA
= Agh! My poor old heart!

#org 0x8003D4
= Seriously! Get an ambulance,\nplease!

so if I click on him before flag 8C4 is set, all that happens is the "ding" click sound. :\
I'm beginning to think this isn't really user error.

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
You got most of it to work, but it compiles into this:
Spoiler:

'---------------
#org 0x800300
checkflag 0x8C4
if 0x0 goto 0x880032D
checkflag 0x8C3
if 0x1 goto 0x8800340
trainerbattle 0x0 0x1 0x0 0x8800360 0x88003BA
msgbox 0x88003D4 MSG_NORMAL '"Seriously! Get an ambulance,\nplea..."
setflag 0x8C3
end

'---------------
#org 0x80032D
textcolor 0xE3
'---------------
#org 0x800340
trainerbattle 0xC2 0xD9 0xE3D8 0xB4E2E7D9 0xE3E000E8

'---------
' Strings
'---------
#org 0x800360
= I didn't lose my legs in 'Nam\nso illegal filth like you can\lfreeload off of MY country!

#org 0x8003BA
= Agh! My poor old heart!

#org 0x8003D4
= Seriously! Get an ambulance,\nplease!

so if I click on him before flag 8C4 is set, all that happens is the "ding" click sound. :\
I'm beginning to think this isn't really user error.
Oh my god, I had just gotten up and I didn't read your script properly. This is definitely user error. You are trying to display text without a command. Here:

#dynamic 0x800300
#org @start
checkflag 0x901
if 0x0 goto @go
checkflag 0x900
if 0x1 goto @srs
trainerbattle 0x0 0x1 0x0 @see @defeat
msgbox @loser 0x6
setflag 0x900
end

#org @go
msgbox @gotext 0x2
End

#org @gotext
= Move along, sir.

#org @srs
msgbox @srstext 0x2
End

#org @srstext
= (He doesn't look too good...)

#org @see
= I didn't lose my legs in 'Nam\nso illegal filth like you can\lfreeload off of MY country!

#org @defeat
= Agh! My poor old heart!

#org @loser
= Seriously! Get an ambulance,\nplease!
Look up the msgbox command.

Paired with Simba
Seen January 22nd, 2021
Posted June 19th, 2013
11 posts
12.1 Years
Spoiler:
Oh my god, I had just gotten up and I didn't read your script properly. This is definitely user error. You are trying to display text without a command. Here:

#dynamic 0x800300
#org @start
checkflag 0x901
if 0x0 goto @go
checkflag 0x900
if 0x1 goto @srs
trainerbattle 0x0 0x1 0x0 @see @defeat
msgbox @loser 0x6
setflag 0x900
end

#org @go
msgbox @gotext 0x2
End

#org @gotext
= Move along, sir.

#org @srs
msgbox @srstext 0x2
End

#org @srstext
= (He doesn't look too good...)

#org @see
= I didn't lose my legs in 'Nam\nso illegal filth like you can\lfreeload off of MY country!

#org @defeat
= Agh! My poor old heart!

#org @loser
= Seriously! Get an ambulance,\nplease!
Look up the msgbox command.


I mean I did do that, and after I compiled it into the game, I re-opened the script offset to find it changed. I re-did it anyway using what you did, and this is what it compiled into yet again:

Spoiler:

'---------------
#org 0x800300
checkflag 0x8C4
if 0x0 goto 0x880032D
checkflag 0x8C3
if 0x1 goto 0x8800340
trainerbattle 0x0 0x1 0x0 0x8800360 0x88003BA
msgbox 0x88003D4 MSG_NORMAL '"Seriously! Get an ambulance,\nplea..."
setflag 0x8C3
end

'---------------
#org 0x80032D
textcolor 0xE3
'---------------
#org 0x800340
trainerbattle 0xC2 0xD9 0xE3D8 0xB4E2E7D9 0xE3E000E8

'---------
' Strings
'---------
#org 0x800360
= I didn't lose my legs in 'Nam\nso illegal filth like you can\lfreeload off of MY country!

#org 0x8003BA
= Agh! My poor old heart!

#org 0x8003D4
= Seriously! Get an ambulance,\nplease!

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
Spoiler:



I mean I did do that, and after I compiled it into the game, I re-opened the script offset to find it changed. I re-did it anyway using what you did, and this is what it compiled into yet again:

Spoiler:

'---------------
#org 0x800300
checkflag 0x8C4
if 0x0 goto 0x880032D
checkflag 0x8C3
if 0x1 goto 0x8800340
trainerbattle 0x0 0x1 0x0 0x8800360 0x88003BA
msgbox 0x88003D4 MSG_NORMAL '"Seriously! Get an ambulance,\nplea..."
setflag 0x8C3
end

'---------------
#org 0x80032D
textcolor 0xE3
'---------------
#org 0x800340
trainerbattle 0xC2 0xD9 0xE3D8 0xB4E2E7D9 0xE3E000E8

'---------
' Strings
'---------
#org 0x800360
= I didn't lose my legs in 'Nam\nso illegal filth like you can\lfreeload off of MY country!

#org 0x8003BA
= Agh! My poor old heart!

#org 0x8003D4
= Seriously! Get an ambulance,\nplease!
Well, I just copied and pasted what I sent you, and after compiling, it looks like this:

Spoiler:
'---------------
#org 0x800300
checkflag 0x901
if 0x0 goto 0x880032D
checkflag 0x900
if 0x1 goto 0x880034A
trainerbattle 0x0 0x1 0x0 0x8800374 0x88003CE
msgbox 0x88003E8 MSG_NORMAL '"Seriously! Get an ambulance,\nplea..."
setflag 0x900
end

'---------------
#org 0x80032D
msgbox 0x8800337 MSG_FACE '"Move along, sir."
end

'---------------
#org 0x80034A
msgbox 0x8800354 MSG_FACE '"(He doesn't look too good...)"
end


'---------
' Strings
'---------
#org 0x800374
= I didn't lose my legs in 'Nam\nso illegal filth like you can\lfreeload off of MY country!

#org 0x8003CE
= Agh! My poor old heart!

#org 0x8003E8
= Seriously! Get an ambulance,\nplease!

#org 0x800337
= Move along, sir.

#org 0x800354
= (He doesn't look too good...)


So, I think you aren't doing something right. Try to compile this again, and make sure to change the offset in A-Map:

#dynamic 0x800300
#org @start
checkflag 0x901
if 0x0 goto @go
checkflag 0x900
if 0x1 goto @srs
trainerbattle 0x0 0x1 0x0 @see @defeat
msgbox @loser 0x6
setflag 0x900
end

#org @go
msgbox @gotext 0x2
End

#org @gotext
= Move along, sir.

#org @srs
msgbox @srstext 0x2
End

#org @srstext
= (He doesn't look too good...)

#org @see
= I didn't lose my legs in 'Nam\nso illegal filth like you can\lfreeload off of MY country!

#org @defeat
= Agh! My poor old heart!

#org @loser
= Seriously! Get an ambulance,\nplease!

Paired with Simba
Seen January 22nd, 2021
Posted June 19th, 2013
11 posts
12.1 Years
Spoiler:

Well, I just copied and pasted what I sent you, and after compiling, it looks like this:

Spoiler:
'---------------
#org 0x800300
checkflag 0x901
if 0x0 goto 0x880032D
checkflag 0x900
if 0x1 goto 0x880034A
trainerbattle 0x0 0x1 0x0 0x8800374 0x88003CE
msgbox 0x88003E8 MSG_NORMAL '"Seriously! Get an ambulance,\nplea..."
setflag 0x900
end

'---------------
#org 0x80032D
msgbox 0x8800337 MSG_FACE '"Move along, sir."
end

'---------------
#org 0x80034A
msgbox 0x8800354 MSG_FACE '"(He doesn't look too good...)"
end


'---------
' Strings
'---------
#org 0x800374
= I didn't lose my legs in 'Nam\nso illegal filth like you can\lfreeload off of MY country!

#org 0x8003CE
= Agh! My poor old heart!

#org 0x8003E8
= Seriously! Get an ambulance,\nplease!

#org 0x800337
= Move along, sir.

#org 0x800354
= (He doesn't look too good...)


So, I think you aren't doing something right. Try to compile this again, and make sure to change the offset in A-Map:

#dynamic 0x800300
#org @start
checkflag 0x901
if 0x0 goto @go
checkflag 0x900
if 0x1 goto @srs
trainerbattle 0x0 0x1 0x0 @see @defeat
msgbox @loser 0x6
setflag 0x900
end

#org @go
msgbox @gotext 0x2
End

#org @gotext
= Move along, sir.

#org @srs
msgbox @srstext 0x2
End

#org @srstext
= (He doesn't look too good...)

#org @see
= I didn't lose my legs in 'Nam\nso illegal filth like you can\lfreeload off of MY country!

#org @defeat
= Agh! My poor old heart!

#org @loser
= Seriously! Get an ambulance,\nplease!


That... that actually compiled perfectly. WTF?

Anyway, would you happen to know of any way to make it so a trainer doesn't approach you unless a flag is set? Currently, the guy doesn't approach you no matter what.

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years

That... that actually compiled perfectly. WTF?
I think you compiled it, then looked at the old offset by mistake, and didn't realize it. I have done that many timed.

Anyway, would you happen to know of any way to make it so a trainer doesn't approach you unless a flag is set? Currently, the guy doesn't approach you no matter what.
Checkflag 0xXXX
If 0x1 goto @trainer_walk_forward_and_battle

Done. Put that at the begining of the script. This will not work unless it is in a script tile or map script. It can't be attached to a regular OW.

Paired with Simba
Seen July 23rd, 2020
Posted June 24th, 2019
97 posts
14.2 Years
This script is for FireRed. For some reason it works, but it doesn't set the flag so it doesn't repeat and the characters all re appear after you take one step. I can't figure out why this is happening.
I also used advancemap and put the Var Number as 1945, unknown as 3.
For the characters I put person ID as 1945.

Spoiler:
#dynamic 0x800000
#org @start
checkflag 0x1945
if 0x1 goto @end
hidesprite 0x5
playsong 0x11B 0x0
applymovement 0x4 @move
waitmovement 0x0
msgbox @1 0x6
applymovement 0x6 @move2
waitmovement 0x0
msgbox @2 0x6
applymovement 0x4 @move3
waitmovement 0x0
msgbox @3 0x6
applymovement 0x4 @move4
waitmovement 0x0
msgbox @4 0x6
trainerbattle 0x1 0x051 0x0 @before @after @later
end

#org @later
setflag 0x1945
playsong 0x11B 0x0
applymovement 0x4 @move5
waitmovement 0x0
msgbox @5 0x6
playsong 0x109 0x0
msgbox @6 0x6
applymovement 0x1 @move6
waitmovement 0x0
msgbox @7 0x6
msgbox @8 0x6
applymovement 0x3 @move7
waitmovement 0x0
hidesprite 0x3
applymovement 0x4 @move15
showsprite 0x5
applymovement 0x5 @move14
waitmovement 0x0
msgbox @9 0x6
msgbox @10 0x6
applymovement 0x4 @move8
waitmovement 0x0
hidesprite 0x4
applymovement 0x5 @move9
waitmovement 0x0
msgbox @11 0x6
applymovement 0x5 @move10
waitmovement 0x0
hidesprite 0x5
applymovement 0x6 @move11
waitmovement 0x0
msgbox @12 0x6
applymovement 0x7 @move12
waitmovement 0x0
msgbox @13 0x6
applymovement 0x7 @move13
waitmovement 0x0
msgbox @14 0x6
fadescreen 0x1
fadescreen 0x0
hidesprite 0x6
hidesprite 0x7
fadesong 0x0
setflag 0x827
release
end

#org @end
release
end

#org @1
= [blue_fr]???: Its simple.\pHand over the deed to the\nfarm and no one gets hurt.

#org @2
= [blue_fr]Man: No!\pThis is me and my Wife's\nplace.\pAin't no hooligan like yourself\ngoing to get your filthy\lpaws on the deed!

#org @3
= [blue_fr]???: Alrighty then...\pI will use force!

#org @4
= [blue_fr]???: Whats this?\pSome kid wants to interfere?\p....\p...\pSo you say your from the Dragon\nClan?\pThen you are my enemy!

#org @before
= [blue_fr]???: Who am I you ask?\pI am a member of Team Rocket!\pI challenge you to\na battle!\pWhen I win, you scram!

#org @after
= What in tarnation?\pWhat are you?

#org @5
= [blue_fr]Rocket: It doesn't matter\nthat I lost!\pGramps, give up your\nfarm!

#org @6
= [blue_fr]???:Thats enough of that,\nRocket!

#org @7
= [blue_fr]Rocket: Huh?

#org @8
= [red_fr]Woman: Look at that rock!

#org @9
= [blue_fr]As a member of the Dragon\nClan, and a member\lof the international police..\pI place you under arrest!

#org @10
= [blue_fr]Rocket: Ermm!\pCya!

#org @11
= [blue_fr]DragonClan Agent: Nice\nwork [player]!\pI must give chase to the\nRocket!\pI'll tell Lance what\nhappened here!

#org @12
= [blue_fr]Man: Hmm.\pI don't understand what just\nhappened, but your a hero!

#org @13
= [red_fr]Woman: Come Husband.\pWe will go back to our house.

#org @14
= [red_fr]Kid, thanks for saving our\nkeester!\pCome visit anytime, and\nfeel free to explore the ranch!

#org @move
#raw 0x23
#raw 0xFE

#org @move2
#raw 0x24
#raw 0xFE

#org @move3
#raw 0x23
#raw 0xFE

#org @move4
#raw 0x62
#raw 0x13
#raw 0x13
#raw 0xFE

#org @move5
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move6
#raw 0x62
#raw 0x2
#raw 0x3
#raw 0x1
#raw 0x0
#raw 0xFE

#org @move7
#raw 0x52
#raw 0x52
#raw 0x54
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0xFE

#org @move8
#raw 0x62
#raw 0x10
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0xFE

#org @move9
#raw 0x3
#raw 0xFE

#org @move10
#raw 0x10
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0xFE

#org @move11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @move12
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x1
#raw 0xFE

#org @move13
#raw 0x3
#raw 0xFE

#org @move14
#raw 0x2
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move15
#raw 0x3
#raw 0xFE
Male
Seen June 20th, 2013
Posted June 20th, 2013
1 posts
9.9 Years
Can Somebody Please Help With My Script, It Keeps Doing Something Weird, Every Time I Compile It Then Re open It It Says Something Completely Different, Its supposed To Have An NPC Walk Up, Look Up, Wait, Walk Right, Look Up, Wait, Walk Left, Walk Down Look Up And Speak To Other NPC's I Cant Figure Out Whats Wrong But It Keeps Screwing Up In Multiple Ways Please Help And Thank You!

'---------------
#org 0x6B7FD8

#dynamic 0x6B7FD8

checkflag 0x1000
if 0x1 call @next
compare PLAYERFACING 0x1
if 0x1 goto 0x8123456
closeonkeypress
setflag 0x60
compare PLAYERFACING 0x3
if 0x1 call 0x81A38C3
compare PLAYERFACING 0x4
if 0x1 call 0x81A38C3
compare PLAYERFACING 0x2
if 0x1 call 0x81A38C3
msgbox 0x81A35C5 MSG_KEEPOPEN '"In honor for what you two have\nDo..."
release
end

#org @123456
msgbox @msg 0x2
release
end

#org @1A38C3
applymovement LASTTALKED 0x123654
msgbox @msg2 0x2
release
end

#org @next
faceplayer
msgbox @msg3 0x2
release
end

'-----------
'Strings
'-----------
#org @msg
= MOVE!

#org @msg2
= In honor for what you two have\nDone...I present you\pThe Badge Of Heroism!\pYou two have done the kingdom\nA great favore and I shall personally\pSee to it that you two are promoted\ntoo the highest ranking knights\p.... I thank you for everything!

#org @msg3
= Don't you dare even speak to me!\nThis wouldn't have happened\pif it weren't for you.\I hope your satisfied!

'-----------
' Movements
'-----------
#org @123654
#raw 0x5 'Step Up (Slow)
#raw 0x1 'Face Up
#raw 0x14 'Delay5
#raw 0x1 'Face Up
#raw 0x14 'Delay5
#raw 0x7 'Step Right (Slow)
#raw 0x1 'Face Up
#raw 0x14 'Delay5
#raw 0x1 'Face Up
#raw 0x1 'Face Up
#raw 0x6 'Step Left (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)

Age 24
Female
Earth
Seen December 9th, 2016
Posted December 5th, 2016
2,475 posts
10.5 Years
'---------------
#org 0x6B7FD8

#dynamic 0x6B7FD8

checkflag 0x1000 use a different flag
if 0x1 call @next
compare PLAYERFACING 0x1
if 0x1 goto @123456
closeonkeypress
setflag 0x60
compare PLAYERFACING 0x3
if 0x1 call @1A38C3
compare PLAYERFACING 0x4
if 0x1 call @1A38C3
compare PLAYERFACING 0x2
if 0x1 call @1A38C3
msgbox @1A35C5 MSG_KEEPOPEN '"In honor for what you two have\nDo..."
release
end

#org @123456
msgbox @msg 0x2
release
end

#org @1A38C3
applymovement LASTTALKED 0x123654
msgbox @msg2 0x2
release
end

#org @next
faceplayer
msgbox @msg3 0x2
release
end

'-----------
'Strings
'-----------
#org @msg
= MOVE!

#org @msg2
= In honor for what you two have\nDone...I present you\pThe Badge Of Heroism!\pYou two have done the kingdom\nA great favore and I shall personally\pSee to it that you two are promoted\ntoo the highest ranking knights\p.... I thank you for everything!

#org @msg3
= Don't you dare even speak to me!\nThis wouldn't have happened\pif it weren't for you.\I hope your satisfied!

'-----------
' Movements
'-----------
#org @123654
#raw 0x5 'Step Up (Slow)
#raw 0x1 'Face Up
#raw 0x14 'Delay5
#raw 0x1 'Face Up
#raw 0x14 'Delay5
#raw 0x7 'Step Right (Slow)
#raw 0x1 'Face Up
#raw 0x14 'Delay5
#raw 0x1 'Face Up
#raw 0x1 'Face Up
#raw 0x6 'Step Left (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements
The problem is that you called offset 123456 which does not contain your script! That's data already used by Gamefreak. You could corrupt something important by overwriting data used by Gamefreak. Offsets 720000 and forward are not, except for the EC0000's.
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Youtube Channel

Support me at my site!
Pokémon Platinum Red and Blue

pokefreake

Male
Seen November 17th, 2013
Posted October 24th, 2013
69 posts
10.5 Years
Whenever I try to add scripts to Leaf Green they wont save. How exactly do you add scripts to the game using pksv? I understand how to make them and how to edit the ones that are already in the game, but not how to add them. What do I do after I add the person in advance map and make the script?

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)

Age 24
Female
Earth
Seen December 9th, 2016
Posted December 5th, 2016
2,475 posts
10.5 Years
Use XSE and A FR ROM. Nobody will play your hack if it's LG. Plus EVERYTHING on here is for FR, not LG. That's a start.
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Youtube Channel

Support me at my site!
Pokémon Platinum Red and Blue

GoGoJJTech

(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)

Age 24
Female
Earth
Seen December 9th, 2016
Posted December 5th, 2016
2,475 posts
10.5 Years
Get the offset you compiled to, then in advance map put that offset on the person's script offset.
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Youtube Channel

Support me at my site!
Pokémon Platinum Red and Blue
Seen 1 Day Ago
Posted April 9th, 2021
787 posts
16.2 Years
Ok I got xse and a fr rom, but what do I do after I compile the script?
Depends on what your script does. If I had to guess, it's just a talking script, in which case, you need to assign it to a particular person.

To do this, download a program called Advance Map. Don't go for the newest version (1.9.5), as it is very buggy and unstable. Download 1.9.2. Then, open your ROM in it, and go to whatever map you want your person (and the attached script) to be on.

Switch to the 'Event' tab, and scroll down. You will see some fields, such has Signpost. One of them will be Sprites, or something similar. Raise that number by one and they will appear in the map. It may be necessary to go into the View menu (in the top left of the window) and enable "Show sprites".

Move that sprite to where you want it to be (just drag it), and in the sidebar, you can assign how they walk (if they stand still, walk around, look around, etc). It should be labeled well enough to be fairly self-explanatory. You can also change their sprite.

Go to the field entitled 'script offset'. This is where your script will go. After compiling your script to the ROM, XSE should've had a small popup. At the bottom of it, it will list your script offset (or often, offsets). Just copy and paste the first one into the Script Offset in Advancemap, and save the map.

Sorry for the textwall.

Edit: Not overly surprised, but "beaten".

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
Thanks everyone! Advance map 1.95 was the problem. I'm using 1.92 now.
Also what's so special about xse?
Compared to Pokescript? Everything. It is sooo much better. Compared to PKSV, well, that is personal preference. I like XSE better, but they tend to be equal in capabilities.

Paired with Simba
Seen February 1st, 2014
Posted November 23rd, 2013
53 posts
10.6 Years
Hi!

I'm using PKSV for scripting, but i've some trouble with a script that start with a trainerbattle and then continue with some other things like msgboxes, applymovement and disappears.

My first idea is:

lockall
trainerbattle
copyvar PLAYERFACING 0x800C
jump @offset

in @offset do something other.

Then i put the person event as a trainer with a certain view radius. When i go in front of trainer, he saw me, a msgbox open and the game go in crash.

So i've moved the lockall under the trainerbattle. In this way the battle starts correctly, but at the end nothing happen and the player can continue the game....if return speaking with the trainer the second part of the script was executed...but it isn't what i want.

Some ideas?
Male
somewhere
Seen November 29th, 2016
Posted June 25th, 2013
82 posts
12.9 Years
hello I need help with one of my scipts I dont know if its already answered , tryed to google it couldnt find any good help so I came here.
The problems is i set the person to disappear but when i re-entered the map the person would appear again

#org 0x8740ED6
'-----------------------------------
lock
faceplayer
applymovement 0x1 0x8740F01 ' say_! walk_left walk...
pauseevent 0x0
message 0x8740F07 ' Good Morning son!\nI...
callstd MSG_NOCLOSE ' Non-closing message
pause 0xA
closemsg
applymovement 0x1 0x8740F74 ' walk_down walk_down ...
pauseevent 0x0
disappear 0x4
setflag 0x1004
setvar 0x6001 0x1
release
end


#org 0x8740F07
= Good Morning son!\nI see you read the letter\ldad send you.\lI know exactly what he wants\lfrom you...Take care!

#org 0x8740F01
M say_! walk_left walk_left walk_left look_up end

#org 0x8740F74
M walk_down walk_down walk_down walk_down walk_down walk_left walk_left walk_left walk_left walk_left walk_left walk_left end

karatekid552

What happens if I push it?....

Male
Do you really want to know? Really?
Seen January 12th, 2015
Posted December 14th, 2014
1,771 posts
10.5 Years
hello I need help with one of my scipts I dont know if its already answered , tryed to google it couldnt find any good help so I came here.
The problems is i set the person to disappear but when i re-entered the map the person would appear again

#org 0x8740ED6
'-----------------------------------
lock
faceplayer
applymovement 0x1 0x8740F01 ' say_! walk_left walk...
pauseevent 0x0
message 0x8740F07 ' Good Morning son!\nI...
callstd MSG_NOCLOSE ' Non-closing message
pause 0xA
closemsg
applymovement 0x1 0x8740F74 ' walk_down walk_down ...
pauseevent 0x0
disappear 0x4
setflag 0x1004
setvar 0x6001 0x1
release
end


#org 0x8740F07
= Good Morning son!\nI see you read the letter\ldad send you.\lI know exactly what he wants\lfrom you...Take care!

#org 0x8740F01
M say_! walk_left walk_left walk_left look_up end

#org 0x8740F74
M walk_down walk_down walk_down walk_down walk_down walk_left walk_left walk_left walk_left walk_left walk_left walk_left end
Unless you are using Jambo's glag hack, No Flags over 0x900.

Also, did you take the flag you set and out it as the Person ID in A-Map? If you did, then that means the RAM used by flag 0x1004 is temporary and is changed upon leaving or entering the map. Again, another reason why those flags aren't safe.

Hi!

I'm using PKSV for scripting, but i've some trouble with a script that start with a trainerbattle and then continue with some other things like msgboxes, applymovement and disappears.

My first idea is:

lockall
trainerbattle
copyvar PLAYERFACING 0x800C
jump @offset

in @offset do something other.

Then i put the person event as a trainer with a certain view radius. When i go in front of trainer, he saw me, a msgbox open and the game go in crash.

So i've moved the lockall under the trainerbattle. In this way the battle starts correctly, but at the end nothing happen and the player can continue the game....if return speaking with the trainer the second part of the script was executed...but it isn't what i want.

Some ideas?
This is the info about JPAN's trainer flag script running, but it has a lot of useful info in it:

The trainer scripts have a few “myths” that must be cleared up in order to fully understand this modification:

First of all, no script is activated when the trainer spots you. That is the true reason why trying to place a normal script in that location (instead of a TrainerBattle starting one) would crash the game. The game, in fact, loads the second byte to find the type, the two following bytes for the trainer number, and so on, as activating a TrainerBattle command would normally do, even if the first bit is different. As the game error checking for the Trainer battles have been programmed to return badly if the trainer doesn’t exist, the game crashes because it loads an invalid command parameter.

Second, the Trainer flag is not really a flag. In fact, the game checks for only two possibilities in that byte: if it’s 1 or if it’s 3. 1 it’s the basic trainer activation, and the behavior we are used to see in-game. 3 is the reverse of 1, in the sense that it only detects you if you go behind the Overworld, and not facing it.

Third, the characteristic !, followed by walking to you, is not a in-game response, but rather one special, special 0x37. It usually does nothing, as when you can activate it in a script, it hasn’t got a person number, and when you have a person number, it’s because you talked to that person, and it doesn’t need to walk towards you. But the trainer routine deals with that, using a routine to set the last checked OW as the OW using the script.

Foruth, the trainer flag is checked not only when you are in front of them, but rather whenever the sprite is loaded into memory, but only runs when several conditions are met. Besides the obvious check for you in a clear path from them, it also checks for your pokémon number, and if you have at least one, it checks if you have at least one pokémon able to battle. If all conditions match, it tries to load the script data.

But, if it accesses a script, there must be a way to make it run it. As such, this hack came to be. Basically, what was done was add one extra option, where it checks if the Person event last two bytes as a flag number. If 0, it’s a normal trainer sprite, but if it’s greater than that, then it’s a flag, and it will check if it’s active. If not, runs the script asked. If it’s set, it ignores the person script. The real reason there is a flag here now is to prevent staying in a loop, where you would be constantly “harassed” by the OW. The flag is automatically set as soon as the script is placed to run, so you don’t need to place a setflag in the start of every script. Also, as an added bonus, the game will also perform automatically run a small “pre-script” that has the specials needed, making it look just like a regular trainer event.
Trainer battles do not work the way you wish. You can try trainer battle type 0x3 which usually continues the script, but it may not. The best way to get around your problem is to use a script tile.

Paired with Simba