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

TrollandToad.com
Closed Thread
 
Thread Tools
  #7451    
Old November 18th, 2012 (11:14 PM).
CameraFan CameraFan is offline
     
    Join Date: Nov 2012
    Gender: Male
    Posts: 10
    I'm hacking FR, I copied the Old Man script (I'm using PKSV) to block you if you don't have a Pokedex and changed it a tiny bit, compiled it and now the game freezes when I trigger it.

    #org 0x88005DC
    '-----------------------------------
    lockall
    textcolor BLUE
    msgbox 0x817DD03 ' I absolutely forbid ...
    callstd MSG_NOCLOSE ' Non-closing message
    closemsg
    applymovement PLAYER 0x8165B0E ' walk_left end
    pauseevent 0x0
    releaseall
    end


    #org 0x817DD03
    = I absolutely forbid you from\ngoing through here!\pThis is private property!

    #org 0x8165B0E
    M walk_left end


    Are there any problems in the script?
    Edit- If I set the variable number to the same as in the original FR/LG nothing happens when I trip it.

    Relevant Advertising!

      #7452    
    Old November 19th, 2012 (3:05 AM). Edited November 19th, 2012 by IrrelevantPride.
    IrrelevantPride IrrelevantPride is offline
       
      Join Date: Jan 2011
      Posts: 9
      I'm not sure why but my I was practicing with a level script but I keep running to an error. The script plays just fine, the camera moves up three spots then down three spots, the issue comes up that whenever I enter the map, the script continues to run even though the variable (x4000) has been set to x01 and it should only run when its x00. I have another script on the map that also only runs when x4000 is equal to x00 and it doesn't run after the level script has been triggered so I'm not sure what exactly the error is since the variable is being set but the script runs again anyways.

      Spoiler:

      //________________________
      //Level Script Offset x0080030A|
      //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

      #org 0x80030A
      #raw 0x2
      #raw pointer 0x8800320
      #raw 0x0

      //---------------
      #org 0x800320
      #raw word 0x4000
      #raw word 0x0
      #raw pointer 0x880032A
      #raw word 0x0

      //---------------
      #org 0x80032A
      special 0x113
      applymovement 0x7F 0x88003F0
      waitmovement 0x0
      special 0x114
      setvar 0x4000 0x1
      end

      //-----------
      // Movements
      //-----------
      #org 0x8003F0
      #raw 0x9 //Step Up (Normal)
      #raw 0x9 //Step Up (Normal)
      #raw 0x9 //Step Up (Normal)
      #raw 0x11 //Delay2
      #raw 0x11 //Delay2
      #raw 0x8 //Step Down (Normal)
      #raw 0x8 //Step Down (Normal)
      #raw 0x8 //Step Down (Normal)
      #raw 0xFE //End of Movements


      Edit: Found the answer reading through a level script thread, x4000 is always reset when you exit the map =p
        #7453    
      Old November 23rd, 2012 (9:18 PM).
      AllyJacqui's Avatar
      AllyJacqui AllyJacqui is offline
      The one and only -
         
        Join Date: Nov 2012
        Location: 'Straya (Australia)
        Age: 19
        Gender: Female
        Nature: Timid
        Posts: 67
        Okay, before i get judged. I'm trying to make the switch between Pokescript and XSE, but I wanted to finsih off a few scripts I started in Pokescript, and I ran into this one:

        Spoiler:
        #org $start
        lock
        message $1
        boxset 6
        applymovement 0xFF $move
        pausemove 0x0
        message $2
        boxset 6
        giveitem 184 1
        giveitem 27 3
        giveitem 4 5
        message $3
        boxset 6
        setvar 0x5000 0x0001
        release
        end

        #org $1
        $1 1 =\c\h01\h04Mum: Hey sweetie!\nCan you please come here?

        #org $move
        $move 1 ; #binary 0x10 0x10 0x10 0x10 0x02 0x63

        0xFE

        #org $2
        $2 1 =\c\h01\h04Mum: Well, first off.\n...\p...\n...\pHAPPY BIRTHDAY!!\pDon't tell me you forgot?!\nJacinta: ...You idiot.\p\c\h01\h08Dad: Hey, Jacinta, don't be rude.\nWell,\v\h01 Since it is your\pBirthday, We managed to get you\nSome small stuff..

        #org $3
        $3 1 =\c\h01\h04Mum: Don't look so shocked!\nBut you can do us a favour,\pCan you please give Professor Willow\nA visit. She wants to wish\pyou a Happy Birthday too.


        Now, this works fine. Up until the end where it gives me a bunch of garbled mess. Aparently, the problem is common. But since I have NO knowledge of XSE, I have no idea where to get the offset after I decompile it, or where to put it. :/
        Here's the decompiled version, if that's needed too.

        Spoiler:
        '-----------------------
        #org 0x71A8F8
        #raw 02
        #raw pointer 0x871A8EE
        #raw 00

        '-----------------------
        #org 0x71A8EE
        #raw word 0x5000
        #raw word 0x0
        #raw pointer 0x88035D0
        #raw word 0x0

        '-----------------------
        #org 0x8035D0
        lock
        msgbox 0x880361E '"\c\h01ÇMum: Hey Sweetie!\nCan you p..."
        callstd 0x6
        applymovement MOVE_PLAYER 0x880364D
        waitmovement 0x0
        msgbox 0x8803654 '"\c\h01ÇMum: Well, first off.\n...\p..."
        callstd 0x6
        giveitem 0xB8 0x1 0x0
        giveitem 0x1B 0x3 0x0
        giveitem 0x4 0x5 0x0
        msgbox 0x880372E '"\c\h01ÇMum: Don't look so shocked!\..."
        callstd 0x6
        setvar 0x5000 0x1
        release
        end


        '-----------
        ' Movements
        '-----------
        #org 0x80364D
        #raw 10 'Step Down (Normal)
        #raw 10 'Step Down (Normal)
        #raw 10 'Step Down (Normal)
        #raw 10 'Step Down (Normal)
        #raw 2 'Face Left
        #raw 63 'Question Mark (?)
        #raw FE 'End of Movements


        '---------
        ' Strings
        '---------
        #org 0x80361E
        = \c\h01ÇMum: Hey Sweetie!\nCan you please come here?

        #org 0x803654
        = \c\h01ÇMum: Well, first off.\n...\p...\n...\pHAPPY BIRTHDAY!!\pDon't tell me you forgot?!\nJacinta: ...You idiot.\p\c\h01ËDad: Hey, Jacinta, Don't be rude.\n Well,[player] Since it is your\pBirthday, We managed to get you\nSome small stuff..

        #org 0x80372E
        = \c\h01ÇMum: Don't look so shocked!\nBut you can do us a favour,\pCan you please give Professor Willow\nA visit. She wants to wish\pyou a happy Birthday too.


        Please keep in mind I have NO knowledge of XSE, and this is literally the first time I've used it. Where do I get the offset after I decompiled? There's like ten 'newoffset' s and then, where do I put it? Under the advanced Header? Or on the script block? Both? Help? D":
        __________________

        ~ AllyJacqui, aspiring cosplayer from Sydney Australia ~
          #7454    
        Old November 23rd, 2012 (10:38 PM).
        Sudeki's Avatar
        Sudeki Sudeki is offline
        Can you feel it?
           
          Join Date: Feb 2010
          Location: Golden Rod
          Age: 25
          Gender: Male
          Nature: Gentle
          Posts: 321
          Quote:
          Originally Posted by AllyJacqui View Post
          -Snip-
          Are you trying to do that in XSE or Pokescript? Because it doesn't seem to be like a XSE script. And for where you put the script well that depends on how you want the script to be used. Are you wanting it to fire when you talk to a person? When you walk on a tile? When you enter a room? Although it looks as if you are wanting it to fire off as you enter the room. To fix that garbled text mess after the level script ends. You will need to do this to fix it :


          Open the map in Advancemap, Go to the header tab. Make sure the "Professional Header view" is on. Then find the section for "Map Script offset", Take that offset put it in XSE click the "Level Script" button, and press decompile. Then look for where your variable is, I'm assuming you are using 5000 so find that. And you will see that advancemap changed it to "FFFF" simply change that FFFF to 0 and compile again.


          If you are indeed trying to make an XSE scripts and such you can send me a PM and I will try to answer any questions you might have with it, instead of potentially flooding this thread with lots of posts.
          __________________
            #7455    
          Old November 23rd, 2012 (10:48 PM).
          AllyJacqui's Avatar
          AllyJacqui AllyJacqui is offline
          The one and only -
             
            Join Date: Nov 2012
            Location: 'Straya (Australia)
            Age: 19
            Gender: Female
            Nature: Timid
            Posts: 67
            Quote:
            Originally Posted by Sudeki View Post
            Are you trying to do that in XSE or Pokescript? Because it doesn't seem to be like a XSE script.
            I wrote it in Pokescript, and I had to decompile it in XSE.

            Quote:
            Originally Posted by Sudeki View Post
            Open the map in Advancemap, Go to the header tab. Make sure the "Professional Header view" is on. Then find the section for "Map Script offset", Take that offset put it in XSE click the "Level Script" button, and press decompile. Then look for where your variable is, I'm assuming you are using 5000 so find that. And you will see that advancemap changed it to "FFFF" simply change that FFFF to 0 and compile again.
            I've already been through that stage, I had no FFFF for whatever reason and it stayed as 0. I thought that meant the script was all good, But apparently not. It still gives me the garbled text. Thats why i wondered if i had to get a new offset or something.

            Just tried compiling it again, and now it freezes on the spot. Great, :/
            __________________

            ~ AllyJacqui, aspiring cosplayer from Sydney Australia ~
              #7456    
            Old November 24th, 2012 (7:58 AM).
            FRANKTANK FRANKTANK is offline
               
              Join Date: May 2010
              Age: 21
              Gender: Male
              Posts: 34
              I went to edit the script for the Mt. Moon Helix Fossil in FireRed to change "HELIX FOSSIL" to "Helix Fossil" but when I try to compile it, a message pops up saying "Error 13 'Type mismatch' on line 12. Missing #define or parameter. Line: giveitem2 0x165 0x1 0x13E" and it won't let me compile the script. Any way to fix this?
                #7457    
              Old November 28th, 2012 (2:02 AM). Edited November 28th, 2012 by KyX.
              KyX KyX is offline
                 
                Join Date: Nov 2012
                Posts: 10
                Hi, i have a problem with a SetMapTile Script.

                Spoiler:

                '---------------
                #org 0x80263C
                lockall
                compare 0x5064 0x64
                if 0x1 goto 0x880271D
                setmaptile 0xD 0x3 0x315 0x1
                setmaptile 0xE 0x3 0x310 0xC
                setmaptile 0xF 0x3 0x311 0xC
                setmaptile 0x10 0x3 0x312 0xC
                setmaptile 0x11 0x3 0x313 0xC
                setmaptile 0x12 0x3 0x314 0xC
                setmaptile 0x13 0x3 0x31D 0x1

                setmaptile 0xE 0x4 0x318 0xC
                setmaptile 0xF 0x4 0x319 0xC
                setmaptile 0x10 0x4 0x31A 0xC
                setmaptile 0x11 0x4 0x31B 0xC
                setmaptile 0x12 0x4 0x31C 0xC

                setmaptile 0xE 0x2 0x2EF 0x1
                setmaptile 0xF 0x2 0x31F 0x1
                setmaptile 0x10 0x2 0x294 0x1
                setmaptile 0x11 0x2 0x2EE 0x1
                setmaptile 0x12 0x2 0x31F 0x1

                setmaptile 0xE 0x1 0x299 0x1
                setmaptile 0xF 0x1 0x31F 0x1
                setmaptile 0x10 0x1 0x28C 0x1
                setmaptile 0x11 0x1 0x2EF 0x1
                setmaptile 0x12 0x1 0x31F 0x1
                sound 0x8
                special 0x8E
                checksound
                moveoffscreen 0x1
                setvar 0x5064 0x64
                releaseall
                end

                '---------------
                #org 0x80271D
                releaseall
                end


                The movement of some blocks doesn't apply correctly.

                As you can see there are 10 blocks witch C movement flag (you can pass). but ingame i'st like having 01 (you can't pass).

                Coords are corrects, i have checked them 2 times. I don't know whats going on.

                Quote:
                Originally Posted by FRANKTANK View Post
                I went to edit the script for the Mt. Moon Helix Fossil in FireRed to change "HELIX FOSSIL" to "Helix Fossil" but when I try to compile it, a message pops up saying "Error 13 'Type mismatch' on line 12. Missing #define or parameter. Line: giveitem2 0x165 0x1 0x13E" and it won't let me compile the script. Any way to fix this?
                Seems that you didn't extracted all files from XSE ZIP. there are some .rbh files that need to be in the same dir of XSE.exe

                Check it.
                  #7458    
                Old November 28th, 2012 (3:33 AM).
                DrFuji's Avatar
                DrFuji DrFuji is offline
                Heiki Hecchara‌‌
                • Crystal Tier
                 
                Join Date: Sep 2009
                Location: Downia-upside
                Age: 24
                Gender: Male
                Nature: Jolly
                Posts: 1,328
                Quote:
                Originally Posted by KyX View Post
                Hi, i have a problem with a SetMapTile Script.

                Spoiler:

                '---------------
                #org 0x80263C
                lockall
                compare 0x5064 0x64
                if 0x1 goto 0x880271D
                setmaptile 0xD 0x3 0x315 0x1
                setmaptile 0xE 0x3 0x310 0xC
                setmaptile 0xF 0x3 0x311 0xC
                setmaptile 0x10 0x3 0x312 0xC
                setmaptile 0x11 0x3 0x313 0xC
                setmaptile 0x12 0x3 0x314 0xC
                setmaptile 0x13 0x3 0x31D 0x1

                setmaptile 0xE 0x4 0x318 0xC
                setmaptile 0xF 0x4 0x319 0xC
                setmaptile 0x10 0x4 0x31A 0xC
                setmaptile 0x11 0x4 0x31B 0xC
                setmaptile 0x12 0x4 0x31C 0xC

                setmaptile 0xE 0x2 0x2EF 0x1
                setmaptile 0xF 0x2 0x31F 0x1
                setmaptile 0x10 0x2 0x294 0x1
                setmaptile 0x11 0x2 0x2EE 0x1
                setmaptile 0x12 0x2 0x31F 0x1

                setmaptile 0xE 0x1 0x299 0x1
                setmaptile 0xF 0x1 0x31F 0x1
                setmaptile 0x10 0x1 0x28C 0x1
                setmaptile 0x11 0x1 0x2EF 0x1
                setmaptile 0x12 0x1 0x31F 0x1
                sound 0x8
                special 0x8E
                checksound
                moveoffscreen 0x1
                setvar 0x5064 0x64
                releaseall
                end

                '---------------
                #org 0x80271D
                releaseall
                end


                The movement of some blocks doesn't apply correctly.

                As you can see there are 10 blocks witch C movement flag (you can pass). but ingame i'st like having 01 (you can't pass).

                Coords are corrects, i have checked them 2 times. I don't know whats going on.
                The movement permission in the setmaptile command only has two settings: passable and impassable. Unfortunately it doesn't sync up with Advance Map's movement permissions because setting it to anything but 0x0 will prevent you from walking on it. So to have your tiles function they way you want them to, just change your 0xC values to 0x0.
                __________________
                  #7459    
                Old December 1st, 2012 (3:50 PM).
                DVK's Avatar
                DVK DVK is offline
                Hack based-God
                   
                  Join Date: Jan 2011
                  Location: New Zealand
                  Age: 25
                  Gender: Male
                  Nature: Hasty
                  Posts: 146
                  Okay. So I have a simple give pokemon script in which a person is standing in the pokemon centre blocking the way to nurse joy. Once the script ends he moves out of the way and goes and sits down on the cushion. The problem is I don't know how to make the sprite stay there permanently after the script has finished. Any help would be great.
                  __________________
                  Completed Challenges!


                    #7460    
                  Old December 2nd, 2012 (1:22 AM).
                  Satoshi Ookami's Avatar
                  Satoshi Ookami Satoshi Ookami is offline
                  Memento Mori
                  • Gold Tier
                   
                  Join Date: Jul 2008
                  Location: Abyss of Time, Great Seal
                  Age: 25
                  Gender: Male
                  Nature: Calm
                  Posts: 14,497
                  Quote:
                  Originally Posted by DVK View Post
                  Okay. So I have a simple give pokemon script in which a person is standing in the pokemon centre blocking the way to nurse joy. Once the script ends he moves out of the way and goes and sits down on the cushion. The problem is I don't know how to make the sprite stay there permanently after the script has finished. Any help would be great.
                  Have 2 OWs. One that will block the entrance and another that will be placed on a cushion.
                  The one that will be standing on a cushion will some set flag in its ID and the blocking one will have this in its script:
                  clearflag 0x(flag of the cushion OW)
                  setflag 0x(flag of the blocking OW)
                  That will remove the blocking OW and make the cushion OW appear.
                  __________________
                  ROM hacking FAQ - Read before asking how to play a hack.

                  Anime List | PSN Trophy List
                    #7461    
                  Old December 4th, 2012 (8:42 AM). Edited December 4th, 2012 by DrFuji.
                  LugiaMZ's Avatar
                  LugiaMZ LugiaMZ is offline
                     
                    Join Date: Dec 2011
                    Gender: Male
                    Posts: 74
                    Hello everyone! I having two question of my script...

                    Have someone know how to checkpokemon like checkitem, checkpcitem, etc...
                    Here is my example script that I need to make a script to check player is caught Bulbasaur or not.
                    Example script:
                    #dynamic 0x800000
                    #org @example
                    lock
                    faceplayer
                    checkflag 0x828
                    if 0x1 goto @thanks
                    msgbox @help 0x6
                    wildbattle 0x1 0x8 0x0
                    (somethings check if player caught the Bulbasaur goto @caught, if uncaught goto
                    @uncaught)
                    end
                    #org @caught
                    msgbox @caught2 0x6
                    giveitem 0x1 0x1 MSG_OBTAIN
                    msgbox @good 0x6
                    release
                    end
                    #org @uncaught
                    msgbox @uncaught2 0x6
                    giveitem 0x2 0x1 MSG_OBTAIN
                    msgbox @good 0x6
                    release
                    end
                    #org @thanks
                    msgbox @how 0x6
                    release
                    end
                    #org @help
                    = Trainer! Please help me!\p The Bulbasaur attacking me!\nPlease defeat it!
                    #org @caught2
                    = Oh thanks you...\pWow you catched it!\nGood Job dude!\lThis is your prize,\ltake it!
                    #org @uncaught2
                    = Oh thanks you...\pThis is your prize,\ntake it!
                    #org @good
                    = Good luck, dude!
                    #org @how
                    = How are you, [player]?

                    Have everyone know how to do it?

                    Other question, this script is making for DNS Day,Night and Season tools, I want to check week of day, but failed, can someone tell me why?
                    For Example:
                    #dynamic 0x800000
                    #org @dif
                    lock
                    faceplayer
                    comparefarbytetobyte 0x03005540 0x0
                    if 0x1 goto @sunday
                    comparefarbytetobyte 0x03005540 0x1
                    if 0x1 goto @monday
                    comparefarbytetobyte 0x03005540 0x2
                    if 0x1 goto @tuesday
                    comparefarbytetobyte 0x03005540 0x3
                    if 0x1 goto @wednesday
                    comparefarbytetobyte 0x03005540 0x4
                    if 0x1 goto @thursday
                    comparefarbytetobyte 0x03005540 0x5
                    if 0x1 goto @friday
                    comparefarbytetobyte 0x03005540 0x6
                    if 0x1 goto @saturday
                    release
                    end
                    #org @sunday
                    msgbox @sun 0x6
                    end
                    #org @monday
                    msgbox @mon 0x6
                    end
                    #org @tuesday
                    msgbox @tues 0x6
                    end
                    #org @wednesday
                    msgbox @wed 0x6
                    end
                    #org @thursday
                    msgbox @thurs 0x6
                    end
                    #org @friday
                    msgbox @fri 0x6
                    end
                    #org @saturday
                    msgbox @sat 0x6
                    end
                    #org @sun
                    = Today is Sunday.
                    #org @mon
                    = Today is Monday.
                    #org @tues
                    = Today is Tuesday.
                    #org @wed
                    = Today is Wednesday.
                    #org @thurs
                    = Today is Thursday.
                    #org @fri
                    = Today is Friday.
                    #org @sat
                    = Today is Saturday.

                    Answer me please... ><

                    PS: Sorry for my bad english... Thanks. :)
                      #7462    
                    Old December 4th, 2012 (2:30 PM).
                    Herpahermaderp's Avatar
                    Herpahermaderp Herpahermaderp is offline
                    I liek Mudkipz
                       
                      Join Date: Jul 2012
                      Location: USA
                      Age: 19
                      Gender: Male
                      Nature: Relaxed
                      Posts: 66
                      Quote:
                      Originally Posted by LugiaMZ View Post
                      Hello everyone! I having two question of my script...

                      Have someone know how to checkpokemon like checkitem, checkpcitem, etc...
                      Here is my example script that I need to make a script to check player is caught Bulbasaur or not.
                      Example script:
                      #dynamic 0x800000
                      #org @example
                      lock
                      faceplayer
                      checkflag 0x828
                      if 0x1 goto @thanks
                      msgbox @help 0x6
                      wildbattle 0x1 0x8 0x0
                      (somethings check if player caught the Bulbasaur goto @caught, if uncaught goto
                      @uncaught)
                      end
                      #org @caught
                      msgbox @caught2 0x6
                      giveitem 0x1 0x1 MSG_OBTAIN
                      msgbox @good 0x6
                      release
                      end
                      #org @uncaught
                      msgbox @uncaught2 0x6
                      giveitem 0x2 0x1 MSG_OBTAIN
                      msgbox @good 0x6
                      release
                      end
                      #org @thanks
                      msgbox @how 0x6
                      release
                      end
                      #org @help
                      = Trainer! Please help me!\p The Bulbasaur attacking me!\nPlease defeat it!
                      #org @caught2
                      = Oh thanks you...\pWow you catched it!\nGood Job dude!\lThis is your prize,\ltake it!
                      #org @uncaught2
                      = Oh thanks you...\pThis is your prize,\ntake it!
                      #org @good
                      = Good luck, dude!
                      #org @how
                      = How are you, [player]?

                      Have everyone know how to do it?

                      Other question, this script is making for DNS Day,Night and Season tools, I want to check week of day, but failed, can someone tell me why?
                      For Example:
                      #dynamic 0x800000
                      #org @dif
                      lock
                      faceplayer
                      comparefarbytetobyte 0x03005540 0x0
                      if 0x1 goto @sunday
                      comparefarbytetobyte 0x03005540 0x1
                      if 0x1 goto @monday
                      comparefarbytetobyte 0x03005540 0x2
                      if 0x1 goto @tuesday
                      comparefarbytetobyte 0x03005540 0x3
                      if 0x1 goto @wednesday
                      comparefarbytetobyte 0x03005540 0x4
                      if 0x1 goto @thursday
                      comparefarbytetobyte 0x03005540 0x5
                      if 0x1 goto @friday
                      comparefarbytetobyte 0x03005540 0x6
                      if 0x1 goto @saturday
                      release
                      end
                      #org @sunday
                      msgbox @sun 0x6
                      end
                      #org @monday
                      msgbox @mon 0x6
                      end
                      #org @tuesday
                      msgbox @tues 0x6
                      end
                      #org @wednesday
                      msgbox @wed 0x6
                      end
                      #org @thursday
                      msgbox @thurs 0x6
                      end
                      #org @friday
                      msgbox @fri 0x6
                      end
                      #org @saturday
                      msgbox @sat 0x6
                      end
                      #org @sun
                      = Today is Sunday.
                      #org @mon
                      = Today is Monday.
                      #org @tues
                      = Today is Tuesday.
                      #org @wed
                      = Today is Wednesday.
                      #org @thurs
                      = Today is Thursday.
                      #org @fri
                      = Today is Friday.
                      #org @sat
                      = Today is Saturday.

                      Answer me please... ><

                      PS: Sorry for my bad english... Thanks.
                      Ok, for the Bulbasaur thing, you have to use this bit of code there:
                      setvar 0x8004 0x1 special2 0x800D 0x17C compare 0x800D 0x0
                      if 0x1 goto @(pointer for uncaught)
                      compare 0x800D 0x1
                      if 0x1 goto @(pointer for caught)
                      __________________
                      Y: Roak || 1177-8023-4387
                        #7463    
                      Old December 4th, 2012 (3:24 PM). Edited December 4th, 2012 by RedDog.
                      RedDog RedDog is offline
                         
                        Join Date: Jun 2012
                        Gender: Male
                        Posts: 6
                        GAME: Pokémon Ruby
                        SCRIPT EDITOR: Pokéscript OR XSE
                        TYPE: Time script / Set time script

                        Hey everyone, I would like to know if there is a command to check the time in R/S/E. Say, you want something to happen but only from 12 PM to 3 PM, and the command will check the time before executing. Also, I cannot seem to get a working set clock script in the first place, but if there isn't any way to check the time in a script, then i wont bother with it. Here is the Set time script i wrote (It's in pokescript, i am just beginning with XSE) :

                        Spoiler:
                        #org $time
                        message $askt
                        checkflag 0x1230
                        if 0x01 goto $checktime
                        $askt 1 = Would you like to set the time?
                        boxset 5
                        compare 0x800D 0x1
                        if 0x1 goto $entertime
                        release
                        end

                        #org $checktime
                        fadescreen 1
                        special 0x9A
                        release
                        end

                        #org $entertime
                        fadescreen 1
                        special 0x9A
                        waitstate
                        setflag 0x1230
                        return


                        I get this:
                        i1291.photobucket.com/albums/b543/RedDogHacks/Pokemonerror.png

                        Once i've returned to the room from this screen, I am unable to move and the music glitches out.
                        Any help or information appreciated!

                        EDIT: one more random thing
                        Is there any way to stop the "Save file corrupt" message? It's never said that before, but now it's starting to.
                          #7464    
                        Old December 4th, 2012 (4:50 PM).
                        DarkFire7777 DarkFire7777 is offline
                           
                          Join Date: Dec 2012
                          Gender: Male
                          Posts: 5
                          I'm trying to write a script in which a man will say "statement 1", give an item (in this case a Soothe Bell), and say "statement 2", but I followed the tutorials and got this. The man just straight off gives the Soothe Bell without saying Stmt 1 directly before and Stmt 2 directly after (though he does say Stmt 2 if you talk to him again).

                          SCRIPT (XSE):

                          #dynamic 0x800000
                          #org @start
                          lock
                          faceplayer
                          checkflag 0x201
                          if 0x1 goto @nomore
                          msgbox @talk1 0x6
                          giveitem 0xB8 0x1 0x0
                          setflag 0x201
                          release
                          end
                          #org @nomore
                          msgbox @talk2 0x6
                          callstd 0x2
                          release
                          end
                          #org @talk1
                          = Hey, you're my first visitor! I'm\nso happy. Here, please take this\litem as a reward. I don't really\lhave any use for it.
                          #org @talk2
                          = The Soothe Bell raises a pokemon's\nhappiness. Some pokemon will even\levolve when they max their\lhappiness towards you.

                          Please help out if you can find any errors. I'm a total noob at this.
                            #7465    
                          Old December 5th, 2012 (1:17 AM).
                          Satoshi Ookami's Avatar
                          Satoshi Ookami Satoshi Ookami is offline
                          Memento Mori
                          • Gold Tier
                           
                          Join Date: Jul 2008
                          Location: Abyss of Time, Great Seal
                          Age: 25
                          Gender: Male
                          Nature: Calm
                          Posts: 14,497
                          @DF7777: You might have outdated version of XSE, if it's not 1.1.1, then you should update, if yes, then try to add callstd 0x6 instead of 0x6 after the messagebox 1.
                          __________________
                          ROM hacking FAQ - Read before asking how to play a hack.

                          Anime List | PSN Trophy List
                            #7466    
                          Old December 5th, 2012 (6:05 AM).
                          Herpahermaderp's Avatar
                          Herpahermaderp Herpahermaderp is offline
                          I liek Mudkipz
                             
                            Join Date: Jul 2012
                            Location: USA
                            Age: 19
                            Gender: Male
                            Nature: Relaxed
                            Posts: 66
                            Quote:
                            Originally Posted by DarkFire7777 View Post
                            I'm trying to write a script in which a man will say "statement 1", give an item (in this case a Soothe Bell), and say "statement 2", but I followed the tutorials and got this. The man just straight off gives the Soothe Bell without saying Stmt 1 directly before and Stmt 2 directly after (though he does say Stmt 2 if you talk to him again).

                            SCRIPT (XSE):

                            #dynamic 0x800000
                            #org @start
                            lock
                            faceplayer
                            checkflag 0x201
                            if 0x1 goto @nomore
                            msgbox @talk1 0x6
                            giveitem 0xB8 0x1 0x0
                            setflag 0x201
                            release
                            end
                            #org @nomore
                            msgbox @talk2 0x6
                            callstd 0x2
                            release
                            end
                            #org @talk1
                            = Hey, you're my first visitor! I'm\nso happy. Here, please take this\litem as a reward. I don't really\lhave any use for it.
                            #org @talk2
                            = The Soothe Bell raises a pokemon's\nhappiness. Some pokemon will even\levolve when they max their\lhappiness towards you.

                            Please help out if you can find any errors. I'm a total noob at this.
                            You should try using a flag greater than 1000, 201 is a flag currently being used by the game and may cause glitches in it. That's why people have XSE tutorials on PC.
                            __________________
                            Y: Roak || 1177-8023-4387
                              #7467    
                            Old December 5th, 2012 (6:20 AM).
                            tajaros's Avatar
                            tajaros tajaros is offline
                            Hi I'm dawg
                               
                              Join Date: Apr 2012
                              Location: Philippines
                              Age: 18
                              Gender: Male
                              Nature: Timid
                              Posts: 857
                              Quote:
                              Originally Posted by Herpahermaderp View Post
                              You should try using a flag greater than 1000, 201 is a flag currently being used by the game and may cause glitches in it. That's why people have XSE tutorials on PC.
                              Actually using flag beyond 0x900 is not a great Idea just use Jpan's engine so you can safely use flags 1-2FF.

                              Also why do you need Callstd 0x2? just remove it and changed that flag maybe to 200 and you are good. :)
                              __________________
                                #7468    
                              Old December 6th, 2012 (2:29 PM).
                              SeoCypher SeoCypher is offline
                                 
                                Join Date: Apr 2012
                                Posts: 4
                                Quote:
                                Originally Posted by Jambo51 View Post
                                There are other ways to define class related battle music, which are less flexible, but are guaranteed to work.
                                First of all, thank you so much for your help.
                                Second,
                                What are these other, less flexible methods? I want to change musics for specific custom Trainer Classes, so it's less about areas and more about one time changes.
                                  #7469    
                                Old December 6th, 2012 (4:50 PM).
                                DarkFire7777 DarkFire7777 is offline
                                   
                                  Join Date: Dec 2012
                                  Gender: Male
                                  Posts: 5
                                  Quote:
                                  You should try using a flag greater than 1000, 201 is a flag currently being used by the game and may cause glitches in it. That's why people have XSE tutorials on PC.
                                  Changed the event to 1001, but now the guy won't give the item even though he says statement1.

                                  Now I feel really stupid.

                                  Quote:
                                  #dynamic 0x800000
                                  #org @start
                                  lock
                                  faceplayer
                                  checkflag 0x900
                                  if 0x1 goto @nomore
                                  msgbox @talk1 0x6
                                  callstd 0x4
                                  release
                                  end
                                  #org @nomore
                                  msgbox @talk2 0x6
                                  callstd 0x4
                                  release
                                  end
                                  #org @talk1
                                  = Hey, you're my first visitor! I'm\nso happy. Here, please take this\litem as a reward. I don't really\lhave any use for it.
                                  callstd 0x4
                                  giveitem 0xB8 0x1 0x0
                                  compare LASTRESULT 0x0
                                  if 0x1 goto @bagfull
                                  goto @talk2
                                  callstd 0x4
                                  setflag 0x900
                                  release
                                  end
                                  #org @talk2
                                  = The Soothe Bell raises a pokemon's\nhappiness. Some pokemon will even\levolve when they max their\lhappiness towards you.
                                  #org @bagfull
                                  = Too Bad!\nThe BAG is full.
                                    #7470    
                                  Old December 7th, 2012 (2:22 PM).
                                  tajaros's Avatar
                                  tajaros tajaros is offline
                                  Hi I'm dawg
                                     
                                    Join Date: Apr 2012
                                    Location: Philippines
                                    Age: 18
                                    Gender: Male
                                    Nature: Timid
                                    Posts: 857
                                    Quote:
                                    Originally Posted by DarkFire7777 View Post
                                    Changed the event to 1001, but now the guy won't give the item even though he says statement1.

                                    Now I feel really stupid.
                                    Didn't you read my post? Anyways I'll just fix your script.

                                    Quote:
                                    #dynamic 0x800000

                                    #org @start
                                    lock
                                    faceplayer
                                    checkflag 0x200
                                    if 0x1 goto @done
                                    msgbox @hey 0x6
                                    checkitemroom 0xB8 0x0
                                    compare 0x800D 0x0
                                    if 0x1 goto @full
                                    giveitem 0xB8 0x1 0x0
                                    setflag 0x200
                                    release
                                    end

                                    #org @done
                                    msgbox @func 0x6
                                    release
                                    end

                                    #org @full
                                    msgbox @fullbag 0x6
                                    release
                                    end

                                    #org @hey
                                    = Hey, you're my first visitor!\pI'm so happy.\pHere, please take this item as a\nreward.\pI don't really have any use for\nit.

                                    #org @func
                                    = The Soothe Bell raises a Pokémon's\nHappiness.\pSome Pokémon will even evolve when\nthey max their happiness towards\lyou.

                                    #org @fullbag
                                    = Too Bad!\pYour BAG is full.
                                    This script works perfectly the problems in your script are what's with callstd? You don't really need that. Also Why have a decision script without the checkitemroom command? Oh and the third statement doesn't have a pointer.

                                    Hope this helps... :3
                                    __________________
                                      #7471    
                                    Old December 7th, 2012 (5:38 PM).
                                    DarkFire7777 DarkFire7777 is offline
                                       
                                      Join Date: Dec 2012
                                      Gender: Male
                                      Posts: 5
                                      Quote:
                                      Originally Posted by tajaros View Post
                                      Didn't you read my post? Anyways I'll just fix your script.



                                      This script works perfectly the problems in your script are what's with callstd? You don't really need that. Also Why have a decision script without the checkitemroom command? Oh and the third statement doesn't have a pointer.

                                      Hope this helps... :3
                                      Thanks a lot, it worked. Except XSE didn't recognize "checkitemroom", probably only because I'm not using PokéScript
                                        #7472    
                                      Old December 7th, 2012 (9:23 PM).
                                      tajaros's Avatar
                                      tajaros tajaros is offline
                                      Hi I'm dawg
                                         
                                        Join Date: Apr 2012
                                        Location: Philippines
                                        Age: 18
                                        Gender: Male
                                        Nature: Timid
                                        Posts: 857
                                        Quote:
                                        Originally Posted by DarkFire7777 View Post
                                        Thanks a lot, it worked. Except XSE didn't recognize "checkitemroom", probably only because I'm not using PokéScript :P
                                        ???

                                        CheckItemRoom works with my XSE... :/ Maybe you are using RBH files or something else... xD
                                        __________________
                                          #7473    
                                        Old December 9th, 2012 (9:47 AM).
                                        LugiaMZ's Avatar
                                        LugiaMZ LugiaMZ is offline
                                           
                                          Join Date: Dec 2011
                                          Gender: Male
                                          Posts: 74
                                          Quote:
                                          Originally Posted by Herpahermaderp View Post
                                          Ok, for the Bulbasaur thing, you have to use this bit of code there:
                                          setvar 0x8004 0x1 special2 0x800D 0x17C compare 0x800D 0x0
                                          if 0x1 goto @(pointer for uncaught)
                                          compare 0x800D 0x1
                                          if 0x1 goto @(pointer for caught)
                                          If player party is full, and he/she caught the Bulbasaur, the Bulbasaur transfer to PC box, It will work too? If doesn't work, having other script to check it? Thanks.

                                          P.S. Sorry for my bad english.
                                            #7474    
                                          Old December 10th, 2012 (9:12 AM).
                                          TrjanFaic's Avatar
                                          TrjanFaic TrjanFaic is offline
                                             
                                            Join Date: Dec 2012
                                            Location: Under the rainbow, racking some leprechauns.
                                            Gender: Male
                                            Posts: 6
                                            Hai, i have a problem, I made a quick script for my NPC i made, and it does something odd whenever i go up and talk to him.
                                            What happens is, it either freezes the screen. turns the screen white, or turns the screen red, here is the script:
                                            #org $script
                                            lock
                                            faceplayer
                                            message $example
                                            $example 1 =Hello there!
                                            boxset 6
                                            release
                                            end
                                            __________________
                                            TrojanFaic, spelled wrong.
                                            Hunger games fan, pokemon fan, and all the sorts, even a....
                                            PURPLE BACON FAN!!!
                                              #7475    
                                            Old December 10th, 2012 (7:16 PM).
                                            itman itman is offline
                                            Back to ROM hacking. :D
                                               
                                              Join Date: May 2007
                                              Age: 23
                                              Nature: Adamant
                                              Posts: 100
                                              Quote:
                                              Originally Posted by TrjanFaic View Post
                                              Hai, i have a problem, I made a quick script for my NPC i made, and it does something odd whenever i go up and talk to him.
                                              What happens is, it either freezes the screen. turns the screen white, or turns the screen red, here is the script:
                                              #org $script
                                              lock
                                              faceplayer
                                              message $example
                                              $example 1 =Hello there!
                                              boxset 6
                                              release
                                              end
                                              (I assume you're using pokescript due to the use of '$', so I wrote this assuming it's for pokescript)

                                              #org $script
                                              lock
                                              faceplayer
                                              message $example
                                              boxset 6
                                              release
                                              end

                                              #org $example
                                              = Hello there!
                                              Closed Thread

                                              Quick Reply

                                              Join the conversation!

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

                                              Create a PokéCommunity Account

                                              Sponsored Links
                                              Thread Tools

                                              Posting Rules
                                              You may not post new threads
                                              You may not post replies
                                              You may not post attachments
                                              You may not edit your posts

                                              BB code is On
                                              Smilies are On
                                              [IMG] code is On
                                              HTML code is Off

                                              Forum Jump


                                              All times are GMT -8. The time now is 11:09 PM.