View Single Post
  #53    
Old July 13th, 2010 (12:36 AM). Edited July 13th, 2010 by Darthatron.
Darthatron's Avatar
Darthatron
巨大なトロール。
Community Supporter
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 23
Gender: Male
Nature: Modest
IM Address: [email protected] (Yes, it's MSN)
Name: Darthatron
Position: Advance-level Scripter and/or ASM Hacker
Proof of Work:
Scripting:
Spoiler:
A basic WHIRLPOOL script:
Code:
#dynamic 0x800200
#include stdattacks.rbh
#define WATERTILE 0x12B                   ;FireRed Ocean Tile. Change this value to
                                          ;whatever the default ocean tile is.
;-------------------;
;SCRIPTS START HERE!;
;-------------------;
#org @main
lockall
checkattack ATK_WHIRLPOOL
compare LASTRESULT 0x6                    ;Check if any Pokemon in the party knows the attack.
if 0x1 goto @nowhirlpool                  ;If not, goto @nowhirlpool
setanimation 0x0 LASTRESULT
bufferpartypokemon 0x0 LASTRESULT
bufferattack 0x1 ATK_WHIRLPOOL
msgbox @string2 MSG_YESNO
compare LASTRESULT 0x0                    ;Did PLAYER pick the "No" option?
if 0x1 goto @endnow                       ;If so, goto @endnow
msgbox @string3 MSG_KEEPOPEN
closeonkeypress
doanimation 0x25                          ;Use Pokemon animation.
waitstate
call @whirlpool
releaseall
end

#org @nowhirlpool
msgbox @string1 MSG_NORMAL
end

#org @endnow
releaseall
end

#org @whirlpool
getplayerpos 0x8004 0x8005
setvar 0x800C 0x0000
copybyte 0x020370D4 0x02036E58            ;Prepare the PLAYERFACING variable (for signpost scripts).
compare 0x800C 0x01                       ;Is the player facing down?
if B_TRUE call @down
compare 0x800C 0x02                       ;Is the player facing up?
if B_TRUE call @up
compare 0x800C 0x03                       ;Is the player facing left?
if B_TRUE call @left
compare 0x800C 0x04                       ;Is the player facing right?
if B_TRUE call @right
setmaptile 0x8004 0x8005 WATERTILE 0x00   ;Set the tile infront of the player to passable.
special 0x08E
return

#org @up
subvar 0x8005 0x01                        ;Subtract one from the Y Value.
return

#org @down
addvar 0x8005 0x01                        ;Add one from the Y Value.
return

#org @left
subvar 0x8004 0x01                        ;Subtract one from the X Value.
return

#org @right
addvar 0x8004 0x01                        ;Add one from the X Value.
return

;-------------------;
;STRINGS START HERE!;
;-------------------;
#org @string1
= The WHIRLPOOL is strong!

#org @string2
= The current is strong!\nUse WHIRLPOOL?

#org @string3
= [buffer1] used [buffer2]!


ASeMbly:
Spoiler:
Yeah, I don't really know how to show proof of ASM Hacking... But... These are the bytes which limit the overworld sprites in each game, which I found by disassembling the ROMs:
Code:
FireRed:    0x005F2E0; 0x97 (151)
LeafGreen:  0x005F2E0; 0x97 (151)
Ruby:       0x005BC28; 0xD9 (217)
Sapphire:   0x005BC2C; 0xD9 (217)
Emerald:    0x008E6C4; 0xEE (238)
These values need to be increased to expand the OWs available in game.

E.G: Changing the Byte at 0x005F2E0 (in a FireRed ROM) to 0x00 would cause all OW Sprites to become the 'little boy'.

EDIT: Except the male player sprite.


Side Note: Just so you know, I don't hack all the time and I am not very imaginative... :D
__________________
あなた は しきしゃ です
わたし は ばか です