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
  #3926    
Old May 24th, 2010 (4:54 PM).
0m3GA ARS3NAL's Avatar
0m3GA ARS3NAL 0m3GA ARS3NAL is offline
Im comin' home...
  • Silver Tier
 
Join Date: Jan 2008
Location: Superjail Penitentiary
Age: 24
Gender: Male
Nature: Gentle
Posts: 1,812
Quote:
Originally Posted by PwnageMew View Post
Can someone post the item codes for pokemon ruby? I'm trying to make a hack, and I need the script. (For more information on this hack, see some posts by HackDeoxys)
All of that information comes with XSE
(Just open XSE, and open up the file that comes with it stditems.rbh)
__________________
>Boot Jailbot
>Pass *****
.
.
Jailbot OS Ver 1.1.2
Greetings Warden
of Superjail Penitentiary
Awaiting user input...

>Display User_Info
╠══User Info══╣
Username:
0m3GA ARS3NAL
Age: 18
Sex: Male ♂
Race: Caucasian
Quote:
"What is this
I don't even..."

M/O: Often acts out to get attention, but recently has changed that. Has been studying up on hacking information and hopes to participate in more advanced hacking discussion.
╠══End of File══╣
Awaiting user input...

>

Relevant Advertising!

  #3927    
Old May 24th, 2010 (5:18 PM).
TheChroniclesofLance's Avatar
TheChroniclesofLance TheChroniclesofLance is offline
     
    Join Date: Apr 2010
    Gender: Male
    Posts: 114
    Quote:
    Originally Posted by Nikolai Fox View Post
    Quite simple really.

    1. Put the three Pokéballs wherever you want (they are person events, and show up after all the people sprites)
    2. Have a give Pokémon script for each of them.
    3. At the end of each give Pokémon script, set one flag that is the same for all three Pokémon.

    Have at the start of those three scripts:
    checkflag 0xY (y = whatever flag you want to set)
    if 0x1 goto @aftergot

    #org @aftergot
    msgbox @youalreadyhave

    #org @youalreadyhave
    = You already picked a Pokémon.

    4. Have at the END of each script:
    setflag 0xY (same y as above)
    setflag 0xZ (z needs to be three seperate flags, and this flag has to have the same "person ID" as the pokéball you want to dissapear after picking it up).

    Hope that's clear enough for ya. If not PM me or post here again.
    here's the givepokemon script in the scripting thing I use (PSKV) I know what I want to add, which includes a "do you want this pokemon Y/N" type thing, and a pokepic.
    Spoiler:

    #dyn 0x740016
    #org @start
    lock
    checkflag 0x207
    if 0x1 jump :end
    setflag FR_POKEMON
    countpokemon
    compare LASTRESULT 6
    if == jump @noroom
    addpokemon MUDKIP 0x5 NONE 0 0 0
    setflag 0x207
    storepokemon 0 MUDKIP
    message @get-msg
    fanfare 0x101
    showmsg
    waitfanfare
    waitbutton
    :end
    release
    end
    #org @noroom
    msgbox @noroom-msg
    callstd MSG_NOCLOSE
    release
    end
    #org @noroom-msg
    = You don't have enough room in your party.
    #org @get-msg
    = You got a \v\h02!


    would I be able to use this?
    Spoiler:
    #org 0x87401D4
    '-----------------------------------
    lock
    faceplayer
    setvar 0x4001 0x0
    setvar 0x4002 0x11B
    setvar 0x4003 0x98
    setvar 0x4004 0x7
    compare 0x4055 0x3
    if >= jump 0x8169DE4 ' Larger Than or Equal To
    compare 0x4055 0x2
    if == jump 0x8169BE1 ' Equal To
    msgbox 0x818EA19 ' Those are POK\e BALL...
    callstd MSG_NOCLOSE ' Non-closing message
    release
    ' Release commands close any open messages
    end
    #org 0x8169DE4
    '-----------------------------------
    msgbox 0x818EA45 ' That's PROF. OAK's l...
    callstd MSG_NOCLOSE ' Non-closing message
    release
    ' Release commands close any open messages
    end
    #org 0x8169BE1
    '-----------------------------------
    applymovement 0x4 0x81A75EF ' look_right end
    pauseevent 0x0
    showpokepic 0x4002 0xA 0x3
    textcolor BLUE
    compare 0x4001 0x0
    if == jump 0x8169C14 ' Equal To
    compare 0x4001 0x1
    if == jump 0x8169C33 ' Equal To
    compare 0x4001 0x2
    if == jump 0x8169C52 ' Equal To
    end
    #org 0x8169C14
    '-----------------------------------
    msgbox 0x818E272 ' I see! \pSo, \v\h01,...
    callstd MSG_YESNO ' Yes/No message
    compare LASTRESULT YES
    if == jump 0x8169C74 ' Equal To
    compare LASTRESULT 0x0
    if == jump 0x8169C71 ' Equal To
    end
    #org 0x8169C74
    '-----------------------------------
    hidepokepic
    disappear LASTTALKED
    msgbox 0x818E2E5 ' This POK\eMON is rea...
    callstd MSG_NOCLOSE ' Non-closing message
    call 0x81A6675
    setflag FR_POKEMON
    setflag 0x291
    addpokemon 0x4002 5 ORANBERRY 0x0 0x0 0x0
    copyvar 0x4031 0x4001
    storepokemon 0x0 0x4002
    message 0x818E30D ' \v\h01 received the ...
    showmsg
    fanfare 0x13E
    waitfanfare
    msgbox 0x81A56A7 ' Do you want to give ...
    callstd MSG_YESNO ' Yes/No message
    compare LASTRESULT YES
    if == jump 0x8169CCC ' Equal To
    compare LASTRESULT 0x0
    if == jump 0x8169CDC ' Equal To
    end
    #org 0x81A6675
    '-----------------------------------
    copyvar 0x8012 0x8013
    return
    #org 0x8169C33
    '-----------------------------------
    msgbox 0x871C88C ' Hm! \pSo, \v\h01, yo...
    callstd MSG_YESNO ' Yes/No message
    compare LASTRESULT YES
    if == jump 0x8169C74 ' Equal To
    compare LASTRESULT 0x0
    if == jump 0x8169C71 ' Equal To
    end
    #org 0x8169C71
    '-----------------------------------
    hidepokepic
    release
    end
    #org 0x8169C52
    '-----------------------------------
    msgbox 0x818E194 ' Ah!\pSo, \v\h01, you...
    callstd MSG_YESNO ' Yes/No message
    compare LASTRESULT YES
    if == jump 0x8169C74 ' Equal To
    compare LASTRESULT 0x0
    if == jump 0x8169C71 ' Equal To
    end
    #org 0x8169CCC
    '-----------------------------------
    setvar 0x8004 0x0
    call 0x81A74EB
    jump 0x8169CDC
    #org 0x81A74EB
    '-----------------------------------
    fadescreen FADEOUT_BLACK
    special NAME_POKEMON
    waitspecial
    return
    #org 0x8169CDC
    '-----------------------------------
    closemsg
    compare 0x4001 0x0
    if == jump 0x8169CFF ' Equal To
    compare 0x4001 0x1
    if == jump 0x8169D1F ' Equal To
    compare 0x4001 0x2
    if == jump 0x8169D0F ' Equal To
    end
    #org 0x8169CFF
    '-----------------------------------
    applymovement 0x8 0x8169D62 ' walk_down walk_down ...
    pauseevent 0x0
    jump 0x8169D2F
    #org 0x8169D2F
    '-----------------------------------
    textcolor BLUE
    msgbox 0x818DD34 ' \v\h06: I'll take th...
    callstd MSG_NOCLOSE ' Non-closing message
    disappear 0x4004
    textcolor GRAY
    storepokemon 0x0 0x4003
    message 0x818DD52 ' \v\h06 received the ...
    showmsg
    fanfare 0x13E
    waitfanfare
    setvar 0x4055 0x3
    checkflag 0x83E
    if true call 0x8169D5C ' Flag is set
    release
    end
    #org 0x8169D5C
    '-----------------------------------
    setvar 0x4070 0x1
    return
    #org 0x8169D1F
    '-----------------------------------
    applymovement 0x8 0x8169D72 ' walk_down walk_right...
    pauseevent 0x0
    jump 0x8169D2F
    #org 0x8169D0F
    '-----------------------------------
    applymovement 0x8 0x8169D6B ' walk_down walk_right...
    pauseevent 0x0
    jump 0x8169D2F

    #org 0x818EA45
    = You can only rescue one.
    #org 0x818E272
    = So, \v\h01, you want to rescue\nthe ARTITUCAN?
    #org 0x818E2E5
    = This POK\eMON is really quite\nenergetic!
    #org 0x818E30D
    = \v\h01 received the \v\h02\nfrom PROF. OAK!
    #org 0x81A56A7
    = Do you want to give a nickname to\nthis \v\h02?
    #org 0x871C88C
    = So, \v\h01, you want to rescue the\nAMPIDGEY?
    #org 0x818E194
    = So, \v\h01, you want to rescue the\nMOLTUCAN?
    __________________
    http://www.pokecommunity.com/showthread.php?t=220574
    My Main Hack: Pokemon: World Tour



      #3928    
    Old May 24th, 2010 (5:34 PM). Edited May 24th, 2010 by Metroid Die.
    Metroid Die Metroid Die is offline
       
      Join Date: Mar 2009
      Posts: 54
      Hey guys,

      Really nooby question here but...

      My Hidesprite command doesn't work. The sprite vanishes, then as soon as I walk in a direction it reappears. Here's the script if anyone could help me out.

      Spoiler:
      #dynamic 0x8033A1

      #org @start
      checkflag 0x828
      if 0x1 goto @end
      showpokepic 0x4 0x3 0x3
      msgbox @char 0x5
      compare 0x800D 0x1
      if 0x0 goto @end
      givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
      fanfare 0x13E
      msgbox @rec 0x4
      waitfanfare
      closeonkeypress
      msgbox @nick 0x5
      compare 0x800D 0x1
      if 0x1 gosub @name
      hidesprite 0x08
      hidepokepic
      closeonkeypress
      setflag 0x828
      end

      #org @char
      = Redwood: So you choose the\nCharmander then? A worthy choice\lfor a worthy trainer!

      #org @end
      closeonkeypress
      hidepokepic
      end

      #org @rec
      = [player] received the Charmander!

      #org @name
      call 0x1A74EB
      return

      #org @nick
      = Would you like to give a\nnickname to Charmander?



      Thanks in advance for any help.
        #3929    
      Old May 24th, 2010 (6:55 PM).
      Gaige Gaige is offline
         
        Join Date: May 2010
        Gender: Male
        Posts: 2
        Hello im new to rom hacking and i cant figure this out... i cant figure out how movement scripts work... i cant understand the coding to movement scripts, and i dont now how to put it on advance map, cuz i thought you need a person and a script event... can someone help me figure out how this movement script coding works? i watch tons of tutorials on it and i still cant understand how it all works, and yes call me a noob lol, im just hoping someone can tell me how to understand everything about movement scripting and also putting it on Am, oh and just to let you know, my scripting type is pksv-ui, i would do pokescript but whenever i try to install pkmadv it just has this pop up: "run time error '429': activeX component can't create object" can someone also help me with that? cuz i saw a tutorial on youtube on movement scripts on pokescript and i understand that, but i cant get pokescript to work... so if anyone can help me with anyone of these that would be great! thanks, and idk if i can find this forum and my comment again so if you can, plz pm me how, if not, ill just try to find this, anyway thanks again
          #3930    
        Old May 24th, 2010 (9:35 PM). Edited May 24th, 2010 by dizzyKitty.
        dizzyKitty's Avatar
        dizzyKitty dizzyKitty is offline
        The Confuzzled Coding Cat
           
          Join Date: May 2010
          Location: Virginia
          Age: 26
          Gender: Female
          Nature: Bold
          Posts: 16
          Send a message via AIM to dizzyKitty Send a message via Windows Live Messenger to dizzyKitty Send a message via Yahoo to dizzyKitty
          Mmk guys. I'm trying to take this movement script I'm working on one step at a time using PKSV. Seems like there are multiple ways of coding this with different programs (I suppose it all depends on the compiler you're using, whether you input raws or score_under's shortcuts like the one I have here, say_!) and it's confuzzling my already confuzzled brain.

          First thing's first. Exclamation point over the player's head. Simple? Yes. Making sense to me? Nope. At least, not my result. Here's what I have:

          Spoiler:
          #dynamic 0x88002BC
          '-----------------------------------
          #org @start
          lockall
          checkflag 0x1003
          if true jump :end
          applymovement PLAYER @exc
          pauseevent 0x0
          setflag 0x1003
          :end
          releaseall
          end

          #org @exc
          m say_! end

          It dumps the following code back out:

          Spoiler:
          #org 0x88002BC
          '-----------------------------------
          lockall
          settrainerflag 0x3FE
          setbyte2 0x6 0x1
          storeitems 0x2 0x880 65359
          nop0 ' #raw 0x0
          #raw 0xBD
          end
          ...which is all garbage code from what I can tell and doesn't really tell me anything. Why does it dump random code like this? Should I try using another offset? Another flag? What's up?
            #3931    
          Old May 25th, 2010 (3:43 AM).
          Newpkmnhack Newpkmnhack is offline
             
            Join Date: Mar 2008
            Gender:
            Posts: 45
            Rom - Pokemon Fire Red
            Script editor - PKSV
            Script - Simular to the sign post girl in pallet town

            What [COLOR=blue! important][COLOR=blue! important]im[/COLOR][/COLOR] trying todo is a script simular to the script in pallet town with the sign post girl. When you talk to her she will move but if yu talk to her on the right side she will move to the left if you talk to her on the left she will move to the right. does anyone suggest how to make this happen?
              #3932    
            Old May 25th, 2010 (4:29 AM).
            Binary's Avatar
            Binary Binary is offline
            え?
               
              Join Date: Aug 2007
              Age: 22
              Posts: 3,993
              @Newpkmnhack:
              Well..um. You could use vars (variables). You set a script tile to the right of her and any other direction you want. Then you set a var using 'setvar' on the basis of direction. Then you use comparevar in the main script, and depending on the variable set, you can have different movements.
              __________________
                #3933    
              Old May 25th, 2010 (6:12 AM). Edited May 25th, 2010 by metapod23.
              metapod23's Avatar
              metapod23 metapod23 is offline
              Hardened Trainer
                 
                Join Date: Mar 2009
                Gender: Male
                Nature: Timid
                Posts: 673
                Quote:
                Originally Posted by Metroid Die View Post
                Hey guys,

                Really nooby question here but...

                My Hidesprite command doesn't work. The sprite vanishes, then as soon as I walk in a direction it reappears. Here's the script if anyone could help me out.

                Spoiler:
                #dynamic 0x8033A1

                #org @start
                checkflag 0x828
                if 0x1 goto @end
                showpokepic 0x4 0x3 0x3
                msgbox @char 0x5
                compare 0x800D 0x1
                if 0x0 goto @end
                givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
                fanfare 0x13E
                msgbox @rec 0x4
                waitfanfare
                closeonkeypress
                msgbox @nick 0x5
                compare 0x800D 0x1
                if 0x1 gosub @name
                hidesprite 0x08
                hidepokepic
                closeonkeypress
                setflag 0x828
                end

                #org @char
                = Redwood: So you choose the\nCharmander then? A worthy choice\lfor a worthy trainer!

                #org @end
                closeonkeypress
                hidepokepic
                end

                #org @rec
                = [player] received the Charmander!

                #org @name
                call 0x1A74EB
                return

                #org @nick
                = Would you like to give a\nnickname to Charmander?



                Thanks in advance for any help.
                To hide a sprite, you need to give it a flag number also. Put the flag number (say, 1000) in the Person ID of the sprite, and put setflag 0xflag# (or, if using 1000, setflag 0x1000) in your script after the hidesprite command. The sprite will then stay hidden unless you clear the flag again.

                Quote:
                Originally Posted by dizzyKitty View Post
                Mmk guys. I'm trying to take this movement script I'm working on one step at a time using PKSV. Seems like there are multiple ways of coding this with different programs (I suppose it all depends on the compiler you're using, whether you input raws or score_under's shortcuts like the one I have here, say_!) and it's confuzzling my already confuzzled brain.

                First thing's first. Exclamation point over the player's head. Simple? Yes. Making sense to me? Nope. At least, not my result. Here's what I have:

                Spoiler:
                #dynamic 0x88002BC
                '-----------------------------------
                #org @start
                lockall
                checkflag 0x1003
                if true jump :end
                applymovement PLAYER @exc
                pauseevent 0x0
                setflag 0x1003
                :end
                releaseall
                end

                #org @exc
                m say_! end

                It dumps the following code back out:

                Spoiler:
                #org 0x88002BC
                '-----------------------------------
                lockall
                settrainerflag 0x3FE
                setbyte2 0x6 0x1
                storeitems 0x2 0x880 65359
                nop0 ' #raw 0x0
                #raw 0xBD
                end
                ...which is all garbage code from what I can tell and doesn't really tell me anything. Why does it dump random code like this? Should I try using another offset? Another flag? What's up?
                I don't use PKSV (and you shouldn't either - use XSE) but the most likely cause of your problem is simply that the offset you're using is already being used in your game for something and that's why it's not being written.

                In XSE you would use #dynamic 0x800000 to search for the free space when writing your script, don't know how you do it in PKSV, but my suggestion is to find an offset with enough free space for your script and use that instead, and your script should be written.
                __________________
                  #3934    
                Old May 25th, 2010 (6:51 AM).
                Newpkmnhack Newpkmnhack is offline
                   
                  Join Date: Mar 2008
                  Gender:
                  Posts: 45
                  Quote:
                  Originally Posted by Binary View Post
                  @Newpkmnhack:
                  Well..um. You could use vars (variables). You set a script tile to the right of her and any other direction you want. Then you set a var using 'setvar' on the basis of direction. Then you use comparevar in the main script, and depending on the variable set, you can have different movements.
                  Thank you, Im good a basic scripting and i wanna progress so im gunna do a bit of playing around and see if i can get it to work thanks very much ;]].
                    #3935    
                  Old May 25th, 2010 (8:54 AM).
                  dizzyKitty's Avatar
                  dizzyKitty dizzyKitty is offline
                  The Confuzzled Coding Cat
                     
                    Join Date: May 2010
                    Location: Virginia
                    Age: 26
                    Gender: Female
                    Nature: Bold
                    Posts: 16
                    Send a message via AIM to dizzyKitty Send a message via Windows Live Messenger to dizzyKitty Send a message via Yahoo to dizzyKitty
                    Quote:
                    Originally Posted by metapod23 View Post
                    I don't use PKSV (and you shouldn't either - use XSE) but the most likely cause of your problem is simply that the offset you're using is already being used in your game for something and that's why it's not being written.

                    In XSE you would use #dynamic 0x800000 to search for the free space when writing your script, don't know how you do it in PKSV, but my suggestion is to find an offset with enough free space for your script and use that instead, and your script should be written.
                    Mkay. I tried another offset that I found with FSF and rewrote the code to suit XSE. Here it is:

                    Spoiler:
                    #dynamic 0x82D533F
                    '-----------------------------------
                    #org @start
                    lockall
                    checkflag 0x1003
                    if 0x1 goto @done
                    applymovement 0xFF @exc
                    pause 0x0
                    setflag 0x1003
                    releaseall
                    end

                    #org @exc
                    #raw 0x62
                    #raw 0xFE

                    #org @done
                    release
                    end

                    It debugs just fine, but when I try to compile it, I get this error:
                    Quote:
                    Error 63 "Bad record number" on line 1.
                    I've read around about this bug and all I can come up with is that I'm using an incorrect ROM version. What does that mean? Am I going to have to find another copy of the ROM and start coding all over again? I've made quite a bit of progress up to this point with other scripts and mapping and it'd be quite a disappointment to have to start from scratch. Is there another explanation for this bug? Is it yet another offset issue?
                      #3936    
                    Old May 25th, 2010 (9:02 AM).
                    Zeffy's Avatar
                    Zeffy Zeffy is offline
                    bowties are cool
                    • Crystal Tier
                     
                    Join Date: Apr 2009
                    Gender: Male
                    Posts: 6,325
                    Quote:
                    Originally Posted by dizzyKitty View Post
                    Mkay. I tried another offset that I found with FSF and rewrote the code to suit XSE. Here it is:

                    Spoiler:
                    #dynamic 0x82D533F
                    '-----------------------------------
                    #org @start
                    lockall
                    checkflag 0x1003
                    if 0x1 goto @done
                    applymovement 0xFF @exc
                    pause 0x0
                    setflag 0x1003
                    releaseall
                    end

                    #org @exc
                    #raw 0x62
                    #raw 0xFE

                    #org @done
                    release
                    end

                    It debugs just fine, but when I try to compile it, I get this error:
                    I've read around about this bug and all I can come up with is that I'm using an incorrect ROM version. What does that mean? Am I going to have to find another copy of the ROM and start coding all over again? I've made quite a bit of progress up to this point with other scripts and mapping and it'd be quite a disappointment to have to start from scratch. Is there another explanation for this bug? Is it yet another offset issue?
                    Try to remove the characters after dynamic 0x82D533F. If that doesn't work, then just find a new free offset.
                    __________________
                      #3937    
                    Old May 25th, 2010 (10:14 AM).
                    dizzyKitty's Avatar
                    dizzyKitty dizzyKitty is offline
                    The Confuzzled Coding Cat
                       
                      Join Date: May 2010
                      Location: Virginia
                      Age: 26
                      Gender: Female
                      Nature: Bold
                      Posts: 16
                      Send a message via AIM to dizzyKitty Send a message via Windows Live Messenger to dizzyKitty Send a message via Yahoo to dizzyKitty
                      Quote:
                      Originally Posted by Zeffy View Post

                      Try to remove the characters after dynamic 0x82D533F. If that doesn't work, then just find a new free offset.
                      The commented portion you mean? Deleted that. And I tried several new offsets, still the same bug. =/
                        #3938    
                      Old May 25th, 2010 (10:33 AM).
                      Binary's Avatar
                      Binary Binary is offline
                      え?
                         
                        Join Date: Aug 2007
                        Age: 22
                        Posts: 3,993
                        @dizzykitty:
                        Spoiler:
                        #dynamic 0xoffset

                        #org @start
                        checkflag 0x1003
                        if 0x1 goto @done
                        applymovement 0xFF @exc
                        waitmovement 0x0
                        setflag 0x1003
                        end

                        #org @exc
                        #raw 0x62
                        #raw 0xFE

                        #org @done
                        release
                        end

                        Open FSF, Open your rom. Search for enough bytes. Copy the first offset and paste it after the '#dynamic 0x'.
                        __________________
                          #3939    
                        Old May 25th, 2010 (11:12 AM).
                        dizzyKitty's Avatar
                        dizzyKitty dizzyKitty is offline
                        The Confuzzled Coding Cat
                           
                          Join Date: May 2010
                          Location: Virginia
                          Age: 26
                          Gender: Female
                          Nature: Bold
                          Posts: 16
                          Send a message via AIM to dizzyKitty Send a message via Windows Live Messenger to dizzyKitty Send a message via Yahoo to dizzyKitty
                          Quote:
                          Originally Posted by Binary View Post
                          @dizzykitty:
                          Spoiler:
                          #dynamic 0xoffset

                          #org @start
                          checkflag 0x1003
                          if 0x1 goto @done
                          applymovement 0xFF @exc
                          waitmovement 0x0
                          setflag 0x1003
                          end

                          #org @exc
                          #raw 0x62
                          #raw 0xFE

                          #org @done
                          release
                          end

                          Open FSF, Open your rom. Search for enough bytes. Copy the first offset and paste it after the '#dynamic 0x'.
                          Thank you Binary. =3 I think I figured out what I was doing wrong -- extra digit in the offset. *facepalm*

                          Though now my game freezes in-game when I trigger the script. Why might that be?

                          Spoiler:
                          '---------------
                          #org 0x80053B
                          checkflag 0x1003
                          if 0x1 goto 0x8800556
                          applymovement MOVE_PLAYER 0x8800553
                          waitmovement 0x0
                          setflag 0x1003
                          end

                          '---------------
                          #org 0x800556
                          release
                          end


                          '-----------
                          ' Movements
                          '-----------
                          #org 0x800553
                          #raw 0x62 'Exclamation Mark (!)
                          #raw 0xFE 'End of Movements
                            #3940    
                          Old May 25th, 2010 (11:15 AM).
                          Binary's Avatar
                          Binary Binary is offline
                          え?
                             
                            Join Date: Aug 2007
                            Age: 22
                            Posts: 3,993
                            You have to set the
                            Unknown: 0300
                            Var number: 4050
                            ;D
                            __________________
                              #3941    
                            Old May 25th, 2010 (11:58 AM). Edited May 25th, 2010 by Metroid Die.
                            Metroid Die Metroid Die is offline
                               
                              Join Date: Mar 2009
                              Posts: 54
                              Alright, so another nooby question coming up.

                              How do you stop a level script from repeating??

                              Here's mine, as soon as I get past the last applymovements, it repeats...


                              Spoiler:
                              #dynamic 0x80247D

                              #org @start
                              setvar 0x5649 0x0
                              applymovement 0xFF @go
                              waitmovement 0x0
                              applymovement 0x04 @go2
                              waitmovement 0x0
                              applymovement 0x05 @go3
                              applymovement 0x04 @go4
                              waitmovement 0x0
                              msgbox @redwood 0x6
                              applymovement 0x05 @nada
                              applymovement 0x04 @nada
                              waitmovement 0x0
                              release
                              end

                              #org @go
                              #raw 0x11
                              #raw 0x11
                              #raw 0x11
                              #raw 0x11
                              #raw 0x11
                              #raw 0x11
                              #raw 0x11
                              #raw 0xFE

                              #org @go2
                              #raw 0x02
                              #raw 0xFE

                              #org @go3
                              #raw 0x21
                              #raw 0xFE

                              #org @go4
                              #raw 0x01
                              #raw 0xFE

                              #org @redwood
                              = Redwood: Ah, so you are \v\h01?\pI'm glad to finally meet you.\pI've called you and James here to\nhelp me in my research.\pOn this desk are three Pok\h1Bballs,\neach containing a Pok\h1Bmon.\pI'd like you each to choose one\nbefore I tell you your task.\pGo on \v\h01, pick one.

                              #org @nada
                              #raw 0x02
                              #raw 0xFE
                                #3942    
                              Old May 25th, 2010 (3:26 PM).
                              stanemac12 stanemac12 is offline
                                 
                                Join Date: Oct 2009
                                Posts: 5
                                I'm having something of a serious (game breaking) problem with a script on my hack. Its a ruby hack and its to do with the 5th gym leader (norman). All I did with the script was edit the name of the badge in the text he speaks and it ruined everything about the leader.

                                Initially this just made it so that he wouldn't initiate the catching tutorial with wally when you first speak to him, which I "fixed" by just removing the guy that stops you from moving on until you view the event. After playing even further though, to the point when you are supposed to battle him, it turns out that part of the script was also somehow corrupted, as he still just sits in the front of the gym and won't battle when spoken to, and the doors to his gym's trainers are also locked.

                                I am a complete newb when it comes to script (literally all i have done is changed text) and this is the first thing that's really gone wrong so far. Can anyone here give me some preliminary suggestions/advice on how to fix this, or if more is needed (like the script) I can certainly provide it.
                                  #3943    
                                Old May 25th, 2010 (5:26 PM).
                                metapod23's Avatar
                                metapod23 metapod23 is offline
                                Hardened Trainer
                                   
                                  Join Date: Mar 2009
                                  Gender: Male
                                  Nature: Timid
                                  Posts: 673
                                  Quote:
                                  Originally Posted by Metroid Die View Post
                                  Alright, so another nooby question coming up.

                                  How do you stop a level script from repeating??

                                  Here's mine, as soon as I get past the last applymovements, it repeats...


                                  Spoiler:
                                  #dynamic 0x80247D

                                  #org @start
                                  setvar 0x5649 0x1
                                  applymovement 0xFF @go
                                  waitmovement 0x0
                                  applymovement 0x04 @go2
                                  waitmovement 0x0
                                  applymovement 0x05 @go3
                                  applymovement 0x04 @go4
                                  waitmovement 0x0
                                  msgbox @redwood 0x6
                                  applymovement 0x05 @nada
                                  applymovement 0x04 @nada
                                  waitmovement 0x0
                                  release
                                  end

                                  #org @go
                                  #raw 0x11
                                  #raw 0x11
                                  #raw 0x11
                                  #raw 0x11
                                  #raw 0x11
                                  #raw 0x11
                                  #raw 0x11
                                  #raw 0xFE

                                  #org @go2
                                  #raw 0x02
                                  #raw 0xFE

                                  #org @go3
                                  #raw 0x21
                                  #raw 0xFE

                                  #org @go4
                                  #raw 0x01
                                  #raw 0xFE

                                  #org @redwood
                                  = Redwood: Ah, so you are \v\h01?\pI'm glad to finally meet you.\pI've called you and James here to\nhelp me in my research.\pOn this desk are three Pok\h1Bballs,\neach containing a Pok\h1Bmon.\pI'd like you each to choose one\nbefore I tell you your task.\pGo on \v\h01, pick one.

                                  #org @nada
                                  #raw 0x02
                                  #raw 0xFE
                                  Assuming you've set 0x5649 as the var number for you scrip in A-Map and the var value is 0000, instead of having setvar 0x5649 0x0, it should be setvar 0x5649 0x1.

                                  The reason being that with 5649 as the var # and 0000 as the var value, the script will activate whenever you are standing on that block, as long as variable 5649 is set to 0000. If you set it to 0x1 in the script, it won't activate again, because the var value of 5649 is now set at 0001.
                                  __________________
                                    #3944    
                                  Old May 25th, 2010 (5:32 PM). Edited May 25th, 2010 by Metroid Die.
                                  Metroid Die Metroid Die is offline
                                     
                                    Join Date: Mar 2009
                                    Posts: 54
                                    Quote:
                                    Originally Posted by metapod23 View Post
                                    Assuming you've set 0x5649 as the var number for you scrip in A-Map and the var value is 0000, instead of having setvar 0x5649 0x0, it should be setvar 0x5649 0x1.

                                    The reason being that with 5649 as the var # and 0000 as the var value, the script will activate whenever you are standing on that block, as long as variable 5649 is set to 0000. If you set it to 0x1 in the script, it won't activate again, because the var value of 5649 is now set at 0001.
                                    Ahhhhh thanks so much :D

                                    Alright so another easy one that I can't find the answer to...

                                    This is a regular script event, yet the tile freezes when I step on it. Do I have to change the unknowns or var values etc... in Advance Map? or is it the script its-self?

                                    Spoiler:
                                    #dynamic 0x8051B1

                                    #org @start
                                    checkflag 0x828
                                    if 0x1 goto @end
                                    msgbox @talk 0x4
                                    closeonkeypress
                                    applymovement 0xFF @back
                                    end

                                    #org @end
                                    end

                                    #org @talk
                                    = Wait, you still have to\npick a Pok\h1Bmon!

                                    #org @back
                                    #raw 0x11
                                    #raw 0xFE
                                      #3945    
                                    Old May 25th, 2010 (6:37 PM).
                                    Zeffy's Avatar
                                    Zeffy Zeffy is offline
                                    bowties are cool
                                    • Crystal Tier
                                     
                                    Join Date: Apr 2009
                                    Gender: Male
                                    Posts: 6,325
                                    Quote:
                                    Originally Posted by Metroid Die View Post
                                    Ahhhhh ;) thanks so much :D

                                    Alright so another easy one that I can't find the answer to...

                                    This is a regular script event, yet the tile freezes when I step on it. Do I have to change the unknowns or var values etc... in Advance Map? or is it the script its-self?

                                    Spoiler:
                                    #dynamic 0x8051B1

                                    #org @start
                                    checkflag 0x828
                                    if 0x1 goto @end
                                    msgbox @talk 0x4
                                    closeonkeypress
                                    applymovement 0xFF @back
                                    end

                                    #org @end
                                    end

                                    #org @talk
                                    = Wait, you still have to\npick a Pok\h1Bmon!

                                    #org @back
                                    #raw 0x11
                                    #raw 0xFE
                                    Yes, you need to change the Unknown and Var Numbers. As long as you have movements, you need to AFAIK.
                                    __________________
                                      #3946    
                                    Old May 26th, 2010 (12:37 AM).
                                    Nikolai Fox's Avatar
                                    Nikolai Fox Nikolai Fox is offline
                                       
                                      Join Date: Mar 2010
                                      Gender: Male
                                      Posts: 202
                                      Quote:
                                      Originally Posted by stanemac12 View Post
                                      I'm having something of a serious (game breaking) problem with a script on my hack. Its a ruby hack and its to do with the 5th gym leader (norman). All I did with the script was edit the name of the badge in the text he speaks and it ruined everything about the leader.

                                      Initially this just made it so that he wouldn't initiate the catching tutorial with wally when you first speak to him, which I "fixed" by just removing the guy that stops you from moving on until you view the event. After playing even further though, to the point when you are supposed to battle him, it turns out that part of the script was also somehow corrupted, as he still just sits in the front of the gym and won't battle when spoken to, and the doors to his gym's trainers are also locked.

                                      I am a complete newb when it comes to script (literally all i have done is changed text) and this is the first thing that's really gone wrong so far. Can anyone here give me some preliminary suggestions/advice on how to fix this, or if more is needed (like the script) I can certainly provide it.
                                      You probably made the next larger than it originally was, in which case it would have overwrote another part of the script, or another script in the area. Not much you can really do about it tbh unless you re-write the whole script into a new, dynamic offset.

                                      You should back-up often, and keep at least 5 back-ups at a time.
                                        #3947    
                                      Old May 26th, 2010 (4:13 AM). Edited May 26th, 2010 by Darksun.
                                      Darksun's Avatar
                                      Darksun Darksun is offline
                                      triple rainbow, yo
                                         
                                        Join Date: Jul 2008
                                        Location: 22nd floor of the Carrot Tower in Setagaya, Tokyo, Japan
                                        Gender: Male
                                        Nature: Relaxed
                                        Posts: 123
                                        Where can I edit what Oak says at the start in the lab? In his script in the lab I can only edit some of it, and not all. It's not in any of the other scripts/person events on that map either?

                                        To be more exact; the first few lines he and Gary is saying ("Gramps, I'm fed up with waiting","Be patient [insert rival name]" ++) aren't showing in his person-event-script-thingy..

                                        The whole Oak-script seems kinda complicated (with level scripting and all)..
                                        __________________

                                          #3948    
                                        Old May 26th, 2010 (10:57 AM).
                                        Nikolai Fox's Avatar
                                        Nikolai Fox Nikolai Fox is offline
                                           
                                          Join Date: Mar 2010
                                          Gender: Male
                                          Posts: 202
                                          Quote:
                                          Originally Posted by Darksun View Post
                                          Where can I edit what Oak says at the start in the lab? In his script in the lab I can only edit some of it, and not all. It's not in any of the other scripts/person events on that map either?

                                          To be more exact; the first few lines he and Gary is saying ("Gramps, I'm fed up with waiting","Be patient [insert rival name]" ++) aren't showing in his person-event-script-thingy..

                                          The whole Oak-script seems kinda complicated (with level scripting and all)..
                                          That's because that text is part of the level script. To edit that you would open up Oak's Lab in Advance Map, scroll down to "Scripts" and click "Open Script" (I think that's the only level script in there).

                                          Level scripts are just like normal scripts really.
                                            #3949    
                                          Old May 26th, 2010 (11:25 AM).
                                          Darksun's Avatar
                                          Darksun Darksun is offline
                                          triple rainbow, yo
                                             
                                            Join Date: Jul 2008
                                            Location: 22nd floor of the Carrot Tower in Setagaya, Tokyo, Japan
                                            Gender: Male
                                            Nature: Relaxed
                                            Posts: 123
                                            Quote:
                                            Originally Posted by Nikolai Fox View Post
                                            That's because that text is part of the level script. To edit that you would open up Oak's Lab in Advance Map, scroll down to "Scripts" and click "Open Script" (I think that's the only level script in there).

                                            Level scripts are just like normal scripts really.
                                            Do you mean; Oak's Lab map --> Header --> Scroll down to 'Map script --> Open script?

                                            When I do that, the script that comes up is this one:

                                            Code:
                                            '---------------
                                            #org 0x168F8E
                                            setflag 0x2CF
                                            compare 0x4055 0x1
                                            if 0x1 call 0x8168FC6
                                            compare 0x4055 0x7
                                            if 0x1 call 0x8168FD5
                                            compare 0x4055 0x8
                                            if 0x1 call 0x8168FC0
                                            checkflag 0x247
                                            if 0x1 call 0x8168FBC
                                            end
                                            
                                            '---------------
                                            #org 0x168FC6
                                            movesprite2 0x4 0x6 0xB
                                            spritebehave 0x4 0x7
                                            playsong2 0x12E
                                            return
                                            
                                            '---------------
                                            #org 0x168FD5
                                            movesprite2 0x4 0x6 0xB
                                            spritebehave 0x4 0x7
                                            return
                                            
                                            '---------------
                                            #org 0x168FC0
                                            setvar 0x4055 0x9
                                            return
                                            
                                            '---------------
                                            #org 0x168FBC
                                            setflag 0x24F
                                            return
                                            I'm confused.

                                            EDIT:

                                            OMG, I FOUND IT. AFTER A LOT OF FREAKIN' HOURS OF BOREDOM. YES. :D

                                            I just had to scroll the script number (script no.)! I had tried every possible way except that. Searcing all maps, all events. But finally. Yes. :D
                                            __________________

                                              #3950    
                                            Old May 26th, 2010 (11:59 AM).
                                            Metroid Die Metroid Die is offline
                                               
                                              Join Date: Mar 2009
                                              Posts: 54
                                              Alright, so I have a working script box that stops the player from leaving Oak's lab while picking their starters. It works fine, and is supposed to deactivate after picking a Pokemon. However, after the starter is picked and I walk back over the tile, my player freezes.

                                              Here's the script
                                              Spoiler:

                                              #org 0x8051B1
                                              checkflag 0x828
                                              if 0x1 goto 0x88051CC
                                              msgbox 0x88051CE 0x4 '"Wait, you still have to pick a\nPo..."
                                              closeonkeypress
                                              applymovement 0xFF 0x88051F8
                                              setvar 0x200 0xD101
                                              '---------------
                                              #org 0x8051CC
                                              end


                                              '---------
                                              ' Strings
                                              '---------
                                              #org 0x8051CE
                                              = Wait, you still have to pick a\nPokémon!


                                              '-----------
                                              ' Movements
                                              '-----------
                                              #org 0x8051F8
                                              #raw 0x11 'Step Up (Normal)
                                              #raw 0xFE 'End of Movements
                                              Closed Thread
                                              Quick Reply

                                              Sponsored Links
                                              Thread Tools

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

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

                                              Forum Jump


                                              All times are GMT -8. The time now is 8:40 AM.