View Single Post
  #25    
Old February 14th, 2008, 03:59 AM
score_under's Avatar
score_under
I program the *other* ASM.
 
Join Date: Aug 2005
Location: Hertfordshire, England
Age: 21
Nature: Rash
This post applies to an OLD version of the program only

Hi,
Code:
copyvarifnotzero 0x8000 0x148
copyvarifnotzero 0x8001 0x1
When you find/obtain an item, the game needs to know which item and how much.
The number stored in 0x8000 tells it which item (0x148 = TM40 Aerial Ace)
The number stored in 0x8001 tells it how many (one)
then it calls the function to give the item (callstd MSG_FIND) and ends the script.

Also, be careful not to mix up message and msgbox in pksv - they mean different things.
Code:
message 0x????????  ' Gets ready to show a message (only one page, ie. cannot have \p or \l)
showmsg
waitbutton
closemsg
end

--------------

msgbox 0x???????? 'can have multiple pages
callstd MSG_NORMAL 'shows message
end
message 0x???????? is used primarily in the "berry" script, as it provides more control over when the message closes, what it does, etc.
msgbox 0x???????? is used for general-purpose messages.

How to edit scripts
This is a copy of a PM I sent - I hope it's useful to you.
Spoiler:

Quote:
I understand how to work the program, but I'm not sure how to change the scripts.

When I open it it comes up with a strange black box, then gives a prompt to open the ROM.
After that it asks for an offset. So I put it in and it comes up with the offset I asked for. But then if I hit any button it clicks out.

Help?
Sorry for being a bit ;) late, but if you're still at a loss, here's how to do it:

Save this as EditScript[NAME].bat (or something you can remember) EDIT: You need to put .bat on the end or it does not work!
Code:
@echo off
pksv ROMFILE.GBA OFFSET >edit_script
notepad edit_script
pksv -r edit_script ROMFILE.GBA
For example:
EditScript[Berry].bat
Code:
@echo off
pksv RubyRom.gba 1A14DD >edit_script
notepad edit_script
pksv -r edit_script RubyRom.gba
Then, move the EditScript[NAME].bat file into the PKSV folder (along with the ROM, if you don't know how to change BAT-files accordingly)
Now, double-click your .bat file and it should open notepad. Change the script in there, and as soon as you save and exit notepad, it will compile your script.

The 1st PKSV command chooses the ROM and offset, and decompiles it.
The last PKSV command chooses the ROM and script, and compiles it again.
ps. only 25% of people download this from pokecommunity.com - the rest come from pokecommunity.com
__________________
Plz not to PM me, I don't come here often enough. Email if you need me

Last edited by score_under; July 15th, 2009 at 03:33 PM.