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!

TrollandToad.com
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: 26
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: 266
    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: 266
      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
      • Crystal Tier
       
      Join Date: Nov 2007
      Location: Bristol, UK
      Age: 19
      Posts: 5,231
      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: 25
        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
        • Crystal Tier
         
        Join Date: Nov 2007
        Location: Bristol, UK
        Age: 19
        Posts: 5,231
        @ 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: 25
          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
          • Platinum Tier
           
          Join Date: Nov 2008
          Location: Salisbury, England
          Age: 22
          Gender: Male
          Nature: Sassy
          Posts: 10,034
          Code:
          #dynamic 0x
          
          #org @start
          lock
          faceplayer
          showmoney 0x0 0x0 0x0
          msgbox @msg1 MSG_KEEPOPEN
          closeonkeypress
          multichoice 0x14 0x1 0x 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
          release
          end
          
          #org @2
          giveegg 0x
          release
          end
          
          #org @3
          giveegg 0x
          release
          end
          
          #org @4
          giveegg 0x
          release
          end
          
          #org @5
          giveegg 0x
          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
          release
          end
          
          #org @k2
          giveegg 0x
          release
          end
          
          #org @k3
          giveegg 0x
          release
          end
          
          #org @k4
          giveegg 0x
          release
          end
          
          #org @k5
          giveegg 0x
          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
          release
          end
          
          #org @rare2
          giveegg 0x
          release
          end
          
          #org @rare3
          giveegg 0x
          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: 22
            Posts: 535
            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
            • Platinum Tier
             
            Join Date: Nov 2008
            Location: Salisbury, England
            Age: 22
            Gender: Male
            Nature: Sassy
            Posts: 10,034
            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: 24
            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
            
            #org @start
            lock
            faceplayer
            showmoney 0x0 0x0 0x0
            msgbox @msg1 MSG_KEEPOPEN
            closeonkeypress
            multichoice 0x14 0x1 0x 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
            release
            end
            
            #org @2
            giveegg 0x
            release
            end
            
            #org @3
            giveegg 0x
            release
            end
            
            #org @4
            giveegg 0x
            release
            end
            
            #org @5
            giveegg 0x
            release
            end
            
            #org @6
            giveegg 0x
            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 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: 23
              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
              • Moderator
              • Platinum Tier
              • PokéCommunity Daily
              • Discord Moderoid
              • Developer
               
              Join Date: May 2010
              Age: 18
              Gender: Female
              Nature: Quirky
              Posts: 5,866
              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?
              Reply With Quote
                #67    
              Old May 21st, 2010 (10:42 PM).
              Spherical Ice's Avatar
              Spherical Ice Spherical Ice is online now
              • Crystal Tier
               
              Join Date: Nov 2007
              Location: Bristol, UK
              Age: 19
              Posts: 5,231
              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
              • Platinum Tier
               
              Join Date: Nov 2008
              Location: Salisbury, England
              Age: 22
              Gender: Male
              Nature: Sassy
              Posts: 10,034
              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 June 24th, 2017 (9:51 AM). Edited June 24th, 2017 by tkim.
                tkim tkim is offline
                   
                  Join Date: May 2011
                  Posts: 179
                  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
                    #74    
                  Old September 7th, 2017 (1:06 AM).
                  bitelaserkhalif's Avatar
                  bitelaserkhalif bitelaserkhalif is offline
                  Falcon Punch!!
                     
                    Join Date: Dec 2013
                    Location: Indonesia || Jakarta
                    Age: 17
                    Gender: Male
                    Nature: Bold
                    Posts: 68
                    Here's some of my scripts that would appear in my rom hack.

                    1. Gives the Tickets for Lugia Ho-oh and Deoxys, and makes them check both.
                    Spoiler:

                    Name: Get the Aurora Ticket, Mystik Tiket
                    ROM: Fire Red US V1.0
                    Effect: 1. Gives you both ticket; 2. This also makes guards checks them
                    Script:
                    Spoiler:
                    Code:
                    #DYNAMIC 0X800000
                    #INCLUDE stditems.rbh
                    #INCLUDE std.rbh
                    '---------------------
                    #org @start
                    lock
                    faceplayer
                    checkflag 0x82C 'change it, 82c is for elite 4 completion
                    if 0x0 goto @unable
                    checkflag 0x84A
                    if 0x0 call @give
                    msgbox @msg_2 MSG_NORMAL 
                    release
                    end
                    '--------------
                    
                    #ORG @give
                    setflag 0X84A 'they checks
                    setflag 0x84B 'they checks another ticket.
                    msgbox @msg_1 MSG_NORMAL 
                    fanfare 0x101
                    msgbox @msg_3 MSG_OBTAIN
                    additem ITEM_MYSTICTICKET 0x1
                    additem ITEM_AURORATICKET 0x1
                    waitfanfare
                    msgbox @msg_2 MSG_NORMAL
                    release
                    end
                    '--------------
                    
                    '--------------
                    #ORG @unable
                    msgbox @msg_4 MSG_NORMAL
                    release
                    end
                    
                    #org @msg_4
                    = Actually, I have an order to you.\nBut[.] You haven't beaten the\lElite Four.\pCome back here again if you\nfinished.
                    
                    
                    #org @msg_2
                    = Those rare pokemons are so hard\nto catch, so good luck on your\ljourney to the island!!
                    
                    
                    #org @msg_3
                    = [player] got both MYSTICTICKET\nand AURORATICKET!!!
                    
                    
                    #org @msg_1
                    = Well, I found the sightings of\nrare pokemon in far, far away\lisland.\pHowever, I cannot go the that\nisland. For that reason, I\lneed a Pokemon Master like you.\pHere, grab this.

                    Comments & Bugs:No Bugs so far
                    Credits:bitelaserkhalif



                    2.Pokemon Shop, buy pokemon here!
                    Spoiler:

                    Name: Buy Pokemons!!
                    ROM: Fire Red US V1.0
                    Effect:Asks if you want to buy Pokemon
                    Script:
                    Spoiler:
                    Code:
                    #dynamic 0x750000
                    
                    'POKEMON SELLER
                    'SELLS POKEMON, BUT CANNOT ENTER PC AND RENAME
                    'SPACE-SAVING.
                    'P.S: Compile it one time only. Take note of @main offset. It'll be used later on.
                    'by bitelaserkhalif
                    
                    '------------------------
                    #org @start
                    ' Made for multiple pokemons!!
                    ' Only Compile this after first compilation!!
                    ' After compilation, replace @main with offset of the main engine.
                    setvar 0x4001 0x14A 'Universal set command for pokemon, change this instead!
                    setvar 0x4002 0xEA60 'Universal set command for money, change this instead!
                    goto @main
                    '------------------------
                    
                    ' MAIN ENGINE, AFTER WRITING ONE, DELETE THIS. WRITE ONLY @START.
                    ' DON'T LOSE THE OFFSET.
                    
                    'Deletion starts here.
                    
                    #org @main
                    lock
                    faceplayer
                    showmoney 0x0 0x0 0x0 'show money came first in order to prevent quirkiness...
                    bufferpokemon 0x0 0x4001 'buffer1 entered.
                    buffernumber 0x1 0x4002 'buffer2 entered.
                    showpokepic 0x4001 0xA 0x3
                    msgbox @msg_1 MSG_YESNO
                    compare LASTRESULT 0x0
                    if 0x1 goto @no 'no
                    countpokemon
                    compare LASTRESULT 0x6
                    if 0x1 goto @full
                    checkmoney 0x4002 0x0 'checks monies (pokedolar)
                    compare LASTRESULT 0x0
                    if 0x1 goto @nomonies
                    givepokemon 0x4001 0x19 0x0 0x0 0x0 0x0
                    msgbox @msg_2 MSG_NORMAL
                    paymoney 0x4002 0x0
                    goto @end
                    
                    '------------------------
                    
                    #org @end
                    hidemoney 0x0 0x0
                    hidepokepic
                    release
                    end
                    
                    '------------------------
                    
                    #org @no
                    goto @end
                    
                    '------------------------
                    
                    #org @nomonies
                    msgbox @msg_4 MSG_NORMAL
                    goto @end
                    
                    '------------------------
                    
                    #org @full
                    msgbox @msg_5 MSG_NORMAL
                    goto @end
                    
                    '---------MESSAGES----------
                    
                    #org @msg_1
                    = Do you want to buy [buffer1] for\n $[buffer2]?
                    
                    #org @msg_2
                    = [player] bought [buffer1] for\n $[buffer2]!
                    
                    #org @msg_4
                    = Insufficient funds, [player]!!
                    
                    #org @msg_5
                    = [player]'s PARTY is full!!!
                    
                    'Deletion ends here.

                    Comments & Bugs: Cannot buy Pokemon if party is full! To write this script, first fully compile, then take note of the @main offset. Then, delete @main, (there's deletion points start and finish), to make sure you're compiling @start only. After that don't hit compile, replace the one that pointing to @main with the offset that you have been noted earlier, to save space and efficiency.
                    Credits:bitelaserkhalif


                    3. Mining Rocks
                    Spoiler:

                    Name: Mining Rocks!
                    ROM: Fire Red US V1.0
                    Effect:Mini game that has chance to gives you shards, pearl, stones, unobtainable items (like Max revive but no rare candy and masterballs!!) and shoal related item (still finding usage tho on FRLG). Oh btw, this also gives wild Hoenn pokemon battle, keep your eye on it or else bad thing happens.
                    Script:
                    Spoiler:
                    Code:
                    #dynamic 0x750000
                    
                    ' This is prototype of random GASGASGAS mining system. sorta of
                    ' minigame.
                    ' Reward: shards, nuggets, pearl, wild pokemon, shoal items->shell bell
                    
                    #org @start
                    lock
                    checkattack 0x5B 'dig
                    compare LASTRESULT 0x06
                    if 0x01 goto @cancel 'failure
                    setanimation 0x00 LASTRESULT 'The Pokémon animation is set with the Pokémon who knows the attack
                    bufferpartypokemon 0x00 LASTRESULT 'Puts the Pokémon who knows the attack into [buffer1]
                    bufferattack 0x01 0x5B 'Puts the attack name into [buffer2]
                    msgbox @msg1 MSG_YESNO
                    compare LASTRESULT 0X0
                    if 0x1 goto @end
                    msgbox @msg5 0x04 '"[buffer1] used [buffer2]!" >> Keep open
                    closeonkeypress 'Close the msgbox when a key is pressed
                    doanimation 0x25 'Shows the Pokémon animation
                    waitstate
                    goto @mining
                    
                    
                    #org @mining
                    pause 0x40 '2second pause
                    random 0x23 'RNG with 35 chances.
                    
                    'mining machine
                    
                    'the valuable items
                    
                    compare LASTRESULT 0x0
                    if 0x1 goto @stardust
                    compare LASTRESULT 0x1
                    if 0x1 goto @stardust
                    compare LASTRESULT 0x2
                    if 0x1 goto @nugget
                    compare LASTRESULT 0x3
                    if 0x1 goto @starpiece
                    compare LASTRESULT 0x4
                    if 0x1 goto @nugget
                    compare LASTRESULT 0x5
                    if 0x1 goto @stardust
                    
                    'wild
                    compare LASTRESULT 0x6
                    if 0x1 goto @wild1
                    compare LASTRESULT 0x7
                    if 0x1 goto @wild1
                    compare LASTRESULT 0x8
                    if 0x1 goto @wild2
                    compare LASTRESULT 0x9
                    if 0x1 goto @wild2
                    compare LASTRESULT 0xA
                    if 0x1 goto @wild3
                    
                    'shards
                    compare LASTRESULT 0xB
                    if 0x1 goto @blueshard
                    compare LASTRESULT 0xC
                    if 0x1 goto @redshard
                    compare LASTRESULT 0xD
                    if 0x1 goto @yellowshard
                    compare LASTRESULT 0xE
                    if 0x1 goto @greenshard
                    compare LASTRESULT 0xF
                    if 0x1 goto @heartscale
                    
                    'stones
                    compare LASTRESULT 0x10
                    if 0x1 goto @firestone
                    compare LASTRESULT 0x11
                    if 0x1 goto @moonstone
                    compare LASTRESULT 0x12
                    if 0x1 goto @waterstone
                    compare LASTRESULT 0x13
                    if 0x1 goto @leafstone
                    compare LASTRESULT 0x14
                    if 0x1 goto @thunderstone
                    
                    'failures
                    compare LASTRESULT 0x15
                    if 0x1 goto @failure
                    compare LASTRESULT 0x16
                    if 0x1 goto @failure
                    compare LASTRESULT 0x17
                    if 0x1 goto @failure
                    compare LASTRESULT 0x18
                    if 0x1 goto @failure
                    compare LASTRESULT 0x19
                    if 0x1 goto @failure
                    
                    'other
                    compare LASTRESULT 0x1A
                    if 0x1 goto @shoalsalt
                    compare LASTRESULT 0x1B
                    if 0x1 goto @shoalshell
                    compare LASTRESULT 0x1C
                    if 0x1 goto @shoalsalt
                    compare LASTRESULT 0x1D
                    if 0x1 goto @shoalshell
                    compare LASTRESULT 0x1E
                    if 0x1 goto @maxrevive
                    
                    'other
                    compare LASTRESULT 0x1F
                    if 0x1 goto @maxrevive
                    compare LASTRESULT 0x20
                    if 0x1 goto @maxelixir
                    compare LASTRESULT 0x21
                    if 0x1 goto @berryjuice
                    compare LASTRESULT 0x22
                    if 0x1 goto @berryjuice
                    compare LASTRESULT 0x23
                    if 0x1 goto @maxelixir
                    
                    '---------ITEMS-----------
                    
                    #org @stardust
                    checkitemroom 0x6C 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x6C 0x1 0x0
                    goto @end
                    
                    #org @nugget
                    checkitemroom 0x6E 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x6E 0x1 0x0
                    goto @end
                    
                    #org @starpiece
                    checkitemroom 0x6D 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x6D 0x1 0x0
                    goto @end
                    
                    '-------------------------
                    
                    #org @blueshard
                    checkitemroom 0x31 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x31 0x1 0x0
                    goto @end
                    
                    #org @redshard
                    checkitemroom 0x30 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x30 0x1 0x0
                    goto @end
                    
                    #org @yellowshard
                    checkitemroom 0x32 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x32 0x1 0x0
                    goto @end
                    
                    #org @greenshard
                    checkitemroom 0x33 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x33 0x1 0x0
                    goto @end
                    
                    #org @heartscale
                    checkitemroom 0x6F 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x6F 0x1 0x0
                    goto @end
                    
                    '-------------------------
                    
                    #org @firestone
                    checkitemroom 0x5F 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x5F 0x1 0x0
                    goto @end
                    
                    #org @moonstone
                    checkitemroom 0x5E 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x5E 0x1 0x0
                    goto @end
                    
                    #org @waterstone
                    checkitemroom 0x61 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x61 0x1 0x0
                    goto @end
                    
                    #org @leafstone
                    checkitemroom 0x62 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x62 0x1 0x0
                    goto @end
                    
                    #org @thunderstone
                    checkitemroom 0x60 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x60 0x1 0x0
                    goto @end
                    
                    
                    '-------------------------
                    
                    #org @shoalsalt
                    checkitemroom 0x2E 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x2E 0x1 0x0
                    goto @end
                    
                    #org @shoalshell
                    checkitemroom 0x2F 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x2F 0x1 0x0
                    goto @end
                    
                    #org @maxrevive
                    checkitemroom 0x61 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x61 0x1 0x0
                    goto @end
                    
                    #org @maxelixir
                    checkitemroom 0x25 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x25 0x1 0x0
                    goto @end
                    
                    #org @berryjuice
                    checkitemroom 0x2C 0x1
                    compare LASTRESULT 0x0
                    if 0x1 goto @full
                    giveitem 0x2C 0x1 0x0
                    goto @end
                    
                    '-------------------------
                    
                    
                    '------WILD POKEMON-------
                    
                    #org @wild1
                    wildbattle 0x17E 0X19 0X8B
                    goto @end
                    
                    #org @wild2
                    wildbattle 0x172 0X19 0X8B
                    goto @end
                    
                    #org @wild3
                    wildbattle 0x13E 0X19 0X8B
                    goto @end
                    
                    '-------------------------
                    
                    #org @cancel
                    msgbox @msg2 MSG_NORMAL
                    goto @end
                    
                    #org @failure
                    msgbox @msg3 MSG_NORMAL
                    goto @end
                    
                    #org @full
                    msgbox @msg4 MSG_NORMAL
                    goto @end
                    
                    #org @end
                    release
                    end
                    
                    ' Messages to shown:
                    #org @msg1
                    = This is a Digging spot. You can\nuse DIG to mine here.\pDo you want to use it?
                    
                    #org @msg2
                    = This is a Digging spot. You can\nuse DIG to mine here. But you\lcan't do it.
                    
                    #org @msg3
                    = Digging failed. No items.
                    
                    #org @msg4
                    = BAG is full. Digging is stopped.
                    
                    #org @msg5
                    = [buffer1] used [buffer2]!!

                    Comments & Bugs: Cannot mine and put bag if party is full, National dex problem may hinder due to wild pokemons are hoenn ones, keeping it as is if there's no National Dex encounters decamark glitch pokemon (this can be changed). Also add script efficiency problem.
                    Credits: bitelaserkhalif, based on headbutt script


                    4.Fossil Guy+
                    Spoiler:

                    Name: Fossil Guy+
                    ROM: Fire Red US V1.0
                    Effect:Revives pokemon fossil, all of them (including hoenn ones). Also somewhat faster and you don't need to leave room!!
                    Script:
                    Spoiler:
                    Code:
                    #dynamic 0x750000
                    '---------------------------------------
                    #org @start
                    lock
                    faceplayer
                    msgbox @msg_1 MSG_YESNO
                    compare LASTRESULT 0x0
                    if 0x1 goto @end
                    countpokemon
                    compare LASTRESULT 0x6
                    if 0x1 goto @full
                    goto @fossilcheck
                    '---------------------------------------
                    
                    
                    '---------------------------------------
                    #org @full
                    MSGBOX @msg_3 MSG_NORMAL
                    goto @end
                    '---------------------------------------
                    
                    '---------------------------------------
                    #org @nofossils
                    MSGBOX @msg_6 MSG_NORMAL
                    goto @end
                    '---------------------------------------
                    
                    '---------------------------------------
                    #org @end
                    release
                    end
                    '---------------------------------------
                    
                    #org @fossilcheck
                    '-----FOSSILCHECKING-----
                    checkitem 0x165 0x1
                    compare LASTRESULT 0x1
                    if 0x1 goto @helix
                    checkitem 0x166 0x1
                    compare LASTRESULT 0x1
                    if 0x1 goto @dome
                    checkitem 0x162 0x1
                    compare LASTRESULT 0x1
                    if 0x1 goto @amber
                    checkitem 0x11E 0x1
                    compare LASTRESULT 0x1
                    if 0x1 goto @root
                    checkitem 0x11F 0x1
                    compare LASTRESULT 0x1
                    if 0x1 goto @claw
                    goto @nofossils
                    
                    '---------=---------------=-------------------=
                    
                    #org @helix 'omanit
                    setvar 0x4001 0x165
                    bufferitem 0x0 0x4001
                    msgbox @msg_4 MSG_NORMAL
                    waitmsg
                    pause 0x6
                    removeitem 0x4001 0x1
                    bufferpokemon 0x0 0x8A
                    msgbox @msg_5 MSG_NORMAL
                    givepokemon 0x8A 0xF 0x0 0x0 0x0 0x0
                    goto @end
                    
                    #org @dome 'akbuto
                    setvar 0x4001 0x166
                    bufferitem 0x0 0x4001
                    msgbox @msg_4 MSG_NORMAL
                    waitmsg
                    pause 0x6
                    removeitem 0x4001 0x1
                    bufferpokemon 0x0 0x8C
                    msgbox @msg_5 MSG_NORMAL
                    givepokemon 0x8C 0xF 0x0 0x0 0x0 0x0
                    goto @end
                    
                    #org @amber 'ptera
                    setvar 0x4001 0x166
                    bufferitem 0x0 0x4001
                    msgbox @msg_4 MSG_NORMAL
                    waitmsg
                    pause 0x6
                    removeitem 0x4001 0x1
                    bufferpokemon 0x0 0x8E
                    msgbox @msg_5 MSG_NORMAL
                    givepokemon 0x8E 0xF 0x0 0x0 0x0 0x0
                    goto @end
                    
                    #org @root
                    setvar 0x4001 0x11E
                    bufferitem 0x0 0x4001
                    msgbox @msg_4 MSG_NORMAL
                    waitmsg
                    pause 0x6
                    removeitem 0x4001 0x1
                    bufferpokemon 0x0 0x184
                    msgbox @msg_5 MSG_NORMAL
                    givepokemon 0X184 0xF 0x0 0x0 0x0 0x0
                    goto @end
                    
                    #org @claw
                    setvar 0x4001 0x11F
                    bufferitem 0x0 0x4001
                    msgbox @msg_4 MSG_NORMAL
                    waitmsg
                    pause 0x6
                    removeitem 0x4001 0x1
                    bufferpokemon 0x0 0x186
                    msgbox @msg_5 MSG_NORMAL
                    givepokemon 0x186 0xF 0x0 0x0 0x0 0x0
                    goto @end
                    
                    
                    '------------------=MSG=-----------------------
                    #org @msg_1
                    = I can resurrect your fossil\nquickly and efficiently with my\lmachine. Do you want me to do\lthat?
                    
                    #org @msg_2
                    = No?\nBut you didn't even try it!
                    
                    #org @msg_3
                    = Ummm[.] Your party is full.\nIf you force me to do that, your\lfossil will be gone.
                    
                    #org @msg_4
                    = [player] gives him a [buffer1], and\nwaited.
                    
                    
                    #org @msg_5
                    = DOCTOR: Okay, here you go.\nA [buffer1] has been revived.
                    
                    #org @msg_6
                    = Are you kidding me? You didn't\neven have one!!

                    Comments & Bugs: Cannot revive if the party is full, the fossil is checked by order not by multichoice for simplicity sake.
                    Credits:bitelaserkhalif
                    __________________

                    I made sort of Pokemon Hack.
                    ALSO VISIT MY BLOG: http://khaliffadhillah.blogspot.com/
                    Oh btw, that signature picture is reference to Initial D
                    Reply With Quote
                      #75    
                    Old 3 Weeks Ago (5:07 PM). Edited 3 Weeks Ago by Lunos.
                    Lunos's Avatar
                    Lunos Lunos is online now
                    Uruguayan Random Guy
                       
                      Join Date: Oct 2008
                      Posts: 1,016
                      Name: Randomized Berry Tree
                      ROM info: Pokémon Ruby v1.0 (AXVE) (USA), Pokémon Fire Red v1.0 (BPRE) (USA), Pokémon Emerald (BPEE) (USA)
                      Effect: May give a random berry to the Player upon interacting with whatever you put the script to.
                      Script:
                      Spoiler:
                      Code:
                      #dynamic 0x800000
                      #org @inicio
                      lock
                      faceplayer
                      msgbox @1 0x4
                      closeonkeypress
                      random 0x10 // Choose a random number between 1 and 10.
                      compare LASTRESULT 0x9
                      if 0x3 goto @nothing // If you got a number between 1 and 9, goto @nothing.
                      if 0x5 goto @berry // If you got a different number (10) goto @berry.
                      
                      #org @berry
                      random 0x176 // Choose a random number between 1 and 374, the amount of items in the GBA Pokémon Games.
                      compare LASTRESULT 0x84 // Checks if you got the Item #132 (Retro Mail)
                      if 0x3 goto @berry // If it's a Retro Mail or an item before it, roll the dice again.
                      compare LASTRESULT 0xAF // Checks if you got the Item #175 (Enigma Berry)
                      if 0x4 goto @berry // If it's an Enigma Berry or an item after it, roll the dice again.
                      msgbox @2 0x6
                      giveitem LASTRESULT 0x1 0x0
                      release
                      end
                      
                      #org @nothing
                      msgbox @3 0x4
                      closeonkeypress
                      release
                      end
                      
                      #org @1
                      = It's a weird-looking tree.
                      
                      #org @2
                      = Oh! There's a berry on it!
                      
                      #org @3
                      = But there's nothing inside it[.]

                      Comments & Bugs: Insert the script as a signpost in Advance Map. Having clarified that, the script is working as intended but I'd prolly make it so #org @berry once per day (if I knew how to do that.. hahaha), in which case, I would also remove or modify the chance of getting a berry in the 8th Line of the script to make it a little bit easier, but that's just me.
                      __________________
                      Reply With Quote
                      Reply

                      Quick Reply

                      Join the conversation!

                      Create an account to post a reply in this thread, participate in other discussions, and more!

                      Create a PokéCommunity Account

                      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 8:49 AM.