Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

TrollandToad.com
Reply
 
Thread Tools
  #1    
Old February 16th, 2014 (1:03 PM). Edited January 14th, 2017 by Luka S.J..
Luka S.J.'s Avatar
Luka S.J. Luka S.J. is offline
Jealous Croatian
     
    Join Date: Dec 2008
    Location: Croatia
    Age: 24
    Gender: Male
    Nature: Adamant
    Posts: 1,106
    The entire system has been written anew. It contains a lot of added functionality, making the whole system a tad more complex. It is EXTREMELY important that you carefully and wholly read the entire set of instructions while adding in the new PWT system.

    DOWNLOAD SCRIPT FROM HERE
    __________________

    Reply With Quote

    Relevant Advertising!

      #2    
    Old February 16th, 2014 (2:54 PM).
    Luka S.J.'s Avatar
    Luka S.J. Luka S.J. is offline
    Jealous Croatian
       
      Join Date: Dec 2008
      Location: Croatia
      Age: 24
      Gender: Male
      Nature: Adamant
      Posts: 1,106
      Guys, whoever got the script several hours ago, replace it with the amended version. I forgot to add some stuff which would make your PWT experience terrible
      Reply With Quote
        #3    
      Old February 16th, 2014 (6:36 PM).
      Worldslayer608's Avatar
      Worldslayer608 Worldslayer608 is offline
      ಥдಥ
      • Silver Tier
       
      Join Date: Mar 2008
      Location: San Diego
      Age: 28
      Gender: Male
      Nature: Calm
      Posts: 892
      Really excited to check this out Luka! Unfortunately it is going to have to hold off a couple days

      REALLY appreciate you sharing this though, whether I use it or not I think it is a great add-on for Essentials users. Probably the best in my opinion.
      __________________



      SMEARGLE SOLO CHALLENGE
      HARDCORE EDITION
      To vanquish without peril is to triumph without glory...
      Voted Best Game Designer 2011 on PC
      Reply With Quote
        #4    
      Old February 17th, 2014 (1:04 PM).
      RPD490's Avatar
      RPD490 RPD490 is offline
         
        Join Date: Jan 2009
        Location: Blackthorn City, Johto
        Gender: Male
        Nature: Relaxed
        Posts: 180
        I been waiting for something like this to pop up, great job!
        __________________
        This signature has been disabled.
        Signature is over 600px wide :(
        Please review and fix the issues by reading the signature rules.

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

        Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
        Reply With Quote
          #5    
        Old February 21st, 2014 (10:17 AM). Edited February 21st, 2014 by Luka S.J..
        Luka S.J.'s Avatar
        Luka S.J. Luka S.J. is offline
        Jealous Croatian
           
          Join Date: Dec 2008
          Location: Croatia
          Age: 24
          Gender: Male
          Nature: Adamant
          Posts: 1,106
          Minor Update:

          I've upgraded the Resource Pack to include all the Trainer sprites for all the trainertypes defined in the PBS. I've also added the win and lose speeches for the Hoenn Leaders, that were not there before. Also, I've adjusted the code so that there is no limit on how many trainer entries you can put for the tournament branch in the array TRAINER_LIST (used to be 8 before). The Resource Pack is still missing OW sprites of the Leaders and Champions from Hoenn and Unova, as they do not officially exist in Gen IV format. You will not be able to play those Tournament branches, unless you add the missing OW sprites to your game.

          Rental and Mix Master modes are still not available. I will add that soon.

          Sidenote:

          Keep in mind that to unlock "World Leaders" you need to beat all the other Gym Leader type Tournaments at least once. And to unlock "World Champions" you need to beat "World Leaders" at least once.
          Reply With Quote
            #6    
          Old March 30th, 2014 (12:24 PM).
          Joltik's Avatar
          Joltik Joltik is offline
             
            Join Date: Jan 2010
            Gender: Male
            Nature: Modest
            Posts: 116
            Hi,

            This seems to be really great, but I am not being able to test it.

            Whenever I try to participate in any tournament with any team, it always displays the following message:
            "We're terribly sorry, but your Pokemon are not eligible for the Tournament."
            Then a list of the banned pokémon follows (none of which is in my party, nor do I have any eggs).
            "Please come back once your Pokemon Party has been adjusted."

            I believe it may be due to some little mistake in the script. Can anyone else confirm this?

            Thank you!
            __________________

            Check out my DeviantArt account! My game project is called Pokemon Subrosia.
            My DeviantArt | Old DeviantArt
            Reply With Quote
              #7    
            Old March 30th, 2014 (12:52 PM). Edited March 30th, 2014 by Luka S.J..
            Luka S.J.'s Avatar
            Luka S.J. Luka S.J. is offline
            Jealous Croatian
               
              Join Date: Dec 2008
              Location: Croatia
              Age: 24
              Gender: Male
              Nature: Adamant
              Posts: 1,106
              Quote:
              Originally Posted by Giu View Post
              Hi,

              This seems to be really great, but I am not being able to test it.

              Whenever I try to participate in any tournament with any team, it always displays the following message:
              "We're terribly sorry, but your Pokemon are not eligible for the Tournament."
              Then a list of the banned pokémon follows (none of which is in my party, nor do I have any eggs).
              "Please come back once your Pokemon Party has been adjusted."

              I believe it may be due to some little mistake in the script. Can anyone else confirm this?

              Thank you!
              What type of tournament are you trying to participate in, and how many Pokemon do you have in your team? Your party may not be eligible if you do not have enough Pokemon in your team to participate in the tournament.

              Single Battle requires at least 3 in your party. Double requires 4. Full Battle needs a full party of 6. And Sudden Death only needs 1.
              Reply With Quote
                #8    
              Old March 30th, 2014 (7:10 PM). Edited March 30th, 2014 by Joltik.
              Joltik's Avatar
              Joltik Joltik is offline
                 
                Join Date: Jan 2010
                Gender: Male
                Nature: Modest
                Posts: 116
                Quote:
                Originally Posted by Luka S.J. View Post
                What type of tournament are you trying to participate in, and how many Pokemon do you have in your team? Your party may not be eligible if you do not have enough Pokemon in your team to participate in the tournament.

                Single Battle requires at least 3 in your party. Double requires 4. Full Battle needs a full party of 6. And Sudden Death only needs 1.
                I had a party of six pokémon, and I tryed to participate in each regional tournament both in single and double battles. Just tryed it again using Essentials demo-party, in a new game, still got the error.
                Are you using the same script that is on the page? Maybe yours is a little bit different.
                __________________

                Check out my DeviantArt account! My game project is called Pokemon Subrosia.
                My DeviantArt | Old DeviantArt
                Reply With Quote
                  #9    
                Old March 31st, 2014 (12:49 PM).
                Luka S.J.'s Avatar
                Luka S.J. Luka S.J. is offline
                Jealous Croatian
                   
                  Join Date: Dec 2008
                  Location: Croatia
                  Age: 24
                  Gender: Male
                  Nature: Adamant
                  Posts: 1,106
                  Quote:
                  Originally Posted by Giu View Post
                  I had a party of six pokémon, and I tryed to participate in each regional tournament both in single and double battles. Just tryed it again using Essentials demo-party, in a new game, still got the error.
                  Are you using the same script that is on the page? Maybe yours is a little bit different.
                  If your def partyEligible? looks like this
                  Code:
                    def partyEligible?
                      case @battle_type
                      when 0
                        length = 3
                      when 1
                        length = 4
                      when 2 
                        length = 6
                      when 3
                        length = 1
                      end
                      count=0
                      return false if $Trainer.party.length=length
                      return false
                    end
                  Then you should be getting the same results as me; which is a playable PWT. The code in this thread, is the code I'm running in my game, and everything works just fine.
                  Reply With Quote
                    #10    
                  Old March 31st, 2014 (5:41 PM). Edited March 31st, 2014 by Joltik.
                  Joltik's Avatar
                  Joltik Joltik is offline
                     
                    Join Date: Jan 2010
                    Gender: Male
                    Nature: Modest
                    Posts: 116
                    Thank you for the quick repply.

                    If you look at the original code carefully, there is a little mistake, which is not in this new one you just showed me. Take a look:

                    Original Code:
                    Code:
                        return false if $Trainer.party.[S-HIGHLIGHT]length=length
                        return false
                      end
                    Correct Code:
                    Code:
                        return false if $Trainer.party.length
                        for i in 0...$Trainer.party.length
                          count+=1 if !(BAN_LIST.include?($Trainer.party[i].species)) && !($Trainer.party[i].egg?)
                        end
                        
                        return true if count>=length
                        return false
                      end
                    Now that I changed it, the Tournament is working fine.
                    Thank you for sharing the code. It's really cool.
                    I'll work on it a little bit. I want to tweak it, so that it will be more viasually appealing. I'll show you in case I get anything nice.
                    Cheers!
                    __________________

                    Check out my DeviantArt account! My game project is called Pokemon Subrosia.
                    My DeviantArt | Old DeviantArt
                    Reply With Quote
                      #11    
                    Old March 31st, 2014 (6:58 PM). Edited April 3rd, 2014 by Luka S.J..
                    Luka S.J.'s Avatar
                    Luka S.J. Luka S.J. is offline
                    Jealous Croatian
                       
                      Join Date: Dec 2008
                      Location: Croatia
                      Age: 24
                      Gender: Male
                      Nature: Adamant
                      Posts: 1,106
                      Quote:
                      Originally Posted by Giu View Post
                      Thank you for the quick repply.

                      If you look at the original code carefully, there is a little mistake, which is not in this new one you just showed me. Take a look:

                      Original Code:
                      Code:
                          return false if $Trainer.party.[S-HIGHLIGHT]length=length
                          return false
                        end
                      Correct Code:
                      Code:
                          return false if $Trainer.party.length
                          for i in 0...$Trainer.party.length
                            count+=1 if !(BAN_LIST.include?($Trainer.party[i].species)) && !($Trainer.party[i].egg?)
                          end
                          
                          return true if count>=length
                          return false
                        end
                      Now that I changed it, the Tournament is working fine.
                      Thank you for sharing the code. It's really cool.
                      I'll work on it a little bit. I want to tweak it, so that it will be more viasually appealing. I'll show you in case I get anything nice.
                      Cheers!
                      That's not a mistake, it's intentional. The original code is the correct one (what do you mean new code anyway? I just copied and pasted the same thing from the OP). Your team cannot be eligible if you do not have enough Pokemon in your party to participate. The line is supposed to be return false if $Trainer.party.length < length. What you just did with your "correct code" is remove that functionality, and goofed it up. I just tested all the branches and all the types of tournaments with the "original" code, and everything works just as it should.

                      Long story short: your "correct code" is not correct. Go through the logic there. What you've done now, is make partyEligible? return a false value (meaning party is not eligible) whenever $Trainer.party.length (that statement will always be true if it isn't 0). That means, that whenever your party is larger than 0, your team will not be eligible. At this stage, I have no idea what you're doing anymore.
                      Reply With Quote
                        #12    
                      Old April 1st, 2014 (5:35 PM). Edited April 1st, 2014 by Joltik.
                      Joltik's Avatar
                      Joltik Joltik is offline
                         
                        Join Date: Jan 2010
                        Gender: Male
                        Nature: Modest
                        Posts: 116
                        [QUOTE=Luka S.J.;8177055]That's not a mistake, it's intentional. The original code is the correct one (what do you mean new code anyway? I just copied and pasted the same thing from the OP). Your team cannot be eligible if you do not have enough Pokemon in your party to participate. The line is supposed to be [COLOR=Blue]return false if $Trainer.party.length
                        __________________

                        Check out my DeviantArt account! My game project is called Pokemon Subrosia.
                        My DeviantArt | Old DeviantArt
                        Reply With Quote
                          #13    
                        Old April 3rd, 2014 (12:44 AM).
                        Luka S.J.'s Avatar
                        Luka S.J. Luka S.J. is offline
                        Jealous Croatian
                           
                          Join Date: Dec 2008
                          Location: Croatia
                          Age: 24
                          Gender: Male
                          Nature: Adamant
                          Posts: 1,106
                          WTF? When looking at this thread through Chrome the
                          __________________

                          Reply With Quote
                            #14    
                          Old April 3rd, 2014 (1:04 PM).
                          Rayd12smitty's Avatar
                          Rayd12smitty Rayd12smitty is offline
                          Shadow Maker
                             
                            Join Date: Dec 2011
                            Gender: Male
                            Posts: 647
                            This is so weird... I'm on safari and both quotes are identical, on chrome the one is fixed and the other isn't. This is kinda cool, but really annoying
                            __________________
                            Reply With Quote
                              #15    
                            Old August 4th, 2014 (6:16 AM).
                            Richard PT's Avatar
                            Richard PT Richard PT is offline
                               
                              Join Date: Aug 2014
                              Location: Portugal
                              Gender: Male
                              Nature: Calm
                              Posts: 91
                              Hi! I add your Pokemon world tournament script and the rest of the files resources, but when i tried to enter my game to test it, i got this error below:

                              Script 'PokemonWorldTournament' line 353: SyntaxError occurred.

                              What kind of error is this and how to fix this?
                              __________________
                              Reply With Quote
                                #16    
                              Old August 22nd, 2014 (5:52 AM).
                              mustafa505's Avatar
                              mustafa505 mustafa505 is offline
                              Developer
                                 
                                Join Date: Apr 2010
                                Location: Hoenn Region 4ver
                                Gender: Male
                                Nature: Lonely
                                Posts: 295
                                Maybe attaching a text file should fix the "browser eating code" glitch :D
                                __________________
                                Reply With Quote
                                  #17    
                                Old August 23rd, 2014 (4:03 PM). Edited August 23rd, 2014 by Florio.
                                Florio's Avatar
                                Florio Florio is offline
                                Pokemon Crimson Skies Owner
                                   
                                  Join Date: Nov 2008
                                  Location: Canada
                                  Gender: Male
                                  Nature: Lax
                                  Posts: 390
                                  Quote:
                                  Originally Posted by Richard PT View Post
                                  Hi! I add your Pokemon world tournament script and the rest of the files resources, but when i tried to enter my game to test it, i got this error below:

                                  Script 'PokemonWorldTournament' line 353: SyntaxError occurred.

                                  What kind of error is this and how to fix this?
                                  I am also getting this same error. I can't see anything wrong with it. Can I please get help?
                                  Quote:
                                  choices.push("Cancel cmd=Kernel.pbMessage(_INTL("Which Tournament would you like to participate in?"),choices,choices.index("Cancel return false if choices[cmd]=="Cancel"
                                  That is the line I get the error on.
                                  __________________
                                  Reply With Quote
                                    #18    
                                  Old August 25th, 2014 (10:42 AM).
                                  Luka S.J.'s Avatar
                                  Luka S.J. Luka S.J. is offline
                                  Jealous Croatian
                                     
                                    Join Date: Dec 2008
                                    Location: Croatia
                                    Age: 24
                                    Gender: Male
                                    Nature: Adamant
                                    Posts: 1,106
                                    The syntax error looks like it's because of missing brackets. Anyway, I don't have any errors at all, and it might just be me messing up something in this BBCode here, but just in case I pasted the current script I have to pastebin.

                                    Soo...get it here.
                                    Reply With Quote
                                      #19    
                                    Old August 25th, 2014 (1:50 PM).
                                    mej71's Avatar
                                    mej71 mej71 is offline
                                    • Moderator
                                     
                                    Join Date: Mar 2014
                                    Location: Omnipresence
                                    Gender: Male
                                    Posts: 1,219
                                    As someone on another thread has pointed out, you can get the correct script by using the "Show Printable Version" in Thread Tools
                                    Reply With Quote
                                      #20    
                                    Old September 2nd, 2014 (11:02 AM). Edited September 2nd, 2014 by Richard PT.
                                    Richard PT's Avatar
                                    Richard PT Richard PT is offline
                                       
                                      Join Date: Aug 2014
                                      Location: Portugal
                                      Gender: Male
                                      Nature: Calm
                                      Posts: 91
                                      Thanks a lot for your help guys, now it works just fine. Good script, thanks.

                                      How can i do to enable exp gain and money gain?
                                      __________________
                                      Reply With Quote
                                        #21    
                                      Old February 11th, 2015 (2:59 AM).
                                      FL's Avatar
                                      FL FL is offline
                                      Pokémon Island Creator
                                         
                                        Join Date: Sep 2010
                                        Gender: Male
                                        Posts: 1,719
                                        How to make overworlds appears at the stadiums between rounds

                                        [spoiler]PokéCommunity is breaking codes. For copying scripts at PokéCommunity: Click Thread Tools, and then Show Printable Version, and copy that instead.

                                        At the script, change

                                        [code] def initialize(announce=false)
                                        @sprites={}
                                        @viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
                                        @viewport.z=9999
                                        @sprites["scoreboard"]=Sprite.new(@viewport)
                                        @sprites["scoreboard"].bitmap=Bitmap.new(Graphics.width,Graphics.height)
                                        @sprites["scoreboard"].bitmap.fill_rect(0,0,Graphics.width,Graphics.height,Color.new(0,0,0))
                                        @sprites["scoreboard"].opacity=0

                                        $Trainer.battle_points=0 if !$Trainer.battle_points
                                        if !$Trainer.pwt_wins or $Trainer.pwt_wins.length
                                        Attached Thumbnails
                                        PWT Guide Event.png‎   PWT Controller Event.png‎  
                                        __________________
                                        Reply With Quote
                                          #22    
                                        Old May 1st, 2015 (7:17 AM).
                                        FL's Avatar
                                        FL FL is offline
                                        Pokémon Island Creator
                                           
                                          Join Date: Sep 2010
                                          Gender: Male
                                          Posts: 1,719
                                          Removing some tournament from list results in bugs. I made a fix:

                                          Spoiler:
                                          PokéCommunity is breaking codes. For copying scripts at PokéCommunity: Click Thread Tools, and then Show Printable Version, and copy that instead.

                                          Change the entire def chooseTournament into:

                                          Code:
                                            def chooseTournament
                                              choices = []
                                              # Picks the lastest index for tournaments that are available by start.
                                              availableOnStartIndex = nil
                                              for tournament in ["World Leaders","World Champions","Rental Masters","Mix Master"]
                                                availableOnStartIndex = BATTLE_LIST.index(tournament)
                                                break if availableOnStartIndex
                                              end
                                              availableOnStartIndex = BATTLE_LIST.size if !availableOnStartIndex
                                              for i in 0...availableOnStartIndex
                                                choices.push(BATTLE_LIST[i])
                                              end
                                              allBasicTournametBeated = true
                                              for tournament in ["Kanto Leaders","Johto Leaders","Hoenn Leaders","Sinnoh Leaders","Unova Leaders"]
                                                if BATTLE_LIST.include?(tournament) && $Trainer.pwt_wins[BATTLE_LIST.index(tournament)]==0
                                                  allBasicTournametBeated = false
                                                  break
                                                end  
                                              end
                                              if BATTLE_LIST.include?("World Leaders") && allBasicTournametBeated
                                                choices.push("World Leaders")
                                              end
                                              if BATTLE_LIST.include?("World Champions") && BATTLE_LIST.include?("Rental Masters") && $Trainer.pwt_wins[BATTLE_LIST.index("World Champions")]>0
                                                choices.push("Rental Masters")
                                              end
                                              if BATTLE_LIST.include?("World Champions") && BATTLE_LIST.include?("Mix Master") && $Trainer.pwt_wins[BATTLE_LIST.index("World Champions")]>0
                                                choices.push("Mix Master")
                                              end
                                              if BATTLE_LIST.include?("World Leaders") && BATTLE_LIST.include?("World Champions") && $Trainer.pwt_wins[BATTLE_LIST.index("World Leaders")]>0
                                                choices.push("World Champions")
                                              end
                                              choices.push("Cancel")
                                              cmd=Kernel.pbMessage(_INTL("Which Tournament would you like to participate in?"),choices,choices.index("Cancel"))
                                              return false if choices[cmd]=="Cancel"
                                              return cmd
                                            end
                                          __________________
                                          Reply With Quote
                                            #23    
                                          Old May 1st, 2015 (12:09 PM).
                                          akane159 akane159 is offline
                                             
                                            Join Date: Oct 2012
                                            Gender: Female
                                            Posts: 72
                                            hi, i have this error, if i change the entire "def chooseTournament" for the new one, i have this error
                                            Spoiler:


                                            but if i dont change the the entire def chooseTournament, the script work but wiht a error,
                                            if I go into the tournament , when it ends ( win or lose ), my pokemon are on another level,
                                            if was a tournament single , and i choose my pokemon they change his lvl to 50, but when it ends ,
                                            they do not return to their previous level :s
                                            Reply With Quote
                                              #24    
                                            Old May 8th, 2015 (2:06 PM).
                                            FL's Avatar
                                            FL FL is offline
                                            Pokémon Island Creator
                                               
                                              Join Date: Sep 2010
                                              Gender: Male
                                              Posts: 1,719
                                              Quote:
                                              Originally Posted by akane159 View Post
                                              hi, i have this error, if i change the entire "def chooseTournament" for the new one, i have this error
                                              Spoiler:


                                              but if i dont change the the entire def chooseTournament, the script work but wiht a error,
                                              if I go into the tournament , when it ends ( win or lose ), my pokemon are on another level,
                                              if was a tournament single , and i choose my pokemon they change his lvl to 50, but when it ends ,
                                              they do not return to their previous level :s
                                              Quote:
                                              Originally Posted by FL View Post
                                              PokéCommunity is breaking codes. For copying scripts at PokéCommunity: Click Thread Tools, and then Show Printable Version, and copy that instead.
                                              __________________
                                              Reply With Quote
                                                #25    
                                              Old June 3rd, 2015 (5:59 AM).
                                              Starlight Minun's Avatar
                                              Starlight Minun Starlight Minun is offline
                                              LoveEletric
                                                 
                                                Join Date: Nov 2014
                                                Posts: 21
                                                well that suck :/
                                                about the level cant back to normal
                                                Reply With Quote
                                                Reply

                                                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 2:42 AM.