Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!

Reply
 
Thread Tools
  #51    
Old January 5th, 2010 (5:41 PM).
Omega Zero's Avatar
Omega Zero Omega Zero is offline
Is back...
  • Gold Tier
 
Join Date: Dec 2009
Location: I'm always living aren't I?
Age: 19
Gender: Male
Nature: Relaxed
Posts: 445
Yes finally all of these are merged but.. some of the Xse have raws in it which shouldn't be in there
__________________
Reply With Quote

Relevant Advertising!

  #52    
Old January 5th, 2010 (6:53 PM). Edited January 23rd, 2010 by Spherical Ice.
Darthatron's Avatar
Darthatron Darthatron is offline
巨大なトロール。
  • Silver Tier
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 25
Gender: Male
Nature: Modest
Posts: 1,152
Half decent 'Headbutt Script':
Code:
//-------------------------------------
//Preperations
//-------------------------------------
#dynamic 0x800000
#define cAttack 0x1D //Change this value to use another attack

//-------------------------------------
//Main Script
//-------------------------------------
#org @Main
lockall //Lock everything from moving
checkattack cAttack //Stores the first Pokémon who knows the attack into the variable 0x800D
compare 0x800D 0x06 //Makes sure a Pokémon knows the attack...
if 0x01 goto @NotKnown //If the value is 6 then no Pokémon knows the attack
setanimation 0x00 0x800D //The Pokémon animation is set with the Pokémon who knows the attack
bufferpartypokemon 0x00 0x800D //Puts the Pokémon who knows the attack into [buffer1]
bufferattack 0x01 cAttack //Puts the attack name into [buffer2]
msgbox @Message1 0x05 //A Yes/No box appears with the message
compare 0x800D 0x00 //Checks in "No" was selected
if 0x01 goto @DoNotWant //If it was, quit
msgbox @Message2 0x04 //"[buffer1] used [buffer2]!" >> Keep open
closeonkeypress //Close the msgbox when a key is pressed
doanimation 0x25 //Shows the Pokémon animation
waitstate //Waits for the animation to complete
setvar 0x8004 0x01 //Set up to shake screen
setvar 0x8005 0x01
setvar 0x8006 0x0C
setvar 0x8007 0x02
special 0x136 //Shake screen
pause 0x20 //Wait 1~ second
special 0xAB //Call a random battle from the "Tree" section of wild Pokémon
compare 0x800D 0x00 //Checks if a wild battle happened
if 0x1 goto @DoNotWant //If not, quit
waitstate //Wait for the battle to complete
releaseall //Allow the player to move freely again
end //End the script

//-------------------------------------
//Sub Scripts
//-------------------------------------
#org @NotKnown
msgbox @Message3 0x03
end

#org @DoNotWant
releaseall
end

//-------------------------------------
//Messages
//-------------------------------------
#org @Message1
= This tree may contain a Pokemon.\nUse the move [buffer2]?

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

#org @Message3
= This tree may contain a Pokemon.\nIt may be able to be knocked out.
Quote:
Originally Posted by tainui View Post
Yes finally all of these are merged but.. some of the Xse have raws in it which shouldn't be in there
It won't make a difference, except for some people not being able to understand it as easily.
__________________
あなた は しきしゃ です
わたし は ばか です
Reply With Quote
  #53    
Old January 5th, 2010 (11:20 PM).
sky_queen3's Avatar
sky_queen3 sky_queen3 is offline
Mimikyu is cute :3
     
    Join Date: Feb 2009
    Location: Australia
    Age: 27
    Gender: Female
    Nature: Naive
    Posts: 263
    Uh, how do I use the last one, my character just frezes on the spot when I walk on the green S tile.
    __________________
    Mimic me, mimic you
    Reply With Quote
      #54    
    Old January 5th, 2010 (11:23 PM).
    Omega Zero's Avatar
    Omega Zero Omega Zero is offline
    Is back...
    • Gold Tier
     
    Join Date: Dec 2009
    Location: I'm always living aren't I?
    Age: 19
    Gender: Male
    Nature: Relaxed
    Posts: 445
    Quote:
    Originally Posted by sky_queen3 View Post
    Uh, how do I use the last one, my character just frezes on the spot when I walk on the green S tile.
    in advanced map put
    Unknown 0300
    var number 4050
    hope it helps
    __________________
    Reply With Quote
      #55    
    Old January 5th, 2010 (11:49 PM).
    sky_queen3's Avatar
    sky_queen3 sky_queen3 is offline
    Mimikyu is cute :3
       
      Join Date: Feb 2009
      Location: Australia
      Age: 27
      Gender: Female
      Nature: Naive
      Posts: 263
      Well, it at least works now. :D
      __________________
      Mimic me, mimic you
      Reply With Quote
        #56    
      Old January 7th, 2010 (12:00 AM). Edited January 30th, 2010 by Spherical Ice.
      Spherical Ice's Avatar
      Spherical Ice Spherical Ice is online now
      • Moderator
      • Silver Tier
       
      Join Date: Nov 2007
      Location: Bristol, UK
      Age: 19
      Posts: 5,179
      Er, no.

      Spoiler:
      #dynamic 0xoffset

      #org @start
      lock
      faceplayer
      trainerbattle 0x9 0xid 0x3 @intro @defeat
      msgbox @text 0x6
      release
      end

      #org @intro
      = Text.

      #org @defeat
      = Text.

      #org @text
      = Text.


      You don't seem to get the hang of the thread. It's for scripts that are original and aren't explained in tutorials because the commands aren't used specifically for said scripts. You just explained how to make a different type of trainerbattle. -.-

      Also, I've merged all four of these threads to prevent clutter. Please don't make any more copies of this thread, and remember that you can bump threads in Doc and Tuts!
      __________________

      A Pokemon that is discriminated!
      Support squirtle and make it everyone's favourite.
      Reply With Quote
        #57    
      Old January 30th, 2010 (6:18 AM).
      trebornosliw's Avatar
      trebornosliw trebornosliw is offline
      Learning
         
        Join Date: Jul 2009
        Age: 24
        Gender: Male
        Nature: Adamant
        Posts: 523
        Okay, so I have a quick question about the Move Tutor script, right here:
        Spoiler:

        #org @Start
        lock
        faceplayer
        checkflag 0x200
        compare LASTRESULT 0x1
        if 0x1 goto @AlreadyLearnt
        msgbox @WantToLearn
        boxset 0x5
        compare LASTRESULT 0x0
        if 0x1 goto @DontWant
        setvar 0x8005 0x1 ' 0x[Move number]
        special 0x18D
        setflag 0x200
        release
        end

        Now, after I've changed setvar 0x8005 0x1 to setvar 0x8005 0xwhatever, will the script find out on its own what Pokemon can or cannot learn the attack? Where does the program get that info?
        I've got a script that I'm working on that I'll post later, though it's nothing compared to some of the awesome stuff I'm seeing here.
        __________________
        Credit for my avatar goes to the Lego company.
        Reply With Quote
          #58    
        Old January 30th, 2010 (8:45 AM).
        Spherical Ice's Avatar
        Spherical Ice Spherical Ice is online now
        • Moderator
        • Silver Tier
         
        Join Date: Nov 2007
        Location: Bristol, UK
        Age: 19
        Posts: 5,179
        @ Trebonsliw: I'm pretty sure that it searches through the whole of the player's party to see if any of them can learn it. I'm not sure where it gets the info from, though. Trial and error would be the only way to find out.
        __________________

        A Pokemon that is discriminated!
        Support squirtle and make it everyone's favourite.
        Reply With Quote
          #59    
        Old January 30th, 2010 (8:54 AM).
        HackMew's Avatar
        HackMew HackMew is offline
        Mewtwo Strikes Back
        • Crystal Tier
         
        Join Date: Jun 2006
        Posts: 1,314
        Quote:
        Originally Posted by The Master View Post
        @ Trebonsliw: I'm pretty sure that it searches through the whole of the player's party to see if any of them can learn it. I'm not sure where it gets the info from, though. Trial and error would be the only way to find out.
        Yeah, the special should handle that.
        __________________
        Reply With Quote
          #60    
        Old January 30th, 2010 (1:47 PM).
        trebornosliw's Avatar
        trebornosliw trebornosliw is offline
        Learning
           
          Join Date: Jul 2009
          Age: 24
          Gender: Male
          Nature: Adamant
          Posts: 523
          Okay, thanks! It's an awesome script, I'm definitely going to be using it.
          __________________
          Credit for my avatar goes to the Lego company.
          Reply With Quote
            #61    
          Old February 18th, 2010 (2:10 AM). Edited February 28th, 2010 by Logan.
          Logan's Avatar
          Logan Logan is offline
          • Discord Moderoid
          • Platinum Tier
           
          Join Date: Nov 2008
          Location: Salisbury, England
          Age: 22
          Gender: Male
          Nature: Sassy
          Posts: 10,019
          Code:
          #dynamic 0x<offset>
          
          #org @start
          lock
          faceplayer
          showmoney 0x0 0x0 0x0
          msgbox @msg1 MSG_KEEPOPEN
          closeonkeypress
          multichoice 0x14 0x1 0x<mcnumber> 0x0
          compare 0x800D 0x0
          if 0x1 goto @common
          compare 0x800D 0x1
          if 0x1 goto @uncommon
          compare 0x800D 0x2
          if 0x1 goto @rare
          hidemoney 0x0 0x0
          release
          end
          
          #org @common
          checkmoney 0x1388 0x0
          compare 0x800D 0x0
          if 0x1 goto @notenough
          paymoney 0x1388 0x0
          updatemoney 0x0 0x0 0x0
          fanfare 0x13E
          msgbox @msg3 MSG_KEEPOPEN
          closeonkeypress
          waitfanfare
          hidemoney 0x0 0x0
          random 0x5
          compare 0x800D 0x0
          if 0x1 goto @1
          compare 0x800D 0x1
          if 0x1 goto @2
          compare 0x800D 0x2
          if 0x1 goto @3
          compare 0x800D 0x3
          if 0x1 goto @4
          compare 0x800D 0x4
          if 0x1 goto @5
          release
          end
          
          #org @1
          giveegg 0x<species>
          release
          end
          
          #org @2
          giveegg 0x<species>
          release
          end
          
          #org @3
          giveegg 0x<species>
          release
          end
          
          #org @4
          giveegg 0x<species>
          release
          end
          
          #org @5
          giveegg 0x<species>
          release
          end
          
          #org @notenough
          hidemoney 0x0 0x0
          msgbox @msg2 MSG_KEEPOPEN
          closeonkeypress
          release
          end
          
          #org @uncommon
          checkmoney 0x2710 0x0
          compare 0x800D 0x0
          if 0x1 goto @notenough
          paymoney 0x2710 0x0
          updatemoney 0x0 0x0 0x0
          fanfare 0x13E
          msgbox @msg3 MSG_KEEPOPEN
          closeonkeypress
          waitfanfare
          hidemoney 0x0 0x0
          random 0x5
          compare 0x800D 0x0
          if 0x1 goto @k1
          compare 0x800D 0x1
          if 0x1 goto @k2
          compare 0x800D 0x2
          if 0x1 goto @k3
          compare 0x800D 0x3
          if 0x1 goto @k4
          compare 0x800D 0x4
          if 0x1 goto @k5
          release
          end
          
          #org @k1
          giveegg 0x<species>
          release
          end
          
          #org @k2
          giveegg 0x<species>
          release
          end
          
          #org @k3
          giveegg 0x<species>
          release
          end
          
          #org @k4
          giveegg 0x<species>
          release
          end
          
          #org @k5
          giveegg 0x<species>
          release
          end
          
          #org @rare
          checkmoney 0x61A8
          compare 0x800D 0x0
          if 0x1 goto @notenough
          paymoney 0x61A8 0x0
          updatemoney 0x0 0x0 0x0
          fanfare 0x13E
          msgbox @msg1 MSG_KEEPOPEN
          closeonkeypress
          waitfanfare
          hidemoney 0x0 0x0
          random 0x3
          compare 0x800D 0x0
          if 0x1 goto @rare1
          compare 0x800D 0x1
          if 0x1 goto @rare2
          compare 0x800D 0x2
          if 0x1 goto @rare3
          release
          end
          
          #org @rare1
          giveegg 0x<species>
          release
          end
          
          #org @rare2
          giveegg 0x<species>
          release
          end
          
          #org @rare3
          giveegg 0x<species>
          release
          end
          
          #org @msg1
          = Hello, welcome to our Egg Shop!\pWhich kind of Egg would you like?
          
          #org @msg2
          = You don't have enough money.
          
          #org @msg3
          = [black_fr][player] received a [red_fr]Pokémon Egg[black_fr]!
          Here is a public egg shop script. Feel free to change any of the text and any of script. Just give credit to Manipulation; okay? The Multichoice box at the top should contain 'Uncommon, Common and Rare' learn how to change them okay. I'm too lazy to explain it.

          Common - $5000
          Uncommon - $10000
          Rare - $25000
          __________________
          Wait, I saw bare kicks, saw bare clothes
          Said psyduck that, I can't wear those
          I don't like them, they're not my ting
          They went silent, they're all weirdos
          Reply With Quote
            #62    
          Old February 28th, 2010 (11:27 AM). Edited February 28th, 2010 by Team Rocket's Raichu.
          Team Rocket's Raichu Team Rocket's Raichu is offline
          Bye-Bye!
             
            Join Date: Mar 2009
            Age: 21
            Posts: 534
            Wow!...

            I don't know what to say about this, except wow!

            This will make hacks cooler. If I use these I will credit the makers.

            EDIT: We should sticky this thread, if you ask me.
            __________________

            I'm a supermod of that forum.

            I've left, bye PC.
            Reply With Quote
              #63    
            Old February 28th, 2010 (11:42 AM).
            Logan's Avatar
            Logan Logan is offline
            • Discord Moderoid
            • Platinum Tier
             
            Join Date: Nov 2008
            Location: Salisbury, England
            Age: 22
            Gender: Male
            Nature: Sassy
            Posts: 10,019
            Just to inform everyone I've edited the script, if you're using it or plan to please update it with the newest version. The post was edited today.
            __________________
            Wait, I saw bare kicks, saw bare clothes
            Said psyduck that, I can't wear those
            I don't like them, they're not my ting
            They went silent, they're all weirdos
            Reply With Quote
              #64    
            Old March 2nd, 2010 (1:38 PM).
            NarutoActor's Avatar
            NarutoActor NarutoActor is offline
            The rocks cry out to me
            • Silver Tier
             
            Join Date: Jan 2009
            Location: Brooklyn/Marlboro
            Age: 23
            Gender: Female
            Nature: Bashful
            Posts: 1,979
            Okay well I liked harry's Idea for an egg shop, but I thought of a way where rare just gives you a higher percentage, while common just gives you a low percentage at a rare pokemon. This method means that even if you pick common you can get a rare egg(with luck), and if you pick rare you can get an un common pokemon(bad luck)

            If you pick Rare
            Chance of Rare Egg: 80%
            Chance of Uncommon Egg: 20%
            Chance of Common Egg:0%

            If you pick uncommon:
            Chance of Rare Egg:40%
            Chance of Uncommon Egg:50%
            Chance of Common Egg:10%

            If you pick common:
            Chance of Rare Egg:~13.33%
            Chance of uncommon Egg:~16.66
            Chance of Common Egg:70%

            The way I would implement this is adding a message that states that you can buy a ticket, and green ticket has the best chance of a rare pokemon egg.Also that blue was the worse chance, but it is the cheapest.

            Credits:
            Manipulation (for original Egg Shop Script)
            NarutoActor (For new method. )

            Code:
            Code:
            #dynamic 0x<offset>
            
            #org @start
            lock
            faceplayer
            showmoney 0x0 0x0 0x0
            msgbox @msg1 MSG_KEEPOPEN
            closeonkeypress
            multichoice 0x14 0x1 0x<mcnumber> 0x0
            compare 0x800D 0x0
            if 0x1 goto @common
            compare 0x800D 0x1
            if 0x1 goto @uncommon
            compare 0x800D 0x2
            if 0x1 goto @rare
            hidemoney 0x0 0x0
            release
            end
            
            #org @common
            checkmoney 0x1388 0x0
            compare 0x800D 0x0
            if 0x1 goto @notenough
            paymoney 0x1388 0x0
            updatemoney 0x0 0x0 0x0
            fanfare 0x13E
            msgbox @msg3 MSG_KEEPOPEN
            closeonkeypress
            waitfanfare
            hidemoney 0x0 0x0
            random 0x1E
            goto @com
            
            #org @com
            compare 0x800D 0x0
            if 0x1 goto @1 'Uses only 2 rare pokemon, which was ment only for an example; you can add more.
            compare 0x800D 0x1
            if 0x1 goto @1
            compare 0x800D 0x2
            if 0x1 goto @2
            compare 0x800D 0x3
            if 0x1 goto @2
            compare 0x800D 0x4
            if 0x1 goto @3
            compare 0x800D 0x5
            if 0x1 goto @6
            compare 0x800D 0x6
            if 0x1 goto @3
            compare 0x800D 0x7
            if 0x1 goto @3
            compare 0x800D 0x8
            if 0x1 goto @4
            compare 0x800D 0x9
            if 0x1 goto @4
            compare 0x800D 0xA
            if 0x1 goto @5
            goto @7 'stop comparing, since all other posiablitys would take you to a common pkmn.
            
            #org @1
            giveegg 0x<rare_species>
            release
            end
            
            #org @2
            giveegg 0x<rare_species>
            release
            end
            
            #org @3
            giveegg 0x<uncommon_species>
            release
            end
            
            #org @4
            giveegg 0x<uncommon_species>
            release
            end
            
            #org @5
            giveegg 0x<common_species>
            release
            end
            
            #org @6
            giveegg 0x<common_species>
            release
            end
            
            #org @7
            random 0x1
            compare LASTRESULT 0x0
            if true goto @5
            goto @6
            
            #org @notenough
            hidemoney 0x0 0x0
            msgbox @msg2 MSG_KEEPOPEN
            closeonkeypress
            release
            end
            
            #org @uncommon
            checkmoney 0x2710 0x0
            compare 0x800D 0x0
            if 0x1 goto @notenough
            paymoney 0x2710 0x0
            updatemoney 0x0 0x0 0x0
            fanfare 0x13E
            msgbox @msg3 MSG_KEEPOPEN
            closeonkeypress
            waitfanfare
            hidemoney 0x0 0x0
            random 0xA
            goto @com
            
            #org @rare
            checkmoney 0x61A8 
            compare 0x800D 0x0
            if 0x1 goto @notenough
            paymoney 0x61A8 0x0
            updatemoney 0x0 0x0 0x0
            fanfare 0x13E
            msgbox @msg1 MSG_KEEPOPEN
            closeonkeypress
            waitfanfare
            hidemoney 0x0 0x0
            random 0x5
            goto @com
            
            #org @msg1
            = Hello, welcome to our Egg Shop!\pWhich kind of Egg would you like?
            
            #org @msg2
            = You don't have enough money.
            
            #org @msg3
            = [black_fr][player] received a [red_fr]Pokémon Egg[black_fr]!
            Side Notes: Feel Free to add more than 7 to change the percentages around, also re-arranging the Random <number> will change the percentages.
            __________________
            ~There are those people who understand hex, F the rest
            Reply With Quote
              #65    
            Old March 13th, 2010 (1:52 PM).
            PeregrineFig's Avatar
            PeregrineFig PeregrineFig is offline
            Starting Pokémon Obsidian
               
              Join Date: Feb 2010
              Location: Michigan, USA
              Age: 22
              Gender: Male
              Nature: Hardy
              Posts: 202
              Name: Random Clefairy Battle script
              ROM: FireRed (US Version)
              Description: This is a simple little script, but it might come in handy for a newbie hacker. When you talk to the Clefairy a random value between 0 and F is drawn, and if it's 0, you battle the Clefairy for a chance to catch it, otherwise, it bounces away into the mountains and disappears until you re-enter the map.
              Script:
              Spoiler:

              #dynamic 0x740000
              #org @start
              lock
              faceplayer
              cry 0x23 0x0
              msgbox @text 0x6
              random 0xF
              compare 0x800D 0x0
              if 0x1 goto @clefairybattle
              applymovement 0x1 @move
              waitmovement 0x0
              hidesprite LASTTALKED
              release
              end

              #org @clefairybattle
              wildbattle 0x23 0x5 0x0
              fadescreen 0x1
              hidesprite LASTTALKED
              fadescreen 0x0
              setflag 0x202
              release
              end

              #org @text
              = CLEFAIRY: Clef! Cleffa!

              #org @move
              #raw 0x15
              #raw 0x15
              #raw 0x15
              #raw 0xFE

              Comments: Obviously you can change the flag, pokemon and level, movements, etc to whatever you want. Just make sure to set the person ID to the same as the flag used, or the Clefairy won't vanish after battling it. Of course, you might also want it to stay there even after battling it once, in that case just get rid of the setflag command and leave the ID as 0000.
              Credits: I wrote this myself, however, diegoisawesome's tutorial taught me quite a few things about XSE scripting.
              __________________
              Current Projects:
              POKéMON AQUA SAPPHIRE
              POKéMON OBSIDIAN

              Reply With Quote
                #66    
              Old May 21st, 2010 (10:29 PM).
              Rainbow's Avatar
              Rainbow Rainbow is offline
              beep boop
              • Moderator
              • Platinum Tier
              • GTGet-Together Event Management
              • PokéCommunity Daily
              • Discord Moderoid
              • Developer
               
              Join Date: May 2010
              Location: The Medium
              Age: 18
              Gender: Female
              Nature: Quirky
              Posts: 5,250
              Quote:
              Originally Posted by sab View Post
              effect: a random weather script
              game: all gba games
              credit: sab
              script:
              Spoiler:

              '---------------
              #org 0x(offset)
              random 0x0A
              compare LASTRESULT 0x0
              if 0x1 goto @1
              compare LASTRESULT 0x1
              if 0x1 goto @2
              compare LASTRESULT 0x2
              if 0x1 goto @3
              compare LASTRESULT 0x3
              if 0x1 goto @4
              compare LASTRESULT 0x4
              if 0x1 goto @5
              compare LASTRESULT 0x5
              if 0x1 goto @6
              compare LASTRESULT 0x6
              if 0x1 goto @7
              compare LASTRESULT 0x7
              if 0x1 goto @8
              compare LASTRESULT 0x8
              if 0x1 goto @9
              compare LASTRESULT 0x9
              if 0x1 goto @10

              #org @1
              setweather 0x1
              doweather
              end

              #org @2
              setweather 0x2
              doweather
              end

              #org @3
              setweather 0x3
              doweather
              end

              #org @4
              setweather 0x4
              doweather
              end

              #org @5
              setweather 0x5
              doweather
              end

              #org @6
              setweather 0x7
              doweather
              end

              #org @7
              setweather 0xb
              doweather
              end

              #org @8
              setweather 0xd
              doweather
              end

              #org @9
              setweather 0x2
              doweather
              end

              #org @10
              setweather 0xb
              doweather
              end

              I tried the random weather script and it just said
              "No dynamic start offset specified."
              Does anyone know how to fix it?
              __________________

              pgc discord daily mkj
              paired with colours
              Reply With Quote
                #67    
              Old May 21st, 2010 (10:42 PM).
              Spherical Ice's Avatar
              Spherical Ice Spherical Ice is online now
              • Moderator
              • Silver Tier
               
              Join Date: Nov 2007
              Location: Bristol, UK
              Age: 19
              Posts: 5,179
              Add "#dynamic 0xOFFSET" at the beginning, with 0xOFFSET being your offset.
              Reply With Quote
                #68    
              Old July 25th, 2014 (7:47 AM). Edited July 25th, 2014 by Danny0317.
              Danny0317's Avatar
              Danny0317 Danny0317 is offline
              Fluorite's back, brah
              • Gold Tier
               
              Join Date: Jun 2013
              Location: Miami, FL
              Age: 17
              Gender: Male
              Nature: Hasty
              Posts: 1,075
              Reviving this hella old thread for a script I just made and tested in Emerald. It's quite simple, but still pretty cool. The purpose of it is this:





              Anyways, it's for Emerald and here's how it works. Italics means you can change anything there, and I just have it there to show the script.

              Code:
              #dynamic 0xE40000
              #org @start
              lock
              faceplayer
              msgbox @1 0x6 //just had that there, obviously not mandatory
              goto @choose
              end
              
              #org @choose
              special 0x28 //stores party in RAM
              fadescreen 0x1
              special 0x2A //Pokemon choosing screen
              waitstate
              compare LASTRESULT 0x0
              if 0x5 goto @it //if all went well, like no cancelling, go to @it 
              special 0x29 //restores party (In my case it won't be mandatory since I'm forcing the player to choose in @no, obviously you can change that like in the steven battle where he tells you to get ready or something
              goto @no //if something bad did happen, goto @no
              
              #org @it
              special 0xFB //it updates your party I guess? Without it I still had 6 pokemon
              msgbox @3 0x6
              trainerbattle 0x3 0x10 0x0 @win
              msgbox @4 0x6
              special 0x29 //restore your party
              release
              end
              
              #org @win
              = Oh no.
              
              #org @4
              = I will now return your party.
              
              #org @3
              = Battle begin.
              
              #org @no
              msgbox @2 0x6
              goto @choose //here for all of @no you can make it do something else, and it will be fine because your party has already been restored back with special 0x29
              
              #org @2
              = I said choose.
              
              #org @1
              = Choose.
              and without my comments, and erased all of my stuff

              Spoiler:
              Code:
              #dynamic 0xE40000
              #org @start
              lock
              faceplayer
              goto @choose
              end
              
              #org @choose
              special 0x28
              fadescreen 0x1
              special 0x2A
              waitstate
              compare LASTRESULT 0x0
              if 0x5 goto @it
              special 0x29
              goto @no
              
              #org @it
              special 0xFB
              INSERT YOUR STUFF HERE
              special 0x29
              release
              end
              
              #org @no


              NOTE:As of now, losing the battle will leave you only with the pokemon you choose. I guess a solution for that would be putting special 0x29 in a level script, perhaps you can put a sethealingplace command IN the script somewhere, so when they lose they will go to that one and have a special 0x29 there. Sorry about that
              __________________
              Reply With Quote
                #69    
              Old July 30th, 2014 (11:48 PM).
              Danny0317's Avatar
              Danny0317 Danny0317 is offline
              Fluorite's back, brah
              • Gold Tier
               
              Join Date: Jun 2013
              Location: Miami, FL
              Age: 17
              Gender: Male
              Nature: Hasty
              Posts: 1,075
              Hate to double post but it doesn't seem like anyone is gonna post here soon.
              Okay, so my other script I'd like to share.
              What it does: Okay, so you know when you use cut or an HM, your pokemon appears with the cool little background? Well, I found out how to make that happen with pokemon that aren't in your party. This could be good for scenes that a villain uses a pokemon to do something. I would post a video, but seeing as how I put a video in my other post, I don't wanna advertise or anything.
              Code:
              special 0x28 //stores party in RAM
              callasm 0x8E40AA1 //Hackmew's routine, erases pokemon from party
              callasm 0x8E40AA1
              callasm 0x8E40AA1
              callasm 0x8E40AA1
              callasm 0x8E40AA1
              callasm 0x8E40AF1 // Hackmew's routine, erases last pokemon from party
              givepokemon 0x15F 0xA 0x0 0x0 0x0 0x0 //the pokemon you want to appear
              checkattack 0x96 //like you would in an HM script, but put an attack you're 100% sure it has. Make the pokemon a level 1 if you want.
              bufferpokemon 0x0 LASTRESULT
              setanimation 0x0 LASTRESULT
              doanimation 0x25
              waitstate
              special 0x29 //restores your party
              Bugs I know: The player does an animation as well (raises pokeball). To fix that, move the camera 7 tiles or more to where you can't see the player like I did and then the script. Oh, it's for emerald, and for FR I haven't tried it, but if you wanna do it, replace special 0x28 to 0x27 and 0x29 to 0x28. Again, I haven't tried it, but it SHOULD work.
              __________________
              Reply With Quote
                #70    
              Old July 31st, 2014 (1:07 AM).
              Logan's Avatar
              Logan Logan is offline
              • Discord Moderoid
              • Platinum Tier
               
              Join Date: Nov 2008
              Location: Salisbury, England
              Age: 22
              Gender: Male
              Nature: Sassy
              Posts: 10,019
              Quote:
              Originally Posted by Dark Sneasel View Post
              stuff
              Like the concept of that script and what it could do quite a lot, well done. :)
              __________________
              Wait, I saw bare kicks, saw bare clothes
              Said psyduck that, I can't wear those
              I don't like them, they're not my ting
              They went silent, they're all weirdos
              Reply With Quote
                #71    
              Old August 6th, 2014 (8:58 PM). Edited August 6th, 2014 by Danny0317.
              Danny0317's Avatar
              Danny0317 Danny0317 is offline
              Fluorite's back, brah
              • Gold Tier
               
              Join Date: Jun 2013
              Location: Miami, FL
              Age: 17
              Gender: Male
              Nature: Hasty
              Posts: 1,075
              Quote:
              Originally Posted by Dark Sneasel View Post
              Reviving this hella old thread for a script I just made and tested in Emerald. It's quite simple, but still pretty cool. The purpose of it is this:





              Anyways, it's for Emerald and here's how it works. Italics means you can change anything there, and I just have it there to show the script.

              Code:
              #dynamic 0xE40000
              #org @start
              lock
              faceplayer
              msgbox @1 0x6 //just had that there, obviously not mandatory
              goto @choose
              end
              
              #org @choose
              special 0x28 //stores party in RAM
              fadescreen 0x1
              special 0x2A //Pokemon choosing screen
              waitstate
              compare LASTRESULT 0x0
              if 0x5 goto @it //if all went well, like no cancelling, go to @it 
              special 0x29 //restores party (In my case it won't be mandatory since I'm forcing the player to choose in @no, obviously you can change that like in the steven battle where he tells you to get ready or something
              goto @no //if something bad did happen, goto @no
              
              #org @it
              special 0xFB //it updates your party I guess? Without it I still had 6 pokemon
              msgbox @3 0x6
              trainerbattle 0x3 0x10 0x0 @win
              msgbox @4 0x6
              special 0x29 //restore your party
              release
              end
              
              #org @win
              = Oh no.
              
              #org @4
              = I will now return your party.
              
              #org @3
              = Battle begin.
              
              #org @no
              msgbox @2 0x6
              goto @choose //here for all of @no you can make it do something else, and it will be fine because your party has already been restored back with special 0x29
              
              #org @2
              = I said choose.
              
              #org @1
              = Choose.
              and without my comments, and erased all of my stuff

              Spoiler:
              Code:
              #dynamic 0xE40000
              #org @start
              lock
              faceplayer
              goto @choose
              end
              
              #org @choose
              special 0x28
              fadescreen 0x1
              special 0x2A
              waitstate
              compare LASTRESULT 0x0
              if 0x5 goto @it
              special 0x29
              goto @no
              
              #org @it
              special 0xFB
              INSERT YOUR STUFF HERE
              special 0x29
              release
              end
              
              #org @no


              NOTE:As of now, losing the battle will leave you only with the pokemon you choose. I guess a solution for that would be putting special 0x29 in a level script, perhaps you can put a sethealingplace command IN the script somewhere, so when they lose they will go to that one and have a special 0x29 there. Sorry about that
              So diegoisawesome showed me that your stats don't update after. To fix that, first insert this routine:

              Code:
              .text
              .align 2
              .thumb
              .thumb_func
              .global ParkHack
              
              start:		ldr r0, addr1
              		ldr r1, val1
              		ldr r0, [r0]
              		add r0, r0, r1
              		ldr r1, addr2
              		ldrh r1, [r1]
              		strb r1, [r0]
              		mov r1, #0x0
              		strb r1, [r0, #0x2]
              		strb r1, [r0, #0x4]
              		strb r1, [r0, #0x6]
              		strb r1, [r0, #0x8]
              		strb r1, [r0, #0xA]
              		bx lr
              
              .align 2
              addr1:		.word 0x03005D90
              addr2:		.word 0x020375F0
              val1:		.word 0x00000CAA
              (credit diegoisawesome for it)

              And then this

              #org @it
              callasm 0x(offset + 1) //sets proper slot for 0xEA
              special 0xFB //removes all other Pokémon
              msgbox @3 0x6
              trainerbattle 0x3 0x10 0x0 @win
              msgbox @4 0x6
              setvar 0x8004 0x6
              special 0xEA //store new stats into temporary space
              special 0x29 //restore your party from temporary space
              release
              end
              __________________
              Reply With Quote
                #72    
              Old November 16th, 2016 (4:43 AM).
              loster313 loster313 is offline
                 
                Join Date: Mar 2015
                Location: Norway
                Gender: Male
                Nature: Quiet
                Posts: 52
                wow awesome a collaboration on lot of useful scripts, i myself have found 2 cool working scripts:D
                Reply With Quote
                  #73    
                Old 3 Weeks Ago (9:51 AM). Edited 3 Weeks Ago by tkim.
                tkim tkim is offline
                   
                  Join Date: May 2011
                  Posts: 155
                  Name: Stats Judge
                  ROM info: Pokémon: FireRed Version [BPRE] (U) v1.0
                  Effect: Reads selected Pokémon's IVs and stores them at vars 0x8004-0x800A
                  Script:
                  Spoiler:
                  #dynamic 0x8013B9
                  '---------------
                  #org @start
                  lock
                  faceplayer
                  checkflag 0x217
                  if 0x0 call @intro
                  checkflag 0x217
                  if 0x1 call @standard
                  setflag 0x217
                  goto @getoaiv

                  '---------------
                  #org @intro
                  msgbox @1st MSG_KEEPOPEN '"For 70 years I have raised POKéMON..."
                  return

                  '---------------
                  #org @standard
                  msgbox @2nd MSG_KEEPOPEN '"Ah, youngster! Do your POKéMON's\n..."
                  return

                  '---------------
                  #org @getoaiv
                  special 0x9F
                  waitstate
                  compare 0x8004 0x6
                  if 0x4 goto @nothanks
                  special2 LASTRESULT 0x147
                  compare LASTRESULT 0x19C
                  if 0x1 goto @eggsplain
                  callasm 0x8[routine+1]
                  compare 0x8004 0x5A
                  if 0x3 goto @carp
                  compare 0x8004 0x78
                  if 0x3 goto @good
                  compare 0x8004 0x96
                  if 0x3 goto @excellent
                  compare 0x8004 0x97
                  if 0x4 goto @flawless
                  end

                  '---------------
                  #org @nothanks
                  msgbox @3rd MSG_KEEPOPEN '"What?\nYou have no time for my adv..."
                  release
                  end

                  '---------------
                  #org @eggsplain
                  msgbox @4th MSG_KEEPOPEN '"An expert I am, but even I can't t..."
                  goto @getoaiv

                  '---------------
                  #org @carp
                  msgbox @5th MSG_KEEPOPEN '"[.]Hmm[.]\pThis one, overall, I wo..."
                  goto @getbiv

                  '---------------
                  #org @good
                  msgbox @6th MSG_KEEPOPEN '"[.]Hmm[.]\pThis one, overall, I wo..."
                  goto @getbiv

                  '---------------
                  #org @excellent
                  msgbox @7th MSG_KEEPOPEN '"[.]Hmm[.]\pThis one, overall, I wo..."
                  goto @getbiv

                  '---------------
                  #org @flawless
                  msgbox @8th MSG_KEEPOPEN '"[.]Hmm[.]\pThis one, overall, I wo..."
                  goto @getbiv

                  '---------------
                  #org @getbiv
                  comparevars 0x8005 0x8006
                  if 0x1 goto @one
                  comparevars 0x8005 0x8006
                  if 0x0 goto @two
                  goto @three

                  '---------------
                  #org @one
                  random 0x2
                  compare LASTRESULT 0x0
                  if 0x1 goto @three
                  goto @two

                  '---------------
                  #org @three
                  comparevars 0x8005 0x8007
                  if 0x1 goto @four
                  comparevars 0x8005 0x8007
                  if 0x0 goto @five
                  goto @six

                  '---------------
                  #org @two
                  comparevars 0x8006 0x8007
                  if 0x1 goto @seven
                  comparevars 0x8006 0x8007
                  if 0x0 goto @five
                  goto @eight

                  '---------------
                  #org @seven
                  random 0x2
                  compare LASTRESULT 0x0
                  if 0x1 goto @eight
                  goto @five

                  '---------------
                  #org @eight
                  comparevars 0x8006 0x8008
                  if 0x1 goto @nine
                  comparevars 0x8006 0x8008
                  if 0x0 goto @ten
                  goto @eleven

                  '---------------
                  #org @nine
                  random 0x2
                  compare LASTRESULT 0x0
                  if 0x1 goto @eleven
                  goto @ten

                  '---------------
                  #org @ten
                  comparevars 0x8008 0x8009
                  if 0x1 goto @twelve
                  comparevars 0x8008 0x8009
                  if 0x0 goto @thirteen
                  goto @fourteen

                  '---------------
                  #org @twelve
                  random 0x2
                  compare LASTRESULT 0x0
                  if 0x1 goto @fourteen
                  goto @thirteen

                  '---------------
                  #org @thirteen
                  comparevars 0x8009 0x800A
                  if 0x1 goto @fifteen
                  comparevars 0x8009 0x800A
                  if 0x0 goto @sixteen
                  goto @seventeen

                  '---------------
                  #org @fifteen
                  random 0x2
                  compare LASTRESULT 0x0
                  if 0x1 goto @seventeen
                  goto @sixteen

                  '---------------
                  #org @thirtysix
                  bufferstring 0x0 0x83FD590 '"HP"
                  copyvar 0x8004 0x8005
                  goto @eighteen

                  '---------------
                  #org @twentyfour
                  bufferstring 0x0 0x83FD593 '"ATTACK"
                  copyvar 0x8004 0x8006
                  goto @eighteen

                  '---------------
                  #org @sixty
                  bufferstring 0x0 0x83FD59A '"DEFENSE"
                  copyvar 0x8004 0x8007
                  goto @eighteen

                  '---------------
                  #org @fifty
                  bufferstring 0x0 0x83FD5A2 '"SPEED"
                  copyvar 0x8004 0x8008
                  goto @eighteen

                  '---------------
                  #org @seventeen
                  bufferstring 0x0 @fortyone '"SPECIAL ATTACK"
                  copyvar 0x8004 0x8009
                  goto @eighteen

                  '---------------
                  #org @sixteen
                  bufferstring 0x0 @fortytwo '"SPECIAL DEFENSE"
                  copyvar 0x8004 0x800A
                  goto @eighteen

                  '---------------
                  #org @fourteen
                  comparevars 0x8008 0x800A
                  if 0x1 goto @ninteen
                  comparevars 0x8008 0x800A
                  if 0x0 goto @sixteen
                  goto @fifty

                  '---------------
                  #org @ninteen
                  random 0x2
                  compare LASTRESULT 0x0
                  if 0x1 goto @fifty
                  goto @sixteen

                  '---------------
                  #org @eleven
                  comparevars 0x8006 0x8009
                  if 0x1 goto @twentyone
                  comparevars 0x8006 0x8009
                  if 0x0 goto @thirteen
                  goto @twentytwo

                  '---------------
                  #org @twentyone
                  random 0x2
                  compare LASTRESULT 0x0
                  if 0x1 goto @twentytwo
                  goto @thirteen

                  '---------------
                  #org @twentytwo
                  comparevars 0x8006 0x800A
                  if 0x1 goto @twentythree
                  comparevars 0x8006 0x800A
                  if 0x0 goto @sixteen
                  goto @twentyfour

                  '---------------
                  #org @twentythree
                  random 0x2
                  compare LASTRESULT 0x0
                  if 0x1 goto @twentyfour
                  goto @sixteen

                  '---------------
                  #org @four
                  random 0x2
                  compare LASTRESULT 0x0
                  if 0x1 goto @six
                  goto @five

                  '---------------
                  #org @five
                  comparevars 0x8007 0x8008
                  if 0x1 goto @twentyfive
                  comparevars 0x8007 0x8008
                  if 0x0 goto @ten
                  goto @twentysix

                  '---------------
                  #org @twentyfive
                  random 0x2
                  compare LASTRESULT 0x0
                  if 0x1 goto @twentysix
                  goto @ten

                  '---------------
                  #org @twentysix
                  comparevars 0x8007 0x8009
                  if 0x1 goto @twentyeight
                  comparevars 0x8007 0x8009
                  if 0x0 goto @thirteen
                  goto @twentyseven

                  '---------------
                  #org @twentyeight
                  random 0x2
                  compare LASTRESULT 0x0
                  if 0x1 goto @twentyseven
                  goto @thirteen

                  '---------------
                  #org @twentyseven
                  comparevars 0x8007 0x800A
                  if 0x1 goto @twentynine
                  comparevars 0x8007 0x800A
                  if 0x0 goto @sixteen
                  goto @sixty

                  '---------------
                  #org @twentynine
                  random 0x2
                  compare LASTRESULT 0x0
                  if 0x1 goto @sixty
                  goto @sixteen

                  '---------------
                  #org @six
                  comparevars 0x8005 0x8008
                  if 0x1 goto @thirtyone
                  comparevars 0x8005 0x8008
                  if 0x0 goto @ten
                  goto @thirtytwo

                  '---------------
                  #org @thirtyone
                  random 0x2
                  compare LASTRESULT 0x0
                  if 0x1 goto @thirtytwo
                  goto @ten

                  '---------------
                  #org @thirtytwo
                  comparevars 0x8005 0x8009
                  if 0x1 goto @thirtythree
                  comparevars 0x8005 0x8009
                  if 0x0 goto @thirteen
                  goto @thirtyfour

                  '---------------
                  #org @thirtythree
                  random 0x2
                  compare LASTRESULT 0x0
                  if 0x1 goto @thirtyfour
                  goto @thirteen

                  '---------------
                  #org @thirtyfour
                  comparevars 0x8005 0x800A
                  if 0x1 goto @thirtyfive
                  comparevars 0x8005 0x800A
                  if 0x0 goto @sixteen
                  goto @thirtysix

                  '---------------
                  #org @thirtyfive
                  random 0x2
                  compare LASTRESULT 0x0
                  if 0x1 goto @thirtysix
                  goto @sixteen

                  '---------------
                  #org @eighteen
                  msgbox @9th MSG_KEEPOPEN '"Incidentally, the best aspect of i..."
                  compare 0x8004 0xF
                  if 0x3 goto @fortythree
                  compare 0x8004 0x19
                  if 0x3 goto @fortyfour
                  compare 0x8004 0x1E
                  if 0x3 goto @fortyfive
                  compare 0x8004 0x1F
                  if 0x4 goto @fortysix
                  end

                  '---------------
                  #org @fortythree
                  msgbox @10th MSG_KEEPOPEN '"That stat is relatively good.\n[.]..."
                  goto 0x816E895

                  '---------------
                  #org @fortyfour
                  msgbox @11th MSG_KEEPOPEN '"That stat is quite impressive.\n[...."
                  goto 0x816E895

                  '---------------
                  #org @fortyfive
                  msgbox @12th MSG_KEEPOPEN '"That stat is outstanding!\n[.]Hm[...."
                  goto 0x816E895

                  '---------------
                  #org @fortysix
                  msgbox @13th MSG_KEEPOPEN '"It's flawless! A thing of perfecti..."
                  goto 0x816E895


                  '---------
                  ' Strings
                  '---------
                  #org @1st
                  = For 70 years I have raised POKéMON!\nI am the man they revere as\lthe legendary top POKéMON BREEDER!\pIf you ever become as seasoned as\nme, you'll see the abilities of\lPOKéMON at a glance.\pYou're a TRAINER. Doesn't it interest\nyou to know your own POKéMON's\labilities?\pHere!\nLet's have a look at your POKéMON!

                  #org @2nd
                  = Ah, youngster! Do your POKéMON's\nabilities intrigue you?\pHere, here!\nLet's have a look at your POKéMON!

                  #org @3rd
                  = What?\nYou have no time for my advice?\pYou should always be eager to learn\nfrom the experiences of your elders!

                  #org @4th
                  = An expert I am, but even I can't\ntell anything about an unhatched\lPOKéMON!\pShow me a POKéMON!\nA POKéMON is what I need to see!

                  #org @5th
                  = [.]Hmm[.]\pThis one, overall, I would describe\nas being of average ability.

                  #org @6th
                  = [.]Hmm[.]\pThis one, overall, I would describe\nas having better-than-average\lability.

                  #org @7th
                  = [.]Hmm[.]\pThis one, overall, I would say is\nquite impressive in ability!

                  #org @8th
                  = [.]Hmm[.]\pThis one, overall, I would say is\nwonderfully outstanding in ability!

                  #org @fortyone
                  = SPECIAL ATTACK

                  #org @fortytwo
                  = SPECIAL DEFENSE

                  #org @9th
                  = Incidentally, the best aspect of it,\nI would say, is its [buffer1][.]

                  #org @10th
                  = That stat is relatively good.\n[.]Hm[.] That's how I call it.

                  #org @11th
                  = That stat is quite impressive.\n[.]Hm[.] That's how I call it.

                  #org @12th
                  = That stat is outstanding!\n[.]Hm[.] That's how I call it.

                  #org @13th
                  = It's flawless! A thing of perfection!\n[.]Hm[.] That's how I call it.

                  Comments & Bugs: No bugs. Inefficient, which is due to my lack of ASM knowledge but nonetheless works exactly like Emerald ingame. Change flags if needed. Must use my asm routine for this script (change the orange text in the script as instructed): https://www.pokecommunity.com/showpost.php?p=9648919&postcount=1182
                  Credits: tkim
                  Reply With Quote
                  Reply
                  Quick Reply

                  Sponsored Links
                  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 GMT -8. The time now is 3:11 AM.