
-Genocide-
Members-
Posts
106 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by -Genocide-
-
Re: Black Jack Thanks Arson, It's good to see positive feedback for once lol
-
Re: Help Please:) ive never tried that :P but im sure its not hard, I coded my header so it displays random banners every time you refresh. http://notoriousonline.net
-
Re: Help Please:) I know the last one :O (the arab store on the corner....there open 24/7)
-
Re: Help Please:) (i cant understand what he wants either)
-
Re: Help Please:) I second that notion
-
Re: Black Jack Thanks for the compliments, I didn't originally write the mod for MCCodes, I wrote it to go along with another site I had (not a game) and just converted it to work with MCCodes, but I'm glad you all are getting some use out of it.
-
this is a simple black jack game that i converted to work with mccodes, i didnt add any querys for betting, i cant do all the work for you :P blackjack.php <?php 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']); $lv=date('F j, Y, g:i a',$ir['laston']); $h->userdata($ir,$lv,$fm); $h->menuarea(); print "Black Jack"; if ($_SESSION['bj'] != ''){ for($i = 1; $i < 25; $i++) { $card[$i] = $_SESSION['card' . $i]; } } if (isset($_GET['start'])) { if ($_SESSION['bj'] != 1){ $i = 1; while ($i < 24){ $t = 0; $card[$i] = rand(1,48); for($a = 1; $a < 25; $a++) { if ($card[$i] != $card[$a]){ $t++; } } if ($t == 23) { $i++; } } $_SESSION['total_cards'] = 2; $_SESSION['bj'] = 1; for($i = 1; $i < 25; $i++) { $_SESSION['card' . $i] = $card[$i]; } } } if ($_SESSION['bj'] == 1){ if (isset($_GET['hit'])) { $_SESSION['total_cards'] = $_SESSION['total_cards'] + 1; } $total_cards = $_SESSION['total_cards']; for($i = 1; $i < ($total_cards + 1); $i++) { if ($card[$i] == 8 OR $card[$i] == 16 OR $card[$i] == 24 OR $card[$i] == 32){ $value = '11'; } else if ($card[$i] == 12 OR $card[$i] == 24 OR $card[$i] == 36 OR $card[$i] == 48){$value = '10'; } else if ($card[$i] == 11 OR $card[$i] == 23 OR $card[$i] == 35 OR $card[$i] == 47){$value = '10'; } else if ($card[$i] == 10 OR $card[$i] == 22 OR $card[$i] == 34 OR $card[$i] == 46){$value = '10'; } else if ($card[$i] == 9 OR $card[$i] == 21 OR $card[$i] == 33 OR $card[$i] == 45){$value = '10'; } else if ($card[$i] == 8 OR $card[$i] == 20 OR $card[$i] == 32 OR $card[$i] == 44){$value = '9'; } else if ($card[$i] == 7 OR $card[$i] == 19 OR $card[$i] == 31 OR $card[$i] == 43){$value = '8'; } else if ($card[$i] == 6 OR $card[$i] == 18 OR $card[$i] == 30 OR $card[$i] == 42){$value = '7'; } else if ($card[$i] == 5 OR $card[$i] == 17 OR $card[$i] == 29 OR $card[$i] == 41){$value = '6'; } else if ($card[$i] == 4 OR $card[$i] == 16 OR $card[$i] == 28 OR $card[$i] == 40){$value = '5'; } else if ($card[$i] == 3 OR $card[$i] == 15 OR $card[$i] == 27 OR $card[$i] == 39){$value = '4'; } else if ($card[$i] == 2 OR $card[$i] == 14 OR $card[$i] == 26 OR $card[$i] == 38){$value = '3'; } else if ($card[$i] == 1 OR $card[$i] == 13 OR $card[$i] == 25 OR $card[$i] == 37){$value = '2'; } $total_value = $total_value + $value; } echo $total_value; if ($total_value > 21){ for($i = 1; $i < ($total_cards + 1); $i++) { if ($card[$i] == 8 OR $card[$i] == 16 OR $card[$i] == 24 OR $card[$i] == 32){ $ace = $ace + 1; } } while ($total_value > 21 AND $ace > 0){ $ace = $ace - 1; $total_value = $total_value - 10; } } if ($total_cards == 2 AND $total_value == 21){ $_SESSION['bj'] = 6; } if ($total_value > 21){ $_SESSION['bj'] = 2; } if (isset($_GET['stand'])) { while ($comp_total_value < 17){ $ace = 0; $comp_total_cards = $comp_total_cards + 1; $i = $comp_total_cards + 12; if ($card[$i] == 8 OR $card[$i] == 16 OR $card[$i] == 24 OR $card[$i] == 32){ $value = '11'; } else if ($card[$i] == 12 OR $card[$i] == 24 OR $card[$i] == 36 OR $card[$i] == 48){$value = '10'; } else if ($card[$i] == 11 OR $card[$i] == 23 OR $card[$i] == 35 OR $card[$i] == 47){$value = '10'; } else if ($card[$i] == 10 OR $card[$i] == 22 OR $card[$i] == 34 OR $card[$i] == 46){$value = '10'; } else if ($card[$i] == 9 OR $card[$i] == 21 OR $card[$i] == 33 OR $card[$i] == 45){$value = '10'; } else if ($card[$i] == 8 OR $card[$i] == 20 OR $card[$i] == 32 OR $card[$i] == 44){$value = '9'; } else if ($card[$i] == 7 OR $card[$i] == 19 OR $card[$i] == 31 OR $card[$i] == 43){$value = '8'; } else if ($card[$i] == 6 OR $card[$i] == 18 OR $card[$i] == 30 OR $card[$i] == 42){$value = '7'; } else if ($card[$i] == 5 OR $card[$i] == 17 OR $card[$i] == 29 OR $card[$i] == 41){$value = '6'; } else if ($card[$i] == 4 OR $card[$i] == 16 OR $card[$i] == 28 OR $card[$i] == 40){$value = '5'; } else if ($card[$i] == 3 OR $card[$i] == 15 OR $card[$i] == 27 OR $card[$i] == 39){$value = '4'; } else if ($card[$i] == 2 OR $card[$i] == 14 OR $card[$i] == 26 OR $card[$i] == 38){$value = '3'; } else if ($card[$i] == 1 OR $card[$i] == 13 OR $card[$i] == 25 OR $card[$i] == 37){$value = '2'; } $comp_total_value = $comp_total_value + $value; if ($comp_total_value > 21){ for($i = 13; $i < ($comp_total_cards + 13); $i++) { if ($card[$i] == 8 OR $card[$i] == 16 OR $card[$i] == 24 OR $card[$i] == 32){ $ace = $ace + 1; } } while ($comp_total_value > 21 AND $ace > 0){ $ace = $ace - 1; $comp_total_value = $comp_total_value - 10; } } } echo "Player: $total_value Bank: $comp_total_value"; if ($total_value == $comp_total_value){ $_SESSION['bj'] = 5; } if ($total_value < $comp_total_value ){ $_SESSION['bj'] = 4; } if ($total_value > $comp_total_value OR $comp_total_value > 21){ $_SESSION['bj'] = 3; } //win } else { $comp_total_cards = 1; } echo "Player Dealer "; if ($_SESSION['total_cards'] >= $i){ display_card( $card[$i] ); } echo " "; if (isset($_GET['stand'])) { if ($comp_total_cards >= $i){ display_card( $card[$c] ); } } else { $p++; if($p == 1){ display_card( $card['13'] ); } else if ($p == 2){ if ($_SESSION['bj'] == 6){ display_card( $card['14'] ); } else { echo "[img=img/back.gif]"; } } } echo " "; } echo "[url="blackjack.php?hit"]Hit[/url] [url="blackjack.php?stand"]Stand[/url] download the card graphics from here: http://notoriousonline.net/img.zip if you use this, and add querys to it, let me know, i would like to see it....
-
Re: Site Radio LOL, not really sure on that one dude, I rent a shoutcast port lol.....hit me on msn, I'll talk to my guy and get you a good price.
-
Re: Cron Confusion i only have 2 that run a midnight
-
Re: Cron Confusion TBAB Hosting, M5K's server
-
Re: Site Radio Thanks. Wasn't that hard to do, glad someone has something positive to say. :mrgreen:
-
classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="mediaplayer1"> filename="http://stage3radio.com:8075" autostart="True" showcontrols="True" showstatusbar="True" showdisplay="False" autorewind="True">
-
Re: Cron Confusion yeah :P that was the first thing I checked, and I talked to my host, and the problem isnt happening on any other site hosted on the server, so its not a server problem
-
For some reason, my crons started double crediting the other night, I rewrote the cron files, and all of them work fine now except my daily cron, any know what could be the issue?
-
Re: Kicking Gang Members At War I dont have the option for a player to delete there own gang, but this code should stop it..... find: function gang_staff_del() { if($gangdata['gangPRESIDENT'] == $userid || $gangdata['gangVICEPRES'] == $userid || $userid==1) { replace with: function gang_staff_del() { global $ir,$c,$userid,$gangdata; $wq=mysql_query("SELECT * FROM gangwars where warDECLARER={$ir['gang']} or warDECLARED={$ir['gang']}",$c); if(mysql_num_rows($wq) > 0) { die ("You Cannot Delete Your Gang While At War!"); } else if($gangdata['gangPRESIDENT'] == $userid || $gangdata['gangVICEPRES'] == $userid || $userid==1) { I havent tested this, nor do I know the name for the function for a user to delete there gang, this is just what I belive will patch it.
-
This is a little edit I wrote to stop players from leaving gangs, kicking users, or changing presidents while at war. find: function gang_staff_kick() { replace the whole function with: function gang_staff_kick() { global $ir,$c,$userid,$gangdata; $wq=mysql_query("SELECT * FROM gangwars where warDECLARER={$ir['gang']} or warDECLARED={$ir['gang']}",$c); if(mysql_num_rows($wq) > 0) { die ("You Cannot Kick While At War!"); } else if($gangdata['gangPRESIDENT'] == $userid || $gangdata['gangVICEPRES'] == $userid || $userid==1) { $_GET['ID'] = abs((int) $_GET['ID']); $who=$_GET['ID']; if($who==$gangdata['gangPRESIDENT']) { print "The gang president cannot be kicked."; } else if($who == $userid) { print "You cannot kick yourself, if you wish to leave transfer your powers to someone else and then leave like normal."; } else { $q=mysql_query("SELECT * FROM users WHERE userid=$who AND gang={$gangdata['gangID']}",$c); if(mysql_num_rows($q)) { $kdata=mysql_fetch_array($q); mysql_query("UPDATE users SET gang=0,daysingang=0 WHERE userid=$who",$c); print "[b]{$kdata['username']}[/b] was kicked from the Gang."; event_add($who,"You were kicked out of {$gangdata['gangNAME']} by [url='viewuser.php?u=$userid']{$ir['username']}[/url]",$c,'gang'); mysql_query("INSERT INTO gangevents VALUES('',{$gangdata['gangID']},unix_timestamp(),'[url='']{$kdata['username']}[/url] was kicked out of the Gang by [url='']{$ir['username']}[/url]');",$c); } else { print "Trying to kick nonexistant user"; } } } else { print "You do not have permission to perform this action."; } } find: function gang_leave() { replace the whole func with function gang_leave() { global $ir,$c,$userid,$gangdata; $wq=mysql_query("SELECT * FROM gangwars where warDECLARER={$ir['gang']} or warDECLARED={$ir['gang']}",$c); if(mysql_num_rows($wq) > 0) { die ("You Cannot Leave Your Gang During War"); } else if($gangdata['gangPRESIDENT'] == $userid || $gangdata['gangVICEPRES'] == $userid) { print "You cannot leave while you are still president or vice-president of your gang."; } else { mysql_query("UPDATE users SET gang=0,daysingang=0 WHERE userid=$userid",$c); mysql_query("INSERT INTO gangevents VALUES ('',{$ir['gang']},unix_timestamp(),'[url='']{$ir['username']}[/url] left the gang.');",$c); print "You left your gang."; } } find: function gang_staff_pres() { replace whole function with: function gang_staff_pres() { global $ir,$c,$userid,$gangdata; $wq=mysql_query("SELECT * FROM gangwars where warDECLARER={$ir['gang']} or warDECLARED={$ir['gang']}",$c); if(mysql_num_rows($wq) > 0) { die ("You Cannot Change Presidents While At War"); } else if($gangdata['gangPRESIDENT'] == $userid || $userid==1) { if(isset($_POST['subm'])) { mysql_query("UPDATE gangs SET gangPRESIDENT={$_POST['vp']} WHERE gangID={$gangdata['gangID']}",$c); $m=mysql_query("SELECT * FROM users WHERE userid={$_POST['vp']}",$c); $memb=mysql_fetch_array($m); event_add($memb['userid'],"You were transferred presidency of {$gangdata['gangNAME']}.",$c,'gang'); print "Presidency was transferred to {$memb['username']}"; } else { print " Enter the ID of the new president. ID: "; } } } If you all comments are welcome, good and bad. If you know a better way to do this, feel free to post it. :evil: - Peace - :evil:
-
Re: Seanybob's Arcade Mod kk im going to check it out now
-
Re: Seanybob's Arcade Mod Someone fedded the test name lol.....
-
Re: Seanybob's Arcade Mod hmmm.....games on a game......good concept.....little expensive, definately worth it, but i cant afford it right now.....giving karma anyway.
-
Re: User Notepad OK, im just gonna post what you need to put on the index page, and the edits to usernotes.php find on index.php print "</table><table border=1><tr><td>[b]Power:[/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]Job Skills:[/b] {$ir ['labour']} [Ranked: {$ir['labrank']}]</td></tr> <tr><td width='200'>[b]IQ: [/b] {$ir['IQ']} [Ranked: {$ir['IQrank']}]</td><td width ='200'>[b]Total Stats:[/b] {$ts} [Ranked: $tsrank]</td></tr></table> After it add: <table width=50% border=1 bordercolor=#666666>"; print "<form action='usernotes.php' method='post'> <h3>Your Notes:</h3> <textarea rows=7 cols=40 name='usernotes'>{$ir['usernotes']}</textarea>"; print" <input type='hidden' name='ID' value='{$_GET['u']}' /> <input type='submit' value='Update' />"; print"</form>"; usernotes.php <?php 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(); mysql_query("UPDATE users SET usernotes='{$_POST['usernotes']}' WHERE userid='{$ir['userid']}'",$c); print "Notes Updated! [url='index.php']> Back[/url]"; $h->endpage(); ?> there you go guys :P enjoy
-
Re: User Notepad I converted this mod to a users notepad for players to keep notes on the index page, ill post it later if anyone wants it
-
Re: [Lite] Bugget streets v1 i took this mod, played with it, got it working perfectly, and added more features, donators get more steps, you can buy and sell steps on a market similar to the crystal market, great mod to work with
-
Re: mailbox with smilies This is nice, thanks Spell....but I made a small modification since there was no way for the players to know how to post the smiley...... find: function mail_compose replace the whole function with function mail_compose() { global $ir,$c,$userid,$h; print "<form action='mailbox.php?action=send' method='post'> <table width=75% border=2> <tr> <td>ID to send to:</td> <td><input type='text' name='userid' value='{$_GET['ID']}' /></td></tr><tr> <td>Subject:</td> <td><input type='text' name='subject' /></td></tr><tr> <td>Message:</td> <td><textarea rows=5 cols=40 name='message'></textarea> [img=/smilies/smiley1.gif] = :) [img=/smilies/smiley2.gif] = ;) [img=/smilies/smiley3.gif] = :o [img=/smilies/smiley4.gif] = :D [img=/smilies/smiley5.gif] = :s [img=/smilies/smiley6.gif] = :( [img=/smilies/smiley7.gif] = :red [img=/smilies/smiley8.gif] = :roll [img=/smilies/smiley9.gif] = :x [img=/smilies/smiley10.gif] = :green [img=/smilies/smiley11.gif] = :| [img=/smilies/smiley12.gif] = ;( [img=/smilies/smiley13.gif] = :] [img=/smilies/smiley14.gif] = :horny [img=/smilies/smiley15.gif] = :cool</td></tr><tr> <td colspan=2><input type='submit' value='Send' /></td></tr></table></form>"; if($_GET['ID']) { print " <table width=75% border=2><tr><td colspan=2>[b]Your last 5 mails to/from this person:[/b]</td></tr>"; $q=mysql_query("SELECT m.*,u1.username as sender from mail m left join users u1 on m.mail_from=u1.userid WHERE (m.mail_from=$userid AND m.mail_to={$_GET['ID']}) OR (m.mail_to=$userid AND m.mail_from={$_GET['ID']}) ORDER BY m.mail_time DESC LIMIT 5",$c); while($r=mysql_fetch_array($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr><td>$sent</td> <td>[b]{$r['sender']} wrote:[/b] {$r['mail_text']}</td></tr>"; } print "</table>"; } } looks like this: http://notoriousonline.net/smkey.JPG
-
Re: Anyone know how i can if you cant find the code, hit me up on msn, ive got a mod that will do it, ill hook you up since im in a good mood :P
-
Re: gang staff panel Thanks, looks much nicer.