Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub > Beginner’s Lounge
Reload this Page Script Help Thread (DO NOT REQUEST SCRIPTS)

Notices
For all updates, view the main page.

Beginner’s Lounge Where all good (and bad) ideas start. This is the Beginner’s Lounge, where if you need a helping hand or want to develop your small ideas, you bring it here. We won't bite.



Closed Thread
 
Thread Tools
  #401    
Old February 6th, 2009 (02:23 PM).
wingzro17's Avatar
wingzro17 wingzro17 is offline
......................... .....
 
Join Date: Aug 2007
Location: Under a box, near 31st street, on FAKE AVE. in FAKE YORK.
Nature: Quiet
Posts: 46
Send a message via AIM to wingzro17 Send a message via Windows Live Messenger to wingzro17
Quote originally posted by darkmewham2:
Game: FireRed
Type: BPRE (I think)
Editor: XSE
Script:
Spoiler:
#org @start


lock


faceplayer


countpokemon


#define compare 0x800D 0x1


#define if 0x1 goto @continue


if 0x0 goto @goaway


checktrainerflag 0x2e6


compare 0x800D 0x1


if 0x1 call @alreadybattled


release


end





#org @continue


= trainerbattle 0x0 0x2e6 0x0 @intro @defeat


msgbox @msg 0x2


end





#org @intro


= Battle commencing.





#org @defeat


= Congradulations.





#org @msg


= Please go get your\nEEVEE returned to you.


cleartrainerflag 0x19E





#org @goaway


= POKeMON number does\nnot equal one. Try again after\nyou've talked to the man beside\nme.
Spoiler:



dynamic 0x8013F7


#org @start


lock


faceplayer


countpokemon


compare 0x800D 0x1


if 0x1call @continue


if 0x0 call @please


checktrainerflag 0x2e6


compare 0x800D 0x1


if 0x1 goto @alreadybattled


release


end





#org @continue


checkflag 0x1019


if 0x1 call @nomore


givepokemon 0x175 0x50 0x0 0x0 0x0 0x0


setflag 0x1019


end





#org @nomore


msgbox @msg 0x2


end





#org @msg


= Please go battle my sim.





#org @alreadybatted


setvar 0x8008 0x8


call 0x1A8CAD


checkflag 0x1000


if 0x1 goto @how


msgbox @yesno 0x5


compare LASTRESULT 0x0


if 0x1 goto @too


call 0x1A8CBD


compare 0x8004 0x6


if 0x4 goto @too


call 0x1A8CC9


comparevars LASTRESULT 0x8009


if 0x5 goto @not


call 0x1A8CD9


msgbox @thanksalot 0x4


setflag 0x1000


release


end





#org @not


bufferpokemon 0x0 0x8009


msgbox @not2 0x4


release


end





#org @too


bufferpokemon 0x0 0x8009


msgbox @too2 0x4


release


end





#org @how


msgbox @old 0x4


release


end





#org @thanksalot


= Okay. Lets go.


warp 0x4 0x2 0x3 0x0 0x0


#org @not2


= My hack, not yours.





#org @too2


= Why are you messing with my hack?





#org @yesno


= Okay. I'll give you your\nEEVEE back and end the SIM.





#org @old


= I'm supprised your cheats work\n in my hack. o.o

[spoiler]

These two scripts work back-to-back. One of them gives you the Pokemon you need for the battle and one of them battles you. It says there is an "error 13" on line 7 of one of them, a type mismatch. I thought it was the word "goto" or "call", but I can't figure out whats wrong with it. I looked in tutorials and these were the exact lines used in those tutorials!

I think you forgot @please...
and a few others....
  #402    
Old February 6th, 2009 (02:59 PM).
Lyzo's Avatar
Lyzo Lyzo is offline
On vacation
 
Join Date: Mar 2007
Location: The Netherlands
Age: 20
Gender: Male
Nature: Bold
Posts: 251
Send a message via Windows Live Messenger to Lyzo
Quote originally posted by ckret2:
Game: FireRed
Type: two Person events
Editor: XSE
Script: I've got two scripts, a character and an itemball. You get your first Pokémon from the itemball. The itemball isn't supposed to disappear after you click on it. I have a flag so that if you click the character or the itemball after clicking the itemball once, they will say different things. The flag works, but if I leave the room and come back in, it seems to be reset: the character will say his first, pre-flag script again, and the itemball will give you a second Pokémon. What am I doing wrong?

The character's script:
Spoiler:
#dynamic 0x71C033
#org @start
lock
faceplayer
checkflag 0x7
if 0x1 goto @afterrattata
if 0x0 goto @beforerattata

#org @beforerattata
msgbox @beforerattatatext 0x6
release
end

#org @beforerattatatext
= \c\h01\h08\v\h06: Come on, come on,\ncome on, come on!!\pThey said I can't get my POKÈMON\nuntil you get yours!\pWhy?\nI guess it's because you gave your\pname before I did.\pStupid bureaucracy...

#org @afterrattata
msgbox @afterrattatatext 0x6
release
end

#org @afterrattatatext
= Fun. My very own RATTATA...\pSigh...\pTrust me, \v\h01! We'll find\nsome POKÈMON that are\pway better than Rattata.\pWe didn't graduate at the top of\nour TRAINEE class for nothing!


The itemball's script:
Spoiler:
#dynamic 0x71BD7B
#org @start
lock
checkflag 0x7
if 0x0 goto @getrat
if 0x1 goto @havearat
release
end

#org @getrat
showpokepic 0x13 0x0A 0x03
msgbox @getrat1 0x5
if 0x1 goto @yesrat
if 0x0 goto @norat

#org @getrat1
= This POKÈMON is very...\n...\pUh, it's a RATTATA.\nDo you want it or not?

#org @norat
msgbox @yesrat1 0x6
hidepokepic
fanfare 0x13E
waitfanfare
givepokemon 0x13 0x3 0x0 0x0 0x0 0x0
setflag 0x828
setflag 0x7
msgbox @yesrat2 0x6
applymovement 0xFF @move
waitmovement 0x0
applymovement 0x9 @move2
waitmovement 0x0
release
end

#org @move
#raw 0x20
#raw 0x03
#raw 0xFE

#org @move2
#raw 0x20
#raw 0x00
#raw 0xFE

#org @yesrat
msgbox @yesrat1 0x6
hidepokepic
fanfare 0x13E
waitfanfare
givepokemon 0x13 0x3 0x0 0x0 0x0 0x0
setflag 0x828
setflag 0x7
msgbox @yesrat2 0x6
applymovement 0xFF @move
waitmovement 0x0
applymovement 0x9 @move2
waitmovement 0x0
release
end

#org @norat1
= Too bad. Here it is anyway.\p\c\h01\h08\v\h06: Psst, \v\h01!\nDon't get too attached, okay?\pYou don't need to give RATTATA\na nickname or anything like that.\pWe're gonna get a way better\nPOKÈMON soon.\pYou've got \v\h06's word!\n

#org @yesrat1
= \c\h01\h08\v\h06: Psst, \v\h01!\nDon't get too attached, okay?\pYou don't need to give RATTATA\na nickname or anything like that.\pWe're gonna get a way better\nPOKÈMON soon.\pYou've got \v\h06's word!\n

#org @yesrat2
= Congratulations!\n\v\h01 received RATTATA!\p\c\h01\h02SCIENTIST: Next!\n\v\h01, move over.\p\v\h06, keep the line moving.

#org @havearat
msgbox @havearat1 0x6
release
end

#org @havearat1
= I shouldn't take this RATTATA.\nIt's for \v\h06.\pI may be a POKÈMON thief, but I\nwon't steal from my own partner!


(In addition, I also don't know how to make a script that can give a Pokémon a nickname--which is why I tried to avoid the issue altogether in the dialogue above--because I haven't found any instructions on how to do that in any tutorials so far. I've gone through several looking for just that. So if anyone could just tell me what that bit of script is, I'd be grateful.)

Screenshots and/or Videos: I don't have any, and in any case, I think this is a simple problem. The flag just seemingly removes itself if I leave the room and come back into it.
I'm not totally sure but I wouldn't use flag number 7. It's one of those flags that probably doesn't work. Use the flags from 200: so 201, 202. Then it might work.
__________________


Thank you The Blueprint !!!
  #403    
Old February 6th, 2009 (03:16 PM).
diegoisawesome's Avatar
diegoisawesome diegoisawesome is offline
Please understand
Silver Tier
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 18
Gender: Male
Nature: Quirky
Posts: 974
Quote originally posted by ckret2:
Game: FireRed
Type: two Person events
Editor: XSE
Script: I've got two scripts, a character and an itemball. You get your first Pokémon from the itemball. The itemball isn't supposed to disappear after you click on it. I have a flag so that if you click the character or the itemball after clicking the itemball once, they will say different things. The flag works, but if I leave the room and come back in, it seems to be reset: the character will say his first, pre-flag script again, and the itemball will give you a second Pokémon. What am I doing wrong?

The character's script:
Spoiler:
#dynamic 0x71C033
#org @start
lock
faceplayer
checkflag 0x7
if 0x1 goto @afterrattata
if 0x0 goto @beforerattata

#org @beforerattata
msgbox @beforerattatatext 0x6
release
end

#org @beforerattatatext
= \c\h01\h08\v\h06: Come on, come on,\ncome on, come on!!\pThey said I can't get my POKÈMON\nuntil you get yours!\pWhy?\nI guess it's because you gave your\pname before I did.\pStupid bureaucracy...

#org @afterrattata
msgbox @afterrattatatext 0x6
release
end

#org @afterrattatatext
= Fun. My very own RATTATA...\pSigh...\pTrust me, \v\h01! We'll find\nsome POKÈMON that are\pway better than Rattata.\pWe didn't graduate at the top of\nour TRAINEE class for nothing!


The itemball's script:
Spoiler:
#dynamic 0x71BD7B
#org @start
lock
checkflag 0x7
if 0x0 goto @getrat
if 0x1 goto @havearat
release
end

#org @getrat
showpokepic 0x13 0x0A 0x03
msgbox @getrat1 0x5
if 0x1 goto @yesrat
if 0x0 goto @norat

#org @getrat1
= This POKÈMON is very...\n...\pUh, it's a RATTATA.\nDo you want it or not?

#org @norat
msgbox @yesrat1 0x6
hidepokepic
fanfare 0x13E
waitfanfare
givepokemon 0x13 0x3 0x0 0x0 0x0 0x0
setflag 0x828
setflag 0x7
msgbox @yesrat2 0x6
applymovement 0xFF @move
waitmovement 0x0
applymovement 0x9 @move2
waitmovement 0x0
release
end

#org @move
#raw 0x20
#raw 0x03
#raw 0xFE

#org @move2
#raw 0x20
#raw 0x00
#raw 0xFE

#org @yesrat
msgbox @yesrat1 0x6
hidepokepic
fanfare 0x13E
waitfanfare
givepokemon 0x13 0x3 0x0 0x0 0x0 0x0
setflag 0x828
setflag 0x7
msgbox @yesrat2 0x6
applymovement 0xFF @move
waitmovement 0x0
applymovement 0x9 @move2
waitmovement 0x0
release
end

#org @norat1
= Too bad. Here it is anyway.\p\c\h01\h08\v\h06: Psst, \v\h01!\nDon't get too attached, okay?\pYou don't need to give RATTATA\na nickname or anything like that.\pWe're gonna get a way better\nPOKÈMON soon.\pYou've got \v\h06's word!\n

#org @yesrat1
= \c\h01\h08\v\h06: Psst, \v\h01!\nDon't get too attached, okay?\pYou don't need to give RATTATA\na nickname or anything like that.\pWe're gonna get a way better\nPOKÈMON soon.\pYou've got \v\h06's word!\n

#org @yesrat2
= Congratulations!\n\v\h01 received RATTATA!\p\c\h01\h02SCIENTIST: Next!\n\v\h01, move over.\p\v\h06, keep the line moving.

#org @havearat
msgbox @havearat1 0x6
release
end

#org @havearat1
= I shouldn't take this RATTATA.\nIt's for \v\h06.\pI may be a POKÈMON thief, but I\nwon't steal from my own partner!


(In addition, I also don't know how to make a script that can give a Pokémon a nickname--which is why I tried to avoid the issue altogether in the dialogue above--because I haven't found any instructions on how to do that in any tutorials so far. I've gone through several looking for just that. So if anyone could just tell me what that bit of script is, I'd be grateful.)

Screenshots and/or Videos: I don't have any, and in any case, I think this is a simple problem. The flag just seemingly removes itself if I leave the room and come back into it.
Fixed.

Don't use flag 0x7. Use one that's not being used. And you can find out how to nickname a Pokemon in my tut, located here: http://www.pokecommunity.com/showthread.php?t=164276.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
  #404    
Old February 6th, 2009 (03:21 PM).
ckret2's Avatar
ckret2 ckret2 is offline
usually pronounced "secret 2"
 
Join Date: Dec 2008
Location: You Are Here
Age: 24
Gender:
Nature: Rash
Posts: 518
Send a message via AIM to ckret2
Quote originally posted by Lyzo:
I'm not totally sure but I wouldn't use flag number 7. It's one of those flags that probably doesn't work. Use the flags from 200: so 201, 202. Then it might work.
So, there are some flags that just don't work all together? Okay, I'll keep that in mind. Just out of curiosity, does anyone know the reason behind why some flags don't work?

The one thing that still concerns me is that the flag DOES work until I leave the room and come back. Is that normal with flags that "don't work," that it will work temporarily and then stop working?

Anyway, thanks for the suggestion. I'll try changing the flag. In fact, if it's the flag itself that's messed up and not how I'm using the flag, I might just use the Pokémon menu flag, since I have to set 0x828 anyway.
__________________

This one is my hack.


This one is the hack I part-time map for.

I got an Illumise?
Pretty awesome.
Glad I grabbed an egg I didn't recognize.
  #405    
Old February 6th, 2009 (03:32 PM).
Lyzo's Avatar
Lyzo Lyzo is offline
On vacation
 
Join Date: Mar 2007
Location: The Netherlands
Age: 20
Gender: Male
Nature: Bold
Posts: 251
Send a message via Windows Live Messenger to Lyzo
Quote originally posted by ckret2:
So, there are some flags that just don't work all together? Okay, I'll keep that in mind. Just out of curiosity, does anyone know the reason behind why some flags don't work?

The one thing that still concerns me is that the flag DOES work until I leave the room and come back. Is that normal with flags that "don't work," that it will work temporarily and then stop working?

Anyway, thanks for the suggestion. I'll try changing the flag. In fact, if it's the flag itself that's messed up and not how I'm using the flag, I might just use the Pokémon menu flag, since I have to set 0x828 anyway.
Why these flags don't work? I don't know but they always reset after exiting the map. So if something with a flag keeps resetting you'll know you got a wrong one.
__________________


Thank you The Blueprint !!!
  #406    
Old February 6th, 2009 (03:47 PM).
ckret2's Avatar
ckret2 ckret2 is offline
usually pronounced "secret 2"
 
Join Date: Dec 2008
Location: You Are Here
Age: 24
Gender:
Nature: Rash
Posts: 518
Send a message via AIM to ckret2
Quote originally posted by diegoisawesome:
Don't use flag 0x7. Use one that's not being used. And you can find out how to nickname a Pokemon in my tut, located here: http://www.pokecommunity.com/showthread.php?t=164276.
Ah, thank you! I've been using your tutorial, but somehow managed to miss that section; I guess because when I'm looking for something, I use control-F to find the keyword I need rather than scroll through it. Won't make that mistake again.

Quote originally posted by Lyzo:
Why these flags don't work? I don't know but they always reset after exiting the map. So if something with a flag keeps resetting you'll know you got a wrong one.
Okay, good to know. And that's definitely what's going on with my script. Thanks again!
__________________

This one is my hack.


This one is the hack I part-time map for.

I got an Illumise?
Pretty awesome.
Glad I grabbed an egg I didn't recognize.
  #407    
Old February 6th, 2009 (05:36 PM).
NTHKP NTHKP is offline
 
Join Date: Jul 2007
Nature: Adamant
Posts: 12
Quote originally posted by hildetorr:
So does anyone know how I can do these things?
1. Here's a sample script (I used XSE, and made this for R/S roms):

Spoiler:
#dynamic 0x800000

#org @give
lock
faceplayer
msgbox @ask 0x6
checkitem 0x118 0x1
if 0x1 call @ok
msgbox @no 0x6
release
end

#org @no
= ...Hmm, dont have one huh?\nOK come see me when you do.

#org @ask
= Hey, do you happen to have\nany METEORITE?

#org @ok
applymovement LASTTALKED @move
msgbox @yes 0x5
compare LASTRESULT 0x1
if 0x0 call @toobad
givepokemon 0x19a 0x5 0x0 0x0 0x0 0x0
removeitem 0x118 0x1
msgbox @thank 0x6
end

#org @thank
= Wow thanks. I really appreciate that!

#org @toobad
msgbox @bad 0x6
end

#org @bad
= You won't trade? That's too bad...

#org @yes
= Oh, you do. Would you like to\ntrade your METEORITE with my\lPOKEMOM DEOXYS?

#org @move
#raw 0x56 0xfe


2. Make a script checking the "Elite Four beaten" flag (ask the others about that flag, since I have no idea) and put it in the entrance(s) of the area.
  #408    
Old February 6th, 2009 (08:08 PM).
Robert Conley's Avatar
Robert Conley Robert Conley is offline
GPXPlus.net/user/Robert+Conley
 
Join Date: Oct 2008
Location: The Anti Spiral Homeworld
Gender: Male
Nature: Docile
Posts: 330
Firered scripting

Using XSE i put this script in (modified from a celadon dept store script):
Code:
'---------------
#org 0x71B008
special 0x187
compare LASTRESULT 0x2
if 0x1 goto 0x81A7AE0
lock
faceplayer
preparemsg 0x81A6211 '"Hi, there!\nMay I help you?"
waitmsg
pokemart 0x871A7EC
msgbox 0x81A5190 MSG_KEEPOPEN '"Please come again!"
release
end

'---------------
#org 0x1A7AE0
release
end


'---------
' Strings
'---------
#org 0x1A6211
= Hi, there!\nMay I help you?

#org 0x1A5190
= Please come again!


'-----------
' MartItems
'-----------
#org 0x71A7EC
#raw word 0xB6
#raw word 0xC5
#raw word 0x165
#raw word 0x166
#raw word 0x162
#raw word 0x12D
#raw word 0x139
#raw word 0x143
#raw word 0x0
to change the items at a pokemart. I did this with two pokemarts and the first one worked fine but then this one did this:


My problem should be clear:text off screen item names screwing up; also kinda weird that Ice Beam doesnt screw up.

How do I hide content?
  #409    
Old February 6th, 2009 (09:26 PM).
JPAN JPAN is offline
pokemon rom researcher
 
Join Date: Dec 2008
Posts: 102
Quote:
My problem should be clear:text off screen item names screwing up; also kinda weird that Ice Beam doesnt screw up.
This happens because the game has two ways to treat items in pokemarts: one for showing the picture on regular items, and one for displaying TMs, that shows their number and attack.

The pokemart command gives analizes the data and, if a TM is present, treats all items a TMs. But because normal items don't have TM number or attack, the glitched response appears.

the pokemart2 command, however, always presents pictures, so if really necessary to have both normal items and TMs in the same display, use it instead.
  #410    
Old February 6th, 2009 (10:02 PM).
Aethestode's Avatar
Aethestode Aethestode is offline
Hacker
 
Join Date: Jan 2008
Location: Australia
Gender: Male
Nature: Serious
Posts: 1,311
Game: FireRed (U)
Type: basic talking script
Editor: Pokescript Version 1.00
Script:
Spoiler:
#org $Showtext
lock
faceplayer
messages $Hello
$Hello 1 = Hey dude
boxset 6
release
end

Screenshots and/or Videos:

I've put the offset ($800000) to a new created person in Advance Map, however, when I talk to the person who I assigned the script too just say nothing (dialogue box appears but no words). What did I did wron
g? Please help me.
  #411    
Old February 7th, 2009 (04:33 AM).
Andryandrew Andryandrew is offline
Italian Asm Hacker
 
Join Date: Mar 2007
Age: 22
Gender:
Nature: Timid
Posts: 117
Quote originally posted by rockmanmegaman:
Game: FireRed (U)
Type: basic talking script
Editor: Pokescript Version 1.00
Script:
Spoiler:
#org $Showtext
lock
faceplayer
messages $Hello
$Hello = Hey dude
boxset 6
release
end

Screenshots and/or Videos:

I've put the offset ($800000) to a new created person in Advance Map, however, when I talk to the person who I assigned the script too just say nothing (dialogue box appears but no words). What did I did wron
g? Please help me.
I don't use pokescript, but i think the "1" is wrong... i corrected your script
__________________

Sorry for my bad English... I'm Italian
Anybody that is a GBA ASM hacker is cool!
I'm a GBA ASM hacker --> I'm cool :D

Made Day-Night Routine! You can find the thread HERE
  #412    
Old February 7th, 2009 (04:52 AM). Edited February 7th, 2009 by diegoisawesome.
diegoisawesome's Avatar
diegoisawesome diegoisawesome is offline
Please understand
Silver Tier
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 18
Gender: Male
Nature: Quirky
Posts: 974
Quote originally posted by rockmanmegaman:
Game: FireRed (U)
Type: basic talking script
Editor: Pokescript Version 1.00
Script:
Spoiler:
#org $Showtext
lock
faceplayer
message $Hello
$Hello 1 = Hey dude
boxset 6
release
end

Screenshots and/or Videos:

I've put the offset ($800000) to a new created person in Advance Map, however, when I talk to the person who I assigned the script too just say nothing (dialogue box appears but no words). What did I did wron
g? Please help me.
You accidentally put messages instead of message.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
  #413    
Old February 7th, 2009 (08:12 AM).
Liquid Shadow's Avatar
Liquid Shadow Liquid Shadow is offline
xD
 
Join Date: Mar 2008
Gender:
Posts: 224
Hey all. This is my first script using the writebytooffset command. It's for pokemon Ruby.
The problem with my script is: It won't write the byte to the offset. What I'm trying to do is change the main player's OW, and I'm using writebytetooffset to change the pointer to the sprite graphics of the player's OW to another pointer to different sprite graphics.

Here is the script


Spoiler:
#Dynamic 0x807000

#org @start
checkflag 0x599
if b_true goto @BACK
msgbox @transform 0x5
compare LASTRESULT 0x1
if 0x1 goto @YES
msgbox @no 0x2
release
end

#org @YES
writebytetooffset 0x08 0x003718F0
writebytetooffset 0xE3 0x003718F1
setflag 0x599
msgbox @DONE 0x2
release
end

#org @BACK
msgbox @goback 0x5
compare LASTRESULT 0x1
if 0x1 goto @YESBACK
msgbox @NO2 0x2
release
end

#org @YESBACK
clearflag 0x599
writebytetooffset 0x50 0x003718F0
writebytetooffset 0xE0 0x003718F1
msgbox @TBACK 0x2
release
end

#org @transform
= Hey! Do you want my look?

#org @no
= You don't? Mmk that's cool.

#org @DONE
= TRANSFORMATION COMPLETE!

#org @NO2
= Oh, so I see you like my look!

#org @goback
= You want to change back to your old look?

#org @TBACK
= Ok, you're back to normal now!



__________________

4 truths of life
1. You cannot touch all your teeth with your tongue.
2. All idiots, after reading the first truth, will try it.
3. And discover that the first truth is a lie.
4. You're smiling now because you're an idiot.
  #414    
Old February 7th, 2009 (10:04 AM). Edited February 7th, 2009 by ~Teh Panda~.
~Teh Panda~'s Avatar
~Teh Panda~ ~Teh Panda~ is offline
Sea of Dreams - Redux
Silver Tier
 
Join Date: Aug 2007
Posts: 906
Ok Darthatron or Seth-Kun could not really help on this and I have tried every setting on AMap. Whats wrong with this level script? I think its a type 5.

Code:
'---------------
#org 0x7300ED
lock
checkflag 0x828
if 0x1 goto 0x8730136
applymovement MOVE_PLAYER 0x8730139
waitmovement 0x0
msgbox 0x873013D MSG_NORMAL '"[player]: You scared me there!\nKe..."
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
msgbox 0x87301AA MSG_NORMAL '"[player] received a Charmander. \n..."
applymovement 0x3 0x87301E2
waitmovement 0x0
hidesprite 0x3
setflag 0x828
setflag 0x829
Setvar 0x4033 0x1
release
end

'---------------
#org 0x730136
releaseall
end


'---------
' Strings
'---------
#org 0x73013D
= [player]: You scared me there!\nKetchum: Sorry 'bout that but your\lmom told me to surprise you with\la few things!

#org 0x7301AA
= [player] received a Charmander. \nPLayer received a Pokedex.


'-----------
' Movements
'-----------
#org 0x730139
#raw 0x63 'Question Mark (?)
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements

#org 0x7301E2
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x1F 'Step Left (Fast)
#raw 0x10 'Step Down (Normal)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0xFE 'End of Movements
__________________




Mystic still in work to let you know...
  #415    
Old February 7th, 2009 (10:10 AM).
Larsie13 Larsie13 is offline
Gone
Crystal Tier
 
Join Date: Oct 2006
Location: The Netherlands
Age: 24
Nature: Modest
Posts: 159
Quote originally posted by NeoNemesis:
Hey all. This is my first script using the writebytooffset command. It's for pokemon Ruby.
The problem with my script is: It won't write the byte to the offset. What I'm trying to do is change the main player's OW, and I'm using writebytetooffset to change the pointer to the sprite graphics of the player's OW to another pointer to different sprite graphics.

Here is the script


Spoiler:
#Dynamic 0x807000

#org @start
checkflag 0x599
if b_true goto @BACK
msgbox @transform 0x5
compare LASTRESULT 0x1
if 0x1 goto @YES
msgbox @no 0x2
release
end

#org @YES
writebytetooffset 0x003718F0 0x08
writebytetooffset 0x003718F1 0xE3

setflag 0x599
msgbox @DONE 0x2
release
end

#org @BACK
msgbox @goback 0x5
compare LASTRESULT 0x1
if 0x1 goto @YESBACK
msgbox @NO2 0x2
release
end

#org @YESBACK
clearflag 0x599
writebytetooffset 0x003718F0 0x50
writebytetooffset 0x003718F1 0xE0

msgbox @TBACK 0x2
release
end

#org @transform
= Hey! Do you want my look?

#org @no
= You don't? Mmk that's cool.

#org @DONE
= TRANSFORMATION COMPLETE!

#org @NO2
= Oh, so I see you like my look!

#org @goback
= You want to change back to your old look?

#org @TBACK
= Ok, you're back to normal now!



You switched the writebytetooffset paramaters.
  #416    
Old February 7th, 2009 (11:32 AM).
¦Next Pro's Avatar
¦Next Pro ¦Next Pro is offline
Restarting.
 
Join Date: Feb 2009
Age: 19
Gender:
Nature: Jolly
Posts: 52
Quote originally posted by TehTehTehTeh:
Ok Darthatron or Seth-Kun could not really help on this and I have tried every setting on AMap. Whats wrong with this level script? I think its a type 5.

Code:
'---------------
#org 0x7300ED
lockall
checkflag 0x828
applymovement MOVE_PLAYER 0x8730139
waitmovement 0x0
msgbox 0x73013D MSG_NORMAL '"[player]: You scared me there!\nKe..."
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
msgbox 0x7301AA MSG_NORMAL '"[player] received a Charmander. \n..."
applymovement 0x3 0x87301E2
waitmovement 0x0
hidesprite 0x03
setflag 0x828
setflag 0x829
Setvar 0x4033 0x1
releaseall
end
 
'---------
' Strings
'---------
#org 0x73013D
= [player]: You scared me there!\nKetchum: Sorry 'bout that but your\lmom told me to surprise you with\la few things!
 
#org 0x7301AA
= [player] received a Charmander. \nPLayer received a Pokedex.
 
 
'-----------
' Movements
'-----------
#org 0x730139
#raw 0x63 'Question Mark (?)
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements
 
#org 0x7301E2
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x1F 'Step Left (Fast)
#raw 0x10 'Step Down (Normal)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0xFE 'End of Movements

Woah how does this mess up.. Ok try this.
__________________
The reason I've gone so quiet, Is because that I seem to have no
Friends here on the community. With all the people saying:
"Dont use the same Sig as me", and People I hate blaming me for
"Down Rep'ing them".. Well Im a hacker, nothing can change that.

I just hope people will soon like me again.
Heres a PM from Mac;
Hey ¦Next Pro I just want to tell you that I don't hate you.
I just get pissed when you call me a n00b when I can script better than you.
Jesse and Jake (Disturbed) Only hate you because you act like your better than all of us.
Just read it and think.


Lol thinks he can script better than I.
And I have never acted like im better than you, if i let people see my VM's
Then you would see all the times you called me N00b. Im just getting you back, N00b.

Disturbed is a n00b, and Jesse.. Well STFU if you think that.
  #417    
Old February 7th, 2009 (12:03 PM).
~Teh Panda~'s Avatar
~Teh Panda~ ~Teh Panda~ is offline
Sea of Dreams - Redux
Silver Tier
 
Join Date: Aug 2007
Posts: 906
It still wont work whats wrong with it please someone help!
__________________




Mystic still in work to let you know...
  #418    
Old February 7th, 2009 (12:59 PM).
Robert Conley's Avatar
Robert Conley Robert Conley is offline
GPXPlus.net/user/Robert+Conley
 
Join Date: Oct 2008
Location: The Anti Spiral Homeworld
Gender: Male
Nature: Docile
Posts: 330
Quote originally posted by JPAN:
This happens because the game has two ways to treat items in pokemarts: one for showing the picture on regular items, and one for displaying TMs, that shows their number and attack.

The pokemart command gives analizes the data and, if a TM is present, treats all items a TMs. But because normal items don't have TM number or attack, the glitched response appears.

the pokemart2 command, however, always presents pictures, so if really necessary to have both normal items and TMs in the same display, use it instead.

thanks that worked. Is there a limit to the amount of items I can have in a pokemart through scripting. Like can I have one shop person sell all the tms?
  #419    
Old February 7th, 2009 (02:03 PM).
Andryandrew Andryandrew is offline
Italian Asm Hacker
 
Join Date: Mar 2007
Age: 22
Gender:
Nature: Timid
Posts: 117
Quote originally posted by NeoNemesis:
Hey all. This is my first script using the writebytooffset command. It's for pokemon Ruby.
The problem with my script is: It won't write the byte to the offset. What I'm trying to do is change the main player's OW, and I'm using writebytetooffset to change the pointer to the sprite graphics of the player's OW to another pointer to different sprite graphics.

Here is the script


Spoiler:
#Dynamic 0x807000

#org @start
checkflag 0x599
if b_true goto @BACK
msgbox @transform 0x5
compare LASTRESULT 0x1
if 0x1 goto @YES
msgbox @no 0x2
release
end

#org @YES
writebytetooffset 0x08 0x003718F0
writebytetooffset 0xE3 0x003718F1
setflag 0x599
msgbox @DONE 0x2
release
end

#org @BACK
msgbox @goback 0x5
compare LASTRESULT 0x1
if 0x1 goto @YESBACK
msgbox @NO2 0x2
release
end

#org @YESBACK
clearflag 0x599
writebytetooffset 0x50 0x003718F0
writebytetooffset 0xE0 0x003718F1
msgbox @TBACK 0x2
release
end

#org @transform
= Hey! Do you want my look?

#org @no
= You don't? Mmk that's cool.

#org @DONE
= TRANSFORMATION COMPLETE!

#org @NO2
= Oh, so I see you like my look!

#org @goback
= You want to change back to your old look?

#org @TBACK
= Ok, you're back to normal now!



You went wrong with offsets... 003718F0 is the BIOS code, and it's Read only... pheraps you wanted to write 023718F0? (the ram (Wram) address)? If you wanted to write ROM's bytes, you cannot do it... Rom (like the name say) is Read-Only-Memory
__________________

Sorry for my bad English... I'm Italian
Anybody that is a GBA ASM hacker is cool!
I'm a GBA ASM hacker --> I'm cool :D

Made Day-Night Routine! You can find the thread HERE
  #420    
Old February 7th, 2009 (02:27 PM).
Liquid Shadow's Avatar
Liquid Shadow Liquid Shadow is offline
xD
 
Join Date: Mar 2008
Gender:
Posts: 224
Quote originally posted by Andryandrew:
You went wrong with offsets... 003718F0 is the BIOS code, and it's Read only... pheraps you wanted to write 023718F0? (the ram (Wram) address)? If you wanted to write ROM's bytes, you cannot do it... Rom (like the name say) is Read-Only-Memory
I wanted to write over the Player OW's offset in the Ram, yes. I took the offset from a hex editor because I assumed that would work. Guess not. Do you know the offset in the memory viewer that points to the main player's OW?
__________________

4 truths of life
1. You cannot touch all your teeth with your tongue.
2. All idiots, after reading the first truth, will try it.
3. And discover that the first truth is a lie.
4. You're smiling now because you're an idiot.
  #421    
Old February 7th, 2009 (04:57 PM).
bian's Avatar
bian bian is offline
.............
 
Join Date: Jul 2007
Location: sicret
Gender:
Nature: Naive
Posts: 141
Can you tell me the script in fire red in xse where when the prof gives you the pokedex,
it is already in the national pokedex mode.

sorry,it seems that i can't find that script even when searching in google so i just asked here instead.

pls answer,tnx..
__________________
White FC: 5457 8823 3469
My trade thread (not active anymore, just a reference):
Bian's Event Pokémon Sari-Sari Store
  #422    
Old February 7th, 2009 (09:16 PM).
JPAN JPAN is offline
pokemon rom researcher
 
Join Date: Dec 2008
Posts: 102
The National Pokedex script starts on offset 0x8169035, located inside all of Prof.Oak's scripts (starting at 0x8169595).


Quote:
Is there a limit to the amount of items I can have in a pokemart through scripting. Like can I have one shop person sell all the tms?
It seems able to support any number of items. I tested it with 128 items and it worked, so it should support all 50 tms with no problem.
  #423    
Old February 7th, 2009 (09:38 PM).
Aethestode's Avatar
Aethestode Aethestode is offline
Hacker
 
Join Date: Jan 2008
Location: Australia
Gender: Male
Nature: Serious
Posts: 1,311
Quote originally posted by diegoisawesome:
You accidentally put messages instead of message.
I changed but it's still blank. And do anyone know how to make a script that makes sprite follow the main character (like pikachu following the main characetr in Pokemon Yellow)
  #424    
Old February 7th, 2009 (11:09 PM).
~Teh Panda~'s Avatar
~Teh Panda~ ~Teh Panda~ is offline
Sea of Dreams - Redux
Silver Tier
 
Join Date: Aug 2007
Posts: 906
Im working on a large script and my smaller one for an offshoot of the will not work when I step on its tile. its not all done but the first one is done and the second one is. Over all there will be four but it should work on the second script!

Main one First:

Code:
   '---------------
#org 0x7A0000
lock
faceplayer
checkflag 0x200
if 0x1 goto 0x87A0074
checkflag 0x201
if 0x1 goto 0x87A0095
checkflag 0x202
if 0x1 goto 0x87A00D1
checkflag 0x203
if 0x1 goto 0x87A007F
checkflag 0x204
if 0x1 goto 0x87A00A9
checkflag 0x205
if 0x1 goto 0x87A010C
checkflag 0x206
if 0x1 goto 0x87A008A
checkflag 0x207
if 0x1 goto 0x87A00BD
checkflag 0x208
if 0x1 goto 0x87A019D
msgbox 0x87A015C MSG_YESNO '"Could you deliver a package as a\n..."
compare LASTRESULT 0x1
if 0x1 goto 0x87A01E6
compare LASTRESULT 0x0
if 0x1 goto 0x87A01BB
release
end

'---------------
#org 0x7A0074
msgbox 0x87A014A MSG_NORMAL '"Well get to it!"
release
end

'---------------
#org 0x7A0095
givemoney 0x100 0x0
msgbox 0x87A02C4 MSG_NORMAL '"Thank you very much! Here is your\..."
clearflag 0x200
clearflag 0x201
setflag 0x202
release
end

'---------------
#org 0x7A00D1
msgbox 0x87A015C MSG_YESNO '"Could you deliver a package as a\n..."
compare LASTRESULT 0x1
if 0x1 goto 0x87A00F2
compare LASTRESULT 0x0
if 0x1 goto 0x87A01BB
release
end

'---------------
#org 0x7A007F
msgbox 0x87A014A MSG_NORMAL '"Well get to it!"
release
end

'---------------
#org 0x7A00A9
givemoney 0x100 0x0
msgbox 0x87A02C4 MSG_NORMAL '"Thank you very much! Here is your\..."
checkflag 0x203
checkflag 0x204
setflag 0x205
release
end

'---------------
#org 0x7A010C
msgbox 0x87A015C MSG_YESNO '"Could you deliver a package as a\n..."
compare LASTRESULT 0x1
if 0x1 goto 0x87A0130
compare LASTRESULT 0x0
if 0x1 goto 0x87A01BB
setflag 0x203
release
end

'---------------
#org 0x7A008A
msgbox 0x87A014A MSG_NORMAL '"Well get to it!"
release
end

'---------------
#org 0x7A00BD
givemoney 0x100 0x0
msgbox 0x87A02C4 MSG_NORMAL '"Thank you very much! Here is your\..."
checkflag 0x206
checkflag 0x207
setflag 0x208
release
end

'---------------
#org 0x7A019D
clearflag 0x208
goto 0x87A0000

'---------------
#org 0x7A01E6
msgbox 0x87A0200 MSG_NORMAL '"Oh great!\nWell this package needs..."
giveitem 0x349 0x1 MSG_OBTAIN
setflag 0x200
setflag 0x209
release
end

'---------------
#org 0x7A01BB
msgbox 0x87A01C6 MSG_NORMAL '"Alright then, thanks anyways."
release
end

'---------------
#org 0x7A00F2
msgbox 0x87A024D MSG_NORMAL '"Oh great! Well this package needs\..."
giveitem 0x349 0x1 MSG_OBTAIN
setflag 0x203
release
end

'---------------
#org 0x7A0130
msgbox 0x87A0284 MSG_NORMAL '"Oh great!\nWell this package needs..."
giveitem 0x349 0x1 MSG_OBTAIN
setflag 0x206
release
end


'---------
' Strings
'---------
#org 0x7A015C
= Could you deliver a package as a\ndelivery boy for our company?

#org 0x7A014A
= Well get to it!

#org 0x7A02C4
= Thank you very much! Here is your\nearned money.\l[player] received  100 to add to \nmoney.

#org 0x7A0200
= Oh great!\nWell this package needs o go to\lthe schoolhouse across the city.

#org 0x7A01C6
= Alright then, thanks anyways.

#org 0x7A024D
= Oh great! Well this package needs\no go to the docks.

#org 0x7A0284
= Oh great!\nWell this package needs o go to\lthe Pokemon center.
Second one:

Code:
'---------------
#org 0x800119
lock
checkflag 0x200
if B_False goto 0x8800131
msgbox 0x8800601 MSG_NORMAL '"Package delivered. \nGo back to re..."
setflag 0x202
release
end

'---------------
#org 0x800131
release
end


'---------
' Strings
'---------
#org 0x800601
= Package delivered. \nGo back to receive your money!
__________________




Mystic still in work to let you know...
  #425    
Old February 8th, 2009 (02:54 AM). Edited February 8th, 2009 by Andryandrew.
Andryandrew Andryandrew is offline
Italian Asm Hacker
 
Join Date: Mar 2007
Age: 22
Gender:
Nature: Timid
Posts: 117
Quote originally posted by NeoNemesis:
I wanted to write over the Player OW's offset in the Ram, yes. I took the offset from a hex editor because I assumed that would work. Guess not. Do you know the offset in the memory viewer that points to the main player's OW?
It's 02020649... Here there is the pointer in RAM

Quote originally posted by rockmanmegaman:
I changed but it's still blank. And do anyone know how to make a script that makes sprite follow the main character (like pikachu following the main characetr in Pokemon Yellow)
it is possible only with ASM... and it's difficult...
__________________

Sorry for my bad English... I'm Italian
Anybody that is a GBA ASM hacker is cool!
I'm a GBA ASM hacker --> I'm cool :D

Made Day-Night Routine! You can find the thread HERE
Closed Thread
Quick Reply

Sponsored Links

You may also like.. (Beta)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC -8. The time now is 10:33 AM.