View Single Post
  #15    
Old July 1st, 2010, 06:31 PM
diegoisawesome's Avatar
diegoisawesome
Not the Script Help Thread
Community Supporter
 
Join Date: Dec 2007
Location: Goldenrod City, Johto
Age: 17
Gender: Male
Nature: Quirky
Quote:
Originally Posted by shiny quagsire View Post
I'm using JPAN's hacked engine, and I was wondering how I could turn his random water battle, to use the tree data? Here is the code he made:
Code:
.align 2
.thumb


/*Special 0x98 will start a random water battle, such as those in the sea.
Sister to the previous function, will start a water battle anywhere there is 
a water pokemon data.*/

Special_98: push {r4-r7, lr}
        mov r7, r8
        push {r7}
        sub SP, SP, #0x8
        ldr r0, water_data
        lsl r4, r0, #0x18
        lsr r4, r4, #0x18
        ldr r1, wild_generator2
        bx r1
.hword 0x0000
water_data: .word 0x22000410 /*the lake tile data*/
wild_generator2: .word 0x0806cbe5
Actually, you don't need to do that. there's already a built-in special for that, although I don't know what it is.
If you find it, please tell me, and I'll try to get it into my scripting tutorial.
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Reply With Quote