• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.
OK... I created a script, this:
#dynamic 0x800000

#org @start
msgbox @msg1 0x6
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
setflag 0x828
setflag 0x82F
setflag 0x829
giveitem 0xD 0x5 MSG_OBTAIN
giveitem 0x4 0x5 MSG_OBTAIN
special 0x16F
end



#org @msg1
= Renny: Take these [player]!

Now, that is meant to be a GREEN (You know, a script script) script in Advance Map. But, if I try it in VBA it will stay there, and activate again if you walk on to the same area again, even though the script is finished. Can somebody help? D:
This is an easy one here is the script the way you want it.
#dynamic 0x800000

#org @start
checkflag 0xUnusued flag
if 0x1 goto @end
msgbox @msg1 0x6
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
setflag 0x828
setflag 0x82F
setflag 0x829
giveitem 0xD 0x5 MSG_OBTAIN
giveitem 0x4 0x5 MSG_OBTAIN
special 0x16F
setflag 0xUnused flag
end

#org @end
release
end


#org @msg1
= Renny: Take these [player]!

 
The problem is it keeps on repeating and repeating and repeating automatically after the script ends. And yes, it's a level script.

Code:
#dynamic 0x80082B

#org @start
applymovement 0x2 @move
waitmovement 0x0
msgbox @1 0x6
applymovement 0xFF @move0
waitmovement 0x0
msgbox @2 0x6
call @pokemon
msgbox @3 0x6
setvar 0x5000 0x0001
release
end

#org @1
= [blue_fr]Dad: Oh! \v\h01! Come here please!

#org @2
= [blue_fr]Alright, I caught three Pok\h1Bmon\nfrom three different regions.\pHere, Kanto, Johto, and Hoenn.\nChoose a Pok\h1Bmon that you want\lto train.

#org @pokemon
msgbox @one 0x5
compare LASTRESULT 0x1
if 0x1 goto @pokemon1
msgbox @two 0x5
compare LASTRESULT 0x1
if 0x1 goto @pokemon2
msgbox @three 0x5
compare LASTRESULT 0x1
if 0x1 goto @pokemon3
goto @pokemon
return

#org @one
= [blue_fr]Do you want the Kanto Pok\h1Bmon\nSHELLDER?

#org @two
= [blue_fr]Do you want the Johto Pok\h1Bmon\nPHANPY?

#org @three
= [blue_fr]Do you want the Hoenn Pok\h1Bmon\nSHROOMISH?

#org @pokemon1
givepokemon 0x5A 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 @3
= [black_fr]\v\h01 recieved a SHELLDER!

#org @4
= [black_fr]Would you like to give a nickname\nto SHELLDER?

#org @5
= [blue_fr]Dad: Alright then, have fun with\nthat Pok\h1Bmon.\pOh, and stop by Prof. Oak's lab.\nHe has two things to give you.

#org @pokemon2
givepokemon 0xE7 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @6 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @7 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @8 0x6
release
end

#org @6
= [black_fr]\v\h01 recieved a PHANPY!

#org @7
= [black_fr]Would you like to give a nickname\nto PHANPY?

#org @8
= [blue_fr]Dad: Alright then, have fun with\nthat Pok\h1Bmon.\pOh, and stop by Prof. Oak's lab.\nHe has two things to give you.

#org @pokemon3
givepokemon 0x132 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @9 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @10 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @11 0x6
release
end

#org @9
= [black_fr]\v\h01 recieved a SHROOMISH!

#org @10
= [black_fr]Would you like to give a nickname\nto SHROOMISH?

#org @11
= [blue_fr]Dad: Alright then, have fun with\nthat Pok\h1Bmon.\pOh, and stop by Prof. Oak's lab.\nHe has two things to give you.

#org @name
call 0x1A74EB
return

#org @move
#raw 0x62
#raw 0x1
#raw 0xFE

#org @move0
#raw 0x12
#raw 0x12
#raw 0x10
#raw 0xFE
 
The problem is it keeps on repeating and repeating and repeating automatically after the script ends. And yes, it's a level script.

Code:
#dynamic 0x80082B

#org @start
applymovement 0x2 @move
waitmovement 0x0
msgbox @1 0x6
applymovement 0xFF @move0
waitmovement 0x0
msgbox @2 0x6
call @pokemon
msgbox @3 0x6
setvar 0x5000 0x0001
release
end

#org @1
= [blue_fr]Dad: Oh! \v\h01! Come here please!

#org @2
= [blue_fr]Alright, I caught three Pok\h1Bmon\nfrom three different regions.\pHere, Kanto, Johto, and Hoenn.\nChoose a Pok\h1Bmon that you want\lto train.

#org @pokemon
msgbox @one 0x5
compare LASTRESULT 0x1
if 0x1 goto @pokemon1
msgbox @two 0x5
compare LASTRESULT 0x1
if 0x1 goto @pokemon2
msgbox @three 0x5
compare LASTRESULT 0x1
if 0x1 goto @pokemon3
goto @pokemon
return

#org @one
= [blue_fr]Do you want the Kanto Pok\h1Bmon\nSHELLDER?

#org @two
= [blue_fr]Do you want the Johto Pok\h1Bmon\nPHANPY?

#org @three
= [blue_fr]Do you want the Hoenn Pok\h1Bmon\nSHROOMISH?

#org @pokemon1
givepokemon 0x5A 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 @3
= [black_fr]\v\h01 recieved a SHELLDER!

#org @4
= [black_fr]Would you like to give a nickname\nto SHELLDER?

#org @5
= [blue_fr]Dad: Alright then, have fun with\nthat Pok\h1Bmon.\pOh, and stop by Prof. Oak's lab.\nHe has two things to give you.

#org @pokemon2
givepokemon 0xE7 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @6 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @7 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @8 0x6
release
end

#org @6
= [black_fr]\v\h01 recieved a PHANPY!

#org @7
= [black_fr]Would you like to give a nickname\nto PHANPY?

#org @8
= [blue_fr]Dad: Alright then, have fun with\nthat Pok\h1Bmon.\pOh, and stop by Prof. Oak's lab.\nHe has two things to give you.

#org @pokemon3
givepokemon 0x132 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @9 0x4
waitfanfare
closeonkeypress
setflag 0x828
msgbox @10 0x5
compare LASTRESULT 0x1
if 0x1 gosub @name
msgbox @11 0x6
release
end

#org @9
= [black_fr]\v\h01 recieved a SHROOMISH!

#org @10
= [black_fr]Would you like to give a nickname\nto SHROOMISH?

#org @11
= [blue_fr]Dad: Alright then, have fun with\nthat Pok\h1Bmon.\pOh, and stop by Prof. Oak's lab.\nHe has two things to give you.

#org @name
call 0x1A74EB
return

#org @move
#raw 0x62
#raw 0x1
#raw 0xFE

#org @move0
#raw 0x12
#raw 0x12
#raw 0x10
#raw 0xFE
My guess is you forgot the same thing the user before you.
Try this instead:
Spoiler:
 
Hey, I'm new here and I just started ROM hacking. I get this stuff, but I'm having a problem when trying to compile a script from XSE.
The script I'm trying to compile is in the spoiler. In it, I want a girl who is facing right in a MART to say a line, then face me and say another line, then face right again. (she is looking at shelves and the text pertains to this)

Spoiler:

However, upon compiling and opening the script in AM I get this
Spoiler:



Basically the same, but with no movement scripts.

Am I doing something wrong? This seems to be doing this for any movement scripts I try to compile into it.

It keeps saying Type Mismatch on line 8, but I checked the tutorials and that's how give item is supposed to go right?

Yes, but you have to add a Message Type at the end
0x0 Obtained the Item (Items received)
0x1 Found the Item (Items lying around)
 
Last edited:
Mega 13, what's with the waitmovement 0x2? There is no such parameter for waitmovement. It should be always waitmovement 0x0.
 
Mega 13, what's with the waitmovement 0x2? There is no such parameter for waitmovement. It should be always waitmovement 0x0.
Have you even read the XSE command help? The parameter is for the person event number that you want to wait for, and I thik that waitmovement 0x0 may be waiting for everyone.
 
Oh right. Sorry about that. Then what is Mega 13's problem?
Mega13, did you decompile the @main offset that XSE told you in the popup, or simply the dynamic offset you put in?

BTW, there's a much simpler way of writing that script:
Code:
#dynamic 0x801DC8
   
#org @main
lockall
msgbox @hmm MSG_NORMAL
msgbox @Hey MSG_FACE
spriteface 0x2 0x4
releaseall
end
   
#org @hmm
= Hmm, should I get POTION? \nI'm running a bit low[...]
   
#org @Hey
= Hey! \nQuit being so nosy! \lI'm trying to shop!
Ta-da, it takes up much less space.
 
Last edited:
Mega 13, what's with the waitmovement 0x2? There is no such parameter for waitmovement. It should be always waitmovement 0x0.

When I type waitmovement into the Script editor, (also every guide I've seen pertaining to this) it asks me for "People# to wait for" as a Parameter, and the girl in the mart just so happens to be person event no. 2.

After testing this it did not work, it appears to be a problem when I try to compile this thing.

(Also, on an unrelated note, is there any reason why a Sprite might end up being somewhere completely different than where I placed him? For some reason one of Prof. Oak's aide's keeps ending up halfway across the map.
 
I'm Polish, so sorry if i have bad english.
I know there are many advanced hackers in this forum, so i'm pleasing for a big favor.
I've got a huge problem. I took the mew script from Faraway Island to my new location in Emerald called Deep Wood Path. After that, i tried to play the game. There's a white screen! When i load the state, the battle effects get weird and i can't load my saves, or start a new game! Please help me! ;_; I Tried changing the save types but it didn't work. I put a lot of time in making that hack,changing tilesets,decapitalizing pokemon and locations and making new locations, and all of my long work is gone. Maybe someone could help me with the game and fix it? ;_;
What i must to do? The ips. patch is in my home page in my profile, if anyone can fix it please send me a PM.
And there's one more thing. I used poketronic and tried making a new event. Did that affect the game?
Please, don't ignore this post and don't let it be on the old page of this topic.I'm depressed,because i loved this hack and put heaps of time in making it. ;_;
 
Last edited:
Mega13, did you decompile the @main offset that XSE told you in the popup, or simply the dynamic offset you put in?

No, what I usually do is put the sprites in-game using AM, use the free space finder in AM to find an offset for that sprite, and then click 'Open Script,' write the script starting with the dynamic offset I found in the free space finder, then hit the little 'compile' cog tool. I'm confused as to what you're talking about. Write out what you usually do to compile scripts and I'll just do that. :)

Edit*
Bahh, turns out I didn't have enough bytes because of something dumb I did.

Thanks a lot! That spriteface command worked like a charm, I've been trying to figure that out.
 
Last edited:
Does anyone know if its possible to copy the pokemon follow script from Pokemon Yellow into a firered rom? or re-create somehow?
 
so im trying 2 make a rivil script (with xse) for ruby. this is what iv got:
Code:
#dynamic 0x

#org @start
lockall
checkflag 0x200
if 0x1 goto @done
waitmovement 0x3
showsprite 0x???
applymovement 0x??? @move
tranierbattle 0x0 0x??? 0x0 @before @after
waitmovement 0x1
applymovement 0x??? @move1
waitmovement 0x3
hidesprite 0x???
setflag 0x200
release
end


#org @before
= [rival]:well well If it aint [player]\I see you got a pokemon care test\it out.\p[player]:Sure I have some time.
release
end

#org @after
= [rival]:damnt!! how could i lose.
release
end

#org @done
release
end
bty i put ??? bc its for the sprite (if im correct) & i was sending it 2 some1 2 insert. the rivil would be in rustboro & when u walk in2 town he would walk up 2 u say something then player talks be4 they battle. then when player beats rivil he would talk again be4 leaving.
 
Last edited:
How do you make a script start as soon a you enter the map.
lIke at the start of the game?

like when the propoganist shrinks to OW size?
as soon as that happens i want a script to start?
if its a level script please point me in the way of a tutorial for it cos i dont know level scripts yet.






--------
~Fury
--------
 
Need Help!!!!

i have a script that i want it to happen when i step on this certain tile.ive had a script work on another script tile but it doesnt seen to work on this tile.whenever i walk over it ,nothing happens.on my other script tile that works i had the settings as follows:

Unknown:0003
Var Number:4059
Var Value:0000
Unknown:00 00

and i had it exactly the same on the script in question.
am i suposed to change the var number?
if it helps heres the script in question...

Spoiler:




Any help would be greatly appreciated.









---------
~Fury
---------
 
Last edited:
Does anyone know what is the command for checking specific pokemon in party...?

for example:
if you bring Pikachu in your party (not in the first slot), he will give you Lightball...

by the way, I use emerald rom.... and use XSE...
 
Last edited:
Anybody know how to fix this script. Every time I compile (Pokescript) it gives me a runtime error.

Heres the script:

Spoiler:
 
Status
Not open for further replies.
Back
Top