View Single Post
  #440    
Old July 30th, 2009 (05:38 AM). Edited July 31st, 2009 by score_under.
score_under's Avatar
score_under score_under is offline
I program the *other* ASM.
Crystal Tier
 
Join Date: Aug 2005
Location: Hertfordshire, England
Age: 22
Nature: Rash
Posts: 525
Quote originally posted by techie775:
I Finally got it! I forgot for some stuff you have to go to another area and return to the area you want to test your Script to let everything set in. Sudowoodo leaves the area whether you win the battle or not. Thanks for all the help! Here's the code in case someone wants to use it as a reference for a legendary pokemon.

Spoiler:
#org 0x88013BF
'-----------------------------------
lock
faceplayer
checkflag 0x225
if true jump 0x88013E7 ' Flag is set
checksound too early
cry SUDOWOODO 0x3828 should be 0
nop0 ' #raw 0x0 should not be here
msgbox 0x88013EC ' GYAOOOO!!!!
callstd MSG_LOCK ' Built-in lock command
battle SUDOWOODO 40 NONE
special BATTLE_WIPE
waitspecial
disappear LASTTALKED
setflag 0x6C25 should be 0x225
end

#org 0x88013E7
'-----------------------------------
release
end


#org 0x88013EC
= GYAOOOO!!!!
Highlighted a few mistakes in that quote, here's a "corrected" version with #dynamic commands.
Spoiler:
Code:
#dyn 0x700000
#org @start
'-----------------------------------
lock
faceplayer
checkflag 0x225
if true jump :end
cry SUDOWOODO 0
msgbox @msg ' GYAOOOO!!!!
callstd MSG_LOCK ' Built-in lock command
checksound
battle SUDOWOODO 40 NONE
special BATTLE_WIPE
waitspecial
disappear LASTTALKED
setflag 0x225
:end
release
end

#org @msg
= GYAOOOO!!!!

I hope you're liking these new additions (pokemon IDs resolved to names, levels in decimal, BATTLE_WIPE and other common "special" commands resolved to easy to read names, the label support, the flag "notepad"...)

Format:
battle Pokemon Level Item
Old:
battle 0xB9 0x28 0x0
New:
battle SUDOWOODO 40 NONE

I planned to release this version of PKSV much earlier than I did, but the later release of course means more features.

If anyone needs to know... press ctrl+e to get to the script searcher, and try something like this:
Code:
msgbox any
callstd MSG_FACEPLAYER
Press Compile, "Script", then Search Next...

("Script" is how it is decompiled - those options have no effect on compiling)

I got this:
Code:
#org 0x8160529
'-----------------------------------
msgbox 0x8172255 ' I came here with som...
callstd MSG_FACEPLAYER ' Builtin lock/faceplayer
end


#org 0x8172255
= I came here with some friends to\ncatch us some BUG POK\eMON!\pThey're all itching to get into\nsome POK\eMON battles!
__________________
Plz not to PM me, I don't come here often enough. Email if you need me