Jump to content

mike1313

Members
  • Posts

    116
  • Joined

  • Last visited

Posts posted by mike1313

  1. Is there any way to stop a user from hitting refresh and sending a form over again after they have done it once? I've tried $_SERVER['HTTP_REFERER']; but nothing any help is appreciated.

  2. If you want the fields they are as such for the db table

     

    id - auto_increment

    order (int)

    item (varchar)

    type(varchar)

    effect(int)

    equipped(varchar)

    req_lvl (int)

     

    Each time someone puts something into the armory it makes a new row.

  3. $arm = mysql_query("SELECT * FROM order_arm WHERE `order`='$order[id]' ORDER by effect asc");
          while ($armo = mysql_fetch_array($arm)) {
           if($armo[type] == "Weapon"){ $t = "W";}
           if($armo[type] == "Armor"){ $t = "A";}
          echo "<tr><td><li type=square></td><td>[<b>$t</b>]</td><td>$armo[item]</td><td> [<b>E</b>]:  $armo[effect]</td></tr>"; }

  4. Okay so for my MMORPG, there are player-owned guilds that have an armory where they can store their weps/armor but when it shows what the armory holds if it is more than one of the same item they stack instead of showing

     

    Sword

    Sword

     

    I want it to display 2 Sword. How can I do this?

     

    while ($armo = mysql_fetch_array($arm)) {
           if($armo[type] == "Weapon"){ $t = "W";}
           if($armo[type] == "Armor"){ $t = "A";}
          echo "<tr><td><li type=square></td><td>[<b>$t</b>]</td><td>$armo[item]</td><td> [<b>E</b>]:  $armo[effect]</td></tr>"; }

  5. no thats returned negative. I had this....

     

    <? 
    $sixamtime = ((((time() / 60) / 24) / 3600) / 7);
    $six = 60 * 6;
            $total_time = 1440;
    
            $percentage = round((($total_time / $sixamtime) / 100) * 100);
    
    echo "$percentage";
    ?>

  6. Ok say I have a script that runs every 15 mins, 15, 30,45, 0 .how would I calculate the amount of time left until it has to run again with the percent getting higher as it is getting closer to the 15 mins. Say its 1:20 How would I return the percentage of time from 1:20 to 1:30 etc?

  7. OK so I want it to display all the players but for some reason its only displaying one any suggestions?

     

    $url = "images/Eden_ISOtest_VIEW.jpg";
    $url_admin = "images/admin_body.png";
    $im = @imagecreatefromjpeg($url) or die("Cannot Initialize new GD image stream");
    $background_color = imagecolorallocate($im, 255, 255, 255);
    $text_color = imagecolorallocate($im, 233, 14, 91);
    $red = imagecolorallocate($im, 255, 0, 0);
    $yellow = imagecolorallocate($im, 173, 255, 47);
    $white = imagecolorallocate($im, 255,255,255);
    $black = imagecolorallocate($im, 0,0,0);
    imagerectangle($im, 0, 0, 504, 504, $black);
    
    
    $query = mysql_query("select * from players");
    while ($pos = mysql_fetch_array($query)){
    $coords = "($pos[x], $pos[y])";
    imageString($im, 1, ($pos[x]+3), ($pos[y]-6), $pos[username], $black);
    imageString($im, 1, ($pos[x]+2), ($pos[y]+3), $coords, $black);
    
      if ($pos[pos] == "Admin") { 
    
      $insert32 = imagecreatefrompng("images/devil.png"); 
      $insert_x32 = imagesx($insert32); 
      $insert_y32 = imagesy($insert32); 
    
      imagecopymerge($im,$insert32,$pos[x],$pos[y],0,0,12,$insert_y32,100); 
    
    
      imagepng($im,"",100); 
    
      } 
       
    else {
      $insertx = @imagecreatefrompng("images/devil.png"); 
      $insert_xx = imagesx($insertx); 
      $insert_yx = imagesy($insertx); 
    
      imagecopymerge($im,$insertx,$pos[x],$pos[y],0,0,12,$insert_yx,100); 
    
    
      imagepng($im,"",100); 
      
      }
    }
    
    imagepng($im);
    
    imagedestroy($im);

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.