[Tutorial]CabalToolz 2.0,3.0 Reset System
5 participanți
Pagina 1 din 1
[Tutorial]CabalToolz 2.0,3.0 Reset System
1.Deschide Query Analyzer
2.Selecteaza GAMEDB database
3.Adauga acest script:
Cod:
ALTER TABLE [dbo].[cabal_character_table]
ADD
[Reset] [int] NULL DEFAULT (0)
4.Mergeti in webserver directory\backend
Exemplu:C:\xampp\htdocs\backend
"backend" este CabalToolz Backend
5.Creati un fisier php si numitil resets.php
6.Deschideti resets.php din folderul backend
Exemplu:C:\xampp\htdocs\backend\resets.php
7.Adaugati acest script
Cod:
include 'config.php'; ?>
$db=mssql_connect($addr,$user,$pass);
mssql_select_db("ACCOUNT", $db);
$sql = "SELECT COUNT(*) FROM cabal_auth_table";
$res = mssql_query($sql);
$row = mssql_fetch_row($res);
$count1=$row[0];
mssql_select_db("Gamedb", $db);
$sql = "SELECT * FROM cabal_character_table WHERE Login='1'";
$res = mssql_query($sql);
$count=0;
while($row = mssql_fetch_array($res)){
$count++;
}
$sql = "SELECT COUNT(*) FROM cabal_character_table";
$res = mssql_query($sql);
$row_count = mssql_fetch_row($res);
$sql = "SELECT * FROM cabal_character_table ORDER BY RESET";
$res = mssql_query($sql);
$i=0;
while($row = mssql_fetch_array($res)){
$data[$i] = $row['Name'];
$data1[$i]= $row['RESET'];
//print ''.$row_count[0].$data[$i]."
";
if($i==$row_count[NULL])break;
$i++;
}
?>
echo "".htmlspecialchars($_SESSION['user'])." ";
}
?>
PS:Daca aveti deja resets.php , nu va ingrijorati , deschidetil , stergeti tot ce este scris in el si adaugati codul de mai sus.
8.Save & Close
9.Mergeti in backend\modules
Exemplu:C:\xampp\htdocs\backend\modules
10.Deschideti user.resets.php
11.Stergeti tot ce este in el
12.Aadaugati acest script
Cod:
if (!isset($_config)) die('Ops!');
$rs = $db2->Execute('Select Lev,Style, Alz, STR, DEX, INT, PNT, RESET, characteridx, Name from cabal_character_table where characteridx = ? ', array($this->id));
$char = $rs->GetArray();
$rs = $char[0];
$style = decode_style($rs['Style']);
if ($style['Class'] > $style['Class'] = $style['Class']-8;
if ($rs[$_config['ucp_lvl_col']] == null) $rs[$_config['ucp_lvl_col']] = 0;
$rs2 = $db->Execute('select * from cabal_newchardata_table where classtype=? and lev = 1 and DataIdx=10',array($style['Class']));
$char = $rs2->GetArray();
$rs2 = $char[0];
$msg2 = char_list($this->id);
if (online_check($db2,$this->id) == false && isset($rs['Lev'])) {
if ($_config['ucp_lvl_allow'] == true ) {
if ($rs['Lev'] >= $_config['ucp_lvl_level']) {
if ($rs['Alz'] >= $_config['ucp_lvl_payment']) {
if ( $_config['ucp_lvl_inv_check'] == false) {
if ($rs[$_config['ucp_lvl_col']] < $_config['ucp_lvl_limit'] ) {
writelog("[ $name ] Level Reset","Level Reset");
if ($_config['ucp_lvl_keep_stat'] == true) {
$form .= '
';
if ($this->opt1 == 'do_reset'){// && ctype_digit($rs2['LEV'])) {
alert('You are now being reseted, Press OK to confirm');
$temp = $rs['RESET'] + 1;
$do = $db2->Execute('update cabal_character_table set LEV=?,PNT=?,EXP=0,WorldIdx=?,Position=?,Nation=0,Alz=?,'.$_config['ucp_lvl_col'].'=? where CharacterIdx = ? and Lev >= ?',
array($rs2['LEV'], ($rs['PNT']+$_config['ucp_lvl_bonus']),$rs2['WorldIdx'],$rs2['Position'],($rs['Alz']-$_config['ucp_lvl_payment']),($temp),$this->id,$_config['ucp_lvl_level']));
}
} else {
$form .= '
';
if ($this->opt1 == 'do_reset'){ //&& ctype_digit($rs2['LEV'])) {
alert('You are now being reseted, Press OK to confirm');
$temp = $rs['RESET'] + 1;
//$db2->debug=1;
$do = $db2->Execute('update cabal_character_table set LEV=?,STR=?,DEX=?,INT=?,PNT=?,EXP=0,WorldIdx=?,Position=?,HP=?,MP=?,Nation=0,Alz=?,'.$_config['ucp_lvl_col'].'=? where CharacterIdx = ? and Lev >= ?',
array($rs2['LEV'], $rs2['STR'], $rs2['DEX'], $rs2['INT'],($bonus),$rs2['WorldIdx'],$rs2['Position'],$rs2['HP'],$rs2['MP'],($rs['Alz']-$_config['ucp_lvl_payment']),($temp),$this->id,$_config['ucp_lvl_level']));
}
}
$form .= 'id.'','Reset','do_reset');"> ';
//if ($_config['lvl_magic_clear'] == true) $db->Execute('update Character SET MagicList = Null where and mu_id = ?', array($this->id));
} else $msg = _Reset_limit.' ('.$_config['ucp_lvl_limit'].')';
} else $msg = _Reset_inv.' [Trebuie sa fiti inscris si conectat pentru a vedea acest link]';
} else $msg = _Reset_money_r;
} else $msg = _Reset_lvl_r;
} else $msg = _Reset_not_allowed;
} else $msg = _Reset_online;
$msg .= '
[Trebuie sa fiti inscris si conectat pentru a vedea acest link] ';
$msg2 .= '
Inventory Empty Check: '.($_config['ucp_lvl_inv_check'] == false ? 'No check' : 'Needed' ).'
Money in Hand: '.$rs['Alz'].'
Money Needed for Reset: '. ($_config['ucp_lvl_payment']).'
'.$msg .'';
aprint('tabs-content', $form .$msg2);
?>
13.Save & Close
14.Mergeti in backend\config.php
Exemplu:C:\xampp\htdocs\backend\config.php
15.Si cautati urmatoarele linii
Cod:
// LEvel Reset config
$_config['ucp_lvl_allow'] = false; // true of false
$_config['ucp_lvl_level'] = 200;
$_config['ucp_lvl_payment'] = 100000000;
$_config['ucp_lvl_inv_check'] = true; // if true will check if inventory and equipments are empty
$_config['ucp_lvl_keep_stat'] = false; // if true keep stats is enabled
$_config['ucp_lvl_bonus'] = 75; // Bonus per reset
$_config['ucp_lvl_magic_clear'] = false; // if true will remove magic list
$_config['ucp_lvl_limit'] = 999; // Limit number for resets
$_config['ucp_lvl_col'] = 'RESETS'; // name of the column
16.Inlocuitile cu:
Cod:
// LEvel Reset config
$_config['ucp_lvl_allow'] = true; // true or false
$_config['ucp_lvl_level'] = 200;
$_config['ucp_lvl_payment'] = 10000000;
$_config['ucp_lvl_inv_check'] = false; // this have to be false if true it's not working
$_config['ucp_lvl_keep_stat'] = true; // if true keep stats is enabled
$_config['ucp_lvl_bonus'] = 5; // Bonus per reset
$_config['ucp_lvl_magic_clear'] = false; // if true will remove magic list
$_config['ucp_lvl_limit'] = 500; // Limit number for resets
$_config['ucp_lvl_col'] = 'Reset'; // name of the column
17.Configuratil cum vreti sa fie sistemul de reset
18.Save & Close.
Done acum aveti reset system in UserPanel!
Sursa: Topic Gratuit
2.Selecteaza GAMEDB database
3.Adauga acest script:
Cod:
ALTER TABLE [dbo].[cabal_character_table]
ADD
[Reset] [int] NULL DEFAULT (0)
4.Mergeti in webserver directory\backend
Exemplu:C:\xampp\htdocs\backend
"backend" este CabalToolz Backend
5.Creati un fisier php si numitil resets.php
6.Deschideti resets.php din folderul backend
Exemplu:C:\xampp\htdocs\backend\resets.php
7.Adaugati acest script
Cod:
include 'config.php'; ?>
$db=mssql_connect($addr,$user,$pass);
mssql_select_db("ACCOUNT", $db);
$sql = "SELECT COUNT(*) FROM cabal_auth_table";
$res = mssql_query($sql);
$row = mssql_fetch_row($res);
$count1=$row[0];
mssql_select_db("Gamedb", $db);
$sql = "SELECT * FROM cabal_character_table WHERE Login='1'";
$res = mssql_query($sql);
$count=0;
while($row = mssql_fetch_array($res)){
$count++;
}
$sql = "SELECT COUNT(*) FROM cabal_character_table";
$res = mssql_query($sql);
$row_count = mssql_fetch_row($res);
$sql = "SELECT * FROM cabal_character_table ORDER BY RESET";
$res = mssql_query($sql);
$i=0;
while($row = mssql_fetch_array($res)){
$data[$i] = $row['Name'];
$data1[$i]= $row['RESET'];
//print ''.$row_count[0].$data[$i]."
";
if($i==$row_count[NULL])break;
$i++;
}
?>
[Trebuie sa fiti înscris şi conectat pentru a vedea această imagine] | Ranking Reset - echo $svname ?> | [Trebuie sa fiti înscris şi conectat pentru a vedea această imagine] |
echo "
}
?>
Character | Reset | ||
'.$data[$i];?> | echo ''.$data1[$i].'';?> |
PS:Daca aveti deja resets.php , nu va ingrijorati , deschidetil , stergeti tot ce este scris in el si adaugati codul de mai sus.
8.Save & Close
9.Mergeti in backend\modules
Exemplu:C:\xampp\htdocs\backend\modules
10.Deschideti user.resets.php
11.Stergeti tot ce este in el
12.Aadaugati acest script
Cod:
if (!isset($_config)) die('Ops!');
$rs = $db2->Execute('Select Lev,Style, Alz, STR, DEX, INT, PNT, RESET, characteridx, Name from cabal_character_table where characteridx = ? ', array($this->id));
$char = $rs->GetArray();
$rs = $char[0];
$style = decode_style($rs['Style']);
if ($style['Class'] > $style['Class'] = $style['Class']-8;
if ($rs[$_config['ucp_lvl_col']] == null) $rs[$_config['ucp_lvl_col']] = 0;
$rs2 = $db->Execute('select * from cabal_newchardata_table where classtype=? and lev = 1 and DataIdx=10',array($style['Class']));
$char = $rs2->GetArray();
$rs2 = $char[0];
$msg2 = char_list($this->id);
if (online_check($db2,$this->id) == false && isset($rs['Lev'])) {
if ($_config['ucp_lvl_allow'] == true ) {
if ($rs['Lev'] >= $_config['ucp_lvl_level']) {
if ($rs['Alz'] >= $_config['ucp_lvl_payment']) {
if ( $_config['ucp_lvl_inv_check'] == false) {
if ($rs[$_config['ucp_lvl_col']] < $_config['ucp_lvl_limit'] ) {
writelog("[ $name ] Level Reset","Level Reset");
if ($_config['ucp_lvl_keep_stat'] == true) {
$form .= '
'; | '; |
if ($this->opt1 == 'do_reset'){// && ctype_digit($rs2['LEV'])) {
alert('You are now being reseted, Press OK to confirm');
$temp = $rs['RESET'] + 1;
$do = $db2->Execute('update cabal_character_table set LEV=?,PNT=?,EXP=0,WorldIdx=?,Position=?,Nation=0,Alz=?,'.$_config['ucp_lvl_col'].'=? where CharacterIdx = ? and Lev >= ?',
array($rs2['LEV'], ($rs['PNT']+$_config['ucp_lvl_bonus']),$rs2['WorldIdx'],$rs2['Position'],($rs['Alz']-$_config['ucp_lvl_payment']),($temp),$this->id,$_config['ucp_lvl_level']));
}
} else {
$form .= '
'; | '; |
if ($this->opt1 == 'do_reset'){ //&& ctype_digit($rs2['LEV'])) {
alert('You are now being reseted, Press OK to confirm');
$temp = $rs['RESET'] + 1;
//$db2->debug=1;
$do = $db2->Execute('update cabal_character_table set LEV=?,STR=?,DEX=?,INT=?,PNT=?,EXP=0,WorldIdx=?,Position=?,HP=?,MP=?,Nation=0,Alz=?,'.$_config['ucp_lvl_col'].'=? where CharacterIdx = ? and Lev >= ?',
array($rs2['LEV'], $rs2['STR'], $rs2['DEX'], $rs2['INT'],($bonus),$rs2['WorldIdx'],$rs2['Position'],$rs2['HP'],$rs2['MP'],($rs['Alz']-$_config['ucp_lvl_payment']),($temp),$this->id,$_config['ucp_lvl_level']));
}
}
$form .= '
//if ($_config['lvl_magic_clear'] == true) $db->Execute('update Character SET MagicList = Null where and mu_id = ?', array($this->id));
} else $msg = _Reset_limit.' ('.$_config['ucp_lvl_limit'].')';
} else $msg = _Reset_inv.' [Trebuie sa fiti inscris si conectat pentru a vedea acest link]';
} else $msg = _Reset_money_r;
} else $msg = _Reset_lvl_r;
} else $msg = _Reset_not_allowed;
} else $msg = _Reset_online;
$msg .= '
$msg2 .= '
Inventory Empty Check: '.($_config['ucp_lvl_inv_check'] == false ? 'No check' : 'Needed' ).'
Money in Hand: '.$rs['Alz'].'
Money Needed for Reset: '. ($_config['ucp_lvl_payment']).'
'.$msg .'';
aprint('tabs-content', $form .$msg2);
?>
13.Save & Close
14.Mergeti in backend\config.php
Exemplu:C:\xampp\htdocs\backend\config.php
15.Si cautati urmatoarele linii
Cod:
// LEvel Reset config
$_config['ucp_lvl_allow'] = false; // true of false
$_config['ucp_lvl_level'] = 200;
$_config['ucp_lvl_payment'] = 100000000;
$_config['ucp_lvl_inv_check'] = true; // if true will check if inventory and equipments are empty
$_config['ucp_lvl_keep_stat'] = false; // if true keep stats is enabled
$_config['ucp_lvl_bonus'] = 75; // Bonus per reset
$_config['ucp_lvl_magic_clear'] = false; // if true will remove magic list
$_config['ucp_lvl_limit'] = 999; // Limit number for resets
$_config['ucp_lvl_col'] = 'RESETS'; // name of the column
16.Inlocuitile cu:
Cod:
// LEvel Reset config
$_config['ucp_lvl_allow'] = true; // true or false
$_config['ucp_lvl_level'] = 200;
$_config['ucp_lvl_payment'] = 10000000;
$_config['ucp_lvl_inv_check'] = false; // this have to be false if true it's not working
$_config['ucp_lvl_keep_stat'] = true; // if true keep stats is enabled
$_config['ucp_lvl_bonus'] = 5; // Bonus per reset
$_config['ucp_lvl_magic_clear'] = false; // if true will remove magic list
$_config['ucp_lvl_limit'] = 500; // Limit number for resets
$_config['ucp_lvl_col'] = 'Reset'; // name of the column
17.Configuratil cum vreti sa fie sistemul de reset
18.Save & Close.
Done acum aveti reset system in UserPanel!
Sursa: Topic Gratuit
Adryyy- Administrators
Subiecte similare
» Socket System
» Harmony Upgrading System
» [Tutorial]Reflexie
» [Tutorial]Bila 3D
» [Tutorial] Cabal Sig
» Harmony Upgrading System
» [Tutorial]Reflexie
» [Tutorial]Bila 3D
» [Tutorial] Cabal Sig
Pagina 1 din 1
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum