-
Posts
3,137 -
Joined
-
Last visited
-
Days Won
35
Content Type
Profiles
Forums
Events
Everything posted by Djkanna
-
No... Both are completely different. $(function () { } ); is equiv to $().ready ( function () { } );
-
Try: <div id="content"></div> <script> ( function ( $ ) { $(function () { var content = $('#content'), url = 'attack.jquery.php?ID=<?php echo $_GET["ID"]; ?>'; content.load ( url ); $('#submit_b').on ( 'click', function ( e ) { e.preventDefault(); $('#usefists').submit(); content.load ( url ); }); }); })(jQuery); </script> <form id="usefists" name="usefists" method="post"> <input type="hidden" name="fist" id="fist" value="fist"> <input type="button" name="submit" id="submit_b" style="color:#A1A1A1;font-weight:700;width:200px; height:40px; border:2px; cursorointer; background: url(images/attack/hand.jpg) no-repeat center top; "value="Fists" /> </form> Pastie Or: <div id="content"></div> <script> ( function ( $ ) { $(function () { var content = $('#content'), url = 'attack.jquery.php?ID=<?php echo $_GET["ID"]; ?>'; content.load ( url ); $('#usefists').submit ( function ( e ) { content.load ( url ); e.preventDefault(); }); }); })(jQuery); </script> <form id="usefists" name="usefists" method="post"> <input type="hidden" name="fist" id="fist" value="fist"> <input type="button" name="submit" id="submit_b" style="color:#A1A1A1;font-weight:700;width:200px; height:40px; border:2px; cursorointer; background: url(images/attack/hand.jpg) no-repeat center top; "value="Fists" /> </form> Pastie
-
Meltdown no...Throwing **** at a wall and seeing if it sticks, yes.
-
We're currently debating viable methods of doing this, if you want to hop into IRC. :)
-
I would rather look into a method of changing it, than trying to patch it.
-
Yay! Welcome aboard Kyle.
-
Reloading the page resubmits the data. ( if you don't resubmit, the counter doesn't show anymore ) Resubmitting invalid data will reset the counter as a 'new' lockout, makes sense to me. *Also it's on minutes for me. EDIT: A_B in before me, must refresh before hitting send.
-
I try and I try, but it is just useless.
-
More consistent, also pretty sure these house queries, should be using $gangdata['gangHOUSE'] opposed to $gangdata['gangID'] <?php function gang_staff_upgrade_house() { global $db, $ir, $gangdata; $additionalCost = 10; // <currentCost> * <$additionalCost> if ( !array_key_exists ( 'house', $_GET ) || !is_string ( $_GET['house'] ) || !filter_var ( $_GET['house'], FILTER_VALIDATE_INT ) ) { $currentHouse = $db->query ( sprintf ( 'SELECT hNAME FROM houses WHERE ( hID = %u )', $gangdata['gangHOUSE'] ) ); $currentHouse = ( $db->num_rows ( $currentHouse ) == 1 ) ? htmlentities ( $db->fetch_single ( $currentHouse ), ENT_QUOTES, 'UTF-8' ) : 'Unknown'; printf ( 'Your Coven currently owns the %s', $currentHouse ); echo ( '<table class="table" width="75%" cellspacing="1"> <tr> <th width="40%">House</th> <th width="20%">Will</th> <th width="30%">Price</th> <th width="10%">Buy</th> </tr> </table>' ); $houseUpgrades = $db->query ( sprintf ( 'SELECT hID, hNAME, hWILL, hPRICE FROM houses WHERE ( hID > %u ) ORDER BY hWILL ASC', $gangdata['gangHOUSE'] ) ); if ( $db->num_rows ( $houseUpgrades ) > 0 ) { while ( $row = $db->fetch_row ( $houseUpgrades ) ) { echo ( '<tr>' ); printf ( '<td>%s</td>', htmlentities ( $row['hNAME'], ENT_QUOTES, 'UTF-8' ) ); printf ( '<td>Will: %s</td>', number_format ( $row['hWILL'] ) ); printf ( '<td>$%s</td>', number_format ( $row['hPRICE'] * $additionalCost ) ); printf ( '<td><a href="yourgang.php?action=staff&act2=upgradehouse&house=%u">Buy</a></td>', $row['hID'] ); echo ( '</tr>' ); } } else { echo ( '<tr><td colspan="4" class="center">There are currently no upgrades.</td></tr>' ); } echo ( '</table>' ); } else { if ( $gangdata['gangHouse'] < $_GET['house'] ) { $selectedHouse = $db->query ( sprintf ( 'SELECT hNAME, hPRICE FROM houses WHERE ( hID = %u )', $_GET['house'] ) ); if ( $db->num_rows ( $selectedHouse ) == 1 ) { $house = $db->fetch_row ( $selectedHouse ); $cost = $house['hPRICE'] * $additionalCost; if ( $cost > $gangdata['gangMONEY'] ) { echo ( '<p>Your gang\'s vault doesn\'t have enough money for this upgrade.</p>' ); } else { $house['hNAME'] = htmlentities ( $house['hNAME'], ENT_QUOTES, 'UTF-8' ); $db->query ( sprintf ( 'UPDATE gangs SET gangMONEY = gangMONEY - %u, gangHOUSE = %u WHERE ( gangID = %u )', $cost, $_GET['house'], $gangdata['gangID'] ) ); gang_event_add ( $gangdata['gangID'], sprintf ( 'The gang house has been upgraded to the %s', $house['hNAME'] ) ); echo ( '<p>You\'ve upgraded the gang house to %s.</p>', $house['hNAME'] ); } } else { echo ( '<p>This house doesn\'t exist.</p>' ); } } else { echo ( '<p>This isn\'t a valid upgrade to your current house.</p>' ); } echo ( '<p><a href="yourgang.php?action=staff&act2=upgradehouse">Back</a></p>' ); } $h->endpage(); } Pastie cause the highlighter is going to screw it up no doubt.
-
Could do something like. <?php $locationTimes = array ( 1 => array ( 2 => 10, 3 => 15, 4 => 5, 5 => 3, 6 => 2, 7 => 20, ), 2 => array ( 1 => 10, 3 => 15, 4 => 5, 5 => 3, 6 => 2, 7 => 20, ), 3 => array ( 1 => 10, 2 => 15, 4 => 5, 5 => 3, 6 => 2, 7 => 20, ), 4 => array ( 1 => 10, 2 => 15, 3 => 5, 5 => 3, 6 => 2, 7 => 20, ), 5 => array ( 1 => 10, 2 => 15, 3 => 5, 4 => 3, 6 => 2, 7 => 20, ), 6 => array ( 1 => 10, 2 => 15, 3 => 5, 4 => 3, 5 => 2, 7 => 20, ), 7 => array ( 1 => 10, 2 => 15, 3 => 5, 4 => 3, 5 => 2, 6 => 20, ), ); if ( array_key_exists ( $ir['location'], $locationTimes ) && array_key_exists ( $_GET['to'], $locationTimes[$ir['location']] ) ) { $time = $locationTimes[$ir['location']][$_GET['to']]; } else { $time = 20; //default. } Array of all locations ( ID ), then for each location have an array of other locations ( ID ) and the respective time.
-
Well the lack of code tags is annoying, so there you go, you have code tags.
-
<?php /** ** MCCodes Version 2.0.5b ** Copyright (C) 2005-2012 Dabomstew ** All rights reserved. ** ** Redistribution of this code in any form is prohibited, except in ** the specific cases set out in the MCCodes Customer License. ** ** This code license may be used to run one (1) game. ** A game is defined as the set of users and other game database data, ** so you are permitted to create alternative clients for your game. ** ** If you did not obtain this code from MCCodes.com, you are in all likelihood ** using it illegally. Please contact MCCodes to discuss licensing options ** in this case. ** ** File: attacklost.php ** Signature: 95b6a74ae7c7a6cf4e9ed998f3b574c8 ** Date: Fri, 20 Apr 12 08:50:30 +0000 **/ $atkpage = 1; require_once('globals.php'); $_GET['ID'] = (isset($_GET['ID']) && ctype_digit($_GET['ID'])) ? abs((int) $_GET['ID']) : 0; $_SESSION['attacking'] = 0; $_SESSION['attacklost'] = 0; if(!$_GET['ID']) { echo "You didn't specify a player to attack"; exit($h->endpage()); } $od = $db->query("SELECT `username`, `level`, `gang` FROM `users` WHERE `userid` = {$_GET['ID']}"); if(!$db->num_rows($od)) { echo "You lost to Mr. Non-Existant!"; exit($h->endpage()); } $r = $db->fetch_row($od); $db->free_result($od); echo "You lost to ", stripslashes(htmlspecialchars($r['username'])); $expgain = abs(($ir['level'] - $r['level']) ^ 3); $expgainp = $expgain / $ir['exp_needed'] * 100; echo " and lost ", number_format($expgainp, 2), "% EXP!"; // Figure out their EXP, 0 or decreased? $newexp = max($ir['exp'] - $expgain, 0); $db->query("UPDATE `users` SET `exp` = {$newexp}, `attacking` = 0 WHERE `userid` = $userid"); event_add($_GET['ID'], "<a href='viewuser.php?u=$userid'>{$ir['username']}</a> attacked you and lost.", $c); $atklog = $db->escape($_SESSION['attacklog']); $db->query("INSERT INTO `attacklogs` VALUES(NULL, $userid, {$_GET['ID']}, 'lost', " . time() . ", 0, '$atklog')"); if($ir['gang'] > 0 && $r['gang'] > 0) { $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']}"); echo "You lost 1 respect for your gang!"; } $db->free_result($warq); } $h->endpage(); ?> (event_add() was using $r['userid'], which did not exist. )
-
If you elaborate more on what you want ( in a separate thread ), maybe the community will collaborate on one. ;)
-
It's all good, I do remember the choice of song was usually "Wanted Dead or Alive - Bon Jovi".
-
Locked as requested.
-
Sounds like a neat idea, best of luck with it.
-
Yes. I listen to anything really, here's a list, there's a lot... Black Sabbath, Aerosmith, Within Temptation, 3 Doors Down, Seether, Slayer, GnR, 70s Elton John, Evanescence, Sex Pistols, Billy Idol, Stevie Nicks, The Cranberries, Billy Joel, David Bowie, Santana. Willie Nelson, Dolly Parton, Johnny Cash, Bob Marley, Eric Clapton, Pink Floyd, Queen, Rolling Stones, Metallica, The Dirty Youth, Theory of a deadman, Motorhead, Europe, The Runaways, Joan Jett. Twisted Sister, Meat Loaf, Bon Jovi ( urm one song ), Kid Rock, Adam and the Ants, Alice Cooper, Journey, Starship, Bon Iver, Birdy, Tracy Chapman, Goo Goo Dolls ( purely "iris" ), Patti Smith, Blondie. The Pretty Reckless, Shania Twain, Ellie Goulding, Nina Nesbitt, Janet Devlin's XFator audition ( It's in my playlist for a certain someone, you know who you are ), The Smiths, Adele, Shakespear's Sisters. Lily Allen, Avril Lavigne, Miley Cyrus ( shoot me, I like "The Climb" ), Roxette, Richard Marx, Bonnie Tyler, Juliet Simms, The Script, Icon for Hire, Paloma Faith, Transivision Vamp, Buzzcocks, The Undertones. The Stranglers, The Jam, The Beatles, The Who, Fleetwood Mac. By that: You'll see mostly rock. There is a few that aren't rock/country, and are far from what I'd normally listen to. Becky G, Cher Lloyd, Lady Gaga, Nicki Minaj In my playlist, there is also the entire soundtrack to Rocky Horror Picture Show, but but... okay I like RHPS so much I have in my playlist, sue me. Bold: Ones that get played oveeer and ovvvveeeeeer again.
-
Bollocks. -2short-
-
I second this ( also must spread rep around ). It's good to see this kind of thing again, it's been a while.
-
Car Racing Mod Needed [ Paying ]
-
Tru dat!. Not sure a new forum is the solution to the problems this community is having, but hey doesn't hurt to try. We did try it, but as AB mentioned it was a little bit of a flop. We need some new ideas, revitalise the community as it were. Rather than adding to the pile of forums for this specific community.
-
Not bad, not bad. Thanks for answering.