Jump to content
MakeWebGames

sniko

Members
  • Posts

    2,210
  • Joined

  • Last visited

  • Days Won

    47

Everything posted by sniko

  1. Welcome back, InternalExpertCoding.
  2. I did take a different approach than 'Someone'. He's (from what I can tell, at a quick glance) made his version so you have to edit each modules content.php file, I've created a whole new theme, and 'adapted' the bootstrap css class and id elements to 'flow' with the already NWE. I am loving Bootstrap, it's like my new love :p
  3. I may have got the function and column name wrong.
  4. $get = $db->query("SELECT `itmid` FROM `items`"); while( $r = $db->fetch_row($get) ) { item_add(1, $r['itmid'], 1); } echo 'All items credited to userid 1';
  5. You could alter this version, however; Set up a database table to store unix timestamps and filenames Include the cron files into a global file (that is run with every request) In the cron file, pull the unix timestamp from the database table you created earlier, and see if it's time to update (use simple math) If you have run the crons, because it was time to update, update the unix timestamp value in the database table   I hope that helps.
  6. Very elegant.
  7. Awesome new concept, Frosty!
  8. An extension of what Guest wrote;   <?php #colours $races = array(1 => 'Human', 2 => 'Elf', 3 => 'Dwarf'); if( array_key_exists('race', $_POST) ) { $race = ( in_array($_POST['race'], $races) ) ? $races[$_POST['race']] : 1; /* Default race is Human */' switch($race) { case 'ELF' : $agility += 10; /* Plus 10 agility */ break; case ' 'HUMAN' : $strength += 20; /* Plus 20 strength */ break; default : $guard += 5; /* Plus 5 guard */ break; } } /* now for the form */ echo '<select name="race">'; foreach($races as $race_id => $race_label) { echo '<option value="'. $race_id .'">'. $race_label .'</option>'; } echo '</select>';
  9. Bringing the conversation down to a personal level is low, with your intellect I know you know this. That system was made a while back, you know this. I won't leave the conversation I made. Involving your name wasn't really an invitation to bombard.
  10. Yeah, I read 'Guest' post. I disagree with him, as NWE has -somewhat- revolutionized the way most people on this forum think about programming, as they've mostly only experienced McCodes.
  11. Rhetorical? :p Haha, not at all! New Worlds Engine is very well set-up, good job.
  12. I'm developing this particular edit locally, so I cannot test on a mobile device. However, bootstrap is responsive.
  13. Hi, I had some spare time, which is quite rare, and I always like to extend my portfolio. I looked into New Worlds Engine (KyleMassacre's new love :p) and as I've recently been working with Bootstrap, I thought I'd integrate bootstrap into it. Although my attempt isn't complete, and I've still some integration to finish. Here's a little preview Let me know what you think -sniko
  14. sniko

    Domain Values

    You may want to look at this attachment   Also, and hits per month
  15. sniko

    Domain Values

    First, you need to find the right person to buy the domains off you - they will truly know how much they're worth; not a professional view, but a personal view. If they want the domain, they'll pay as much as they can, if you catch my drift. Second, domain valuation is done -somewhat- on search engine positioning, and hits per month. How frequent do users type in "psdconversion" into Google, and they see your result. (You analyse that data here) And how much of that traffic do you attract. What I'm saying here is; people are interested in numbers.   "Post below..." #implying we can post above
  16. Ensure you normalize your database   Here's a quick mockup I did CREATE TABLE IF NOT EXISTS `buildings` ( `id` MEDIUMINT(5) NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` VARCHAR(25) NOT NULL, `upgrade_condition` TEXT(1000), `price` MEDIUMINT(5) NOT NULL ); CREATE TABLE IF NOT EXISTS `user_buildings` ( `user_id` MEDIUMINT(5) NOT NULL, `building_id` MEDIUMINT(5) NOT NULL, `level` SMALLINT(3) NOT NULL DEFAULT 1, `upgrade_in` INT(10) NOT NULL DEFAULT 0 ); INSERT INTO `buildings` (`name`,`upgrade_condition`,`price`) VALUES ('Farm', 'level > 4', 1000), ('Barracks', 'location == 1', 5000); INSERT INTO `user_buildings` (`user_id`,`building_id`,`level`) VALUES (1,1,1), (1,2,1);   Let's have a look... We've got two tables, one to hold valuable building data, one to hold the data on the buildings a user owns, linked with the foreign key; `building_id` = `id` I've took the liberty to insert some data Now, let's create an SQL statement to get all the buildings user_id(1) has; /* Get user buildings * Use your desired language to manipulate this query, and the data it returns */ SELECT u.`building_id`,u.`level`,u.`upgrade_in`, b.`name`,b.`upgrade_condition` FROM `user_buildings` u LEFT JOIN `buildings` b ON u.`building_id` = b.`id` WHERE (u.`user_id`=1)   SQLFiddle :)
  17. You're correct. @OP Change: $_POST['ref'] = (isset($_POST['ref']) && is_numeric($_POST['ref'])) ? abs(intval($_POST['ref'])) : ''; To $_POST['ref'] = (isset($_POST['REF']) && is_numeric($_POST['REF'])) ? abs(intval($_POST['REF'])) : '';
  18. Do the following;   /* * For attackwon, and other won outcomes I'm using $r, but preferably I'd use the query string */ if( ((($ir['userid'] % 2) == 0) AND (($r['userid'] % 2) != 0)) OR ((($ir['userid'] % 2) != 0) AND (($r['userid'] % 2) == 0)) ) { $db->query("UPDATE `users` SET `sides`=`sides`+1 WHERE `userid`={$userid}", $c); } /* * For attacklost, and other lost outcomes I'm using $r, but preferably I'd use the query string */ if( ((($ir['userid'] % 2) == 0) AND (($r['userid'] % 2) != 0)) OR ((($ir['userid'] % 2) != 0) AND (($r['userid'] % 2) == 0)) ) { $db->query("UPDATE `users` SET `sides`=`sides`+1 WHERE `userid`={$r['userid']}", $c); }   In theory, that should work how you require it to. Also, to get the winning side, just count the values of sides for each side ;)
  19. /* I'm using $r, but preferably I'd use the query string */ if( ((($ir['userid'] % 2) == 0) AND (($r['userid'] % 2) != 0)) OR ((($ir['userid'] % 2) != 0) AND (($r['userid'] % 2) == 0)) ) { /* Plus one. */ } /* No need to put in code to not plus 1 */
  20. Just a question. Why have brainfile have a data-type of array, and not use it? _GET['view'] == 4 [...blah blah blah ...], why not use a switch statement? Might want to make your auto_increment to equal 1 You don't need r_type to have INT(11), wasting memory Possibly some sort of indentation, and comments throughout?
  21. From what I gather, Grant has the rights, yes.
  22. ADVANCED PROPERTY AND MARRIAGE SYSTEM Support Included 72 hours after payment has been processed Instructions Included Yes Price $25.00 USD Basic Overview   This advanced property system incorporates its own marriage system, allowing house sharing. When purchasing a range of properties, you can upgrade them with property upgrades (and renting and selling a property with the upgrades you've purchased) Give your players the freedom of becoming a property tycoon! I’ve tried to incorporate this system – Advanced Property Modification – into the existing property system that came with McCodes v2. For example, if you’re renting a property off someone, and the rent days run out – meaning you give the property back to the landlord – you will be returned to living in the property you were in before moving over to the Advanced Property Modification. This will mean that you can keep both systems in play.   Payment   Price $25.00 USD Via PayPal Purchase Link http://mccodes.com/viewmod.php?id=104&sec=overview   Version 1.2.1 Only a small update, but an update nonetheless; Split the chapel system into its own file (property_chapel.php) Split the property market into its own file (property_market.php) Ability to remove a listing from the property market Ability to sell property back to the agent   Thanks for your time. -sniko
  23. I doubt it will be because of a browser. The code that stops the login process is an explicit check on a CSRF code. Have a read of this thread.
  24. ....but....but I've never even heard of this tall guy who throws magic around :p Welcome back Reasonably tall magical man
×
×
  • Create New...