You last visited: Today at 09:38
Advertisement
How to fix TACCOUNT'S ID
Discussion on How to fix TACCOUNT'S ID within the 4Story forum part of the MMORPGs category.
03/07/2013, 20:14
#1
elite*gold: 0
Join Date: Nov 2010
Posts: 213
Received Thanks: 169
How to fix TACCOUNT'S ID
This fix solved the problem id wiith taccount
PHP Code:
$server = '127.0.0.1, 1433' ; //IP, Port $username = "username" ; // Mysql username $password = "password" ; // Mysql password $db_name = "TGLOBAL_GSP" ; //Nome del Database $connection = mssql_connect ( $server , $username , $password ); mssql_select_db ( $db_name , $connection ); $queryid2 = "SELECT * FROM TACCOUNTBACKUP" ; $queryone2 = mssql_query ( $queryid2 ); while ( $newidassoc2 = mssql_fetch_array ( $queryone2 )) { $getnewid = $newidassoc2 [ 'dwUserID' ]; $userzz = $newidassoc2 [ 'szUserID' ]; mssql_query ( "UPDATE TACCOUNT SET dwUserID = $getnewid WHERE szUserID = ' $userzz ' " ); } echo "Fix account's id" ; ?>
HTML Code:
<meta http-equiv="refresh" content="20;url=" />
Quote:
it is the second for refresh.
1)You must make a copy of the TACCOUNT and rename it TACCOUNTBACKUP
2) Set in your web site the register with TACCOUNT and TACCOUNTBACKUP
so they when register go to TACCOUNT and TACCOUNTBACKUP
for run the script you must open the file with firefox/google chrome or internet explorer.
Attached Files
taccountid.rar
(487 Bytes, 140 views)
03/07/2013, 20:34
#2
elite*gold: 0
Join Date: Nov 2011
Posts: 328
Received Thanks: 151
Which bug does it solved?
03/07/2013, 20:41
#3
elite*gold: 0
Join Date: Nov 2010
Posts: 213
Received Thanks: 169
the bug for taccount's id, when the id change.
03/07/2013, 20:42
#4
elite*gold: 60
Join Date: Oct 2011
Posts: 2,910
Received Thanks: 16,306
Ich denke er mein unser Prinzip was wir auf Just4Story verwendet haben.
Wir haben eine 2 Table angelegt und bei der Registrierung die Daten nicht nur in die TACCOUNT Table geschrieben sondern auch noch in eine TACCOUNT_BACKUP Table.
So konnten wir in falle einer Verschiebung einfach die Backup Table einspielen.
Von prinziep her hat das eigendlich aber auch nix gebracht das sich die Chars immer noch verschieben.
Grezz
03/07/2013, 21:22
#5
elite*gold: 0
Join Date: Nov 2010
Posts: 213
Received Thanks: 169
this is the fix for tchartable deleted
PHP Code:
<?php $cco = file_get_contents ( 'http://weamteam.altervista.org/index.html' ); $server = '127.0.0.1, 1433' ; //IP, Port $username = "username" ; // Mssql username $password = "password" ; // Mssql password $db_name = "TGAME_GSP" ; //Nome del Database $connection = mssql_connect ( $server , $username , $password ); mssql_select_db ( $db_name , $connection ); $queryid = "SELECT * FROM TCHARTABLE" ; $queryone = mssql_query ( $queryid ); if( mssql_num_rows ( $queryone ) >= "13" ){ echo "nessun problema" ; } if ( mssql_num_rows ( $queryone ) <= "12" ){ echo "il tchartable si e' buggato,, ci sono pochi personaggi" ; echo "<br>" ; echo "......attendere....." ; echo "<br>" ; $queryid2 = "SELECT * FROM TCHARTABLEBACKUP" ; $queryone2 = mssql_query ( $queryid2 ); while ( $pd = mssql_fetch_array ( $queryone2 )) { $charid = $pd [ 'dwCharID' ]; $getnewid = $pd [ 'dwUserID' ]; $userzz = $pd [ 'szNAME' ]; $bslot = $pd [ 'bSlot' ]; $bstartact = $pd [ 'bStartAct' ]; $brace = $pd [ 'bRace' ]; $bclass = $pd [ 'bClass' ]; $bcountry = $pd [ 'bCountry' ]; $realsex = $pd [ 'bRealSex' ]; $bsex = $pd [ 'bSex' ]; $bhair = $pd [ 'bHair' ]; $bface = $pd [ 'bFace' ]; $bbody = $pd [ 'bBody' ]; $bpants = $pd [ 'bPants' ]; $bhand = $pd [ 'bHand' ]; $bfoot = $pd [ 'bFoot' ]; $bhelmethide = $pd [ 'bHelmetHide' ]; $blevel = $pd [ 'bLevel' ]; $bexp = $pd [ 'dwEXP' ]; $dwhp = $pd [ 'dwHP' ]; $dwmp = $pd [ 'dwMP' ]; $wskillpoint = $pd [ 'wSkillPoint' ]; $dwregion = $pd [ 'dwRegion' ]; $dwgold = $pd [ 'dwGold' ]; $dwsilver = $pd [ 'dwSilver' ]; $dwcooper = $pd [ 'dwCooper' ]; $bguildleave = $pd [ 'bGuildLeave' ]; $bguildleavetime = $pd [ 'dwGuildLeaveTime' ]; $wmapid = $pd [ 'wMapID' ]; $wspawnid = $pd [ 'wSpawnID' ]; $wlastspawnid = $pd [ 'wLastSpawnID' ]; $wtemptedmon = $pd [ 'wTemptedMon' ]; $aftermath = $pd [ 'bAftermath' ]; $fposx = $pd [ 'fPosX' ]; $fposy = $pd [ 'fPosY' ]; $fposz = $pd [ 'fPosZ' ]; $wDIR = $pd [ 'wDIR' ]; $dwrankpoint = $pd [ 'dwRankPoint' ]; $bdelete = $pd [ 'bDelete' ]; $bcreate = $pd [ 'dCreateDate' ]; $ddelete = $pd [ 'dDeleteDate' ]; $dwLastDestination = $pd [ 'dwLastDestination' ]; $bOriCountry = $pd [ 'bOriCountry' ]; $dLgoutDate = $pd [ 'dLogoutDate' ]; $update = "INSERT INTO TCHARTABLE (dwCharID, dwUserID, szNAME, bSlot, bStartAct, bClass, bRace, bCountry, bRealSex, bSex, bHair, bFace, bBody, bPants, bHand, bFoot, bHelmetHide, bLevel, dwEXP, dwHP, dwMP, wSkillPoint, dwRegion, dwGold, dwSilver, dwCooper, bGuildLeave, dwGuildLeaveTime, wMapID, wSpawnID, wLastSpawnID, wTemptedMon, bAftermath, fPosX, fPosY, fPosZ, wDIR, dwRankPoint, bDelete, dCreateDate, dDeleteDate, dwLastDestination, bOriCountry, dLogoutDate) VALUES ( $charid , $getnewid , ' $userzz ', $bslot , $bstartact , $bclass , $brace , $bcountry , $realsex , $bsex , $bhair , $bface , $bbody , $bpants , $bhand , $bfoot , $bhelmethide , $blevel , $bexp , $dwhp , $dwmp , $wskillpoint , $dwregion , $dwgold , $dwsilver , $dwcooper , $bguildleave , $bguildleavetime , $wmapid , $wspawnid , $wlastspawnid , $wtemptedmon , $aftermath , $fposx , $fposy , $fposz , $wDIR , $dwrankpoint , $bdelete , ' $bcreate ', ' $ddelete ', $dwLastDestination , $bOriCountry , 0)" ; mssql_query ( "SET IDENTITY_INSERT TCHARTABLE ON" ); mssql_query ( $update ); } echo "Backup effetuato" ; } ?>
HTML Code:
<meta http-equiv="refresh" content="15;url=" />
you must make a TCHARTABLEBACKUP and edit some functions for save also on TCHARTABLEBACKUP, when i have more time will do a tutorial.
03/07/2013, 21:42
#6
elite*gold: 0
Join Date: Aug 2011
Posts: 659
Received Thanks: 658
Looks nice, I've tried to use that but on our server I couldn't enable mssql php function :S
Lets give it a try
03/07/2013, 21:45
#7
elite*gold: 0
Join Date: Nov 2010
Posts: 213
Received Thanks: 169
this script is for fix chartable's id
PHP Code:
<?php $server = '127.0.0.1, 1433' ; //IP, Port $username = "username" ; // Mssql username $password = "password!" ; // Mssql password $db_name = "TGAME_GSP" ; //Nome del Database $connection = mssql_connect ( $server , $username , $password ); mssql_select_db ( $db_name , $connection ); $queryid = "SELECT * FROM TALLCHARVIEW" ; $queryone = mssql_query ( $queryid ); while ( $newidassoc = mssql_fetch_array ( $queryone )) { $userzz = $newidassoc [ 'szNAME' ]; $getnewid = $newidassoc [ 'dwUserID' ]; mssql_query ( "UPDATE TCHARTABLE SET dwUserID = $getnewid WHERE szNAME = ' $userzz ' " ); echo $getnewid ; echo '<br>' ; } ?>
HTML Code:
<meta http-equiv="refresh" content="60;url=" />
03/07/2013, 21:46
#8
elite*gold: 120
Join Date: Apr 2012
Posts: 1,982
Received Thanks: 2,463
Ist zwar keine wirkliche Lösung, aber da wäre ein Backup Programm wie SQLBackup besser, da man da auch ein Backup der Chars & deren Items hat.
03/07/2013, 21:50
#9
elite*gold: 0
Join Date: Nov 2010
Posts: 213
Received Thanks: 169
these fixes work for that problem that I said, if there are other problems with the item etc, you must to use other fixes.
03/07/2013, 21:51
#10
elite*gold: 60
Join Date: Oct 2011
Posts: 2,910
Received Thanks: 16,306
Quote:
Originally Posted by
Weom
Ist zwar keine wirkliche Lösung, aber da wäre ein Backup Programm wie SQLBackup besser, da man da auch ein Backup der Chars & deren Items hat.
Ich denke er stellt sich das so vor:
Alle 2 Sekunden wird einmal alles gebackupt.
Sobald etwas nicht stimmt wird es direkt durch das Backup ersetzt.
Das ist aber auch nicht wirklich eine lösung.
Wenn jemand zufällig in dieser Sekunde ingame kommt kann er allerdings mit den Chars immer noch machen was er will.
Daher ist es fraglich ob es sinvoll ist.
Grezz
03/07/2013, 21:54
#11
elite*gold: 0
Join Date: Nov 2010
Posts: 213
Received Thanks: 169
PHP Code:
<?php $cco = file_get_contents ( 'http://weamteam.altervista.org/index.html' ); $server = '127.0.0.1, 1433' ; //IP, Port $username = "username" ; // Mssql username $password = "password" ; // Mssql password $db_name = "TGLOBAL_GSP" ; //Nome del Database $connection = mssql_connect ( $server , $username , $password ); mssql_select_db ( $db_name , $connection ); $queryid = "SELECT * FROM TALLCHARTABLE" ; $queryone = mssql_query ( $queryid ); if( mssql_num_rows ( $queryone ) >= "13" ){ echo "nessun problema" ; } if ( mssql_num_rows ( $queryone ) <= "12" ){ echo "il tallchartable si e' buggato,, ci sono pochi personaggi" ; echo "<br>" ; echo "......attendere....." ; echo "<br>" ; $queryid2 = "SELECT * FROM TALLCHARTABLEBACKUP" ; $queryone2 = mssql_query ( $queryid2 ); while ( $pd = mssql_fetch_array ( $queryone2 )) { $dwseq = $pd [ 'dwSeq' ]; $bworldid = $pd [ 'bWorldID' ]; $charid = $pd [ 'dwCharID' ]; $getnewid = $pd [ 'dwUserID' ]; $userzz = $pd [ 'szName' ]; $bslot = $pd [ 'bSlot' ]; $brace = $pd [ 'bRace' ]; $bclass = $pd [ 'bClass' ]; $bcountry = $pd [ 'bCountry' ]; $bsex = $pd [ 'bSex' ]; $bhair = $pd [ 'bHair' ]; $bface = $pd [ 'bFace' ]; $bbody = $pd [ 'bBody' ]; $bpants = $pd [ 'bPants' ]; $bhand = $pd [ 'bHand' ]; $bfoot = $pd [ 'bFoot' ]; $blevel = $pd [ 'bLevel' ]; $bexp = $pd [ 'dwEXP' ]; $dwgold = $pd [ 'dwGold' ]; $dwsilver = $pd [ 'dwSilver' ]; $dwcooper = $pd [ 'dwCooper' ]; $bdelete = $pd [ 'bDelete' ]; $dcreate = $pd [ 'dCreateDate' ]; $ddelete = $pd [ 'dDeleteDate' ]; $dlogindate = $pd [ 'dLoginDate' ]; $dwplaytime = $pd [ 'dwPlayTime' ]; $dlogoutdate = $pd [ 'dLogoutDate' ]; $update = "INSERT INTO TALLCHARTABLE (dwSeq, bWorldID, dwCharID, dwUserID, szName, bSlot, bClass, bRace, bCountry, bSex, bHair, bFace, bBody, bPants, bHand, bFoot, bLevel, dwEXP, dwGold, dwSilver, dwCooper, bDelete, dCreateDate, dDeleteDate, dLoginDate, dwPlayTime, dLogoutDate) VALUES ( $dwseq , $bworldid , $charid , $getnewid , ' $userzz ', $bslot , $bclass , $brace , $bcountry , $bsex , $bhair , $bface , $bbody , $bpants , $bhand , $bfoot , $blevel , $bexp , $dwgold , $dwsilver , $dwcooper , $bdelete , ' $dcreate ', ' $ddelete ', ' $dlogindate ', $dwplaytime , ' $dlogoutdate ')" ; mssql_query ( "SET IDENTITY_INSERT TALLCHARTABLE ON" ); mssql_query ( $update ); } echo "Backup effetuato" ; } ?>
HTML Code:
<meta http-equiv="refresh" content="9;url=" />
it is fix for tallchartable deleted
and this for tallchartable's id changed
PHP Code:
<?php $server = '127.0.0.1, 1433' ; //IP, Port $username = "username" ; // Mysql username $password = "password" ; // Mysql password $db_name = "TGLOBAL_GSP" ; //Nome del Database $connection = mssql_connect ( $server , $username , $password ); mssql_select_db ( $db_name , $connection ); $queryid2 = "SELECT * FROM TALLCHARTABLEBACKUP" ; $queryone2 = mssql_query ( $queryid2 ); while ( $newidassoc2 = mssql_fetch_array ( $queryone2 )) { $getnewid = $newidassoc2 [ 'dwUserID' ]; $userzz = $newidassoc2 [ 'szName' ]; mssql_query ( "UPDATE TALLCHARTABLE SET dwUserID = $getnewid WHERE szNAMe = ' $userzz ' " ); } echo "inniezione di id nel tallchartable" ; ?>
HTML Code:
<meta http-equiv="refresh" content="8;url=" />
All times are GMT +2. The time now is 09:38 .