Register for your free account! | Forgot your password?

You last visited: Today at 02:50

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Itemshop problem

Discussion on Itemshop problem within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2008
Posts: 69
Received Thanks: 3
Itemshop problem

Hy everyone,I have an itemshop script,and it worked untill now, but I reinstalled the server because of some problemsand now it doesn't works anymore.Here are itemshop.php and is_buy.php .The problem is that I can buy multiple items,but only one appears in the itemshop inside the storekeeper,and sometimes,none.The space is occupied in the "MALL" but nothing appears in game.Can you tell me what is the problem please? I use profizocker94' SF .Thank you anticipated

IS_BUY.PHP
PHP Code:
<?PHP

  
if(isset($_SESSION['user_admin']) && checkInt($_SESSION['user_admin']) && $_SESSION['user_admin']>=0) {
  
    if(isset(
$_GET['id']) && checkInt($_GET['id'])) {
    
      
$sqlCmd="SELECT vnum, preis, attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6, socket0, socket1, socket2 FROM ".SQL_HP_DB.".is_items WHERE id='".$_GET['id']."' LIMIT 1";
      
$sqlQry=mysql_query($sqlCmd,$sqlHp);
      if(
mysql_num_rows($sqlQry)==1) {
      
        
$getItem=mysql_fetch_object($sqlQry);
        if(
$_SESSION['user_coins']>=$getItem->preis) {
      
          
$getGroesse compareItems($getItem->vnum);
          
$belPos checkPos($_SESSION['user_id']);
          
$possiblePos findPos($belPos['islager'],$getGroesse['groesse']);
          if(!empty(
$possiblePos)) {
          
            
$sqlCmd="UPDATE account.account SET coins=coins-".$getItem->preis." WHERE id='".$_SESSION['user_id']."' LIMIT 1";
            
$sqlQry=mysql_query($sqlCmd,$sqlServ);
            
$sqlLog="INSERT INTO ".SQL_HP_DB.".is_log (account_id,vnum,preis,zeitpunkt) VALUES ('".$_SESSION['user_id']."','".$getItem->vnum."','".$getItem->preis."','".$sqlZeit."')";
            
$qryLog=mysql_query($sqlLog,$sqlHp);
            
$sqlItem="INSERT INTO player.item 
            (owner_id,window,pos,count,vnum,attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6, socket0, socket1, socket2)
            VALUES 
            ('"
.$_SESSION['user_id']."','MALL','".$possiblePos[0]."','1','".$getItem->vnum."','".$getItem->attrtype0."', '".$getItem->attrvalue0."', '".$getItem->attrtype1."', '".$getItem->attrvalue1."', '".$getItem->attrtype2."', '".$getItem->attrvalue2."', '".$getItem->attrtype3."', '".$getItem->attrvalue3."', '".$getItem->attrtype4."', '".$getItem->attrvalue4."', '".$getItem->attrtype5."', '".$getItem->attrvalue5."', '".$getItem->attrtype6."', '".$getItem->attrvalue6."', '".$getItem->socket0."', '".$getItem->socket1."', '".$getItem->socket2."')";
            
$qryItem=mysql_query($sqlItem,$sqlServ) or die(mysql_error());
            echo
'<p class="meldung">Elementul a fost achizitionat cu succes! Daca elementul nu apare in Depozit(ItemShop), va rugam sa contactati un administrator.</p>';
            
          }
          else {
            echo
'<p>Nu aveti suficient spatiu in Depozit(ItemShop). Soldul dvs. nu sa schimbat.</p>';
          }
          
        }
        else {
          echo
'<p class="meldung">Nu aveti suficiente Monede Dragon!</p>';
        }
      }
      else {
        echo
'<p class="meldung">Elementul specificat nu exista.</p>';
      }
    }
    else {
      echo
'<p class="meldung">Es wurde keine gültige ID eingegeben.</p>';
    }
    echo
'<p><a href="javascript:history.back()">Inapoi</a></p>';
  }
  else {
    echo
'<p class="meldung">Trebuie sa fi logat.</p>';
  }
?>

ITEMSHOP.PHP
PHP Code:
<?PHP

  
if(isset($_SESSION['user_admin']) && checkInt($_SESSION['user_admin']) && $_SESSION['user_admin']>=0) {
    if(isset(
$_GET['k']) && checkInt($_GET['k'])) {
      
$sqlCmdS="SELECT * FROM ".SQL_HP_DB.".is_items WHERE kategorie_id='".$_GET['k']."' ORDER BY id DESC";
    }
    else {
      
$sqlCmdS="SELECT * FROM ".SQL_HP_DB.".is_items ORDER BY id DESC";
    }
  
?>
  <div id="isleft">
  <h2>Credit</h2>
    <p><b><?PHP echo $_SESSION['user_coins']; ?> Coins</b></p>
    <h2>Categorii</h2>
    <ul>
      <?PHP
        $sqlCmd 
"SELECT * FROM ".SQL_HP_DB.".is_kategorien ORDER BY titel ASC;";
        
$sqlQry mysql_query($sqlCmd,$sqlHp);
        while(
$getKats mysql_fetch_object($sqlQry)) {
          echo
'<li><a href="index.php?s=itemshop&k='.$getKats->id.'">'.$getKats->titel.'</a></li>';
        }
      
?>
    </ul>
  </div>
  <div id="isright">
    <h2>Item Shop</h2>
      <table>
    <?PHP
      $sqlQry
=mysql_query($sqlCmdS,$sqlHp);
      while(
$getItems=mysql_fetch_object($sqlQry)) {
        
$aktItem compareItems($getItems->vnum);
        
$itemStufe = (checkInt($aktItem['stufe'])) ? "+".$aktItem['stufe'] : '';
        
?>
        <tr>
          <th colspan="2" class="topLine"><?PHP echo $aktItem['item'].$itemStufe?> (<b><?PHP echo $getItems->preis?> Coins</b>)</th>
        </tr>
        <tr>
          <td class="isImg">
            <?PHP 
              
if(!empty($getItems->bild)) echo'<img src="./is_img/'.$getItems->bild.'" title="'.$aktItem['item'].'" alt="'.$aktItem['item'].'"/>';
            
?>
          </td>
          <td class="tdunkel"><?PHP echo $getItems->beschreibung?></td>
        </tr>
        <tr>
          <td colspan="2" class="isBuy"><a href="index.php?s=is_buy&id=<?PHP echo $getItems->id?>">Cumpara</a></td>
        </tr>
        <?PHP
      
}
    
?>
      </table>
  </div>
  <?PHP
  
}
  else {
    echo
'<p class="meldung">Trebuie sa fi logat!</p>';
  }
?>
Cosmyn2010 is offline  
Reply


Similar Threads Similar Threads
[Problem]Itemshop
04/04/2011 - Metin2 Private Server - 1 Replies
Guten Abend Elitepvpers.. Ich habe ein Problem. Immer wenn ich eine Sache im Itemshop kaufe bekomme ich sie 2 mal ins Lager. Ich weiß nicht woran es liegt Ich hoffe ihr könnt mir helfen Mfg.
HP:ItemShop Problem
09/13/2010 - Metin2 Private Server - 0 Replies
Hey com, Ich hab die HP von werdanator V3.0. Problembeschreibung: Ich geh auf meine HP will Itemshop sachen hinzufügen (funzt)
Itemshop Problem
06/11/2010 - Metin2 - 4 Replies
Wir haben ein Problem mit dem Itemshop .. Alle Items im Itemshop auf dem Server (..) sind kostenlos .. Kennt jemand den Grund für dieses Ereignis? Danke im Voraus.. Mit freundlichen Grüßen , TheForce
[HP] Problem mit dem Itemshop
04/11/2010 - Metin2 Private Server - 8 Replies
Hallo Community! Ich habe mir heute das HP-Script von werdernator heruntergeladen ( http://www.elitepvpers.com/forum/metin2-pserver-gui des-strategies/451847-homepage-release-exklusiv-de sign-ranking-etc-etc.html ) und erfolgreich installiert. Nachdem ich nun also erfolgreich einen neuen Account erstellt haben (ingame unterwegs war) und alles funktioniert hat, wollte ich den Itemshop ausprobieren. Nachdem ich Benutzernamen und Passwort eingegeben habe, kommt folgende Fehlermeldung: ...
Itemshop Problem
03/07/2010 - Metin2 Private Server - 4 Replies
Hi com, Habe ein Itemshop in meinem p server NATÜRLICH alles kostenlos wer nicht glaub kan daten per pn haben^^ also mein problem ist wen sich meine member ausm item shop eq machen Kan man bei denen keine Steine hinzufügen woran liegt das?? mfg 55amina55



All times are GMT +1. The time now is 02:51.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.