[BETA] Tetris MOD v2.0

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Napoleon
Registered User
Posts: 413
Joined: Thu Jul 18, 2002 11:31 am

Post by Napoleon »

Yup.
User avatar
LaZeR
Registered User
Posts: 671
Joined: Sat Jun 29, 2002 8:38 pm
Contact:

Post by LaZeR »

Yea, hecks looks good as is so far only thing I can think of is what was already mentioned in making the "High Scores" tally from the top 10 or whatever instead of having to beat the current Highest to get listed 8) .

Then ofcourse we add like pacman, space invaders, missle command, ect... Image
Napoleon
Registered User
Posts: 413
Joined: Thu Jul 18, 2002 11:31 am

Post by Napoleon »

LaZeR wrote: Then ofcourse we add like pacman, space invaders, missle command, ect... Image


RPG's 8O Actually any game thats open source should be really easy to add once all the bugz get worked out of this one. :)
Iron-Monkey
Registered User
Posts: 284
Joined: Sat Nov 17, 2001 12:18 am
Location: California, USA

Post by Iron-Monkey »

How come when I click on the icon to get that pop-up game window, I don't get a message that says "I have so-and-so" points (I am using the point system) because I have about 130 points before I install this mod and I also don't get the message that says it costs so-and-so to play?

I did set it in the admin panel to have 10 points to play...etc.....
Napoleon
Registered User
Posts: 413
Joined: Thu Jul 18, 2002 11:31 am

Post by Napoleon »

Welp! I have to split, thanx go to LaZeR & Iron-Moneky for helping find most of the Bugz. I'll be back later tonight to answer any questions, help anyone else having trouble installing this MOD and hopefully have an update with all the bug fixes and TopTen fill/checker. l8r 8)
Napoleon
Registered User
Posts: 413
Joined: Thu Jul 18, 2002 11:31 am

Post by Napoleon »

Iron-Monkey wrote: How come when I click on the icon to get that pop-up game window, I don't get a message that says "I have so-and-so" points (I am using the point system) because I have about 130 points before I install this mod and I also don't get the message that says it costs so-and-so to play?

I did set it in the admin panel to have 10 points to play...etc.....


Hmmm it should have worked. I'll have a solution for you tonight. :)
Cyber_Chaos
Registered User
Posts: 39
Joined: Thu Oct 10, 2002 7:01 pm

Post by Cyber_Chaos »

Napoleon wrote:
Cyber_Chaos wrote:at my site when i go into the game it just shows some sidebars. Then i click on them and choose properties and it says: www.debat.fastweb.dk/phpbb2/games/tetris/bar-bh.gif... But my phpbb2 is direct at www.debat.fastweb.dk


I tried to register at your site to see whats going on but got an error : Could not insert data into user table. 8O But it sounds like I forgot to tell you to change all the phpbb2 directory names in the tetris.js file and tetris_body.tpl file. :oops:


I had a little problem with my board yesterday

try to register now! But dont try to read the messages in the forum. It is on danish! If it will not work now then i would have to change something.
User avatar
ilpil
Registered User
Posts: 98
Joined: Fri Dec 21, 2001 9:20 pm

Post by ilpil »

Napoleon wrote: Open up viewtopic.php and find :

Code: Select all

            $user_sig = ( $postrow[$i]['enable_sig'] && $postrow[$i]['user_sig'] != '' && $board_config['allow_sig'] ) ? $postrow[$i]['user_sig'] : '';
            $user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];
And change it to look like :

Code: Select all

        if ( $board_config['use_allowance_system'] )
        {
          if ($postrow[$i]['user_money'] >= $board_config['sig_charge'])
          {
            $user_sig = ( $postrow[$i]['enable_sig'] && $postrow[$i]['user_sig'] != '' && $board_config['allow_sig'] ) ? $postrow[$i]['user_sig'] : '';
            $user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];
          }
          else $user_sig = '';
        }
        else
        {
          $user_sig = ( $postrow[$i]['enable_sig'] && $postrow[$i]['user_sig'] != '' && $board_config['allow_sig'] ) ? $postrow[$i]['user_sig'] : '';
          $user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];
        }
This should check for a sig charge and will be in the next update. Crap I missed alot. :lol: :oops:


When I change to this, all the signatures disappear. Even if I set Sig cost to 0 (zero). They show up with the original code though. But I don't know if it that code does it's job (charging users who use signatures) Even those who have 1000+ plinkos/tokens can't show their signatures.

Edit2: And by the way, I think you have to add "http://" to the Copyright-links. Cuz now they're not working.

Edit3: It seems that I can't play the game if I have 1000 Tokens or more. Even how big the fee for playing is. If the user has under 1000 Tokens, it works, now it just says the "Get more Tokens"-message.
Iron-Monkey
Registered User
Posts: 284
Joined: Sat Nov 17, 2001 12:18 am
Location: California, USA

Post by Iron-Monkey »

Hmmm, I have this problem:

Does anyone have this problem? In the game, whenver I filled the first line, the line did not go away like it should and the next piece never come down. It just froze. Also, when I click on new game button. it didn't do anything either.

Any idea on how to fix this? Does anyone have this probem?
User avatar
melindeth
Registered User
Posts: 32
Joined: Sun Feb 10, 2002 4:31 am
Location: USA
Contact:

Freeze

Post by melindeth »

I have the freeze problem also. Napoleon is working on it I think.
Friends are like wedgies. They are intimately close. They know your inner-self. And it feels good when you pick out a good one!
Napoleon
Registered User
Posts: 413
Joined: Thu Jul 18, 2002 11:31 am

Post by Napoleon »

This problem may be due to taking the sound out. I know the sound dosen't work for melindeth, but I'm wondering if Iron-Monkey pulled his sound out too? :) If so then you need to take every instance of the sound out. The gamelib_core.js & gamelib_sound.js files as well as anywhere in the code that loads a Midi or wav plus any routines that says "playmusic". If you haven't done anything to the sound then send me a copy of your tetris source. Do Not Post it here plz. you can send it to me through e-mail which my address is in the bar below. ;)
Napoleon
Registered User
Posts: 413
Joined: Thu Jul 18, 2002 11:31 am

Post by Napoleon »

ilpil wrote:
Napoleon wrote: --8<-- *SNIP* --8<--


When I change to this, all the signatures disappear. Even if I set Sig cost to 0 (zero). They show up with the original code though. But I don't know if it that code does it's job (charging users who use signatures) Even those who have 1000+ plinkos/tokens can't show their signatures.


Did you turn the Point System on or the Allowance system?
ilpil wrote: Edit2: And by the way, I think you have to add "http://" to the Copyright-links. Cuz now they're not working.


??? Link to what and why? I don't understand that line.
ilpil wrote: Edit3: It seems that I can't play the game if I have 1000 Tokens or more. Even how big the fee for playing is. If the user has under 1000 Tokens, it works, now it just says the "Get more Tokens"-message.


Did you turn the Point System on or the Allowance system?
Napoleon
Registered User
Posts: 413
Joined: Thu Jul 18, 2002 11:31 am

Post by Napoleon »

Another slip made it past the install file, please open the tetris.php file and find :

Code: Select all

// Generate page
$template->assign_vars(array('USERNAME' => $userdata['username'],
                             'USERID' => $userdata['user_id'],
                             'MONEY' => $userdata['user_money'],
                             'N_MONEY' => $board_config['money_name'],
                                                          
                             'TETRIS_CO' => $tetris_co,
                             'TETRIS_BS' => $tetris_bs,

                             'S_TETRIS_ACTION' => append_sid('activity.'.$phpEx.'?mode=new_tetris_hs'))
);
And replace it with :

Code: Select all

// Generate page
if( $board_config['use_allowance_system'] )
{
  $template->assign_vars(array('USERNAME' => $userdata['username'],
                               'USERID' => $userdata['user_id'],
                               'MONEY' => $userdata['user_money'],
                               'N_MONEY' => $board_config['money_name'],
                                                          
                               'TETRIS_CO' => $tetris_co,
                               'TETRIS_BS' => $tetris_bs,

                               'S_TETRIS_ACTION' => append_sid('activity.'.$phpEx.'?mode=new_tetris_hs'))
  );
}
else if ( $board_config['use_point_system'] )
{
  $template->assign_vars(array('USERNAME' => $userdata['username'],
                               'USERID' => $userdata['user_id'],
                               'MONEY' => $userdata['user_points'],
                               'N_MONEY' => $board_config['points_name'],
                                                          
                               'TETRIS_CO' => $tetris_co,
                               'TETRIS_BS' => $tetris_bs,

                               'S_TETRIS_ACTION' => append_sid('activity.'.$phpEx.'?mode=new_tetris_hs'))
  );
}


Open tetris.js and find

Code: Select all

function init(id,user,money,nmoney,cost,hsb)
{
  game_started = 0;

  user_id = id;
  user_name = user;
  user_money = money;
  money_name = nmoney;
And replace it with

Code: Select all

function init(id,user,money,nmoney,cost,hsb)
{
  game_started = 0;

  user_id = id;
  user_name = user;
  user_money = parseInt(money);
  money_name = nmoney;
This will fix the "No confirmation" bug. :)
Last edited by Napoleon on Wed Nov 13, 2002 5:42 pm, edited 3 times in total.
Napoleon
Registered User
Posts: 413
Joined: Thu Jul 18, 2002 11:31 am

Post by Napoleon »

New update for the TopTen list, open activity.php and find :

Code: Select all

if (( $board_config['use_allowance_system'] ) || ( $board_config['use_point_system'] ))
      {
        $ts_money = ($ts_money + $tetris_bs);
      }
      else $ts_money = 0;
    } 
and add after :

Code: Select all

     else if ($ts_score > 0) // Insert user if the score is empty.
    {
      if (($tetris_tn2 == '-:-') || ($ts_score > $tetris_ts2))
      {
        if ($ts_score > $tetris_ts2)
        {
          // Bump the scores
          $tetris_ts10 = $tetris_ts9; $tetris_tn10 = $tetris_tn9;
          $tetris_ts9 = $tetris_ts8; $tetris_tn9 = $tetris_tn8;
          $tetris_ts8 = $tetris_ts7; $tetris_tn8 = $tetris_tn7;
          $tetris_ts7 = $tetris_ts6; $tetris_tn7 = $tetris_tn6;
          $tetris_ts6 = $tetris_ts5; $tetris_tn6 = $tetris_tn5;
          $tetris_ts5 = $tetris_ts4; $tetris_tn5 = $tetris_tn4;
          $tetris_ts4 = $tetris_ts3; $tetris_tn4 = $tetris_tn3;
          $tetris_ts3 = $tetris_ts2; $tetris_tn3 = $tetris_tn2;
        }
        $tetris_ts2 = $ts_score;
        $tetris_tn2 = $ts_name;
      }
      else if (($tetris_tn3 == '-:-') || ($ts_score > $tetris_ts3))
      {
        if ($ts_score > $tetris_ts3)
        {
          // Bump the scores
          $tetris_ts10 = $tetris_ts9; $tetris_tn10 = $tetris_tn9;
          $tetris_ts9 = $tetris_ts8; $tetris_tn9 = $tetris_tn8;
          $tetris_ts8 = $tetris_ts7; $tetris_tn8 = $tetris_tn7;
          $tetris_ts7 = $tetris_ts6; $tetris_tn7 = $tetris_tn6;
          $tetris_ts6 = $tetris_ts5; $tetris_tn6 = $tetris_tn5;
          $tetris_ts5 = $tetris_ts4; $tetris_tn5 = $tetris_tn4;
          $tetris_ts4 = $tetris_ts3; $tetris_tn4 = $tetris_tn3;
        }
        $tetris_ts3 = $ts_score;
        $tetris_tn3 = $ts_name;
      }
      else if (($tetris_tn4 == '-:-') || ($ts_score > $tetris_ts4))
      {
        if ($ts_score > $tetris_ts4)
        {
          // Bump the scores
          $tetris_ts10 = $tetris_ts9; $tetris_tn10 = $tetris_tn9;
          $tetris_ts9 = $tetris_ts8; $tetris_tn9 = $tetris_tn8;
          $tetris_ts8 = $tetris_ts7; $tetris_tn8 = $tetris_tn7;
          $tetris_ts7 = $tetris_ts6; $tetris_tn7 = $tetris_tn6;
          $tetris_ts6 = $tetris_ts5; $tetris_tn6 = $tetris_tn5;
          $tetris_ts5 = $tetris_ts4; $tetris_tn5 = $tetris_tn4;
        }
        $tetris_ts4 = $ts_score;
        $tetris_tn4 = $ts_name;
      }
      else if (($tetris_tn5 == '-:-') || ($ts_score > $tetris_ts5))
      {
        if ($ts_score > $tetris_ts5)
        {
          // Bump the scores
          $tetris_ts10 = $tetris_ts9; $tetris_tn10 = $tetris_tn9;
          $tetris_ts9 = $tetris_ts8; $tetris_tn9 = $tetris_tn8;
          $tetris_ts8 = $tetris_ts7; $tetris_tn8 = $tetris_tn7;
          $tetris_ts7 = $tetris_ts6; $tetris_tn7 = $tetris_tn6;
          $tetris_ts6 = $tetris_ts5; $tetris_tn6 = $tetris_tn5;
        }
        $tetris_ts5 = $ts_score;
        $tetris_tn5 = $ts_name;
      }
      else if (($tetris_tn6 == '-:-') || ($ts_score > $tetris_ts6))
      {
        if ($ts_score > $tetris_ts6)
        {
          // Bump the scores
          $tetris_ts10 = $tetris_ts9; $tetris_tn10 = $tetris_tn9;
          $tetris_ts9 = $tetris_ts8; $tetris_tn9 = $tetris_tn8;
          $tetris_ts8 = $tetris_ts7; $tetris_tn8 = $tetris_tn7;
          $tetris_ts7 = $tetris_ts6; $tetris_tn7 = $tetris_tn6;
        }
        $tetris_ts6 = $ts_score;
        $tetris_tn6 = $ts_name;
      }
      else if (($tetris_tn7 == '-:-') || ($ts_score > $tetris_ts7))
      {
        if ($ts_score > $tetris_ts7)
        {
          // Bump the scores
          $tetris_ts10 = $tetris_ts9; $tetris_tn10 = $tetris_tn9;
          $tetris_ts9 = $tetris_ts8; $tetris_tn9 = $tetris_tn8;
          $tetris_ts8 = $tetris_ts7; $tetris_tn8 = $tetris_tn7;
        }
        $tetris_ts7 = $ts_score;
        $tetris_tn7 = $ts_name;
      }
      else if (($tetris_tn8 == '-:-') || ($ts_score > $tetris_ts8))
      {
        if ($ts_score > $tetris_ts8)
        {
          // Bump the scores
          $tetris_ts10 = $tetris_ts9; $tetris_tn10 = $tetris_tn9;
          $tetris_ts9 = $tetris_ts8; $tetris_tn9 = $tetris_tn8;
        }
        $tetris_ts8 = $ts_score;
        $tetris_tn8 = $ts_name;
      }
      else if (($tetris_tn9 == '-:-') || ($ts_score > $tetris_ts9))
      {
        if ($ts_score > $tetris_ts9)
        {
          // Bump the scores
          $tetris_ts10 = $tetris_ts9; $tetris_tn10 = $tetris_tn9;
        }
        $tetris_ts9 = $ts_score;
        $tetris_tn9 = $ts_name;
      }
      else if (($tetris_tn10 == '-:-') || ($ts_score > $tetris_ts10))
      {
        $tetris_ts10 = $ts_score;
        $tetris_tn10 = $ts_name;
      }

      $sql = "UPDATE " . GK . "
              SET tetris_ts1 = '$tetris_ts1', tetris_tn1 = '$tetris_tn1', tetris_ts2 = '$tetris_ts2', tetris_tn2 = '$tetris_tn2', tetris_ts3 = '$tetris_ts3', tetris_tn3 = '$tetris_tn3', tetris_ts4 = '$tetris_ts4', tetris_tn4 = '$tetris_tn4', tetris_ts5 = '$tetris_ts5', tetris_tn5 = '$tetris_tn5', tetris_ts6 = '$tetris_ts6', tetris_tn6 = '$tetris_tn6', tetris_ts7 = '$tetris_ts7', tetris_tn7 = '$tetris_tn7', tetris_ts8 = '$tetris_ts8', tetris_tn8 = '$tetris_tn8', tetris_ts9 = '$tetris_ts9', tetris_tn9 = '$tetris_tn9', tetris_ts10 = '$tetris_ts10', tetris_tn10 = '$tetris_tn10' ";
      if (!$db->sql_query($sql))
      {
        message_die(GENERAL_ERROR, 'Could not update Gk data', '', __LINE__, __FILE__, $sql);
      }
    }
This'll be in the next update, sorry for the wait.
Xiph3r
Registered User
Posts: 342
Joined: Sun Oct 27, 2002 8:21 pm
Location: the wired
Contact:

Post by Xiph3r »

hey i got the game working but i seem to have a few problemsi didnt edit of the files that said to skip in the instructions and the game plays but somehow my memberlist got screwed up, and it wont accept my points to play i am using the point system mod my forums can be located at

http://zcb.flagrun.net/phpBB2/index.php

also the link on the top for the activitys where do i find that so i can move it it kinda messes up the sublack3d theme
Locked

Return to “[2.0.x] MODs in Development”