Announcement

Collapse
No announcement yet.

2dragons

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    where'd that inactive TWEL forum go? :[
    ...

    Comment


    • #17
      blah, forget my last post, I just realized you can use 5 digit objon numbers...
      Ban Ikrit

      Comment


      • #18
        ok, here we go again, this time we'll play string concatenation instead of int adding

        first, we start w/ a blank string... ""

        then add 1 for wb, 2 for jav, or 3 for spider.

        then we add the row number (row 4 = 04, row 2 = 02 row 14 = 14)

        then we add the position on the row (there are 4 spaces on each row (2 before the -, 2 after it) numbered 0, 1, 2, 3 according

        then we add the number we want to place there 0-9

        so if we wanted to set row 5 of javs to the score 05-08 we'd do:

        20510
        20525
        20530
        20538

        for objons
        Ban Ikrit

        Comment


        • #19
          Originally posted by Awesome
          where'd that inactive TWEL forum go? :[
          I ate it, twas delicious.
          ♪♫♪♫♪♫♪♫♪♫♪♫
          Failure teaches success.
          .
          

          Comment


          • #20
            Code:
            String boxToRow[] = {"","01","01","02","03","02","04","03","05","04","06","05","07","08","06","09","07","10","08","11","09","12","13","14","10"}
            
            public void redoBox(int gameType, int box, int score1, int score2)
            {
            	String row = boxToRow[box];
            	oldOff(gameType, row, 0, score1);
            	oldOff(gameType, row, 2, score2);
            	newOn(gameType, row, 0, score1);
            	newOn(gameType, row, 2, score2);
            }
            
            public void oldOff(int gameType, String row, int pos, int score)
            {
            	int tensScore = score / 10;
            	int onesScore = score % 10;
            	if(onesScore != 0)
            	{
            		m_botAction.sendUnfilteredPublicMessage("*objoff " + gameType + row + pos + tensScore);
            		m_botAction.sendUnfilteredPublicMessage("*objoff " + gameType + row + (pos + 1) + (onesScore - 1));
            	}
            	else
            	{
            		m_botAction.sendUnfilteredPublicMessage("*objoff " + gameType + row + pos + (tensScore - 1));
            		m_botAction.sendUnfilteredPublicMessage("*objoff " + gameType + row + (pos + 1) + 9);
            	}
            }
            
            public void newOn(int gameType, String row, int pos, int score)
            {
            	int tensScore = score / 10;
            	int onesScore = score % 10;
            	m_botAction.sendUnfilteredPublicMessage("*objon " + gameType + row + pos + tensScore);
            	m_botAction.sendUnfilteredPublicMessage("*objon " + gameType + row + (pos + 1) + onesScore);
            }


            assuming I did that stuff right (12:30am here... and tired) that'd be the code that you could use to turn the redo the objons for the thing whenever a score changes. You'd just have to call redoBox method using the parameters:

            gameType - 1,2, or 3... wb, jav, spid respectively
            box- box number they are in
            score1- score of the first player
            score2- score of the second player

            and it'd do the rest
            Last edited by Ikrit; 11-01-2004, 02:34 AM.
            Ban Ikrit

            Comment


            • #21
              for good measure I'm throwing this method in too...

              Code:
              public void finalOff(int gameType, int box, int score1, int score2)
              {
              	int tensScore = score1 / 10;
              	int onesScore = score1 % 10
              	m_botAction.sendUnfilteredPublicMessage("*objoff " + gameType + boxToRow[box] + 0 + tensScore);
              	m_botAction.sendUnfilteredPublicMessage("*objoff " + gameType + boxToRow[box] + 1 + onesScore);
              
              	tensScore = score2 / 10;
              	onesScore = score2 % 10
              	m_botAction.sendUnfilteredPublicMessage("*objoff " + gameType + boxToRow[box] + 2 + tensScore);
              	m_botAction.sendUnfilteredPublicMessage("*objoff " + gameType + boxToRow[box] + 3 + onesScore);


              of course... I'm pretty dumb sometimes so you might wanna check the code especially after I wake up after a whole 4 hours of sleep...
              Ban Ikrit

              Comment


              • #22
                mm Java..yummy :P
                of course i'm only in introcs and that just looks like blabbering to me. hehe
                thread killer

                Also who changed to pw to Squadless, how am I supposed to fly the banner of sucking at the game

                Comment


                • #23
                  hey jacen can I steal that code ?
                  Str8 Thuggin> ghet me banned
                  Nightattack> help me ^_^

                  Comment


                  • #24
                    go ahead , not too sure how much it'll help outside of the DuelBot stuff but have fun w/ it
                    Ban Ikrit

                    Comment


                    • #25
                      hmmm, were the playoffs for season 2 even run? i dont think so or i was just soooo high that i didnt notice.

                      Comment


                      • #26
                        Jacen Solo has confused me.
                        EvoLd> Roboqueen died again?
                        cool koen> :)
                        PRiMORDiAL> pfft
                        cool koen> not because of a bug
                        EvoLd> Lol
                        Treachery> meh
                        EvoLd> why then?
                        PubAceR> women in power dont last
                        EvoLd> LOl
                        toaster oven reviews

                        Comment


                        • #27
                          Originally posted by Dim
                          Jacen Solo has confused me.
                          You and me both :fear:

                          Comment


                          • #28
                            ummm...... how did I confuse people? :sorry: :imstupid: :homestar:
                            Ban Ikrit

                            Comment


                            • #29
                              i know this is a old and dead thread but any chance of a update on how the duel bot is doing?
                              Cat: You'd never get a cat to be a servant. You ever see a cat return a stick? 'Hey man. You threw the stick, you go and get it yourself, I'm busy. If you wanted the stick so bad, why'd you throw it away in the first place?'

                              Comment


                              • #30
                                I just realised you live in Scotland! I laugh at your misfortune.
                                EvoLd> Roboqueen died again?
                                cool koen> :)
                                PRiMORDiAL> pfft
                                cool koen> not because of a bug
                                EvoLd> Lol
                                Treachery> meh
                                EvoLd> why then?
                                PubAceR> women in power dont last
                                EvoLd> LOl
                                toaster oven reviews

                                Comment

                                Working...
                                X