Jump to content
MakeWebGames

Someone

Members
  • Posts

    283
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Someone

  1. Someone

    help / info

    There you go http://bit.ly/Wa2MkL
  2. Yes thats a valid question as well. Unless it has been running for a very long time and/or they get a lot of stats every time they train, I suspect some exploiting going on. Also, is the database column stat field an unsigned number, will not help here, but it should be unsigned (the number will never be less than 0, allows storing bigger number in the database). Something to experiment with for a work around. If the problem is only when doing math with the big numbers. Divide the stats by 1000 (or something) before using them. Something like // do for each stat $ir['agility'] = ($ir['agility'] / 1000); if($ir['agility'] < 1){ //In case the player has a stat less than 1000 $ir['agility'] = 1; }
  3. Seems like you are running into the max int size in PHP. See http://stackoverflow.com/questions/670662/whats-the-maximum-size-for-an-int-in-php  
  4. Someone

    HabitRPG

    Reminds me of this horror presentation by Carnegie Mellon University Professor, Jesse Schell @ DICE2010  
  5. Thank you for the appreciation :cool: Will try to update sections every time I encounter something, or when I help someone(else) with something regarding NWE, to see if there is something in the documentation that could have been made clearer. Stay up to date on changes in the NWE wiki on this page http://www.nw-engine.com/wiki/index.php/Special:RecentChanges Alain also updated the wiki page for database queries, that is not in recent changes list, but worth checking out. And please do contribute. Do not worry about making mistakes, if we as a group monitor the site, errors will be fixed, and/or updated with "better" practices.
  6. LOL that points back to what I thought you first meant :confused: And is something Ive been working on, and willing to share. (If Alain or someone else makes it thats even better, the more diversity the better) My version would take extra effort to get working with other parts of the game, that I might not be interested in modifying to work with my project.   This is why I thought you wanted a tile map
  7. Forgot how much effort I had into that project. Glad it could still run. Even made a simple tile map designer for it. Getting interested in bringing it into life in some form again. Yeah the page itself there is based on the whole game being managed through jQuery. Data is loaded into divs from the back end, so you do not refresh the whole page. The mao itself is one image, it uses <area> to define click able tiles, that pops up the small menu, and moes the arrow marker to that location. And load the possible actions to the window to the left, and updates the small buttons under the image.   Posting how its built in case anyone is interested in doing something similar. The Make data table generates sql info INSERT INTO `map_blocks2` (`id`, `mapid`, `blockid`, `type`, `actions`, `back_possible`, `back_owner`, `back_manager`, `back_profit`, `back_stock`, `back_protector`, `back_type`, `back_variables`, `back_name`, `back_message`, `block_name`, `block_description`, `front_owner`, `front_protector`, `front_manager`, `front_profit`, `front_variables`, `front_message`) VALUES (NULL, '0', '0', '1', '1-3-6', '0', '0', '0', '0', '0', '0', '0', '', '', '', '', '', '0', '0', '0', '0', '', ''); INSERT INTO `map_blocks2` (`id`, `mapid`, `blockid`, `type`, `actions`, `back_possible`, `back_owner`, `back_manager`, `back_profit`, `back_stock`, `back_protector`, `back_type`, `back_variables`, `back_name`, `back_message`, `block_name`, `block_description`, `front_owner`, `front_protector`, `front_manager`, `front_profit`, `front_variables`, `front_message`) VALUES (NULL, '0', '1', '1', '1-3-6', '0', '0', '0', '0', '0', '0', '0', '', '', '', '', '', '0', '0', '0', '0', '', ''); etc etc   Build link generates the areas that should be clickable on the image. <area blocknum="0" posActions="1-3-6" areaType="1" blockinfo="Police Station" shape="rect" coords="0,0,32,32" href="#0" /> <area blocknum="1" posActions="1-3-6" areaType="1" blockinfo="Police Station" shape="rect" coords="32,0,64,32" href="#1" /> <area blocknum="3" posActions="1-2-3-4-6-7" areaType="2" blockinfo="Bank" shape="rect" coords="96,0,128,32" href="#3" /> etc etc   [ATTACH=CONFIG]853[/ATTACH]
  8. Once again have I miss understood your post, I missed what you meant by locations.. You want a grid map for exploration locations? Think this old project of mine is what you are wanting to make. The map is tile based and you get to options for what to do. Each tile is own able, and one tile can occupy multiple spaces in the grid.     [ATTACH=CONFIG]851[/ATTACH]   [ATTACH=CONFIG]852[/ATTACH]
  9. ^ "He was a lonely ghost uttering a truth that nobody would ever hear"   I for one is working on these things. Said I would think about the location ownership, I have thought about it, and yes I will make it to work like that
  10. There are clearly two sides on that. Some say it may even be less secure to move configurations files out of root if not done correctly, and perhaps even then. I am with Aaron Adams @ http://wordpress.stackexchange.com/questions/58391/is-moving-wp-config-outside-the-web-root-really-beneficial/74972#74972 read some other stuff as well. Seen many "fire the sys admin if he dont know what he is doing". To that I say sys admin *** is that? I rent a server at 4$ a month (not true)
  11. I was being a joker about stopping the madness. .htaccess can fail, and php files can be shown in some cases as plain text. It has actually happened to me, not htaccess failing, but php being shown as text. It usually happens only for a split second, but that is all it takes. When it comes to things such as database details. As you have pointed out, and I 100% agree, that even if files are shown, there is no risk in that itself. Except for the files containing database details. I would never leave the install folder on a live site, no reason to have it there. I am not requesting anything being done, just saying that I will keep my database file out of public access.
  12. Glad you stopped the madness. Checked into it, the only file I will make sure is out of public, is the file with the db settings and license. Should something ever fail, and apache (or a hacker manages to crash it, be it through my site or another site on the server) shows php files as plain text. Should be trivial for anyone to do that if they want to. Do not mean to change subject of thread.
  13. I just had to look, I do not see Greg raving here, but I still had to look, did Alain leave all php files visible in the .htaccess....       No he did not :)
  14. Yup that solves it. Loving it :cool:
  15. Not a bad idea. Could be a "My Bookmarks" section in the menu. Or a standalone module that adds to $content, that people can place wherever they want to in their theme.
  16. The condition_code fields seems to been broken when editing/adding table rows
  17. I vote wait, or whatever you other guys think EDit: Looks good :)
  18. I have not really liked it much either. I was messing around using functions, making a function, guess the right term is method, for each kind of common HTML stuff you need. Well I was fast up in 20+ methods and 500 lines of code :) Checked the incoming data, and returned the "correct" html, depending on if Bootstrap is used. Using this system, its just a matter of browsing through and adding classes where needed to turn it into Bootstrap ready. Or another framework, or custom theme. The most time consuming for me when making stuff is the HTML elements. And I want it to be uniform, so each page looks like its part of the whole. And then what if I change something around, a lot to update. Also, it makes it possible to not having to change the content page at all, but instead modify the template file when a module is updated. Note about the exampe: Using inline style in the example, that is to show examples. And to avoid having to get people to modify their default theme css. In an actual production that should be moved to a css file
  19. I have been working on this. The system I ended up with has nothing todo with Bootstrap though. Instead its a simple template system, that should be both lightweight expandable both for module developers and game owners running custom themes. First there is a template file, just like the engine does for functions.php this template module will check for a template file first in the currently active template folder. If none is found, it will fall back to a default one. I will write one for each of the default themes. Samples from template (ini format) file: ;<?php die; ?> ; This is not a php file, its an ini file, use " around values, as ' is only supported around values in PHP 5.3 ; What should the tags default to if not being supplied to $options, ; if no default is set, the tag will simply be removed. [default] inputText['style'] = "width: 200px;" ; This will be added before default value, or the value passed ; as option. Useful if you want to add a attribute to a HTML element. [prepend] inputText['style'] = "style='" textArea['style'] = "style='" messageBox['class'] = "class='" messageBox['title'] = "<h4 style='margin:0;'>" ; This will be added after the default value, or the value passed ; as option. [append] inputText['style'] = "'" messageBox['class'] = "'" messageBox['title'] = "</h4>" textArea['style'] = "'" [html] formStart = "<form method='post' name='**name**'>" formEnd = "</form>" button = "<a href='**url**' class='linkButton'>**label**</a>" inputText = "<input class='##class##' ##style## type='text' name='**name**' value='##value=100##' />"; inputHidden = "<input type='hidden' name='**name**' value='**value**' />" textArea = "<textarea ##style=margin: 5px; width: 95%;## name='**name**'>##value##</textarea>" legend = "<legend>##label##</legend>" radio = "<label class='radio'><input type='radio' name='**name**' id='##id##' value='##value##' ##ischecked##>**label**</label>" messageBox = "<div ##class## style='padding: 5px'>##title##**message**</div>"   It works like this: $tpl->Element('contentHeader',array( 'title' => Translate('Create Gradient') )); $tpl->Element('formStart', array('name' => 'makeUserGradient')); $tpl->Element('messageBox',['message' => 'Insert the colors you want to use in the field below. One color per line.<br/>You can add conditions for the gradients by editing the gradient_types table in the admin panel']); $tpl->Element('textArea', [ 'name' => 'colors', 'value' => $sent_colors ]); SubmitButton('Generate Gradient'); $tpl->Element('formEnd'); $tpl->Element('contentFooter');   $tpl->Element($elementName = 'string', $options = array()) $tpl->Element will try to match up $elementName with the key in the ini file. The keys in $options will try to match up with the tags that are in ## or ** Tags that are in ** are required, and must be passed as part of $options, or the sript will fail in error. For the optional tags you can set default values, either inline like ##style=margin: 5px; width: 95%;## or listed under [default] I have two volunteers who will help testing this, but though I might as well get it out there for feedback and suggestions.
  20. You got an NWE game up and running? Using the engine as is, or made customizations? Think I would have limited success with relying on SEO for this kind of site. Im gonna throw some money at when first starting, and hope I make it unique and fun enough for word of mouth to carry the heavy load on marketing. I think people are hesitant on starting to play if there are few players.
  21. I see it as trickery when that is done. Some does it sure, I personally don't like that practice. Funny story, I bought a subscription for a software, 100$ (might been 150 )something a month, I stopped using it, and forgot about it. This new year I went thorough my papyal transactions, it has been deducting that amount for 2 years. This story tells more about my money management skills than anything else, funny though :) would not been that funny had the software still not made my money back over the years even though I did not use it.
  22. Someone

    Windows 8

    You confirmed my thoughts on Windows 8. Got Windows 7 non-OEM last time I upgraded my desktop, gonna hang on to that for a long time. Guess that we should be thankful that they even offer the start menu and file explorer.
  23. Note that } elseif() { is somewhat faster than } else if() { =================================== Test (100,000,000 runs): <?php $start = microtime(true); for($i = 0; $i < 100000000; $i++) { if(2 === 0) {} else if(2 === 1) {} else {} } $end = microtime(true); echo "1: ".($end - $start)."\n"; unset($start, $end); $start = microtime(true); for($i = 0; $i < 100000000; $i++) { if(2 === 0) {} elseif(2 === 1) {} else {} } $end = microtime(true); echo "2: ".($end - $start); ?> =================================== Result (depending on hardware configuration): 1: 20.026723146439 2: 20.20437502861 :):):):):):):):):):):):):):):)     I LOL'ed
  24. Post a snippet of the code. Makes it much easier to help you. Place them in these tags, remove * [php*] code here [/php]
  25. curl or wget, pretty much the same for this purpose. http://daniel.haxx.se/docs/curl-vs-wget.html A third option is using php itself. You wont have to have the server visit the page.   Not agreeing on this part though: "PHP directly is the simplest option" http://stackoverflow.com/questions/12930936/wget-curl-and-php-for-cronjobs
×
×
  • Create New...