The PokéCommunity Forums Fan Games ROM Hacking Tools, Tutorials & Resources
Tutorial XSE Scripting Tutorial

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.

Closed Thread
 
Thread Tools
  #51    
Old June 3rd, 2008 (7:24 PM).
Tyrantrum's Avatar
Tyrantrum Tyrantrum is offline
ʕ´•ᴥ•`ʔ
  • Crystal Tier
 
Join Date: Oct 2007
Location: New Jersey
Age: 23
Gender: Male
Nature: Lonely
Posts: 5,811
I tried to make a script with a different color, but it stayed at red instead of Dark Green.
What would color scripts on XSE look like?
__________________




(x) Tumblr
(y) Twitter
Previously Eeveon

Relevant Advertising!

  #52    
Old June 3rd, 2008 (8:15 PM).
~Teh Panda~'s Avatar
~Teh Panda~ ~Teh Panda~ is offline
Sea of Dreams - Redux
  • Silver Tier
 
Join Date: Aug 2007
Posts: 906
How can you give pokemon, I have tried the default one for poketscript and scripted but no luck. I hope there is more coverage in this and follow me scripts in following tutorials!
__________________




Mystic still in work to let you know...
  #53    
Old June 3rd, 2008 (9:14 PM).
destinedjagold's Avatar
destinedjagold destinedjagold is offline
Oh Hai Thar~
  • Silver Tier
 
Join Date: May 2007
Location: Philippines
Age: 26
Gender: Male
Nature: Careful
Posts: 8,507
Darthatron, care to add more tuts in the first page? :\
__________________


FC: 0061-1111-6462
TSV: 1364(X), 0790(OR)

  #54    
Old June 3rd, 2008 (9:18 PM).
Darthatron's Avatar
Darthatron Darthatron is offline
巨大なトロール。
  • Silver Tier
 
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 25
Gender: Male
Nature: Modest
Posts: 1,152
Quote:
Originally Posted by Eeveon View Post
I tried to make a script with a different color, but it stayed at red instead of Dark Green.
What would color scripts on XSE look like?
What game are you hacking?
Quote:
Originally Posted by hockeypanda32 View Post
How can you give pokemon, I have tried the default one for poketscript and scripted but no luck. I hope there is more coverage in this and follow me scripts in following tutorials!
It's rather simple really:

The GivePokemon Command is set out like this:
Code:
Byte1 = Pokemon Number
Byte2 = Pokemon Level
Byte3 = Held Item
Byte4 = ?
Byte5 = ?
Byte6 = ?
So to make a basic script to give the Player a Level 5 Pikachu, holding a Pokeball, we would do this:
Code:
#Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
GivePokemon 25 5 4 0 0 0
Release
End
Tada! :D
__________________
あなた は しきしゃ です
わたし は ばか です
  #55    
Old June 3rd, 2008 (9:31 PM).
Satoshi-Ash's Avatar
Satoshi-Ash Satoshi-Ash is offline
Master Chris
     
    Join Date: Oct 2007
    Location: Hayward, CA
    Age: 23
    Nature: Lax
    Posts: 142
    Send a message via AIM to Satoshi-Ash Send a message via Windows Live Messenger to Satoshi-Ash Send a message via Yahoo to Satoshi-Ash
    Thanks so much. This really helps people like me with scripting using this awesome program.

    I do have one question:
    "#Dynamic 0x800000" would be the offset for the event, right?
    __________________
    Pokémon Platinum: Name: Chris, FC: 1676-9582-3443
    Hacks I support:
    Spoiler:




      #56    
    Old June 3rd, 2008 (9:35 PM).
    ~Teh Panda~'s Avatar
    ~Teh Panda~ ~Teh Panda~ is offline
    Sea of Dreams - Redux
    • Silver Tier
     
    Join Date: Aug 2007
    Posts: 906
    Quote:
    Originally Posted by Darthatron View Post
    What game are you hacking?

    It's rather simple really:

    The GivePokemon Command is set out like this:
    Code:
    Byte1 = Pokemon Number
    Byte2 = Pokemon Level
    Byte3 = Held Item
    Byte4 = ?
    Byte5 = ?
    Byte6 = ?
    So to make a basic script to give the Player a Level 5 Pikachu, holding a Pokeball, we would do this:
    Code:
    #Dynamic 0x800000
    
    #ORG @Main
    Lock
    FacePlayer
    GivePokemon 25 5 4 0 0 0
    Release
    End
    Tada! :D
    Dang, thanks man! :D, gonna try a script for this now!

    one more thing, are flags the same as others, i have not tried, can someone confirm or show an example of how to use flags in xsc and do the same movement codes apply?
    __________________




    Mystic still in work to let you know...
      #57    
    Old June 3rd, 2008 (9:55 PM).
    ZodiacDaGreat's Avatar
    ZodiacDaGreat ZodiacDaGreat is offline
    Working on a Mobile System
       
      Join Date: Feb 2007
      Location: South Pacific
      Age: 24
      Gender: Male
      Nature: Relaxed
      Posts: 429
      Send a message via ICQ to ZodiacDaGreat
      Quote:
      Dang, thanks man! :D, gonna try a script for this now!

      one more thing, are flags the same as others, i have not tried, can someone confirm or show an example of how to use flags in xsc and do the same movement codes apply?
      Everything's same and remains unchanged, - flags will never change, they carry the same value, unless the flag base is modified..., movements also remain unchange. Other then a few, only some commands area changed, like multi, startwildbattle etc, as the more accurate parameters for the command was discovered and so changes had to be made. If you're not sure, check the command database - it should answer most of these questions.
      __________________
        #58    
      Old June 3rd, 2008 (11:13 PM).
      Tré's Avatar
      Tré Tré is offline
      Raised by the bastards of 1969
         
        Join Date: Oct 2007
        Location: My town was blind from refinery sun
        Gender: Male
        Nature: Quiet
        Posts: 1,590
        hey i understand now....you can only change the $ to @...whoa...this is addicting...xD
        __________________
          #59    
        Old June 3rd, 2008 (11:48 PM).
        Qwerty-117's Avatar
        Qwerty-117 Qwerty-117 is offline
        Is looking for a VBScripter
           
          Join Date: Feb 2008
          Location: I forgot
          Age: 23
          Gender:
          Nature: Naughty
          Posts: 66
          now that XSE has been released, will the beta tut still work for the full version?
          __________________





          Never fear death, fear the unlived life

          π = 3.14159265358979323846264338327950288419716939937510

          What else can i put here?
            #60    
          Old June 4th, 2008 (6:16 AM).
          ~Teh Panda~'s Avatar
          ~Teh Panda~ ~Teh Panda~ is offline
          Sea of Dreams - Redux
          • Silver Tier
           
          Join Date: Aug 2007
          Posts: 906
          So according to you Zodiac something like this would work!

          Code:
          #Dynamic 0x800000
          
          #ORG @Main
          Lock
          FacePlayer
          checkflag 0x200
          if b_true goto @gotit
          GivePokemon 25 5 4 0 0 0
          message @recieved
          setflag 0x200
          Release
          End
          
          #ORG @gotit
          message @howis
          Release
          End
          
          #ORG @recieved
          =Here is pikachu!
          
          #ORG @howis
          =How is pikachu doing?
          __________________




          Mystic still in work to let you know...
            #61    
          Old June 4th, 2008 (7:10 AM).
          Tyrantrum's Avatar
          Tyrantrum Tyrantrum is offline
          ʕ´•ᴥ•`ʔ
          • Crystal Tier
           
          Join Date: Oct 2007
          Location: New Jersey
          Age: 23
          Gender: Male
          Nature: Lonely
          Posts: 5,811
          Oh, I'm using a script test Rom for Fire Red.
          __________________




          (x) Tumblr
          (y) Twitter
          Previously Eeveon
            #62    
          Old June 4th, 2008 (7:10 AM). Edited June 4th, 2008 by Darthatron.
          Darthatron's Avatar
          Darthatron Darthatron is offline
          巨大なトロール。
          • Silver Tier
           
          Join Date: Jan 2006
          Location: Melbourne, Australia
          Age: 25
          Gender: Male
          Nature: Modest
          Posts: 1,152
          Quote:
          Originally Posted by hockeypanda32 View Post
          So according to you Zodiac something like this would work!

          Code:
          #Dynamic 0x800000
          
          #ORG @Main
          Lock
          FacePlayer
          checkflag 0x200
          if b_true goto @gotit
          GivePokemon 25 5 4 0 0 0
          message @recieved
          setflag 0x200
          Release
          End
          
          #ORG @gotit
          message @howis
          Release
          End
          
          #ORG @recieved
          =Here is pikachu!
          
          #ORG @howis
          =How is pikachu doing?
          That will work fine. Except I think you need a space after the "=" in Text Scripts.
          Code:
          #ORG @recieved
          =Here is pikachu!
          
          #ORG @howis
          =How is pikachu doing?
          Should be
          Code:
          #ORG @recieved
          = Here is pikachu!
          
          #ORG @howis
          = How is pikachu doing?
          Quote:
          Originally Posted by Eeveon View Post
          Oh, I'm using a script test Rom for Fire Red.
          Oh, well... If it can wait a few days the new version of XSE will have color codes included. Otherwise, PM me, and I'll explain.
          __________________
          あなた は しきしゃ です
          わたし は ばか です
            #63    
          Old June 4th, 2008 (7:22 AM).
          Master_Track's Avatar
          Master_Track Master_Track is offline
          ROM Reaverz Scripter
             
            Join Date: Mar 2008
            Location: Austria
            Age: 24
            Gender:
            Nature: Brave
            Posts: 916
            Send a message via Windows Live Messenger to Master_Track
            I'm quite sure I used colour codes with XSE O.o
            I'll try it out again, but I'm sure it was with XSE......
            just wrote \c\h01\h04 (code for red).
            __________________

            *Busy with school*

              #64    
            Old June 4th, 2008 (8:24 AM).
            Jamiras843's Avatar
            Jamiras843 Jamiras843 is offline
            Dee-dee-dee
               
              Join Date: May 2008
              Gender:
              Posts: 18
              Send a message via AIM to Jamiras843
              I need halp with a script I made... To get your first pokemon you talk to this guy, he just says "test blah blah blah" then you get a Houndour and music plays and a txt box pops up saying "[PLAYER] recieved a HOUNDOUR!" but after that box the "test blah blah blah" box comes back and so does the "[PLAYER] recieved a HOUNDOUR!" then it just stops. How do I make it not repeat the second time? this is the script its not fully complete but the whole repeat thing bugs me...

              #dynamic 800109

              #org @starterpkm
              lock
              faceplayer
              checkflag 0x200
              if 0x1 goto @father1
              msgbox @houndour
              callstd 0x6
              goto @houndourget
              release
              end

              #org @father1
              lock
              faceplayer
              msgbox @well
              callstd 0x6
              release
              end

              #org @houndour
              = test blah blah blah

              #org @houndourget
              lock
              fanfare 0x13E
              msgbox2 @houndourget2
              waitmsgbox
              waitfanfare
              callstd 0x6
              givepokemon 0xE4 0x5 0x0 0x0 0x0 0x000000 0x00
              setflag 0x200
              setflag 0x828
              release
              end

              #org @houndourget2
              = \v\h01 received a HOUNDOUR!

              #org @well
              = You already have a pokemon
              __________________

                #65    
              Old June 4th, 2008 (9:57 AM).
              Dr.Razor's Avatar
              Dr.Razor Dr.Razor is offline
              Yellow Remaker
                 
                Join Date: Aug 2007
                Location: Switzerland
                Posts: 101
                I show my method tu use XSE:
                -Insert script with Poketscript
                -Then decompile the script with XSE
                -Edit it
                -Compile it.

                I use this way because i don't like very much dynamic system
                and i can edit the script easily with XSE

                Hope it will help someone^^

                Ps:Sorry for my english.
                  #66    
                Old June 4th, 2008 (10:01 AM).
                Mike2494's Avatar
                Mike2494 Mike2494 is offline
                   
                  Join Date: Dec 2007
                  Gender:
                  Posts: 77
                  Well, why do you have two setflags, try giving the 0x828 just away. I am not a XSE-Pro, I am also only learning right now, but I know some stuff about PokeScript..so yeah..
                  __________________


                    #67    
                  Old June 4th, 2008 (10:17 AM).
                  Jamiras843's Avatar
                  Jamiras843 Jamiras843 is offline
                  Dee-dee-dee
                     
                    Join Date: May 2008
                    Gender:
                    Posts: 18
                    Send a message via AIM to Jamiras843
                    Quote:
                    Originally Posted by Mike2494 View Post
                    Well, why do you have two setflags, try giving the 0x828 just away. I am not a XSE-Pro, I am also only learning right now, but I know some stuff about PokeScript..so yeah..
                    The 0x828 flag is the flag that enables you to view your pokemon status, this flag is enabled when you choose your starter pokemon. Since this is your starter pokemon I need to enable that flag, or else you just get the pokemon and can't check its status.
                    __________________

                      #68    
                    Old June 4th, 2008 (3:49 PM).
                    ~Teh Panda~'s Avatar
                    ~Teh Panda~ ~Teh Panda~ is offline
                    Sea of Dreams - Redux
                    • Silver Tier
                     
                    Join Date: Aug 2007
                    Posts: 906
                    Quote:
                    Originally Posted by Darthatron View Post
                    That will work fine. Except I think you need a space after the "=" in Text Scripts.
                    Code:
                    #ORG @recieved
                    =Here is pikachu!
                    
                    #ORG @howis
                    =How is pikachu doing?
                    Should be
                    Code:
                    #ORG @recieved
                    = Here is pikachu!
                    
                    #ORG @howis
                    = How is pikachu doing?

                    Oh, well... If it can wait a few days the new version of XSE will have color codes included. :) Otherwise, PM me, and I'll explain.
                    My script glitches, when I talk to the person assigned with this it shows no text but gives the poke, then when I go to bag, you change your character to the giver of the pokemon! What did I do wrong, here is my improved script

                    Spoiler:
                    #Dynamic 0x71A2EC

                    #ORG @Main
                    Lock
                    FacePlayer
                    checkflag 0x200
                    if b_true goto @gotit
                    GivePokemon 25 5 4 0 0 0
                    message @recieved
                    setflag 0x200
                    Release
                    End

                    #ORG @gotit
                    message @howis
                    Release
                    End

                    #ORG @recieved
                    = Here is pikachu!

                    #ORG @howis
                    = How is pikachu doing?
                    __________________




                    Mystic still in work to let you know...
                      #69    
                    Old June 4th, 2008 (7:44 PM).
                    Jamiras843's Avatar
                    Jamiras843 Jamiras843 is offline
                    Dee-dee-dee
                       
                      Join Date: May 2008
                      Gender:
                      Posts: 18
                      Send a message via AIM to Jamiras843
                      Quote:
                      Originally Posted by hockeypanda32 View Post
                      My script glitches, when I talk to the person assigned with this it shows no text but gives the poke, then when I go to bag, you change your character to the giver of the pokemon! What did I do wrong, here is my improved script

                      Spoiler:
                      #Dynamic 0x71A2EC

                      #ORG @Main
                      Lock
                      FacePlayer
                      checkflag 0x200
                      if b_true goto @gotit
                      GivePokemon 25 5 4 0 0 0
                      message @recieved
                      setflag 0x200
                      Release
                      End

                      #ORG @gotit
                      message @howis
                      Release
                      End

                      #ORG @recieved
                      = Here is pikachu!

                      #ORG @howis
                      = How is pikachu doing?
                      This happened to me, If you change maps before going to the bag it shouldnt switch characters. I wish I could tell you how to fix it, but if you do let me know I would like to fix that on mine too
                      __________________

                        #70    
                      Old June 4th, 2008 (7:51 PM).
                      ~Teh Panda~'s Avatar
                      ~Teh Panda~ ~Teh Panda~ is offline
                      Sea of Dreams - Redux
                      • Silver Tier
                       
                      Join Date: Aug 2007
                      Posts: 906
                      Quote:
                      Originally Posted by Jamiras843 View Post
                      This happened to me, If you change maps before going to the bag it shouldnt switch characters. I wish I could tell you how to fix it, but if you do let me know I would like to fix that on mine too :)
                      Ya I fixed the change character thing by making it say if b_false goto @recieved instead of message @recieved after the givepokemon but placed it before the givepokemon! Now I am giong to try to move the givepokemon script to one of the subscripts and see if any positive results happen.
                      __________________




                      Mystic still in work to let you know...
                        #71    
                      Old June 4th, 2008 (8:16 PM).
                      ZodiacDaGreat's Avatar
                      ZodiacDaGreat ZodiacDaGreat is offline
                      Working on a Mobile System
                         
                        Join Date: Feb 2007
                        Location: South Pacific
                        Age: 24
                        Gender: Male
                        Nature: Relaxed
                        Posts: 429
                        Send a message via ICQ to ZodiacDaGreat
                        Quote:
                        #Dynamic 0x71A2EC

                        #ORG @Main
                        Lock
                        FacePlayer
                        checkflag 0x200
                        if b_true goto @gotit
                        GivePokemon 0x25 0x5 0x4 0x0 0x0 0x0
                        message @recieved
                        boxset 0x2
                        setflag 0x200
                        Release
                        End

                        #ORG @gotit
                        message @howis
                        boxset 0x2
                        End

                        #ORG @recieved
                        = Here is pikachu!

                        #ORG @howis
                        = How is pikachu doing?
                        here, its a bit improved, I did it in a rush, tell me if there's errors. Um, you've forgot to put boxset under message. There's no need to use CAPs(Uppercase) but thats upto you.
                        __________________
                          #72    
                        Old June 4th, 2008 (8:22 PM). Edited June 4th, 2008 by ~Teh Panda~.
                        ~Teh Panda~'s Avatar
                        ~Teh Panda~ ~Teh Panda~ is offline
                        Sea of Dreams - Redux
                        • Silver Tier
                         
                        Join Date: Aug 2007
                        Posts: 906
                        Quote:
                        Originally Posted by ZodiacDaGreat View Post
                        here, its a bit improved, I did it in a rush, tell me if there's errors. Um, you've forgot to put boxset under message. There's no need to use CAPs(Uppercase) but thats upto you.
                        Thanks, it worked, time to add my movement script, this is gonna be the beginning of new hack!

                        My Movement script is like this and when I compile and open it adds every movement so it confuses itself while moving and freezes, why is it doing this!
                        Code:
                        #dynamic 0x71A2E0
                        
                        #org @beginning
                        lockall
                        checkflag 0x200
                        if b_true goto @gotit
                        applymovement 0x2 0x71A2E0
                        applymovement MOVE_PLAYER 0x71A41C
                        waitmovement 0x0
                        call 0x71A41C
                        boxset 0x2
                        releaseall
                        end
                        
                        '-----------
                        ' Movements
                        '-----------
                        #org 0x71A2E0
                        #raw 12 'Step Left (Normal)
                        #raw 4A 'Face player
                        #raw FE 'End of Movements
                        
                        #org @gotit
                        release
                        end
                        __________________




                        Mystic still in work to let you know...
                          #73    
                        Old June 4th, 2008 (10:50 PM).
                        Darthatron's Avatar
                        Darthatron Darthatron is offline
                        巨大なトロール。
                        • Silver Tier
                         
                        Join Date: Jan 2006
                        Location: Melbourne, Australia
                        Age: 25
                        Gender: Male
                        Nature: Modest
                        Posts: 1,152
                        Quote:
                        Originally Posted by hockeypanda32 View Post
                        Thanks, it worked, time to add my movement script, this is gonna be the beginning of new hack!

                        My Movement script is like this and when I compile and open it adds every movement so it confuses itself while moving and freezes, why is it doing this!
                        Code:
                        #dynamic 0x71A2E0
                        
                        #org @beginning
                        lockall
                        checkflag 0x200
                        if b_true goto @gotit
                        applymovement 0x2 0x71A2E0
                        applymovement MOVE_PLAYER 0x71A41C
                        waitmovement 0x0
                        call 0x71A41C
                        boxset 0x2
                        releaseall
                        end
                        
                        '-----------
                        ' Movements
                        '-----------
                        #org 0x71A2E0
                        #raw 12 'Step Left (Normal)
                        #raw 4A 'Face player
                        #raw FE 'End of Movements
                        
                        #org @gotit
                        release
                        end
                        First off, you really shouldn't be using a mix of Dynamic and Static Offsets in your script. This makes it kind of difficult to read...

                        If possible could you show me the fully non-compiled script? Unless you don't have one... In which case please PM me with exactly what you want the script to do and I'll write you up a script and show you exactly what each command does.
                        __________________
                        あなた は しきしゃ です
                        わたし は ばか です
                          #74    
                        Old June 5th, 2008 (1:02 AM).
                        Charliezard's Avatar
                        Charliezard Charliezard is offline
                        A wild shroomish appeared!
                        • Crystal Tier
                         
                        Join Date: May 2007
                        Location: Australia
                        Age: 25
                        Gender: Male
                        Posts: 1,276
                        Code:
                        #Dynamic 0x3B4D84
                        
                        #org @Main
                        Lock
                        FacePlayer
                        Message @Speak
                        BoxSet 0x06
                        release
                        end
                        #org @Speak
                        = "Hey!"
                        That's my script. :)
                        On Advance Map I create a person, Their Offset is 71A284
                        Their script offset is 3B4D84.
                        I click "Open script" in advance map and XSE opens up with FireRed as file and 3B4D84 as the offset.
                        That's when I put this in
                        Code:
                        #Dynamic 0x3B4D84
                        
                        #org @Main
                        Lock
                        FacePlayer
                        Message @Speak
                        BoxSet 0x06
                        release
                        end
                        #org @Speak
                        = "Hey!"
                        Same code again :P
                        And hit Compile. It says it worked but it doesn't...Whenever I re open the script offset 3B4D84 It gives me a blank page...almost
                        Code:
                        '-----------------------
                        #org 0x3B4D84
                        And the person doesn't talk to me ingame. What am I doing wrong?
                          #75    
                        Old June 5th, 2008 (1:24 AM).
                        ZodiacDaGreat's Avatar
                        ZodiacDaGreat ZodiacDaGreat is offline
                        Working on a Mobile System
                           
                          Join Date: Feb 2007
                          Location: South Pacific
                          Age: 24
                          Gender: Male
                          Nature: Relaxed
                          Posts: 429
                          Send a message via ICQ to ZodiacDaGreat
                          Quote:
                          And the person doesn't talk to me ingame. What am I doing wrong?
                          lol, you're not supposed to use offsets anyhow, try looking for lot of FF's(byte 0xFF), FF means free space, other than that it means its used. Try to optimise your script also:

                          Quote:
                          #Dynamic 0x3B4D84

                          #org @Main
                          Lock
                          FacePlayer
                          Message @Speak
                          BoxSet 0x06
                          release
                          end
                          #org @Speak
                          = "Hey!"
                          to:
                          Quote:
                          #dynamic 0xYour Free Space Offset
                          #org @Main
                          message @speak
                          boxset 0x2 ' 0x2 contains a builtin faceplayer and lock
                          end

                          #org @speak
                          = "Hey!"
                          __________________
                          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 9:16 PM.