The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script Help Thread (DO NOT REQUEST SCRIPTS) (https://www.pokecommunity.com/showthread.php?t=163576)

StrickeN June 9th, 2009 10:27 PM

I am having trouble with the script for applying a movement.

Firered

I don't know the script I'm new to applymovement and I REALLy don't know what to put here, I have googled a LOT so i just took a screen cap and hope it works.

I basically need to make oak stop me from going wilderness (indicated by black dots) and make me go to his house. The reason this is difficult is... I moved his house :/


Please help. Thank you

PI Hudson June 9th, 2009 11:07 PM

Quote:

Originally Posted by HackMew (Post 4733702)
Quote:

Oh, I was wondering because the Battle Pyramid can check for hold items, since it doesn't allow them.
Did you check the scripts there? I'm pretty sure some specials are used.

The special used is 0xEA(#234). It is used quite repetitively in this script, but it is the only one in the place checked.
I know the special command calls a 'special event'.
Is there a way to view this 'special event' and see how it works, edit it and such, or make a ASM code based off of it?
I'm still trying to learn ASM so this might be helpful to me to view this kind of stuff.

HackMew June 10th, 2009 1:24 AM

Quote:

Originally Posted by mrhiyuck (Post 4734015)
Oh that got it working. Thank you so much!

You're welcome.


Quote:

Originally Posted by PlatniumPiano (Post 4734361)
I'm redesining the script for my first Pokemon in my hack... The problem is when the flag has been set. If the flag is not set, the script works fine, but when the flag is set, it automatically goes to the script in which it was not set.

Is this because the flag was set on a different map? Or something else (yes I set person id to 950)?
[/CODE]

Yes, that's the problem. You can't use a flag for different things. Use another flag.


Quote:

Originally Posted by Xatoku (Post 4734371)
I've asked this before but nobody's answered so here it is again,

In this script everything works 100% except that after the trainerbattle, sprite 0x5 on the screen changes colour. Could somebody tell me the proper settings I should give the sprite?

Instead of asking again (which isn't allowed at all), why don't you post your current settings?


Quote:

Originally Posted by StrickeN (Post 4734479)
I am having trouble with the script for applying a movement.

Firered

I don't know the script I'm new to applymovement and I REALLy don't know what to put here, I have googled a LOT so i just took a screen cap and hope it works.

I basically need to make oak stop me from going wilderness (indicated by black dots) and make me go to his house. The reason this is difficult is... I moved his house :/


Please help. Thank you

There are tutorials about how to make movements, so just check them out.


Quote:

Originally Posted by PI Hudson (Post 4734537)
The special used is 0xEA(#234). It is used quite repetitively in this script, but it is the only one in the place checked.
I know the special command calls a 'special event'.
Is there a way to view this 'special event' and see how it works, edit it and such, or make a ASM code based off of it?
I'm still trying to learn ASM so this might be helpful to me to view this kind of stuff.

I've seen many specials there, actually: 0x28 0x29 0x60 0xEA 0xF5 0xF8. So you should make sure what is used for what. Besides, I think you need something to check if a Pokémon is holding a particular item, right? In that case those special(s) probably won't help since they're only used to check if a Pokémon is not holding any items, as far as I understood.

PlatniumPiano June 10th, 2009 7:46 AM

Quote:

Originally Posted by HackMew (Post 4734773)
Yes, that's the problem. You can't use a flag for different things. Use another flag.

But what if I want that event to happen only if other said event has happened. I don't want him to give me the pokemon whenever, just after a different event. Is there a way to do this?

Xatoku June 10th, 2009 8:15 AM

Quote:

Originally Posted by HackMew (Post 4734773)
Instead of asking again (which isn't allowed at all), why don't you post your current settings?

Well 0x5 has Unkown 03, Movement 11 and Person ID 002c

Spoiler:
#dynamic 0x800000

#org @start
checkflag 0x368
if 0x1 goto @end
lockall
msgbox @text1 0x6
applymovement 0x4 @move1
waitmovement 0x0
applymovement 0x4 @move2
waitmovement 0x0
pause 0x25
applymovement MOVE_PLAYER @move3
waitmovement 0x0
hidesprite 0x4
showsprite 0x6
msgbox @text2 0x6
applymovement MOVE_PLAYER @move4
waitmovement 0x0
givepokemon 0x9E 0x5 0x0 0x0 0x0 0x0
hidesprite 0x2
fanfare 0x13E
msgbox @text3 0x4
waitfanfare
closeonkeypress
playsong 0x13B 0x0
msgbox @text4 0x6
showsprite 0x5
applymovement MOVE_PLAYER @move1
waitmovement 0x0
applymovement MOVE_PLAYER @move7
waitmovement 0x0
applymovement 0x5 @move5
waitmovement 0x0
msgbox @text5 0x6
applymovement 0x5 @move8
waitmovement 0x0
hidesprite 0x3
pause 0x10
applymovement 0x5 @move9
waitmovement 0x0
setvar 0x7030 0x129
setvar 0x7033 0x158
trainerbattle 0x9 0x2E5 0x0 @before @no
setvar 0x7030 0x158
setvar 0x7033 0x129
applymovement MOVE_PLAYER @move6
waitmovement 0x0
msgbox @text6 0x6
setflag 0x368
releaseall
warp 0x3 0x1 0x2 0x0 0x0
end

#org @end
releaseall
end

#org @text1
= [red_fr][Player]:[black_fr] Hey you!

#org @text2
= [red_fr][Player]:[black_fr] That takes care of him.\nNow for Totodile.

#org @text3
= [red_fr][Player][black_fr] stole the [navyblue_fr]Totodile.[black_fr]

#org @text4
= ???: Hey, you can't take that!

#org @text5
= [orange_fr]Gold:[black_fr] My names Gold, and you're\nthe thief who stole my backpack!\p[red_fr][Player]:[black_fr] What backpack?\p[orange_fr]Gold:[black_fr] Don't act like you don't\nknow!\p[orange_fr]Gold:[black_fr] You'll pay for what you did!

#org @before
= [orange_fr]Gold:[black_fr] Here goes!

#org @no
= Argh, he's strong!

#org @text6
= [orange_fr]Gold:[black_fr] You won't get away with this!

#org @move1
#raw 0x62
#raw 0xFE

#org @move2
#raw 0x03
#raw 0xFE

#org @move3
#raw 0x50
#raw 0x51
#raw 0x02
#raw 0xFE

#org @move4
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0xFE

#org @move5
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1E
#raw 0xFE

#org @move6
#raw 0x15
#raw 0x15
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x01
#raw 0xFE

#org @move7
#raw 0x00
#raw 0xFE

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

#org @move9
#raw 0x10
#raw 0x12
#raw 0x01
#raw 0xFE

adiktus June 10th, 2009 8:17 AM

Quote:

Originally Posted by PlatniumPiano (Post 4735485)
But what if I want that event to happen only if other said event has happened. I don't want him to give me the pokemon whenever, just after a different event. Is there a way to do this?

You're looking at the wrong spot. The givepokemon part would occur only when flag 950 (which I assume is the flag in another map) is set, so no problem there.

Hackmew meant that to use another flag for the @done part. Without the flag, the person will always ask you if you want a ponyta.

Fixes in bold and red O_o

Code:

#dynamic 0x800000

#org @start
checkflag 0x950
if 0x1 goto @done
lock
faceplayer
msgbox @whatsup 0x6
release
end

#org @ponyta
setflag 0xaaa
msgbox @give 0x6
givepokemon 0x4D 0xF 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @obtain 0x6
waitfanfare
msgbox @would 0x5
compare LASTRESULT 0x1
if 0x1 call @name
msgbox @call 0x6
setflag 0x800
release
end

#org @done
checkflag 0xaaa
if 1 goto @offset

lock
faceplayer
msgbox @hey 0x5
compare LASTRESULT 0x1
if 0x1 goto @ponyta
msgbox @sorry 0x6
release
end

#org @name
fadescreen 0x1
special 0x9E
waitstate
return

#org @offset
lock
faceplayer
message @message 6
release
end

#org @message
= You've got a Ponyta already.

#org @hey
= Hey, [player], what brings you\nhere on my day off?\p... ... ...\n... .... ...\l... ... ...\l... ... ...\pYou can't be serious...\n...Mew?\pWell, if this is true, then\nI guess you will need a POKéMON.

#org @give
= That's a wise choice.\pIt's not often you have\nan encounter with Mew.

#org @obtain
= You got a Ponyta!

#org @would
= Would you like to give a\nnickname to this POKéMON?

#org @call
= Well... we got you a\nPOKéMON.\lNow what?\p... ... ...\n... ... ...\lLord Aspen, eh?\pListen, Aspen is a seasoned POKéMON\nveteran, so with that guy there,\lI doubt you could win.\pHowever.\pIf you must, there is a cavern\nwhere you can train that\lhorse, located in the caves, one level above Aspens.

#org @whatsup
= Hey, [player], what's up?

#org @sorry
= Oh...\nWell, I'm sorry to hear that.


Just replace aaa with an unused flag. (or flag 800.. well, maybe 800 is better -_-)

Of course, I could have misunderstood you. If you meant that whether or not the flag is set, the person always says @whatsup, then nevermind the above fixes and try using another flag.

Quote:

Originally Posted by Xatoku (Post 4735538)
Well 0x5 has Unkown 03, Movement 11 and Person ID 002c

Spoiler:
#dynamic 0x800000

#org @start
checkflag 0x368
if 0x1 goto @end
lockall
msgbox @text1 0x6
applymovement 0x4 @move1
waitmovement 0x0
applymovement 0x4 @move2
waitmovement 0x0
pause 0x25
applymovement MOVE_PLAYER @move3
waitmovement 0x0
hidesprite 0x4
showsprite 0x6
msgbox @text2 0x6
applymovement MOVE_PLAYER @move4
waitmovement 0x0
givepokemon 0x9E 0x5 0x0 0x0 0x0 0x0
hidesprite 0x2
fanfare 0x13E
msgbox @text3 0x4
waitfanfare
closeonkeypress
playsong 0x13B 0x0
msgbox @text4 0x6
showsprite 0x5
applymovement MOVE_PLAYER @move1
waitmovement 0x0
applymovement MOVE_PLAYER @move7
waitmovement 0x0
applymovement 0x5 @move5
waitmovement 0x0
msgbox @text5 0x6
applymovement 0x5 @move8
waitmovement 0x0
hidesprite 0x3
pause 0x10
applymovement 0x5 @move9
waitmovement 0x0
setvar 0x7030 0x129
setvar 0x7033 0x158
trainerbattle 0x9 0x2E5 0x0 @before @no
setvar 0x7030 0x158
setvar 0x7033 0x129
applymovement MOVE_PLAYER @move6
waitmovement 0x0
msgbox @text6 0x6
setflag 0x368
releaseall
warp 0x3 0x1 0x2 0x0 0x0
end

#org @end
releaseall
end

#org @text1
= [red_fr][Player]:[black_fr] Hey you!

#org @text2
= [red_fr][Player]:[black_fr] That takes care of him.\nNow for Totodile.

#org @text3
= [red_fr][Player][black_fr] stole the [navyblue_fr]Totodile.[black_fr]

#org @text4
= ???: Hey, you can't take that!

#org @text5
= [orange_fr]Gold:[black_fr] My names Gold, and you're\nthe thief who stole my backpack!\p[red_fr][Player]:[black_fr] What backpack?\p[orange_fr]Gold:[black_fr] Don't act like you don't\nknow!\p[orange_fr]Gold:[black_fr] You'll pay for what you did!

#org @before
= [orange_fr]Gold:[black_fr] Here goes!

#org @no
= Argh, he's strong!

#org @text6
= [orange_fr]Gold:[black_fr] You won't get away with this!

#org @move1
#raw 0x62
#raw 0xFE

#org @move2
#raw 0x03
#raw 0xFE

#org @move3
#raw 0x50
#raw 0x51
#raw 0x02
#raw 0xFE

#org @move4
#raw 0x13
#raw 0x13
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0xFE

#org @move5
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1E
#raw 0xFE

#org @move6
#raw 0x15
#raw 0x15
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x01
#raw 0xFE

#org @move7
#raw 0x00
#raw 0xFE

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

#org @move9
#raw 0x10
#raw 0x12
#raw 0x01
#raw 0xFE

Could that be the sprite switch bug?

Probably not :\

Xatoku June 10th, 2009 8:58 AM

Quote:

Originally Posted by adiktus (Post 4735543)

Could that be the sprite switch bug?


Probably not :\

In this glitch, do 2 sprites on screen switch colour? Because that seems to be what's happening.

adiktus June 10th, 2009 9:03 AM

Quote:

Originally Posted by Xatoku (Post 4735629)
In this glitch, do 2 sprites on screen switch colour? Because that seems to be what's happening.

Well... sprite switch bug is... after a battle, your player's sprite changes (and colors to boot) and you'll have a limited movement. :\ Maybe yours is a similar glitch.. Try deleting the two persons in amap, then creating them again?

BlitŻ June 10th, 2009 2:22 PM

Hack of fire red
I'm using XSE
And here's my scipt. Btw its a level sciprt
Spoiler:
#dynamic 0x800AE6
#org @start
setvar 0x7002 0x1
pause 0x20
setflag 0x1000
applymovement 0x01 @move
waitmovement 0x0
msgbox @1 0x6
applymovement 0x01 @move1
waitmovement 0x0
release
end
#org @move
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x03
#raw 0xFE
#org @move1
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0xFE

#org @1
= [red_fr]Grandma[black_fr]: Good morning sweetie. Did\nyou sleep good? You must've been\ltired from the trip from Orre.\p\v\h01: Yeah grandma. The guest\lroom is really comfortable.\p[red_fr]Grandma[black_fr]: Good, now, before you can\lgo off and play with your cousin,-\p\v\h01: Wait, when do I get my\lpokemon grandma, my parents promised\lme I would get one here.\p[red_fr]Grandma[black_fr]: Okay, since you really\lwant one, go to Dr. Cean's lab up\lnorth of here and tell him that I\lsent you. It should be pretty easy\lto find. But after you're\ldone come back down here to my\lhouse. I have a favor of you.\p\v\h01:Okay grandma, see you\llater!
#org @end
release
end


Wheni come into the room, everything works and such, but when the script is done, there's a textbox, showing random mumbo jumbo and symbols and such.
So any idea on how to stop said problem from happening?

Quickster June 10th, 2009 2:27 PM

Quote:

Originally Posted by PI Hudson (Post 4731111)
QUESTION: Is there a way to check if a pokemon is holding an item?




It works like this
-When you enter a map, it looks for level scripts
-In Oaks Lab, the script your looking for is #2
-If it is a #2 or 4 script, it looks at the Variable Flag (for this, it is 4055)
-It checks that this Variable for its Value (set previously, default is 0000) and if it isn't equal to the number given in the Map script, it doesn't activate. But if it is equal, it does activate.
(if MAP-VALUE>VAR-VALUE=not activate, if MAP-VALUE<VAR-VALUE=not activate, if MAP-VALUE=VAR-VALUE=activate)

In the script tile that we step on in Pallet Town to activate the script, we see this.


This means the next time we enter the Oaks Lab, the script will activate.

But, why doesn't it activate again?
In the Oaks Lab Level script, we observe this


This make it so you don't see this script again until the Var Value is equal again.

People kind of act the same way, but with flags.




Your welcome.


Ive been trying to make a script using this but its just not working. I can enter the area and it does the script,not supposed to do that.If i talk to the person and then warp to it, it doesnt work at all.
First is a person event.
Spoiler:

#dynamic 0x8006F3

#org @start
applymovement 0x8 @m1
msgbox @1 0x6
cry 0x11E 0x0
showsprite 0x9
applymovement 0x9 @m1
waitmovement 0x0
applymovement 0xFF @m2
waitmovement 0x0
warp 0xF 0x0 0x1 0x0 0x0
setvar 0x7000 0x1
release
end

#org @1
= POOCHYENA: Rawrr!

#org @m1
#raw 0x11
#raw 0x60
#raw 0xFE

#org @m2
#raw 0x11
#raw 0x11
#raw 0xFE

Second is a level script.
Spoiler:

#dynamic 0x8007D1

#org @start
LOCKALL
setvar 0x7001 0x1
setvar 0x7000 0x2
applymovement 0x4 @m1
applymovement 0x3 @m1
waitmovement 0x0
applymovement 0xFF @m2
waitmovement 0x0
warp 0x3 0x15 0x0 0x0 0x0
end

#org @m1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x60
#raw 0xFE

#org @m2
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

It also continues to a third,which is another level script.
Spoiler:

#dynamic 0x80112A

#org @start
applymovement 0xFF @m1
waitmovement 0x0
msgbox @1 0x6
hidesprite 0xD
applymovement 0xE @m2
waitmovement 0x0
trainerbattle 0x1 0x001 0x0 @before @after @later
release
end

#org @before
= Is this your PIKACHU?\p......\pI see.\nMy POOCHYENA ran off when I ran\linto a bug POKeMON.\pBy the way, my name is SAM. Your\nPIKACHU looks like it wants to\lbattle, how bout it?\p...\pGreat, lets go!

#org @after
= You're pretty strong!

#org @later
hidesprite 0xC
msgbox @2 0x5
compare lastresult 0x1
if 0x1 gosub @give
msgbox @3 0x6
applymovement 0xE @m3
hidesprite 0xE
setflag 0x1006
release
end

#org @give
givepokemon 0x11E 0x4 0x0 0x0 0x0 0x0
return

#org @1
= Return, POOCHYENA!

#org @2
= That was a tough battle!\pI only lost because my POOCHYENA\nwent easy on you,heh heh...\pSince it seems to like you so\nmuch, how bout taking him for me?

#org @3
= Well, I'll be seeing you around\nthen!

#org @m1
#raw 0x11
#raw 0xFE

#org @m2
#raw 0x10
#raw 0xFE

#org @m3
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

Kalsard June 11th, 2009 12:50 AM

Spoiler:
Quote:

Originally Posted by jebees (Post 4736608)
Hack of fire red
I'm using XSE
And here's my scipt. Btw its a level sciprt
Spoiler:
#dynamic 0x800AE6
#org @start
setvar 0x7002 0x1
pause 0x20
setflag 0x1000
applymovement 0x01 @move
waitmovement 0x0
msgbox @1 0x6
applymovement 0x01 @move1
waitmovement 0x0
release
end
#org @move
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x03
#raw 0xFE
#org @move1
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0xFE

#org @1
= [red_fr]Grandma[black_fr]: Good morning sweetie. Did\nyou sleep good? You must've been\ltired from the trip from Orre.\p\v\h01: Yeah grandma. The guest\lroom is really comfortable.\p[red_fr]Grandma[black_fr]: Good, now, before you can\lgo off and play with your cousin,-\p\v\h01: Wait, when do I get my\lpokemon grandma, my parents promised\lme I would get one here.\p[red_fr]Grandma[black_fr]: Okay, since you really\lwant one, go to Dr. Cean's lab up\lnorth of here and tell him that I\lsent you. It should be pretty easy\lto find. But after you're\ldone come back down here to my\lhouse. I have a favor of you.\p\v\h01:Okay grandma, see you\llater!
#org @end
release
end


Wheni come into the room, everything works and such, but when the script is done, there's a textbox, showing random mumbo jumbo and symbols and such.
So any idea on how to stop said problem from happening?


Well, maybe its because your not refactoring the script, after you do some edits? Change decompile options to strict and refactorised, then put that in.

PI Hudson June 11th, 2009 3:41 AM

Quote:

Originally Posted by Quickster (Post 4736624)
Ive been trying to make a script using this but its just not working. I can enter the area and it does the script,not supposed to do that.If i talk to the person and then warp to it, it doesnt work at all.

So the changes in red are the things I assume.
The things I would change are in BOLD
I also assume that the level scripts are #02
Spoiler:
First is a person event.
Spoiler:
#org @start
applymovement 0x8 @m1
msgbox @1 0x6
cry 0x11E 0x0
showsprite 0x9
applymovement 0x9 @m1
waitmovement 0x0
applymovement 0xFF @m2
waitmovement 0x0
setvar 0x7000 0x1--\/
/\--warp 0xF 0x0 0x1 0x0 0x0
'---warp basically ends a script, so don't place anything needed after it
release
end

Second is a level script.
Spoiler:

'--- ADV map settings --- Var Flag-7000;Var Value-00000001 '---this is probably the reason the script activates anyway, and also didn't activate when you used the previous script
#org @start
lockall
setvar 0x7001 0x1 '---you don't really need this because you can still use var 7000,
'---I try not to waste variables. even if it is just one.
setvar 0x7000 0x2
applymovement 0x4 @m1
applymovement 0x3 @m1
waitmovement 0x0
applymovement 0xFF @m2
waitmovement 0x0
warp 0x3 0x15 0x0 0x0 0x0
releaseall '--- if you lockall you release all, even if you warped
end

It also continues to a third,which is another level script.
Spoiler:

'--- ADV map settings --- Var Flag-70017000;Var Value-00010002 '---changes explained before
#org @start
...
I am slightly new at this as you can see from my join date, but I think I understand the concept enough. Test it out and give the results, or maybe someone else will tell you a better solution.



Quote:

Originally Posted by jebees (Post 4736608)
Hack of fire red
I'm using XSE
And here's my scipt. Btw its a level sciprt
Spoiler:
#dynamic 0x800AE6
#org @start
setvar 0x7002 0x1
pause 0x20
setflag 0x1000
applymovement 0x01 @move
waitmovement 0x0
msgbox @1 0x6
applymovement 0x01 @move1
waitmovement 0x0
release
end
#org @move
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x03
#raw 0xFE
#org @move1
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0xFE

#org @1
= [red_fr]Grandma[black_fr]: Good morning sweetie. Did\nyou sleep good? You must've been\ltired from the trip from Orre.\p\v\h01: Yeah grandma. The guest\lroom is really comfortable.\p[red_fr]Grandma[black_fr]: Good, now, before you can\lgo off and play with your cousin,-\p\v\h01: Wait, when do I get my\lpokemon grandma, my parents promised\lme I would get one here.\p[red_fr]Grandma[black_fr]: Okay, since you really\lwant one, go to Dr. Cean's lab up\lnorth of here and tell him that I\lsent you. It should be pretty easy\lto find. But after you're\ldone come back down here to my\lhouse. I have a favor of you.\p\v\h01:Okay grandma, see you\llater!
#org @end
release
end


Wheni come into the room, everything works and such, but when the script is done, there's a textbox, showing random mumbo jumbo and symbols and such.
So any idea on how to stop said problem from happening?

It could be that you chose the wrong option in a-map, try #2, or #4. or like Kalsard said, the compile process might have been done wrong.

adiktus June 11th, 2009 4:31 AM

Quote:

Originally Posted by jebees (Post 4736608)
Hack of fire red
I'm using XSE
And here's my scipt. Btw its a level sciprt
Spoiler:
#dynamic 0x800AE6
#org @start
setvar 0x7002 0x1
pause 0x20
setflag 0x1000
applymovement 0x01 @move
waitmovement 0x0
msgbox @1 0x6
applymovement 0x01 @move1
waitmovement 0x0
release
end
#org @move
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x03
#raw 0xFE
#org @move1
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0xFE

#org @1
= [red_fr]Grandma[black_fr]: Good morning sweetie. Did\nyou sleep good? You must've been\ltired from the trip from Orre.\p\v\h01: Yeah grandma. The guest\lroom is really comfortable.\p[red_fr]Grandma[black_fr]: Good, now, before you can\lgo off and play with your cousin,-\p\v\h01: Wait, when do I get my\lpokemon grandma, my parents promised\lme I would get one here.\p[red_fr]Grandma[black_fr]: Okay, since you really\lwant one, go to Dr. Cean's lab up\lnorth of here and tell him that I\lsent you. It should be pretty easy\lto find. But after you're\ldone come back down here to my\lhouse. I have a favor of you.\p\v\h01:Okay grandma, see you\llater!
#org @end
release
end


Wheni come into the room, everything works and such, but when the script is done, there's a textbox, showing random mumbo jumbo and symbols and such.
So any idea on how to stop said problem from happening?

Well, if the above suggestions don't work, maybe this would help? Dunno... :\

Um, do you have a hex editor?

If so, open it and load the rom. In amap, go to the map with the level script, and then non professional header view.. Select the level script, then note the offset under "Script offset:" and go to that offset in the hex editor. There should be something like "02 70 01 00 XX XX XX 08" where XX is a pointer to the level script itself (the offset of the level script, reversed). Post the next 2 bytes after 08 here.

If not, open that offset (same, non-prof header view, under "Script offset") in xse and post what the decompiled script is. :\

Quickster June 11th, 2009 6:21 AM

Quote:

Originally Posted by PI Hudson (Post 4738096)
So the changes in red are the things I assume.
The things I would change are in BOLD
I also assume that the level scripts are #02
Spoiler:
First is a person event.
Spoiler:
#org @start
applymovement 0x8 @m1
msgbox @1 0x6
cry 0x11E 0x0
showsprite 0x9
applymovement 0x9 @m1
waitmovement 0x0
applymovement 0xFF @m2
waitmovement 0x0
setvar 0x7000 0x1--\/
/\--warp 0xF 0x0 0x1 0x0 0x0
'---warp basically ends a script, so don't place anything needed after it
release
end

Second is a level script.
Spoiler:

'--- ADV map settings --- Var Flag-7000;Var Value-00000001 '---this is probably the reason the script activates anyway, and also didn't activate when you used the previous script
#org @start
lockall
setvar 0x7001 0x1 '---you don't really need this because you can still use var 7000,
'---I try not to waste variables. even if it is just one.
setvar 0x7000 0x2
applymovement 0x4 @m1
applymovement 0x3 @m1
waitmovement 0x0
applymovement 0xFF @m2
waitmovement 0x0
warp 0x3 0x15 0x0 0x0 0x0
releaseall '--- if you lockall you release all, even if you warped
end

It also continues to a third,which is another level script.
Spoiler:

'--- ADV map settings --- Var Flag-70017000;Var Value-00010002 '---changes explained before
#org @start
...
I am slightly new at this as you can see from my join date, but I think I understand the concept enough. Test it out and give the results, or maybe someone else will tell you a better solution.



It could be that you chose the wrong option in a-map, try #2, or #4. or like Kalsard said, the compile process might have been done wrong.


Thank you very much! I {have pretty much understood this now.I had no value in a map,so nothing happened.

DarkPrince304 June 11th, 2009 6:45 AM

Can anyone tell me that is there a script by which we can release a pokemon forever from our party

dimitriguy June 11th, 2009 7:08 AM

When i try to do the give pokemon script and compile it it says that there isnt enough bytes. I tried to use an offset with a higher byte ( it was 256 before and i changed it to 512) and it still didnt work.

Quickster June 11th, 2009 7:56 AM

Quote:

Originally Posted by dimitriguy (Post 4738550)
When i try to do the give pokemon script and compile it it says that there isnt enough bytes. I tried to use an offset with a higher byte ( it was 256 before and i changed it to 512) and it still didnt work.

Can you post the script,its probably in the script where you messed up.

dimitriguy June 11th, 2009 9:14 AM

Quote:

Originally Posted by Quickster (Post 4738749)
Can you post the script,its probably in the script where you messed up.

Spoiler:
#dynamic 0x800000

#org @start
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x6
release
end

#org @take
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @done
msgbox @6 0x6
release
end

#org @1
= Hello.\nSorry to trouble you.\nI can't take care\nof my Charmander.\pCan you take care of\nit for me?

#org @2
= That's okay.\pI'm sure someone else will\ntake it.

#org @3
= [black_fr]You received a Charmander!

#org @4
= [black_fr]Would you like to give a\nnickname to Charmander?

#org @5
= Please take care of\nCharmander.

#org @6
= Are you taking good care\nof Charmander?

Quickster June 11th, 2009 9:58 AM

Quote:

Originally Posted by dimitriguy (Post 4739032)
Spoiler:
#dynamic 0x800000

#org @start
checkflag 0x828
if 0x1 goto @done
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x6
release
end

#org @take
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @done
msgbox @6 0x6
release
end

#org @1
= Hello.\nSorry to trouble you.\nI can't take care\nof my Charmander.\pCan you take care of\nit for me?

#org @2
= That's okay.\pI'm sure someone else will\ntake it.

#org @3
= [black_fr]You received a Charmander!

#org @4
= [black_fr]Would you like to give a\nnickname to Charmander?

#org @5
= Please take care of\nCharmander.

#org @6
= Are you taking good care\nof Charmander?

Spoiler:
#dynamic 0x801000

#org @start
checkflag 0x828
if 0x1 goto @done
lock
faceplayer
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x2
release
end

#org @take
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x2
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @done
msgbox @6 0x2
release
end

#org @1
= Hello.\nSorry to trouble you.\lI can't take care of my\lCharmander.\pCan you take care of\nit for me?

#org @2
= That's okay.\pI'm sure someone else will\ntake it.

#org @3
= [black_fr]You received a Charmander!

#org @4
= [black_fr]Would you like to give a\nnickname to Charmander?

#org @5
= Please take care of\nCharmander.

#org @6
= Are you taking good care\nof Charmander?


This should work,yours worked fine for me but i fixed up the text a bit.

dimitriguy June 11th, 2009 10:05 AM

Quote:

Originally Posted by Quickster (Post 4739198)
Spoiler:
#dynamic 0x801000

#org @start
checkflag 0x828
if 0x1 goto @done
lock
faceplayer
msgbox @1 0x5
compare LASTRESULT 0x1
if 0x1 goto @take
msgbox @2 0x2
release
end

#org @take
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x2
waitfanfare
closeonkeypress
setflag 0x828
msgbox @4 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @5 0x6
release
end

#org @name
call 0x1A74EB
return

#org @done
msgbox @6 0x2
release
end

#org @1
= Hello.\nSorry to trouble you.\lI can't take care of my\lCharmander.\pCan you take care of\nit for me?

#org @2
= That's okay.\pI'm sure someone else will\ntake it.

#org @3
= [black_fr]You received a Charmander!

#org @4
= [black_fr]Would you like to give a\nnickname to Charmander?

#org @5
= Please take care of\nCharmander.

#org @6
= Are you taking good care\nof Charmander?


This should work,yours worked fine for me but i fixed up the text a bit.

just to point out that im doing this on emerald s i might have used a wrong hexnumber/code thing (sorry im new to scripting).

thanks for the help btw.

BOBcorevette June 11th, 2009 5:28 PM

1 Attachment(s)
I am trying to make an person event to give a pokemon, but when ever i try to talk to the person it just locks, cause i hear the music but cant move, i never does the face player or any messages, i am new to scripting so its probably something simple but i have compared it to working scripts and it looks right.

liuyanghejerry June 11th, 2009 7:02 PM

Quote:

Originally Posted by BOBcorevette (Post 4740549)
I am trying to make an person event to give a pokemon, but when ever i try to talk to the person it just locks, cause i hear the music but cant move, i never does the face player or any messages, i am new to scripting so its probably something simple but i have compared it to working scripts and it looks right.

I'm not sure but is there a flag 0x950?? Looks too large.If you are hacking FR/LG/R/S,try flag 0x10;if you're hacking E,try flag 0x933.
I didn't use PKSV recently,that's what I can point out.

adiktus June 11th, 2009 7:45 PM

Quote:

Originally Posted by BOBcorevette (Post 4740549)
I am trying to make an person event to give a pokemon, but when ever i try to talk to the person it just locks, cause i hear the music but cant move, i never does the face player or any messages, i am new to scripting so its probably something simple but i have compared it to working scripts and it looks right.

Have you changed the bug catcher's script in amap? That's the only possible problem I can see for now. :\

BOBcorevette June 11th, 2009 8:26 PM

1 Attachment(s)
adiktus --im not sure what you mean but i put a pic up of my event in amap so hopefully you can help me understand

liuyanghejerry -i have tried various flags from 0x950 to 0x300 to 0xzzzz to now 0x10 but none worked(its firered)
here is a picture in amap maybe i am screw something up here
and thanks for your suggestions so far:classic:

adiktus June 11th, 2009 10:44 PM

Quote:

Originally Posted by BOBcorevette (Post 4741033)
adiktus --im not sure what you mean but i put a pic up of my event in amap so hopefully you can help me understand

liuyanghejerry -i have tried various flags from 0x950 to 0x300 to 0xzzzz to now 0x10 but none worked(its firered)
here is a picture in amap maybe i am screw something up here
and thanks for your suggestions so far:classic:

Hmmm... instead of $8801000 put $801000.

The first 8 is.. kinda like a prefix, which states that the offset is only 6 digits long (in hex), and isn't truly part of the offset.


All times are GMT -8. The time now is 2:55 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 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 - 2016 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.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.