Jump to content
MakeWebGames

gurpreet

Members
  • Posts

    834
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by gurpreet

  1. I was just making stuff randomly, and wondered, as the original MCcodes v2 staff_special.php comes with a 'rifle' shouldn't there be a code for it? I checked and no code. I want to put a donator only item into the DP, if it's possible. I don't have enough coding experience to do this YET, but could someone give me some lead way or tell me how to do it? Thanks.
  2. Re: if you have a game or have a game in the maiking read on   Ahem... -61
  3. Re: [Mccodes v2] Pass Parcel or Secret Santa [Working Copy]   1) Great work, and good job Radio_Active for helping 2) Your not a 'crap coder' because you can do 100x what I can do. Don't be modest :P
  4. Re: if you have a game or have a game in the maiking read on   av u gt ne proof of ur wrk? Lol, I don't think you will get far talking like that.
  5. i know I have recently been asking a lot of questions and I know most of the answers now, but this one is one which I have no idea about. I know it's to do with a query (duh) but I don't know which, or how to fix it.   You lost to 1337 Bot. Unlucky, try again when you have trained more. and lost 9.83410511094E-5% EXP!QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'viewuser.php?u=1'>GurpZ' WHERE userid=21' at line 1 Query was UPDATE users SET hp=1,hospital=81,hospreason='Lost to GurpZ' WHERE userid=21   Attacklost.php:   <?php $atkpage=1; include "globals.php"; $_GET['ID']==abs((int) $_GET['ID']); $_SESSION['attacking']=0; $_SESSION['attacklost']=0; $od=$db->query("SELECT * FROM users WHERE userid={$_GET['ID']}"); if($db->num_rows($od)) { $r=$db->fetch_row($od); print "You lost to {$r['username']}. Unlucky, try again when you have trained more."; $expgain=abs(($ir['level']-$r['level'])^3); $expgainp=$expgain/$ir['exp_needed']*100; $hosptime=rand(10,90); print " and lost $expgainp% EXP!"; $db->query("UPDATE users SET exp=exp-$expgain, attacking=0 WHERE userid=$userid"); $db->query("UPDATE users SET exp=0 WHERE exp<0"); $db->query("UPDATE users SET hp=1,hospital=$hosptime,hospreason='Lost to <a href=\'viewuser.php?u={$r['userid']}\'>{$r['username']}</a>' WHERE userid=$userid"); $db->query("UPDATE users SET hp=1,hospital=$hosptime,hospreason='Lost to [url='viewuser.php?u={$userid}']{$ir['username']}[/url]' WHERE userid={$r['userid']}"); event_add($r['userid'],"[url='viewuser.php?u=$userid']{$ir['username']}[/url] attacked you and lost.",$c); $atklog=mysql_escape_string($_SESSION['attacklog']); $db->query("INSERT INTO attacklogs VALUES('',$userid,{$_GET['ID']},'lost',unix_timestamp(),0,'$atklog');"); $warq=$db->query("SELECT * FROM gangwars WHERE (warDECLARER={$ir['gang']} AND warDECLARED={$r['gang']}) OR (warDECLARED={$ir['gang']} AND warDECLARER={$r['gang']})"); if ($db->num_rows($warq) > 0) { $war=$db->fetch_row($warq); $db->query("UPDATE gangs SET gangRESPECT=gangRESPECT+1 WHERE gangID={$r['gang']}"); $db->query("UPDATE gangs SET gangRESPECT=gangRESPECT-1 WHERE gangID={$ir['gang']}"); print " You lost 1 respect for your gang!"; } } else { print "You lost to Mr. Non-existant! =O"; } $h->endpage(); ?>
  6. Re: No attacking level 1 I'm asking if the 'level' and 'fedjail' and stuff are columns in the mysqlDB?
  7. Re: [Mccodes V2} Bar Mod   LAMP? What's that! I want it 8-)
  8. Re: No attacking level 1 Oh wow I can code something... :mrgreen: How would the <3 days thing work?   else if($odata['daysold'] <3) { print "<center><font size=5>You cannot attack someone who has been playing Game Name for less than 3 days as they won't be able to do much back to you.</font></center>"; $h->endpage(); exit; }   Also just wondering, as i took a guess, the 'daysold 'level' and stuff, is that a column in the Mysql DB?
  9. Ok so I'm a noob at coding, but I'm tryna get better, please correct my errors and tell me what they are. I'm trying to make it so people can't attack level 1's. I know this is basics for most of you, but you must have gone through this.   else if($odata['level'] ==1) { print "<center><font size=5>You cannot attack a level 1 as they won't be able to do much back to you.</font></center>"; $h->endpage(); exit; }   I used the $oadata as Alabamahit said $ir is for you, and $oadata is for them.
  10. Re: [Mccodes V2} Bar Mod Is it just me, or does the Jamaican Rum and Vodka not work?
  11. Re: (V2) Equip item to use agility in battles. if I think you mean this, follow this, if not say so: Go to staff panel -->Go to Create New Item --> you will see "Usage Form" and Effect 1-3. On those you can make things like 50 agility (value) and so on.
  12. Re: No attacking people in Fed.   I see, thanks a lot :) +1
  13. Re: [mccode V2] bank interest CAP my bank crons are messed up o.o
  14. Re: No attacking people in Fed.   Doesn't work for me.
  15. Re: [v2]workin cyberbank[v2] If you want to (and in my view more appropriate) go to header.php Find: [b][[url='logout.php']Emergency Logout[/url]]   Underneath add:   [b][[url='cyberbank.php']Cyber Bank[/url]]   Makes it easier for players to go to the bank quickly, instead of going city -> bank all the time.
  16. Re: Bot wep? Ahh yea..thanks I keep forgetting stuff, +1
  17. Is there a way on MCCODES 2 to give a weapon to a bot so it equips it? I have to make my bots stats like 100000000 to get it to hit in the tens...
  18. Re: Quick coding question   Hmm can still attack people in fed. Does the != mean the negative of the normal stuff?
  19. I was going through my crappy coding, obviously done by me and i saw this: if($ir['fedjail'] > 0) { print "No attacking people who can't attack back...TUT TUT!"; $h->endpage(); exit; } I was just wondering, seeing as that doesnt work, how do you do if it does NOT equal 0? Example: if($ir['fedjail'] (stuff for does not)= 0) { print "No attacking people who can't attack back...TUT TUT!"; $h->endpage(); exit; } so it's saying if fedjail does NOT equal 0, you can't attack them, if it is 0, you can.
  20. Re: Voted Today? Parse error: syntax error, unexpected T_ECHO, expecting T_FUNCTION in /home/gurpreet/public_html/header.php on line 205   Which is the vote script line
  21. Re: [Mccodes V2} Bar Mod Nice one, but quite a lot of spelling errors. Here's one without errors (I think)   <?php include "globals.php"; if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); } if(!$_GET['spend']) { print "<h2>Game Name Bar</h2> Welcome to your game name bar. We have a variety of drinks items here, which increases your will. Below is a list of items. <h3>Destroy your Liver</h3> <table border='1' width='90%' bordercolor='#939393'><tr background='header.jpg'><th>Beverage</th><th>Number</th><th>Type</th><th>Price</th><th><center>Info</th></tr><tr> <td><center>Margarita</td><td><center>1</td><td><center>Beverage</td><td><center>$2,000</td><td><center>[url='bar.php?spend=Margarita']Great Stuff. Too much will taste like crap. [/url]</td></tr><tr> <td><center>Vermouth</td><td><center>2</td><td><center>Beverage</td><td><center>$6,000</td><td><center>[url='bar.php?spend=Vermouth']Nice wine. Bitter flavor.[/url]</td></tr><tr> <td><center>Jamaican Rum</td><td><center>3</td><td><center>Beverage</td><td><center>$10,000</td><td><center>[url='bar.php?spend=rum']This is what you find on the streets.[/url]</td></tr><tr> <td><center>Vodka</td><td><center>4</td><td><center>Beverage</td><td><center>$14,000</td><td><center>[url='bar.php?spend=vodka']What you sneak in to your family Christmas Party.[/url]</td></tr></table>"; } else { if($_GET['spend'] == 'Mararita') { if($ir['money'] <2000) { print "You don't have enough money to buy a Margarita!"; } else { mysql_query("UPDATE users SET brave=brave+2,energy=0,money=money-2000 WHERE userid=$userid",$c); mysql_query("UPDATE users SET will=maxbrave WHERE brave > maxbrave",$c); echo " You buy a Margarita for $2,000 take out the olive and chug it down. After it you feel a little dizzy and decide to sit down. Your friends roll you to your side and you proceed to vomit. <br / > You gained some will back! [url='bar.php']>Back to the Bar[/url]</center>"; } } else if($_GET['spend'] == 'Vermouth') { if($ir['money'] <6000) { print "You don't have enough money to buy a Vermouth!"; } else { mysql_query("UPDATE users SET will=0,energy=energy-100,hospital=hospital=10,hospital=100,hospreason='Was poisoned by Vermouth',money=money-6000 WHERE userid=$userid",$c); echo " You buy a Vermouth for 6,00, And drink it slowly. You wake up in a hospital bed. full of ice, you see a note taped to a phone saying Call 911 or else you will die. After you make the call you pass out again. Your doctors confirm that you had alcohol poisoning and you got your stomach pumped.. [url='hospital.php']>Hospital[/url]</center>"; } } else if($_GET['spend'] == 'Rum') { if($ir['money'] <1000) { print "You don't have enough money to buy Jamaican Rum!"; } else { mysql_query("UPDATE users SET will=will+1,energy=0,money=money-10000 WHERE userid=$userid",$c); mysql_query("UPDATE users SET will=maxwill WHERE will > maxwill",$c); echo " You buy a bottle of Jamaican Rum and sip it down. Soon, you finish it and throw the bottle out. <br / > You gain some will! [url='bar.php']>Back to the Bar[/url]</center>"; } } else if($_GET['spend'] == 'Vodka') { if($ir['money'] <14000) { print "You don't have enough money to buy some Vodka!"; } else { mysql_query("UPDATE users SET will=will+3,energy=0,money=money-1000 WHERE userid=$userid",$c); mysql_query("UPDATE users SET will=maxwill WHERE will > maxwill",$c); echo " You buy a Vodka for 14,000, and sip the disgusting taste down. Damn, your stomach hurts <br / > You decide to go home and you gained some will! [url='bar.php']>Back to the Bar[/url]</center>"; } } } $h->endpage(); ?>   I know there is a mararita query but I didn't change it because it might be needed as it's spelt.
  22. Re: [mccode v2] Index.php Update   hmm...Someone else done my CSS, so is it in my header.php? i ctrl+f Table Class but find nothing
  23. Re: [MCcode V2] Item Info revamp!   You will have to remove the /bars from the SRC if they are not in your bars folder. You might also have to rename the class of the table to whatever yours is called in your CSS file.   Basically i had alot of members wanting to know weapon strengths so instead of adding Power and Accuracy etc, i just did that because i was lazy, lol :-) Thanks for this mate :)
  24. Re: MCcode V1.1 New Jobs[Free] I'll try soon, GalaxyVisions are having problems with my upload limit...I'm allowed like 0.001mb per file...so yea.
  25. Re: [MCcode V2] Item Market Revamped   Correct me if I'm wrong, but on my game, this looks exactly the same, everything the same, but just without the Gift option? If I have missed something sorry, but good work
×
×
  • Create New...