The PokéCommunity Forums Fan Games ROM Hacking
Script Help Thread (DO NOT REQUEST SCRIPTS)

ROM Hacking Need a helping hand? You can get help on any ROM Hacking-related problems or questions you have here.

Closed Thread
 
Thread Tools
  #126    
Old December 28th, 2008 (2:23 PM).
Madridista's Avatar
Madridista Madridista is offline
-#666
     
    Join Date: Nov 2008
    Location: Sydney, Australia
    Age: 20
    Gender:
    Posts: 40
    @CelebiKing123

    It should work now:
    Spoiler:
    #org @start
    lock
    faceplayer
    message @1 0x6
    cry 0xA1 6
    nop
    nop
    wildbattle 6 30 0x8B
    fadescreen 0x0
    #raw 0x53 0x0F 0x80
    setflag 0x200
    release
    end

    #org @1
    = CHARIZARD: Raaarrgghh!

    Relevant Advertising!

      #127    
    Old December 28th, 2008 (6:29 PM). Edited December 28th, 2008 by Perfect_Palkia_10.
    Perfect_Palkia_10's Avatar
    Perfect_Palkia_10 Perfect_Palkia_10 is offline
    Ruler of Space
       
      Join Date: Apr 2008
      Location: Between Dimensions
      Age: 21
      Nature: Naive
      Posts: 28
      Game: Pokemon FireRed
      Type: Trigger
      Editor: PokeScript

      Quote:
      Script:

      #org $start
      checkflag 0x200
      if b_true goto $done
      applymovement 0x00 $move
      pausemove

      message $1
      boxset 6
      applymovement 0x00 $move2
      pausemove
      message $2
      boxset 6

      applymovement 0x00 $move3
      pausemove
      message $3
      boxset 6
      checkflag 0x200
      if b_true goto $give
      release
      end

      #org $done
      countpokemon
      compare LASTRESULT 0x0
      if b_true goto $need
      message $10
      boxset 6

      special 0x0
      waitfanfare
      message $11
      boxset 6
      release
      end

      #org $give
      giveitem 338 1
      message $20
      boxset 6
      setflag 0x200
      release
      end

      #org $need
      message $30
      boxset 6
      release
      end

      #org $1
      $1 1=\c\h01\h04Good Morning \c\h01\nHave a good sleep?\p...\pHmm? That's right!\lYou fell asleep while we\lwere unpacking.\pDon't worry, we've finished.\lVolknear's already gone to the\lPokh\1Bmon League. Shauna's gone\lto get breakfast.\pWhy don't you talk to\lthe locals but don't go\lto Route 300.

      #org $2
      $2 1=\c\h01\h04Hmm. Well I was\nto give these to\lVolknear but they don't\lfit him. Well I guess you\lthat you can have them!

      #org $3
      $3 1=\c\h01\h04Here you go.

      #org $20
      $20 1=\c\h01 got the\c\h01\h04\nRunning Shoes.\pPress B to use them.

      #org $10
      $10 1=Hi darling. You look tired.\nTake a rest.

      #org $11
      $11 1=Thats better.\nHave fun.

      #org $move
      #raw 0x62 0x11 0x12 0x12 0x12 0x12 0x11 0x02

      #org $move2
      #raw 0x13 0x13 0x13 0x13 0x13 0x13 0x01

      #org $move3
      #raw 0x12 0x12 0x12 0x12 0x12 0x12

      It won't trigger.
      __________________

        #128    
      Old December 28th, 2008 (7:46 PM).
      Ninja Caterpie's Avatar
      Ninja Caterpie Ninja Caterpie is offline
      Sitting by the back window
         
        Join Date: Mar 2008
        Location: Best City OCE
        Age: 21
        Gender: Male
        Nature: Bold
        Posts: 5,945
        Stop it with the vagueness people! What do you mean by "it won't trigger"? Do you mean it freezes or nothing happens at all?
        __________________
        Brony represent.
          #129    
        Old December 28th, 2008 (7:52 PM). Edited December 28th, 2008 by KhaosKnight.
        KhaosKnight's Avatar
        KhaosKnight KhaosKnight is offline
        The 1 and only Khaotic Hacker
           
          Join Date: Dec 2007
          Nature: Relaxed
          Posts: 355
          By that i think he means when he steps on the script tile it wont activate or "trigger"

          What you should do is go click on the script tile and make sure you have the 40 50 or 50 40 values in the unknown box(or the one above it, im not sure exactly its been awhile since i have looked at it)at the top of the script panel in A-Map.

          But yes you should be more specific when discribing problems.
          __________________





            #130    
          Old December 29th, 2008 (4:48 AM).
          Vrai's Avatar
          Vrai Vrai is offline
          can you feel my heart?
          • Crystal Tier
           
          Join Date: Jun 2008
          Age: 22
          Gender: Male
          Nature: Adamant
          Posts: 2,893
          Send a message via Windows Live Messenger to Vrai
          Quote:
          Originally Posted by pika-pal-08 View Post
          Game: Pokemon FireRed
          Type: Trigger
          Editor: PokeScript

          Spoiler:
          Script:

          #org $start
          checkflag 0x200
          if b_true goto $done
          applymovement 0x00 $move
          pausemove 0x0

          message $1
          boxset 6
          applymovement 0x00 $move2
          pausemove 0x0
          message $2
          boxset 6

          applymovement 0x00 $move3
          pausemove 0x0
          message $3
          boxset 6
          checkflag 0x200
          if b_true goto $give
          release
          end

          #org $done
          countpokemon
          compare LASTRESULT 0x0
          if b_true goto $need
          message $10
          boxset 6
          special 0x0
          waitfanfare
          message $11
          boxset 6
          release
          end

          #org $give
          giveitem 338 1
          message $20
          boxset 6
          setflag 0x200
          release
          end

          #org $need
          message $30
          boxset 6
          release
          end

          #org $1
          $1 1=\c\h01\h04Good Morning. \c\h01\nHave a good sleep?\p...\pHmm? That's right!\lYou fell asleep while we\lwere unpacking.\pDon't worry, we've finished.\lVolkner's already gone to the\lPokh\1Bmon League. Shauna's gone\lto get breakfast.\pWhy don't you talk to\lthe locals but don't go\lto Route 300.

          #org $2
          $2 1 =\c\h01\h04Hmm. Well I was\nto give these to\lVolknear but they don't\lfit him. Well I guess you\lthat you can have them!

          #org $3
          $3 1 =\c\h01\h04Here you go.

          #org $20
          $20 1 =\v\h01 got the\c\h01\h04\nRunning Shoes.\pPress B to use them.

          #org $10
          $10 1 =Hi darling. You look tired.\nTake a rest.

          #org $11
          $11 1 =That's better.\nHave fun.

          #org $move
          #raw 0x62 0x11 0x12 0x12 0x12 0x12 0x11 0x02 0xFE

          #org $move2
          #raw 0x13 0x13 0x13 0x13 0x13 0x13 0x01 0xFE

          #org $move3
          #raw 0x12 0x12 0x12 0x12 0x12 0x12 0xFE



          It won't trigger.
          There's a lot of random errors here, too. Please try to catch your own errors first.

          All of the movements need 0xFE to finish them.
          \c\h01 should be \v\h01.
          Pausemove should have a 0x0 parameter.
          Why do you have waitfanfare in a place where it doesn't have a fanfare?
          You can't move a person with a Person Number of 0, because I highly doubt that there's a person with a Person Number of 0 on your map. Double check that, please.
          Also, you should make the script check for a flag so that it doesn't run through twice, especially since it's a trigger script.

          Finally, be sure to use 0300 and 4050 as your Unknown and Var Number values.
          __________________
            #131    
          Old December 29th, 2008 (7:49 AM).
          Hoshiko Aki's Avatar
          Hoshiko Aki Hoshiko Aki is offline
          Avatar rules
             
            Join Date: Oct 2008
            Posts: 109
            Can somebody help me

            It most be so script:

            player will room out but he can't the script say better take my pokemon with me and if he has taken the pokeball in his room the script gone and the player can leave the room.
              #132    
            Old December 29th, 2008 (9:33 AM).
            Binary's Avatar
            Binary Binary is offline
            え?
               
              Join Date: Aug 2007
              Age: 22
              Posts: 3,993
              Quote:
              Originally Posted by Madridista View Post
              @CelebiKing123

              It should work now:
              Spoiler:
              #org @start
              lock
              faceplayer
              message @1 0x6
              cry 0xA1 6
              nop
              nop
              wildbattle 6 30 0x8B
              fadescreen 0x0
              #raw 0x53 0x0F 0x80
              setflag 0x200
              release
              end

              #org @1
              = CHARIZARD: Raaarrgghh!
              Yes but don't forget him to change the People ID of the charizard in AM to 0200.
              __________________
                #133    
              Old December 29th, 2008 (10:34 AM). Edited December 31st, 2008 by michaelh.
              michaelh michaelh is offline
              Script Ninja-in-training
              • Silver Tier
               
              Join Date: Jul 2006
              Gender:
              Nature: Quirky
              Posts: 16
              I don't quite understand why this script isn't working.

              Notes:
              Desired Effect:
              Gives Trainer a Crobat (I know there are no safeguards, but those are not part of this script)

              Actual Effect:
              Freezes on activation (when person is interacted with using the A button)

              Other useful information:
              Script is an original work (not copypasted badly from various sources)
              Rom is Pokémon Fire Red (U)
              Rom expanded to 32MiB
              Pointer correct in AdvanceMap ($1000000)
              Activator is a person on map
              Compiler is XSE v1.1.1
              @start corresponds to offset 0x1000000

              --------------------------------------------

              Script Below (73 lines, spoilered to make post reasonable length):
              Spoiler:

              #dynamic 0x1000000
              #org @start
              lock
              faceplayer
              checkflag 0x533
              if 0x1 goto @won
              checkflag 0x532
              if 0x1 goto @done
              message @1 2
              checkgender
              compare LASTRESULT 0x0
              if 0x1 goto @boy
              compare LASTRESULT 0x1
              if 0x1 goto @girl

              #org @boy
              message @2 5
              compare LASTRESULT 0x1
              if 0x1 goto @givepoke
              if 0x0 goto @reject

              #org @girl
              message @3 5
              compare LASTRESULT 0x1
              if 0x1 goto @givepoke
              if 0x0 goto @reject

              #org @givepoke
              message @5 6
              givepokemon 169 61 142 0 0 0
              bufferpokemon 2 169
              message @6 6
              setflag 0x532
              goto @done

              #org @reject
              message @4 6
              release
              end

              #org @done
              message @7 6
              release
              end

              #org @won
              message @8 6
              release
              end

              #org @1
              = I have your Pokémon for the\nbattle.

              #org @2
              = Are you ready, Mr. \v\h01?

              #org @3
              = Are you ready, Miss \v\h01?

              #org @4
              = I understand. You have a tough\nbattle ahead. You'll need to\lprepare hard for it!

              #org @5
              = Here you are. Good luck!

              #org @6
              = \c\h01\h02You recieved a \c\h01\h05\v\h04!

              #org @7
              = Our leader, Isiah, is very strong.\nI can't recall when he was last\ldefeated. You'll need to gather\lall of your strength for this.

              #org @8
              = It's not possible...\nYou, beat Master Isiah, at such a\lyoung age...\lYou must be strong enough to take\lthe challenge. Master Isiah will\lbe waiting.


              Additional info provided per request.

              NB: Script is probably quite messy and inefficient, as I've not written a huge deal of scripts.
              __________________
              Mr. Meme is never gonna give you up
                #134    
              Old December 29th, 2008 (8:27 PM).
              Perfect_Palkia_10's Avatar
              Perfect_Palkia_10 Perfect_Palkia_10 is offline
              Ruler of Space
                 
                Join Date: Apr 2008
                Location: Between Dimensions
                Age: 21
                Nature: Naive
                Posts: 28
                Quote:
                Originally Posted by Vrai View Post
                There's a lot of random errors here, too. Please try to catch your own errors first.

                All of the movements need 0xFE to finish them.
                \c\h01 should be \v\h01.
                Pausemove should have a 0x0 parameter.
                Why do you have waitfanfare in a place where it doesn't have a fanfare?
                You can't move a person with a Person Number of 0, because I highly doubt that there's a person with a Person Number of 0 on your map. Double check that, please.
                Also, you should make the script check for a flag so that it doesn't run through twice, especially since it's a trigger script.

                Finally, be sure to use 0300 and 4050 as your Unknown and Var Number values.
                Sorry, I'm very new to scripting. Anyway thanks for that. Works fine.
                __________________

                  #135    
                Old December 30th, 2008 (5:07 AM).
                Hoshiko Aki's Avatar
                Hoshiko Aki Hoshiko Aki is offline
                Avatar rules
                   
                  Join Date: Oct 2008
                  Posts: 109
                  Quote:
                  Originally Posted by Ichiro Kazuki View Post
                  Can somebody help me

                  It most be so script:

                  player will room out but he can't the script say better take my pokemon with me and if he has taken the pokeball in his room the script gone and the player can leave the room.

                  some buddy?

                  please help me
                    #136    
                  Old December 30th, 2008 (1:40 PM).
                  BananasGoMoo's Avatar
                  BananasGoMoo BananasGoMoo is offline
                  Pokemon Electrum
                     
                    Join Date: Dec 2008
                    Location: Richmond, California
                    Age: 25
                    Gender:
                    Nature: Lax
                    Posts: 149
                    Send a message via AIM to BananasGoMoo
                    Quote:
                    Originally Posted by Ichiro Kazuki View Post
                    some buddy?

                    please help me

                    well, where is your script so far?

                    people aren't gong to write the script for you, just help you fix errors
                    __________________
                    This signature has been disabled.
                    Images in the spoiler tags still count; remove the images in the spoiler tags -- too tall.
                    Please review and fix the issues by reading the signature rules.

                    You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

                    Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
                      #137    
                    Old December 30th, 2008 (2:53 PM). Edited December 30th, 2008 by HackMew.
                    HackMew's Avatar
                    HackMew HackMew is offline
                    Mewtwo Strikes Back
                    • Crystal Tier
                     
                    Join Date: Jun 2006
                    Posts: 1,314
                    Quote:
                    Originally Posted by michaelh View Post
                    I don't quite understand why this script isn't working.

                    Notes:
                    Desired Effect:
                    Gives Trainer a Crobat (I know there are no safeguards, but those are not part of this script)

                    Actual Effect:
                    Freezes on activation (when person is interacted with using the A button)

                    Other useful information:
                    Script is an original work (not copypasted badly from various sources)
                    Rom is Pokémon Fire Red (U)
                    Rom expanded to 32MiB
                    Pointer correct in AdvanceMap ($1000000)
                    Activator is a person on map
                    Compiler is XSE v1.1.1
                    @start corresponds to offset 0x1000000

                    --------------------------------------------

                    Script Below (73 lines, spoilered to make post reasonable length):
                    Spoiler:

                    #dynamic 0x1000000
                    #org @start
                    lock
                    faceplayer
                    checkflag 0x533
                    if 0x1 goto @won
                    checkflag 0x532
                    if 0x1 goto @done
                    message @1 2
                    checkgender
                    compare LASTRESULT 0x0
                    if 0x1 goto @boy
                    compare LASTRESULT 0x1
                    if 0x1 goto @girl

                    #org @boy
                    message @2 5
                    compare LASTRESULT 0x1
                    if 0x1 goto @givepoke
                    if 0x0 goto @reject

                    #org @girl
                    message @3 5
                    compare LASTRESULT 0x1
                    if 0x1 goto @givepoke
                    if 0x0 goto @reject

                    #org @givepoke
                    message @5 6
                    givepokemon 169 61 142 0 0 0
                    bufferpokemon 2 169
                    message @6 6
                    setflag 0x532
                    goto @done

                    #org @reject
                    message @4 6
                    release
                    end

                    #org @done
                    message @7 6
                    release
                    end

                    #org @won
                    message @8 6
                    release
                    end

                    #org @1
                    = I have your Pokémon for the\nbattle.

                    #org @2
                    = Are you ready, Mr. \v\h01?

                    #org @3
                    = Are you ready, Miss \v\h01?

                    #org @4
                    = I understand. You have a tough\nbattle ahead. You'll need to\lprepare hard for it!

                    #org @5
                    = Here you are. Good luck!

                    #org @6
                    = \c\h01\h02You recieved a \c\h01\h05\v\h04!

                    #org @7
                    = Our leader, Isiah, is very strong.\nI can't recall when he was last\ldefeated. You'll need to gather\lall of your strength for this.

                    #org @8
                    = It's not possible...\nYou, beat Master Isiah, at such a\lyoung age...\lYou must be strong enough to take\lthe challenge. Master Isiah will\lbe waiting.


                    Additional info provided per request.

                    NB: Script is probably quite messy and inefficient, as I've not written a huge deal of scripts.
                    That was something detailed indeed ;)
                    Here's the fixed and optimized script. I would explain you the changes, but I think you can get more satisfaction by simple understanding them on your own.
                    The script should work fine, even if I didn't test it. Let me know if you have problems or whatever. Don't forget the [SOLVED] thingy, okay?

                    Spoiler:
                    #dynamic 0x1000000

                    #org @start
                    lock
                    faceplayer
                    checkflag 0x533
                    if 0x1 goto @won
                    checkflag 0x532
                    if 0x1 goto @done
                    message @1 2
                    checkgender
                    compare LASTRESULT 0x0
                    if 0x1 call @boy
                    compare LASTRESULT 0x1
                    if 0x1 call @girl
                    compare LASTRESULT 0x1
                    if 0x0 goto @reject
                    message @5 6
                    givepokemon 169 61 142 0 0 0
                    bufferpokemon 2 169
                    message @6 6
                    setflag 0x532
                    goto @done

                    #org @boy
                    message @2 5
                    return

                    #org @girl
                    message @3 5
                    return

                    #org @reject
                    message @4 6
                    release
                    end

                    #org @done
                    message @7 6
                    release
                    end

                    #org @won
                    message @8 6
                    release
                    end

                    #org @1
                    = I have your Pokémon for the\nbattle.

                    #org @2
                    = Are you ready, Mr. [player]?

                    #org @3
                    = Are you ready, Miss [player]?

                    #org @4
                    = I understand. You have a tough\nbattle ahead. You'll need to\lprepare hard for it!

                    #org @5
                    = Here you are. Good luck!

                    #org @6
                    = \c\h01\h02You recieved a \c\h01\h05[buffer3]!

                    #org @7
                    = Our leader, Isiah, is very strong.\nI can't recall when he was last\ldefeated. You'll need to gather\lall of your strength for this.

                    #org @8
                    = It's not possible...\nYou, beat Master Isiah, at such a\lyoung age...\lYou must be strong enough to take\lthe challenge. Master Isiah will\lbe waiting.
                    __________________
                      #138    
                    Old December 31st, 2008 (2:40 AM).
                    Hoshiko Aki's Avatar
                    Hoshiko Aki Hoshiko Aki is offline
                    Avatar rules
                       
                      Join Date: Oct 2008
                      Posts: 109
                      Hello,

                      whats wrong with this script?

                      Code:
                      '---------------
                      #org 0x2D513F
                      setvar 0x4060 0x37
                      givepokemon 0x4060 0x8 0x0 0x0 0x0 0x0
                      end
                      it must give you your starter pokemon Vulpix but you can talk to the pokeball but nothing happen
                        #139    
                      Old December 31st, 2008 (3:23 AM). Edited December 31st, 2008 by Pokepal17.
                      Pokepal17's Avatar
                      Pokepal17 Pokepal17 is offline
                      More cowbell~
                      • Silver Tier
                       
                      Join Date: Oct 2008
                      Location: Steeltown
                      Age: 22
                      Gender: Male
                      Nature: Modest
                      Posts: 1,511

                      ROM: Pokemon Fire Red
                      Version: 1.0
                      Script Editor: XSE
                      Script: Trigger Script

                      I'm having a bit of trouble with this script.
                      The bit when the flag is not set works fine. When the flag is set, the egg is meant to hatch and then the text is meant to appear. Instead part of the text briefly appears and then the egg hatches and the script ends without the full text appearing.

                      Here is the script

                      Spoiler:

                      #dynamic 0x800000

                      #org @start
                      checkflag 0x828
                      if 0x1 goto @hatch
                      applymovement 0xFF @move
                      waitmovement 0x0
                      msgbox @talk 0x2
                      end

                      #org @hatch
                      checkflag 0x1000
                      if 0x0 goto @end
                      call @hatching
                      msgbox @talk2 0x2
                      clearflag 0x1000
                      end

                      #org @end
                      release
                      end

                      #org @talk
                      = I should go back.

                      #org @talk2
                      = It hatched!

                      #org @move
                      #raw 0x62 0x50 0xFE

                      #org @hatching
                      special 0xC2
                      return


                      The settings for the script are okay but it's the script itself.

                      Pictures

                      Spoiler:



                      Part of the text appears before the egg hatches. The text is meant to appear after the egg hatches but it doesn't.
                      __________________
                      Pokémon Stardrop
                        #140    
                      Old December 31st, 2008 (3:47 AM).
                      Ninja Caterpie's Avatar
                      Ninja Caterpie Ninja Caterpie is offline
                      Sitting by the back window
                         
                        Join Date: Mar 2008
                        Location: Best City OCE
                        Age: 21
                        Gender: Male
                        Nature: Bold
                        Posts: 5,945
                        Quote:
                        Originally Posted by Ichiro Kazuki View Post
                        Hello,

                        whats wrong with this script?

                        Code:
                        '---------------
                        #org 0x2D513F
                        setvar 0x4060 0x37
                        givepokemon 0x4060 0x8 0x0 0x0 0x0 0x0
                        end
                        it must give you your starter pokemon Vulpix but you can talk to the pokeball but nothing happen
                        Uh, yeah, something happened! You just got a Vulpix! But you don't have any messages so, :\ Also, there's no "setflag 0x828" to enable the Pokemon menu.
                        __________________
                        Brony represent.
                          #141    
                        Old December 31st, 2008 (4:17 AM).
                        Hoshiko Aki's Avatar
                        Hoshiko Aki Hoshiko Aki is offline
                        Avatar rules
                           
                          Join Date: Oct 2008
                          Posts: 109
                          Quote:
                          Originally Posted by Ninja Caterpie View Post
                          Uh, yeah, something happened! You just got a Vulpix! But you don't have any messages so, :\ Also, there's no "setflag 0x828" to enable the Pokemon menu.

                          o ok,

                          Can you help me then?

                          How can i get a message there in and how do i set the setflag in it?
                            #142    
                          Old December 31st, 2008 (5:29 AM).
                          Ninja Caterpie's Avatar
                          Ninja Caterpie Ninja Caterpie is offline
                          Sitting by the back window
                             
                            Join Date: Mar 2008
                            Location: Best City OCE
                            Age: 21
                            Gender: Male
                            Nature: Bold
                            Posts: 5,945
                            Code:
                            fanfare 0x13E
                            message @got 0x4
                            waitfanfare
                            closeonkeypress
                            setflag 0x828
                            Put that after the givepokemon part. If you want a nickname part too...find that out yourself. Go to thethethethe's tutorial or, if you're too lazy, go to diegoisawesome's XSE version of the same thing.
                            __________________
                            Brony represent.
                              #143    
                            Old December 31st, 2008 (5:33 AM). Edited December 31st, 2008 by Pokepal17.
                            Pokepal17's Avatar
                            Pokepal17 Pokepal17 is offline
                            More cowbell~
                            • Silver Tier
                             
                            Join Date: Oct 2008
                            Location: Steeltown
                            Age: 22
                            Gender: Male
                            Nature: Modest
                            Posts: 1,511
                            Quote:
                            Originally Posted by Ichiro Kazuki
                            Hello,

                            whats wrong with this script?

                            Code:
                            #org 0x2D513F
                            setvar 0x4060 0x37
                            givepokemon 0x4060 0x8 0x0 0x0 0x0 0x0
                            end

                            it must give you your starter pokemon Vulpix but you can talk to the pokeball but nothing happen
                            Here is the script, don't forget to give the Pokeball an ID of 0828.

                            Spoiler:

                            #org 0x2D513F
                            setvar 0x4060 0x37
                            givepokemon 0x4060 0x8 0x0 0x0 0x0 0x0
                            fanfare 0x13E
                            msgbox @player 0x4
                            waitfanfare
                            closeonkeypress
                            hidesprite LASTTALKED
                            setflag 0x828
                            release
                            end

                            #org @player
                            [player] recieved a Vulpix!


                            Thanks Ninja Caterpie
                            \/ \/ \/
                            __________________
                            Pokémon Stardrop
                              #144    
                            Old December 31st, 2008 (5:34 AM).
                            Ninja Caterpie's Avatar
                            Ninja Caterpie Ninja Caterpie is offline
                            Sitting by the back window
                               
                              Join Date: Mar 2008
                              Location: Best City OCE
                              Age: 21
                              Gender: Male
                              Nature: Bold
                              Posts: 5,945
                              You forgot hidesprite. :\ Hidesprite 0x<number of sprite>
                              __________________
                              Brony represent.
                                #145    
                              Old December 31st, 2008 (8:45 AM).
                              michaelh michaelh is offline
                              Script Ninja-in-training
                              • Silver Tier
                               
                              Join Date: Jul 2006
                              Gender:
                              Nature: Quirky
                              Posts: 16
                              Quote:
                              Originally Posted by HackMew View Post
                              That was something detailed indeed ;)
                              Here's the fixed and optimized script. I would explain you the changes, but I think you can get more satisfaction by simple understanding them on your own.
                              The script should work fine, even if I didn't test it. Let me know if you have problems or whatever. Don't forget the [SOLVED] thingy, okay?

                              Spoiler:
                              #dynamic 0x1000000

                              #org @start
                              lock
                              faceplayer
                              checkflag 0x533
                              if 0x1 goto @won
                              checkflag 0x532
                              if 0x1 goto @done
                              message @1 2
                              checkgender
                              compare LASTRESULT 0x0
                              if 0x1 call @boy
                              compare LASTRESULT 0x1
                              if 0x1 call @girl
                              compare LASTRESULT 0x1
                              if 0x0 goto @reject
                              message @5 6
                              givepokemon 169 61 142 0 0 0
                              bufferpokemon 2 169
                              message @6 6
                              setflag 0x532
                              goto @done

                              #org @boy
                              message @2 5
                              return

                              #org @girl
                              message @3 5
                              return

                              #org @reject
                              message @4 6
                              release
                              end

                              #org @done
                              message @7 6
                              release
                              end

                              #org @won
                              message @8 6
                              release
                              end

                              #org @1
                              = I have your Pokémon for the\nbattle.

                              #org @2
                              = Are you ready, Mr. [player]?

                              #org @3
                              = Are you ready, Miss [player]?

                              #org @4
                              = I understand. You have a tough\nbattle ahead. You'll need to\lprepare hard for it!

                              #org @5
                              = Here you are. Good luck!

                              #org @6
                              = \c\h01\h02You recieved a \c\h01\h05[buffer3]!

                              #org @7
                              = Our leader, Isiah, is very strong.\nI can't recall when he was last\ldefeated. You'll need to gather\lall of your strength for this.

                              #org @8
                              = It's not possible...\nYou, beat Master Isiah, at such a\lyoung age...\lYou must be strong enough to take\lthe challenge. Master Isiah will\lbe waiting.
                              Hate to say it, but I managed to pick out a little bug in that:
                              Spoiler:

                              See this?

                              if 0x1 call @boy
                              compare LASTRESULT 0x1
                              if 0x1 call @girl
                              compare LASTRESULT 0x1

                              Then look at this:

                              #org @boy
                              message @2 5
                              return

                              If you said yes, what would LASTRESULT be? ;)


                              After fixing this, I came up with what (in my opinion) is the final solution:
                              Spoiler:

                              #dynamic 0x1000000

                              #org @start
                              lockall
                              faceplayer
                              checkflag 0x533
                              if 0x1 goto @won
                              checkflag 0x532
                              if 0x1 goto @done
                              message @1 2
                              checkgender
                              compare LASTRESULT 0x0
                              if 0x1 call @gender
                              checkflag 0x534
                              if 0x0 call @girl
                              if 0x1 call @boy
                              compare LASTRESULT 0x1
                              if 0x0 goto @reject
                              message @5 6
                              givepokemon 169 61 142 0 0 0
                              bufferpokemon 2 169
                              message @6 6
                              setflag 0x532
                              goto @done

                              #org @boy
                              message @2 5
                              return

                              #org @girl
                              message @3 5
                              return

                              #org @reject
                              message @4 6
                              releaseall
                              end

                              #org @done
                              message @7 6
                              releaseall
                              end

                              #org @won
                              message @8 6
                              release
                              end

                              #org @gender
                              setflag 0x534
                              return

                              #org @1
                              = I have your Pokémon for the\nbattle.

                              #org @2
                              = Are you ready, Mr. [player]?

                              #org @3
                              = Are you ready, Miss [player]?

                              #org @4
                              = I understand. You have a tough\nbattle ahead. You'll need to\lprepare hard for it!

                              #org @5
                              = Here you are. Good luck!

                              #org @6
                              = \c\h01\h02You recieved a \c\h01\h05[buffer3]!

                              #org @7
                              = Our leader, Isiah, is very strong.\nI can't recall when he was last\ldefeated. You'll need to gather\lall of your strength for this.

                              #org @8
                              = It's not possible...\nYou, beat Master Isiah, at such a\lyoung age...\lYou must be strong enough to take\lthe challenge. Master Isiah will\lbe waiting.


                              Thanks for the optimisation tips. However, they didn't fix my problem with the freezing. What did, however, was checking the map in AM1.92 and realising that it had a problem with handling 7 digit pointers. So I repointed a 6 digit offset (90003A in this case) to my script, entered it as my offset in AM, and run the script. Can't believe I didn't notice it before! :shocked:

                              P.S. I realise I probably should have PMed this, but I thought that publicising solutions would be more useful to other scripters.
                              __________________
                              Mr. Meme is never gonna give you up
                                #146    
                              Old December 31st, 2008 (10:12 AM).
                              Hoshiko Aki's Avatar
                              Hoshiko Aki Hoshiko Aki is offline
                              Avatar rules
                                 
                                Join Date: Oct 2008
                                Posts: 109
                                Spoiler:
                                Code:
                                #org 0x2D513F
                                setvar 0x4060 0x37
                                givepokemon 0x4060 0x8 0x0 0x0 0x0 0x0
                                fanfare 0x13E
                                msgbox @player 0x4
                                waitfanfare
                                closeonkeypress
                                hidesprite LASTTALKED
                                Hidesprite 0x92
                                setflag 0x828
                                release
                                end


                                Script type: Give away
                                Script progamma: XSE


                                XSE say a fault
                                Quote:
                                fault 9 "Subscript out of range" on line 5
                                  #147    
                                Old December 31st, 2008 (10:36 AM). Edited January 1st, 2009 by Pokepal17.
                                Pokepal17's Avatar
                                Pokepal17 Pokepal17 is offline
                                More cowbell~
                                • Silver Tier
                                 
                                Join Date: Oct 2008
                                Location: Steeltown
                                Age: 22
                                Gender: Male
                                Nature: Modest
                                Posts: 1,511
                                Quote:
                                originally posted by Ichiro Kazuki

                                #org 0x2D513F
                                setvar 0x4060 0x37
                                givepokemon 0x4060 0x8 0x0 0x0 0x0 0x0
                                fanfare 0x13E
                                msgbox @player 0x4
                                waitfanfare
                                closeonkeypress
                                hidesprite LASTTALKED
                                Hidesprite 0x92
                                setflag 0x828
                                release
                                end
                                It will say that beacuse you haven't done the full script. You don't need the hidesprite 0x92. You've got a pointer leading to a branch that you haven't done yet.

                                Here is the script, just copy it up word for word. Give the pokeball an ID code of 0828. BTW, LASTTALKED means the last person you talked to.

                                Spoiler:
                                #org 0x2D513F
                                setvar 0x4060 0x37
                                givepokemon 0x4060 0x8 0x0 0x0 0x0 0x0
                                fanfare 0x13E
                                msgbox @player 0x4
                                waitfanfare
                                closeonkeypress
                                hidesprite LASTTALKED
                                setflag 0x828
                                release
                                end

                                #org @player
                                = [player] recieved a Vulpix!

                                ________________________________________________________________________________________

                                I need help with this camera movement script.
                                ROM: Fire Red
                                Version: 1.0
                                Script Editor: XSE
                                Script Type: Trigger Script

                                Script:
                                Spoiler:

                                #dynamic 0x800000

                                #org @start
                                lock
                                checkflag 0x1001
                                if 0x1 goto @end
                                applymovement MOVE_CAMERA @move
                                waitmovement 0x0
                                setflag 0x1001
                                release
                                end

                                #org @end
                                release
                                end

                                #org @move
                                #raw 0x1E 0x1E 0x1E 0x1E 0x1E 0x20 0x20 0x20 0x20 0x1D 0x1D 0x1D 0x1D 0x1D 0x1F 0x1F 0x1F 0x1F 0xFE


                                When I step on the script, nothing happens. The script is meant to move the camera up, right, down then left. But nothing happens.

                                Script settings
                                Spoiler:





                                Thanks Ninja Caterpie, Mac_Mini & derv1205
                                __________________
                                Pokémon Stardrop
                                  #148    
                                Old December 31st, 2008 (3:16 PM).
                                Surf's Avatar
                                Surf Surf is offline
                                ...
                                   
                                  Join Date: Jul 2008
                                  Location: Rust
                                  Age: 22
                                  Gender: Male
                                  Nature: Relaxed
                                  Posts: 1,197
                                  Send a message via Windows Live Messenger to Surf
                                  Quote:
                                  Originally Posted by Pokepal17 View Post
                                  It will say that beacuse you haven't done the full script. You don't need the hidesprite 0x92. You've got a pointer leading to a branch that you haven't done yet.

                                  Here is the script, just copy it up word for word. Give the pokeball an ID code of 0828. BTW, LASTTALKED means the last person you talked to.

                                  Spoiler:
                                  #org 0x2D513F
                                  setvar 0x4060 0x37
                                  givepokemon 0x4060 0x8 0x0 0x0 0x0 0x0
                                  fanfare 0x13E
                                  msgbox @player 0x4
                                  waitfanfare
                                  closeonkeypress
                                  hidesprite LASTTALKED
                                  setflag 0x828
                                  release
                                  end

                                  #org @player
                                  = [player] recieved a Vulpix!

                                  ________________________________________________________________________________________
                                  I need help with this camera movement script.
                                  ROM: Fire Red
                                  Version: 1.0
                                  Script Editor: XSE
                                  Script Type: Trigger Script

                                  Script:
                                  Spoiler:





                                  When I step on the script, nothing happens. The script is meant to move the camera up, right, down then left. But nothing happens.

                                  Script settings
                                  Spoiler:


                                  #dynamic 0x800000

                                  #org @start
                                  lockall
                                  checkflag 0x1001
                                  if 0x1 goto @end
                                  special 0x113
                                  applymovement MOVE_CAMERA @move
                                  special 0x114
                                  waitmovement 0x0
                                  setflag 0x1001
                                  releaseall
                                  end

                                  #org @end
                                  releaseall
                                  end

                                  #org @move
                                  #raw 0x1E 0x1E 0x1E 0x1E 0x1E 0x20 0x20 0x20 0x20 0x1D 0x1D 0x1D 0x1D 0x1D 0x1F 0x1F 0x1F 0x1F 0xFE


                                  You need special 113 before the applymovement and special 114 after
                                  __________________
                                  I'm looking for some good (When I say good,
                                  I mean you can hold your own by yourself)
                                  N**i Zombies players, to form a team or even a
                                  clan, to play with casually.
                                  Send me a PM with your Highest Level and your PSN,
                                  and I'll get back to you.
                                    #149    
                                  Old December 31st, 2008 (7:53 PM).
                                  derv1205's Avatar
                                  derv1205 derv1205 is offline
                                  Trade/Battle/Breed/Clone (X,B2,D)
                                     
                                    Join Date: Dec 2007
                                    Location: Florida, USA
                                    Gender: Male
                                    Nature: Adamant
                                    Posts: 267
                                    Quote:
                                    Originally Posted by Mac_Mini View Post
                                    #dynamic 0x800000

                                    #org @start
                                    lockall
                                    checkflag 0x1001
                                    if 0x1 goto @end
                                    special 0x113
                                    applymovement MOVE_CAMERA @move
                                    special 0x114
                                    waitmovement 0x0
                                    setflag 0x1001
                                    releaseall
                                    end

                                    #org @end
                                    releaseall
                                    end

                                    #org @move
                                    #raw 0x1E 0x1E 0x1E 0x1E 0x1E 0x20 0x20 0x20 0x20 0x1D 0x1D 0x1D 0x1D 0x1D 0x1F 0x1F 0x1F 0x1F 0xFE


                                    You need special 113 before the applymovement and special 114 after
                                    The special 113 and 114 are just to lock the player and all people and
                                    then for release them, so if you don't include that i think it
                                    should also work the script but everybody will keep moving
                                    normally. And, the special should be put after waitmovement 0x0, because
                                    if you put it before, the people will move before the script finish.

                                    Try this:
                                    Code:
                                    #dynamic 0x800000
                                     
                                    #org @start
                                    lockall
                                    checkflag 0x1001
                                    if 0x1 goto @end
                                    special 0x113
                                    applymovement 0x7F @move
                                    waitmovement 0x0
                                    special 0x114
                                    setflag 0x1001
                                    releaseall
                                    end
                                     
                                    #org @end
                                    releaseall
                                    end
                                     
                                    #org @move
                                    #raw 0x1E 0x1E 0x1E 0x1E 0x1E 0x20 0x20 0x20 0x20 0x1D 0x1D 0x1D 0x1D 0x1D 0x1F 0x1F 0x1F 0x1F 0xFE
                                    I think that should work perfectly
                                      #150    
                                    Old December 31st, 2008 (8:04 PM).
                                    Ninja Caterpie's Avatar
                                    Ninja Caterpie Ninja Caterpie is offline
                                    Sitting by the back window
                                       
                                      Join Date: Mar 2008
                                      Location: Best City OCE
                                      Age: 21
                                      Gender: Male
                                      Nature: Bold
                                      Posts: 5,945
                                      Quote:
                                      Originally Posted by derv1205 View Post
                                      The special 113 and 114 are just to lock the player and all people and
                                      then for release them, so if you don't include that i think it
                                      should also work the script but everybody will keep moving
                                      normally. And, the special should be put after waitmovement 0x0, because
                                      if you put it before, the people will move before the script finish.
                                      Actually, these names are dodgy. Special 0x113 sorta allows the camera to move and 114 stops it. People still move in their normal trajectories if you use 0x113. :\

                                      Just like lock and lockall. Lock locks everyone and lockall locks you! :\
                                      __________________
                                      Brony represent.
                                      Closed Thread
                                      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 8:40 AM.