• 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 Trading Card Game 2 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.

[Archive] Script help thread

Status
Not open for further replies.
No, it's not useless. The coordinates will be triggered by a special value of the warp number: 0xFF.

Normal warp:
Code:
warp 0x4 0x1 0x0 0x0 0x0

Same as above + coords:
Code:
warp 0x4 0x1 0xFF 0x2 0x6

I see...
So what does that special value do to a warp script?

When you compile something using just dynamic offset, nothing will be ever overwritten.
Also, it doesn't make a lot of sense changing the #dynamic offset each time since XSE will just use the value as a starting point for the free space search inside the ROM. It would be a waste of time looking right from the beginning or something, so you can use FSF for example to get your offset and then you don't need to change it... ever, unless you add a LOT of data and therefore it's better to find a new offset.
All XSE need is that offset, after all. Searching free space it's its job.

FSF doesn't work on my computer, so I use a hex editor instead.
so it doesn't overwrite another script's offset? That's cool.
Thanks~
 

I see...
So what does that special value do to a warp script?

Exactly what I said: it will enable the coordinates.



FSF doesn't work on my computer, so I use a hex editor instead.
so it doesn't overwrite another script's offset? That's cool.
Thanks~

Oh, how come it doesn't work? Well, see my PM.
 
Last edited:
M'kay. I made a decent attempt to fix my script that was posted a little bit ago, and it sorta still doesn't work right. If anyone notices something wrong, please tell me. ^^

Spoiler:


If you want to know what it does, look for my post on the previous page.

Also, if anyone knows if I can keep the screen faded while I warp the player to the new map, please tell me that too. ^^
 
Safari Battle mode script request?

Hello I would like some help with a script that allows standard battle mode into Safari mode for Firered. At the Very beginning of my game I want to allow players to capture their first pokemon. I have tried figuring out the script myself but I have no clue what to do or what I am doing. I have Advanced map, pksv, and pokewitch.

Heres how I want the script to go.


  1. When you enter the lab your character walks up to the professor
  2. Professor says "Hello \v\h01. \pI would like you \nto do an experiment \nfor me. \p I would you to use \nthis pokedex. \pI recently ordered in \nfrom kanto.
  3. Player Receives pokedex
  4. Professor says "Please exit through \nthe back to capture \nyour first pokemon.
  5. At that point the pokedex is activated and the safari battle mode is too.
  6. The player exits the lab into a small field where you can catch all 6 starters.
  7. You only have one pokeball though and it can catch any of the pokemon.
  8. once you have captured one you are teleported back into the lab.
  9. in the lab the professor congratulates you and your journey begins.
  10. Each time you try to go back to the small field the professor stops you by saying "I'm sorry[...] \pbut I can't let you go \nback there right now...
I have tried figuring it out my self but I have had no success. I am fairly new to scripting.

More info:
If your wondering about the rock and feed pokemon thing I want that to stay. I know it probably can't be changed anyways but I want that to be there on purpose because in the first episode of pokemon ash, since pikachu wasn't listening, had to use a rock to attempt trying to catch a pokemon and hits a spearow instead making it upset and yeahh you know the story from there.
 
Humdiddlydoodah. It's not a request thread.

Well, decompile the Safari Zone entrance script, and we can work from there.
 
Decompiled script from Safari zone

Heres the script I can't really figure out what is making the battle mode so that the trainer is just fighting himself?

Repeat of what I want the script to do
Spoiler:


Directly from the Safari zone building
Code:
#org 0x816D36D
'-----------------------------------
lockall
setvar 0x4002 0x0
jump 0x816D391

#org 0x816D391
'-----------------------------------
textcolor 0x0 'Sets text color (Fire Red).
msgbox 0x8197C6B ' Welcome to the SAFARI ZONE!
callstd MSG_NOCLOSE ' Non-closing msg
applymovement PLAYER 0x81A75EB ' raw_30 end 
pauseevent 0x0
showmoney 0x0 0x0
msgbox 0x8197C87 ' For just [p]500, you can play the\nSAFARI GAME.\pYou can roam the wide-open safari\nand catch what you like.\pWould you like to play?
callstd MSG_YESNO ' Yes/No msg
compare LASTRESULT 0x1
if 0x1 jump 0x816D3CA ' Equal To
msgbox 0x8197DE9 ' Okay.\nPlease come again!
callstd MSG_NOCLOSE ' Non-closing msg
jump 0x816D49A

#org 0x816D3CA
'-----------------------------------
call 0x816D462
checkmoney 0x1F4 0x0 0xD21
storeitem 0x0 0x600
nop1 ' #raw 0x1
startcontest
storeitems 0x16 0x9108 0x1F4
nop0 ' #raw 0x0
updatemoney 0x0 0x0 0x0
msgbox 0x8197D07 ' That'll be [p]500, please!\pWe only use a special kind of \nPOKé BALLS here.
callstd MSG_NOCLOSE ' Non-closing msg
textcolor 0x3 'Sets text color (Fire Red).
fanfare 0x101
message 0x8197D50 ' \v\h01 received 30 SAFARI BALLS\nfrom the attendant.
waitfanfare
call 0x81A6675
msgbox 0x8197D80 ' We'll call you on the PA when you\nrun out of time or SAFARI BALLS.\pWell, I'll wish you the best of\nluck!
callstd MSG_NOCLOSE ' Non-closing msg
closemsg
hidemoney 0x0 0x0
compare 0x4002 0x0
if 0x1 call 0x816D44C ' Equal To
compare 0x4002 0x1
if 0x1 call 0x816D441 ' Equal To
compare 0x4002 0x2
if 0x1 call 0x816D457 ' Equal To
special 0xCD
setvar 0x406E 0x2
warp 0x1 0x3F 0xFF 0x1A 0x1E
waitspecial
end

#org 0x816D462
'-----------------------------------
countpokemon
compare LASTRESULT 0x6
if 0x5 jump 0x81A77A9 ' Not Equal To
special2 0x800D 0x130
compare LASTRESULT 0x1
if 0x1 jump 0x81A77A9 ' Equal To
msgbox 0x81BFEAC ' Excuse me!\nYour PC BOX is full.
callstd MSG_NOCLOSE ' Non-closing msg
jump 0x816D49A

#org 0x81A77A9
'-----------------------------------
return

#org 0x816D49A
'-----------------------------------
closemsg
hidemoney 0x0 0x0
applymovement PLAYER 0x816D4AA ' walk_down end 
pauseevent 0x0
releaseall
end

#org 0x81A6675
'-----------------------------------
copyvar 0x8012 0x8013
return

#org 0x816D44C
'-----------------------------------
applymovement PLAYER 0x816D4AC ' walk_up walk_up end 
pauseevent 0x0
return

#org 0x816D441
'-----------------------------------
applymovement PLAYER 0x816D4AF ' walk_up walk_left walk_up end 
pauseevent 0x0
return

#org 0x816D457
'-----------------------------------
applymovement PLAYER 0x816D4B3 ' walk_up walk_right walk_up end 
pauseevent 0x0
return


#org 0x8197C6B
= Welcome to the SAFARI ZONE!

#org 0x8197C87
= For just [p]500, you can play the\nSAFARI GAME.\pYou can roam the wide-open safari\nand catch what you like.\pWould you like to play?

#org 0x8197DE9
= Okay.\nPlease come again!

#org 0x8197D07
= That'll be [p]500, please!\pWe only use a special kind of \nPOKé BALLS here.

#org 0x8197D50
= \v\h01 received 30 SAFARI BALLS\nfrom the attendant.

#org 0x8197D80
= We'll call you on the PA when you\nrun out of time or SAFARI BALLS.\pWell, I'll wish you the best of\nluck!

#org 0x81BFEAC
= Excuse me!\nYour PC BOX is full.

#org 0x81A75EB
M raw_30 end 

#org 0x816D4AA
M walk_down end 

#org 0x816D4AC
M walk_up walk_up end 

#org 0x816D4AF
M walk_up walk_left walk_up end 

#org 0x816D4B3
M walk_up walk_right walk_up end

Now I know its a request but actually I need help because I don't think anyone has done this? If this is done it can open doors to many new possibilities for other projects. I can't figure out where the hell is the switch for switching it from normal battle mode to safari catch mode? Anybody know what to put or what is the safari script input?
 
Last edited:
Uh...copy that script, except remove the paying parts...I guess? Lazyness, I know. And add setflag 0x829. :P
 
I finally put the script together.
The thing I need help with is how to catch one pokemon with out fail and then warp back into the lab and switch it back to normal battle mod?

Code:
#org 0x871C5C0
'-----------------------------------
call 0x816D462
checkflag 0x1003
if 0x1 call 0x871C5F0 ' Equal To
compare 0x4055 0x3
if 0x1 call 0x871C5F0 ' Equal To
applymovement PLAYER 0x871C600 ' walk_up walk_up walk_up walk_up walk_up walk_up walk_up look_up end 
pause 0x80
msgbox 0x871C610 ' ELM: \v\h01!\nThere you are!\pI needed to ask you a favor.\pI have an acquaintance called\nMR.POKéMON.\pHe keeps finding weird things and\nraving about his discoveries.\pAnyway, I just got an e-mail from him\nsaying that this time it's real.\pIt is intriguing, but we're busy with\nour POKéMON research.\pCould you look into it for us?\pI'll give you a POKéMON for a partner.\pThey're all in the back that we just\nfound.\lGo on. Pick one!
callstd MSG_NORMAL ' Normal msg
special 0xCD
setvar 0x406E 0x2
setflag 0x1003
setvar 0x6C55 0x2
end

#org 0x816D462
'-----------------------------------
countpokemon
compare LASTRESULT 0x6
if 0x5 jump 0x81A77A9 ' Not Equal To
special2 0x800D 0x130
compare LASTRESULT 0x1
if 0x1 jump 0x81A77A9 ' Equal To
msgbox 0x81BFEAC ' Excuse me!\nYour PC BOX is full.
callstd MSG_NOCLOSE ' Non-closing msg
jump 0x816D49A

#org 0x81A77A9
'-----------------------------------
return

#org 0x871C5F0
'-----------------------------------
release
end

#org 0x816D49A
'-----------------------------------
closemsg
hidemoney 0x0 0x0
applymovement PLAYER 0x816D4AA ' walk_down end 
pauseevent 0x0
releaseall
end


#org 0x871C610
= ELM: \v\h01!\nThere you are!\pI needed to ask you a favor.\pI have an acquaintance called\nMR.POKéMON.\pHe keeps finding weird things and\nraving about his discoveries.\pAnyway, I just got an e-mail from him\nsaying that this time it's real.\pIt is intriguing, but we're busy with\nour POKéMON research.\pCould you look into it for us?\pI'll give you a POKéMON for a partner.\pThey're all in the back that we just\nfound.\lGo on. Pick one!

#org 0x81BFEAC
= Excuse me!\nYour PC BOX is full.

#org 0x871C600
M walk_up walk_up walk_up walk_up walk_up walk_up walk_up look_up end 

#org 0x816D4AA
M walk_down end
 
Last edited:
Okay, I really don't understand level scripts at all. I've got this script, with comments in at certain places. Hiche said that would require level scripting, but I'm not sure how to implement them, nor how to move the camera to a different map. (I know how to move the camera normally, just not how to warp it to another map.)

Keep in mind, that this script hasn't been tested yet.

Also, if anyone's confused, this is what the script's supposed to do:

Spoiler:

Quote from myself on last page, where I said you could go to find out what the script does. Also, I haven't tested it yet because I wanted to see if I had any errors and such, as this is my first time using level scripts. Ignore the first paragraph, too.
 
Hm.
Shouldn't you test it first...?

Oh, and just make the script warp to someplace. Then, that someplace has a level script. And that warps you back to the room. Which has a level script. That displays a message.

Test it, and see if there's any trouble...?
 
Hm.
Shouldn't you test it first...?

Oh, and just make the script warp to someplace. Then, that someplace has a level script. And that warps you back to the room. Which has a level script. That displays a message.

Test it, and see if there's any trouble...?
Mmkay. I'll get back to here later on it. Thanks anyway, NC.
 
I need some help. I wanted to make a script in fire red for oak. exactly like the one when you first have to try and leave the town and he comes running to you. But the problem is that i have no idea how to do that. can anyone help me?
 
I need some help. I wanted to make a script in fire red for oak. exactly like the one when you first have to try and leave the town and he comes running to you. But the problem is that i have no idea how to do that. can anyone help me?

Try reading some tutorials. Refer to one of the tutorials listed below;

Thethethethe's Pokescript Tutorial

Seth the rom master XSE Tutorial
Or:
XSE Tutorial

Read one of them (thethethethe's tutorial is preferable), and try to make a script on your own. Hope that helps.
 
Thank you soo much. lol that was exactly wat i was looking for.

ok well this is my script that i am trying to get to work. it the give pokemon script. when the person asks me if i would like to take it and i say no, the message stays at the bottom of the window??

#dynamic 0x800000
'-----------------------
#org @start
lock
faceplayer
checkflag 0x200
if 0x1 goto 0x8800028
msgbox 0x880005F '"I Cant take \n care of my \n BULBASAU..."
callstd 0x5
compare LASTRESULT 1
if 1 goto 0x8800032
if 0 goto 0x8000C8
msgbox 0x88000C8 '"Im sure somebody else would\nlik..."
callstd 0x6
release
end
'-----------------------
#org 0x800028
msgbox 0x8800095 '"Hows my Bulbasuar doing?"
callstd 0x6
release
end
'-----------------------
#org 0x800032
copyvar 0x8004 LASTRESULT
givepokemon 0x1 0x5 0x0 0x0 0x0 0x7D
copyvar 0x0 0x0
fanfare 0x13E
msgbox 0x88000AE '"You received a Bulbasaur."
callstd 0x6
waitfanfare
setflag 0x200
release
end

'---------
' Strings
'---------
#org 0x80005F
= I dont want my\nBULBASAUR\pIf you want you\ncan have it.
#org 0x8000C8
= Im sure somebody else would\nlike to have it.
#org 0x800095
= Hows my Bulbasuar doing?
#org 0x8000AE
= You received a Bulbasaur.

never mind i got it.
 
Last edited:
Code:
#dynamic 0x900132

#org 0x9002FA
lock
faceplayer
checkflag 0x1032
if 0x1 goto 0x8900312
setflag 0x1032
msgbox 0x8900320 '"Set!"
callstd 0x4
release
end

'-----------------------
#org 0x900312
message @choose
boxset 5
compare LASTRESULT 1
if b_true goto @yes
compare LASTRESULT 2
if b_true goto @no
release
end

#org @yes
givepokemon 0x92 0x5 0x0 0x0 0x0 
message @yay
setflag 0x800
fanfare 0x13E
waitfanfare
release 
end


#org @no
message @next
boxset 5
compare LASTRESULT 1
if b_true goto @yes1
compare LASTRESULT 0
if b_true goto @no1
release 
end

#org @yes1
givepokemon 0x88 0x5 0x0 0x0 0x0
message @nay
setflag 0x800
fanfare 0x13E
waitfanfare
release
end

#org @no1
message @Bad
callstd 0x4
release
end

'---------
' Strings
'---------
#org 0x900320
= Hello, you look like you\nwant a pokemon.\pI have an extra just talk\nto me again.

#org @choose
= Do you want a Ghastly?

#org @next
= Well,then do you\n want a Grimer?

#org @bad
= Well, talk to me\nagain if you\pchange your mind!

#org @yay
= [player] recieved a\n Ghastly!

#org @nay
= [player] recieved a\n Grimer!

Umm, when I try to compile it gives me a mismatch on givepokemon, all though I do not know what is wrong with it. I took the part with givepokemon out, and it compiled, but it cut out huge chunks of the script, which messed the game up.

If anyone knows how to fix may you please help me.

The code turns into this when I take the givepokemon out and compile
Code:
'-----------------------
#org 0x9002FA
lock
faceplayer
checkflag 0x1032
if 0x1 goto 0x8900312
setflag 0x1032
msgbox 0x8900320 '"Hello, you look like you\nwant a po..."
callstd 0x4
release
end

'-----------------------
#org 0x900312
msgbox 0x8900BCC '"Do you want a Ghastly?"
callstd 0x5
compare LASTRESULT 0x1
if 0xC2 goto 0xE3E0E0D9
setvirtualaddress 0xE9E3ED00
nop


'---------
' Strings
'---------
#org 0x900320
= Hello, you look like you\nwant a pokemon.\pI have an extra just talk\nto me again.

#org 0x900BCC
= Do you want a Ghastly?

This is bad because it cut off like 6 of my strings and when I talk to the sprite, and the person says Do you want a ghastly, if you press yes or no she says the same thing again, and the message doesnt dissapear, I would just like to know whats wrong :( . Im using XSE, with Ruby All help greatly appreciated.
 
Last edited:
Code:
#dynamic 0x900132

#org 0x9002FA
lock
faceplayer
checkflag 0x1032
if 0x1 goto 0x8900312
setflag 0x1032
msgbox 0x8900320 '"Set!"
callstd 0x4
release
end

'-----------------------
#org 0x900312
message @choose
boxset 5
compare LASTRESULT 1
if b_true goto @yes
compare LASTRESULT 2
if b_true goto @no
release
end

#org @yes
givepokemon 0x92 0x5 0x0 0x0 0x0  [B]0x0[/B]
message @yay
setflag 0x800
fanfare 0x13E
waitfanfare
release 
end


#org @no
message @next
boxset 5
compare LASTRESULT 1
if b_true goto @yes1
compare LASTRESULT 0
if b_true goto @no1
release 
end

#org @yes1
givepokemon 0x88 0x5 0x0 0x0 0x0 [B]0x0[/B]
message @nay
setflag 0x800
fanfare 0x13E
waitfanfare
release
end

#org @no1
message @Bad
callstd 0x4
release
end

'---------
' Strings
'---------
#org 0x900320
= Hello, you look like you\nwant a pokemon.\pI have an extra just talk\nto me again.

#org @choose
= Do you want a Ghastly?

#org @next
= Well,then do you\n want a Grimer?

#org @bad
= Well, talk to me\nagain if you\pchange your mind!

#org @yay
= [player] recieved a\n Ghastly!

#org @nay
= [player] recieved a\n Grimer!
Umm, when I try to compile it gives me a mismatch on givepokemon, all though I do not know what is wrong with it. I took the part with givepokemon out, and it compiled, but it cut out huge chunks of the script, which messed the game up.

If anyone knows how to fix may you please help me.

The givepokemon commands lacked one more 0x0. Try it. (Fixes in Bold)
 
Status
Not open for further replies.
Back
Top