-
Posts
3,137 -
Joined
-
Last visited
-
Days Won
35
Content Type
Profiles
Forums
Events
Everything posted by Djkanna
-
find out if someone is using another person work? I need a site.
Djkanna replied to gooberface1990's topic in General
Well it really doesn't check it's only useful if you find by your own means that someone has copied your works, that way if it's uploaded to MyOws you can verify that you own it, when you uploaded it etc. -
find out if someone is using another person work? I need a site.
Djkanna replied to gooberface1990's topic in General
You may be looking for http://myows.com/ -
Add the function inside the cron file or include the global_func.php file.
-
You've gotta support proxies..
-
Not actually at home but here are the results for where I am staying. Weird thing is it says on the speed test that Manchester is ~150 miles away yet when I'm at home (which is literally just round the corner) it's only ~50 8|
-
http://oreilly.com/php/index.html I've never bought a PHP book from O'reilly, but I hear good things.
-
<tr><td class="contenth">Blah</td></tr>
-
You defined $Saph not $Saphire.
-
Well thanks but it's really Zeggy's work not mine.
-
I don't get it why does it matter? The only reason I have the guard is because it was free, otherwise I wouldn't care for it.
-
Sounds good, good luck with it :)
-
I'm sorry but just because you own the place doesn't mean you can post in the wrong sections. :P Nice game, not too keen on it's look but good game overall.
-
Meh, it's been a while I'm not used to putting things at the end of files for my footers, thanks once I can actually edit a post I will edit mine :)
-
[mccode v2.x] Zeggy's Business Sim for MCCodes.
-
Hey, Well Lilith asked if Zeggy's Business Sim could be turned into something you can play inside a MCC game, so I did it. I've also modified Zeggy's code a little bit for it to allow high scores, so here goes. [mysql=SQL Code] CREATE TABLE `busSimHs` ( `simID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `simUser` INT(11) UNSIGNED NOT NULL, `simScore` INT(11) UNSIGNED NOT NULL, `simTime` INT(11) UNSIGNED NOT NULL, PRIMARY KEY (`simID`) ); [/mysql] <?php /* All credit goes to Zeggy */ require_once (dirname (__file__) .'/globals.php'); if ( isset ($_GET['hs']) ) { if(isset ($_POST['score']) && filter_var($_POST['score'], FILTER_VALIDATE_INT) ) { $_POST['score'] = abs(filter_var($_POST['score'], FILTER_SANITIZE_NUMBER_INT)); $db->query("INSERT INTO `busSimHs` VALUES ('', ".$userid.", ".$_POST['score'].", UNIX_TIMESTAMP())"); exit; } } ?> <div class="container"> <div class="span-15 push-4 large"> Sock Trader</div> <div class="span-15 push-4 notice" id="tick_message">Welcome to the Sock Trader game!</div> <div class="span-3 push-4 clear"> Day: Coins: Employees: Protesters: Danger: </div> <div class="span-3 push-4 border"> <span id="stat_day"></span> <span id="stat_coins"></span> <span id="stat_employees"></span> <span id="stat_protesters"></span> <span id="stat_danger"></span>% <input type="button" id="do_tick" value="End Day" /> </div> <div class="span-1 push-4"></div> <div class="span-4 push-4 border"> <span class="large">Production</span> <span id="stat_production"></span> Cost: <span id="upgrade_production"></span> <input type="button" id="buy_production" value="Upgrade" /> <span class="large">Protesters</span> Effect: <span id="effect_protesters"></span> Cost: <span id="cost_protesters"></span> <input type="button" id="bribe_protesters" value="Bribe" /> </div> <div class="span-1 push-4"></div> <div class="span-4 push-4 last"> <span class="large">Material</span> <span id="stat_material"></span> Cost: <span id="upgrade_material"></span> <input type="button" id="buy_material" value="Upgrade" /> <span class="large">Security</span> Guards: <span id="stat_guards"></span> Cost: <span id="upgrade_security"></span> <input type="button" id="buy_security" value="Upgrade" /> </div> <div class="span-15 push-4"><input type="button" id="reset" value="New Game" /></div> </div> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script>!window.jQuery && document.write('<script src="assets/js/jquery-1.4.2.min.js"><\/script>')</script> <script type="text/javascript"> (function() { var game = { init: function() { game.days = 0; game.coins = 0; game.employees = 1; game.protesters = 0; game.production = 0; game.material = 0; game.security = 1; game.type_prod = [ 'By Hand', 'Sewing Kit', 'Sewing Machine', 'Assembly Line', 'Robot Slave Workers', 'Magic Sock Summoning', '' ]; game.mult_prod = [ 2, 5, 20, 100, 230, 540 ]; game.cost_prod = [ 10, 140, 2500, 19500, 116200, 0 ]; game.type_material = [ 'Old Newspapers', 'Fresh Newspapers', 'Cotton', 'Silk', 'Gold', 'Plasma', '' ]; game.mult_material = [ 1, 2, 3, 4, 6, 9 ]; game.cost_material = [ 30, 800, 7400, 47800, 264500, 0 ]; var intro = 'Welcome to Sock Trader! \ The goal is to earn as much as you can in 100 days! \ When you press End Day, your workers will produce and sell socks. \ Spend your money on upgrades to increase sock production and profits! \ Bribe protesters to get rid of them, and hire security guards to defend against terrorists. \ Production increases the amount of socks you produce. \ Material increases the price you can sell each sock for. \ Protesters reduce the price of each sock. The price to bribe them increases exponentially. \ Terrorists destroy your sock production for one turn. \ '; game.update_ui(intro); }, bind: function() { $('#do_tick').click(game.tick); $('#buy_production').click(game.upgrade_production); $('#buy_material').click(game.upgrade_material); $('#bribe_protesters').click(game.bribe_protesters); $('#buy_security').click(game.upgrade_security); $('#reset').click(game.init); }, tick: function() { if (game.days >= 100) { $.ajax({ type: 'post', url: 'business_sim.php?hs', data: 'score='+Math.ceil(Math.sqrt(game.coins)), success: function() { game.update_ui('Game over! Your final score is ' + Math.ceil(Math.sqrt(game.coins)) + '! High score saved, well done <?php echo htmlentities($ir['username'], ENT_QUOTES); ?>'); } }); return; } game.days++; var message = ''; var sock_rate = (Math.ceil(Math.random()*20)+90)/100; var rand = Math.ceil(Math.random()*100); if (rand <= game.danger()) { sock_rate = Math.ceil(Math.random()*10)/100; message += 'Sock Terrorists attacked your building, and destroyed most of today\'s production! '; } var socks = Math.ceil(game.employees * game.mult_prod[game.production] * sock_rate); var price_rate = game.mult_material[game.material] - game.protesters; var total = price_rate * socks; game.coins += total; message += 'You produced and sold ' + socks + ' socks for ' + total + ' coins. '; rand = Math.ceil(Math.random()*100); if (rand <= 10) { game.employees++; message += 'Another employee has joined your business! '; } rand = Math.ceil(Math.random()*100); if (rand <= 10 && game.protesters < game.mult_material[game.material]-1) { game.protesters++; message += 'A protester has joined the protest against your socks! '; } game.update_ui(message); }, upgrade_production: function() { if (game.production >= 5) { game.update_ui('There are no more production upgrades!'); return; } var cost = game.cost_prod[game.production]; if (game.coins < cost) { game.update_ui('You don\'t have enough coins to upgrade production!'); return; } game.coins -= cost; game.production++; game.update_ui('You have upgraded your sock production!'); }, upgrade_material: function() { if (game.material >= 5) { game.update_ui('There are no more material upgrades!'); return; } var cost = game.cost_material[game.material]; if (game.coins < cost) { game.update_ui('You don\'t have enough coins to upgrade materials!'); return; } game.coins -= cost; game.material++; game.update_ui('You have upgraded your sock materials!'); }, bribe_protesters: function() { var protester_cost = game.bribe_cost(); if (game.protesters == 0) { game.update_ui('There are no protesters!'); return; } if (game.coins < protester_cost) { game.update_ui('You don\'t have enough money to bribe the protesters!'); return; } game.coins -= protester_cost; game.protesters = 0; game.update_ui('The protesters have left.'); }, bribe_cost: function() { return 10 * game.days * game.protesters; }, danger: function() { return Math.floor(Math.floor(game.days / 3) / game.security); }, upgrade_security: function() { var security_cost = game.security_cost(); if (game.coins < security_cost) { game.update_ui('You don\'t have enough money to hire another security guard!'); return; } game.coins -= security_cost; game.security++; game.update_ui('You have hired another security guard!'); }, security_cost: function() { return Math.pow(10, game.security); }, update_ui: function(message) { $('#tick_message').html(message); $('#stat_day').text(game.days); $('#stat_coins').text(game.coins); $('#stat_employees').text(game.employees); $('#stat_protesters').text(game.protesters); $('#stat_danger').text(game.danger()); $('#stat_production').text(game.type_prod[game.production]); $('#stat_material').text(game.type_material[game.material]); $('#stat_guards').text(game.security); $('#upgrade_production').text(game.cost_prod[game.production]); $('#upgrade_material').text(game.cost_material[game.material]); $('#upgrade_security').text(game.security_cost()); $('#cost_protesters').text(game.bribe_cost()); $('#effect_protesters').text('-' + game.protesters + ' coin per sock'); } }; $(document).ready(function() { game.bind(); game.init(); }); })(); </script> Now a few notes: To get it to look like how Zeggy's does, you'll need to rob a portion of the css available via his game (I'm sure he won't mind) or you can head over to blueprint and grab what you need. If you'd like I'll make somewhere to show the hall of fame results or someone else can if they want. All credit goes to Zeggy, not sure what license he's released it under but I'm sure he'd appreciate it if in someway you'd credit him for it. Enjoy. Djkanna.
-
Ever thought about $(this + '.text') ;)
-
There is services that provide help with promoting games, perhaps contact BrowserGames Factory ;) Or do a quick search for browser game promoters, or do it yourself and perhaps ask the advice of some of the members here that do this sort of thing regularly. Maybe A_Bertrand can help, or Zeggy maybe :D :)
-
if ($_GET['buy']==100){ if ($ir['money'] < 700000){ echo "Sorry! You must have $700,000 on hand to buy 100 crystals!"; $h->endpage(); exit(); } $db->query("UPDATE users SET crystals=crystals+100, money=money-1000000 WHERE userid=$userid"); echo "You have bought 100 crystals for $1,000,000!"; $h->endpage(); exit(); } That cannot be right surely? Looks alright, well done Kieran.
-
Oh then I match 6 for 6. Good luck finding a partner Dave. (:
-
Why does everyone require design skills :'(
-
PHP notifies you for a reason you shouldn't just take the quick route out and turn off error_reporting().
-
Works fine in firefox, bugs up in IE. Quick fix is just to change the anchor tags href to inventory.php rather than having it blank.