kingsaint Posted April 3, 2015 Posted April 3, 2015 I am looking for somebody who already has or can create me 2 modifications: One the achievement modification where players can complete certain achievements such as kill 50 players or kill 100 players and receive an achievement, id also like to be able to add to this so if in the future i want to add achievements i can. Id also like on the user profile page a country flag, so you would see near the user info "Country:(picture of flag)" and id like this to autodetect country and assign the flag by checking the ip address =] please could anybody who has or can code this for me get in touch =] Quote
Guest Posted April 3, 2015 Posted April 3, 2015 "i want to add achievements i can." You won't be able to, you would need to program them yourself in. Quote
Coly010 Posted April 3, 2015 Posted April 3, 2015 (edited) "i want to add achievements i can." You won't be able to, you would need to program them yourself in. Not true depending on the set up. Using a database you can have a table for achievements. State an achievement type, money, level, stats, kills etc, then have a column for the value needed. 100 kills, level 100, etc. then you just run code to check if a player had completed any of these, if they have credit them the achievement. Because of the setup then, the owner can add more achievements through the staff panel, as long as you have enough different achievement types covered. [MENTION=68472]kingsaint[/MENTION] I could do the achievement one, as for the country flag, with a bit of googling I might be able to do that. But as I'm almost at release of my own game I need to know if it'll be worth my time to put it plainly Edited April 3, 2015 by Coly010 Quote
Guest Posted April 3, 2015 Posted April 3, 2015 Not true depending on the set up. Using a database you can have a table for achievements. State an achievement type, money, level, stats, kills etc, then have a column for the value needed. 100 kills, level 100, etc. then you just run code to check if a player had completed any of these, if they have credit them the achievement. Because of the setup then, the owner can add more achievements through the staff panel, as long as you have enough different achievement types covered. @kingsaint I could do the achievement one, as for the country flag, with a bit of googling I might be able to do that. But as I'm almost at release of my own game I need to know if it'll be worth my time to put it plainly Country flag is just IP -> Country simple enough. True but still those achievements are limited, think about other plugins the guy may have, but you solution I guess would work for the basics. Quote
kingsaint Posted April 3, 2015 Author Posted April 3, 2015 (edited) Country flag is just IP -> Country simple enough. True but still those achievements are limited, think about other plugins the guy may have, but you solution I guess would work for the basics. so something like this will work? if i download all the correct flag images etc....... <?php require_once('CountryFromIP.inc.php'); $ip ='202.164.32.81'; //$ip ='210.25.55.2'; $object = new CountryFromIP(); $countryName = $object->GetCountryName($ip); $flagPath = $object->ReturnFlagPath(); echo "<BR> <B>Country: </B>".$countryName; echo "<BR> <B>Flag: </B> <img src=".$flagPath." border='0'>"; ?> I basically want to use the flags located here https://www.flag-sprites.com/ Edited April 3, 2015 by kingsaint Quote
KyleMassacre Posted April 3, 2015 Posted April 3, 2015 Why don't you just have the user pick the country they are from? If they have to hide behind a proxy then your logic doesn't work. IP is one of the worst ways to get a persons location because of some strict country laws and blacklists. It's just like IP banning someone, they can easily come back to your game via proxy unless you ban all proxy servers which in turn is also a bad idea because ultimately that may lead to loss of income by big ballers living in a country that hates the country your game is hosted in. The easiest way is just to have your user pick where they are actually from, and if they lie, WGAF? Chances are you will never know either way lol For modular achievements, that can be a daunting task at hand. You would have to set something up like with Dave's ajax chat system that hooks into all columns in your table(s) so every time you create a new column it loads automatically which really isn't that daunting really now that I keep thinking about it and just create a function/method (which ever way you choose) to credit the achievement and validate they do/don't have the achievement already. You can also just serialize the requirements much like Dave does with his chat or MCC's item system Quote
NonStopCoding Posted April 3, 2015 Posted April 3, 2015 i coded prison steams achievement system nothing special based on certin this (Mugs,Attacks,Str,Def,Spe training) but they are easy enough to change has a staff panel for adding achievement goals but its for grpg lol would need to convert it if you were intrested Quote
Magictallguy Posted April 4, 2015 Posted April 4, 2015 i coded prison steams achievement system [...] Actually, I did. Then Ibraheem had a hissy fit, claimed my code as his own, and locked me out Quote
kingsaint Posted April 4, 2015 Author Posted April 4, 2015 Why don't you just have the user pick the country they are from? If they have to hide behind a proxy then your logic doesn't work. IP is one of the worst ways to get a persons location because of some strict country laws and blacklists. It's just like IP banning someone, they can easily come back to your game via proxy unless you ban all proxy servers which in turn is also a bad idea because ultimately that may lead to loss of income by big ballers living in a country that hates the country your game is hosted in. The easiest way is just to have your user pick where they are actually from, and if they lie, WGAF? Chances are you will never know either way lol For modular achievements, that can be a daunting task at hand. You would have to set something up like with Dave's ajax chat system that hooks into all columns in your table(s) so every time you create a new column it loads automatically which really isn't that daunting really now that I keep thinking about it and just create a function/method (which ever way you choose) to credit the achievement and validate they do/don't have the achievement already. You can also just serialize the requirements much like Dave does with his chat or MCC's item system Thanks for all help guys ive managed to add flag system to the game =] (Y) Quote
NonStopCoding Posted April 4, 2015 Posted April 4, 2015 Actually, I did. Then Ibraheem had a hissy fit, claimed my code as his own, and locked me out i coded this not that long ago before he sold it maybe you did another for him? Quote
jcvenom Posted April 4, 2015 Posted April 4, 2015 Like kyle said let the user choose there nationality/Flag upon sign up and then fetch there result from a table ? Much much easier than your auto_ip file :) Quote
Magictallguy Posted April 4, 2015 Posted April 4, 2015 i coded this not that long ago before he sold it maybe you did another for him? Possibly, sounds like something he'd do haha Quote
Magictallguy Posted April 4, 2015 Posted April 4, 2015 Like kyle said let the user choose there nationality/Flag upon sign up and then fetch there result from a table ? Much much easier than your auto_ip file :) How about a combination of the 2 methods? Let new users sign up with their flag, create an option in preferences.php to allow users to select a flag, meodify existing fields with a quick select and update Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.