Jump to content
MakeWebGames

JAMESOMIGHTY

Members
  • Posts

    70
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by JAMESOMIGHTY

  1. well i tried all that and none of it works my webhost is hosting24.com so if anyone has done crons on that host before please post the layout of the code here :)
  2. you can buy guards to guard your house which gives you extra will, you have a maximum amount of guards you can get which can be upgraded, you can train guards for more will normal guard:$10000 will:+1 (train normal guard) Trained Guard:$15000 will:+1 (train trained guard) Ultimate guard:$15000 will:+1 extra guard space: $10000 these can be easily changed but i made it so upgrading a guard is better than buying another normal one, say if you wanted to buy 3 normal guards thats $30000 for the guards plus $30000 for the spaces =$60000 giving you 3 extra will wheras buying a normal guard- $10000 a space for the guard-$10000 upgrading the guard to ultimate guard-$30000 = $50000 and 3 will so its less :) so obviously you can change the prises just try and keep them on the same scale anyway here are the files... buyguards.php <?php /****** * made by JAMESOMIGHTY ******/ include "globals.php"; if(!$_GET['spend']) { print "Buying an extra Guard will cost you $10000, a guard will guard your house giving you extra will so you get higher stats when you train! You curently have {$ir['guards1']} normal guards, {$ir['guards2']} trained guards, {$ir['guards3']} ultimate guards. The maximum amount of guards you can have is {$ir['maxguards']} (this can be upgraded)) [url='buyguards.php?spend=buy']buy a guard for $10000[/url] [url='index.php']back[/url] "; } else { if($_GET['spend'] == 'buy') { if($ir['money'] <'10000') { print "You don't have enough money!"; } else if($ir['guards1'] == $ir['maxguards']) { print "Your guard house isnt big enough. [url='guardhouse.php']Increase guard house size[/url] [url='index.php']back[/url]"; } else { $db->query("UPDATE users SET money=money-10000 WHERE userid=$userid"); $db->query("UPDATE users SET maxwill=maxwill+1 WHERE userid=$userid"); $db->query("UPDATE users SET guards1=guards1+1 WHERE userid=$userid"); print "You bought 1 normal guard. [url='buyguards.php?spend=buy']buy more guards[/url] [url='index.php']back[/url] "; } } } $h->endpage(); ?>   trainguards.php <?php /****** * made by JAMESOMIGHTY * DO NOT RESELL THIS MOD ******/ include "globals.php"; switch($_GET['action']) { case "trainguard1": trainguard1(); break; case "trainguard2": trainguard2(); break; default: index(); break; } function index() { global $db, $ir,$c,$userid,$h; print "you can train a guard for the prise of $15000 every time you train a guard your will is increased by 1. You currently have {$ir['guards1']} normal guards, {$ir['guards2']} trained guards and {$ir['guards3']} ultimate guards. [[url='?action=trainguard1']Train guard- Normal Guard to Trained Guard ($15000)[/url]] [[url='?action=trainguard2']Train guard- Trained Guard to Ultimate Guard ($15000)[/url]] [[url='index.php']Back[/url]] "; } function trainguard1() { global $db, $ir,$c,$userid,$h; print "Train guard- Normal Guard to Trained Guard "; if($ir['guards1'] < '1') { print "<font color=red>Error!</font> you don't have enough Normal Guards! [url='buyguard.php']Buy A Guard[/url] [url='index.php']Back[/url] "; } if($ir['money'] < '15000') { print "<font color=red>Error!</font> You dont have enough money! [url='index.php']Back[/url] "; } if($ir['money'] > '14999') { print "<font color=green>Success!</font> You put one Normal Guard into a training course, he is now a trained guard!. [[url='?action=trainguard1']Train more normal guards[/url]] [[url='index.php']Back[/url]] "; $db->query("UPDATE users SET money=money-15000 WHERE userid=$userid"); $db->query("UPDATE users SET maxwill=maxwill+1 WHERE userid=$userid"); $db->query("UPDATE users SET guards1=guards1-1 WHERE userid=$userid" ); $db->query("UPDATE users SET guards2=guards2+1 WHERE userid=$userid" ); $db->query("UPDATE users SET guards2e=guards2e+2 WHERE userid=$userid" ); } function trainguard2() { global $db, $ir,$c,$userid,$h; print "Training guards "; if($ir['guards2'] < '1') { print "<font color=red>Error!</font> You don't have any Trained Guards! [url='index.php']Back[/url] "; } if($ir['money'] < '15000') { print "<font color=red>Error!</font> You dont have enough money! [url='index.php']Back[/url] "; } if($ir['money'] > '29999') { print "<font color=green>Success!</font> You put one Trained Guard into a training course, he is now a Ultimate guard!. [[url='?action=trainguard2']Train More Trained Guards[/url]] [[url='index.php']Back[/url]] "; $db->query("UPDATE users SET money=money-30000 WHERE userid=$userid"); $db->query("UPDATE users SET maxwill=maxwill+1 WHERE userid=$userid"); $db->query("UPDATE users SET guards2=guards2-1 WHERE userid=$userid" ); $db->query("UPDATE users SET guards2e=guards2e-2 WHERE userid=$userid" ); $db->query("UPDATE users SET guards3=guards3+1 WHERE userid=$userid" ); $db->query("UPDATE users SET guards3e=guards3e+3 WHERE userid=$userid" ); } } } ?>   guardhouse.php <?php /****** * made by JAMESOMIGHTY ******/ include "globals.php"; switch($_GET['action']) { case "increasehousesize": increasehousesize(); break; default: index(); break; } function index() { global $db, $ir,$c,$userid,$h; print "Pay 10000 to increase the size of your house to hold one more guard. Your gusrd house can currently hold a maximum of {$ir['maxguards']} guards [[url='?action=increasehousesize']Increase Guard House Size ($10000)[/url]] [[url='index.php']Back[/url]] "; } function increasehousesize() { global $db, $ir,$c,$userid,$h; print "Increasing House Size "; if($ir['money'] < '10000') { print "<font color=red>Error!</font> You dont have enough money! [url='index.php']Back[/url] "; } if($ir['money'] > '9999') { print "<font color=green>Success!</font> You Have Increased The Size of your guard house, you can now have a maximum of {$ir['maxguards']} guards. [[url='?action=increasehousesize']Increase guard house size again[/url]] [[url='index.php']Back[/url]] "; $db->query("UPDATE users SET money=money-10000 WHERE userid=$userid"); $db->query("UPDATE users SET maxguards=maxguards+1 WHERE userid=$userid"); } } ?>   replace estate.php with this... <?php include "globals.php"; $mpq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $mp=$db->fetch_row($mpq); $_GET['property']=abs((int) $_GET['property']); if($_GET['property']) { $npq=$db->query("SELECT * FROM houses WHERE hID={$_GET['property']}"); $np=$db->fetch_row($npq); if($np['hWILL'] < $mp['hWILL']) { print "You cannot go backwards in houses!"; } else if ($np['hPRICE'] > $ir['money']) { print "You do not have enough money to buy the {$np['hrNAME']}."; } else { $db->query("UPDATE users SET money=money-{$np['hPRICE']},will=0,maxwill={$np['hWILL']} WHERE userid=$userid"); $db->query("UPDATE users SET eguards=1 WHERE userid=$userid"); print "Congrats, you bought the {$np['hNAME']} for \${$np['hPRICE']}!"; } } else if (isset($_GET['sellhouse'])) { $npq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $np=$db->fetch_row($npq); if($ir['maxwill'] == 100+ $ir['guards1']+$ir['guards2e']+$ir['guards3e']) { print "You already live in the lowest property!"; } else { $db->query("UPDATE users SET money=money+{$np['hPRICE']},will=0,maxwill=100 WHERE userid=$userid"); $db->query("UPDATE users SET eguards=1 WHERE userid=$userid"); print "You sold your {$np['hNAME']} and went back to your shed."; } } else { print "Your current property: [b]{$mp['hNAME']}[/b] <a href='estateguards.php'>Send Your Guards (click this every time you buy or sell your house) </a> The houses you can buy are listed below. Click a house to buy it. "; if($ir['maxwill'] > 100+ $ir['guards1']+$ir['guards2e']+$ir['guards3e']) { print "[url='estate.php?sellhouse']Sell Your House[/url] "; } $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC"); while($r=$db->fetch_row($hq)) { print "[url='estate.php?property={$r[']{$r['hNAME']}[/url]&nbsp - Cost: \${$r['hPRICE']}&nbsp - Will Bar: {$r['hWILL']} "; } } $h->endpage(); ?>   estateguards.php <?php include "globals.php"; if($ir['eguards'] =='0') { print "You can only do this when you buy or sell your house!"; } else { $db->query("UPDATE users SET maxwill=maxwill+ {$ir['guards1']}+ {$ir['guards2e']}+ {$ir['guards3e']} WHERE userid=$userid"); $db->query("UPDATE users SET eguards=0 WHERE userid=$userid"); print "You4 guards are now guarding your house [url='index.php']back[/url]"; } ?>   run these... [mysql]ALTER TABLE users ADD guards1 INT(11) DEFAULT 0; ALTER TABLE users ADD guards2 INT(11) DEFAULT 0; ALTER TABLE users ADD guards3 INT(11) DEFAULT 0; ALTER TABLE users ADD guards2e INT(11) DEFAULT 0; ALTER TABLE users ADD guards3e INT(11) DEFAULT 0; ALTER TABLE users ADD eguards INT(11) DEFAULT 0; ALTER TABLE users ADD maxguards INT(11) DEFAULT 0;[/mysql] add this to explore... [url='buyguards.php']Buy House Guards[/url] [url='trainguards.php']Train House Guards[/url] [url='guardhouse.php']Upgrade Guard House[/url]   add this to viewuser... Normal Guards: {$r['guards1']} Trained Guards: {$r['guards2']} Ultimate Guards: {$r['guards3']}
  3. ok i have been trying to sort out my games crons but i cant get it to work, i have a v2 engine and this is one of the codes i'm using /usr/bin/perl /home/poweroft/public_html/cron_minute.php code=mygamecode (i dont actually use the word 'mygamecode') any help would be great thanks
  4. well in the estate.php i have only edited the bits where it adds will on, cos say if you buy 10 guards then buy a new house it would of set your will, to the houses will, taking the will from the guards you bought off, so i changed that and i suppose the 3 files could be put in one however i would say the sequals are neccesary but i may be wrong, anyway it all works so i dont think it matters how many files the mods split into unless you have limited space or something. Plus it does a bit more than just add will on ,this could be a quite fun addon to a game and good building blocks for a great mod
  5. MOVED TO FREE MODS
  6. should be fixed now just replace the houseguards.php and thanks for the nice comments :)
  7. you can buy guards to guard your house which increases your will, very simple mod houseguards.php <?php include "globals.php"; switch($_GET['action']) { case "buyguard": buyguard(); break; default: index(); break; } function index() { global $db, $ir,$c,$userid,$h; print "Buying an extra Guard will cost you $30000, a guard will guard your house giving you extra will so you get higher stats when you train! You curently have {$ir['guards']} guards [[url='?action=buyguard']Buy A House Guard ($30000)[/url]] [[url='index.php']Back[/url]] "; } function buyguard() { global $db, $ir,$c,$userid,$h; print "Buying A House Guard "; if($ir['money'] < '30000') { print "<font color=red>Error!</font> You don't have enough for the Guard you need 30000 dollars [url='index.php']Back[/url] "; } if($ir['money'] > '29999') { print "<font color=green>Success!</font> You have bought a House Guard for $30000. [[url='?action=buyguard']Buy More Guards[/url]] [[url='index.php']Back[/url]] "; $db->query("UPDATE users SET money=money-30000 WHERE userid=$userid"); $db->query("UPDATE users SET maxwill=maxwill+1 WHERE userid=$userid"); $db->query("UPDATE users SET guards=guards+1 WHERE userid=$userid"); } } ?>   replace estate.php with this <?php include "globals.php"; $mpq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $mp=$db->fetch_row($mpq); $_GET['property']=abs((int) $_GET['property']); if($_GET['property']) { $npq=$db->query("SELECT * FROM houses WHERE hID={$_GET['property']}"); $np=$db->fetch_row($npq); if($np['hWILL'] < $mp['hWILL']) { print "You cannot go backwards in houses!"; } else if ($np['hPRICE'] > $ir['money']) { print "You do not have enough money to buy the {$np['hrNAME']}."; } else { $db->query("UPDATE users SET money=money-{$np['hPRICE']},will=0,maxwill={$np['hWILL']}+{$ir['guards']} WHERE userid=$userid"); if ($home['home_userid'] == $userid) { $db->query("UPDATE home_users SET home_houseID = {$_GET['property']} WHERE home_userid = {$userid}"); } else { $db->query("INSERT INTO home_users VALUES('$userid',{$_GET['property']},'','','','','','','')"); } print "Congrats, you bought the {$np['hNAME']} for \${$np['hPRICE']}!"; } } else if (isset($_GET['sellhouse'])) { $npq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}+{$ir['guards']}"); $np=$db->fetch_row($npq); if($ir['maxwill'] == 100+$ir[guards]) { print "You already live in the lowest house!"; } else { $db->query("UPDATE users SET money=money+{$np['hPRICE']},will=0,maxwill=100+{$ir['guards']} WHERE userid=$userid"); print "You sold your {$np['hNAME']} and went back to the streets."; } } else { print "Your current property: [b]{$mp['hNAME']}[/b] The houses you can buy are listed below. Click a hideout to buy it. "; if($ir['maxwill'] > 100+$ir['guards']) { print "[url='estate.php?sellhouse']Sell Your House[/url] "; } $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC"); while($r=$db->fetch_row($hq)) { print "[url='estate.php?property={$r[']{$r['hNAME']}[/url]&nbsp - Cost: \${$r['hPRICE']}&nbsp - Will Bar: {$r['hWILL']} "; } } $h->endpage(); ?>   run this... [mysql]ALTER TABLE users ADD guards INT(11) DEFAULT 0;[/mysql] put this in explore or where you want it to appear [url='houseguards.php']Buy House Guards[/url]   add this to viewuser.php Guards: {$r['guards']}   DONE:)
  8. no longer available :whistling:
  9. this is what i have   <?php $count = 3; $x = -1; while($x < $count) { $places_to_be_secured = array("ID","viewforum","viewtopic"); $x++; $_GET[$places_to_be_secured[$x]] = abs(@intval($_GET[$places_to_be_secured[$x]])); $_GET['ID'] = abs(@intval($_GET['ID'])); $_GET['viewforum'] = abs(@intval($_GET['viewforum'])); $_GET['viewtopic'] = abs(@intval($_GET['viewtopic'])); $_GET['reply'] = abs(@intval($_GET['reply'])); }
  10. post your globals then i'll have a look
  11. i've only been coding for 2 months so i'm still getting the hang of things so thanks for the advice :D
  12. just edited the previous chest post so you can buy extra keys, it works for v2 and it should for v1 if it doesnt just say and i will sort it :) remember i did not make this mod just edited it chests.php <?php /*----------------------------------------------------- -- Made By Psychotic -- Free Mod -- chests.php -----------------------------------------------------*/ $file_exist = "config.php"; if(file_exists($file_exist)) { include("globals.php"); } else if(!file_exists($file_exist)) { session_start(); require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; require "header.php"; $h = new headers; $h->startheaders(); include "mysql.php"; global $c; $is=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid",$c) or die(mysql_error()); $ir=mysql_fetch_array($is); check_level(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm,$cm); $h->menuarea(); } if($ir['money'] == 0) { die("<font color='red'><center> You Cant Play! You Have No Money!</font>"); } if($ir['keys'] == 0) { die("<font color='red'><center> You Cant Play! You Have No Keys!</font>"); } print "<table width=100% border=0><tr><th><center><h3>[img=Images/chest1.png]</h3></center></th></tr> <tr><th>"; $_GET['number']=(int) $_GET['number']; if($_GET['number']) { $earn=round($ir['money']*($ir['level']+1)/100); $lose=round($ir['money']*($ir['level']+1)/105); if($earn > 100000 or $earn < 1) { $earn=100; } if($lose > 100000 or $lose < 1) { $lose=80; } if($_GET['number'] != 1 and $_GET['number'] != 2 and $_GET['number'] != 3 and $_GET['number'] != 4) { die("Those number's don't exist."); } $rand=rand(1,3); if($_GET['number'] == $rand) { print "You put the key in the chest, the key did'nt snap and the lock opened <font color=lime>Congratulations you found \$$earn, 1 key and earn some exp!</font> "; } else { print "You put the key in the chest, the key snapped in the hole <font color=red>You lost a key and 1 will.</font> "; } print "<table width=100% border=0><tr><th>"; if($_GET['number'] == 1) { if($rand == 1) { print "<img src=chest2.png></img>"; } else { print "<img src=chest.png></img>"; } } else { print "<img src=chest.png></img>"; } print "</th><th>"; if($_GET['number'] == 2) { if($rand == 2) { print "<img src=chest2.png></img>"; } else { print "<img src=chest.png></img>"; } } else { print "<img src=chest.png></img>"; } print "</th><th>"; if($_GET['number'] == 3) { if($rand == 3) { print "<img src=chest2.png></img>"; } else { print "<img src=chest.png></img>"; } } else { print "<img src=chest.png></img>"; } print "</th></tr></table>"; print " You are being redirected back</font> <meta http-equiv='refresh' content='3; url=chests.php'> "; //queries, die if($_GET['number'] == $rand) { mysql_query("UPDATE users SET money=money+{$earn} WHERE userid=$userid",$c); mysql_query("UPDATE users SET exp=exp+2 WHERE userid=$userid",$c); mysql_query("UPDATE users SET chestsincome=chestsincome+{$earn} WHERE userid=$userid",$c); mysql_query("UPDATE `users` SET `keys` = `keys` + '1' WHERE `userid` = '$ir[userid]'"); } else { mysql_query("UPDATE `users` SET `keys` = `keys` - '1' WHERE `userid` = '$ir[userid]'"); mysql_query("UPDATE users SET will=will-1 WHERE userid=$userid",$c); } } else { $earn=round($ir['money']*($ir['level']+1)/100); $lose=round($ir['money']*($ir['level']+2)/105); if($earn > 100000 or $earn < 1) { $earn=100; } if($lose > 100000 or $lose < 1) { $lose=80; } print "</th><th>"; if($_GET['tea'] == 1) { if($ir['money'] <10000) { print "You don't have enough Money!"; } else { mysql_query("UPDATE users SET money=money-10000 WHERE userid=$userid",$c); mysql_query("UPDATE `users` SET `keys` = `keys` + '1' WHERE `userid` = '$ir[userid]'"); print "<u><h2>You bought one key for $10000!</h2></u>"; print " You are being redirected back</font> <meta http-equiv='refresh' content='4; url=chests.php'> "; } } print "You walk up to three chests, you find a key on the floor, its old and will probably only one try. If you get the right chest you will pocket whats inside [b]\$$earn[/b] But if you don't, You will lose a key, You have [{$ir['keys']}] keys Left[/b] <table width=100% border=0><tr><th> [url='chests.php?number=1']<img src=chest.png></img>[/url] </th><th> [url='chests.php?number=2']<img src=chest.png></img>[/url] </th><th> [url='chests.php?number=3']<img src=chest.png></img>[/url] </th></tr></table> [url='chests.php?tea=1']<h3>Buy a key for $10000!!!</h3>[/url] "; } print "</th></tr></table>"; $h->endpage(); ?> chest.png chest2.png
  13. <?php include "globals.php"; $_GET['u'] = abs((int) $_GET['u']); if(!$_GET['u']) { print "Invalid use of file"; } else { $q=$db->query("SELECT u.*,us.*,c.*,h.*,g.*,f.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN cities c ON u.location=c.cityid LEFT JOIN houses h ON u.maxwill=h.hWILL LEFT JOIN gangs g ON g.gangID=u.gang LEFT JOIN fedjail f ON f.fed_userid=u.userid WHERE u.userid={$_GET['u']}"); if($db->num_rows($q) == 0) { print "Sorry, we could not find a user with that ID, check your source."; } else { $r=$db->fetch_row($q); $m=$db->query("SELECT * FROM users WHERE userid={$r['married']}"); $par=$db->fetch_row($m); if($r['user_level'] == 1) { $userl="Mobster"; } else if($r['user_level'] == 2) { $userl="Owner"; } else if ($r['user_level'] == 3) { $userl="Admin"; } else if($r['user_level'] == 0) { $userl="NPC"; } else {$userl="Moderator"; } $lon=($r['laston'] > 0) ?date('F j',$r['laston']) : "Never"; $sup=date('j F',$r['signedup']); $ts=$r['strength']+$r['agility']+$r['guard']+$r['labour']+$r['IQ']; $d=""; if($r['laston'] > 0) { $la=time()-$r['laston']; $unit="seconds"; if($la >= 60) { $la=(int) ($la/60); $unit="minutes"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } $str="$la $unit ago"; } else { $str="--"; } if($r['last_login'] > 0) { $ll=time()-$r['last_login']; $unit2="seconds"; if($ll >= 60) { $ll=(int) ($ll/60); $unit2="minutes"; } if($ll >= 60) { $ll=(int) ($ll/60); $unit2="hours"; if($ll >= 24) { $ll=(int) ($ll/24); $unit2="days"; } } $str2="$ll $unit2 ago"; } else { $str2="--"; } if($r['married'] != 0) { $partner= "[url='viewuser.php?u={$par[']<font color=green>{$par['username']}</font>[/url]"; } else { $partner= "<font color=red>N/A</font>"; } if($r['user_level'] >1){ $r['username'] = "<font color=red>{$r['username']}</font>";} elseif($r['donatordays']) { $r['username'] = "<font color=yellow>{$r['username']}</font>";$d="[img=don.gif]"; } if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } if($r['display_pic']) { print "<center>[img={$r[] </center>"; } else { print "<center>[img=http://i38.tinypic.com/29bh8d5.jpg]</center> "; } print"[b]Name:[/b] {$r['username']} [{$r['userid']}] $d "; print"[b]User Level:[/b] [url='stafflist.php']$userl[/url] "; print"[b]Level:[/b] {$r['level']} "; print"[b]Health:[/b] {$r['hp']}/{$r['maxhp']} "; print "[b]Gender:[/b] {$r['gender']} "; print "[b]Married:[/b] $partner "; print"[b]Age:[/b] {$r['daysold']} Days "; print"[b]Signed Up:[/b] $sup "; print"[b]Last Active:[/b] $str "; print"[b]Gang:[/b] "; if($r['gang']) { print "[url='gangs.php?action=view&ID={$r[']{$r['gangNAME']}[/url]"; } else { print "None"; } print"[b]Location:[/b] [url='DCrail.php']{$r['cityname']}[/url] "; print"[b]Money:[/b] \${$r['money']} "; print"[b]Property:[/b] {$r['hNAME']} "; $sh=($ir['user_level'] >1) ? "Staff Info" : ""; print "</td></tr>"; if($r['fedjail']) { print " [b]<font color=brown>This user is in federal jail for {$r['fed_days']} day(s). {$r['fed_reason']}</font>"; } if($r['hospital']) { print " [b]<font color=red>This user is in hospital for {$r['hospital']} minutes. {$r['hospreason']}</font>[/b] "; } if($r['jail']) { print " [b]<font color=red>This user is in jail for {$r['jail']} minutes. {$r['jail_reason']}</font>[/b]</td></tr><tr> <td> "; } echo"<hr>"; echo"<center>"; print"<h3>[b]<u>Actions</u>[/b]"; echo"<hr>"; echo"</center>"; print"[[url='mailbox.php?action=compose&ID={$r[']Send Mail[/url]]"; print"[[url='sendcash.php?ID={$r[']Send Cash[/url]]"; print"[[url='sendcrys.php?ID={$r[']Send crystals[/url]]"; print"[[url='sendbank.php?ID={$r[']Bank Xfer[/url]]"; print"[[url='sendcyber.php?ID={$r[']CyberBank Xfer[/url]]"; print"[[url='attack.php?ID={$r[']Attack[/url]]"; print"[[url='mug.php?ID={$r[']Mug[/url]]"; print"[[url='contactlist.php?action=add&ID={$r[']Add Contact[/url]]"; print"[[url='friendslist.php?action=add&ID={$r[']Add Friends[/url]]"; print"[[url='blacklist.php?action=add&ID={$r[']Add Enemies[/url]]"; } if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5) { echo"<center><h3><u>[b]Staff actions</center></h3></u>[/b]"; print"[[url='jailuser.php?userid={$r[']Jail[/url]]"; print"[[url='forumban.php?userid={$r[']Forum Ban[/url]]"; print"[[url='mailban.php?userid={$r[']MailBan[/url]]"; } if($ir['donatordays'] > 0) if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5) { $r['lastiph']=@gethostbyaddr($r['lastip']); $r['lastiph']=checkblank($r['lastiph']); $r['lastip_loginh']=@gethostbyaddr($r['lastip_login']); $r['lastip_loginh']=checkblank($r['lastip_loginh']); $r['lastip_signuph']=@gethostbyaddr($r['lastip_signup']); $r['lastip_signuph']=checkblank($r['lastip_signuph']); print "<center><h3>Internet Info</h3><table width='100%' border='0' cellspacing='1' class='table'> <tr><td></td><td class='h'>IP</td><td class='h'>Hostname</td></tr> <tr><td class='h'>Last Hit</td><td >$r[lastip]</td><td >$r[lastiph]</td></tr> <tr><td class='h'>Last Login</td><td '>$r[lastip_login]</td><td >$r[lastip_loginh]</td></tr> <tr><td class='h'>Signup</td><td >$r[lastip_signup]</td><td >$r[lastip_signuph]</td></tr> [url='staff_punit.php?action=ipform']<u>IP search this user</u>[/url] "; print "<form action='staffnotes.php' method='post'> Staff Notes: <textarea rows=7 cols=40 name='staffnotes'>{$r['staffnotes']}</textarea> <input type='hidden' name='ID' value='{$_GET['u']}' /> <input type='submit' value='Change /></form></center>"; } else { print ""; } print "</tr></table>"; } function checkblank($in) { if(!$in) { return "N/A"; } return $in; } $h->endpage(); ?>
  14. nice mod, fits my game perfectly :thumbsup:
  15. i've added in the banner plus sorted out afew small errors :) changed the colors to go with my game though so you might want to change them back   <?php $count = 3; $x = -1; while($x < $count) { $places_to_be_secured = array("ID","viewforum","viewtopic"); $x++; $_GET[$places_to_be_secured[$x]] = abs(@intval($_GET[$places_to_be_secured[$x]])); } class headers { function startheaders() { global $ir, $set; echo <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>{$set['game_name']}</title> <style type="text/css"> <!-- body { background-color: #000000; margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: red; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:link { color: orange;font-weight: bold;text-decoration: none; } a:hover {color: orange;text-decoration: none; } table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12px; } img { border:none; } textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: red; } .table2 { } .lgrad { background-image:url(yellowbar.png); background-repeat:repeat-y; width:19px; } .linegrad { background-image:url(yellowbar.png); background-repeat:repeat-y; background-align: center; width:4px; } .rgrad { background-image:url(yellowbar.png); background-repeat:repeat-y; width:19px; } .dgrad { background-image:url(yellowbar.png); background-repeat:repeat-x; height:38px; } .dgradl { background-image:url(yellowbar.png); background-repeat:no-repeat; height:38px; width:38px; } .dgradr { background-image:url(yellowbar.png); background-repeat:no-repeat; height:38px; width:38px; } .center { width:932px; background-color:#000000; vertical-align:top; text-align:center; } .center { width:932px; background-color:#000000; vertical-align:top; text-align:center; } .table { background-color:#000000; border-width:1; border-color:#101010; border-style:dotted; border-width: 3px; -moz-border-radius: 10px; border: solid; border-color: #222222; } .tablee{ background-color:#000000; border-width:1; border-color:#101010; border-style:solid; border-width: 3px; -moz-border-radius: 10px; border: solid; border-color: #222222; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: red; } .tablee a { font-family:calibri, helvetica, arial, geneva, sans-seriff; font-size: 12px; color: red; } .tablee a:visited{ font-family:calibri, helvetica, arial, geneva, sans-seriff; font-size: 12px; color: red; } .tablee a:hover { font-family:calibri, helvetica, arial, geneva, sans-seriff; font-size: 12px; color: red; } .table3 { background-color:#000000; } .table td { background-color:#000000; border-width:1; border-color:#101010; border-style:solid; height:22px; } .table3 td { background-color:#000000; } td .alt { background-color:#000000; height:22px; border-width: 3px; -moz-border-radius: 10px; border: solid; border-color: #222222; } td .h { background-image:url(baa.jpg); background-repeat:repeat-x; font-weight: bold; background-color: #000000; border-width: 3px; -moz-border-radius: 10px; border: solid; border-color: #222222; } .table th { background-image:url(baa.jpg); background-repeat:repeat-y; font-weight: bold; background-color: #000000; border-width: 30px; border: solid; border-color: #222222; } textarea,input,select { font-family: Tahoma; color:#99CC00; font-weight:bold; color:silver; background-image:url(baa.jpg); background-color:#000000; border-width:1; border-color:silver; border-style:solid; font-size: 13px; } .quotemain { color:#EEEEEE; background-color: #66FF33 ; font-style: italic; padding: 2px; border: 1px solid gray; } .sexypanels{ list-style-type: none; margin: 0; padding: 0; width: 125px; /* width of menu */ } .sexypanels li{ border-bottom: 1px solid white; /* white border beneath each menu item */ } .sexypanels li a{ background-image:url(sexypanelright.gif) no-repeat right top; /*color of menu by default*/ font: 12px Courier New, Trebuchet MS, Verdana; display: block; color: white; width: auto; padding: 3px 0; /* Vertical (top/bottom) padding for each menu link */ text-indent: 6px; text-decoration: none; border-bottom: 1px solid black; /*bottom border of menu link. Should be equal or darker to link's bgcolor*/ } .sexypanels li a:visited, .sexypanels li a:active{ color: white; } .sexypanels li a:hover{ background-color: #25383C; /*color of menu onMouseover*/ color: white; border-bottom: 1px solid black; /*bottom border of menu link during hover. Should be equal or darker to link's hover's bgcolor*/ } </style> <!--[if IE]> <style type="text/css"> .sexypanels li a{ /* Menu link width value for IE */ width: 100%; } <![endif]--> </style> </style> <link rel="stylesheet" type="text/css" href="/CSS/tooltip.css"> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table"> <tr> <td class="center"> EOF; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = mysql_real_escape_string($_SERVER['REMOTE_ADDR']); $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print "How Silly Of You. You Lose Half Of Your Exp For That."; $db->query("UPDATE users SET exp=exp/2, attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } global $staffpage; $bgcolor = '000000'; print <<<OUT [img=title.jpg] <table width="100%" border="0" cellpadding="0" cellspacing="0" class=table> <td width="125" bgcolor="#$bgcolor" valign="top" align="left"> <span style="color: blue; font-weight: 1000px;"><big>Navigation</big></span> OUT; if($ir['hospital']) { print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes. "; } if($ir['jail']) { print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes. "; } OUT; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("[b]<font color=red size=+1>You Are In The {$set['game_name']}'s Fedjail for {$r['fed_days']} day(s). Because: {$r['fed_reason']}</font>[/b]</body></html>"); } if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your Ip Is Banned, Unlucky, There Is [b]NO[/b] Way To Get It Unbanned</font>[/b]</body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = '000000'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"></td><td bgcolor="#'.$bgcolor.'" valign="top"> <center>'; function is_whole_number($var){ return (is_numeric($var)&&(intval($var)==floatval($var))); } $array = array_merge($_GET, $_POST); while ($post_cap = current($array)) { if ($post_cap < 0) { print "Illegal Operation"; die(""); } if (is_numeric($post_cap) && !is_whole_number($post_cap)) { print "Illegal Operation"; die(""); } if(strpos($post_cap, '=') && ($_POST[confirmPage] == "")) { print "Illegal Operation"; die(""); } next($array); } $array_gete = array($_GET); while ($tick = current($array_gete)) { $thekey = key($array_gete); $_GET[$thekey] = str_replace("=", "", htmlspecialchars($_GET[$thekey])); next($array_gete); } $array_poste = array($_POST); while ($tick = current($array_poste)) { $thekey = key($array_poste); $_POST[$thekey] = str_replace("=", "", htmlspecialchars($_POST[$thekey])); next($array_poste); } $q=$db->query("SELECT userid FROM users"); $membs=$db->num_rows($q); $q=$db->query("SELECT userid FROM users WHERE bankmoney>-1"); $banks=$db->num_rows($q); $q=$db->query("SELECT userid FROM users WHERE gender='Male'"); $male=$db->num_rows($q); $q=$db->query("SELECT userid FROM users WHERE gender='Female'"); $fem=$db->num_rows($q); $total=0; $q=$db->query("SELECT money FROM users"); while($r=$db->fetch_row($q)) { $total+=$r['money']; } $avg=(int) ($total/$membs); $avg1=(int) ($total/$membs*100); $totalb=0; $q=$db->query("SELECT bankmoney FROM users WHERE bankmoney>-1"); while($r=$db->fetch_row($q)) { $totalb+=$r['bankmoney']; } $totalc=0; $q=$db->query("SELECT crystals FROM users"); while($r=$db->fetch_row($q)) { $totalc+=$r['crystals']; } $totali=0; $q=$db->query("SELECT inv_qty FROM inventory"); while($r=$db->fetch_row($q)) { $totali+=$r['inv_qty']; } $avgc=(int) ($totalc/$membs); $q=$db->query("SELECT mail_id FROM mail"); $mail=$db->num_rows($q); $q=$db->query("SELECT evID FROM events"); $events=$db->num_rows($q); if ($_GET['time']) { $time=$_GET['time']; } else { $time=60; } $cn=0; $lk=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-1440*60"); $aa=mysql_num_rows($lk); $ll=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-60*60"); $ab=mysql_num_rows($ll); $lm=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-45*60"); $ac=mysql_num_rows($lm); $ln=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-30*60"); $ad=mysql_num_rows($ln); $lo=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60"); $ae=mysql_num_rows($lo); $he=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-1*60"); $hu=mysql_num_rows($he); print "<table class=table><tr> <td align=center>[url='donator.php'][b]Become a donator Now[/b][/url] </td> <td align=center>[url='polling.php'][b]Have Your Vote Now[/b][/url] </td> <td align=center>[url='voting.php'][b]Vote For Us And Gain Special Rewards[/b][/url] </td> </tr></table>"; } function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = '000000'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"></td><td bgcolor="#'.$bgcolor.'" valign="top"><center>'; } function endpage() { global $ir, $c, $db; $q=$db->query("SELECT userid FROM users"); $membs=$db->num_rows($q); $q = mysql_query("SELECT `laston` FROM `users` WHERE (`laston` > unix_timestamp() - 15 * 60)") or die(mysql_error()); $online = mysql_num_rows($q); $avgc=(int) ($totalc/$membs); $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ($ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; if($ir['donatordays']) { $u = "<font color=green>{$ir['username']} [{$ir['userid']}]</font> [img=donator.gif]"; } print" </td><td width='1' class='linegrad' bgcolor='#000000'></td><td width='150' bgcolor='#000000' valign='top' align='left'> <h3>Stats.</h3> [b]Name:[/b] <a href=viewuser.php?u={$ir['userid']}>{$u}</a> [b]Money:[/b] \${$ir['money']} [[url="bank.php><font"]Deposit</font>[/url]] [b]crystals:[/b] {$ir['crystals']} [b]Level:[/b] {$ir['level']} [[url='logout.php']<font color=red>Logout</font>[/url]] <font color=green><hr></font> [b]Energy:[/b] {$ir['energy']}/{$ir['maxenergy']} <img src=bar_left.gif height=10><img src=barred.gif width=$enperc height=10><img src=barredgfdf.gif width=$enopp height=10><img src=bar_fil_end.gif height=10> [b]EXP:[/b] {$ir['exp']}/{$ir['exp_needed']} ($experc%) <img src=bar_left.gif height=10><img src=barred.gif width=$experc height=10><img src=barreddghfd.gif width=$exopp height=10><img src=bar_fil_end.gif height=10> [b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']} <img src=bar_left.gif height=10><img src=barred.gif width=$brperc height=10><img src=barredsdf.gif width=$bropp height=10><img src=bar_fil_end.gif height=10> [b]Will:[/b] {$ir['will']}/{$ir['maxwill']} <img src=bar_left.gif height=10><img src=barred.gif width=$brperc height=10><img src=barredfd.gif width=$bropp height=10><img src=bar_fil_end.gif height=10> [b]Health:[/b] {$ir['hp']}/{$ir['maxhp']} <img src=bar_left.gif height=10><img src=barred.gif width=$hpperc height=10><img src=barredsdfd.gif width=$hpopp height=10><img src=bar_fil_end.gif height=10> <hr> "; ?> <tr> <td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <div align=center class=table id="footer"> [url="/userlist.php"]Total Masters[/url] | [url="/usersonline.php"]Masters Online Now[/url] | [url="/stats.php"]Game Stats[/url]| [url="/vdonators.php"]View Minipulators[/url] </div> </tr> </table> </td> </tr> </table> </table> </body> </html> <?php } } ?>
×
×
  • Create New...