HackMew
Mewtwo Strikes Back
- 1,314
- Posts
- 18
- Years
- Seen Oct 26, 2011
Script freezes the whole game up, its in XSE if you know what is wrong please tell me, and dont just post the revised correct script, tell me why it was wrong.
Thank you!Spoiler:Code:#dynamic 0x16649A #org @start lock faceplayer checkflag 0x800 if b_true goto @hey release end #org @hey message @hey1 boxset 6 applymovement 0x06 @move applymovement 0xFF @move1 waitmovement 0x0 goto @next release end #org @next message @buy boxset 4 message @rollin boxset 4 goto @mist release end #org @mist setweather 0x06 message @fog applymovement 0x06 @back applymovement 0xFF @follow waitmovement 0x0 goto @pop release end #org @pop applymovement 0x01 @Ahh message @poke boxset 6 cry 0xA1 88 nop nop wildbattle 0x88 0x02 0x8B 0x01 fadescreen 0 hidesprite 0x01 goto @handle release end #org @handle message @give givepokemon 0x252 0x5 0x0 0x0 0x0 0x0 fanfare 0x13E waitfanfare message @got goto @end release end #org @end message @endo fadescreen 0 hidesprite 0x06 0x00 release end #org @Ahh #raw 0x62 #raw 0xFE #org @move #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0xFE #org @move1 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x13 #raw 0x11 #raw 0xFE #org @back #raw 0x14 #raw 0x17 #raw 0xFE #org @follow #raw 0x14 #raw 0x17 #raw 0xFE #org @endo = Captain:Well I better get going\n that was some fight,bye! #org @got = [player] recieved a Ghastly! #org @give = Captain:You handled yourself really\n well back there and I am proud\p to give you this as a token\n of my appreciation. #org @poke = Wild Ghastly Appeared! #org @fog = Captain:There's a fog rolling in we\nbetter get back to the ship. #org @rollin = Alright! \nThat was a lot faster than I\nthought it would be! \p We should get back so \nSteve can start his repairs. #org @buy = Hey! Glad you made it! \nSteve called ahead. \pI've got your part right here \nHere you are. \pTravel safely now! #org @hey1 = Alright lad! We've arrived in Eastport, \ntop shipping town in all of Trophil! \pAh, there's the merchant now.
There's no need to split your script in all those parts, you're wasting all those goto. Also, after each applymovement(s) you need to put waitmovement.
After each setweather you need to use doweather, or it won't have any effect. After each msgbox/message you need to put callstd/boxset.
The cry command was wrong as well. Don't forget you must use setflag to hide a person permanently. In the fixed script I used flag 0x1001, don't forget to set the People ID accordingly.
Last, but not the lease... since I suppose it's a trigger script (those green "S" you can walk in), make sure you set the values like this:
![[PokeCommunity.com] [Archive] Script help thread [PokeCommunity.com] [Archive] Script help thread](https://i35.tinypic.com/2ev9k40.jpg)
Spoiler:
#dynamic 0x16649A
#org @start
lock
faceplayer
checkflag 0x1000
if b_true goto @hey
release
end
#org @hey
message @hey1
boxset 6
applymovement 0x06 @move
applymovement 0xFF @move1
waitmovement 0x0
message @buy
boxset 4
message @rollin
boxset 4
setweather 0x06
doweather
message @fog
boxset 6
applymovement 0x06 @back
applymovement 0xFF @follow
waitmovement 0x0
applymovement 0x01 @Ahh
waitmovement 0x0
message @poke
boxset 6
cry 0x88 0x0
wildbattle 0x88 0x02 0x8B 0x01
fadescreen 0
hidesprite 0x01
message @give
boxset 6
fanfare 0x13E
givepokemon 0x252 0x5 0x0 0x0 0x0 0x0
waitfanfare
message @got
boxset 6
message @endo
boxset 6
fadescreen 0
hidesprite 0x06 0x00
setflag 0x1001
release
end
#org @Ahh
#raw 0x62
#raw 0xFE
#org @move
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE
#org @move1
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0xFE
#org @back
#raw 0x14
#raw 0x17
#raw 0xFE
#org @follow
#raw 0x14
#raw 0x17
#raw 0xFE
#org @endo
= Captain:Well I better get going\n that was some fight,bye!
#org @got
= [player] recieved a Ghastly!
#org @give
= Captain:You handled yourself really\n well back there and I am proud\p to give you this as a token\n of my appreciation.
#org @poke
= Wild Ghastly Appeared!
#org @fog
= Captain:There's a fog rolling in we\nbetter get back to the ship.
#org @rollin
= Alright! \nThat was a lot faster than I\nthought it would be! \p We should get back so \nSteve can start his repairs.
#org @buy
= Hey! Glad you made it! \nSteve called ahead. \pI've got your part right here \nHere you are. \pTravel safely now!
#org @hey1
= Alright lad! We've arrived in Eastport, \ntop shipping town in all of Trophil! \pAh, there's the merchant now.
ok i have a script that is supposed to alert someone make them walk to me say somthing then make me follow them then give me a pokemon, i use notepad and pokescript, whenever i put the script in my game all that happens is it puts a ? above hiros head and asks yes or no, either you hit the screen goes pink
WHAT IS WRONG WITH IT:
Spoiler:#org $start
lock
checkflag 0x217
if b_true goto $released
applymovement 0x00 $moveexclam
pause 0x10
applymovement 0xFF $moveexclam
pause 0x10
applymovement 0x00 $walktome
pause 0x10
applymovemt 0x00 $finishwalk
pause 0x20
message $yourawake
boxset 6
applymovement 0x00 $computerroom
pause 0x10
applymovement 0xFF $computerroom
pause 0x50
message $pokemon
boxset 6
givepokemon 151 5 0
fanfare 0x13E
#raw 0x53 0x04 0x00
setflag 0x209
setflag 0x828
setflag 0x217
message $goodluck
boxset 6
release
end
#org $released
release
end
#org $moveexclam
#raw 0x63 0x62 0xFE
#org $walktome
#raw 0x1D 0x1F 0x1F 0x1F 0x1F 0x1F 0x1E 0x1E 0x1E
0x1E 0x1E 0xFE
#org $finishwalk
#raw 0x20 0x1E 0x13 0x13 0xFE
#org $computerroom
#raw 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0x10 0x10 0x13 0x13 0x13 0xFE
#org $yourawake
$yourawake 1 =Oh! Hey, \v\h01! I see you finnally\ndecided to wake up your DAD\lbrought you something but you wouldnt\lwake up.
#org $pokemon
$pokemon 1 =Here \v\h01! this is your 1st POKEMON\nYour DAD wanted you to have it\lYou can start your journey now.
#org $goodluck
$goodluck 1 =Good Luck!!\nTo lilfabbro! Okay This should be working\lHowever I may have forgot to\lset some variables.\lI can fix those after a next patch\lOr you can tell me what\lyou think.
If you want you can use XSE, I'm pretty sure your fixed script will work fine:
Spoiler:
#dynamic 0x800000
#org @start
lock
checkflag 0x1000
if b_true goto @released
applymovement 0x00 @moveexclam
waitmovement 0x0
applymovement 0xFF @moveexclam
waitmovement 0x0
applymovement 0x00 @walktome
waitmovement 0x0
applymovement 0x00 @finishwalk
waitmovement 0x0
message @yourawake
boxset 6
applymovement 0x00 @computerroom
waitmovement 0x0
applymovement 0xFF @computerroom
waitmovement 0x0
message @pokemon
boxset 6
fanfare 0x13E
setflag 0x828
givepokemon 151 5 0 0 0 0
waitfanfare
hidesprite 0x04
setflag 0x1000
setflag 0x1001
message @goodluck
boxset 6
release
end
#org @released
release
end
#org @moveexclam
#raw 0x63 0x62 0xFE
#org @walktome
#raw 0x1D 0x1F 0x1F 0x1F 0x1F 0x1F 0x1E 0x1E 0x1E 0x1E 0x1E 0xFE
#org @finishwalk
#raw 0x20 0x1E 0x13 0x13 0xFE
#org @computerroom
#raw 0x12 0x12 0x12 0x12 0x10 0x10 0x10 0x10 0x10 0x10 0x13 0x13 0x13 0xFE
#org @yourawake
= Oh! Hey, \v\h01! I see you finnally\ndecided to wake up your DAD\lbrought you something but you wouldnt\lwake up.
#org @pokemon
= Here \v\h01! this is your 1st POKEMON\nYour DAD wanted you to have it\lYou can start your journey now.
#org @goodluck
= Good Luck!!\nTo lilfabbro! Okay This should be working\lHowever I may have forgot to\lset some variables.\lI can fix those after a next patch\lOr you can tell me what\lyou think.
Hey I just started scripting and im trying to use a give pokemon script but its messed up when I talk to the guy it says "This tree looks like it can be cut down" heres the script.
Spoiler:#org $begin
lock
faceplayer
checkflag 0x232
if b_true goto $gotit
message $q
boxset 6
givepokemon 410 40 0
setflag 0x232
release
end
#org $gotit
message $hi
boxset 6
release
end
#org $hi
$hi 1 = Keep it away from me!
#org $q
$q 1 = I can't control it anymore\ntake it and get rid of it.
Can anyone help me?
Why not trying XSE? I fixed and adjusted the script for you:
Spoiler:
#dynamic 0x800000
#org @begin
checkflag 0x1000
if b_true goto @gotit
message @q
boxset 2
givepokemon 410 40 0 0 0 0
setflag 0x1000
release
end
#org @gotit
message @hi
boxset 6
release
end
#org @hi
= Keep it away from me!
#org @q
= I can't control it anymore\ntake it and get rid of it.
Ugh. I am sorry for being such a total noob at this, but I cannot get this damned scripting to work for the life of me. I'm also entirely unsure if I'm using XSE correctly, so allow me to throw myself at your mercy and admit my own lack of competence :(
Okay. So I have this PART of a script I'm working with.
Spoiler:'-----------------------
#dynamic 0x801020
#org @start
checkflag 0x4000
if b_true goto @oak1
#org @oak1
applymovement MOVE_PLAYER 0x801001
#org 801001
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 11 'Step Up (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 12 'Step Left (Normal)
#raw 2E 'Face Up (Delayed)
#raw FE 'End of Movements
release
end
What I'm trying to do exactly is have this character walk into Oak's lab, walk up three spaces and over seven to the left, look up and then talk to him about whatever I choose. Then, select one of the three pokeballs between the two, with that nice little picture popping up and the "DO YOU CHOOSE SO AND SO TO BE YOUR LAWFULLY WEDDED WI--I MEAN POKEMON COMPANION" jazz to go on. However, I can't get the script to work and also, whenever I try to compile it I get two new numbers at the bottom, so I substitute those into the script and then I get two entirely new numbers.
Also, what would you suggest I should use to check for the unused flags? I don't really know what to use to do that.
As I said, I used to know what I was doing and now I do not. I've spent hours examining the scripts in the original game to do so, and I've confused myself into scripted oblivion. Help!
Your script is as confused as you, indeed.
See the fixed one, and hopefully you'll learn something new:
Spoiler:
#dynamic 0x801020
#org @start
checkflag 0x1000
if b_true goto @oak1
end
#org @oak1
applymovement MOVE_PLAYER @movements
waitmovement 0x0
end
#org @movements
#raw 11
#raw 11
#raw 11
#raw 12
#raw 12
#raw 12
#raw 12
#raw 12
#raw 12
#raw 12
#raw 2E
#raw FE
English:
Exists some command that reads the byte ofrom a pointer in the RAM, and put in an variable to be able to use later (compare, addvar, subvar, …)?
I tried loadpointer (0F) and loadbytefrompointer (12) but they had not functioned.
No, there isn't. What are you trying to do?
Spoiler:
#dynamic 0x71ACB8
#org @start
faceplayer
lock
checkflag 0x1001
if 0x1 goto @done
msgbox @text
boxset 0x6
fadescreen 0x1
msgbox @Huh?What?
boxset 0x5
if 0x1 goto @Huh?
if 0x0 goto @What?
msgbox @Huh?
boxset 0x5
if 0x1 goto @Inverse
if 0x0 goto @Blurry
msgbox @What?
boxset 0x5
if 0x1 goto @Inverse
if 0x0 goto @Blurry
msgbox @Inverse
boxset 0x6
msgbox @Blurry
boxset 0x6
fadescreen 0x0
release
end
#org @text
= ...............\n...............\lYnitsed on si ereht.
#org @Huh?What?
= You are not a hero nor a villian.\p\v\h01:Huh?\pThere is no fate for you nor is\n there ___ for others.
#org @Huh?
= You have lots to learn...\nTell me this how do you\l feel in this place?
#org @What?
= You have lots to learn...\nTell me this how do you\l feel in this place?
#org @Inverse
= I see..this is because that\n feeling is the entity that is me..\lI will see you when A dons stars.
#org @Blurry
= I see..this is because that\n feeling is the entity that is me..\lI will see you when A dons stars.
#org @done
release
end
It resets if the player picks Yes, and freezes if the player pick no, on the first question box.
Well, please take a really close look to the fixed script:
Spoiler:
#dynamic 0x71ACB8
#org @start
faceplayer
lock
checkflag 0x1001
if 0x1 goto @done
msgbox @text
boxset 0x6
fadescreen 0x1
msgbox @Huh?What?
boxset 0x5
compare LASTRESULT B_YES
if B_TRUE goto @firstyes
else call @firstno
end
#org @firstyes
msgbox @Huh?
boxset 0x6
call @second
end
#org @firstno
msgbox @What?
boxset 0x6
call @second
end
#org @second
msgbox @Huh?
boxset 0x5
compare LASTRESULT B_YES
if B_TRUE goto @secondyes
else call @secondno
end
#org @secondyes
msgbox @Inverse
boxset 0x6
call @third
end
#org @secondno
msgbox @Blurry
boxset 0x6
call @third
end
#org @third
msgbox @What?
boxset 0x5
compare LASTRESULT B_YES
if B_TRUE goto @thirdyes
else call @thirdno
end
#org @thirdyes
msgbox @Inverse
boxset 0x6
call @last
end
#org @thirdno
msgbox @Blurry
boxset 0x6
call @last
end
#org @last
msgbox @Inverse
boxset 0x6
msgbox @Blurry
boxset 0x6
fadescreen 0x0
release
end
#org @done
release
end
#org @text
= ...............\n...............\lYnitsed on si ereht.
#org @Huh?What?
= You are not a hero nor a villian.\p\v\h01:Huh?\pThere is no fate for you nor is\n there ___ for others.
#org @Huh?
= You have lots to learn...\nTell me this how do you\l feel in this place?
#org @What?
= You have lots to learn...\nTell me this how do you\l feel in this place?
#org @Inverse
= I see..this is because that\n feeling is the entity that is me..\lI will see you when A dons stars.
#org @Blurry
= I see..this is because that\n feeling is the entity that is me..\lI will see you when A dons stars.