Jump to content
MakeWebGames

hirev

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Everything posted by hirev

  1. hello all. i am looking for a layout for the game. one where i can have a pic in the background that does not move only the text when scrolling up and down the screen. looking to also have section headers in different color. such as in the main menu it will show Main Game Home Inventory Search ect... and the Main Game heading has a dark bar behind it. I hope i am explaining it clearly. i am half asleep. the game is a mob based game like most games out there. sorry to ask i just dont have the time to create one myself and also i am not sure how to set one up.   PS. plz dont rag on me i am new to programming still and really have no clue what i am doing. i am learning but its going slowly
  2. Re: [V2] Upgraded Brothel Sniko`- love your mods. I wish you would code my game. ( LOL if you want to you can... hint hint) but really you do great work. +++++ for you
  3. Hi i am looking for a Mod to delete all users in my game and reuse the user ID's. I am about to launch my game in the next few weeks and I have like 10 test accounts. I want to be able to start users at user ID 2 instead of 10 or 11. if anyone knows a Query to do this or a mod that can do this can you post it. Also i am sorry if this is the wrong section I am not sure where to post now that things are changed around and never noticed a mod request section.     ___________________________
  4. Re: Email Activation to make things easier for everyone, why doesn't someone post the basic registration page with this mod in it. come one people stop being so annoying. LOL JK
  5. Re: Email Activation thanks for the mod. i haven't tested it yet but i am sure it will work. and it is explained easily if you know how to code. i do but i suck at it and i can understand the instructions
  6. hi everyone. got a little problem. i have added another effect section in the staff_items.php it shows and all the functions are there but if the items are not getting the effect of effect 4. and if only effect 4 is being used it says the item has no effect I know this should be simple but i can not figure it out. i added it into the database to so it does show effect 4 in there aswell codes posted below   <?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='donatordays'>Donator Days</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='donatordays'>Donator Days</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='donatordays'>Donator Days</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]<u>Effect 4</u>[/b] On? <input type='radio' name='effect4on' value='1' /> Yes <input type='radio' name='effect4on' value='0' checked='checked' /> No Stat: <select name='effect4stat' type='dropdown'> <option value='energy'>Energy</option> <option value='will'>Will</option> <option value='brave'>Brave</option> <option value='hp'>Health</option> <option value='donatordays'>Donator Days</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='effect4dir' type='dropdown'> <option value='pos'>Increase</option> <option value='neg'>Decrease</option> </select> Amount: <input type='text' name='effect4amount' value='0' /> <select name='effect4type' 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'])))); $efx4=$db->escape(serialize(array("stat" => $_POST['effect4stat'], "dir" => $_POST['effect4dir'], "inc_type" => $_POST['effect4type'], "inc_amount" => abs((int) $_POST['effect4amount'])))); $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', '{$_POST['effect4on']}', '$efx4', $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", "donatordays" => "Donator Days", "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<=4;$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'])))); $efx4=$db->escape(serialize(array("stat" => $_POST['effect4stat'], "dir" => $_POST['effect4dir'], "inc_type" => $_POST['effect4type'], "inc_amount" => abs((int) $_POST['effect4amount'])))); $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', '{$_POST['effect4on']}', '$efx4', $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(); ?>
  7. Re: Updated Money & Crystal Bank [V2] i dont get interest when i use this - does anybody know if you need a updated cron job or anything like that
  8. Re: cron job for bank not working pls help me out i do not have a myadmin php or do you mean the mysql
  9. Re: cron job for bank not working pls help me out all i did was add the new bank and add the cron job and the SQL query.i am not sure what do do next. sorry if i am sounding stupid at this this is kind of new to me... its a pain in the ass right now as i cant launch my game till i get this fixed
  10. Re: [FREE] DPS TO ITEMS V1 [MCCODES] [uPDATED] hi all i just wanted to know if anyone knew how to set it up so the person donating gets the DP when they finish the paypal transaction. i cant seem to get it to work
  11. hi everyone my day cron seems to be working except for the bank part. any ideas its version 2 of mccodes.   <?php include "config.php"; global $_CONFIG; if($_GET['code'] != $_CONFIG['code']) { die(""); } define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $db->query("UPDATE fedjail set fed_days=fed_days-1"); $q=$db->query("SELECT * FROM fedjail WHERE fed_days=0"); $ids=array(); while($r=$db->fetch_row($q)) { $ids[]=$r['fed_userid']; } if(count($ids) > 0) { $db->query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")"); } $db->query("DELETE FROM fedjail WHERE fed_days=0"); $db->query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 0"); $db->query("UPDATE users SET donatormoney=donatormoney+(donatormoney/100*8) where donatormoney>0"); $db->query("UPDATE users SET daysold=daysold+1, boxes_opened=0"); $db->query("UPDATE users SET mailban=mailban-1 WHERE mailban > 0"); $db->query("UPDATE users SET donatordays=donatordays-1 WHERE donatordays > 0"); $db->query("UPDATE users SET cdays=cdays-1 WHERE course > 0"); $db->query("UPDATE users SET bankmoney=bankmoney+(bankmoney/50) where bankmoney>0"); $db->query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*7) where cybermoney>0"); $db->query("UPDATE users SET turns=25"); $q=$db->query("SELECT * FROM users WHERE cdays=0 AND course > 0"); while($r=$db->fetch_row($q)) { $cd=$db->query("SELECT * FROM courses WHERE crID={$r['course']}"); $coud=$db->fetch_row($cd); $userid=$r['userid']; $db->query("INSERT INTO coursesdone VALUES({$r['userid']},{$r['course']})"); $upd=""; $ev=""; if($coud['crSTR'] > 0) { $upd.=",us.strength=us.strength+{$coud['crSTR']}"; $ev.=", {$coud['crSTR']} strength"; } if($coud['crGUARD'] > 0) { $upd.=",us.guard=us.guard+{$coud['crGUARD']}"; $ev.=", {$coud['crGUARD']} guard"; } if($coud['crLABOUR'] > 0) { $upd.=",us.labour=us.labour+{$coud['crLABOUR']}"; $ev.=", {$coud['crLABOUR']} labour"; } if($coud['crAGIL'] > 0) { $upd.=",us.agility=us.agility+{$coud['crAGIL']}"; $ev.=", {$coud['crAGIL']} agility"; } if($coud['crIQ'] > 0) { $upd.=",us.IQ=us.IQ+{$coud['crIQ']}"; $ev.=", {$coud['crIQ']} IQ"; } $ev=substr($ev,1); if ($upd) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET us.userid=us.userid $upd WHERE u.userid=$userid"); } $db->query("INSERT INTO events VALUES('',$userid,unix_timestamp(),0,'Congratulations, you completed the {$coud['crNAME']} and gained $ev!')"); } $db->query("UPDATE users SET course=0 WHERE cdays=0"); $db->query("TRUNCATE TABLE votes;"); if($r['money'] < 50 && $r['nsubscribed'] == 1) { $userid=$r['userid']; $db->query("INSERT INTO events VALUES('',$userid,unix_timestamp(),0,You did not have enouth money to pay for the newspaper this morning. Go to the <a href=nagent.php>news agents</a> to buy one.')"); $db->query("UPDATE users SET new_events=new_events+1 WHERE userid=$userid"); $db->query("UPDATE users SET newspaper=0 WHERE userid=$userid } else { $db->query("UPDATE users SET newspaper=0 WHERE nsubscribed=0"); $db->query("UPDATE users SET money=money-50 WHERE nsubscribed=1"); } ?>
  12. Re: Updated Money & Crystal Bank [V2] does this need a updated cron job? If so can someone post it. thanks for the mod by the way it looks great
  13. Re: New items page [V2] ok so i think i am retarded. i tried to edit the php like instructed but i still can not get the use option in the inventory. any ideas?
×
×
  • Create New...