• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Bans

Status
Not open for further replies.
Blad.

Warning: Division by zero in C:\xampp\htdocs\characters.php on line 140

Fatal error: Uncaught exception 'E_OTS_NotLoaded' in C:\xampp\htdocs\pot\OTS_Player.php:1866 Stack trace: #0 C:\xampp\htdocs\characters.php(187): OTS_Player->getSkill(0) #1 C:\xampp\htdocs\index.php(106): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\pot\OTS_Player.php on line 1866
 
dodac skille o player_id = admin_id, ale o indeksach skilli od 0-6? chyba tak nie jestem pewien ile jest skilli
 
PHP:
<?PHP
//////////////////
/// CREATED BY ///
///   SAMME    ///
/////  FROM  /////
/// OTLAND.NET ///
//////////////////

//Please respect the copyrights!//

$ban_reason = array("Offensive Name", "Invalid Name Format", "Unsuitable Name", "Name Inciting Rule Violation", "Offensive Statement", "Spamming", "Illegal Advertising", "Off-Topic Public Statement", "Non-English Public Statement", "Inciting Rule Violation", "Bug Abuse", "Game Weakness Abuse", "Using Unofficial Software to Play", "Hacking", "Multi-Clienting", "Account Trading or Sharing", "Threatening Gamemaster", "Pretending to Have Influence on Rule Enforcer", "False Report to Gamemaster", "Destructive Behaviour", "Excessive Unjustified Player Killing", "Invalid Payment", "Spoiling Auction");
$ban_types = array(1 => 'IP Banishment', 2 => 'Namelock', 3 => 'Account Banishment', 4 => 'Notation', 5 => 'Until Deletion');


$players_banned = $SQL->query('SELECT `bans`.`type`, `bans`.`value`, `bans`.`comment`, `bans`.`admin_id`, `bans`.`expires`, `bans`.`added`, `bans`.`reason` FROM `bans`, `players` WHERE `players`.`account_id` = `bans`.`value` AND `bans`.`active` = 1 GROUP BY `bans`.`value` ORDER BY `bans`.`added` DESC')->fetchAll();
if(!$players_banned) {
$main_content .= '<h2><center><b>No one is banned at the moment at '.$config['server']['serverName'].'</b></center></h2>';
} else{
    $number_of_players = 0;        
    foreach($players_banned as $player) {
        $nick = $SQL->query("SELECT name, id, level, account_id FROM `players` WHERE account_id =".$player['value']." ORDER BY level DESC LIMIT 1")->fetch(); 
        $gmnick = $SQL->query("SELECT name, id FROM `players` WHERE id =".$player['admin_id']."")->fetch(); 
        
        if($player['admin_id'] >= "1")
            $banby = "<a href=?subtopic=characters&name=".urlencode($gmnick['name'])."><font color ='green'>".$gmnick['name']."</font></a>";
        else
            $banby = "Auto Ban";
            
        $number_of_players++;
        
        if(is_int($number_of_players / 2))
            $bgcolor = $config['site']['darkborder'];
        else
            $bgcolor = $config['site']['lightborder'];
        
        if ($player['expires'] == "-1") // If the banishment is permanent
            $expires = "Permament";
        else
            $expires = date("d/m/Y, G:i:s", $player['expires']);
        
            
        $players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=15%><A HREF="?subtopic=characters&name='.$nick['name'].'">'.$nick['name'].'</A></TD><TD WIDTH=5%>'.$ban_reason[$player['reason']].'</TD><TD WIDTH=15%>'.$player['comment'].'</TD><TD>'.$banby.'</TD><TD>'.$expires.'</TD></TR>';
    }
    //list of players
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>Banned Player</center></b></TD><TD class="white"><b><center>Reason</center></b></TD><TD class="white"><b><center>Comment</center></b></TD><TD class="white"><b><center>Banned By</center></b></TD><TD class="white"><b><center>Expires</center></b></TD></TR>'.$players_rows.'</TABLE>';
}
//COPY RIGHTS!! DO NOT DELETE!
 $main_content .= '<br/><p align="right">Scripted by <B>Samme</B>.</p>';
?>
 
PHP:
<?PHP
//////////////////
/// CREATED BY ///
///   SAMME    ///
/// AND EDITED ///
//// BY MINDEZ/GNR ///
/////  FROM  /////
/// OTLAND.NET ///
//////////////////

//Please respect the copyrights!//

$ban_reason = array("Offensive Name", "Invalid Name Format", "Unsuitable Name", "Name Inciting Rule Violation", "Offensive Statement", "Spamming", "Illegal Advertising", "Off-Topic Public Statement", "Non-English Public Statement", "Inciting Rule Violation", "Bug Abuse", "Game Weakness Abuse", "Using Unofficial Software to Play", "Hacking", "Multi-Clienting", "Account Trading or Sharing", "Threatening Gamemaster", "Pretending to Have Influence on Rule Enforcer", "False Report to Gamemaster", "Destructive Behaviour", "Excessive Unjustified Player Killing", "Invalid Payment", "Spoiling Auction");
$ban_types = array(1 => 'IP Banishment', 2 => 'Namelock', 3 => 'Account Banishment', 4 => 'Notation', 5 => 'Until Deletion');


$players_banned = $SQL->query('SELECT `bans`.`type`, `bans`.`value`, `bans`.`comment`, `bans`.`admin_id`, `bans`.`expires`, `bans`.`added`, `bans`.`reason` FROM `bans`, `players` WHERE `players`.`account_id` = `bans`.`value` AND `bans`.`active` = 1 GROUP BY `bans`.`value` ORDER BY `bans`.`added` DESC')->fetchAll();
if(!$players_banned) {
$main_content .= '<h2><center><b>No one is banned at the moment at '.$config['server']['serverName'].'</b></center></h2>';
} else{
    $number_of_players = 0;        
    foreach($players_banned as $player) {
        $nick = $SQL->query("SELECT name, id, level, account_id FROM `players` WHERE account_id =".$player['value']." ORDER BY level DESC LIMIT 1")->fetch(); 
        $gmnick = $SQL->query("SELECT name, id FROM `players` WHERE id =".$player['admin_id']."")->fetch(); 
        
        if($player['admin_id'] >= "1")
            $banby = "<a href=?subtopic=characters&name=".urlencode($gmnick['name'])."><font color ='green'>".$gmnick['name']."</font></a>";
        else
            $banby = "Auto Ban";
            
        $number_of_players++;
        
        if(is_int($number_of_players / 2))
            $bgcolor = $config['site']['darkborder'];
        else
            $bgcolor = $config['site']['lightborder'];
        
        if ($player['expires'] == "-1") // If the banishment is permanent
            $expires = "Permament";
        else
            $expires = date("d/m/Y, G:i:s", $player['expires']);
        
            
        $players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=15%><A HREF="?subtopic=characters&name='.$nick['name'].'">'.$nick['name'].'</A></TD><TD WIDTH=5%>'.$ban_reason[$player['reason']].'</TD><TD WIDTH=15%>'.$player['comment'].'</TD><TD>'.$banby.'</TD><TD>'.$expires.'</TD></TR>';
    }
    //list of players
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>Banned Player</center></b></TD><TD class="white"><b><center>Reason</center></b></TD><TD class="white"><b><center>Comment</center></b></TD><TD class="white"><b><center>Banned By</center></b></TD><TD class="white"><b><center>Expires</center></b></TD></TR>'.$players_rows.'</TABLE>';
}
?>

to nic nie pomoze, bo POT przy tworzeniu new Player, pobiera skille, a takowy god u niego ich nie posiada wiec POT wywala error iz brak danych :)
 
Ty za to jesteś pro, nie ma takiego id jak admin_id ani nigdzie nie ma czegos takiego w skrypcie characters.php jak admin_id więc lepiej sie nie odzywaj.
 
Ty za to jesteś pro, nie ma takiego id jak admin_id ani nigdzie nie ma czegos takiego w skrypcie characters.php jak admin_id więc lepiej sie nie odzywaj.

admin_id mowie w odniesieniu do jego tabeli bans, ponieważ nie wiem jaki ID ma jego god... wtf, te dzisiejsze dzieci...
 
No to takie query;

PHP:
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`, `count`) VALUES
(_IDGODA_, 0, 10, 0),
(_IDGODA_, 1, 10, 0),
(_IDGODA_, 2, 10, 0),
(_IDGODA_, 3, 10, 0),
(_IDGODA_, 4, 10, 0),
(_IDGODA_, 5, 10, 0),
(_IDGODA_, 6, 10, 0);

Tam gdzie _IDGODA_ zamień na ID swojego GOD'a (sprawdź w bazie jakie ID).
 
Po prostu zrób to co ja ci mówiłem. Widocznie źle stworzyłeś swojego GOD'a.

Stwórz nową postać za pomocą acc makera i przerób go na GOD'a
 
Jesli by tak było to zapytanie Samme by zadziałało

Po za tym jeśli założy nowego GOD'a to nic mu sie nie stanie a i problem (prawdopodobnie) z głowy
 
Status
Not open for further replies.
Back
Top