
Scorpio
Members-
Posts
85 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Scorpio
-
And he put a index.html file on.
-
Error - MCCodes - Critical Error A critical error has occurred, and this page cannot be displayed. Please try again later. Query failed attacklost.php - <?php /** * MCCodes Version 2.0.5b * Copyright (C) 2005-2012 Dabomstew * All rights reserved. * * Redistribution of this code in any form is prohibited, except in * the specific cases set out in the MCCodes Customer License. * * This code license may be used to run one (1) game. * A game is defined as the set of users and other game database data, * so you are permitted to create alternative clients for your game. * * If you did not obtain this code from MCCodes.com, you are in all likelihood * using it illegally. Please contact MCCodes to discuss licensing options * in this case. * * File: attacklost.php * Signature: 95b6a74ae7c7a6cf4e9ed998f3b574c8 * Date: Fri, 20 Apr 12 08:50:30 +0000 */ $atkpage = 1; require_once('globals.php'); $_GET['ID'] = (isset($_GET['ID']) && is_numeric($_GET['ID'])) ? abs((int) $_GET['ID']) : 0; $_SESSION['attacking'] = 0; $_SESSION['attacklost'] = 0; $od = $db->query( "SELECT `username`, `level`, `gang` FROM `users` WHERE `userid` = {$_GET['ID']}"); if ($db->num_rows($od) > 0) { $r = $db->fetch_row($od); $db->free_result($od); echo "You lost to {$r['username']}"; $expgain = abs(($ir['level'] - $r['level']) ^ 3); $expgainp = $expgain / $ir['exp_needed'] * 100; echo " and lost $expgainp% EXP!"; // Figure out their EXP, 0 or decreased? $newexp = max($ir['exp'] - $expgain, 0); $db->query( "UPDATE `users` SET `exp` = {$newexp}, `attacking` = 0 WHERE `userid` = $userid"); event_add($r['userid'], "<a href='viewuser.php?u=$userid'>{$ir['username']}</a> attacked you and lost.", $c); $atklog = $db->escape($_SESSION['attacklog']); $db->query( "INSERT INTO `attacklogs` VALUES(NULL, $userid, {$_GET['ID']}, 'lost', " . time() . ", 0, '$atklog')"); if ($ir['gang'] > 0 && $r['gang'] > 0) { $warq = $db->query( "SELECT * FROM `gangwars` WHERE (`warDECLARER` = {$ir['gang']} AND `warDECLARED` = {$r['gang']}) OR (`warDECLARED` = {$ir['gang']} AND `warDECLARER` = {$r['gang']})"); if ($db->num_rows($warq) > 0) { $war = $db->fetch_row($warq); $db->query( "UPDATE `gangs` SET `gangRESPECT` = `gangRESPECT` + 1 WHERE `gangID` = {$r['gang']}"); $db->query( "UPDATE `gangs` SET `gangRESPECT` = `gangRESPECT` - 1 WHERE `gangID` = {$ir['gang']}"); echo "<br />You lost 1 respect for your gang!"; } $db->free_result($warq); } } else { $db->free_result($od); echo "You lost to Mr. Non-existant! =O"; } $h->endpage(); I then Installed it on a Wamp sever. I still get the same error. (I didnt change nothing) And its the latest one from the mccodes place.
-
Atttack Lost V2 (Latest Update) Dose not work. MCCodes team fix it :P
-
If I was a rich man MTG, I would be giving you money! But then Im 13 and poor.
-
Player Classes.
-
And thanks Sniko!
-
Aaah, i know what it is now. great going to add it to my game! Thanks Kyle! Great user you are.
-
Hello there, What dose this mod do?
-
Dot.tk free domain. Whats the point of buying a .com or whateva?
-
Hello there, I just wanted to warn you all, that if you signup to any of them torn clones, your password would be discovered. Someone sign into my both of my friend account on my game. And made them self staff. Just be carefull with what pass you use.
-
I suggest Mccodes. But I never tried NWE.
-
Yes nice knowing you. Working with BT Error Page? Sorry, the website topgamesandservers.eu cannot be found. Really love it.
-
Hello there, I really like the template looks great! Well if I had $50 and didnt buy my other template for my game im devolping. I would have about this template. I really like +1
-
Are you currently developing any kind of game?
Scorpio replied to Dominion's topic in Question of the day
I am currently developing a game with 2 people. Realese date next month. -
Post updated, made layout bit more better.
-
Hello all I have made a new mod called Fighting, I am soon going to developed it more. I am soon going to make players fight other players instead of doing arena's only. So run these SQL's to your DB. ALTER TABLE users ADD stamina INT(11) DEFAULT 10; ALTER TABLE users ADD maxstamina INT(11) DEFAULT 10; ALTER TABLE users ADD fighting_exp INT(11) DEFAULT 0; ALTER TABLE users ADD fighting_needed INT(11) DEFAULT 100; ALTER TABLE users ADD fighting_level INT(11) DEFAULT 1; ALTER TABLE users ADD fightlost INT(11) DEFAULT 0; ALTER TABLE users ADD fightwon INT(11) DEFAULT 0; After that open up global_func.php and add - function fight_check() { global $ir,$db,$userid; if($ir['fighting_exp'] >= $ir['fighting_needed']) { $expu=$ir['fighting_exp']-$ir['fighting_needed']; $ir['fighting_level']+=1; $ir['fighting_exp']=$expu; $ir['stamina']+=2; $ir['maxstamina']+=2; $db->query("UPDATE `users` SET `fighting_level`=`fighting_level`+1,`fighting_exp`=$expu, `stamina`=`stamina`+2, `maxstamina`=`maxstamina`+2, `fighting_needed`=`fighting_needed`+25 WHERE userid=$userid"); } } Now make a new file called fighting.php - <?php include "globals.php"; if($ir['jail'] or $ir['hospital']) { print "<hr width='50%'>Please read the error message.<hr width='50%'><h3>! ERROR</h3>This page cannot be accessed while in jail or hospital.<br /><br /> <hr width='50%'><a href='index.php'>> Go Home</a><hr width='50%'>"; $h->endpage(); exit; } // Check fight level fight_check(); // End switch($_GET['action']) { case 'fight': fight_1(); break; case 'fightsub': fight_1_sub(); break; case 'fight': fight_2(); break; case 'fight2sub': fight_2_sub(); break; case 'fight3': fight_3(); break; case 'fight3sub': fight_3_sub(); break; default: fight_index(); break; } // Calls the cases so fight.php?fight function fight_index() { global $ir,$h,$c; print "<h3><u>Fighting</u></h3>"; print "<hr /> <table width=80% cellspacing=2 class='table'><tr style='background:grey'> <th>Current Stamina:</th><td><b>".number_format($ir['stamina'])."/".number_format($ir['maxstamina'])."</b></td><tr> <th>Fighting Level:</th><td> <b>".number_format($ir['fighting_level'])."</b></td><tr> <th>Fighting Experience:</th><td><b>".number_format($ir['fighting_exp'])."/".number_format($ir['fighting_needed'])."</b></td><tr></table> <hr /> <h3><u>Fighting Arena</u></h3> <table width=80% cellspacing=2 class='table'><tr style='background:grey'> <td><center>[<a href='fighting.php?action=fight'>Level 1 Fighting Arena</a>]</td></center><tr> <td><center>[<a href='fighting.php?action=fight2'>Level 20 Fighting Arena</a>]</td></center><tr> <td><center>[<a href='fighting.php?action=fight3'>Level 40 Fighting Arena</a>]</td></center></table>"; } function fight_1() { global $db,$ir,$h,$c,$userid; if($ir['stamina'] < 10) { print "<hr width='50%'>Please read the error message.<hr width='50%'><h3>! ERROR</h3>You need 10 stamina to fight here and you have ".number_format($ir['stamina'])."<br /><br /> <hr width='50%'><a href='fighting.php'>> Go Back</a><hr width='50%'>"; $h->endpage(); exit; } $db->query("UPDATE `users` SET `stamina`=`maxstamina`-10 WHERE userid = $userid"); $cavein=rand(1,10); if($cavein == 1) { $hosptime=rand(1,8*$ir[level]); $reasonhosp = 'Lost while fighting.'; $db->query("UPDATE users SET hospital=$hosptime, hospreason='$reasonhosp' WHERE userid=$userid"); print "<hr width='50%'>Please read the action message.<hr width='50%'><h3>!ACTION</h3>After a few minutes of fighting. <br />You get beatend up quite badly. You barely escape and wake up at the hospital.<br /><br /> <hr width='50%'><a href='index.php'>> Go Home</a><hr width='50%'>"; $h->endpage(); exit; } $nothing=rand(1,3); if($nothing == 1) { print "<hr width='50%'>Please read the action message.<hr width='50%'><h3>!ACTION</h3>You couldnt find any fights.<br /><br /> <hr width='50%'><a href='fighting.php?action=fight'>>Find another fight</a><hr width='50%'>"; $h->endpage(); exit; } $rand_crystals = rand(5,25); $rand_exp = rand(5,25); print "<hr width='50%'>Please read the confirmation message.<hr width='50%'><h3>! CONFIRMATION</h3>You begin to fight in the level 1 arena and you won and gain {$rand_crystals} Crystal(s).<br /><br />"; $db->query("UPDATE `users` SET `crystals`=`crystals`+ {$rand_crystals}, `fighting_exp`=`fighting_exp`+ {$rand_exp} WHERE userid = $userid"); print " <hr width='50%'> <table width=50%> <tr> <td width=50%>> <a href='fighting.php?action=fight'>>Fight again</a></td> <td width=50%>> <a href='fighting.php'>> Back</a></td> </tr> </table> <hr width='50%'>"; } $h->endpage(); ?> And your done. I am going to developed this more soon. So please be patience.
-
$q1=$db->query("SELECT * FROM attacklog WHERE $userid=attacker AND attacktime >unix_timestamp()-10"); if($db->num_rows($q1) >= 1) { print "Sorry, You either tried to submit the attack more than once or you are trying to <br />attack out quicker than 10 second intervals"; $h->endpage(); exit; }
-
Loooll nice one sniko,
-
Hello, thank you guest for the help but that didnt work, so as lithuim. Thanks everybody but I have fixed it! <?php session_start(); $userid=$_SESSION['userid']; include "config.php"; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; require_once('global_func.php'); $db = new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $userid = $_SESSION['userid']; $is = $db->query("SELECT * FROM `users` WHERE `userid` = ".$userid) or die(mysql_error()); $ir = $db->fetch_row($is); function getUsername($userid) { global $db; $select = $db->query("SELECT `username` FROM `users` WHERE `userid` = ".$userid); if($db->num_rows($select)) { $user = $db->fetch_row($select); return $user['username']; } } // Mass Delete posts after X hours X mins X seconds $time=time() - (24*60*60); mysql_query("DELETE FROM `chat_box` WHERE `chat_time`<".$time); class bbcode { function code_box($text) { $output = "<div class=\"code\"><h6>Code</h6>\\1</div>"; return $output; } function quote($text) { $output = "<blockquote><h6>Quote:</h6>\\1</blockquote>"; return $output; } function htmlout($text) { $text = stripslashes($text); $text = htmlspecialchars($text); $text = nl2br($text); return $text; } function parse($text) { // First: If there isn't a "[" and a "]" in the message, don't bother. $text = " " . $text; if (! (strpos($text, "[") && strpos($text, "]")) ) { return $text; } else { // de uiteindelijke code $text = $this->htmlout($text); $text = preg_replace("/\\[b\\](.+?)\[\/b\]/is",'<b>\1</b>', $text); $text = preg_replace("/\\[i\\](.+?)\[\/i\]/is",'<i>\1</i>', $text); $text = preg_replace("/\\[u\\](.+?)\[\/u\]/is",'<u>\1</u>', $text); $text = preg_replace("/\[s\](.+?)\[\/s\]/is",'<s>\1</s>', $text); // Un advised bb code we advise you dont use the folowing bb code if you want to use it use at your own risk // $text = preg_replace("/\[code\](.+?)\[\/code\]/is","".$this->code_box('\\1')."", $text); // $text = preg_replace("/\[quote\](.+?)\[\/quote\]/is","".$this->quote('\\1')."", $text); // $text = eregi_replace("\\[img]([^\\[]*)\\[/img\\]","<img src=\"\\1\">",$text); // $text = eregi_replace("\\[size([^\\[]*)\\]([^\\[]*)\\[/size\\]","<font size=\"\\1px\">\\2</font>",$text); $text = eregi_replace("\\[color=([^\\[]*)\\]([^\\[]*)\\[/color\\]","<font color=\"\\1\">\\2</font>",$text); return $text; } } } $bbcode = new bbcode; $q = mysql_query("SELECT `chat_id` FROM `chat_box` "); $num=mysql_num_rows($q); if ($num < 30) { $limit=$num; $num = 0; } else {$num = $num-26; $limit=26;} $q = mysql_query("SELECT * FROM `chat_box` WHERE `chat_channel`='1' ORDER BY `chat_id` ASC LIMIT ".$num.", ".$limit); echo '<div align="left">'; echo '<div align="left">'; while ($c=mysql_fetch_array($q)) { if ($ir['user_level'] > 1) {$staff='[<a href="chat1.php?action=del&chat_id='.$c['chat_id'].'">X</a>] ';} else {$staff='';} echo ' '.$staff.'<strong> '.getUsername($c['chat_user']).':</strong> '.$bbcode->parse(htmlspecialchars($c['chat_text'])).'<br>'; } echo '</div>'; ?>
-
And thanks guys, still didnt work :(
-
Hey bro, I am to on my really **** phone. But that didnt work either. Thanks for thr help Kyle.
-
Hello MTG, thanks for the help, but It didnt work :(