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
  #1    
Old December 20th, 2008 (5:10 AM). Edited April 22nd, 2011 by Rukario.
HackMew's Avatar
HackMew HackMew is offline
Mewtwo Strikes Back
  • Crystal Tier
 
Join Date: Jun 2006
Posts: 1,314

A brief intro about the new script help concept

I've been following the Script Help thread since it began and after months of posts the conclusion I came was only one: there needs to be stricter and better rules. I'm not saying it will be really easy at first, but it's something it needs to be done.

Rules, what about them?

I'll post them in an unsorted order because any of them must be followed and all of them have the same importance. Of course, all forum rules apply.

General Rules

  • Always search before asking: someone may have gotten the same problem before you, therefore you would get the answer in no time.
  • Whenever you need a particular script example, just decompile some similar scripts and try messing around with them.
  • If you need help, ask for it nicely and never demand it.
  • If you don't get an answer soon, just wait patiently. If someone knows the answer, you'll get it posted eventually.
  • Do not ask the same questions over and over again.
  • If you want to say thanks, do it via VM/PM instead of spamming the thread.
  • This is not a script request thread, so you have to post your scripts, clearly explaining what they're supposed to do and what happens instead.

Posting Rules


  • Make sure you took a close look at the scripting tutorials before posting.
  • Always include all your scripts inside spoilers. This way people don't need to waste time scrolling the thread instead of trying to help.
  • Whenever you're posting your script, a couple of screenshoots or a video are useful to understand the problem. If you can, always use at least one of them.
  • Don't forget to include what ROM you're using. Flags and movements are different from game to game, for example.
  • While posting, always include the script type.

    Available types are:
    • Person event - those scripts that get executed when you talk to someone
    • Signpost
    • Trigger - walkable, green "S" on AM
    • Level script ¹

    So, for example, if someone needs help with a level script someone that doesn't know anything about them wouldn't even try helping.

  • Don't forget to specify what's the script editor you are using.
  • Whenever you see someone is missing some data from his post, report it rather then giving a generic answer.
  • Avoid answering if you're not truly sure about what you're saying. Wrong answers won't help anyone: even worser, someone may really think what you said is true. It's not about discouraging people from trying to help: it's about discouraging wrong knowledge.
The code below shows you the structure to use when asking for help here. You're not forced to follow it exactly as that, as long as you include all needed information.

Code:
[b]Game: [/b]
[b]Type: [/b]
[b]Editor: [/b]
[b]Script: [/b]
[spoiler]Script goes here[/spoiler]
[b]Screenshots and/or videos: [/b]
¹ To view the full level script, do the following:

Spoiler:
  • Open AM and load your ROM.
  • Enable the Professional Header View from the View menu.
  • Go to the Header tab and copy the Map Script Offset.
  • Open XSE and load the same ROM.
  • Paste in the offset you just copied.
  • Enable the Level Script option (the button on the very right on the toolbar) and decompile it.

Note: the rules listed above are subject to change without further notice.

Useful Links


Of course, if you're using XSE, reading the guide is a must ;)

Change Log

This is the place where the updates to this post will be stored.

Spoiler:

20/12/2008 - Thread started -- HackMew
21/12/2008 - Adjusted rules a little -- HackMew
25/12/2008 - Introducing the [SOLVED] tag -- HackMew
29/12/2008 - Updated the useful stuff -- HackMew
22/09/2009 - Removed the [SOLVED] part of the rules as no one ever cared -- HackMew
19/11/2009 - Restyled a little -- HackMew

__________________

Relevant Advertising!

  #2    
Old December 20th, 2008 (2:15 PM). Edited December 20th, 2008 by shane2243.
shane2243's Avatar
shane2243 shane2243 is offline
Dragonite Lover
     
    Join Date: Jan 2008
    Location: Croydon
    Gender:
    Nature: Naughty
    Posts: 94
    Send a message via Windows Live Messenger to shane2243
    i just wanna know how i'd go about including a a script that means i cannot open a door untill i've spoken to birch after i beat may/brenden?

    i want to basically lock the door till after birch has given me the pokedex, and the character's mom has given him/her the running shoes?


    [edit]would i have to put a person script on the door, but with no player icon, and make it so the person script disappears after i have said item?[/edit]
      #3    
    Old December 20th, 2008 (3:16 PM).
    пзо's Avatar
    пзо пзо is offline
    zzirRusty
       
      Join Date: Dec 2008
      Nature: Quiet
      Posts: 222
      Quote:
      Originally Posted by shane2243 View Post
      i just wanna know how i'd go about including a a script that means i cannot open a door untill i've spoken to birch after i beat may/brenden?

      i want to basically lock the door till after birch has given me the pokedex, and the character's mom has given him/her the running shoes?


      [edit]would i have to put a person script on the door, but with no player icon, and make it so the person script disappears after i have said item?[/edit]
      What we would do here is:

      #Org @Start

      Setflag 0x1000

      For the battle script, you know, the battle with brendan/may.
      To keep the door locked we would

      #Org @Start
      Checkflag 0x1000 -

      This cheks if the Setflag 0x1000 is Done yet. Make sure you dont use the same flags twice..

      That was the battle..
      Now the Running shoes:

      #Org @Start
      Setflag 0x82F

      Now that should activate the running shoes..

      #Org @start
      Checkflag 82F

      That checks if you have the running shoes activated..

      Now the Pokedex.

      #Org @start
      Setflag 0x829

      That Sets the Pokedex, you now have the pokedex in your menu.

      #Org @start
      Checkflag 0x829

      Checks if the Pokedex is activated..

      So here we are.

      ---
      Pokedex Script

      #Dynamic 0xoffset

      #org @start
      checkflag 0x829
      if 0x0 goto @hey!
      if 0x1 goto @end
      end

      #org @hey!
      lock
      msgbox @icant
      boxset 0x6
      applymovement 0xFF @back
      waitmovement 0x0
      release
      end

      #org @icant
      = I can't go in there without\nmy pokedex

      #org @back
      #raw 0x00 0xFE

      #org @end
      release
      end


      ---
      Running shoes Script


      #Dynamic 0xoffset

      #org @start
      checkflag 0x82F
      if 0x0 goto @hey!
      if 0x1 goto @end
      end

      #org @hey!
      lock
      msgbox @icant
      boxset 0x6
      applymovement 0xFF @back
      waitmovement 0x0
      release
      end

      #org @icant
      = I can't go in there/nwithout my running shoes.

      #org @back
      #raw 0x00 0xFE

      #org @end
      release
      end


      putting them together is your job. [Its sooo easy]
      And I never included the Battle with May/Brendan.. that would go into too much detail.
      --
      You should inderstand it now, if you dont, just read a tutorial.
      This is the best one in my opinion:
      http://www.pokecommunity.com/showthread.php?t=146174
      Its called "Seth The Rom masters XSE scripting Tutorial"

      Hope you Exel!
      And good luck Scripting!
      __________________
      | Pokémon Obsidian | Pokémon Mystical Glacier |
      Yeah, I said it, Pokémon Mystical Glacier..
      Its comming back.. Better than ever.
      Along side Pokémon Obsidian.
        #4    
      Old December 20th, 2008 (3:31 PM). Edited December 20th, 2008 by Chimchar 9.
      Chimchar 9's Avatar
      Chimchar 9 Chimchar 9 is offline
      (:
      • Silver Tier
       
      Join Date: Jan 2008
      Location: England, London
      Age: 23
      Gender: Male
      Nature: Calm
      Posts: 1,618
      note:i want the mum to go to you and then the text but it does the text before the movement.

      Game: fire red
      Script Type: person script

      Script:
      Spoiler:

      #org 0x8000AB
      checkflag 0x828
      if 0x0 goto 0x88000BC
      if 0x1 goto 0x8800154
      end


      #org 0x8000BC
      lock
      msgbox 0x88000D2 '"Hey [player] how are you ? yes i kn..."
      callstd 0x6
      applymovement 0x1 0x880014F
      waitmovement 0x0
      release
      end

      #org 0x800154
      release
      end


      #org 0x80014F
      #raw 13 'Step Right (Normal)
      #raw 11 'Step Up (Normal)
      #raw 3 'Face Right
      #raw FE 'End of Movements


      #org 0x8000D2
      = Hey [player] how are you ? yes i know\nit's cold in the dempsi region.\poh yeah pro.oak wants to see you\n about something.
      __________________
      Pokemon Green Diamond
      Status: cancelled
        #5    
      Old December 20th, 2008 (3:44 PM).
      Thrace's Avatar
      Thrace Thrace is offline
      @tion
      • Gold Tier
       
      Join Date: Jun 2007
      Age: 26
      Gender: Male
      Posts: 1,048
      Quote:
      Originally Posted by shane2243 View Post
      i just wanna know how i'd go about including a a script that means i cannot open a door untill i've spoken to birch after i beat may/brenden?

      i want to basically lock the door till after birch has given me the pokedex, and the character's mom has given him/her the running shoes?


      [edit]would i have to put a person script on the door, but with no player icon, and make it so the person script disappears after i have said item?[/edit]
      Theres a reason that this new thread was made. Its to avoid posts like this that don't provide enough information. Please use the form in the first post before you post. It'll make it easier for everyone.
      __________________
        #6    
      Old December 20th, 2008 (3:45 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 Lucario 9 View Post
        note:i want the mum to go to you and then the text but it does the text before the movement.

        Game: fire red
        Script Type: applymovement script

        Script:
        Spoiler:

        #org 0x8000AB
        checkflag 0x828
        if 0x0 goto 0x88000BC
        if 0x1 goto 0x8800154
        end


        #org 0x8000BC
        lock
        msgbox 0x88000D2 '"Hey [player] how are you ? yes i kn..."
        callstd 0x6
        applymovement 0x1 0x880014F
        waitmovement 0x0
        release
        end

        #org 0x800154
        release
        end


        #org 0x80014F
        #raw 13 'Step Right (Normal)
        #raw 11 'Step Up (Normal)
        #raw 3 'Face Right
        #raw FE 'End of Movements


        #org 0x8000D2
        = Hey [player] how are you ? yes i know\nit's cold in the dempsi region.\poh yeah pro.oak wants to see you\n about something.
        Ok i'll put th wrong things in bold
        #dynamic 0x800000
        #org @start
        checkflag 0x900
        if 0x0 goto @go
        end


        #org @go
        lockapplymovement 0x1 @move
        waitmovement 0x0
        msgbox @talk'"Hey [player] how are you ? yes i kn..."
        callstd 0x6
        setflag 0x900
        release
        end



        #org @move
        #raw 13 'Step Right (Normal)
        #raw 11 'Step Up (Normal)
        #raw 3 'Face Right
        #raw FE 'End of Movements


        #org @talk
        [I]= Hey [player] how are you ? yes i know\nit's cold in the dempsi region.\poh yeah pro.oak wants to see you\n about something.

        That should work as you want it to and it should save bytes
        also if your mums not giving you a pokemo you shouldn't use flag 828
        __________________
        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.
          #7    
        Old December 20th, 2008 (4:00 PM).
        HackMew's Avatar
        HackMew HackMew is offline
        Mewtwo Strikes Back
        • Crystal Tier
         
        Join Date: Jun 2006
        Posts: 1,314
        Quote:
        Originally Posted by Mac_Mini View Post
        Ok i'll put th wrong things in bold
        Spoiler:
        #dynamic 0x800000
        #org @start
        checkflag 0x900
        if 0x0 goto @go
        end


        #org @go
        lockapplymovement 0x1 @move
        waitmovement 0x0
        msgbox @talk'"Hey [player] how are you ? yes i kn..."
        callstd 0x6
        setflag 0x900
        release
        end



        #org @move
        #raw 13 'Step Right (Normal)
        #raw 11 'Step Up (Normal)
        #raw 3 'Face Right
        #raw FE 'End of Movements


        #org @talk
        [I]= Hey [player] how are you ? yes i know\nit's cold in the dempsi region.\poh yeah pro.oak wants to see you\n about something.

        That should work as you want it to and it should save bytes
        also if your mums not giving you a pokemo you shouldn't use flag 828
        Nothing is wrong there but it's always safer to use flags from 0x1000 onwards.
        Also, usually flags are used to skip something that got executed already, like you can see in the script below:

        Spoiler:
        #dynamic 0x800000

        #org @start
        checkflag 0x1000
        if 0x1 goto @nothing
        lock
        applymovement 0x1 @move
        waitmovement 0x0
        msgbox @talk
        callstd 0x6
        setflag 0x1000
        release
        end

        #org @nothing
        release
        end

        #org @move
        #raw 13 'Step Right (Normal)
        #raw 11 'Step Up (Normal)
        #raw 3 'Face Right
        #raw FE 'End of Movements

        #org @talk
        = Hey [player] how are you ? yes i know\nit's cold in the dempsi region.\poh yeah pro.oak wants to see you\n about something.
        __________________
          #8    
        Old December 20th, 2008 (4:07 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
          Hackmew, we need a new rule. No requesting scripts, sire!
          'nyway, this thread's a great idea an' all.
          __________________
          Brony represent.
            #9    
          Old December 20th, 2008 (4:09 PM).
          HackMew's Avatar
          HackMew HackMew is offline
          Mewtwo Strikes Back
          • Crystal Tier
           
          Join Date: Jun 2006
          Posts: 1,314
          Quote:
          Originally Posted by Ninja Caterpie View Post
          HackMew, we need a new rule. No requesting scripts, sire!
          'nyway, this thread's a great idea an' all.
          Oh, well. Just check the first post. That rule is already there.
          __________________
            #10    
          Old December 20th, 2008 (9:04 PM). Edited December 20th, 2008 by treecko99.
          treecko99 treecko99 is offline
          The one and only
             
            Join Date: Nov 2007
            Location: I'm not that much of a n00b.
            Age: 23
            Gender:
            Nature: Quirky
            Posts: 9
            Send a message via Windows Live Messenger to treecko99
            I am trying out a yes/no script I found in a tutorial, but I am having some trouble. Originally it said I was missing #define or parameter tags so I added them to the places that needed them and then complied. When I tested out in the rom "Yes or No?" appeared and so did the box. When I answered the rest of the text didn't appear but I was able to walk around.

            Game: Fire Red
            System: XSE
            Type: Yes/No Script

            Script:



            Spoiler:
            #dynamic 0x71A3F3

            #org @start
            lock
            faceplayer
            message @tutorial
            boxset 5
            #define Compare LASTRESULT 0x1
            #define b_true goto @yes
            #define Compare LASTRESULT 0x0
            #define if b_true goto @no
            release
            end

            #org @tutorial
            = Yes or no?

            #org @yes
            message @pressyes
            boxset 6
            release
            end

            #org @no
            message @pressno
            boxset 6
            release
            end

            #org @pressyes
            = You pressed YES!

            #org @pressno
            = You pressed NO!
            __________________
            So this a signature....its so blank. Time to fix that.


            Click here to feed me. Don't let me starve!
            This link is a lie!

              #11    
            Old December 20th, 2008 (9:23 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 treecko99 View Post
              I am trying out a yes/no script I found in a tutorial, but I am having some trouble. Originally it said I was missing #define or parameter tags so I added them to the places that needed them and then complied. When I tested out in the rom "Yes or No?" appeared and so did the box. When I answered the rest of the text didn't appear but I was able to walk around.

              Game: Fire Red
              System: XSE
              Type: Yes/No Script

              Script:



              Spoiler:
              #dynamic 0x71A3F3

              #org @start
              lock
              faceplayer
              message @tutorial
              boxset 5
              compare LASTRESULT 0x1
              if b_true goto @yes
              message @pressno
              boxset 6
              release
              end

              #org @tutorial
              = Yes or no?

              #org @yes
              message @pressyes
              boxset 6
              release
              end

              #org @pressyes
              = You pressed YES!

              #org @pressno
              = You pressed NO!
              Lolwut? What are the define for? Anyway, I've optimised the script to save time. It should work now.

              Spoiler:
              #dynamic 0x71A3F3

              #org @start
              lock
              faceplayer
              message @tutorial
              boxset 5
              compare LASTRESULT 0x1
              if b_true goto @yes
              message @pressno
              boxset 6

              release
              end

              #org @tutorial
              = Yes or no?

              #org @yes
              message @pressyes
              boxset 6
              release
              end

              #org @pressyes
              = You pressed YES!

              #org @pressno
              = You pressed NO!
              __________________
              Brony represent.
                #12    
              Old December 20th, 2008 (9:35 PM).
              treecko99 treecko99 is offline
              The one and only
                 
                Join Date: Nov 2007
                Location: I'm not that much of a n00b.
                Age: 23
                Gender:
                Nature: Quirky
                Posts: 9
                Send a message via Windows Live Messenger to treecko99
                Quote:
                Originally Posted by Ninja Caterpie View Post
                Lolwut? What are the define for? Anyway, I've optimised the script to save time. It should work now.

                Spoiler:
                #dynamic 0x71A3F3

                #org @start
                lock
                faceplayer
                message @tutorial
                boxset 5
                compare LASTRESULT 0x1
                if b_true goto @yes
                message @pressno
                boxset 6

                release
                end

                #org @tutorial
                = Yes or no?

                #org @yes
                message @pressyes
                boxset 6
                release
                end

                #org @pressyes
                = You pressed YES!

                #org @pressno
                = You pressed NO!
                Thanks for the help, but now I am back to my original problem.
                It won't let me compile because "Error 13 'type mismatch' on line 8
                Missing #define or parameter.
                Line: compare LASTRESULT 0x1" pops up.
                __________________
                So this a signature....its so blank. Time to fix that.


                Click here to feed me. Don't let me starve!
                This link is a lie!

                  #13    
                Old December 20th, 2008 (9:50 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 treecko99 View Post
                  Thanks for the help, but now I am back to my original problem.
                  It won't let me compile because "Error 13 'type mismatch' on line 8
                  Missing #define or parameter.
                  Line: compare LASTRESULT 0x1" pops up.
                  Strange - it compiles for me...And when I test it in-game, it works perfectly too!
                  __________________
                  Brony represent.
                    #14    
                  Old December 20th, 2008 (9:56 PM).
                  treecko99 treecko99 is offline
                  The one and only
                     
                    Join Date: Nov 2007
                    Location: I'm not that much of a n00b.
                    Age: 23
                    Gender:
                    Nature: Quirky
                    Posts: 9
                    Send a message via Windows Live Messenger to treecko99
                    Quote:
                    Originally Posted by Ninja Caterpie View Post
                    Strange - it compiles for me...And when I test it in-game, it works perfectly too!
                    Okay I added #define to the script you gave me and now it is working. Just one problem. No matter what I pick it says I picked no.

                    Spoiler:
                    #org @start
                    lock
                    faceplayer
                    message @tutorial
                    boxset 5
                    #define compare LASTRESULT 0x1
                    #define if b_true goto @yes
                    message @pressno
                    boxset 6
                    release
                    end

                    #org @tutorial
                    = Yes or no?

                    #org @yes
                    message @pressyes
                    boxset 6
                    release
                    end

                    #org @pressyes
                    = You pressed YES!

                    #org @pressno
                    = You pressed NO!
                    __________________
                    So this a signature....its so blank. Time to fix that.


                    Click here to feed me. Don't let me starve!
                    This link is a lie!

                      #15    
                    Old December 20th, 2008 (10:18 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 treecko99 View Post
                      Okay I added #define to the script you gave me and now it is working. Just one problem. No matter what I pick it says I picked no.

                      Spoiler:
                      #org @start
                      lock
                      faceplayer
                      message @tutorial
                      boxset 5
                      #define compare LASTRESULT 0x1
                      #define if b_true goto @yes
                      message @pressno
                      boxset 6
                      release
                      end

                      #org @tutorial
                      = Yes or no?

                      #org @yes
                      message @pressyes
                      boxset 6
                      release
                      end

                      #org @pressyes
                      = You pressed YES!

                      #org @pressno
                      = You pressed NO!
                      Then try compare lastresult 0x0 instead of 0x1...Initiative, much?
                      __________________
                      Brony represent.
                        #16    
                      Old December 20th, 2008 (10:38 PM).
                      treecko99 treecko99 is offline
                      The one and only
                         
                        Join Date: Nov 2007
                        Location: I'm not that much of a n00b.
                        Age: 23
                        Gender:
                        Nature: Quirky
                        Posts: 9
                        Send a message via Windows Live Messenger to treecko99
                        Quote:
                        Originally Posted by Ninja Caterpie View Post
                        Then try compare lastresult 0x0 instead of 0x1...Initiative, much?
                        Gosh Darn it. That still won't work.
                        __________________
                        So this a signature....its so blank. Time to fix that.


                        Click here to feed me. Don't let me starve!
                        This link is a lie!

                          #17    
                        Old December 20th, 2008 (10:45 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
                          Try "if 0x1 goto".

                          :\ I'm really stuffed over this. It works perfectly on my ROM.

                          Hey, remember to take the start offset from the compiled script and put THAT into the person's script offset in A-Map.
                          __________________
                          Brony represent.
                            #18    
                          Old December 20th, 2008 (10:56 PM).
                          treecko99 treecko99 is offline
                          The one and only
                             
                            Join Date: Nov 2007
                            Location: I'm not that much of a n00b.
                            Age: 23
                            Gender:
                            Nature: Quirky
                            Posts: 9
                            Send a message via Windows Live Messenger to treecko99
                            Quote:
                            Originally Posted by Ninja Caterpie View Post
                            Try "if 0x1 goto".

                            :\ I'm really stuffed over this. It works perfectly on my ROM.

                            Hey, remember to take the start offset from the compiled script and put THAT into the person's script offset in A-Map.
                            Unfortunately that failed aswell. It just game me the same thing...with the additional messed up text.

                            Thanks for your help anyway. Hopefully I'll figure out what is wrong sooner or later.
                            __________________
                            So this a signature....its so blank. Time to fix that.


                            Click here to feed me. Don't let me starve!
                            This link is a lie!

                              #19    
                            Old December 20th, 2008 (11:22 PM).
                            Hiche.. Hiche.. is offline
                             
                               
                              Join Date: Apr 2008
                              Posts: 979
                              Quote:
                              Originally Posted by treecko99 View Post
                              Okay I added #define to the script you gave me and now it is working. Just one problem. No matter what I pick it says I picked no.

                              Spoiler:
                              #dynamic 0x800000

                              #org @start
                              lock
                              faceplayer
                              message @tutorial
                              boxset 5
                              compare LASTRESULT 0x1
                              if b_true goto @yes
                              message @pressno
                              boxset 6
                              release
                              end

                              #org @tutorial
                              = Yes or no?

                              #org @yes
                              message @pressyes
                              boxset 6
                              release
                              end

                              #org @pressyes
                              = You pressed YES!

                              #org @pressno
                              = You pressed NO!
                              The #define before the two commands is useless, and won't do anything. It also compiled perfectly with me. :\
                                #20    
                              Old December 21st, 2008 (4:00 AM).
                              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
                              I need a bit of help with a trainerbattle.
                              The script works fine, so does the battle but when I am in the trainer's sight, the trainer doesn't move towards me so I have to talk to him to battle.
                              What is wrong?

                              Trainer's settings in A-map

                              Spoiler:

                              Movement Type = Look Right
                              Movement = 11
                              Trainer Box = Ticked


                              Trainerbattle Script

                              Spoiler:

                              #dynamic 0x800000

                              #org @start
                              trainerbattle 0x0 0x001 0x0 @before @after
                              message @beaten
                              boxset 0x6
                              release
                              end

                              #org @before
                              = DIE!!!

                              #org @after
                              = NOOOOO!!!

                              #org @beaten
                              = WHY!!!


                              Thanks in advance
                              __________________
                              Pokémon Stardrop
                                #21    
                              Old December 21st, 2008 (4:34 AM).
                              HackMew's Avatar
                              HackMew HackMew is offline
                              Mewtwo Strikes Back
                              • Crystal Tier
                               
                              Join Date: Jun 2006
                              Posts: 1,314
                              Quote:
                              Originally Posted by treecko99 View Post
                              Thanks for the help, but now I am back to my original problem.
                              It won't let me compile because "Error 13 'type mismatch' on line 8
                              Missing #define or parameter.
                              Line: compare LASTRESULT 0x1" pops up.
                              As XSE told you, a #define is missing. And on line 8 we have LASTRESULT.
                              So make sure you extract all files from the zipped archive.
                              LASTRESULT is defined in the std.rbh file indeed.

                              Anyway, remember the script type isn't "Yes/No script" and the like. See the first post for further details.


                              Quote:
                              Originally Posted by Pokepal17 View Post
                              I need a bit of help with a trainerbattle.
                              The script works fine, so does the battle but when I am in the trainer's sight, the trainer doesn't move towards me so I have to talk to him to battle.
                              What is wrong?

                              Trainer's settings in A-map

                              Spoiler:

                              Movement Type = Look Right
                              Movement = 11
                              Trainer Box = Ticked


                              Thanks in advance
                              Well, I guess you just forgot to set the View radius value properly:



                              Anyway, next time please provide all info okay?
                              __________________
                                #22    
                              Old December 21st, 2008 (5:29 AM).
                              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
                              Thanks HackMew.
                              __________________
                              Pokémon Stardrop
                                #23    
                              Old December 21st, 2008 (10:45 AM).
                              treecko99 treecko99 is offline
                              The one and only
                                 
                                Join Date: Nov 2007
                                Location: I'm not that much of a n00b.
                                Age: 23
                                Gender:
                                Nature: Quirky
                                Posts: 9
                                Send a message via Windows Live Messenger to treecko99
                                Thanks Hack Mew, it turned out I forgot to extract the extra files.
                                __________________
                                So this a signature....its so blank. Time to fix that.


                                Click here to feed me. Don't let me starve!
                                This link is a lie!

                                  #24    
                                Old December 21st, 2008 (11:06 AM).
                                Hiche.. Hiche.. is offline
                                 
                                   
                                  Join Date: Apr 2008
                                  Posts: 979
                                  Can someone show me an example of the trainerbattle 0x6 and 0x7? Thanks in advance.
                                    #25    
                                  Old December 21st, 2008 (11:27 AM).
                                  Likewise Likewise is offline
                                  Bye.
                                     
                                    Join Date: Mar 2008
                                    Location: Twilight Town
                                    Posts: 743
                                    Quote:
                                    #Dynamic 0x71A270

                                    #org @start
                                    checkflag 0x1002
                                    if 0x1 goto @done
                                    lock
                                    faceplayer
                                    giveitem 0x29 0x1
                                    msgbox @text
                                    boxset 0x6
                                    msgbox @Howmuch?
                                    boxset 0x6
                                    applymovement 0x1 @movey
                                    waitmovement 0x0
                                    msgbox @text2
                                    boxset 0x6
                                    msgbox @text3
                                    boxset 0x6
                                    applymovement 0x1 @movey1
                                    waitmovement 0x0
                                    applymovement 0x1 @movey2
                                    waitmovement 0x0
                                    setflag 0x1002
                                    clearflag 0x1004
                                    setflag 0x1003
                                    release
                                    end

                                    #org @text
                                    = Hi, could I have some milk?\pClerk:Certainly!

                                    #org @Howmuch?
                                    = You got some moomoo milk!\pThanks, how much do I owe you?\lClerc:Don't worry, it's on the\nhouse!\pThank you!

                                    #org @movey
                                    #raw 0x62 0x02 0xFE

                                    #org text2
                                    = Boss:What?!\nAnother freebie?!\lThat's it, you're fired!

                                    #org @text3
                                    = Clerk:What?!\n..........\pFine!

                                    #org @movey2
                                    #raw 0x11 0x11 0x60 0xFE

                                    #org @done
                                    release
                                    end
                                    It keeps saying Type Mismatch on line 8, but I checked the tutorials and that's how give item is supposed to go right?
                                    __________________
                                    Bye.
                                    I'm sick of all the prepubecent n00bs running around.
                                    It's like no one has anymore morals anymore.
                                    Bye to all my friends, I'll still be talking to you on msn.
                                    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 11:37 AM.