Jump to content
MakeWebGames

AlabamaHit

Members
  • Posts

    1,308
  • Joined

  • Last visited

Everything posted by AlabamaHit

  1. Re: No attacking people in Fed. Sorry man...that works. Your putting it in wrong place if its not...Where you put code means alot.. I bet you have in wrong place, looking at you attack.php you have the block for user id 1 to early... just use this...   <?php $menuhide=1; $atkpage=1; include "globals.php"; $_GET['ID'] == (int) $_GET['ID']; if(!$_GET['ID']) { print "WTF you doing, bro?"; $h->endpage(); exit; } else if($_GET['ID'] == '1') { echo "You cannot attack admin, Sorry."; $h->endpage(); exit; } else if($_GET['ID'] == $userid) { print "Only the crazy attack themselves."; $h->endpage(); exit; } else if ($ir['hp'] <= 1) { print "Only the crazy attack when their unconscious. [url='index.php']Back[/url]"; $h->endpage(); exit; } else if ($_SESSION['attacklost'] == 1) { print "Only the losers of all their EXP attack when they've already lost. [url='index.php']Back[/url]"; $_SESSION['attacklost']=0; $h->endpage(); exit; } //get player data $youdata=$ir; $q=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid={$_GET['ID']}"); $odata=$db->fetch_row($q); $myabbr=($ir['gender']=="Male") ? "his" : "her"; $oabbr=($ir['gender']=="Male") ? "his" : "her"; if($ir['attacking'] && $ir['attacking'] != $_GET['ID']) { print "Bad, bad, bad girl. [url='index.php']Back[/url]"; $_SESSION['attacklost']=0; $h->endpage(); exit; } if($odata['hp'] == 1) { print "This player is unconscious. [url='index.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($odata['hospital']) { print "This player is in hospital. [url='index.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } //RIGHT HERE I ADD FED JAIL else if($odata['fedjail'] > 0) { print "some message"; $h->endpage(); exit; } //see I had to use else if..because of where i put it. else if($ir['hospital']) { print "While in hospital you can't attack. [url='hospital.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($odata['jail']) { print "This player is in jail. [url='index.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($ir['jail']) { print "While in jail you can't attack. [url='jail.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } else if($odata['travelling']) { print "That player is travelling. [url='index.php']> Back[/url]"; $h->endpage(); $_SESSION['attacking']=0; $ir['attacking']=0; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); exit; } print "<table width=100%><tr><td colspan=2 align=center>"; if($_GET['wepid']) { if($_SESSION['attacking']==0 && $ir['attacking'] == 0) { if ($youdata['energy'] >= $youdata['maxenergy']/2) { $youdata['energy']-= floor($youdata['maxenergy']/2); $me=floor($youdata['maxenergy']/2); $db->query("UPDATE users SET energy=energy- {$me} WHERE userid=$userid"); $_SESSION['attacklog']=""; $_SESSION['attackdmg']=0; } else { print "You can only attack someone when you have 50% energy"; $h->endpage(); exit; } } $_SESSION['attacking']=1; $ir['attacking']=$odata['userid']; $db->query("UPDATE users SET attacking={$ir['attacking']} WHERE userid=$userid"); $_GET['wepid'] = (int) $_GET['wepid']; $_GET['nextstep'] = (int) $_GET['nextstep']; //damage if($_GET['wepid'] != $ir['equip_primary'] && $_GET['wepid'] != $ir['equip_secondary']) { print "Stop trying to abuse a game bug. You can lose all your EXP for that. [url='index.php']> Home[/url]"; $db->query("UPDATE users SET exp=0 where userid=$userid",$c); die(""); } $qo=$db->query("SELECT i.* FROM items i WHERE i.itmid={$_GET['wepid']}"); $r1=$db->fetch_row($qo); $mydamage=(int) (($r1['weapon']*$youdata['strength']/($odata['guard']/1.5))*(rand(8000,12000)/10000)); $hitratio=max(10,min(60*$ir['agility']/$odata['agility'],95)); if(rand(1,100) <= $hitratio ) { $q3=$db->query("SELECT i.armor FROM items i WHERE itmid={$odata['equip_armor']} ORDER BY rand()"); if($db->num_rows($q3)) { $mydamage-=$db->fetch_single($q3); } if($mydamage < -100000) { $mydamage=abs($mydamage); } else if($mydamage < 1) { $mydamage=1; } $crit=rand(1,40); if($crit==17) { $mydamage*=rand(20,40)/10; } else if($crit==25 or $crit == 8) { $mydamage/=(rand(20,40)/10); } $mydamage=round($mydamage); $odata['hp']-=$mydamage; if($odata['hp']==1) { $odata['hp']=0;$mydamage+=1; } $db->query("UPDATE users SET hp=hp-$mydamage WHERE userid={$_GET['ID']}"); print "<font color=red>{$_GET['nextstep']}. Using your {$r1['itmname']} you hit {$odata['username']} doing $mydamage damage ({$odata['hp']})</font> \n"; $_SESSION['attackdmg']+=$mydamage; $_SESSION['attacklog'].="<font color=red>{$_GET['nextstep']}. Using {$myabbr} {$r1['itmname']} {$ir['username']} hit {$odata['username']} doing $mydamage damage ({$odata['hp']})</font> \n"; } else { print "<font color=red>{$_GET['nextstep']}. You tried to hit {$odata['username']} but missed ({$odata['hp']})</font> \n"; $_SESSION['attacklog'].="<font color=red>{$_GET['nextstep']}. {$ir['username']} tried to hit {$odata['username']} but missed ({$odata['hp']})</font> \n"; } if($odata['hp'] <= 0) { $odata['hp']=0; $_SESSION['attackwon']=$_GET['ID']; $db->query("UPDATE users SET hp=0 WHERE userid={$_GET['ID']}"); print " [b]What do you want to do with {$odata['username']} now?[/b] <form action='attackwon.php?ID={$_GET['ID']}' method='post'><input type='submit' value='Mug Them' /></form> <form action='attackbeat.php?ID={$_GET['ID']}' method='post'><input type='submit' value='Hospitalize Them' /></form> <form action='attacktake.php?ID={$_GET['ID']}' method='post'><input type='submit' value='Leave Them' /></form>"; } else { //choose opp gun $eq=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$odata['equip_primary']}, {$odata['equip_secondary']})"); if(mysql_num_rows($eq) == 0) { $wep="Fists"; $dam=(int)((((int) ($odata['strength']/$ir['guard']/100)) +1)*(rand(8000,12000)/10000)); } else { $cnt=0; while($r=$db->fetch_row($eq)) { $enweps[]=$r; $cnt++; } $weptouse=rand(0,$cnt-1); $wep=$enweps[$weptouse]['itmname']; $dam=(int) (($enweps[$weptouse]['weapon']*$odata['strength']/($youdata['guard']/1.5))*(rand(8000,12000)/10000)); } $hitratio=max(10,min(60*$odata['agility']/$ir['agility'],95)); if(rand(1,100) <= $hitratio) { $q3=$db->query("SELECT i.armor FROM items i WHERE itmid={$ir['equip_armor']} ORDER BY rand()"); if($db->num_rows($q3)) { $dam-=$db->fetch_single($q3); } if($dam < -100000) { $dam=abs($dam); } else if($dam < 1) { $dam=1; } $crit=rand(1,40); if($crit==17) { $dam*=rand(20,40)/10; } else if($crit==25 or $crit == 8) { $dam/=(rand(20,40)/10); } $dam=round($dam); $youdata['hp']-=$dam; if ($youdata['hp']==1) { $dam+=1; $youdata['hp']=0; } $db->query("UPDATE users SET hp=hp-$dam WHERE userid=$userid"); $ns=$_GET['nextstep']+1; print "<font color=blue>{$ns}. Using $oabbr $wep {$odata['username']} hit you doing $dam damage ({$youdata['hp']})</font> \n"; $_SESSION['attacklog'].="<font color=blue>{$ns}. Using $oabbr $wep {$odata['username']} hit {$ir['username']} doing $dam damage ({$youdata['hp']})</font> \n"; } else { $ns=$_GET['nextstep']+1; print "<font color=red>{$ns}. {$odata['username']} tried to hit you but missed ({$youdata['hp']})</font> \n"; $_SESSION['attacklog'].="<font color=blue>{$ns}. {$odata['username']} tried to hit {$ir['username']} but missed ({$youdata['hp']})</font> \n"; } if($youdata['hp'] <= 0) { $youdata['hp']=0; $_SESSION['attacklost']=1; $db->query("UPDATE users SET hp=0 WHERE userid=$userid"); print "<form action='attacklost.php?ID={$_GET['ID']}' method='post'><input type='submit' value='Continue' />"; } } } else if ($odata['hp'] < 5) { print "You can only attack those who have health"; $h->endpage(); exit; } else if ($ir['gang'] == $odata['gang'] && $ir['gang'] > 0) { print "You are in the same gang as {$odata['username']}! What are you smoking today dude!"; $h->endpage(); exit; } else if ($youdata['energy'] < $youdata['maxenergy']/2) { print "You can only attack someone when you have 50% energy"; $h->endpage(); exit; } else if ($youdata['location'] != $odata['location']) { print "You can only attack someone in the same location!"; $h->endpage(); exit; } else { } print "</td></tr>"; if($youdata['hp'] <= 0 || $odata['hp'] <= 0) { print "</table>"; } else { $vars['hpperc']=round($youdata['hp']/$youdata['maxhp']*100); $vars['hpopp']=100-$vars['hpperc']; $vars2['hpperc']=round($odata['hp']/$odata['maxhp']*100); $vars2['hpopp']=100-$vars2['hpperc']; $mw=$db->query("SELECT i.* FROM items i WHERE i.itmid IN({$ir['equip_primary']}, {$ir['equip_secondary']})"); print "<tr><td colspan=2 align='center'>Attack with: "; if($db->num_rows($mw) > 0) { while($r=$db->fetch_row($mw)) { if(!$_GET['nextstep']) { $ns=1; } else { $ns=$_GET['nextstep']+2; } if($r['itmid']==$ir['equip_primary']) { print "[b]Primary Weapon:[/b] "; } if($r['itmid']==$ir['equip_secondary']) { print "[b]Secondary Weapon:[/b] "; } print "[url='attack.php?nextstep=$ns&ID={$_GET[']{$r['itmname']}[/url] "; } } else { print "You have nothing to fight with."; } print "</table>"; print "<table width='50%' align='center'><tr><td align=right>Your Health: </td><td><img src=greenbar.png width={$vars['hpperc']} height=10><img src=redbar.png width={$vars['hpopp']} height=10></td><tr><td align=right>Opponents Health: </td><td><img src=greenbar.png width={$vars2['hpperc']} height=10><img src=redbar.png width={$vars2['hpopp']} height=10></td></tr></table>"; } $h->endpage(); ?>
  2. Re: [v2]workin cyberbank[v2] lol, thats why when i do something like that i just tell them to add link where they want, lol
  3. Re: [mccode v2] Index.php Update if they didn't make a different css yes its in the header.php
  4. Re: Quick coding question this is the same problem..your using $ir that mean you...your wanting to check the other person and in the attack.php thats $odata So use this.   if($odata['fedjail'] != 0) { print "No attacking people who can't attack back...TUT TUT!"; $h->endpage(); exit; }
  5. Re: No attacking people in Fed. lol i would hope so...cuase $ir means you... Use this..   if($odata['fedjail'] > 0) { print "some message"; $h->endpage(); exit; }
  6. Re: Trying something out ok....Ubuntu is good to start with.....But it is missing a few options like watching dvds you can without installing programs...(Something to do leagel bs) I don't get it cause some have it... I recommend for beginners to use drum roll please, lol.. Mint You can find the home page here. http://www.linuxmint.com/ Mint is a branch off Ubunutu, they are based off it in other words. But it comes preinstalled with extras. Like java, flash, dvd read and such....Mint is a good starter...Nice OS should do anything you want to do :P
  7. Re: Voted Today? change the 2 to the number of sites you have to vote on...... Also rember that was untested it might not even work....
  8. Re: Voted Today? use the sprintf one. Not the $db->query one.... I was jsut showing him that so he would see something familiar.
  9. Re: Trying something out Linux you can do everything. Some games don't play on it. But google the game. The game might actually run on it. Now as far as new computer user. I would recommend linux. I wouldn't put a new computer user to windows or max...windows is bad. and mac is expensive unix system. Linux is free. And if they are new to computers and not used to windows. then they should defently go to Linux can get used to it instead of windows... I can not argue though if you use a computer to play games......If you do then Windows is defently the way to go..... I don't know how many do use a computer for games. I don't, i have an xbox, playstation 2, and xbox 360 (All slightly modified, lol) For my games. I never personally got into games on computers. But hey...some like that. IF you use computer for games windows. If you use a computer for anything other than games. I recommend Linux. Want 3 biggest reasons? 1 = Free 2 = All programs are Free 3 = Support. (Windows don't have a chat you can go into and get help do they?) All "big" linux distros has a IRC that you can go into and fix or chat or just go and learn about linux. from experienced linux people. Windows don't have and never will have that.
  10. Re: Trying something out Vista sucks lol...there ya go :wink: windows 7 will be a bloated Vista. If m$ does right they will slim it down and make is a slimmer version of vista. but don't see them doing that cause they bloat the OS and make it eat ram to force you to upgrade your cmputer making the computer companys more money. So I would say that 7 is going to be as bad or worse than Vista...
  11. Re: [MCcode V2] Item Market Revamped you can leave it.....People say that all the time....but it can't be true cause people ask for base or "original" code all the time, and people give it to them. So i see no need to remvoe it.l
  12. Re: Trying something out If they prefer windows over linux then they are a gamer..(Can't blame them there.) Or like Pog said, have not tried Linux...(In awhile) Linux is far from that command prompt allday to install a program. Its easier to install programs and drivers on Linux than windows now....
  13. Re: Trying something out Yeah, thats the biggest thing on this topic. Windows or Linux...It all really comes down to what you like and what works for you. XP is really just a prettied up 2000 (I think). I can be wrong on that. I agree Vista was not a very good idea....(At this time of age)...If they where to have waited 4 years or so from now...Vista probarly would have been better. ========== Edited cause other one above was edited:   Only reason is cause its a tax write off, lol.
  14. Re: Trying something out I didn't realize this was a topic about all that. But hey, we can....William Gates Screwed everyone over claimed windows to himself. That don't sound to generous. Ever heard of Mac. Thats the other guys. The ones he screwed over. William Gates did not make windows OS by himself. He had help and screwed them. Don't sound generouse people to me. And I'm sure that the real "generous" people in the world...The ones that make Linux and other Opensource programs would have done just fine without windows and m$. The technology isn't even the same. So really you can't comapare the 2. They run on same idea "ease" of use of computer. But under the hood. Nothing the same.
  15. Re: Trying something out I use linux....Windows blows I don't care what anyone says. I know from personal trial, lol..... My friends and family are running linux to now...I got tired of reformatting every 6 months(their computer that is).... I use Ubuntu and Linux Mint. Back and forward I go on them.... But any who. From what I have heard, "Windows 7" is supposedly "not" a build up from Vista. They claim it is not only the 7th windows (Hint the name) but also a completely new 7th Kernel. I know i have seen pictures of windows 7 and it looks just like Vista. I know this if that new kernel don't do miracles they are in alot of trouble cause alot of corporations are going to be moving onto linux/unix systems. They are faster, safer, and more stable. You can customize them completely. I mean hell you can make it look like typical linux box. Or make is look like winblows i mean Windows Xp, or Vista...You can even make it a mirror image of OSX(mac)...i mean really as a OS "pretty" if thats what you want...Linux/Unix is the way to go...If you want stability Linux/Unix is the way to go...If you want a fast OS Linux/Unix is the way to go.. Windows 2000 was the best windows ever made lol. XP was their stumble, and Vista was the downfall, lol. Most people missed it but back about a year ago now I guess, windows was calling itself a virus, lol. Some virus protection programs where quarenting exporer.exe (pretty important to winblows). Nice little Windows joke i have found before.   Oh, and that super funny video of Gates showing off Windows at a convention and it goes Blue Screen, LMAO i still fall in the floor laughing at that.
  16. Re: [New Game!]Legacy Phaser lunar and host monster blows byet out of water.... Speeds are alot better on them. Now price of what you get you can not beat byethosting.
  17. Re: [New Game!]Legacy Phaser byet hosting does i think....some people on here will swear by them, loll...I use Host Monster but they are best paid yearly..but check out byethosting.. I believe they have monthly payments.
  18. Re: Voted Today? you will get it...just takes pratice and reading, .....alot of reading, lol
  19. Re: Voted Today?   lol thats funny right there. without sprintf would be this...   $vote = $db->query("SELECT list FROM votes WHERE userid = ".$ir['userid']." "); if(mysql_num_rows($vote) >2)//Change the 2 to however many there are. { echo "some message"; }   what im not sure is goin to work is the query itself, it might nix up the userid
  20. Re: Voted Today? couldnt you do it this way?   $votes = sprintf("SELECT list FROM votes WHERE userid = '%u' ", ($ir['userid'])); $vote = mysql_query($votes); if(mysql_num_rows($vote) >2)//Change the 2 to however many there are. { echo "some message"; }   that is not tested
  21. Re: [New Game!]Legacy Phaser then buy hosting, lol....don't say you cant afford it.......its only $3 and yes you can start for that...and if you bougth $300 codes...surely you can not buy those 2 20oz drinks and buy a month hosting..... On modifiying...no you didnt, you used a free template on this site...that is cool....but wayyy to wide..if you dont ahve wide screen monitor you have to scroll right...that alone makes me hate that template.....i hate any site that makes me scroll left to right.... I will say nice work on ading it... game does look alot better with that on it then the plain white, lol
  22. Re: [mccode v2] Index.php Update well.... I like Pizza LMAO
  23. Re: [mccodes V2] header + login to many colors......and to many table borders.....and really seems like a basic page, just added tables to the header...the login is ok....but colos i dont like...layout if fine though..not bad at all on the login that is.
  24. Re: [Mccodes V2]Phds http://criminalexistence.com/ceforums/i ... ic=21682.0 amazing how close parts of the code is.... Not downing you for this.......Just saying give the credit to the right person please... Thanks for sharing :P
  25. Re: Brave/Energy regain amount that mean max brave divided by 10 Example. if max brave was 100 it would be 10-----100/10 = 10 50 would be 5-----50/10=5 Hope that helps ya
×
×
  • Create New...