Jump to content
MakeWebGames

Nicholas

Members
  • Posts

    467
  • Joined

  • Last visited

Everything posted by Nicholas

  1. Re: New Game what do u mean? get someone to make me a nice layout for my game? if thats what u mean? how can u get someone to make me a nice layout?
  2. Re: New Game huh? what do u mean Pudda
  3. Re: New Game well that was quick replys lol, and its my first game, im not a good designer. but i was jsut thinking of a different design to most the games out there lol.
  4. Nicholas

    New Game

    hi, ive finally set my game up and its up and running www.criminals-nightmare.co.cc thats the link, the login page might not be good, as thats my first login page mod i made lol. hope you come in and play! i will think working on new updates.
  5. Re: mysql help? <? $c=mysql_connect('mysql_host','mysql_user','mysql_pass') or die(mysql_error()); mysql_select_db('mysql_db',$c); ?> what so for example say my hostname is = localhost database name is = **** username is = **** password i set was = **** it should turn out like this? <? $c=mysql_connect('localhost','****','****') or die(mysql_error()); mysql_select_db('***',$c); ?> Details Removed - Spudinski
  6. Re: hireaspy mod ive not tested it lol, at moment im more conserned about my crons and mysql.php file. the crons dont work and mysql.php has a warning message lol.
  7. Re: mysql help? Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'cpanelusername'@'localhost' (using password: YES) in /home/nicholas/public_html/mysql.php on line 2 Access denied for user 'cpanelusername'@'localhost' (using password: YES) i get that now lol, this mysql.php file is kinda getting annoying lol. all my other files are good apart from this stupid mysql.php file lol also u never know if they would, they might be kind and let me use it lol, they could also tell me it in a private message.
  8. Re: mysql help? also if anyone can give me there mysql.php file information that would be greatful.
  9. here is a hireaspy mod, not sure if it works as i get this stupid warning message with mysql line 2 crap lol. but anyways here it is. oh i just added some more coding to protect you from players probably doing a sql infection attack. (not sure if it work tho as i cant test it lol or well i dont even know how to do it for that matter...) also i put a // comment in there so you know how to change the price of spying. hireaspy.php   <?php session_start(); require "global_func.php"; $_GET['ID'] = abs(@intval($_GET['ID'])); 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['user_level'] != 2) { die(""); } $_POST['ID'] = abs((int) $_POST['ID']); $_GET['ID'] = abs((int) $_GET['ID']); if($_POST['ID']) { $q=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid={$_POST['ID']}",$c); $r=mysql_fetch_array($q); if($r['user_level']==2) { print "The spy never came back. It was rumoured he was attacked by {$r['username']} and pushed off a cliff."; } else { $payment=$r['level']*1000; // example, if the player is level 5 it cost the spyer $10000. mysql_query("UPDATE users SET money=money-$payment WHERE userid=$userid",$c); $exp=(int) ($r['exp']/(($r['level']+1)*($r['level']+1)*($r['level']+1)*2)*100); print "You have hired a spy to get information on [b]{$r['username']}[/b] at the cost of \$$payment. Here is the info he retrieved: Strength: {$r['strength']} Agility: {$r['agility']} Guard: {$r['guard']} Labour: {$r['labour']} IQ: {$r['IQ']} Exp: $exp% Here is his/her inventory. "; $inv=mysql_query("SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_userid={$r['userid']}",$c); if (mysql_num_rows($inv) == 0) { print "[b]This person has no items![/b]"; } else { print "[b]His/her items are listed below.[/b] <table width=100%><tr style='background-color:gray;'><th>Item</th><th>Sell Value</th><th>Total Sell Value</th></tr>"; while($i=mysql_fetch_array($inv)) { print "<tr><td>{$i['itmname']}"; if ($i['inv_qty'] > 1) { print " x{$i['inv_qty']}"; } print "</td><td>\${$i['itmsellprice']}</td><td>"; print "$".($i['itmsellprice']*$i['inv_qty']); print "</td></tr>"; } print "</table>"; } } } else { $q=mysql_query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid={$_GET['ID']}",$c); if(mysql_num_rows($q) == 0) { print "This user does not exist."; } else { $r=mysql_fetch_array($q); $payment=$r['level']*100; print "You are hiring a spy to spy on [b]{$r['username']}[/b] at the cost of \$$payment. "; if($ir['money'] >= $payment) { print "<form action='hireaspy.php' method='post'><input type='hidden' name='ID' value='{$_GET['ID']}' /><input type='submit' value='Hire' /></form>"; } else { print "You don't have enough money!"; } } } $h->endpage(); ?>   if it works feel free to +1 me lol.
  10. hi i get a warning message on some files that probably use mysql Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'mysql_host' (1) in /home/nicholas/public_html/mysql.php on line 2 Unknown MySQL server host 'mysql_host' (1)   <? $c=mysql_connect('mysql_host','mysql_user','mysql_pass') or die(mysql_error()); mysql_select_db('mysql_db',$c); ?>   can anyone help me find the problem?
  11. Re: Help with staff users please looks fine to me. nothing wrong in the coding.
  12. Re: cron job help? yer figured it was... i guess i could ask my mum for a job around the house for like ?5-10 a month so i can get on a $2-5 host a month.
  13. Re: Inventory Help inventory.php   <?php include "globals.php"; $q=$db->query("SELECT * FROM items WHERE itmid IN({$ir['equip_primary']}, {$ir['equip_secondary']}, {$ir['equip_armor']})"); print "<h3>Equipped Items</h3><hr />"; while($r=$db->fetch_row($q)) { $equip[$r['itmid']]=$r; } print "<table width='75%' cellspacing='1' class='table'> <tr> <th>Primary Weapon</th> <td>"; if($equip[$ir['equip_primary']]['itmid']) { print $equip[$ir['equip_primary']]['itmname']."</td><td>[url='unequip.php?type=equip_primary']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Secondary Weapon</th> <td>"; if($equip[$ir['equip_secondary']]['itmid']) { print $equip[$ir['equip_secondary']]['itmname']."</td><td>[url='unequip.php?type=equip_secondary']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> <tr> <th>Armor</th> <td>"; if($equip[$ir['equip_armor']]['itmid']) { print $equip[$ir['equip_armor']]['itmname']."</td><td>[url='unequip.php?type=equip_armor']Unequip Item[/url]</td>"; } else { print "None equipped.</td><td> </td>"; } print "</tr> </table><hr /> <h3>Inventory</h3><hr />"; $inv=$db->query("SELECT iv.*,i.*,it.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid WHERE iv.inv_userid={$userid} ORDER BY i.itmtype ASC, i.itmname ASC"); if ($db->num_rows($inv) == 0) { print "[b]You have no items![/b]"; } else { print "[b]Your items are listed below.[/b] <table width=100% class=\"table\" border=\"0\" cellspacing=\"1\"> <tr> <td class=\"h\">Item</td> <td class=\"h\">Sell Value</td> <td class=\"h\">Total Sell Value</td> <td class=\"h\">Links</td> </tr>"; $lt=""; while($i=$db->fetch_row($inv)) { if($lt!=$i['itmtypename']) { $lt=$i['itmtypename']; print "\n<tr><td colspan=4>[b]{$lt}[/b]</td></tr>"; } if($i['weapon']) { $i['itmname']="<font color='red'>*</font>".$i['itmname']; } if($i['armor']) { $i['itmname']="<font color='green'>*</font>".$i['itmname']; } print "<tr><td>{$i['itmname']}"; if ($i['inv_qty'] > 1) { print " x{$i['inv_qty']}"; } print "</td><td>\${$i['itmsellprice']}</td><td>"; print "$".($i['itmsellprice']*$i['inv_qty']); print "</td><td>[[url='iteminfo.php?ID={$i[']Info[/url]] [[url='itemsend.php?ID={$i[']Send[/url]] [[url='itemsell.php?ID={$i[']Sell[/url]] [[url='imadd.php?ID={$i[']Add To Market[/url]]"; if($i['effect1_on'] || $i['effect2_on'] || $i['effect3_on']) { print " [[url='itemuse.php?ID={$i[']Use[/url]]"; } if($i['weapon']) { print " [[url='equip_weapon.php?ID={$i[']Equip as Weapon[/url]]"; } if($i['armor']) { print " [[url='equip_armor.php?ID={$i[']Equip as Armor[/url]]"; } print "</td></tr>"; } print "</table>"; print "[size="1"][b]NB:[/b] Items with a small red [/size]<font color='red'>*</font>[size="1"] next to their name can be used as weapons in combat. Items with a small green [/size]<font color='green'>*</font>[size="1"] next to their name can be used as armor in combat.[/size]"; } $h->endpage(); ?>   staff_items.php   <?php include "sglobals.php"; //This contains item stuffs switch($_GET['action']) { case 'newitem': new_item_form(); break; case 'newitemsub': new_item_submit(); break; case 'giveitem': give_item_form(); break; case 'giveitemsub': give_item_submit(); break; case 'killitem': kill_item_form(); break; case 'killitemsub': kill_item_submit(); break; case 'edititem': edit_item_begin(); break; case 'edititemform': edit_item_form(); break; case 'edititemsub': edit_item_sub(); break; case 'newitemtype': newitemtype(); break; default: print "Error: This script requires an action."; break; } function new_item_form() { global $db,$ir,$c; if($ir['user_level'] > 2) { die("403"); } print "<h3>Adding an item to the game</h3><form action='staff_items.php?action=newitemsub' method='post'> Item Name: <input type='text' name='itmname' value='' /> Item Desc.: <input type='text' name='itmdesc' value='' /> Item Type: ".itemtype_dropdown($c,'itmtype')." Item Buyable: <input type='checkbox' name='itmbuyable' checked='checked' /> Item Price: <input type='text' name='itmbuyprice' /> Item Sell Value: <input type='text' name='itmsellprice' /> <hr /> [b]Usage Form[/b]<hr /> [b]<u>Effect 1</u>[/b] On? <input type='radio' name='effect1on' value='1' /> Yes <input type='radio' name='effect1on' value='0' checked='checked' /> No Stat: <select name='effect1stat' type='dropdown'> <option value='energy'>Energy</option> <option value='will'>Will</option> <option value='brave'>Brave</option> <option value='hp'>Health</option> <option value='strength'>Strength</option> <option value='agility'>Agility</option> <option value='guard'>Guard</option> <option value='labour'>Labour</option> <option value='IQ'>IQ</option> <option value='hospital'>Hospital Time</option> <option value='jail'>Jail Time</option> <option value='money'>Money</option> <option value='crystals'>Crystals</option> <option value='cdays'>Education Days Left</option> <option value='bankmoney'>Bank money</option> <option value='cybermoney'>Cyber money</option> <option value='crimexp'>Crime XP</option> </select> Direction: <select name='effect1dir' type='dropdown'> <option value='pos'>Increase</option> <option value='neg'>Decrease</option> </select> Amount: <input type='text' name='effect1amount' value='0' /> <select name='effect1type' type='dropdown'> <option value='figure'>Value</option> <option value='percent'>Percent</option> </select><hr /> [b]<u>Effect 2</u>[/b] On? <input type='radio' name='effect2on' value='1' /> Yes <input type='radio' name='effect2on' value='0' checked='checked' /> No Stat: <select name='effect2stat' type='dropdown'> <option value='energy'>Energy</option> <option value='will'>Will</option> <option value='brave'>Brave</option> <option value='hp'>Health</option> <option value='strength'>Strength</option> <option value='agility'>Agility</option> <option value='guard'>Guard</option> <option value='labour'>Labour</option> <option value='IQ'>IQ</option> <option value='hospital'>Hospital Time</option> <option value='jail'>Jail Time</option> <option value='money'>Money</option> <option value='crystals'>Crystals</option> <option value='cdays'>Education Days Left</option> <option value='bankmoney'>Bank money</option> <option value='cybermoney'>Cyber money</option> <option value='crimexp'>Crime XP</option> </select> Direction: <select name='effect2dir' type='dropdown'> <option value='pos'>Increase</option> <option value='neg'>Decrease</option> </select> Amount: <input type='text' name='effect2amount' value='0' /> <select name='effect2type' type='dropdown'> <option value='figure'>Value</option> <option value='percent'>Percent</option> </select><hr /> [b]<u>Effect 3</u>[/b] On? <input type='radio' name='effect3on' value='1' /> Yes <input type='radio' name='effect3on' value='0' checked='checked' /> No Stat: <select name='effect3stat' type='dropdown'> <option value='energy'>Energy</option> <option value='will'>Will</option> <option value='brave'>Brave</option> <option value='hp'>Health</option> <option value='strength'>Strength</option> <option value='agility'>Agility</option> <option value='guard'>Guard</option> <option value='labour'>Labour</option> <option value='IQ'>IQ</option> <option value='hospital'>Hospital Time</option> <option value='jail'>Jail Time</option> <option value='money'>Money</option> <option value='crystals'>Crystals</option> <option value='cdays'>Education Days Left</option> <option value='bankmoney'>Bank money</option> <option value='cybermoney'>Cyber money</option> <option value='crimexp'>Crime XP</option> </select> Direction: <select name='effect3dir' type='dropdown'> <option value='pos'>Increase</option> <option value='neg'>Decrease</option> </select> Amount: <input type='text' name='effect3amount' value='0' /> <select name='effect3type' type='dropdown'> <option value='figure'>Value</option> <option value='percent'>Percent</option> </select><hr /> [b]Combat Usage[/b] Weapon Power: <input type='text' name='weapon' value='0' /> Armor Defense: <input type='text' name='armor' value='0' /><hr /> <input type='submit' value='Add Item To Game' /></form>"; } function new_item_submit() { global $db,$ir,$c,$h; if($ir['user_level'] > 2) { die("403"); } if(!isset($_POST['itmname']) || !isset($_POST['itmdesc']) || !isset($_POST['itmtype']) || !isset($_POST['itmbuyprice']) || !isset($_POST['itmsellprice'])) { print "You missed one or more of the fields. Please go back and try again. [url='admin.php?action=newitem']> Back[/url]"; $h->endpage(); exit; } $itmname=$db->escape($_POST['itmname']); $itmdesc=$db->escape($_POST['itmdesc']); $weapon=abs((int) $_POST['weapon']); $armor=abs((int) $_POST['armor']); if($_POST['itmbuyable'] == 'on') { $itmbuy=1; } else { $itmbuy=0; } $efx1=$db->escape(serialize(array("stat" => $_POST['effect1stat'], "dir" => $_POST['effect1dir'], "inc_type" => $_POST['effect1type'], "inc_amount" => abs((int) $_POST['effect1amount'])))); $efx2=$db->escape(serialize(array("stat" => $_POST['effect2stat'], "dir" => $_POST['effect2dir'], "inc_type" => $_POST['effect2type'], "inc_amount" => abs((int) $_POST['effect2amount'])))); $efx3=$db->escape(serialize(array("stat" => $_POST['effect3stat'], "dir" => $_POST['effect3dir'], "inc_type" => $_POST['effect3type'], "inc_amount" => abs((int) $_POST['effect3amount'])))); $m=$db->query("INSERT INTO items VALUES('',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor)"); print "The {$_POST['itmname']} Item was added to the game."; stafflog_add("Created item {$_POST['itmname']}"); } function give_item_form() { global $db,$ir,$c; if($ir['user_level'] > 3) { die("403"); } print "<h3>Giving Item To User</h3> <form action='staff_items.php?action=giveitemsub' method='post'> User: ".user_dropdown($c,'user')." Item: ".item_dropdown($c,'item')." Quantity: <input type='text' name='qty' value='1' /> <input type='submit' value='Give Item' /></form>"; } function give_item_submit() { global $db,$ir,$c; if($ir['user_level'] > 3) { die("403"); } $db->query("INSERT INTO inventory VALUES('',{$_POST['item']},{$_POST['user']},{$_POST['qty']})",$c) or die(mysql_error()); print "You gave {$_POST['qty']} of item ID {$_POST['item']} to user ID {$_POST['user']}"; stafflog_add("Gave {$_POST['qty']} of item ID {$_POST['item']} to user ID {$_POST['user']}"); } function kill_item_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } print "<h3>Deleting Item</h3> The item will be permanently removed from the game. <form action='staff_items.php?action=killitemsub' method='post'> Item: ".item_dropdown($c,'item')." <input type='submit' value='Kill Item' /></form>"; } function kill_item_submit() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } $d=$db->query("SELECT * FROM items WHERE itmid={$_POST['item']}"); $itemi=$db->fetch_row($d); $db->query("DELETE FROM items WHERE itmid={$_POST['item']}"); $db->query("DELETE FROM shopitems WHERE sitemITEMID={$_POST['item']}"); $db->query("DELETE FROM inventory WHERE inv_itemid={$_POST['item']}"); $db->query("DELETE FROM itemmarket WHERE imITEM={$_POST['item']}"); print "The {$itemi['itmname']} Item was removed from the game."; stafflog_add("Deleted item {$itemi['itmname']}"); } function edit_item_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } print "<h3>Editing Item</h3> You can edit any aspect of this item. <form action='staff_items.php?action=edititemform' method='post'> Item: ".item_dropdown($c,'item')." <input type='submit' value='Edit Item' /></form>"; } function edit_item_form() { global $db,$ir,$c,$h; if($ir['user_level'] > 2) { die("403"); } $d=$db->query("SELECT * FROM items WHERE itmid={$_POST['item']}"); $itemi=$db->fetch_row($d); print "<h3>Editing Item</h3> <form action='staff_items.php?action=edititemsub' method='post'> <input type='hidden' name='itmid' value='{$_POST['item']}' /> Item Name: <input type='text' name='itmname' value='{$itemi['itmname']}' /> Item Desc.: <input type='text' name='itmdesc' value='{$itemi['itmdesc']}' /> Item Type: ".itemtype_dropdown($c,'itmtype',$itemi['itmtype'])." Item Buyable: <input type='checkbox' name='itmbuyable'"; if ($itemi['itmbuyable']) { print " checked='checked'"; } print " /> Item Price: <input type='text' name='itmbuyprice' value='{$itemi['itmbuyprice']}' /> Item Sell Value: <input type='text' name='itmsellprice' value='{$itemi['itmsellprice']}' /><hr />[b]Usage Form[/b]<hr />"; $stats=array( "energy" => "Energy", "will" => "Will", "brave" => "Brave", "hp" => "Health", "strength" => "Strength", "agility" => "Agility", "guard" => "Guard", "labour" => "Labour", "IQ" => "IQ", "hospital" => "Hospital Time", "jail" => "Jail Time", "money" => "Money", "crystals" => "Crystals", "cdays" => "Education Days Left", "bankmoney" => "Bank money", "cybermoney" => "Cyber money", "crimexp" => "Crime XP"); for($i=1;$i<=3;$i++) { if($itemi["effect".$i]) { $efx=unserialize($itemi["effect".$i]); } else { $efx=array("inc_amount" => 0); } $switch1=($itemi['effect'.$i.'_on'] > 0) ? " checked='checked'" : ""; $switch2=($itemi['effect'.$i.'_on'] > 0) ? "" : " checked='checked'"; print "[b]<u>Effect {$i}</u>[/b] On? <input type='radio' name='effect{$i}on' value='1'$switch1 /> Yes <input type='radio' name='effect{$i}on' value='0'$switch2 /> No Stat: <select name='effect{$i}stat' type='dropdown'>"; foreach($stats as $k => $v) { if($k==$efx['stat']) { print "<option value='{$k}' selected='selected'>{$v}</option>\n"; } else { print "<option value='$k'>{$v}</option>\n"; } } if($efx['dir']=="neg") { $str="<option value='pos'>Increase</option><option value='neg' selected='selected'>Decrease</option>"; } else { $str="<option value='pos' selected='selected'>Increase</option><option value='neg'>Decrease</option>"; } if($efx['inc_type']=="percent") { $str2="<option value='figure'>Value</option><option value='percent' selected='selected'>Percent</option>"; } else { $str2="<option value='figure' selected='selected'>Value</option><option value='percent'>Percent</option>"; } print "</select> Direction: <select name='effect{$i}dir' type='dropdown'>{$str} </select> Amount: <input type='text' name='effect{$i}amount' value='{$efx['inc_amount']}' /> <select name='effect{$i}type' type='dropdown'>{$str2}</select><hr />"; } print "[b]Combat Usage[/b] Weapon Power: <input type='text' name='weapon' value='{$itemi['weapon']}' /> Armor Defense: <input type='text' name='armor' value='{$itemi['armor']}' /><hr /> <input type='submit' value='Edit Item' /></form>"; } function edit_item_sub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } if(!isset($_POST['itmname']) || !isset($_POST['itmdesc']) || !isset($_POST['itmtype']) || !isset($_POST['itmbuyprice']) || !isset($_POST['itmsellprice'])) { print "You missed one or more of the fields. Please go back and try again. [url='staff_items.php?action=edititem']> Back[/url]"; $h->endpage(); exit; } $itmname=$_POST['itmname']; $itmdesc=$_POST['itmdesc']; $weapon=abs((int) $_POST['weapon']); $armor=abs((int) $_POST['armor']); if($_POST['itmbuyable'] == 'on') { $itmbuy=1; } else { $itmbuy=0; } $db->query("DELETE FROM items WHERE itmid={$_POST['itmid']}",$c); $efx1=$db->escape(serialize(array("stat" => $_POST['effect1stat'], "dir" => $_POST['effect1dir'], "inc_type" => $_POST['effect1type'], "inc_amount" => abs((int) $_POST['effect1amount'])))); $efx2=$db->escape(serialize(array("stat" => $_POST['effect2stat'], "dir" => $_POST['effect2dir'], "inc_type" => $_POST['effect2type'], "inc_amount" => abs((int) $_POST['effect2amount'])))); $efx3=$db->escape(serialize(array("stat" => $_POST['effect3stat'], "dir" => $_POST['effect3dir'], "inc_type" => $_POST['effect3type'], "inc_amount" => abs((int) $_POST['effect3amount'])))); $m=$db->query("INSERT INTO items VALUES('{$_POST['itmid']}',{$_POST['itmtype']},'$itmname','$itmdesc',{$_POST['itmbuyprice']},{$_POST['itmsellprice']},$itmbuy, '{$_POST['effect1on']}', '$efx1', '{$_POST['effect2on']}', '$efx2', '{$_POST['effect3on']}', '$efx3', $weapon, $armor)"); print "The {$_POST['itmname']} Item was edited successfully."; stafflog_add("Edited item {$_POST['itmname']}"); } function newitemtype() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("403"); } if($_POST['name']) { $db->query("INSERT INTO itemtypes VALUES(NULL, '{$_POST['name']}')"); print "Item Type {$_POST['name']} added."; stafflog_add("Added item type {$_POST['name']}"); } else { print "<h3>Add Item Type</h3><hr /> <form action='staff_items.php?action=newitemtype' method='post'> Name: <input type='text' name='name' /> <input type='submit' value='Add Item Type' /></form>"; } } $h->endpage(); ?>
  14. Re: Help with an sql error on line 1. thats <?php i think if its the index.php, here is index.php coding information   <?php $housequery=1; include "globals.php"; print "<h3>General Info:</h2>"; $exp=(int)($ir['exp']/$ir['exp_needed']*100); print "<table><tr><td>[b]Name:[/b] {$ir['username']}</td><td>[b]Crystals:[/b] {$cm}</td></tr><tr> <td>[b]Level:[/b] {$ir['level']}</td> <td>[b]Exp:[/b] {$exp}%</td></tr><tr> <td>[b]Money:[/b] $fm</td> <td>[b]HP:[/b] {$ir['hp']}/{$ir['maxhp']}</td></tr> <tr><td>[b]Property:[/b] {$ir['hNAME']}</td></tr></table>"; print "<hr><h3>Stats Info:</h3>"; $ts=$ir['strength']+$ir['agility']+$ir['guard']+$ir['labour']+$ir['IQ']; $ir['strank']=get_rank($ir['strength'],'strength'); $ir['agirank']=get_rank($ir['agility'],'agility'); $ir['guarank']=get_rank($ir['guard'],'guard'); $ir['labrank']=get_rank($ir['labour'],'labour'); $ir['IQrank']=get_rank($ir['IQ'],'IQ'); $tsrank=get_rank($ts,'strength+agility+guard+labour+IQ'); $ir['strength']=number_format($ir['strength']); $ir['agility']=number_format($ir['agility']); $ir['guard']=number_format($ir['guard']); $ir['labour']=number_format($ir['labour']); $ir['IQ']=number_format($ir['IQ']); $ts=number_format($ts); print "<table><tr><td>[b]Strength:[/b] {$ir['strength']} [Ranked: {$ir['strank']}]</td><td>[b]Agility:[/b] {$ir['agility']} [Ranked: {$ir['agirank']}]</td></tr> <tr><td>[b]Guard:[/b] {$ir['guard']} [Ranked: {$ir['guarank']}]</td><td>[b]Labour:[/b] {$ir['labour']} [Ranked: {$ir['labrank']}]</td></tr> <tr><td>[b]IQ: [/b] {$ir['IQ']} [Ranked: {$ir['IQrank']}]</td><td>[b]Total stats:[/b] {$ts} [Ranked: $tsrank]</td></tr></table>"; if(isset($_POST['pn_update'])) { $db->query("UPDATE users SET user_notepad='{$_POST['pn_update']}' WHERE userid=$userid"); $ir['user_notepad']=stripslashes($_POST['pn_update']); print "<hr>[b]Personal Notepad Updated![/b]"; } print "<hr>Your Personal Notepad:<form action='index.php' method='post'> <textarea rows='10' cols='50' name='pn_update'>".htmlspecialchars($ir['user_notepad'])."</textarea> <input type='submit' value='Update Notes' /></form>"; $h->endpage(); ?>
  15. Re: rewrite of monorail needed here is a monorail.php coding, which should work...   <?php include "globals.php"; $_GET['to'] = abs((int) $_GET['to']); if(!$_GET['to']) { print "Welcome to the Monorail Station. It costs \$1000 for a ticket. Where would you like to travel today? "; $q=$db->query("SELECT * FROM cities WHERE cityid != {$ir['location']} AND cityminlevel <= {$ir['level']}"); print "<table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>Name</th><th>Description</th><th>Min Level</th><th> </th></tr>"; while($r=$db->fetch_row($q)) { print "<tr><td>{$r['cityname']}</td><td>{$r['citydesc']}</td><td>{$r['cityminlevel']}</td><td>[url='monorail.php?to={$r[']Go[/url]</td></tr>"; } print "</table>"; } else { if($ir['money'] < 1000) { print "You don't have enough money."; } else if( ((int) $_GET['to']) != $_GET['to']) { print "Invalid city ID"; } else { $q=$db->query("SELECT * FROM cities WHERE cityid = {$_GET['to']} AND cityminlevel <= {$ir['level']}"); if(!$db->num_rows($q)) { print "Error, this city either does not exist or you cannot go there."; } else { $db->query("UPDATE users SET money=money-1000,location={$_GET['to']} WHERE userid=$userid"); $r=$db->fetch_row($q); print "Congratulations, you paid \$1000 and travelled to {$r['cityname']} on the monorail!"; } } } $h->endpage(); ?>
  16. Re: cron job help? ive emailed a admin, and i dont wanna move to i different host because well this host is free, and if i remember correctly, most free hosting sites dont let u use cronjob at all unless you upgrade... for like $3-5 a month lol. and what do u mean check if the run times are correct? do u mean this? */5 * * * * <--- 5 min * * * * * <--- 1 min 0 * * * * <--- 1 hour 0 0 * * * <-- 1 day
  17. Re: cron job help? yep, figured it would stop, what should i do if the crons stop? should i email a admin?
  18. Re: cron job help? but then again, ive got feeling that there not gonna go up any higher...
  19. Re: cron job help? got it THANK YOU VERY MUCH feky, completely forgot to even check if there was errors on my cron files!. my energy just refilled upto 33% so that means they work now.
  20. Re: cron job help? what so my cron files cron_minute.php cron_fivemins.php cron_hour.php cron_day.php cant have errors at all on all of them, also what coding i have to put in the command to run, is there a space between the curl and http? or is it together?
  21. Re: cron job help? sorry lol, didnt mean to say it in a bad way... but anyways on the standard one it has the box saying "Command To Run" im trying to find out what to put into that box. can someone help me please? if it helps this is how the Standard one looks like
  22. Re: cron job help? come on 35 views and no one can help me?
  23. hi i set my game up yesterday and i just cant seem to figure out how to set up my crons... can anyone help me please? */5 * * * * curl [url]http://criminals-nightmare.co.cc/cron_fivemins.php?code=*************[/url] * * * * * curl [url]http://criminals-nightmare.co.cc/cron_minute.php?code=****************[/url] 0 * * * * curl [url]http://criminals-nightmare.co.cc/cron_hour.php?code=******************[/url] 0 0 * * * curl [url]http://criminals-nightmare.co.cc/cron_day.php?code=*******************[/url] thats my cron information i got when i installed my game (hidden code numbers at end), can anyone tell me what do i put in the Command bit please? or whatever i have to do?
  24. Re: need some help? i dont get it? ahh fixed it i figured out why it was doing it. i just removed all my phpmyadmin database files, then installed my game, then readded the sql information on phpmyadmin.
  25. Re: need some help? i dont get it? what do u mean running the installer file again? and which database your talking about? phpmyadmin or file manager?   oh and whats the alter table information to create a new table? if anyone knows what i mean, can u write one for me for an example for say the announcements?
×
×
  • Create New...