Register for your free account! | Forgot your password?

You last visited: Today at 07:09

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

Advertisement



ItemShop Problemm

Discussion on ItemShop Problemm within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1

 
elite*gold: 98
Join Date: May 2011
Posts: 115
Received Thanks: 33
ItemShop Problemm

Hallo Liebe Com

Ich habe ein problemm und zwar wenn mann im is shop kauft bekommt mann die items dopplet wiso ist das so

bzw

wo kann mann das einstellen

MFG
xdjdarkboyx is offline  
Old 05/19/2011, 18:53   #2
 
.Plazmaa's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 2,023
Received Thanks: 947
Dafür verantwortlich ist die is_buy.php .

Poste sie ambesten hier mal rein , dann kann man dir mehr helfen.
.Plazmaa is offline  
Thanks
1 User
Old 05/19/2011, 18:57   #3

 
elite*gold: 98
Join Date: May 2011
Posts: 115
Received Thanks: 33
hier danke für eure hilfe erst ma




PHP Code:
<div id="content">            <div class="postui2 text-title">
                    <h2>
                    Registration ONLINE!!!!!
                    
                    </h2>
                
                </div>
                <div class="postui2 text-con">
                <div class="con-wrap">
<?PHP

    
function canBuy()
    {
        if(!isset(
$_SESSION['nextBuy']))
        {
            
$_SESSION['nextBuy']=time();
        }
        
        if(
$_SESSION['nextBuy']<=time())
        {
            
$_SESSION['nextBuy']=time()+0;
            return 
true;
        }
        else
            return 
false;
    }

  if(isset(
$_SESSION['user_admin']) && checkInt($_SESSION['user_admin']) && $_SESSION['user_admin']>=0) {
  
    echo
'<h2>Itemshop - Einkauf</h2>';
    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']."' AND anzeigen='J' LIMIT 1";
      
$sqlQry=mysql_query($sqlCmd,$sqlHp);
      if(
mysql_num_rows($sqlQry)==1) {
      
        
$getItem=mysql_fetch_object($sqlQry);
        
        
$sqlCoins "SELECT coins FROM account.account WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."' LIMIT 1";
        
$qryCoins mysql_query($sqlCoins,$sqlServ);
        
$getCoins mysql_fetch_object($qryCoins);
        
        if(
canBuy())
        {
            if((
$getCoins->coins)>=$getItem->preis) {
          
              
$getGroesse compareItems($getItem->vnum);
              
$belPos checkPos($_SESSION['user_id']);
              
$possiblePos findPos($belPos['islager'],$getGroesse['groesse']);
              if(!empty(
$possiblePos)) {
                
                
$nCoins $getCoins->coins-$getItem->preis;
                
                
$sqlCmd="UPDATE account.account SET coins='".mysql_real_escape_string($nCoins)."' WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."' LIMIT 1";
                
$sqlQry=mysql_query($sqlCmd,$sqlServ);
                
                
$sqlLog="INSERT INTO ".SQL_HP_DB.".is_log (account_id,vnum,preis,zeitpunkt) VALUES ('".mysql_real_escape_string($_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 
                ('"
.mysql_real_escape_string($_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."1', '".$getItem->socket1."1', '".$getItem->socket2."1')";
                
$qryItem=mysql_query($sqlItem,$sqlServ) or die(mysql_error());
                
                echo
'<p class="meldung">Das item wurde erfolgreich gekauft. Sollte das Item nicht im Lager erscheinen, bitte umgehend bei einem Admin melden.</p>';
                
              }
              else {
                echo
'<p>Sie haben nicht genügend Platz in ihrem Itemshop-Lager. Ihr Guthaben wurde nicht verändert.</p>';
              }
              
            }
            else {
              echo
'<p class="meldung">Sie haben nicht genug Coins.</p>';
            }
        }
        else
        {
            echo
'<p class="meldung">Es kann nur alle 5 Sekunden ein Item gekauft werden.</p>';
        }
      }
      else {
        echo
'<p class="meldung">Das angegebe Item existiert nicht.</p>';
      }
    }
    else {
      echo
'<p class="meldung">Es wurde keine gültige ID eingegeben.</p>';
    }
    echo
'<p><a href="javascript:history.back()">zurück</a></p>';
  }
  else {
    echo
'<p class="meldung">Sie müssen für diesen Bereich angemeldet sein.</p>';
  }
?>




                </div>

  </div> 
                <div class="postui2 text-end">
             
                
                  
    </div></div>
xdjdarkboyx is offline  
Old 05/20/2011, 19:01   #4

 
elite*gold: 98
Join Date: May 2011
Posts: 115
Received Thanks: 33
push
xdjdarkboyx is offline  
Old 05/20/2011, 19:15   #5
 
elite*gold: 0
Join Date: Apr 2011
Posts: 901
Received Thanks: 164
, . Pushen nicht erlaubt
xAlbStaR™ is offline  
Old 05/20/2011, 19:29   #6
 
.Plazmaa's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 2,023
Received Thanks: 947
Quote:
Originally Posted by xAlbStaR™ View Post
, . Pushen nicht erlaubt
Solche unnötigen Spam posts ebenfalls nicht.
#rep
_______________________________________

Habe mich geirrt , an der is_buy liegt es nicht.
Ich schau gleich mal.
.Plazmaa is offline  
Old 05/20/2011, 21:25   #7
 
nostradame37's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 2,504
Received Thanks: 870
Quote:
Originally Posted by xdjdarkboyx View Post
Hallo Liebe Com

Ich habe ein problemm und zwar wenn mann im is shop kauft bekommt mann die items dopplet wiso ist das so

bzw

wo kann mann das einstellen

MFG
so solte es ausschauen habe sie ein wehnig bearbeitet habe das gleiche problem gehabt bei mir geht es eiwant frei
PHP Code:
<div id="content">            <div class="postui2 text-title">
                    <h2>
                    Registration ONLINE!!!!!
                    
                    </h2>
                
                </div>
                <div class="postui2 text-con">
                <div class="con-wrap">
<?PHP

    
function canBuy()
    {
        if(!isset(
$_SESSION['nextBuy']))
        {
            
$_SESSION['nextBuy']=time();
        }
        
        if(
$_SESSION['nextBuy']<=time())
        {
            
$_SESSION['nextBuy']=time()+0;
            return 
true;
        }
        else
            return 
false;
    }

  if(isset(
$_SESSION['user_admin']) && checkInt($_SESSION['user_admin']) && $_SESSION['user_admin']>=0) {
  
    echo
'<h2>Itemshop - Einkauf</h2>';
    if(isset(
$_GET['id']) && checkInt($_GET['id'])) {
    
      
$sqlCmd="SELECT vnum, preis, attrtype0, attrvalue1, attrvalue2, attrvalue3, attrvalue4, attrvalue5, attrtype6, socket0, socket1, socket2 FROM ".SQL_HP_DB.".is_items WHERE id='".$_GET['id']."' AND anzeigen='J' LIMIT 1";
      
$sqlQry=mysql_query($sqlCmd,$sqlHp);
      if(
mysql_num_rows($sqlQry)==1) {
      
        
$getItem=mysql_fetch_object($sqlQry);
        
        
$sqlCoins "SELECT coins FROM account.account WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."' LIMIT 1";
        
$qryCoins mysql_query($sqlCoins,$sqlServ);
        
$getCoins mysql_fetch_object($qryCoins);
        
        if(
canBuy())
        {
            if((
$getCoins->coins)>=$getItem->preis) {
          
              
$getGroesse compareItems($getItem->vnum);
              
$belPos checkPos($_SESSION['user_id']);
              
$possiblePos findPos($belPos['islager'],$getGroesse['groesse']);
              if(!empty(
$possiblePos)) {
                
                
$nCoins $getCoins->coins-$getItem->preis;
                
                
$sqlCmd="UPDATE account.account SET coins='".mysql_real_escape_string($nCoins)."' WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."' LIMIT 1";
                
$sqlQry=mysql_query($sqlCmd,$sqlServ);
                
                
$sqlLog="INSERT INTO ".SQL_HP_DB.".is_log (account_id,vnum,preis,zeitpunkt) VALUES ('".mysql_real_escape_string($_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, attrvalue1, attrvalue2, attrtype3, attrtype4, attrtype5, attrtype6, socket0, socket1, socket2)
                VALUES 
                ('"
.mysql_real_escape_string($_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."1', '".$getItem->socket1."1', '".$getItem->socket2."1')";
                
$qryItem=mysql_query($sqlItem,$sqlServ) or die(mysql_error());
                
                echo
'<p class="meldung">Das item wurde erfolgreich gekauft. Sollte das Item nicht im Lager erscheinen, bitte umgehend bei einem Admin melden.</p>';
                
              }
              else {
                echo
'<p>Sie haben nicht genügend Platz in ihrem Itemshop-Lager. Ihr Guthaben wurde nicht verändert.</p>';
              }
              
            }
            else {
              echo
'<p class="meldung">Sie haben nicht genug Coins.</p>';
            }
        }
        else
        {
            echo
'<p class="meldung">Es kann nur alle 5 Sekunden ein Item gekauft werden.</p>';
        }
      }
      else {
        echo
'<p class="meldung">Das angegebe Item existiert nicht.</p>';
      }
    }
    else {
      echo
'<p class="meldung">Es wurde keine gültige ID eingegeben.</p>';
    }
    echo
'<p><a href="javascript:history.back()">zurück</a></p>';
  }
  else {
    echo
'<p class="meldung">Sie müssen für diesen Bereich angemeldet sein.</p>';
  }
?>




                </div>

  </div> 
                <div class="postui2 text-end">
             
                
                  
    </div></div>
nostradame37 is offline  
Reply


Similar Threads Similar Threads
PROBLEMM !!!
04/21/2011 - Metin2 Private Server - 10 Replies
Also ich ein PROBLEM !!! unzwar obwohl ich in der DB die Preise vom NPC richtig eigetragen habe steht es im Npc ganz anders ein Beispiel Vms in 50k und im shop 40kk oder soo was kann man machen ??? !!! dringend hilfe gesucht lg Kinzz
PROBLEMM
10/24/2010 - WarRock - 21 Replies
Wenn ich warrock starten will kommt immer so ein ERROR: Cannot find exeute file!! kann mir einer pls helfen gestern ging es noch heute nicht mehr
Itemshop problemm
06/14/2010 - Metin2 Private Server - 4 Replies
Hallo wenn ich im itemhsop was kaufe kommt immer Da stimmt was nit :D was kann das sein habe alles schon überprüft ect es geht einfach nicht woran kann es liegen mfg thx ghibt es natürlich
Npc problemm
01/29/2010 - Metin2 Private Server - 0 Replies
Ich wollte grade eben meine npc´s positonieren aber wenn ich jetzt wie im guid beschrieben ESC und 2 mal Enter gedrückt und es passirt nix, kann mir da mal einer weiter helfen? Danke schonmal im vorraus
problemm
12/27/2005 - WoW Private Server - 4 Replies
also ich habe ne wow server on gestelt kollegen komm drauf aber wen ich auf dem realm will dan bricht der irgen wan ab



All times are GMT +1. The time now is 07:09.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.