Jump to content
MakeWebGames

Jordan Palmer

Members
  • Posts

    1,660
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Jordan Palmer

  1. Re: [mccodes V2] Nuclear Bomb I mean, how's it coded and presented is a lot more advanced way, however my way is the more standard way   However Thank you for your contribution :)
  2. Re: [mccodes V2] Nuclear Bomb Crazy-T, - I did it that way so new people to coding would understand and wouldnt have to post for help... However you way might be better for the more advanced coders
  3. Re: [mccodes V2] Nuclear Bomb Nice! Although I'll stick with my way :wink:
  4. Re: Battle Tent Error   <?php include "globals.php"; if($ir['jail'] or $ir['hospital']) { echo("This page cannot be accessed while in jail or hospital."); $h->endpage(); exit; } print "<h3>Battle Tent</h3> [b]Welcome to the battle tent! Here you can challenge bot's for money.[/b] <table width='95%' cellspacing='1' class='table'><tr><th>Bot Name</th><th>Level</th><th>Times Beaten</th><th>Ready To Be Challenged?</th><th>Location</th><th>Money Won</th><th>Challenge</th></tr>"; $q=$db->query("SELECT cb.*,u.*,c.npcid,cy.cityname FROM challengebots cb LEFT JOIN users u ON cb.cb_npcid=u.userid LEFT JOIN challengesbeaten c ON c.npcid=u.userid AND c.userid=$userid LEFT JOIN cities cy ON u.location=cy.cityid"); while($r=$db->fetch_row($q)) { $earn=$r['cb_money']; $q2=$db->query("SELECT count(*) FROM challengesbeaten WHERE npcid=$userid"); $times=$db->fetch_single($q2); print "<tr><td align='center'>{$r['username']}</td><td align='center'>{$r['level']}</td><td align='center'>$times</td><td align='center'>"; if($r['hp'] >= $r['maxhp']/2 and $r['location']==$ir['location']) { print "<font color=green>Yes</font>"; } else { print "<font color=red>No</font>"; } print "</td><td align='center'>{$r['cityname']}</td><td align='center'>\$".money_formatter($earn,'')."</td><td align='center'>"; if($r['npcid']) { print "[i]Already[/i]"; } else { print "[url='attack.php?ID={$r[']Challenge[/url]"; } print "</td></tr>"; } print "</table>"; $h->endpage(); ?>   Thats the standard, Should work for ya
  5. Re: Announcement error This is going to work I swear :mrgreen:   <?php include "sglobals.php"; //staff.php switch($_GET['action']) { case 'basicset': basicsettings(); break; case 'announce': announcements(); break; default: index(); break; } function basicsettings() { global $db,$ir,$c,$h,$userid,$set; if($ir['user_level'] != 2) { die("403"); } if($_POST['submit']) { unset($_POST['submit']); foreach($_POST as $k => $v) { $db->query("UPDATE `settings` SET conf_value='$v' WHERE conf_name='$k'"); } print "Settings updated! [url='staff.php?action=basicset']Back[/url]"; stafflog_add("Updated the basic game settings"); } else { print "<h3>Basic Settings</h3><hr /> <form action='staff.php?action=basicset' method='post'> <input type='hidden' name='submit' value='1' /> Game Name: <input type='text' name='game_name' value='{$set['game_name']}' /> Game Owner: <input type='text' name='game_owner' value='{$set['game_owner']}' /> Main Announcement: <input type='text' name='game_ann' value='{$set['game_ann']}' /> Game Description: <textarea rows='7' cols='50' name='game_description'>{$set['game_description']}</textarea> Paypal Address: <input type='text' name='paypal' value='{$set['paypal']}' /> Gym/Crimes Validation: <select name='validate_on' type='dropdown'>"; $opt=array( "1" => "On", "0" => "Off" ); foreach($opt as $k => $v) { if($k == $set['validate_on']) { print "<option value='{$k}' selected='selected'>{$v}</option>"; } else { print "<option value='{$k}'>{$v}</option>"; } } print "</select> Validation Period: <select name='validate_period' type='dropdown'>"; $opt=array( "5" => "Every 5 Minutes", "15" => "Every 15 Minutes", "60" => "Every Hour", "login" => "Every Login" ); foreach($opt as $k => $v) { if($k == $set['validate_period']) { print "<option value='{$k}' selected='selected'>{$v}</option>"; } else { print "<option value='{$k}'>{$v}</option>"; } } print "</select> Registration CAPTCHA: <select name='regcap_on' type='dropdown'>"; $opt=array( "1" => "On", "0" => "Off" ); foreach($opt as $k => $v) { if($k == $set['regcap_on']) { print "<option value='{$k}' selected='selected'>{$v}</option>"; } else { print "<option value='{$k}'>{$v}</option>"; } } print "</select> Send Crystals: <select name='sendcrys_on' type='dropdown'>"; $opt=array( "1" => "On", "0" => "Off" ); foreach($opt as $k => $v) { if($k == $set['sendcrys_on']) { print "<option value='{$k}' selected='selected'>{$v}</option>"; } else { print "<option value='{$k}'>{$v}</option>"; } } print "</select> Bank Xfers: <select name='sendbank_on' type='dropdown'>"; $opt=array( "1" => "On", "0" => "Off" ); foreach($opt as $k => $v) { if($k == $set['sendbank_on']) { print "<option value='{$k}' selected='selected'>{$v}</option>"; } else { print "<option value='{$k}'>{$v}</option>"; } } print "</select> Energy Refill Price (crystals): <input type='text' name='ct_refillprice' value='{$set['ct_refillprice']}' /> IQ per crystal: <input type='text' name='ct_iqpercrys' value='{$set['ct_iqpercrys']}' /> Money per crystal: <input type='text' name='ct_moneypercrys' value='{$set['ct_moneypercrys']}' /> Will Potion Item: ".item_dropdown($c, "willp_item", $set['willp_item'])." <input type='submit' value='Update Settings' /></form>"; } } function announcements() { global $db,$ir,$c,$h,$userid,$set; if($ir['user_level'] != 2) { echo '<font color="#FF0000>403 - Unauthorized Access</font>'; $h->endpage(); exit; } if($_POST['TITLE']) { if(strlen($_POST['TITLE']) < 5) { echo 'Sorry, the annoucement title is too short. [url="staff_annouce.php?addannouce"]Back[/url]'; $h->endpage(); exit; } $AddAnnouce = sprintf("INSERT INTO mod_announcements (`annouce_NAME`, `annouce_TEXT`, `annouce_TIME`, `annouce_URGENCY`, `annouce_TOPIC`, `annouce_POSTED`)VALUES ('{$_POST['TITLE']}', '{$_POST['TEXT']}', unix_timestamp(), '{$_POST['URGENCY']}', '{$_POST['TOPIC']}', '{$_POST['POSTED']}')"); $db->query ($AddAnnouce); $db->query("UPDATE users SET `new_announcements` = `new_announcements` + 1"); echo 'Announcement added! > [url="annoucements.php"]View It![/url]'; stafflog_add('Posted A New Annoucement'); $h->endpage(); exit; } else { echo 'Adding an announcement... Please try to make sure the announcement is concise and covers everything you want it to. <form action="staff.php?action=announce" method="post"> Announcement Title:<input type="text" name="TITLE"> Announcement Text: <textarea name="TEXT" rows="10" cols="60"></textarea> Announcement Urgency: <select name="URGENCY" type="dropdown"> <option value="No Ugency">No Ugency</option> <option value="Low">Low</option> <option value="Medium">Medium</option> <option value="High">High</option> <option value="Urgent">Urgent</option> </select> Announcement Topic: <select name="TOPIC" type="dropdown"> <option value="Updates">Updates</option> <option value="General News">General News</option> <option value="Fun">Fun</option> <option value="Warnings!">Warnings!</option> <option value="Design Info">Design Info</option> <option value="Edits">Edits</option> </select> <input type="hidden" name="POSTED" value="'.$ir['username'].'"> <input type="submit" value="Add Announcement!" /> </form>'; } } function index() { global $db,$ir,$c,$h,$userid,$set, $_CONFIG; $pv=phpversion(); $mv=$db->fetch_single($db->query("SELECT VERSION()")); $dv=$_CONFIG['driver']; if($ir['user_level']==2) { $versionno=20200; $version="2.0.2"; print "<h3>System Info</h3><hr /> <table width='75%' cellspacing='1' > <tr> <th>PHP Version:</th> <td>$pv</td> </tr> <tr> <th>MySQL Version:</th> <td>$mv</td> </tr> <tr> <th>MySQL Driver:</th> <td>$dv</td> </tr> <tr> <th>Codes Version</th> <td>$version (Build: $versionno)</td> </tr> </table><hr /> <h3>Last 10 Staff Actions</h3><hr /> <table width='100%' cellspacing='1' > <tr> <th>Staff</th> <th>Action</th> <th>Time</th> <th>IP</th> </tr>"; $q=$db->query("SELECT s.*, u.* FROM stafflog AS s LEFT JOIN users AS u ON s.user=u.userid ORDER BY s.time DESC LIMIT 10"); while($r=$db->fetch_row($q)) { print "<tr><td>{$r['username']} [{$r['user']}]</td> <td>{$r['action']}</td> <td>".date('F j Y g:i:s a', $r['time'])."</td> <td>{$r['ip']}</td></tr>"; } print "</table><hr />"; } print "<h3>Staff Notepad</h3><hr />"; if($_POST['pad']) { $db->query("UPDATE settings SET conf_value='{$_POST['pad']}' WHERE conf_name='staff_pad'"); $set['staff_pad']=stripslashes($_POST['pad']); print "[b]Staff Notepad Updated![/b]<hr />"; } print "<form action='staff.php' method='post'> <textarea rows='10' cols='60' name='pad'>".htmlspecialchars($set['staff_pad'])."</textarea> <input type='submit' value='Update Notepad' /></form>"; } $h->endpage(); ?>
  6. Re: Staff.php help Add at the bottom <?php // Please remove before saving function index() { global $db,$ir,$c,$h,$userid,$set, $_CONFIG; $pv=phpversion(); $mv=$db->fetch_single($db->query("SELECT VERSION()")); $dv=$_CONFIG['driver']; if($ir['user_level']==2) { $versionno=20200; $version="2.0.2"; print "<h3>System Info</h3><hr /> <table width='75%' cellspacing='1' > <tr> <th>PHP Version:</th> <td>$pv</td> </tr> <tr> <th>MySQL Version:</th> <td>$mv</td> </tr> <tr> <th>MySQL Driver:</th> <td>$dv</td> </tr> <tr> <th>Codes Version</th> <td>$version (Build: $versionno)</td> </tr> </table><hr /> <h3>Last 10 Staff Actions</h3><hr /> <table width='100%' cellspacing='1' > <tr> <th>Staff</th> <th>Action</th> <th>Time</th> <th>IP</th> </tr>"; $q=$db->query("SELECT s.*, u.* FROM stafflog AS s LEFT JOIN users AS u ON s.user=u.userid ORDER BY s.time DESC LIMIT 10"); while($r=$db->fetch_row($q)) { print "<tr><td>{$r['username']} [{$r['user']}]</td> <td>{$r['action']}</td> <td>".date('F j Y g:i:s a', $r['time'])."</td> <td>{$r['ip']}</td></tr>"; } print "</table><hr />"; } print "<h3>Staff Notepad</h3><hr />"; if($_POST['pad']) { $db->query("UPDATE settings SET conf_value='{$_POST['pad']}' WHERE conf_name='staff_pad'"); $set['staff_pad']=stripslashes($_POST['pad']); print "[b]Staff Notepad Updated![/b]<hr />"; } print "<form action='staff.php' method='post'> <textarea rows='10' cols='60' name='pad'>".htmlspecialchars($set['staff_pad'])."</textarea> <input type='submit' value='Update Notepad' /></form>"; }   For some reason you removed the function without removing the case :|
  7. Re: [mccodes V2] Nuclear Bomb UPDATE: Amaount of Query's have been shortend :) Thanks for tip BlueDevil :-D   <?php include "globals.php"; if ($ir['bomb'] == 0) { print" You ain't got a bomb!"; } $db->query("UPDATE `users` SET hospital=1000 , hospreason='Tried to Bomb the game and Failed.' WHERE userid = $userid"); { if ($ir['bomb'] > 1) { print "You have detonated the bomb, everyone have been hospitalized and you gained two levels"; $db->query("UPDATE users SET level=level+2 , bomb=bomb-1 WHERE userid=$userid"); $db->query("UPDATE `users` SET hospital=100 , hospreason='ID <a href=viewuser.php?u=$userid>$userid</a> Detonated a Nuclear Bomb' WHERE userid != $userid"); } } ?>   This is gift.php   <?php /******************************************************* -- Created By seanybob -- edited by Pudda -- ------------------------------------------------------------------------ -- Copyright + Credits all go to seanybobs -- Based on seanybobs gift.php, Edited by pudda -- If you don't understand it, leave it alone -- This mod needs to have the following mods Installed - Turns (turns table) - Money (Obv) - Crystals (OBV) - Nuclear Bomb (bomb table) -Job Points (jobpoints table) -- If you dont have any of these in please replace the table=table+whatever and the text to make this compatable :) *******************************************************/ include("globals.php"); if ($ir['gift'] > 0) { die("Sorry, You Can Only Do This Once A Day"); } $auto = (int)rand(1, 6); if ($auto == 1) { $db->query("UPDATE users SET money=money+750 WHERE userid=$userid", $c); $db->query("UPDATE users set gift=gift+1 WHERE userid={$ir['userid']}", $c); print "Today You Have Been Given $750.00"; } if ($auto == 2) { $db->query("UPDATE users SET money=money+1500 WHERE userid=$userid", $c); $db->query("UPDATE users set gift=gift+1 WHERE userid={$ir['userid']}", $c); print "Today You Have Been Given $1500.00"; } if ($auto == 3) { $db->query("UPDATE users SET turns=turns+75 WHERE userid=$userid", $c); $db->query("UPDATE users set gift=gift+1 WHERE userid={$ir['userid']}", $c); $db->query("UPDATE users SET crystals=crystals+14 WHERE userid=$userid", $c); print "Today You Have Been Given 14 Crystalls And 75 steps to walk the streets"; } if ($auto == 4) { $db->query("UPDATE users SET bomb=bomb+1 WHERE userid=$userid", $c); $db->query("UPDATE users set gift=gift+1 WHERE userid={$ir['userid']}", $c); $db->query("UPDATE users SET crystals=crystals+22 WHERE userid=$userid", $c); print "Today You Have Been Given 22 Crystalls And a nuclear bomb"; } if ($auto == 5) { $db->query("UPDATE users SET exp=exp+30 WHERE userid=$userid", $c); $db->query("UPDATE users set gift=gift+1 WHERE userid={$ir['userid']}", $c); print "Today You Were Given A Decent Amount Of exp You Got 30"; } if ($auto == 6) { $db->query("UPDATE users SET jobpoints=jobpoints+10 WHERE userid=$userid", $c); $db->query("UPDATE users set gift=gift+1 WHERE userid={$ir['userid']}", $c); print "Today You Have Been Given 10 jobpoints"; } ?>   And There you have it :)
  8. Re: [Mc V2] Nuclear Bomb Okay, I've just basically just added a more of a funnier side to this, Basically if the user doesnt have a bomb they'll end up in hospital :P Call this file what you wish..   <?php include "globals.php"; if ($ir['bomb'] == 0) { print" You ain't got a bomb!"; } $db->query("UPDATE users SET hospital=1000 WHERE userid = $userid"); $db->query("UPDATE users SET hospreason='Tried to bomb all the game' WHERE userid = $userid"); { if ($ir['bomb'] > 1) { print "You have detonated the bomb, everyone have been hospitalized and you gained two levels"; $db->query("UPDATE users SET level=level+2 WHERE userid=$userid"); $db->query("UPDATE users SET hospital=100 WHERE userid != $userid"); $db->query("UPDATE users SET hospreason='ID <a href=viewuser.php?u=$userid>$userid</a> Detonated a Nuclear Bomb' WHERE userid != $userid"); $db->query("UPDATE users SET bomb=bomb-1 WHERE userid=$userid"); } } ?>   SQL: ALTER TABLE `users` ADD `bomb` INT( 11 ) NOT NULL DEFAULT '0';   Then in mainmenu | explore | anywhere You can add <font color=color>Nuclear Bomb Everyone</font>   simple, Yet very funny... :mrgreen:
  9. Re: [mccodes V2] Nuclear Bomb You could make it so everyone gets one montly or something... $db->query("UPDATE users SET bomb='1'"); You could make it so when someone donate's they get one...
  10. Re: [mccode v2] House Images hmm... I'm using the estate you posted up and nothing... I edit house and it shows the pic but in estate it doesnt even show the house...   [email protected] Can someone give me a hand
  11. Re: [MCODES V2] Userids Probs   Delete the game? lol   That might be your style but hell of a not mine ;)     :lol: Thanks I'll take a look :)
  12. Re: [MCODES V2] Userids Probs what can I do to stop this happening
  13. Re: [MCODES V2] Userids Probs AHH they dont have a ranking in stats, how do I fix this
  14. Re: [MCODES V2] Userids Probs Some users have IDS and some end up with username[] However in the database they all have IDS :|
  15. Hey all I have a huge problem, My game all of a sudden has started to miss ids, Like I have about 4players with no IDS however they do have a ID in the database can someone lend me a hand here I have checked all possible known bugs and now I'm out of ideas why   Please get back to me asap
  16. Re: mafia city Here's My review Bad side: - Free domain - Shitty Theme/look - Why when I signed in I got 'welcome back' because that was my first time My conclusion: I'll never be tempted to visit that site again   Good Points: - I was on the game   Thanks ~ Jordan ~
  17. Re: GRPG I might try starting a GRPG game.. I do have a offer to be 50/50 with a guy who owns one :-o
  18. Re: GRPG That might be the reason although I just cannot get into them for some reason.. Maybe I will one day
  19. Re: GRPG I prefer Mccodes I like Mccodes a lot for some reason.. I hate GRPG Script I cannot stand them :-D
  20. Re: simple question Under   body {   Then you'll see Background-colour URL... Change to background-color: red;
  21. Re: Mafia Wars - Facebook I agree I'd say it's a pretty good idea..   Nikki - Why don't you try getting yourself a proper domain and hosting? :-P
  22. Re: Looking for Modder/coder... Why would it get complicated? I have created a game like this before..Nothing special :mrgreen:
  23. Re: simple question Header.php or soemthing.css :wink:
  24. Re: mailbox.php now paying you if you can fix Go into mainmenu.php find: global $db,$c,$ir, $set;   Add: $mc = $ir['new_mail'];   Then in the same file Find print "[url='events.php']Events (0)[/url] "; }   Underneath that add if($mc > 0) { print "[url='mailbox.php']<font color=COLOUR>Mailbox ($mc)</font>[/url] "; } else { print "[url='mailbox.php']Mailbox (0)[/url] "; }   Change COLOUR to the colour you want it to show when they have a mail.. like <font color=red> // This would show red <font color=blue> // Show blue ECT.. Anymore problems post here   ~ Jordan ~
  25. Re: [v2] Event add on first loggin.   Now that would be very annoying, say you left for a few hour's and then come back to have 50+ events lol Thats a good way of clogging the DB up with uneeded data. True, but they have staff events to it goes there, that way they are more organized ;)
×
×
  • Create New...