Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 01:46

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

Advertisement



Rad des Schicksals Problem

Discussion on Rad des Schicksals Problem within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
_Jimbo's Avatar
 
elite*gold: 15
Join Date: Mar 2012
Posts: 518
Received Thanks: 173
Rad des Schicksals Problem

So leute habe das Rad des Schicksals eingefügt.
Funktioniert alles soweit gut aber ich kann in die Items die ich dort gewinne keine Steine einfügen .Ich schick euch mal das PHP Script wo das definiert wird.

<?php
session_name("m2hp");session_start();include '../functions.inc.php';$i=file('../archives/items.txt');$bb=1000;if(!isset($_SESSION['user_id'])){exit();}$cc=count($i);$dd=array();for($ee=10;$e e<$cc;$ee++){$dd[]=explode(' ',$i[$ee]);}$ff=count($dd)-1;$gg=array();$hh=array();for($ii=0;$ii<16;$ii++){ $jj=1;$kk=0;while($jj>$kk){$ll=rand(0,$ff);while(i n_array($ll,$gg)){$ll=rand(0,$ff);}$kk=18*$dd[$ll][3];$jj=rand(0,100);}$gg[$ii]=$ll;$hh[]=$dd[$gg[$ii]];}mysql_connect('ServerIP','root','Password');$mm= mysql_query("SELECT * FROM account.account WHERE id = '".$_SESSION['user_id']."' LIMIT 1");$nn=mysql_fetch_assoc($mm);$oo=$nn['coins'];if($oo>=$bb){$hh[]=rand(0,15);$pp=$hh[$hh[16]];$qq=mysql_query("SELECT * FROM player.item_proto WHERE vnum = '".$pp[1]."' LIMIT 1");if(!$qq){$hh[16]=-1;echo json_encode($hh);exit();}$rr=mysql_fetch_assoc($qq );$ss=$rr['locale_name'];$hh[]=$ss;$tt=compareItems($rr['vnum']);$uu=checkPos($_SESSION['user_id']);$vv=findPos($uu['islager'],$tt['groesse']);$ww="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','".$vv[0]."','".$pp[2]."','".$pp[1]."','0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0')";$xx=mysql_query($ww);if(!$xx){exit();}$yy="U PDATE account.account SET coins=coins-".$bb." WHERE id='".$_SESSION['user_id']."' LIMIT 1";$zz=mysql_query($yy);}else{$hh[]=-1;}echo json_encode($hh);?>
_Jimbo is offline  
Old 10/23/2012, 00:21   #2
 
.Chuck's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 3,353
Received Thanks: 4,535
Könntest du das Mal bitte im PHP-Code einfügen?
.Chuck is offline  
Old 10/23/2012, 00:28   #3
 
elite*gold: 0
Join Date: Feb 2011
Posts: 8
Received Thanks: 1
PHP Code:
<?php
session_name
("m2hp");
session_start();
include 
'../functions.inc.php';
$i=file('../archives/items.txt');
$bb=1000;
if(!isset(
$_SESSION['user_id'])){exit();
}
$cc=count($i);
$dd=array();
for(
$ee=10;$ee<$cc;$ee++){
$dd[]=explode(' ',$i[$ee]);
}
$ff=count($dd)-1;
$gg=array();
$hh=array();
for(
$ii=0;$ii<16;$ii++){
$jj=1;
$kk=0;
while(
$jj>$kk){
$ll=rand(0,$ff);
while(
in_array($ll,$gg)){$ll=rand(0,$ff);}
$kk=18*$dd[$ll][3];
$jj=rand(0,100);
}
$gg[$ii]=$ll;
$hh[]=$dd[$gg[$ii]];
}
mysql_connect('XXX');
$mm=mysql_query("SELECT * FROM account.account WHERE id = '".$_SESSION['user_id']."' LIMIT 1");$nn=mysql_fetch_assoc($mm);$oo=$nn['coins'];if($oo>=$bb){$hh[]=rand(0,15);$pp=$hh[$hh[16]];$qq=mysql_query("SELECT * FROM player.item_proto WHERE vnum = '".$pp[1]."' LIMIT 1");if(!$qq){$hh[16]=-1;echo json_encode($hh);exit();}$rr=mysql_fetch_assoc($qq);$ss=$rr['locale_name'];$hh[]=$ss;$tt=compareItems($rr['vnum']);$uu=checkPos($_SESSION['user_id']);$vv=findPos($uu['islager'],$tt['groesse']);$ww="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','".$vv[0]."','".$pp[2]."','".$pp[1]."','0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0')";$xx=mysql_query($ww);if(!$xx){exit();}$yy="UPDATE account.account SET coins=coins-".$bb." WHERE id='".$_SESSION['user_id']."' LIMIT 1";$zz=mysql_query($yy);}else{$hh[]=-1;}echo json_encode($hh);?>
TheZyppi is offline  
Thanks
1 User
Old 10/23/2012, 00:33   #4
 
_Jimbo's Avatar
 
elite*gold: 15
Join Date: Mar 2012
Posts: 518
Received Thanks: 173
Das problem ist das man in die Items die man vom Rad erhält keine Steine einfügen kann
_Jimbo is offline  
Old 10/23/2012, 00:40   #5
 
[Patrick]'s Avatar
 
elite*gold: 50
Join Date: May 2012
Posts: 1,140
Received Thanks: 401
Wenn du die Sachen per GM Code holst, kannst du da die Steine einfügen?
Möchte nur mal fragen..

€; Erkenne nicht wirklich ein Fehler, aber ich werde es mal "genauer" betrachten. Bin in diesen Gebiet erst neu, da kommt das wie gerufen. ^^
[Patrick] is offline  
Old 10/23/2012, 00:44   #6
 
_Jimbo's Avatar
 
elite*gold: 15
Join Date: Mar 2012
Posts: 518
Received Thanks: 173
Ja es ist das Rad des Schicksals da kannst für Coins nen Rad drehen und das gibt dir durch zufall nen Item. Und in die Items die man bekommt kann man keine Steine einfügen
_Jimbo is offline  
Old 10/23/2012, 00:47   #7
 
[Patrick]'s Avatar
 
elite*gold: 50
Join Date: May 2012
Posts: 1,140
Received Thanks: 401
Bin mir nicht wirklich sicher, aber..vielleicht liegt es daran?
PHP Code:
 INSERT INTO player.item (owner_id,window,pos,count,vnum,attrtype0attrvalue0attrtype1attrvalue1attrtype2attrvalue2attrtype3attrvalue3attrtype4attrvalue4attrtype5attrvalue5attrtype6attrvalue6socket0socket1socket2)VALUES('".$_SESSION['user_id']."','MALL','".$vv[0]."','".$pp[2]."','".$pp[1]."','0''0''0''0''0''0''0''0''0''0''0''0''0''0''0''0''0' 
Wie gesagt, kenn mich noch nicht wirklich aus, hab erst gestern damit angefangen. ^^

Und irgendwas muss für socket_pct: stehen, und da muss eine 3 stehen,das weiß ich..
[Patrick] is offline  
Old 10/23/2012, 00:51   #8
 
_Jimbo's Avatar
 
elite*gold: 15
Join Date: Mar 2012
Posts: 518
Received Thanks: 173
Patrick zu deinen Problemen habe ich Lösungen es könnte sein und du scheinst mir als ob du ein wenig ahnung hättest.
Frag mal rum weil ich kenne mich was das angeht nicht so aus
_Jimbo is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Helius2] Rad des Schicksals
08/31/2012 - Metin2 PServer Guides & Strategies - 56 Replies
Da sich der liebe Hades versucht sich raus zu reden werde ich jetzt für jeden weiteren Versuch seinen Arsch zu retten weitere Bestandteile von Helius2 releasen. Weiter geht's mit dem Rad des Schicksals. Download Rad des Schicksals
[S]Rad des Schicksals [B]PSC
08/11/2012 - Metin2 Trading - 3 Replies
ist oben beschrieben, einfach anschreiben
Rad des Schicksals
07/29/2012 - Metin2 - 2 Replies
Habe ein paar fragen dazu: 1. es ist ja gerade Olympia Event.. bis zu welchen Datum kann man am Rad drehen? 2. laut WIKI kommen magische Steine raus, stimmt das? und wenn ja bekommt man die häufig? LG
Rad des Schicksals ?
07/15/2012 - Metin2 Private Server - 3 Replies
Hallo, Ich suche das Rad des Schicksals, einige Server haben es bereits? Ist das noch nicht Public? mfg
Rad des Schicksals
03/05/2012 - Metin2 - 10 Replies
Hallo denkt ihr es lohnt sich um ein Kriegskeiler zu bekommen und würde ich ihn schon mit 10€ bekommen was denkt ihr ?



All times are GMT +1. The time now is 01:47.


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.